Interface: DeidOptions
Options for deidentify.
Example
import { type DeidOptions, createDeidContext } from "@cosyte/deid";
const opts: DeidOptions = { policy: "safe-harbor", context: createDeidContext({ key: "secret" }) };
Properties
context?
readonlyoptionalcontext?:DeidContext
The context carrying the consumer's key, required only when the policy uses a keyed transform.
policy?
readonlyoptionalpolicy?:DeidPolicy|"safe-harbor"
The policy to apply. Defaults to the built-in Safe Harbor policy.
redactor?
readonlyoptionalredactor?:FreeTextRedactor
A consumer-supplied free-text redactor. When present, the engine invokes it
at each free-text locus instead of blocking, and records its output as consumer-asserted
(DEID_FREETEXT_CONSUMER_REDACTED). The library bundles no redactor. Fail-closed contract:
when this is omitted - or when the redactor throws or returns nothing - the free-text locus is
blocked (the safe default), never emitted un-redacted. A returned redaction is trusted as the
consumer's; the engine does not re-verify it and does not touch the structural PHI the adapters
remove. See FreeTextRedactor.