validating-us-core
Ce qu’il fait
Cette compétence apprend à un agent à vérifier un fichier de données de santé par rapport à la norme US Core avant son envoi à un système hospitalier. Elle exécute le validateur officiel HL7 et explique les problèmes trouvés.
Quand l’utiliser
- ✓Quand une équipe a construit des données FHIR et doit confirmer qu'elles respectent US Core avant envoi.
- ✓Quand un utilisateur demande si Epic ou un autre DPI acceptera un fichier FHIR.
- ✓Quand un développeur doit transformer la sortie du validateur en rapport standard OperationOutcome.
Lien du skill
https://github.com/maziyarpanahi/openmed/blob/master/skills/validating-us-core/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Mon fichier FHIR de condition respectera-t-il les règles US Core exigées par le DPI de notre hôpital ?”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'agent obtient le validateur officiel HL7 et l'exécute sur le fichier avec le paquet US Core. Il lit ensuite la sortie et liste les éléments obligatoires manquants, comme les codes ou les champs de statut.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis 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
Questions fréquentes
Où obtenir le validateur ?
La compétence indique de télécharger validator_cli.jar depuis le projet officiel HL7 sur GitHub.
Un FHIR valide signifie-t-il la conformité à US Core ?
Non. Un FHIR valide n'est pas la même chose qu'un FHIR conforme à US Core, qui ajoute des éléments obligatoires supplémentaires.
Quels problèmes courants couvre-t-elle ?
Elle cite les éléments manquants de code, de catégorie et de statut comme lacunes fréquentes.
Détails
Description originale de l’auteur
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
Popularité
- Étoiles GitHub
- 5.8k
- Position au classement
- #14738
- Licence
- Apache-2.0
- Mis à jour
- 02/11/2026
Commentaires
- …
Autres skills de ce dépôt
annotating-variants
5.8kAide votre agent à prédire l'effet d'une variante génétique, à convertir les noms HGVS en positions génomiques et à associer les fréquences de population, à l'aide d'annotateurs publics gratuits.
ask-openmed
5.8kAide votre agent à choisir le bon flux de travail OpenMed pour une demande de texte clinique, en commençant par une vérification de confidentialité chaque fois que des données de patient peuvent être présentes.
assembling-fhir-bundles
5.8kRegroupe plusieurs dossiers de santé FHIR dans un Bundle de transaction unique, prêt à être envoyé à un DPI, avec les références internes correctement liées.
auditing-deid-leakage
5.8kAnalyse les textes cliniques dépersonnalisés à la recherche d'identifiants restants, comme les numéros de sécurité sociale, de carte, les courriels et les dates, et bloque la diffusion si certains subsistent.
Skills similaires
test-driven-development
311kApprend à votre agent à écrire d'abord un test qui échoue, à le voir échouer, puis à écrire le code minimal qui le fait réussir, avant de construire toute fonctionnalité ou correction.
verification-before-completion
311kApprend à votre agent à lancer de véritables contrôles et à lire leurs résultats avant d'affirmer qu'une tâche, une correction ou une compilation est terminée ou réussie.
migrate-to-shoehorn
310kRemplace les conversions de type risquées dans vos fichiers de test par la bibliothèque shoehorn, afin que les tests utilisent des données partielles et passent les contrôles de types.