DicomAnonymizer: increment dates per PatientID using a lookup table?

38 views
Skip to first unread message

Nolan, Tracy

unread,
Dec 7, 2022, 4:39:13 PM12/7/22
to rsnas-ctpmir...@googlegroups.com

Hello people smarter than I am,

 

  1. I have successfully used the below to apply a cohort-wide integer offset to dates as they appear in the DICOM:

<e en="T" t="00080020" n="StudyDate">@incrementdate(this,@DATEINC)</e>

And I’ve used the below to refer to a lookup table outside the DicomAnonymizer stage script

<e en="T" t="00100010" n="PatientName">@lookup(PatientID,ptid)</e>

 

  1. I’d like to arrange a date offset integer at the lookup table, to offset each PERSON’s dates by a different increment in relation to dates as they appear in the DICOM, but I think @incrementdate only takes two arguments… would the below work:

<e en="T" t="00080020" n="StudyDate">@incrementdate(this, @lookup(PatientID,poff)</e>   where poff is a column name in the lookup table with a value in each row with PatientID, containing the increment value in the lookup table (for example -365 for a shift backwards by a year)

 

  1. Now since these poff patient-wide offset intervals are integers rather than calendar dates, I was also trying to see if I could shoehorn  

 

@dateinterval(this,poff,PatientID) but I don’t think that will work since I think dateinterval expects M/D/YYYY or YYYYMMDD (origindate) format.

 

 

But I’m kind of stuck at this point. Do you have suggestions?

 

 

Tracy Nolan


If you receive this email outside of your normal working hours, I do not expect a response until you are back at work.


Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

 

Reply all
Reply to author
Forward
0 new messages