Overview
This guide covers administrative configuration for the Lab & Diagnostic Orders feature, including order template management, reference lab directory setup, and integration configuration.Order Template Management
Route: Clinical > Settings > Order TemplatesPermission:
cl.order_templates.manage
Creating a Template
- Navigate to Clinical > Settings > Order Templates.
- Click Add Template.
- Fill in:
- Template Name: Descriptive name (e.g., “Basic Metabolic Panel”).
- Template Type:
lab,imaging,procedure, orreferral. - Description: Purpose and use case.
- Order Items: Add LOINC codes using the typeahead search. For each item, specify:
- LOINC Code & Component (auto-populated from search)
- Specimen Type (e.g., Serum, Plasma)
- Priority (Routine, Urgent, Stat)
- Toggle Active to make available to clinicians.
- Click Save.
Managing Templates
- Edit: Click Edit on any template row to modify.
- Deactivate: Toggle the Active switch to hide from clinician order forms without deleting.
- Delete: Click Delete to permanently remove (admin only).
Reference Lab Directory
Route: Clinical > Settings > Lab DirectoryPermission:
cl.reference_labs.manage
Adding a Reference Lab
- Navigate to Clinical > Settings > Lab Directory.
- Click Add Lab.
- Fill in:
- Lab Name (required): Display name.
- CLIA Number: Clinical Laboratory Improvement Amendments number.
- NPI: National Provider Identifier.
- Phone / Fax / Contact Name: Lab contact information.
- Address fields: Street, city, state, ZIP.
- Integration Type:
none(manual),hl7v2, orfhir.
- Click Save.
Integration Configuration
For labs that send results electronically:
The ingestion endpoint is:
POST /functions/v1/cl-lab-result-ingestion
Labs must authenticate with an API key provided during setup. Contact your system administrator for endpoint credentials.
Managing Labs
- Edit: Click Edit to update lab details or integration settings.
- Deactivate: Toggle the Active switch to prevent new orders from being routed.
- Delete: Click Delete to permanently remove (admin only).
LOINC Code Reference
The system ships with pre-seeded LOINC codes for common behavioral health lab panels:
Additional LOINC codes can be added by system administrators directly to the
cl_loinc_codes table.
Permissions Reference
All permissions are granted to the
org_admin role by default. Use the Roles & Permissions settings to grant these to other roles as needed.
Security & Compliance
- All lab data is protected by Row Level Security (RLS) with tenant isolation.
- Lab results containing PHI are never logged to console or external services.
- The result ingestion endpoint uses API key authentication with timing-safe comparison.
- Rate limiting is enforced per lab to prevent abuse.
- Audit trails track all order creation, status changes, and result reviews.