assembling-fhir-bundles

assembling-fhir-bundles is a skill for Claude Code from maziyarpanahi/openmed. It costs 131 tokens per session (2,222 once invoked), scanned A, original, Apache-2.0.

A method for packaging separate FHIR R4 healthcare records into one transaction Bundle, which is the package a FHIR server can receive. It also connects references between records such as patients, encounters, conditions, and observations.

In plain words
What is it for?
It helps prepare OpenMed-generated resources for posting to a FHIR server and building transaction, batch, collection, or similar Bundles.
Why use it?
A FHIR server needs a correctly structured package with internal links, rather than a loose list of unrelated records.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the openmed-skills plugin — 74 skills shipped together

Good fit It helps prepare OpenMed-generated resources for posting to a FHIR server and building transaction, batch, collection, or similar Bundles.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/maziyarpanahi/openmed/assembling-fhir-bundles
About the project

OpenMed is local-first healthcare AI software that extracts clinical information and removes personally identifying details from clinical text on hardware controlled by the user. Healthcare developers use its Python runtime, Apple Silicon and mobile SDKs, and browser support for on-device clinical NER and PII de-identification.

maziyarpanahi/openmed · 5,290 stars · on GitHub · openmed.life

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add maziyarpanahi/openmed --skill assembling-fhir-bundles
Clone the repo
git clone --depth 1 https://github.com/maziyarpanahi/openmed

Made for: Claude Code.

Or install openmed-skills, the plugin that ships this one along with the rest of its 74 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for assembling-fhir-bundles

README.md
[![agentmods](https://agentmods.dev/badge/skills/maziyarpanahi/openmed/assembling-fhir-bundles/github.svg)](https://agentmods.dev/skills/maziyarpanahi/openmed/assembling-fhir-bundles)
Your own site
<a href="https://agentmods.dev/skills/maziyarpanahi/openmed/assembling-fhir-bundles"><img src="https://agentmods.dev/badge/skills/maziyarpanahi/openmed/assembling-fhir-bundles/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for assembling-fhir-bundles

Your own site · 80×15
<a href="https://agentmods.dev/skills/maziyarpanahi/openmed/assembling-fhir-bundles"><img src="https://agentmods.dev/badge/skills/maziyarpanahi/openmed/assembling-fhir-bundles.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 131 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,222 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00131 $0.02222
Opus 5 $0.00066 $0.01111
Sonnet 5 $0.00026 $0.00444
Haiku 4.5 $0.00013 $0.00222

Measured 12d ago against content hash 651f5e1cf296, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

assembling-fhir-bundles scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/assembling-fhir-bundles/SKILL.md · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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)

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 things, and never synthesises or validates:

  1. Deterministic fullUrl. Each resource gets a urn:uuid seeded by doc_id + its index, so the same input always produces byte-identical output (golden-test friendly). You can pre-compute the same urn with deterministic_fullurl(doc_id, index).
  2. Reference rewriting. Any {"reference": "ResourceType/id"} whose target is present in the Bundle is repointed at that resource's fullUrl. References to resources absent from the Bundle (e.g. a Patient removed by de-identification) are left untouched — no dangling internal refs.
  3. Request blocks. For transaction/batch bundles each entry gets a request block ({"method": "POST", "url": "<ResourceType>"}) so the server knows to create it.

Read the full file on GitHub · 194 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 194 lines · 131 tokens per session scan A 651f5e1cf296

Subscribe to this mod's changes

assembling-fhir-bundles is a skill published in the GitHub repository maziyarpanahi/openmed (5,290 stars, last pushed yesterday), licensed Apache-2.0. It adds 131 tokens to every session and 2,222 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

benchmarking

Use this skill when the user wants to benchmark an MLX-VLM change and present the numbers in a PR — fork-vs-main A/B comparisons, isolated-module micro-benchmarks, median-of-N timing with warmup, peak-memory reporting, correctness checks, parameter sweeps, and self-contained reproducible bench scripts to paste into a…

Blaizzy/mlx-vlm · 74 tokens

server-inference

Use this skill when the user wants to run or debug MLX-VLM server inference, including uv run mlxvlm.server, /v1/models, /v1/chat/completions, /v1/responses, streaming, OpenAI-compatible clients, health checks, metrics, model unload/reload, adapters, trust-remote-code, and server request/response failures.

Blaizzy/mlx-vlm · 80 tokens

protocolsio-integration

Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io…

synthetic-sciences/openscience · 85 tokens

healthchain

Use when building, debugging, or deploying a Python service that touches FHIR resources, EHR APIs, CDS Hooks, clinical documents, or patient data — including writing model or agent output back into a patient record, connecting to Epic/Cerner/Medplum, or serving FHIR tools to an agent over MCP or LangChain.

healthchainai/HealthChain · 71 tokens

hl7-v2

When the user wants to design, parse, generate, or troubleshoot HL7 v2.x pipe-delimited messages. Use when the user mentions "HL7 v2," "HL7 2.x," "ADT," "ORM," "ORU," "MDM," "SIU," "DFT," "MSH," "PID," "OBX," "OBR," "ACK," "NAK," "MLLP," "Mirth," "NextGen Connect Integration Engine," "Rhapsody," "Cloverleaf,"…

aks-builds/healthcareskills · 195 tokens

healthcare-fhir

Design RESTful clinical data exchanges using HL7 FHIR standards.

andreibesleaga/GABBE · 17 tokens