validating-us-core
Was er macht
Dieser Skill zeigt einem Agenten, wie er eine Gesundheitsdatendatei vor dem Versand an ein Krankenhaussystem gegen den Standard US Core prüft. Er führt den offiziellen HL7-Validator aus und erklärt die gefundenen Probleme.
Wann du ihn nutzt
- ✓Wenn ein Team FHIR-Daten erstellt hat und vor der Übermittlung bestätigen muss, dass sie US Core entsprechen.
- ✓Wenn ein Nutzer fragt, ob Epic oder eine andere Patientenakte eine FHIR-Datei annimmt.
- ✓Wenn ein Entwickler die Ausgabe des Validators in einen Standardbericht OperationOutcome umwandeln muss.
Link zum Skill
https://github.com/maziyarpanahi/openmed/blob/master/skills/validating-us-core/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Wird meine FHIR-Diagnosedatei die US-Core-Regeln bestehen, die die Patientenakte unseres Krankenhauses verlangt?”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Der Agent besorgt den offiziellen HL7-Validator und führt ihn mit dem US-Core-Paket auf der Datei aus. Danach liest er die Ausgabe und listet fehlende Pflichtteile auf, etwa Codes oder Statusfelder.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
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:
# 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:
{
"resourceType": "Condition",
"meta": {
"profile": [
"http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition-problems-health-concerns"
]
}
}
Then java -jar validator_cli.jar condition.json -ig hl7.fhir.us.core checks it
against that profile's constraints, including must-support elements.
Common conformance gaps (from OpenMed output)
OpenMed NER gives you the clinical mention; US Core wants structured context. The recurring gaps when going from raw spans to US Core:
| Gap | US Core expects | Fix in the exporter |
|---|---|---|
Missing code.coding |
A coded value (SNOMED/ICD-10 for Condition; LOINC for Observation; RxNorm for medication) | Ground the span; codeable_concept([...]) with a real coding, not just text |
Missing category |
encounter-diagnosis/problem-list-item (Condition), laboratory/vital-signs (Observation) |
Set category in the resource shell |
Missing clinicalStatus / status |
Required status fields | Set them per the exporting-to-fhir cheat-sheet |
Missing subject |
A resolvable Patient reference | Reference an in-Bundle Patient; let to_bundle rewrite it |
Unbound valueQuantity.code |
UCUM unit code | Use system: http://unitsofmeasure.org + UCUM code |
| Vital signs not on the vitals profile | us-core-vital-signs shape (LOINC code, vital-signs category) |
Use the vitals LOINC + category |
"Must-support" means the producer must populate the element when the data exists. The validator flags must-support omissions as warnings; certified systems may reject them.
Workflow
- Export + assemble the Bundle (
exporting-to-fhir,assembling-fhir-bundles). - Add
meta.profilefor the US Core profile each resource targets. - Run
validator_cli.jarwith-ig hl7.fhir.us.coreand a-txserver. - Read the issues: error = will be rejected; warning = must-support / best practice. Fix errors in the exporter, not by hand-editing JSON.
- Re-validate until clean; wire the validator into CI on synthetic fixtures.
- Submit (
assembling-fhir-bundlesfor the transaction POST).
Turn validator output into an OperationOutcome
If you run validation programmatically, adapt the result into a FHIR
OperationOutcome with OpenMed's helper so the rest of your pipeline speaks one
shape:
from openmed.clinical.exporters.fhir import from_validation_result
# `result` exposes issues, or errors/warnings/information buckets
outcome = from_validation_result(result) # -> R4 OperationOutcome dict
from_validation_result un
Häufige Fragen
Wo bekomme ich den Validator?
Der Skill sagt, validator_cli.jar vom offiziellen HL7-Projekt auf GitHub herunterzuladen.
Ist gültiges FHIR dasselbe wie die Konformität mit US Core?
Nein. Gültiges FHIR ist nicht dasselbe wie die Konformität mit US Core, die zusätzliche Pflichtelemente verlangt.
Welche häufigen Probleme deckt er ab?
Er nennt fehlende Elemente für Code, Kategorie und Status als häufige Lücken.
Details
Originalbeschreibung des Autors
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 aft
repo: maziyarpanahi/openmed
Beliebtheit
- GitHub-Sterne
- 5.8k
- Platz im Ranking
- #14738
- Lizenz
- Apache-2.0
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
annotating-variants
5.8kHilft deinem Agenten vorherzusagen, was eine genetische Variante bewirkt, HGVS-Namen in Genompositionen umzuwandeln und Populationshäufigkeiten anzufügen, mit kostenlosen öffentlichen Annotatoren.
ask-openmed
5.8kHilft deinem Agenten, für eine klinische Textanfrage den richtigen OpenMed-Ablauf zu wählen, beginnend mit einer Datenschutzprüfung, sobald Patientendaten enthalten sein könnten.
assembling-fhir-bundles
5.8kBündelt mehrere FHIR-Gesundheitsdatensätze in ein Transaktions-Bundle, das an ein KIS gesendet werden kann, mit korrekt verknüpften internen Verweisen.
auditing-deid-leakage
5.8kPrüft pseudonymisierte klinische Texte auf übrig gebliebene Kennungen wie SSN, Kartennummern, E-Mail-Adressen und Daten und blockiert die Freigabe, wenn noch welche da sind.
Ähnliche Skills
test-driven-development
311kBringt deinem Agenten bei, vor jedem Feature oder Fix zuerst einen fehlschlagenden Test zu schreiben, ihn fehlschlagen zu sehen und dann den kleinsten passenden Code zu schreiben.
verification-before-completion
311kBringt deinem Agenten bei, echte Prüfungen auszuführen und ihre Ausgabe zu lesen, bevor er behauptet, eine Aufgabe, ein Fix oder ein Build sei fertig oder bestehe.
migrate-to-shoehorn
310kErsetzt riskante Typumwandlungen in deinen Testdateien durch die Bibliothek shoehorn, damit Tests mit unvollständigen Daten arbeiten und trotzdem die Typprüfung bestehen.