Skip to content

fhir-resource-diffDiff. Validate. Inspect.

Structural FHIR resource operations for CI pipelines and AI agents. No server. No Java runtime.

fhir-resource-diff is a CLI and TypeScript library for working with FHIR JSON resources locally — no server, no Java runtime, no package downloads. It compares resources path by path, validates format and structure, normalizes for comparison, and exposes a browser-safe API for use in React, Vite, and any bundler.

Supports FHIR R4, R4B, and R5 — auto-detected or explicit via --fhir-version.

bash
# Install
npm install -g fhir-resource-diff

# Validate a resource
fhir-resource-diff validate patient.json --fhir-version R4

# Compare two resources
fhir-resource-diff compare expected.json actual.json

# Diff with JSON output for automation
fhir-resource-diff compare a.json b.json --format json --envelope

Part of the FHIR operations toolkit

Three focused CLI tools built for FHIR development workflows. Each does one job well — compose them in shell pipelines, CI steps, or AI agent chains instead of reaching for a single monolithic toolkit.

ToolPurpose
fhir-resource-diff (this)Diff, validate, and inspect FHIR resources
fhir-capability-analyzerAnalyze and compare FHIR server CapabilityStatements
fhir-test-dataGenerate valid FHIR test resources across 14 locales

The tools are independent — use one, two, or all three in any combination that fits your pipeline.

Released under the MIT License.