{ "resourceType": "OperationOutcome", "issue": [{ "severity": "error", "code": "not-found", "details": { "text": "Patient with ID 'pat_999' not found" }, "diagnostics": "Resource not found in agency scope" }]}
Getting Started
FHIR API Overview
Standards-based healthcare interoperability using FHIR R4
The Nestmed platform provides a FHIR R4 API designed for seamless integration with Electronic Health Records (EHRs) and other healthcare systems. This API transforms our internal data into standardized FHIR resources, providing read access to clinical information.
This FHIR API is currently in alpha. Features and endpoints may change.
The FHIR API uses OAuth 2.0 for authentication, supporting both:
Client Credentials
Authorization Code
For system-to-system integration:
Copy
Ask AI
POST /auth/oauth2/tokenContent-Type: application/x-www-form-urlencodedgrant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&scope=patient/*.read
For user-facing applications:
Copy
Ask AI
# Step 1: Redirect to authorizationGET /auth/oauth2/authorize? response_type=code& client_id=YOUR_CLIENT_ID& redirect_uri=YOUR_REDIRECT_URI& scope=patient/*.read& state=RANDOM_STATE# Step 2: Exchange code for tokenPOST /auth/oauth2/tokenContent-Type: application/x-www-form-urlencodedgrant_type=authorization_code&code=AUTH_CODE&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET
Our FHIR API provides comprehensive resources specifically tailored for home health requirements, including OASIS assessments, Medicare compliance, and PDGM groupings:
Resource:PatientEndpoint:/v1/Patient/{id}Source: Internal patient recordsMaps patient demographics, identifiers, and contact information with home health specific extensions.
Resource:ServiceRequestEndpoint:/v1/ServiceRequestSource: Physician orders/485 Plan of CareCritical for home health orders and Plan of Care documentation.
Resource:DiagnosticReportEndpoint:/v1/DiagnosticReportSource: Media derivatives (transcripts, captions)Processed documentation from audio/image analysis.
# Search by nameGET /fhir/r4/v1/Patient?name=John# Search by identifierGET /fhir/r4/v1/Patient?identifier=MRN-12345# Search by birthdateGET /fhir/r4/v1/Patient?birthdate=1945-03-15# Search by Medicare Beneficiary IDGET /fhir/r4/v1/Patient?identifier=http://hl7.org/fhir/sid/us-mbi|1EG4-TE5-MK73
# Search by patientGET /fhir/r4/v1/Encounter?patient=Patient/pat_123# Search by date rangeGET /fhir/r4/v1/Encounter?date=ge2024-12-01&date=le2024-12-31# Search by home health visit typeGET /fhir/r4/v1/Encounter?service-type=home-health&class=HH# Search for specific visit typesGET /fhir/r4/v1/Encounter?type=http://nestmed.com/visit-type|SOC
# Search for OASIS observationsGET /fhir/r4/v1/Observation?category=oasis&date=2024-01-01# Search for specific OASIS itemsGET /fhir/r4/v1/Observation?code=https://www.cms.gov/oasis|M1800# Search for SOC assessmentsGET /fhir/r4/v1/QuestionnaireResponse?questionnaire=oasis-e-soc&status=completed
# Active Plan of Care ordersGET /fhir/r4/v1/ServiceRequest?category=plan-of-care&status=active# Orders within certification periodGET /fhir/r4/v1/ServiceRequest?authored=ge2024-01-01&authored=le2024-02-29
# Find encounters for patients named "Doe"GET /fhir/r4/v1/Encounter?patient.name=Doe# Find observations for active episodesGET /fhir/r4/v1/Observation?encounter.episode-of-care.status=active# Find conditions for patients in specific PDGM groupGET /fhir/r4/v1/Condition?_has:Extension:url=pdgm-clinical-group&value=MMTA-Wounds
# Export all OASIS assessments for a time periodPOST /fhir/r4/v1/$exportContent-Type: application/fhir+json{ "_type": "Observation,QuestionnaireResponse", "_typeFilter": "Observation?category=oasis,QuestionnaireResponse?questionnaire=oasis-e", "_since": "2024-01-01T00:00:00Z", "_outputFormat": "ndjson"}
FHIR-compliant error responses using OperationOutcome:
Copy
Ask AI
{ "resourceType": "OperationOutcome", "issue": [{ "severity": "error", "code": "not-found", "details": { "text": "Patient with ID 'pat_999' not found" }, "diagnostics": "Resource not found in agency scope" }]}