AnpherosAnpheros PlatformDevelopers

Anpheros Platform

One global health record network for clinics, hospitals and developers

Patient-controlled records that follow people across borders. Built on open standards: FHIR R4, IPS, SMART Health Links.

Try it freeConnect your clinicFree sandbox · no card

Lab connector

Send a whole laboratory report as CSV, HL7 v2 ORU^R01 or JSON and get laboratory Observations with LOINC codes and reference ranges.

A laboratory (or anyone holding a lab report) sends the whole report in one request and the platform turns every result into a laboratory Observation of the patient:

POST /v1/patients/{patient_id}/labs/import
Authorization: Bearer <project key>
Content-Type: text/csv | x-application/hl7-v2+er7 | application/json
X-Anpheros-Source-System: labx        (optional; recorded in Provenance)
Idempotency-Key: <report id>          (optional; a retry returns the same answer)

Formats

CSV with a header row; separators , ; or tab, decimal comma accepted, dates ISO, DD.MM.YYYY or DD/MM/YYYY. Recognised columns (Romanian or English): marker (analiza, test, marker, name) — or only a LOINC code column, in which case the LOINC name becomes the marker — value (rezultat, valoare, value, result), unit (um, unitate, unit), reference range (interval, referinta: 70-100, <5, >3.5) or ref_low/ref_high, date (data, recoltare), optional LOINC (loinc, code), note.

Analiza;Rezultat;UM;Interval de referinta;Data
Hemoglobina glicozilata (HbA1c);6,4;%;4,0-5,6;01.09.2026
TSH;2,1;mUI/L;0,4-4,0;01.09.2026

HL7 v2 ORU^R01 (ER7 text, segments separated by CR or LF): OBX-3 identifier (code^text^LN is LOINC; a local code (^L, ^99zzz) or any other coding system is kept as the lab's own code under urn:anpheros:lab-code), OBX-5 value (NM, SN, or text), OBX-6 unit, OBX-7 reference range, OBX-8 abnormal flag → interpretation, OBX-11 status, OBX-14 or OBR-7 date; OBR-3/MSH-10 become the report id in Provenance.

The laboratory. Each result names who produced it in performer, as the HL7 Europe Laboratory Report 2.1.0 requires: the organisation you act for (X-Anpheros-Acting-As), otherwise MSH-4 (sending facility) for HL7, or laboratory in JSON (top level or per item). A CSV carries no laboratory; such results validate with a missing performer, which is the truth.

Text reports, documents and missing dates. A text report sent one line per OBX (TX/FT, same OBX-3) becomes one result with the lines joined. A whole document in OBX-5 (ED, or any value encoded Base64) is not stored as a result; the response warns and the document belongs in /documents. Without OBR-7, results are dated by OBR-14 (specimen received), with a warning.

Times and time zones. A v2 time without a time zone is the sender's local time, not UTC. The offset sent with OBX-14/OBR-7 (20260901081000+0300) is kept (2026-09-01T08:10:00+03:00). Without one, the offset of MSH-7 is used and a warning says so; with no offset anywhere, the result keeps only its date, also with a warning. CSV times (01.09.2026 08:10) carry no time zone, so they are stored as dates only. Until 17 October 2026 such times were labelled UTC; results imported then keep their identifiers and are still recognised when a report is sent again.

HL7 results that are still pending (OBX-11 I), unobtainable (X), deleted (D) or wrong (W), and OBX segments without a value, do not become Observations; each is named in warnings.

JSON: {"date": "2026-09-01", "origin": "report-77", "laboratory": "Synevo", "items": [{"marker": "TSH", "value": 2.1, "unit": "mUI/L", "ref_low": 0.4, "ref_high": 4.0, "date": "2026-09-01", "code": "3016-3"}]}.

What you get back

{"created": 3, "skipped": 0, "unmapped": ["Marker foarte rar"], "warnings": [],
 "observations": [{"id": "…", "marker": "TSH", "code": "3016-3", "system": "http://loinc.org", "value": 2.1, "unit": "mUI/L", "date": "2026-09-01"}]}

Both SDKs: labs.importCsv, labs.importHl7, labs.importItems.

A worked example from a CSV and an HL7 v2 report to FHIR Observations, with unmapped markers and resent reports: How to import laboratory results into a FHIR record.

How lab data moves between laboratories, clinics, apps and AI, and what to look for in a lab results API: Laboratory results API.

Ask your AI

Paste this into Claude, ChatGPT, Cursor or Claude Code. Your assistant reads this guide and adapts it to your code.

Read https://developers.anpheros.com/guides/lab-connector.md and help me apply this guide to my own project. Use the Anpheros sandbox (base URL https://platform.anpheros.com) with my API key from the ANPHEROS_KEY environment variable, never written in the code. Give me complete, runnable code, the response I should expect, and how to fix the errors in https://developers.anpheros.com/guides/troubleshooting.md if a call fails.

Try it free in the sandbox · first FHIR call in 5 minutesFree · 30 synthetic patients · no cardYour first API call in 2 minutes →

Product updates by email

New features, guides and the end of the beta. One email a month at most.

Send me occasional Anpheros Platform updates by email (new features, API changes, guides). I'll confirm by email and can unsubscribe in one click from any email. Privacy