comparison OrthancServer/Search/DatabaseLookup.cpp @ 2893:1723cbba55c7 db-changes

testing DicomTagConstraint
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 16 Oct 2018 19:47:09 +0200
parents ce310baccda6
children 039a9d262d64 4e43e67f8ecf
comparison
equal deleted inserted replaced
2892:ce310baccda6 2893:1723cbba55c7
46 46
47 ServerToolbox::LoadIdentifiers(tags, size, level); 47 ServerToolbox::LoadIdentifiers(tags, size, level);
48 48
49 for (size_t i = 0; i < size; i++) 49 for (size_t i = 0; i < size; i++)
50 { 50 {
51 assert(tags_.find(tags[i]) == tags_.end()); 51 if (tags_.find(tags[i]) == tags_.end())
52 tags_[tags[i]] = TagInfo(DicomTagType_Identifier, level); 52 {
53 tags_[tags[i]] = TagInfo(DicomTagType_Identifier, level);
54 }
55 else
56 {
57 // These patient-level tags are copied in the study level
58 assert(level == ResourceType_Study &&
59 (tags[i] == DICOM_TAG_PATIENT_ID ||
60 tags[i] == DICOM_TAG_PATIENT_NAME ||
61 tags[i] == DICOM_TAG_PATIENT_BIRTH_DATE));
62 }
53 } 63 }
54 64
55 DicomMap::LoadMainDicomTags(tags, size, level); 65 DicomMap::LoadMainDicomTags(tags, size, level);
56 66
57 for (size_t i = 0; i < size; i++) 67 for (size_t i = 0; i < size; i++)