comparison OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp @ 5175:48005e522bd6

start fixing thread safety issues with DicomMap
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 24 Mar 2023 19:00:33 +0100
parents 02cfd23a556a
children 0ea402b4d901
comparison
equal deleted inserted replaced
5174:d75af1cde602 5175:48005e522bd6
747 { 747 {
748 // this is allowed if all patient replacedTags do match the target patient tags 748 // this is allowed if all patient replacedTags do match the target patient tags
749 DicomMap targetPatientTags; 749 DicomMap targetPatientTags;
750 targetPatient.tags_.ExtractPatientInformation(targetPatientTags); 750 targetPatient.tags_.ExtractPatientInformation(targetPatientTags);
751 751
752 for (std::set<DicomTag>::const_iterator mainPatientTag = DicomMap::GetMainDicomTags(ResourceType_Patient).begin(); 752 std::set<DicomTag> mainPatientTags;
753 mainPatientTag != DicomMap::GetMainDicomTags(ResourceType_Patient).end(); ++mainPatientTag) 753 DicomMap::GetMainDicomTags(mainPatientTags, ResourceType_Patient);
754
755 for (std::set<DicomTag>::const_iterator mainPatientTag = mainPatientTags.begin();
756 mainPatientTag != mainPatientTags.end(); ++mainPatientTag)
754 { 757 {
755 if (targetPatientTags.HasTag(*mainPatientTag) 758 if (targetPatientTags.HasTag(*mainPatientTag)
756 && (!modification_->IsReplaced(*mainPatientTag) 759 && (!modification_->IsReplaced(*mainPatientTag)
757 || modification_->GetReplacementAsString(*mainPatientTag) != targetPatientTags.GetStringValue(*mainPatientTag, "", false))) 760 || modification_->GetReplacementAsString(*mainPatientTag) != targetPatientTags.GetStringValue(*mainPatientTag, "", false)))
758 { 761 {