assembling-fhir-bundles
自动生成确定性 fullUrl 与引用重写,便于可靠地向 EHR 提交数据。
与医疗系统交互时需小心资源一致性与权限控制
将多条 FHIR R4 资源封装为可提交的 transaction Bundle 并修正引用。
把多条 FHIR R4 资源打包成一个可直接 POST 到 EHR 的 transaction Bundle,并自动修正 Bundle 内部引用,保证 Patient、Observation 等相互指向正确。常在把 OpenMed 导出的 Condition/Observation/MedicationStatement 合并成一笔事务时用。使用 openmed.clinical.exporters.fhir.to_bundle,可生成确定性的 urn:uuid fullUrl、request block 和 conditional create。
▸ 展开 SKILL.md 英文原文
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 exporting-to-fhir; pairs after.
帮我安装这个 skill:https://raw.githubusercontent.com/maziyarpanahi/openmed/master/skills/assembling-fhir-bundles/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/maziyarpanahi/openmed/master/skills/assembling-fhir-bundles/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 r