Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

Module: Clinical & EHR (CL)
Version: 1.0.0
Last Updated: 2026-02-19

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 Templates
Permission: cl.order_templates.manage

Creating a Template

  1. Navigate to Clinical > Settings > Order Templates.
  2. Click Add Template.
  3. Fill in:
    • Template Name: Descriptive name (e.g., “Basic Metabolic Panel”).
    • Template Type: lab, imaging, procedure, or referral.
    • 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)
  4. Toggle Active to make available to clinicians.
  5. 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 Directory
Permission: cl.reference_labs.manage

Adding a Reference Lab

  1. Navigate to Clinical > Settings > Lab Directory.
  2. Click Add Lab.
  3. 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, or fhir.
  4. Click Save.

Integration Configuration

For labs that send results electronically:
Integration TypeProtocolConfiguration
Manual (none)N/AResults entered manually by staff
HL7v2ORU^R01Lab sends HL7v2 messages to the ingestion endpoint
FHIRDiagnosticReportLab sends FHIR R4 resources to the ingestion endpoint
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:
PanelCodes Included
Basic Metabolic Panel (BMP)Glucose, BUN, Creatinine, Sodium, Potassium, Chloride, CO2, Calcium
Complete Blood Count (CBC)WBC, RBC, Hemoglobin, Hematocrit, MCV, MCH, MCHC, Platelets
Hepatic Function (LFT)ALT, AST, ALP, Total Bilirubin, Albumin, Total Protein
Thyroid PanelTSH, Free T4
Drug MonitoringLithium, Valproic Acid
Urine Drug ScreenMulti-substance panel
Additional LOINC codes can be added by system administrators directly to the cl_loinc_codes table.

Permissions Reference

Permission KeyDescription
cl.orders.viewView lab orders and results
cl.orders.createCreate new lab orders
cl.orders.updateUpdate order status
cl.orders.cancelCancel pending orders
cl.results.viewView lab results
cl.results.reviewReview and sign off on results
cl.order_templates.viewView order templates
cl.order_templates.manageCreate/edit/delete order templates
cl.reference_labs.manageManage reference lab directory
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.