fhir

$npx mdskill add mkurman/zorai/fhir

Query, create, and manage healthcare data via FHIR APIs.

  • Enables agents to access patient records and clinical observations.
  • Integrates with HAPI FHIR servers and major EHR platforms.
  • Executes RESTful requests to retrieve or modify specific resources.
  • Returns structured JSON responses containing parsed patient details.

SKILL.md

.github/skills/fhirView on GitHub ↗
---
name: fhir
description: "FHIR (Fast Healthcare Interoperability Resources) standard. Tools for reading, writing, and querying healthcare data via FHIR APIs: patients, observations, conditions, medications, procedures. Interop with EHR systems."
tags: [fhir, healthcare, ehr, interoperability, hl7, api, zorai]
---
## Overview

FHIR (Fast Healthcare Interoperability Resources) tools for reading, writing, and querying healthcare data via FHIR REST APIs. Work with Patient, Observation, Condition, MedicationRequest, and Encounter resources from EHR systems.

## Installation

```bash
uv pip install fhir.resources requests
```

## Query Patients

```python
import requests
from fhir.resources.patient import Patient

base_url = "https://hapi.fhir.org/baseR4"
resp = requests.get(f"{base_url}/Patient", params={"family": "Smith", "birthdate": "gt1970"})
data = resp.json()

for entry in data.get("entry", []):
    patient = Patient.parse_obj(entry["resource"])
    name = patient.name[0]
    print(f"{name.family}, {name.given[0]}")
```

## Create a Resource

```python
patient = Patient(
    name=[{"family": "Doe", "given": ["John"], "use": "official"}],
    birthDate="1980-05-15",
    gender="male",
)
resp = requests.post(
    f"{base_url}/Patient",
    json=patient.dict(),
    headers={"Content-Type": "application/fhir+json"},
)
print(f"Created: {resp.json()['id']}")
```

## Workflow

1. Identify FHIR server endpoint (HAPI, Epic, Cerner)
2. Query resources with search parameters
3. Parse responses into typed resource objects
4. Create/update with POST/PUT
5. Use `$everything` for comprehensive patient data

More from mkurman/zorai

SkillDescription
account-management>
agile-scrum>
albumentationsFast image augmentation library (Albumentations). 70+ transforms for classification, segmentation, object detection, keypoints, and pose estimation. Optimized OpenCV-based pipeline with unified API across all CV tasks. Supports images, masks, bounding boxes, and keypoints simultaneously. Note: classic Albumentations (MIT) is no longer maintained; successor AlbumentationsX uses AGPL-3.0. For torchvision-native augmentations, use torchvision.transforms.v2.
aml-complianceAnti-Money Laundering (AML) and Know Your Customer (KYC) compliance workflow. Sanctions screening, PEP detection, transaction monitoring, suspicious activity reporting (SAR), and OFAC compliance.
anki-connectThis skill is for interacting with Anki through AnkiConnect, and should be used whenever a user asks to interact with Anki, including to read or modify decks, notes, cards, models, media, or sync operations.
approval-checkpoint-long-taskCanonical long-task pack for daemon-managed work with deliberate approval checkpoints, status summaries, rollback notes, and mobile-safe governance-aware updates.
auditing-goal-artifactsUse when reviewing recent zorai goal run outputs, closure markers, ledgers, or evidence bundles to judge whether completion is credible or to identify remaining uncertainty.
autogenAutoGen (Microsoft) — multi-agent conversation framework. Agent-to-agent chat, code generation & execution, tool use, group chat, and human-in-the-loop. Build collaborative AI systems with specialized agents.
backtraderPython backtesting framework for trading strategies. Data feeds, brokers, analyzers, and live trading support. Strategy development with commission models, slippage, and signal-based execution.
beautiful-mermaidRender Mermaid diagrams as SVG and PNG using the Beautiful Mermaid library. Use when the user asks to render a Mermaid diagram.