API Documentation
API Overview
API Base URL
http://localhost:8061/api/v1
This API provides FHIR R5 compliant endpoints for healthcare resource management. All endpoints support JSON format and follow FHIR R5 standards.
Quick Endpoint Reference
| Category | Endpoints | Methods |
|---|---|---|
| FHIR Resources | /Patient, /CarePlan, /Observation, /PlanDefinition |
GET, POST, PUT, DELETE |
| Terminology | /ValueSet, /CodeSystem |
GET, POST, PUT, DELETE |
| Concepts | /concepts, /activities, /goals |
GET, POST, PUT, DELETE |
| Lookup Tables | /canonical-libs, /concept-types, /response-types, /units |
GET, POST, PUT, DELETE |
| Operations | /$batch, /$transaction, /$validate, /CodeSystem/$lookup |
POST |
| Monitoring | /health, /metrics, /status |
GET |
| Metadata | /metadata |
GET |
Concepts API
Manage healthcare concepts and related entities.
GET /api/v1/concepts
Retrieve all concepts with optional filtering and pagination.
Query Parameters:
page- Page number (default: 1)per_page- Items per page (default: 20)search- Search termconcept_type- Filter by concept typeresponse_type- Filter by response typecanonical_lib- Filter by canonical libraryhas_values- Filter by values (true/false)
Example:
GET /api/v1/concepts?search=blood&page=1&per_page=10
POST /api/v1/concepts
Create a new concept.
Required Fields:
canonical_lib- Canonical library UUIDconcept_name- Concept name
Example Request Body:
{
"canonical_lib": "123e4567-e89b-12d3-a456-426614174000",
"concept_name": "Blood Pressure",
"concept_display_text": "Blood Pressure Measurement",
"concept_explain": "Measurement of blood pressure",
"concept_type": "456e7890-e89b-12d3-a456-426614174001",
"response_type": "789e0123-e89b-12d3-a456-426614174002"
}
FHIR Resources
FHIR R5 compliant resource endpoints.
Patient Resources
GET /api/v1/Patient- Search patientsPOST /api/v1/Patient- Create patientGET /api/v1/Patient/{id}- Get patient by IDPUT /api/v1/Patient/{id}- Update patientDELETE /api/v1/Patient/{id}- Delete patient
Search Parameters:
name- Patient namegender- Patient genderbirthdate- Birth date
CarePlan Resources
GET /api/v1/CarePlan- Search care plansPOST /api/v1/CarePlan- Create care planGET /api/v1/CarePlan/{id}- Get care plan by IDPUT /api/v1/CarePlan/{id}- Update care planDELETE /api/v1/CarePlan/{id}- Delete care plan
Search Parameters:
subject- Patient referencestatus- Care plan statusintent- Care plan intent
Observation Resources
GET /api/v1/Observation- Search observationsPOST /api/v1/Observation- Create observationGET /api/v1/Observation/{id}- Get observation by IDPUT /api/v1/Observation/{id}- Update observationDELETE /api/v1/Observation/{id}- Delete observation
Search Parameters:
subject- Patient referencecategory- Observation categorycode- Observation code
Terminology API
FHIR terminology services for ValueSets and CodeSystems.
ValueSet Resources
GET /api/v1/ValueSet- Search ValueSetsPOST /api/v1/ValueSet- Create ValueSetGET /api/v1/ValueSet/{id}- Get ValueSet by IDPUT /api/v1/ValueSet/{id}- Update ValueSetDELETE /api/v1/ValueSet/{id}- Delete ValueSet
Operations:
GET /api/v1/ValueSet/{id}/$expand- Expand ValueSetPOST /api/v1/ValueSet/$validate-code- Validate code
CodeSystem Resources
GET /api/v1/CodeSystem- Search CodeSystemsPOST /api/v1/CodeSystem- Create CodeSystemGET /api/v1/CodeSystem/{id}- Get CodeSystem by ID
Operations:
POST /api/v1/CodeSystem/$lookup- Lookup code
Lookup Tables API
Manage lookup tables and reference data.
Canonical Libraries
GET /api/v1/canonical-libs- List all canonical librariesPOST /api/v1/canonical-libs- Create canonical libraryGET /api/v1/canonical-libs/{id}- Get canonical library by IDPUT /api/v1/canonical-libs/{id}- Update canonical libraryDELETE /api/v1/canonical-libs/{id}- Delete canonical library
Concept Types
GET /api/v1/concept-types- List all concept typesPOST /api/v1/concept-types- Create concept typeGET /api/v1/concept-types/{id}- Get concept type by IDPUT /api/v1/concept-types/{id}- Update concept type
Response Types
GET /api/v1/response-types- List all response typesPOST /api/v1/response-types- Create response typeGET /api/v1/response-types/{id}- Get response type by IDPUT /api/v1/response-types/{id}- Update response type
Units
GET /api/v1/units- List all unitsPOST /api/v1/units- Create unitGET /api/v1/units/{id}- Get unit by IDPUT /api/v1/units/{id}- Update unit
FHIR Operations
Advanced FHIR operations for batch processing and validation.
POST /api/v1/$batch
Execute a batch of FHIR operations.
Example Request:
{
"resourceType": "Bundle",
"type": "batch",
"entry": [...]
}
POST /api/v1/$transaction
Execute a transaction of FHIR operations (atomic).
POST /api/v1/$validate
Validate a FHIR resource against the specification.
POST /api/v1/CodeSystem/$lookup
Lookup a code in a CodeSystem.
Production Monitoring
Health checks, metrics, and system status endpoints.
GET /api/v1/health
Comprehensive health check endpoint.
GET /api/v1/metrics
Get system performance metrics.
GET /api/v1/status
Get system status information.
Metadata & Capability Statement
System metadata and capability information.
GET /api/v1/metadata
Retrieve FHIR CapabilityStatement with supported resources and operations.
This is the primary endpoint for discovering API capabilities.
Access:
GET http://localhost:8061/api/v1/metadata
Example Response:
{
"resourceType": "CapabilityStatement",
"id": "fhir-engine-capability",
"url": "http://localhost:8061/api/v1/metadata",
"version": "1.0.0",
"name": "FHIR Healthcare Transaction Engine",
"status": "active",
"fhirVersion": "5.0.0",
"rest": [{
"mode": "server",
"resource": [...]
}]
}
View Live Capability Statement