# HG changeset patch # User Sebastien Jodogne # Date 1610612009 -3600 # Node ID 9bf2f9e0af47b158cef6e4d0b0f7aa840d5e73db # Parent 6a6017027162639a4b6ff52485ad9de159b8f273 support empty PatientID in OrthancImport.py diff -r 6a6017027162 -r 9bf2f9e0af47 OrthancServer/Resources/Samples/ImportDicomFiles/OrthancImport.py --- 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('')