diff Core/DicomParsing/DicomDirWriter.cpp @ 3160:fc9a4a2dad63

merge
author Alain Mazy <alain@mazy.be>
date Thu, 24 Jan 2019 10:55:19 +0100
parents 554832246eaa
children cf8cbeb35f33
line wrap: on
line diff
--- a/Core/DicomParsing/DicomDirWriter.cpp	Thu Jan 24 10:54:47 2019 +0100
+++ b/Core/DicomParsing/DicomDirWriter.cpp	Thu Jan 24 10:55:19 2019 +0100
@@ -410,7 +410,14 @@
       switch (level)
       {
         case ResourceType_Patient:
-          found = GetUtf8TagValue(id, dataset, encoding, DCM_PatientID);
+          if (!GetUtf8TagValue(id, dataset, encoding, DCM_PatientID))
+          {
+            // Be tolerant about missing patient ID. Fixes issue #124
+            // (GET /studies/ID/media fails for certain dicom file).
+            id = "";
+          }
+
+          found = true;
           type = ERT_Patient;
           break;