deid icon indicating copy to clipboard operation
deid copied to clipboard

Question - Filter rules & intended behavior

Open wetzelj opened this issue 3 years ago • 1 comments

@vsoch - We came across a possible issue today with how filter rules are applied.

In the sample dicom recipe, there are many filter rules defined such as below: deid.dicom - line 26

LABEL LightSpeed Localizers # (Susan Weber)
  contains ManufacturerModelName LightSpeed VCT
  + contains Modality CT
  + contains ImageType LOCAL || contains SeriesDescription Localizer
  coordinates 0,0,80,85

My expectation was that this rule would be applied as: ManufacturerModelName contains "LightSpeed VCT" and Modality contains "CT" and (ImageType contains LOCAL or SeriesDescription contains Localizer)

Instead it was applied as below (without grouping the or condition): ManufacturerModelName contains "LightSpeed VCT" and Modality contains "CT" and ImageType contains LOCAL or SeriesDescription contains Localizer

As a result of this, we greylisted an MRI that had a SeriesDescription of "Localizer".

I suspect this is a bug - and that lines within a filter rule should be considered "grouped", but wanted to check with you first. If you agree this is a bug, I can work on it (although I won't be able to start for a couple weeks). Since we were deidentifying an MRI, we simply removed the two filter rules which were incorrectly hit to get around the current issue.

wetzelj avatar Oct 26 '21 19:10 wetzelj

Agree they should be grouped! Please take your time and ping me to chat more!

vsoch avatar Oct 26 '21 19:10 vsoch