Laboratories (HL7 v2)
Collect lab orders (ORM^O01)
Laboratories fetch new orders as HL7 ORM^O01 messages.
GET
/api/hl7/ordersScope hl7.readReturns every open laboratory order as an ORM^O01 message (separated by a blank line), oldest first, up to 200. The X-Order-Count header gives the number.
Poll every few minutes with mark_sent=1: the orders you receive are marked as sent, so the next call only returns new ones.
GET /api/hl7/orders
curl "https://system.clinicview.co.za/api/hl7/orders?status=ordered&mark_sent=1" \
-H "Authorization: Bearer $CLINICVIEW_API_KEY" \
-H "Accept: x-application/hl7-v2+er7"MSH|^~\&|CLINICVIEW|0123456|LANCET|LANCET|20261124211053+0200||ORM^O01^ORM_O01|ORM2b4d6f8a0c2e4a6c|P|2.5.1
PID|1||P000123^^^CLINICVIEW^MR~9004120123081^^^ZAF^NI||Mokoena^Thandi||19900412|F
ORC|NW|2b4d6f8a-0c2e-4a6c-9e8b-7d9f1b3d5f99^CLINICVIEW||||||||||3a9d2f4b-6c1e-4f8a-b2d7-5e0c9a1b3d22^Dr Naledi Dlamini
OBR|1|2b4d6f8a-0c2e-4a6c-9e8b-7d9f1b3d5f99^CLINICVIEW||^HbA1c|R|20261124095700+0200|||||||Known hypertensive||||3a9d2f4b-6c1e-4f8a-b2d7-5e0c9a1b3d22^Dr Naledi Dlamini
OBR|2|2b4d6f8a-0c2e-4a6c-9e8b-7d9f1b3d5f99^CLINICVIEW||^Lipid panel|R|20261124095700+0200|||||||Known hypertensive||||3a9d2f4b-6c1e-4f8a-b2d7-5e0c9a1b3d22^Dr Naledi DlaminiParameters
statusstring · queryComma-separated:
ordered,collected(default both).Example:
orderedmark_sent1 · query1marks the returned orders as sent.Example:
1
Responses
- 200The orders (empty body when there are none).Headers:
X-Order-CountX-RateLimit-Remaining - 401Missing or invalid key (plain text).
- 403Key lacks hl7.read, or API access is not in the plan.
- 429Rate limit; see Retry-After.