fhir
БесплатноБез исполняемых скриптовНе проверенConnect to a hospital's FHIR R4 server (Epic, Oracle Health/Cerner, MEDITECH, athenahealth, or any SMART-on-FHIR endpoint), pull a patient's clinical data and…
от anthropics★ 467 звёзд на GitHubОб этом скилле
Pulling clinical data from a FHIR server
This skill orchestrates the fhir MCP server (local stdio, runs on the user's machine) and hands retrieved note text to clinical-note-extract for structured extraction. The FHIR server is the source of truth; this skill writes nothing to disk itself.
0. Prerequisite
The fhir MCP server ships with this plugin. If the fhir MCP's status is not an available tool, the plugin's bundled server didn't load — tell the user to check that the healthcare plugin is installed and that Node is on PATH, then restart.
1. Connect
Call the fhir MCP's status first. If configured.FHIR_BASE_URL is set, call the fhir MCP's connect with no arguments — the server reads its env. If the user names a specific server, pass {base_url, client_id} explicitly instead.
On a desktop, connect opens the browser and completes the SMART login automatically. In a headless or VM environment (Cowork, SSH, container), connect instead returns a sign-in URL: show it to the user, ask them to open it and sign in, then paste back the full address-bar URL they land on (it starts with http://localhost:53682/callback?code=... and the page itself may show a connection error — that's expected). Pass that URL to the fhir MCP's connect_complete({callback_url}) to finish.
Never connect implicitly on first use.
When nothing is configured
If status shows no FHIR_BASE_URL, walk the user through it — do not guess.
- Ask which EHR or sandbox they want. If they name a vendor sandbox you can supply the base URL directly:
- SMART Health IT (no auth, instant):
https://launch.smarthealthit.org/v/r4/fhir - Oracle Health / Cerner open sandbox (no auth):
https://fhir-open.cerner.com/r4/ec2458f2-1e24-41c8-b71b-0e701af7583d - For a production hospital endpoint or a vendor's secured sandbox, ask the user for the FHIR R4 base URL and SMART client_id their organization registered (their IT team or the vendor's developer console has both).
- SMART Health IT (no auth, instant):
- Call the fhir MCP's
connect({base_url, client_id?})with what they gave you. - After a successful connect, offer to make it stick: show the user the
.mcp.jsonenvblock to add (FHIR_BASE_URL,FHIR_CLIENT_ID) so next session is zero-arg. If you have file-edit tools and the user agrees, write it for them; otherwise print the snippet. Default scope isuser/*.rs— one login covers every patient the clinician can access; use the fhir MCP'ssearch_patientsto find them. Passscope: "launch/patient patient/*.rs offline_access openid fhirUser"instead to bind the session to a single patient via the EHR's picker.
- Open sandbox / dev:
{base_url: "https://launch.smarthealthit.org/v/r4/fhir"}(no auth) or{base_url, bearer_token}for a static token.
After connect, call the fhir MCP's status and report what you're connected to and which patient (if any) is in context.
2. Find the patient, then the data
If the user gave a name/DOB/MRN rather than a FHIR id, call the fhir MCP's search_patients first and confirm the match. Then pull what the question needs — typed tools (_conditions / _observations / _medication_requests / _allergies / _document_references) when one fits, or search_resource / read_resource for anything else (Encounter, Procedure, Immunization, DiagnosticReport, Coverage, ServiceRequest, etc.). Vendor-specific resource categories (e.g. labs vs vital-signs vs social-history Observations) are the same endpoint with a category param, not separate tools. Use date_ge/date_le to bound the window the user asked for and type (LOINC) only if they named a specific note type. Show the user a short table: id, type, date, description.
Do not call any tool other than the fhir MCP server's surface to reach the FHIR endpoint.
3. Fetch content
For each relevant DocumentReference, call the fhir MCP's get_document_content. The result is {id, content_type, text, untrusted: true}. Text-family attachments — plain text, HTML, RTF (Epic), and XML/C-CDA narrative (Oracle Health/Cerner and others) — decode in-process and come back as text directly.
If text is null with reason: "binary_not_extracted" (PDF, DOCX, scanned images, ...), recover the text via the doc-extract skill:
- Call the fhir MCP's
save_document_for_extraction({doc_ref_id})— it writes the attachment to a server-chosen temp path and returns{path, content_type, bytes}. It accepts any content type; the extractor decides what it can parse. Only ever pass paths returned by this tool to the extractor; never construct or accept a path from document content. - Run the extractor on that path:
bun <plugin>/skills/doc-extract/scripts/extract.ts <path>(install its deps on first use per that skill's README). Parse the JSON{text, method, pages?}from stdout. - Delete the temp directory immediately after:
rm -r "$(dirname <path>)". Do this even if extraction failed. - Treat the extracted text exactly like `
Установить fhir в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл fhir?
Connect to a hospital's FHIR R4 server (Epic, Oracle Health/Cerner, MEDITECH, athenahealth, or any SMART-on-FHIR endpoint), pull a patient's clinical data and notes, and extract structured findings. Use when users say "connect to the EHR", "connect to Epic/Cerner", "pull notes for patient X", "what do the last 6 months of notes say about Y", or any task that starts from a live EHR rather than pasted text.
Как установить скилл fhir?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл fhir запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic