# Validating Us Core

Validate FHIR R4 resources and Bundles against US Core / USCDI profiles with the...

- Repository: https://github.com/maziyarpanahi/openmed (5755 stars)
- Category: Engineering
- License: Apache-2.0
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add maziyarpanahi/openmed --skill validating-us-core -g -a claude-code -y`
Codex: `npx skills add maziyarpanahi/openmed --skill validating-us-core -g -a codex -y`
Cursor: `npx skills add maziyarpanahi/openmed --skill validating-us-core -g -a cursor -y`
Gemini CLI: `npx skills add maziyarpanahi/openmed --skill validating-us-core -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add maziyarpanahi/openmed`

## Description

Validate FHIR R4 resources and Bundles against US Core / USCDI profiles with the official HL7 FHIR validator before submitting to an EHR. Covers running validator_cli.jar (or the public validator.fhir.org), declaring meta.profile, must-support elements, common conformance gaps (missing code/category/status), and turning validator output into a FHIR OperationOutcome. Use after exporting-to-fhir / assembling-fhir-bundles to check OpenMed-produced FHIR for US Core conformance, when the user mentions US Core, USCDI, must-support, profile validation, or Epic/Cerner ingestion requirements. Pairs after.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Validating US Core

Producing *syntactically* valid R4 (which `exporting-to-fhir` and
`assembling-fhir-bundles` do) is not the same as conforming to **US Core**, the
HL7 US realm profiles that EHRs (Epic, Cerner/Oracle Health) require for
ingestion and that USCDI mandates for certified exchange. This skill validates
OpenMed-produced FHIR against US Core *before* you submit it.

## When to use

Use it as the gate right before submission, after you have assembled a Bundle.
Reach for it when the user says "US Core", "USCDI", "must-support", "will Epic
accept this", or "validate my FHIR". It is the conformance counterpart to the
mechanical builders, OpenMed builds the JSON; the HL7 validator judges it.

## Quick start: run the official validator

The reference implementation is the HL7 `validator_cli.jar` (the same engine
behind https://validator.fhir.org). Validate against the US Core package by IG:

```bash
# One-time: get the validator
curl -L -o validator_cli.jar \
  https://github.com/hapifhir/org.hl7.fhir.core/releases/latest/download/validator_cli.jar

# Validate a resource/Bundle against the current US Core IG
java -jar validator_cli.jar condition.json \
  -version 4.0.1 \
  -ig hl7.fhir.us.core \
  -tx https://tx.fhir.org            # terminology server for code validation
```

`-ig hl7.fhir.us.core` pulls the current published US Core package; pin a
version (e.g. `-ig hl7.fhir.us.core#6.1.0`) for reproducible CI. The validator
exits non-zero on errors and prints issues with FHIRPath locations.

For ad-hoc checks without a JVM, paste the JSON into the public validator UI at
https://validator.fhir.org (do **not** paste real PHI, validate synthetic or
de-identified resources only).

## Declare the profile you claim

US Core only validates against a profile if the resource *claims* it via
`meta.profile`. Add the canonical URL for the profile you target:

The rest: https://github.com/maziyarpanahi/openmed/blob/HEAD/skills/validating-us-core/SKILL.md
