Lab Endpoints

Lab Network exposes FHIR R4 endpoints for laboratory ordering, status tracking, result retrieval, and event notifications.

Endpoints map to FHIR resources and stages in the order-to-result workflow. Use the Order API to understand resource structure and field-level details.

Overview

Lab Network uses standard FHIR R4 resources to represent laboratory workflows, such as:

  • Submit orders
  • Retrieve orders and track status
  • Retrieve results
  • Access documents
  • Receive event-driven notifications

All endpoints require OAuth 2.0 authentication and use application/fhir+json unless otherwise specified.

Core Resources

The following FHIR resources are used across Lab Network workflows.

ResourcePurpose
RequestGroupRepresents the complete laboratory order
ServiceRequestRepresents individual tests within an order
SpecimenDescribes collected sample details
DiagnosticReportRepresents the overall lab report
ObservationContains discrete result values
DocumentReferenceReferences document-based results
BinaryProvides access to downloadable report files
SubscriptionEnables event-driven notifications
OperationOutcomeRepresents validation and processing errors

Order Endpoints

POST /fhir/R4/RequestGroup
GET /fhir/R4/RequestGroup/{id}
GET /fhir/R4/RequestGroup?patient={patient-id}

Use these endpoints to submit, retrieve, and search laboratory orders.

Example Request

POST /fhir/R4/RequestGroup
Content-Type: application/fhir+json
Authorization: Bearer {access_token}
{
  "resourceType": "RequestGroup",
  "status": "active",
  "intent": "order",
  "subject": {
    "reference": "Patient/12345"
  },
  "author": {
    "reference": "Practitioner/67890"
  }
}

Result Endpoints

GET /fhir/R4/DiagnosticReport?based-on=RequestGroup/{order-id}
GET /fhir/R4/Observation?based-on=RequestGroup/{order-id}

Use these endpoints to retrieve structured results associated with an order.

Example Response

{
  "resourceType": "DiagnosticReport",
  "status": "final",
  "subject": {
    "reference": "Patient/12345"
  }
}

Document Endpoints

GET /fhir/R4/DocumentReference?subject=Patient/{patient-id}&category=laboratory
GET /fhir/R4/Binary/{id}

Use these endpoints to retrieve document-based results and file content.

Subscription Endpoint

POST /fhir/R4/Subscription

Use this endpoint to register for event-driven notifications.

Subscriptions support:

  • Order status updates
  • Result availability

Example Payload

{
  "resourceType": "Subscription",
  "status": "active",
  "criteria": "DiagnosticReport?status=final",
  "channel": {
    "type": "rest-hook",
    "endpoint": "https://client.example.com/webhook",
    "payload": "application/fhir+json"
  }
}

Workflow Mapping

Follow this sequence to implement a typical workflow:

  1. Submit an order using RequestGroup
  2. Retrieve or monitor order status
  3. Retrieve DiagnosticReport when results are available
  4. Retrieve associated Observation resources
  5. Retrieve document-based results using DocumentReference and Binary
  6. Optionally use Subscription for event-driven updates

Resources are linked through FHIR relationships to maintain traceability across each step.

Error Responses

Endpoints return OperationOutcome resources when validation or processing fails.

Your system must parse and handle OperationOutcome responses as part of normal API usage.

Example Error Response

{
  "resourceType": "OperationOutcome",
  "issue": [
    {
      "severity": "error",
      "code": "invalid",
      "diagnostics": "Invalid or missing required field"
    }
  ]
}

Summary

Lab Network endpoints provide access to laboratory ordering and result retrieval using FHIR R4.

Use these endpoints with the Order API and API Implementation guides to build end-to-end laboratory workflows.