assembling-fhir-bundles
Package multiple FHIR R4 resources produced from OpenMed output into a single valid transaction Bundle ready to POST to an EHR, using OpenMed's verified bundle assembler openmed.clinical.exporters.fhir.to_bundle. Covers deterministic urn:uuid fullUrls, automatic in-Bundle reference rewriting, request blocks (method/url) for transaction vs batch, and conditional create. Use after exporting-to-fhir when the user has several Condition/Observation/MedicationStatement resources and wants one transaction Bundle, mentions Bundle, transaction, references, or posting to a FHIR server. Builds on exporti
npx skills add maziyarpanahi/openmed --skill assembling-fhir-bundles --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Assembling FHIR Bundles A FHIR server ingests one **transaction Bundle**, not loose resources, and the resources inside it must cross-reference each other (`Condition.subject` → Patient, `Observation.encounter` → Encounter, `DiagnosticReport.result` → Observation). OpenMed ships a **deterministic, mechanical** Bundle assembler — `openmed.clinical.exporters.fhir.to_bundle` — that wraps the resources you built in `exporting-to-fhir` into a valid R4 Bundle and wires up the references. ## When to use Use after you have a *list* of standalone resources from `exporting-to-fhir` and the destination is a FHIR server. Reach for it when the user says "build a Bundle", "transaction", "POST these resources", or needs internal references resolved. To check the Bundle against US Core, hand off to `validating-us-core`. ## What OpenMed gives you (verified API) ```python from openmed.clinical.exporters.fhir import to_bundle, deterministic_fullurl bundle = to_bundle( resources, # Sequence[Mapping] each with a resourceType doc_id="note-2024-03-02-001", # seeds stable urn:uuid fullUrls bundle_type="transaction", # "transaction" | "batch" | "collection" | ... ) ``` `to_bundle` does exactly three thin
- When to use
- What OpenMed gives you (verified API)
- Quick start
- Worked: the transaction Bundle
- Workflow
- Conditional create (don't duplicate an existing Patient)
- Hand-off to / from OpenMed
- Edge cases & gotchas
- Standards & references
What does the assembling-fhir-bundles skill do?
Package multiple FHIR R4 resources produced from OpenMed output into a single valid transaction Bundle ready to POST to an EHR, using OpenMed's verified bundle assembler openmed.clinical.exporters.fhir.to_bundle. Covers deterministic urn:uuid fullUrls, automatic in-Bundle reference rewriting, request blocks (method/url) for transaction vs batch, and conditional create. Use after exporting-to-fhir when the user has several Condition/Observation/MedicationStatement resources and wants one transaction Bundle, mentions Bundle, transaction, references, or posting to a FHIR server. Builds on exporti
How do I install it?
Run `npx skills add maziyarpanahi/openmed --skill assembling-fhir-bundles --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From maziyarpanahi/openmed, a repository with 4,851 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
