fetching-fhir-resources
为 EHR → OpenMed 数据流提供标准化预处理,便于后续 NLP 管道接入。
处理受保护的医疗信息,需合规授权并注意访问与日志安全。
从 FHIR R4 API 拉取并分页资源,解码附件并提取临床文本供 OpenMed 使用。
从 FHIR R4 接口分页拉取 Patient、DocumentReference、DiagnosticReport、Observation、Condition 等资源,解码 base64 附件并抽取临床 narrative 文本,按患者聚合交给后续处理。在把病历送入 OpenMed 去标识和做 NLP 分析前运行,适配 Epic、Cerner/Oracle、HAPI 和 US Core 服务器。特点是把 presentedForm/attachment 的文本解码提取,并直接衔接 openmed.deidentify 和 openmed.analyze_text。
▸ 展开 SKILL.md 英文原文
Fetches and pages FHIR R4 resources (Patient, DocumentReference, DiagnosticReport, Observation, Condition) from a FHIR REST server, decodes base64 attachments, and extracts clinical narrative for OpenMed. Use before OpenMed processing when pulling charts from an EHR FHIR API (Epic, Cerner/Oracle, HAPI, or any US Core server) and you need the note text de-identified and analyzed, then results rejoined by patient. Hand narrative to openmed.deidentify and openmed.analyze_text; openmed.interop.fhir_operations implements a $de-identify operation over Bundles. Trigger keywords: FHIR, R4, US Core, DocumentReference, DiagnosticReport, Bundle, _revinclude, presentedForm, base64, EHR API.
帮我安装这个 skill:https://raw.githubusercontent.com/maziyarpanahi/openmed/master/skills/fetching-fhir-resources/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/maziyarpanahi/openmed/master/skills/fetching-fhir-resources/SKILL.md"# Fetching FHIR R4 Resources for OpenMed FHIR R4 is the modern EHR API: a RESTful, JSON-or-XML interface over resources like `Patient`, `Encounter`, `Condition`, `Observation`, `DiagnosticReport`, and `DocumentReference`. The unstructured clinical text you want for NLP lives in **`DocumentReference.content.attachment`** and **`DiagnosticReport.presentedForm`** — usually **base64-encoded** PDF, RTF, or plain text. This skill pulls those resources, pages through results, decodes the attachments, and hands the narrative to OpenMed. ## When to use - You have FHIR R4 access to an EHR (Epic, Oracle Health/Cerner, HAPI, Medplum, Azure/Google/AWS HealthLake) and want note text for de-id and NER