pydicom / dicom-validator

Simple DICOM validator based on DocBook DICOM specs
MIT License
25 stars 11 forks source link

Handling of "may be present" condition may be incorrect #29

Closed mrbean-bremen closed 1 year ago

mrbean-bremen commented 1 year ago

If the condition for a tag after "may be present" cannot be parsed, it should be handled as if it can always be present (same as "may be present otherwise"). Currently it is handled as "is not allowed", which is wrong (false positive). This is also true for complex conditions, where only a part of the condition could be evaluated.

Seen in "General Series" module for Patient Position which has the condition:

Required for images where Patient Orientation Code Sequence (0054,0410) is not present and whose SOP Class is one of the following: CT ("1.2.840.10008.5.1.4.1.1.2") or MR ("1.2.840.10008.5.1.4.1.1.4") or Enhanced CT ("1.2.840.10008.5.1.4.1.1.2.1") or Enhanced MR Image ("1.2.840.10008.5.1.4.1.1.4.1") or Enhanced Color MR Image ("1.2.840.10008.5.1.4.1.1.4.3") or MR Spectroscopy ("1.2.840.10008.5.1.4.1.1.4.2") Storage SOP Classes. May be present for other SOP Classes if Patient Orientation Code Sequence (0054,0410) is not present.

mrbean-bremen commented 1 year ago

Still not correct - the test checks the wrong value...