# HG changeset patch # User Sebastien Jodogne # Date 1547150128 -3600 # Node ID 554832246eaa4131f7c88ceade09b7ec729cd5e0 # Parent b311cff247cab5a370fd1f88150fec1ec56469d9 Fix issue #124 (GET /studies/ID/media fails for certain dicom file) diff -r b311cff247ca -r 554832246eaa Core/DicomParsing/DicomDirWriter.cpp --- a/Core/DicomParsing/DicomDirWriter.cpp Thu Jan 10 11:19:39 2019 +0100 +++ b/Core/DicomParsing/DicomDirWriter.cpp Thu Jan 10 20:55:28 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; diff -r b311cff247ca -r 554832246eaa NEWS --- a/NEWS Thu Jan 10 11:19:39 2019 +0100 +++ b/NEWS Thu Jan 10 20:55:28 2019 +0100 @@ -5,6 +5,7 @@ ----------- * Fix issue #118 (Wording in Configuration.json regarding SynchronousCMove) +* Fix issue #124 (GET /studies/ID/media fails for certain dicom file) * Fixed Orthanc Explorer on IE and Firefox: Explorer always show "too many results" and it's therefore impossible to browse the content. * Upgraded dependencies for static and Windows builds: