comparison OrthancServer/OrthancRestApi.cpp @ 197:530a25320461

removal of text as ids in sqlite db
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 27 Nov 2012 14:59:55 +0100
parents a1b9d1e1497b
children 663cc6c46d0a
comparison
equal deleted inserted replaced
196:6d0225a26fd8 197:530a25320461
570 { 570 {
571 CompressionType compressionType; 571 CompressionType compressionType;
572 std::string fileUuid, contentType, filename; 572 std::string fileUuid, contentType, filename;
573 if (uri[2] == "file") 573 if (uri[2] == "file")
574 { 574 {
575 existingResource = index_.GetFile(fileUuid, compressionType, uri[1], "dicom"); 575 existingResource = index_.GetFile(fileUuid, compressionType, uri[1], AttachedFileType_Dicom);
576 contentType = "application/dicom"; 576 contentType = "application/dicom";
577 filename = fileUuid + ".dcm"; 577 filename = fileUuid + ".dcm";
578 } 578 }
579 else if (uri[2] == "tags" || 579 else if (uri[2] == "tags" ||
580 uri[2] == "simplified-tags") 580 uri[2] == "simplified-tags")
581 { 581 {
582 existingResource = index_.GetFile(fileUuid, compressionType, uri[1], "json"); 582 existingResource = index_.GetFile(fileUuid, compressionType, uri[1], AttachedFileType_Json);
583 contentType = "application/json"; 583 contentType = "application/json";
584 filename = fileUuid + ".json"; 584 filename = fileUuid + ".json";
585 } 585 }
586 586
587 if (existingResource) 587 if (existingResource)
642 uri[4] == "image-uint8" || 642 uri[4] == "image-uint8" ||
643 uri[4] == "image-uint16")))) 643 uri[4] == "image-uint16"))))
644 { 644 {
645 std::string uuid; 645 std::string uuid;
646 CompressionType compressionType; 646 CompressionType compressionType;
647 existingResource = index_.GetFile(uuid, compressionType, uri[1], "dicom"); 647 existingResource = index_.GetFile(uuid, compressionType, uri[1], AttachedFileType_Dicom);
648 648
649 std::string action = uri[2]; 649 std::string action = uri[2];
650 650
651 unsigned int frame = 0; 651 unsigned int frame = 0;
652 if (existingResource && 652 if (existingResource &&