📦
Works out of the box
Pre-generated TypeScript models and Zod schemas for every major FHIR version. npm install and import — no spec files or generators to run.
Install, import, validate. No generators, no servers, no HL7 toolchain required.
fhir-zod gives TypeScript developers FHIR types and runtime validation without the setup. Other approaches hand you a generator and expect you to run it. This one ships the output.
npm install fhir-zod zodimport { PatientSchema, type Patient } from "fhir-zod/r4/Patient";
const patient: Patient = {
resourceType: "Patient",
id: "john-doe",
active: true,
name: [{ family: "Doe", given: ["John"] }],
gender: "male",
birthDate: "1985-03-15",
};
const result = PatientSchema.safeParse(patient);
if (!result.success) {
console.error(result.error.issues);
}