comparison Plugins/Engine/OrthancPlugins.cpp @ 2222:21713ce8717b

Fix handling of Move Originator AET and ID in C-MOVE SCP
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 13 Dec 2016 14:34:33 +0100
parents 028214a95194
children a3a65de1840f
comparison
equal deleted inserted replaced
2221:e7beca979562 2222:21713ce8717b
685 } 685 }
686 } 686 }
687 687
688 virtual IMoveRequestIterator* Handle(const std::string& targetAet, 688 virtual IMoveRequestIterator* Handle(const std::string& targetAet,
689 const DicomMap& input, 689 const DicomMap& input,
690 const std::string& remoteIp, 690 const std::string& originatorIp,
691 const std::string& remoteAet, 691 const std::string& originatorAet,
692 const std::string& calledAet, 692 const std::string& calledAet,
693 uint16_t messageId) 693 uint16_t originatorId)
694 { 694 {
695 std::string levelString = ReadTag(input, DICOM_TAG_QUERY_RETRIEVE_LEVEL); 695 std::string levelString = ReadTag(input, DICOM_TAG_QUERY_RETRIEVE_LEVEL);
696 std::string patientId = ReadTag(input, DICOM_TAG_PATIENT_ID); 696 std::string patientId = ReadTag(input, DICOM_TAG_PATIENT_ID);
697 std::string accessionNumber = ReadTag(input, DICOM_TAG_ACCESSION_NUMBER); 697 std::string accessionNumber = ReadTag(input, DICOM_TAG_ACCESSION_NUMBER);
698 std::string studyInstanceUid = ReadTag(input, DICOM_TAG_STUDY_INSTANCE_UID); 698 std::string studyInstanceUid = ReadTag(input, DICOM_TAG_STUDY_INSTANCE_UID);
710 patientId.empty() ? NULL : patientId.c_str(), 710 patientId.empty() ? NULL : patientId.c_str(),
711 accessionNumber.empty() ? NULL : accessionNumber.c_str(), 711 accessionNumber.empty() ? NULL : accessionNumber.c_str(),
712 studyInstanceUid.empty() ? NULL : studyInstanceUid.c_str(), 712 studyInstanceUid.empty() ? NULL : studyInstanceUid.c_str(),
713 seriesInstanceUid.empty() ? NULL : seriesInstanceUid.c_str(), 713 seriesInstanceUid.empty() ? NULL : seriesInstanceUid.c_str(),
714 sopInstanceUid.empty() ? NULL : sopInstanceUid.c_str(), 714 sopInstanceUid.empty() ? NULL : sopInstanceUid.c_str(),
715 remoteAet.c_str(), 715 originatorAet.c_str(),
716 calledAet.c_str(), 716 calledAet.c_str(),
717 targetAet.c_str(), 717 targetAet.c_str(),
718 messageId); 718 originatorId);
719 719
720 if (driver == NULL) 720 if (driver == NULL)
721 { 721 {
722 LOG(ERROR) << "Plugin cannot create a driver for an incoming C-MOVE request"; 722 LOG(ERROR) << "Plugin cannot create a driver for an incoming C-MOVE request";
723 throw OrthancException(ErrorCode_Plugin); 723 throw OrthancException(ErrorCode_Plugin);