comparison OrthancServer/ServerJobs/DicomModalityStoreJob.cpp @ 2624:714dcddeb65f jobs

asynchronous c-movoe
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 24 May 2018 21:44:22 +0200
parents 988936118354
children c691fcf66071
comparison
equal deleted inserted replaced
2623:bd6e0b70e915 2624:714dcddeb65f
55 55
56 LOG(INFO) << "Sending instance " << instance << " to modality \"" 56 LOG(INFO) << "Sending instance " << instance << " to modality \""
57 << remote_.GetApplicationEntityTitle() << "\""; 57 << remote_.GetApplicationEntityTitle() << "\"";
58 58
59 std::string dicom; 59 std::string dicom;
60 context_.ReadDicom(dicom, instance); 60
61 try
62 {
63 context_.ReadDicom(dicom, instance);
64 }
65 catch (OrthancException& e)
66 {
67 LOG(WARNING) << "An instance was removed after the job was issued: " << instance;
68 return false;
69 }
61 70
62 if (HasMoveOriginator()) 71 if (HasMoveOriginator())
63 { 72 {
64 connection_->Store(dicom, moveOriginatorAet_, moveOriginatorId_); 73 connection_->Store(dicom, moveOriginatorAet_, moveOriginatorId_);
65 } 74 }
159 } 168 }
160 169
161 170
162 void DicomModalityStoreJob::GetPublicContent(Json::Value& value) 171 void DicomModalityStoreJob::GetPublicContent(Json::Value& value)
163 { 172 {
173 value["Description"] = GetDescription();
164 value["LocalAet"] = localAet_; 174 value["LocalAet"] = localAet_;
165 value["RemoteAet"] = remote_.GetApplicationEntityTitle(); 175 value["RemoteAet"] = remote_.GetApplicationEntityTitle();
166 176
167 if (HasMoveOriginator()) 177 if (HasMoveOriginator())
168 { 178 {