comparison OrthancServer/OrthancMoveRequestHandler.cpp @ 1724:7e0b5e413c7c db-changes

C-Move SCP for studies using AccessionNumber tag
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 20 Oct 2015 11:02:06 +0200
parents 3bcb01028107
children 1ae29c5e52fb ec66a16aa398
comparison
equal deleted inserted replaced
1723:40a8445fc81d 1724:7e0b5e413c7c
106 106
107 bool OrthancMoveRequestHandler::LookupIdentifier(std::string& publicId, 107 bool OrthancMoveRequestHandler::LookupIdentifier(std::string& publicId,
108 ResourceType level, 108 ResourceType level,
109 const DicomMap& input) 109 const DicomMap& input)
110 { 110 {
111 DicomTag tag = GetIdentifierTag(level); 111 DicomTag tag(0, 0); // Dummy initialization
112
113 switch (level)
114 {
115 case ResourceType_Patient:
116 tag = DICOM_TAG_PATIENT_ID;
117 break;
118
119 case ResourceType_Study:
120 tag = (input.HasTag(DICOM_TAG_ACCESSION_NUMBER) ?
121 DICOM_TAG_ACCESSION_NUMBER : DICOM_TAG_STUDY_INSTANCE_UID);
122 break;
123
124 case ResourceType_Series:
125 tag = DICOM_TAG_SERIES_INSTANCE_UID;
126 break;
127
128 case ResourceType_Instance:
129 tag = DICOM_TAG_SOP_INSTANCE_UID;
130 break;
131
132 default:
133 throw OrthancException(ErrorCode_ParameterOutOfRange);
134 }
112 135
113 if (!input.HasTag(tag)) 136 if (!input.HasTag(tag))
114 { 137 {
115 return false; 138 return false;
116 } 139 }