FHIR Validator + Repair
Why is my FHIR resource invalid? Most failures are shape errors — a name string where FHIR wants HumanName[], an email outside telecom[], a subject string instead of a Reference. Paste it below to see the exact fix, a corrected resource, and the typed builder code. Everything runs in your browser; nothing is uploaded.
What this does (and doesn't)
Deterministic shape repair for the common foot-guns across Patient, Observation, Encounter, Appointment, and DocumentReference — no model guessing, no network. It will not invent clinical data: if an Observation has no code or value, it tells you instead of fabricating one.
It is not a profile / terminology / conformance validator. For full conformance use validator.fhir.org or Inferno. The repair engine is open source (Apache-2.0): npx fhir-repair broken.json (coming to npm) · the package is @fhir-craft/repair, also coming to npm.
FHIR JSON → TypeScript
The TypeScript tab turns your resource into typed @fhir-craft/core builder code — the same builders return @medplum/fhirtypes, so the shape is correct by construction from your write to your agent's read.
This fixed one resource. bonfireDB validates on every write.
Build on app-native primitives; bonfireDB generates typed, valid FHIR R4 underneath — so bad FHIR never lands in your store in the first place.