Skip to main content

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: 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.