< Back

Ordering and Results

The Lab Network API supports end-to-end electronic ordering and result retrieval through FHIR R4. It connects with national and regional diagnostic partners—including Labcorp, Quest Diagnostics, and Bioreference—to route validated orders, process results, and return normalized FHIR resources for downstream workflows. Underlying HL7 v2 and C-CDA inputs are standardized during processing to ensure consistent data across connected systems.

Order Submission

Diagnostic orders are created and submitted using FHIR RequestGroup, which contains the ServiceRequest resources. Each order includes the required clinical and administrative details for lab fulfillment, including patient, provider, ordering facility, and specific tests to be performed. All test codes must align with the selected lab’s compendium to ensure valid transmission.

Submit an order

  1. Create a RequestGroup resource that represents the complete order and references one or more ServiceRequest resources for individual tests.
  2. Include references to Patient, Practitioner, and Organization resources for context.
  3. Provide relevant order details such as priority, reason, and linked Specimen information.
  4. Use valid compendium codes published by the selected diagnostic partner.
  5. Submit the order using a POST request to your tenant’s FHIR endpoint.
  6. Track the returned order ID for future status checks and result retrieval.

Orders that do not meet FHIR structure or laboratory compendium rules are rejected during validation.

Pre-submission Split Check

When you submit a lab order, Health Gorilla checks each test against your facility’s configured vendor catalogs. If the order includes tests that map to different laboratory catalogs—such as a mix of Quest and Labcorp codes—the system flags the conflict before sending anything out.

A message is returned identifying which tests route to each vendor. If auto-split is enabled, Health Gorilla splits the order automatically and returns the outcome. Otherwise, you must separate vendor-specific orders.

Common Rules

  • Test catalog mapping: Each test routes only to labs that support it.
  • Vendor exclusivity: Panels or profiles that are vendor-specific (for example, Quest-only or Labcorp-only) trigger a split.
  • Facility configuration: Some tenants are configured to route all orders to a single preferred lab.
  • Collection site or payer constraints: Routing honors draw-site and payer limitations.

Example (blocked order)

HTTP/1.1 400 Bad Request
{
  "error": "multi-vendor-tests",
  "message": "Order includes tests that map to multiple vendors. Submit separate orders per vendor.",
  "details": {
    "Quest": ["Lipid Panel (7601)"],
    "Labcorp": ["CBC (005009)"]
  }
}

Example (auto-split enabled)

HTTP/1.1 201 Created
{
  "orderGroupId": "ordgrp_9f2a",
  "splits": [
    { "vendor": "Quest", "orderId": "ord_qst_123", "tests": ["Lipid Panel (7601)"] },
    { "vendor": "Labcorp", "orderId": "ord_lbc_987", "tests": ["CBC (005009)"] }
  ]
}

Order Routing

After submission, your order is validated, routed, and monitored. The Lab Network ensures that orders meet both FHIR and laboratory-specific requirements before delivery. Routing includes compendium validation, assignment of the appropriate transmission channel, and confirmation of receipt by the laboratory.

During routing, the following actions occur:

  • The designated laboratory is defined in the performer element.
  • The delivery method (such as electronic, fax, or print) is set using the requestgroup-deliveryOptions extension.
  • Transport occurs through secure, encrypted channels.
  • Delivery events are logged for audit traceability.

You can monitor fulfillment by querying the order status or subscribing to FHIR Subscription notifications for updates.

Result Retrieval

When the lab completes testing, results are normalized and made available for query or asynchronous delivery. Results are delivered in structured FHIR form, while original documents are retained for provenance and audit tracking.

Two result types are supported:

  • Structured results are returned as DiagnosticReport and Observation resources containing discrete values.
  • Unstructured results are returned as DocumentReference resources linked to Binary payloads (such as PDFs or scanned images).

Example queries:

GET /fhir/R4/DiagnosticReport?based-on=RequestGroup/{order-id}
GET /fhir/R4/Observation?subject=Patient/{patient-id}
GET /fhir/R4/DocumentReference?subject=Patient/{patient-id}&category=laboratory

Each result includes references to the originating order, encounter, and performing organization for full traceability.

Result Linkages

Lab results include references to related resources that provide ordering, clinical, and encounter context. These linkages allow systems to reconstruct the full chain of custody and clinical interpretation.

Linked references may include:

  • RequestGroup: Originating diagnostic order
  • Encounter: Clinical setting or visit where the test was ordered
  • Practitioner: Ordering or performing provider
  • Organization: Lab or submitting facility
  • Provenance: Source system that generated or routed the result

Maintaining these relationships helps preserve context across longitudinal patient records and compliance workflows.

Workflow Recommendations

It is recommended that your organization:

  • Confirm compendium mappings before order submission
  • Use RequestGroup.status to monitor fulfillment state
  • Track key timestamps such as order time, acceptance, and result availability
  • Subscribe to FHIR Subscriptions rather than polling for results
  • Retain provenance details to support traceability and audits
  • Normalize all result codes using LOINC, SNOMED CT, and UCUM

Efficient workflows reduce turnaround delays, eliminate redundant queries, and improve patient care responsiveness.

Summary

Laboratory orders and results are managed entirely through the Lab Network API using standardized FHIR resource models. Orders must comply with laboratory compendium rules, and results are returned in structured or unstructured formats with full contextual references. Event-based notifications and linked FHIR resources support efficient integration and clinical decision-making.