Function: deidentify()
deidentify(
ds,options?):DeidentifyResult<Dataset>
De-identify a Dataset per PS3.15 Annex E - the Basic Application Level
Confidentiality Profile, plus any Retain/Clean Options passed in retain.
Pure: ds is never mutated. Returns a fresh dataset and a value-free
DeidentifyReport (tags, keywords, action codes, the UID map, warnings).
Parameters
ds
options?
DeidentifyOptions = {}
Returns
Throws
DeidentifyError (INVALID_OPTIONS) for an unknown Retain option
or a malformed uidRoot.
Example
import { parseDicom, deidentify, serializeDicom } from "@cosyte/dicom";
const { dataset, report } = deidentify(parseDicom(buf));
const clean = serializeDicom(dataset); // safe to share
console.log(report.attributes.length, "attributes acted on");