Mercurial > hg > orthanc
diff OrthancServer/Resources/Samples/ImportDicomFiles/OrthancImport.py @ 4450:9bf2f9e0af47
support empty PatientID in OrthancImport.py
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 14 Jan 2021 09:13:29 +0100 |
parents | d9473bd5ed43 |
children | 4336642b8cff |
line wrap: on
line diff
--- a/OrthancServer/Resources/Samples/ImportDicomFiles/OrthancImport.py Thu Jan 14 08:50:48 2021 +0100 +++ b/OrthancServer/Resources/Samples/ImportDicomFiles/OrthancImport.py Thu Jan 14 09:13:29 2021 +0100 @@ -107,8 +107,10 @@ print('New imported study:') print(' Orthanc ID of the patient: %s' % info['ParentPatient']) print(' Orthanc ID of the study: %s' % info['ParentStudy']) - print(' DICOM Patient ID: %s' % tags['0010,0020']) - print(' DICOM Study Instance UID: %s' % tags['0020,000d']) + print(' DICOM Patient ID: %s' % ( + tags['0010,0020'] if '0010,0020' in tags else '(empty)')) + print(' DICOM Study Instance UID: %s' % ( + tags['0020,000d'] if '0020,000d' in tags else '(empty)')) print('')