Date jitter (preserve intervals)
Shift dates by a random offset while preserving time intervals.
Problem
You need to de-identify date fields in a DICOM study while preserving the time intervals between studies. A patient has a baseline scan and a follow-up scan 30 days later — if you zero out both dates to 19000101, you lose the 30-day interval that’s critical for measuring treatment response. You want to shift all dates by a consistent (deterministic) offset so that relative timing is preserved.
Steps
-
Open your DICOM file (⌘O) and switch to Anon mode (⌘2).
-
Set a manual offset — type a number (like
10) into the date shift input. Every date in the file will move forward by exactly 10 days. -
Or use Auto shift — click the Auto button to derive a deterministic offset from the Patient ID hash. The same Patient ID always gets the same offset, ensuring consistency across all studies from that patient.
-
Apply the anonymization.
-
Verify — switch to Edit mode (⌘3), filter for Study Date, and confirm the value is correctly shifted.
Result
A 10-day manual shift turns 20051130 into 20051210, while Auto derives a non-zero, repeatable offset from the Patient ID. Every date field moves by the same amount so intervals are preserved, a missing Patient ID or Study Date is handled gracefully, and invalid date formats are rejected in the Edit modal.