Agent skill · Backend & API

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

maziyarpanahigithub.com/maziyarpanahiGitHub ↗
claude-codeApache-2.0
Install
npx skills add maziyarpanahi/openmed --skill assembling-fhir-bundles --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 9 KB
Bundled scripts: none
Version: 1.0
Path: skills/assembling-fhir-bundles/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 4,851
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. When to use
  2. What OpenMed gives you (verified API)
  3. Quick start
  4. Worked: the transaction Bundle
  5. Workflow
  6. Conditional create (don't duplicate an existing Patient)
  7. Hand-off to / from OpenMed
  8. Edge cases & gotchas
  9. Standards & references
More from openmed
All skills →
About this skill
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.

Keep going