/** * Fix Patch Applier (D-1 phase 1) * * Takes a resolved `FixPatch` (one that has already been run through * `resolvePatch()` so the `{{key}}` templates are expanded) and applies * it to a deep-cloned copy of a FHIR resource. * * Supported path syntax: * - dot paths: `Patient.gender` * - array indexing: `Patient.identifier[0].system` * - resource-type prefix optional: `Patient.gender` and `gender` both work * * Not supported (intentionally — these need full FHIRPath, which is * what the validator engine itself uses): * - choice-type collapsing (`Observation.value` instead of * `valueQuantity`) * - filters (`Patient.identifier.where(use='official').system`) * - traversal across references * * The applier is a *patch executor*, not a fixer that infers the right * value. Callers are expected to supply a concrete `value` in the patch. * Patches whose `value` still contains `{{...}}` placeholders are * rejected (they came out of `resolvePatch()` unresolved). */ import type { FixPatch } from '@records-fhir/validation-types/fix-suggestions'; export interface FixApplyResult { /** True when the patch was applied successfully. */ applied: boolean; /** The mutated resource (deep clone of input) on success, or the unchanged original on failure. */ resource: Record; /** Human-readable reason for failure when `applied` is false. */ reason?: string; } export declare function applyFixPatch(resource: Record, patch: FixPatch): FixApplyResult; //# sourceMappingURL=fix-applier.d.ts.map