Skip to main content
Version: v0.0.4

Type Alias: DeidentifyOption

DeidentifyOption = Exclude<AnnexEOption, "CleanPixelData" | "CleanRecognizableVisual">

The PS3.15 Annex E option sets deidentify honours - the nine metadata-affecting columns of Table E.1-1. The two pixel-level options (CleanPixelData §E.3.1, CleanRecognizableVisual §E.3.2) are deliberately excluded: this is a metadata-only de-identifier and cannot inspect pixels (deferred to @cosyte/dicom-pixel). When pixel data is present it always warns rather than claiming the image is clean.

RetainLongitudinalTemporal gives you the full-dates branch. PS3.15 §E.3.6 is two options, and Table E.1-1 gives them separate columns: Rtn. Long. Full Dates (keep dates and times as they are) and Rtn. Long. Modif. Dates (keep them only as modified/shifted values). One name here covers both, and it carries the full-dates column - the less protective branch. That is not a rounding difference: the two columns disagree on 169 rows, and on every one of them full-dates says K (keep the real value) where modified-dates says C (clean it). Activate it only when real dates are genuinely required; leave it off and the Basic Profile action applies, which removes or empties them. Date shifting is not implemented at this layer - a caller who needs the modified-dates behaviour shifts the values themselves after the call.

Example

const retain: DeidentifyOption[] = ["RetainLongitudinalTemporal", "RetainSafePrivate"];