comparison Core/DicomParsing/DicomDirWriter.cpp @ 3107:554832246eaa

Fix issue #124 (GET /studies/ID/media fails for certain dicom file)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 10 Jan 2019 20:55:28 +0100
parents 4e43e67f8ecf
children cf8cbeb35f33
comparison
equal deleted inserted replaced
3104:b311cff247ca 3107:554832246eaa
408 E_DirRecType type; 408 E_DirRecType type;
409 409
410 switch (level) 410 switch (level)
411 { 411 {
412 case ResourceType_Patient: 412 case ResourceType_Patient:
413 found = GetUtf8TagValue(id, dataset, encoding, DCM_PatientID); 413 if (!GetUtf8TagValue(id, dataset, encoding, DCM_PatientID))
414 {
415 // Be tolerant about missing patient ID. Fixes issue #124
416 // (GET /studies/ID/media fails for certain dicom file).
417 id = "";
418 }
419
420 found = true;
414 type = ERT_Patient; 421 type = ERT_Patient;
415 break; 422 break;
416 423
417 case ResourceType_Study: 424 case ResourceType_Study:
418 found = GetUtf8TagValue(id, dataset, encoding, DCM_StudyInstanceUID); 425 found = GetUtf8TagValue(id, dataset, encoding, DCM_StudyInstanceUID);