Mercurial > hg > orthanc
comparison OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp @ 5342:65d55cc86a41
clarified error message
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 28 Jun 2023 11:54:41 +0200 |
parents | 0854cc13b4d5 |
children | f41e1f635c4d |
comparison
equal
deleted
inserted
replaced
5341:990cfa101803 | 5342:65d55cc86a41 |
---|---|
760 { | 760 { |
761 if (targetPatientTags.HasTag(*mainPatientTag) && | 761 if (targetPatientTags.HasTag(*mainPatientTag) && |
762 (!modification_->IsReplaced(*mainPatientTag) || | 762 (!modification_->IsReplaced(*mainPatientTag) || |
763 modification_->GetReplacementAsString(*mainPatientTag) != targetPatientTags.GetStringValue(*mainPatientTag, "", false))) | 763 modification_->GetReplacementAsString(*mainPatientTag) != targetPatientTags.GetStringValue(*mainPatientTag, "", false))) |
764 { | 764 { |
765 throw OrthancException(ErrorCode_BadRequest, std::string("Trying to change patient tags in a study. The Patient already exists and has other studies. All the 'Replace' tags should match the existing patient main dicom tags. Try using /patients/../modify instead to modify the patient. Failing tag: ") + mainPatientTag->Format()); | 765 throw OrthancException(ErrorCode_BadRequest, std::string("Trying to change patient tags in a study. " |
766 "The Patient already exists and has other studies. All the 'Replace' tags should match the existing patient main dicom tags " | |
767 "and you should specify all Patient MainDicomTags in your query. Try using /patients/../modify instead to modify the patient. Failing tag: ") + mainPatientTag->Format()); | |
766 } | 768 } |
767 else if (!targetPatientTags.HasTag(*mainPatientTag) && modification_->IsReplaced(*mainPatientTag) ) | 769 else if (!targetPatientTags.HasTag(*mainPatientTag) && modification_->IsReplaced(*mainPatientTag) ) |
768 { | 770 { |
769 throw OrthancException(ErrorCode_BadRequest, std::string("Trying to change patient tags in a study. The Patient already exists and has other studies. You are trying to replace a tag that is not defined yet in this patient. Try using /patients/../modify instead to modify the patient. Failing tag: ") + mainPatientTag->Format()); | 771 throw OrthancException(ErrorCode_BadRequest, std::string("Trying to change patient tags in a study. " |
772 "The Patient already exists and has other studies. You are trying to replace a tag that is not defined yet in this patient. " | |
773 "Try using /patients/../modify instead to modify the patient. Failing tag: ") + mainPatientTag->Format()); | |
770 } | 774 } |
771 } | 775 } |
772 } | 776 } |
773 } | 777 } |
774 } | 778 } |