pydicom / deid

best effort anonymization for medical images using python
https://pydicom.github.io/deid/
MIT License
140 stars 43 forks source link

Date Jitter on %values Lists #175

Closed wetzelj closed 3 years ago

wetzelj commented 3 years ago

During the deidentification of a study a situation was encountered where the StudyDate value existed within a private dicom tag. This tag (0029,1019) was of data type LO, but contained the StudyDate value:

(0029,1019) : LO Len: 8 <Unknown Tag> Value: [20100526] We attempted to handle this using current recipe functionality:

%values testing 
FIELD StudyDate 
%header 
JITTER values:testing -3241

However, performing these actions did not jitter the value in the Private tag.

Root Cause pydicom/deid (deid\dicom\actions.py - jitter_timestamp()) This function expressly performs JITTER only if the DICOM VR is DT or DA.

Idea Figure out how to handle non-date typed values. We could attempt to parse the string representations of the DA/DT types, and if it doesn't produce an exception, jitter it.

vsoch commented 3 years ago

This is closed by #181