changeset 557:48c9f83587a8

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 24 Sep 2013 13:22:39 +0200
parents 11fee43c5861
children 69c024f9c06b e5eaef9cad80
files OrthancServer/OrthancRestApi.cpp
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi.cpp	Tue Sep 17 16:19:36 2013 +0200
+++ b/OrthancServer/OrthancRestApi.cpp	Tue Sep 24 13:22:39 2013 +0200
@@ -1242,9 +1242,10 @@
       ParseReplacements(replacements, replacementsPart);
 
       // Generate random Patient's Name if none is specified
-      if (replacements.find(DicomTag(0x0010, 0x0010)) == replacements.end())
+      if (toKeep.find(DICOM_TAG_PATIENT_NAME) == toKeep.end() &&
+          replacements.find(DICOM_TAG_PATIENT_NAME) == replacements.end())
       {
-        replacements.insert(std::make_pair(DicomTag(0x0010, 0x0010), GeneratePatientName(context)));
+        replacements.insert(std::make_pair(DICOM_TAG_PATIENT_NAME, GeneratePatientName(context)));
       }
 
       return true;