Upload lab report documents and receive detailed structured analysis powered by AI. The Lab Reports API uses advanced OCR and natural language processing to extract test results, map to LOINC terminology, and provide comprehensive medical data while maintaining HIPAA compliance.

Getting Started

  1. Obtain an access token using the authentication flow (see Authentication)
  2. Upload base64-encoded lab report documents using the POST endpoint
  3. Retrieve results either synchronously or via webhook notifications

Key Features

AI-Powered Analysis

  • Advanced OCR for PDF and image document processing
  • LOINC standard terminology for precise test result classification
  • Machine learning models for accurate data extraction and validation

Flexible Processing

  • Asynchronous processing (recommended) — Returns immediately with background processing
  • Synchronous processing — Waits for complete analysis before returning results
  • Webhook notifications for real-time status updates

Comprehensive Data

  • LOINC code mapping for standardized test identification
  • Structured sections with organized test results
  • HIPAA compliant automatic de-identification
  • Quality validation with human review flags for uncertain results

Technical Requirements

Document Specifications

  • Maximum size: 10MB when base64-encoded
  • Supported formats: PDF (preferred), JPEG, PNG
  • Input format: base64-encoded string
  • Quality: High resolution (300+ DPI) recommended for best OCR results

Processing Workflow

  1. Document Upload & Validation — System validates format compatibility
  2. OCR Processing — Extract text from PDF or image documents
  3. AI Analysis — Parse sections and identify individual test results
  4. LOINC Mapping — Map test names to standard LOINC codes when possible
  5. Validation — Flag uncertain results for human review
  6. Anonymization — Remove sensitive patient information per HIPAA guidelines
  7. Storage — Results stored with configurable retention policy

Analysis Report Data

Main Data

  • Collection and result dates
  • Original and standardized section names
  • Test-specific notes and flags
  • Processing status and error details

Test Results Structure

  • Original test names from the lab report
  • LOINC codes and common names when available
  • Numeric values with units or text values
  • Normal range indicators
  • Human review requirements

LOINC Integration

  • Sections: Mapped to panel-level LOINC codes (e.g., “58410-2” for CBC panel)
  • Individual Tests: Specific LOINC codes for each test (e.g., “6690-2” for WBC count)
  • Quality Assurance: Only confident mappings are included; uncertain mappings flagged for review

Document Guidelines

For optimal analysis results, ensure lab reports:
  1. High quality — Use clear, high-resolution scans (300+ DPI)
  2. Complete pages — Include all pages of multi-page reports
  3. Proper orientation — Ensure documents are right-side up
  4. Good contrast — Text should be clearly readable against background
  5. Standard formats — PDF preferred for text-based reports, high-quality images for scanned documents
  6. Remove artifacts — Avoid shadows, folds, or obstructions that might interfere with OCR

Implementation

For detailed implementation examples, request/response schemas, and code samples, see:

LOINC Code Support

The API supports mapping to standard LOINC terminology for both sections and individual test results. By default, mappings are only included when the confidence level is high to ensure accuracy. Uncertain mappings are flagged with require_human_review: true for manual verification. LOINC codes follow the standard 6-digit format (e.g., “6690-2”, “58410-2”) with corresponding common names.

Response Times

Response times typically range from 10 to 60 seconds depending on document complexity, quality, and the number of test results. Processing times may vary due to OCR complexity and the depth of LOINC mapping analysis. You may use asynchronous processing for better user experience during longer processing times.