Function: profileOptions()
profileOptions(
profile,context?,overrides?):DeidOptions
Build the DeidOptions to pass to any adapter (deidentifyHl7, deidentifyFhir, …) from a
profile: its policy, the supplied key context, and the profile's default redactor (unless overridden).
Parameters
profile
The profile to apply.
context?
The keyed per-patient context (required by profiles whose requiresContext is true).
overrides?
Optional context/redactor overrides merged over the profile's defaults.
context?
redactor?
Returns
The DeidOptions for an adapter call.
Example
import { SAFE_HARBOR_PROFILE, profileOptions, createDeidContext } from "@cosyte/deid";
const opts = profileOptions(SAFE_HARBOR_PROFILE, createDeidContext({ key: "k" }));
opts.policy === SAFE_HARBOR_PROFILE.policy; // => true