KS
Killer-Skills

fhir-api — how to use fhir-api how to use fhir-api, fhir-api setup guide, fhir-api alternative, fhir-api vs hapi, what is fhir-api, fhir-api install, hl7 fhir specification, apache spark integration, fhir rest api implementation

v1.0.0
GitHub

About this Skill

Perfect for Healthcare Agents needing to implement FHIR RESTful APIs according to the HL7 FHIR specification fhir-api is a toolset built on Apache Spark that simplifies the use of FHIR and clinical terminology within data analytics.

Features

Implements FHIR RESTful APIs according to the HL7 FHIR specification (R4/R5)
Follows URL structure pattern: [base]/[type]/[id] with UTF-8 encoding
Supports core operations such as read, search, and create via HTTP requests
Utilizes Apache Spark for efficient data processing and analysis
Enables seamless integration of clinical terminology within data analytics

# Core Topics

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

Quality Score

Top 5%
36
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
Cursor IDE Windsurf IDE VS Code IDE
> npx killer-skills add aehrc/pathling/references/search.md

Agent Capability Analysis

The fhir-api MCP Server by aehrc is an open-source Categories.community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use fhir-api, fhir-api setup guide, fhir-api alternative.

Ideal Agent Persona

Perfect for Healthcare Agents needing to implement FHIR RESTful APIs according to the HL7 FHIR specification

Core Value

Empowers agents to interact with FHIR resources using RESTful APIs, providing URL structure guidance and supporting core operations like READ, CREATE, and UPDATE, all based on the HL7 FHIR specification (R4/R5) and utilizing UTF-8 encoding

Capabilities Granted for fhir-api MCP Server

Implementing FHIR RESTful APIs for Patient and Observation resources
Generating URLs for FHIR resources following the [base]/[type]/[id] pattern
Debugging FHIR API requests using HTTP methods like GET, POST, and PUT

! Prerequisites & Limits

  • Requires knowledge of HL7 FHIR specification (R4/R5)
  • Limited to FHIR RESTful API implementation
  • Case-sensitive URLs and UTF-8 encoding required
Project
SKILL.md
5.1 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
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

Related Skills

Looking for an alternative to fhir-api or building a Categories.community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

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
Communication

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
Communication