Skip to main content
Integrating with Lab Reports API Lab Reports Overview
About
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
Get an access token using the authentication flow (see Authentication )
Upload base64-encoded lab report documents using the POST endpoint
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, GIF, WEBP
Input format — base64-encoded string
Quality — high resolution (300+ DPI) recommended for best OCR results
Processing Workflow
Document upload & validation — a system validates format compatibility
OCR processing — extract text from PDF or image documents
AI analysis — parse sections and identify individual test results
LOINC mapping — map test names to standard LOINC codes when possible
Validation — flag uncertain results for human review
Anonymization — remove sensitive patient information per HIPAA guidelines
Storage — results stored with a 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 are flagged for review
Document Guidelines
For optimal analysis results, ensure lab reports:
High quality — use clear, high-resolution scans (300+ DPI)
Complete pages — include all pages of multipage reports
Proper orientation — ensure documents are right-side up
Good contrast — text should be clearly readable against a background
Standard formats — PDF preferred for text-based reports, high-quality images for scanned documents
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 have the structure of 3–10 digits with the check digit preceded by a hyphen (e.g., “6690–2”). Each code is accompanied by a corresponding common name.
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 a better user experience during longer processing times.