Lab data extraction

LabExtract

A model that turns photos, scans and PDFs of lab results into structured medical data — LOINC-coded and delivered in the HL7 FHIR standard, ready to feed HIS and medical record repositories.

100% On-PremiseHL7 FHIR R5LOINC codes
Request a LabExtract demo
A blood count printout processed by LabExtract into a structured table with values, reference ranges and LOINC codes

Model Description

Every laboratory prints results differently — different table layouts, different test naming, different ways of writing reference ranges. Classic OCR needs a template for every printout, and every format change breaks the integration. LabExtract reads the document the way a person does and needs no configuration for a new laboratory.

The model transcribes the document instead of interpreting it: “< 5.0” stays a value with its operator, decimal separators are not silently changed, ↑/↓ flags and units like ×10³/µl are preserved exactly, and gaps are never filled with guesses. The extraction is a faithful digital transcript of the source document.

In Poland, every laboratory also maintains its own test dictionaries and codes, which makes results from different sources hard to compare. That is why LabExtract assigns each parameter a LOINC code verified against the official registry — “Leukocytes”, “WBC” and “White blood cells” become one parameter — and delivers everything as HL7 FHIR R5 Observations, ready for the HIS or the medical record repository.

How LabExtract works

01
Document
A photo, scan, multi-page PDF or HTML table — including smartphone shots. Rotated frames are straightened automatically.
02
Faithful transcript
The model reads sections, tests, values, units, reference ranges and flags — exactly as printed, without guessing missing data.
03
Standard and integration
Parameters receive LOINC codes confirmed against the official registry, and the result reaches your HIS or EDM repository as HL7 FHIR R5.

Verification instead of retyping

94%
values read correctly
internal evaluation on real lab reports from different Polish laboratories

LabExtract does not replace the person responsible for the data — it changes their job from retyping to verification. The model fills in the whole table; the reviewer compares it against the document and corrects individual fields. That is many times faster than typing every result in from scratch.

Verification itself is easy because of how the model works: LabExtract never adds anything of its own. Tests it cannot read reliably are reported as missing — there are no silent guesses to hunt for.

Patient results stay on your servers

LabExtract runs entirely on your organization's infrastructure — as a single service, on a server with or without a GPU. Documents with patient results are processed locally and never leave your network, which simplifies GDPR compliance and healthcare security requirements.

Key Features

Any printout format
The model reads the document layout — sections, tables and test panels — so it needs no templates configured per laboratory.
Faithful transcript, not interpretation
“< 5.0” values, decimal separators, ↑/↓ flags and units like ×10³/µl are preserved exactly. Missing fields stay empty — the model does not guess.
Verified LOINC codes
Parameter names are confirmed against the official LOINC registry rather than generated — the same test from different labs gets the same code.
HL7 FHIR R5 output
Each parameter becomes an Observation resource with value, reference range and interpretation, ready for your HIS or EHR. Plain JSON is also available.
Multi-page documents
PDFs are processed page by page and test sections merged into one consistent result — even for large test panels.
Built for Polish documentation
Polish test names, decimal commas, descriptive results (“negative”) and sex-dependent reference ranges are handled natively.

Extracted Data

Test name and section
The parameter together with the printout section it comes from
White blood cells (WBC) · Hematology > CBC
Result value
Exactly as printed — including operators and descriptive results
6.24 · < 0.60 · negative
Unit of measure
In the laboratory's original notation
G/l · ×10³/µl · mg/dl · %
Reference range
Lab norms, including descriptive or sex-dependent ones
3.50 — 10.00 · < 5.00 · women: 12—16
Result flag
Out-of-range markers, mapped to FHIR interpretation codes
↑ · ↓ · H · L · *
LOINC code
With the official name fetched from the LOINC registry
6690-2 · 718-7 · 777-3

Supported Formats

PDF
Including multi-page test panels — pages are merged into a single result
Photos (JPG/PNG)
Including smartphone photos — rotated shots are straightened automatically
Scans
Scans of paper printouts, including older archives
HTML
Results from lab portals and systems that return HTML tables

Use Cases

  • Digitizing paper archives of lab results — including publicly funded digitization projects (KPO, FEnIKS)
  • Feeding HIS and medical record (EDM) repositories with results from external laboratories — without manual retyping
  • A single timeline per parameter for each patient, even when tests come from different labs
  • Accepting results from patients as smartphone photos, e.g. in telemedicine
  • Building medical registries and research datasets from source documents

Business Benefits

Hospitals and clinics
Results from external laboratories and paper archives reach the HIS and the EDM repository as data, not scans — a complete patient history without manual retyping.
Lab networks and outpatient chains
Tests ordered from subcontractors come back in different formats — LabExtract brings them into one shared LOINC dictionary, so parameters are comparable regardless of who ran the test.
HIS, LIS and health app vendors
A ready-made extraction engine to embed in your own product via a REST API — without the cost of building and maintaining your own AI models.
Document digitization projects
In publicly funded digitization programmes, manual retyping is the biggest cost of digitizing an archive — automated extraction turns a scan into a full data record.

FAQ – Frequently Asked Questions

API Integration

Models are available as a REST API service or for local deployment within hospital infrastructure. We provide documentation and integration support.

labextract_example.sh
bash
curl -X POST https://api.medalion.tech/v1/labextract/fhir \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@lab_results.pdf" \
  -F 'options={"loinc_lookup": true}'

# → a list of FHIR R5 Observation resources:
#   values, units, reference ranges,
#   interpretations and LOINC codes
Get started today

See LabExtract on your own documents

The best test of the model is your own printouts. Get in touch — we will show the extraction on sample results and discuss an on-premise deployment or API access.