/** * Constraint Context Resolver * * Resolves the FHIRPath evaluation context (and possibly rewritten * expression) for a constraint attached to a given element path. */ /** * Resolve the evaluation context and (possibly rewritten) expression for a constraint. * * Two cases require special handling: * * 1. **Choice-type elements (`[x]`)**: fhirpath.js loses type metadata when * values are extracted as raw JS primitives, so `$this as dateTime` etc. * fail. Fix: keep the parent as context and wrap the expression with * element navigation (`effective.all(...)`) so FHIRPath resolves the * typed value through the model. * * 2. **Backbone elements** (component, contact, etc.): extracting a backbone * element as a raw JS object strips `resourceType`, so fhirpath.js can't * resolve choice-type children (e.g. `value.exists()` fails because * `valueQuantity` isn't found via the FHIR model). Fix: evaluate from * the resource root and navigate with `pathSegments.all(expr)`. */ export declare function resolveConstraintContext(resource: any, elementPath: string, rawExpression: string): { context: any; expression: string; }; //# sourceMappingURL=constraint-context-resolver.d.ts.map