Skip to main content
Version: v0.0.8

Interface: DeidProfileSpec

The spec accepted by defineDeidProfile: a name, an optional base profile (default SAFE_HARBOR_PROFILE), per-category transform overrides, and an optional default redactor.

Example

import { type DeidProfileSpec, SAFE_HARBOR_CATEGORIES } from "@cosyte/deid";

const spec: DeidProfileSpec = {
name: "site-a",
transforms: { [SAFE_HARBOR_CATEGORIES.MRN]: "redact" }, // tighten MRN from pseudonymize to redact
};

Properties

base?

readonly optional base?: DeidProfile

The base profile to derive from. Defaults to SAFE_HARBOR_PROFILE.


description?

readonly optional description?: string

An optional human description; a default is synthesized from the base when omitted.


name

readonly name: string

The profile name. Must not be a reserved standard label unless it genuinely matches it.


redactor?

readonly optional redactor?: FreeTextRedactor

An optional default free-text redactor the derived profile carries.


transforms?

readonly optional transforms?: Partial<Readonly<Record<SafeHarborCategory, TransformName>>>

Per-category transform overrides. Each may only move a category to an equal-or-stronger transform than the base (widen-never-narrow); a weakening override is rejected.