comparison OrthancServer/DicomProtocol/DicomUserConnection.cpp @ 1998:9b61701c35f2

New URI "/modalities/.../move" to issue C-Move SCU requests
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 25 May 2016 15:16:17 +0200
parents f9f2aa1cc594
children 9e021b2b348b
comparison
equal deleted inserted replaced
1997:f9f2aa1cc594 1998:9b61701c35f2
993 } 993 }
994 } 994 }
995 995
996 996
997 void DicomUserConnection::Move(const std::string& targetAet, 997 void DicomUserConnection::Move(const std::string& targetAet,
998 ResourceType level,
998 const DicomMap& findResult) 999 const DicomMap& findResult)
999 { 1000 {
1000 if (!findResult.HasTag(DICOM_TAG_QUERY_RETRIEVE_LEVEL))
1001 {
1002 throw OrthancException(ErrorCode_InternalError);
1003 }
1004
1005 const std::string tmp = findResult.GetValue(DICOM_TAG_QUERY_RETRIEVE_LEVEL).GetContent();
1006 ResourceType level = StringToResourceType(tmp.c_str());
1007
1008 DicomMap move; 1001 DicomMap move;
1009 switch (level) 1002 switch (level)
1010 { 1003 {
1011 case ResourceType_Patient: 1004 case ResourceType_Patient:
1012 TestAndCopyTag(move, findResult, DICOM_TAG_PATIENT_ID); 1005 TestAndCopyTag(move, findResult, DICOM_TAG_PATIENT_ID);
1030 default: 1023 default:
1031 throw OrthancException(ErrorCode_InternalError); 1024 throw OrthancException(ErrorCode_InternalError);
1032 } 1025 }
1033 1026
1034 MoveInternal(targetAet, level, move); 1027 MoveInternal(targetAet, level, move);
1028 }
1029
1030
1031 void DicomUserConnection::Move(const std::string& targetAet,
1032 const DicomMap& findResult)
1033 {
1034 if (!findResult.HasTag(DICOM_TAG_QUERY_RETRIEVE_LEVEL))
1035 {
1036 throw OrthancException(ErrorCode_InternalError);
1037 }
1038
1039 const std::string tmp = findResult.GetValue(DICOM_TAG_QUERY_RETRIEVE_LEVEL).GetContent();
1040 ResourceType level = StringToResourceType(tmp.c_str());
1041
1042 Move(targetAet, level, findResult);
1035 } 1043 }
1036 1044
1037 1045
1038 void DicomUserConnection::MovePatient(const std::string& targetAet, 1046 void DicomUserConnection::MovePatient(const std::string& targetAet,
1039 const std::string& patientId) 1047 const std::string& patientId)