fhir-api — community fhir-api, pathling, community, ide skills, Claude Code, Cursor, Windsurf

v1.0.0
GitHub

About this Skill

Perfect for Healthcare Agents needing to implement FHIR RESTful APIs for clinical data exchange. Tools that make it easier to use FHIR and clinical terminology within data analytics, built on Apache Spark.

aehrc aehrc
[0]
[0]
Updated: 3/5/2026

Agent Capability Analysis

The fhir-api skill by aehrc is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance.

Ideal Agent Persona

Perfect for Healthcare Agents needing to implement FHIR RESTful APIs for clinical data exchange.

Core Value

Empowers agents to build compliant FHIR REST APIs using Apache Spark, facilitating standardized clinical data analytics and exchange via the HL7 FHIR specification, including support for FHIR R4 and R5, and handling resources like Patient and Observation.

Capabilities Granted for fhir-api

Implementing FHIR RESTful APIs for electronic health records
Analyzing clinical data using Apache Spark
Validating FHIR resource IDs and URLs

! Prerequisites & Limits

  • Requires knowledge of HL7 FHIR specification
  • Case-sensitive and UTF-8 encoding compliance necessary
  • Apache Spark dependency
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

fhir-api

Install fhir-api, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

FHIR REST API implementation

This skill provides guidance for implementing FHIR RESTful APIs according to the HL7 FHIR specification (R4/R5).

URL structure

All FHIR REST URLs follow the pattern:

[base]/[type]/[id]
  • [base]: Service base URL (e.g., https://fhir.example.org/r4)
  • [type]: Resource type (e.g., Patient, Observation)
  • [id]: Logical resource ID

URLs are case-sensitive and use UTF-8 encoding.

Core operations

OperationHTTPURL PatternSuccess
ReadGET[base]/[type]/[id]200
VReadGET[base]/[type]/[id]/_history/[vid]200
CreatePOST[base]/[type]201
UpdatePUT[base]/[type]/[id]200/201
PatchPATCH[base]/[type]/[id]200
DeleteDELETE[base]/[type]/[id]200/204
SearchGET/POST[base]/[type]?params200
HistoryGET[base]/[type]/[id]/_history200
CapabilitiesGET[base]/metadata200
Batch/TransactionPOST[base]200

For detailed specifications of each operation, see references/operations.md.

Content negotiation

MIME types

FormatMIME Type
JSONapplication/fhir+json
XMLapplication/fhir+xml
RDFapplication/fhir+turtle

Use the Accept header for response format and Content-Type for request body format.

The _format query parameter overrides Accept when clients cannot set headers.

FHIR version

Specify version via MIME type parameter:

Accept: application/fhir+json; fhirVersion=4.0

Version mappings: 1.0 (R2), 3.0 (R3), 4.0 (R4), 4.3 (R4B), 5.0 (R5).

Required headers

Request headers

HeaderPurposeExample
AcceptResponse formatapplication/fhir+json
Content-TypeRequest body formatapplication/fhir+json
If-MatchOptimistic lockingW/"123"
If-None-ExistConditional createidentifier=123
PreferReturn preferencereturn=representation

Response headers

HeaderPurposeExample
ETagVersion identifierW/"123"
LocationNew resource URL[base]/Patient/123/_history/1
Last-ModifiedModification timeRFC 7231 date

Versioning and optimistic locking

FHIR uses weak ETags for version tracking:

  1. Server returns ETag: W/"[versionId]" with responses
  2. Client sends If-Match: W/"[versionId]" with updates
  3. Server returns 412 Precondition Failed if version mismatch

Implement version-aware updates when CapabilityStatement.rest.resource.versioning is versioned-update.

Error handling

Return OperationOutcome resources for all errors:

json
1{ 2 "resourceType": "OperationOutcome", 3 "issue": [ 4 { 5 "severity": "error", 6 "code": "invalid", 7 "diagnostics": "Patient.birthDate: Invalid date format" 8 } 9 ] 10}

Status codes

CodeMeaning
400Invalid syntax or validation failure
404Resource not found
409Version conflict
410Resource deleted
412Precondition failed (version mismatch)
422Business rule violation

Prefer header

Control response content with Prefer:

ValueResponse body
return=minimalEmpty (headers only)
return=representationFull resource
return=OperationOutcomeValidation outcome

For async operations, use Prefer: respond-async to get 202 Accepted with status polling URL.

Implementation checklist

Server implementations should:

  1. Implement CapabilityStatement at /metadata
  2. Support content negotiation (JSON at minimum)
  3. Return proper ETags for versioned resources
  4. Include Location header on create/update
  5. Return OperationOutcome for all errors
  6. Support _format parameter fallback
  7. Honour Prefer header for response content

References

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is fhir-api?

Perfect for Healthcare Agents needing to implement FHIR RESTful APIs for clinical data exchange. Tools that make it easier to use FHIR and clinical terminology within data analytics, built on Apache Spark.

How do I install fhir-api?

Run the command: npx killer-skills add aehrc/pathling/fhir-api. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for fhir-api?

Key use cases include: Implementing FHIR RESTful APIs for electronic health records, Analyzing clinical data using Apache Spark, Validating FHIR resource IDs and URLs.

Which IDEs are compatible with fhir-api?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for fhir-api?

Requires knowledge of HL7 FHIR specification. Case-sensitive and UTF-8 encoding compliance necessary. Apache Spark dependency.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add aehrc/pathling/fhir-api. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use fhir-api immediately in the current project.

Related Skills

Looking for an alternative to fhir-api or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI