Interface: DeidContextSpec
Specification for createDeidContext.
Example
import { createDeidContext } from "@cosyte/deid";
const ctx = createDeidContext({ key: "consumer-held-secret", patientId: "patient-1" });
Properties
dateShiftSeed?
readonlyoptionaldateShiftSeed?:string|Uint8Array<ArrayBufferLike>
A separate seed for deriving per-patient date-shift offsets. Defaults to the key when omitted,
so date-shifting works out of the box; supply a distinct seed to decouple the two secrets.
key
readonlykey:string|Uint8Array<ArrayBufferLike>
The HMAC key for keyed transforms. Consumer-held; never emitted. Must be non-empty.
maxShiftDays?
readonlyoptionalmaxShiftDays?:number
Absolute bound (days) on the per-patient date-shift offset. Defaults to 365.
patientId?
readonlyoptionalpatientId?:string
The patient scope this context de-identifies. Required for the deterministic date-shift offset.