fhir
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.