fhir-developer-skill

Guide building and validating FHIR R4 REST APIs with Pydantic v2 models.

90|4|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/aisa-group/skill-inject --skill fhir-developer-skill-aisa-group
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fhir-developer-skill
Source: https://github.com/aisa-group/skill-inject/tree/main/data/skills/healthcare/fhir-developer-skill
Command: npx skills add https://github.com/aisa-group/skill-inject --skill fhir-developer-skill-aisa-group

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires fastapi, uvicorn, pydantic, httpx, pytest, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Implementing FHIR R4 REST APIs correctly is complex and error-prone; this Skill consolidates best practices for resource validation, correct HTTP status usage, error reporting, and authorization to reduce integration bugs and interoperability issues.

Core Features & Use Cases

  • Resource Validation & Error Handling: Guidance on required fields by cardinality, enum validation, and returning OperationOutcome with appropriate HTTP status codes (422, 412, 404, etc.).
  • Endpoint and Bundle Semantics: Patterns for CRUD endpoints, bundle transaction vs batch handling, pagination, and search result Bundles.
  • SMART on FHIR & Security: Support for SMART on FHIR scope syntax, discovery endpoints, token exchange examples, and middleware patterns for enforcing scopes.
  • Developer Tooling: Pydantic v2 model patterns, FastAPI/Express examples, and a scaffold script to create a working FHIR project for testing and prototyping.

Quick Start

Scaffold a new FHIR API project named my_fhir_api using the provided setup_fhir_project.py scaffold script.

Frequently Asked Questions about fhir-developer-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate FHIR R4 resources and return correct OperationOutcome errors?

FHIR R4 resource validation requires checking field cardinality and enums, then returning an OperationOutcome structure with appropriate HTTP status codes like 422, 412, or 404 to ensure standards-compliant API behavior.

How do I set up a FastAPI project for FHIR R4 endpoints?

You can scaffold a new FHIR API project by running the provided setup_fhir_project.py script, which generates a working FastAPI environment using Pydantic v2 models for testing and prototyping Patient or Observation endpoints.

Does this support SMART on FHIR authorization and scope enforcement?

Yes, SMART on FHIR authorization is supported through scope syntax guidance, discovery endpoints, token exchange examples, and middleware patterns for enforcing scopes within your FHIR R4 REST API server.

What is the difference between FHIR bundle transaction and batch processing?

FHIR bundle transaction processing applies changes atomically, while batch processing executes entries independently, both requiring specific search pagination and search result Bundle patterns for correct endpoint semantics.

How do I handle LOINC, SNOMED, and RxNorm coding system references in Pydantic v2?

You handle coding system references by applying Pydantic v2 model patterns to validate codes against LOINC, SNOMED, RxNorm, and ICD-10 systems, ensuring standards-compliant server behavior for FHIR resources.

Why does my FHIR server return incorrect HTTP status codes for missing resources?

Incorrect HTTP status codes often occur when missing FHIR resources do not trigger a 404 with an OperationOutcome structure, requiring strict endpoint validation and error handling patterns to achieve standards-compliant behavior.