You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deepen the local structural fallback toward the OSS validators:
- Expand the embedded R4 schema to Condition, Encounter, Procedure,
MedicationRequest, and DiagnosticReport, with required choice[x] elements and
primitive datatype format checks (lib/r4-primitives.mjs).
- Add reference integrity: contained (#id) references must resolve (error), and
intra-Bundle relative/urn references resolve against entry fullUrls and ids
(warning when unresolved).
- Add instance-based slice matching (match-slices.mjs) evaluating value/pattern
discriminators against an instance.
- Add an end-to-end orchestrator (validate.mjs) and /records:validate command
that detect context, validate each resource, and enrich every issue with
fixability guidance and a JSON Pointer; share the FHIRPath-to-pointer logic in
lib/fhirpath-pointer.mjs.
- Add fixtures, broaden smoke coverage, refresh docs, and bump to 0.5.0 with
v0.5.0 eval results.
if(!condition.codes?.includes("required:Condition.subject"))errors.push("Validator should require Condition.subject.");
430
+
if(!condition.codes?.some((entry)=>entry.startsWith("value:Condition.recordedDate")))errors.push("Validator should flag the malformed Condition.recordedDate primitive.");
if(!reqChoiceMissing.codes?.some((entry)=>entry.includes("required:MedicationRequest.medication[x]")))errors.push("Validator should require a medication[x] choice.");
if(reqChoicePresent.codes?.some((entry)=>entry.includes("MedicationRequest.medication[x]")))errors.push("Validator should accept a satisfied medication[x] choice.");
if(!containedMissing.codes?.some((entry)=>entry.startsWith("error:not-found:")))errors.push("Validator should flag an unresolved contained reference as an error.");
if(bundleUnresolved.parsed?.summary.warning!==1||bundleUnresolved.status!==0)errors.push("Validator should warn (not error) on an unresolved intra-Bundle reference.");
if(bundleResolved.parsed?.summary.warning!==0||bundleResolved.parsed?.summary.error!==0)errors.push("Validator should resolve an intra-Bundle reference cleanly.");
if(!sliceElement||JSON.stringify(sliceElement.slices)!==JSON.stringify({vital: [0],lab: [1]}))errors.push("Slice matcher should attribute entries 0 and 1 to the vital and lab slices.");
453
+
if(!sliceElement?.unmatched?.includes(2))errors.push("Slice matcher should report the unmatched social-history entry.");
if(!firstIssue?.jsonPointer||!firstIssue?.safeFixability)errors.push("Orchestrator should enrich issues with a JSON Pointer and fixability guidance.");
0 commit comments