MedConnect

MedConnect LIS Integration Guide

API Documentation & Integration Reference — Version 2.0.0

For LIS/HIS Providers

This guide provides everything you need to integrate your Laboratory Information System (LIS) or Hospital Information System (HIS) with MedConnect.

Sham Software Consultancy — 2026

1. Overview and Authentication

1.1 What is MedConnect?

MedConnect is an orchestration engine that connects medical laboratory instruments (analyzers) with Laboratory Information Systems (LIS/HIS) by abstracting device protocol complexity behind simple API interfaces. It handles protocol translation, test mapping, order routing, result delivery, and automatic retry — so HIS/LIS systems never need to understand ASTM, HL7, or device-specific protocols directly.

1.2 Communication Flow

The integration follows a three-phase workflow regardless of mode:

MedConnect Communication Flow
MedConnect End-to-End Sequence

1.3 Authentication

Bearer Token Authentication

MedConnect supports optional Bearer token authentication. When configured, MedConnect includes the token in every request:

POST /api/orders HTTP/1.1
Authorization: Bearer <your-token-here>
Content-Type: application/json
SettingRequiredDescription
Bearer TokenNoStatic token sent in the Authorization header
If the Bearer Token field is left empty, MedConnect will not send an Authorization header.

Custom Request Headers

MedConnect sends the following headers with every request for traceability:

HeaderDescription
X-Request-IDUnique UUID for each request (for log correlation)
X-Request-TimestampUTC timestamp of when the request was created
X-Expected-SampleThe sample number being queried (on order requests only)
Content-Typeapplication/json
Acceptapplication/json

1.4 Retry Behavior

MedConnect implements retry logic to handle transient failures:

ScenarioRetriesBackoff Strategy
Order retrievalUp to 3 attemptsLinear: 100ms × attempt number
Transient HTTP errors (5xx, timeout)Up to 2 additional retriesExponential: 2^n seconds
Result submission and test retrieval use a single attempt. Ensure your endpoints are reliable.

2. HTTP REST API Reference

This section documents the HTTP REST API that the LIS/HIS provider must implement. MedConnect acts as the HTTP client and calls these endpoints.

All endpoints use HTTP POST with JSON payloads.

2.1 Endpoint Summary

#Endpoint NamePurposeRequired
1Tests APIRetrieve available LIS tests for mappingYes
2Orders APIRetrieve order details by sample numberYes
3Results APISubmit test resultsYes
4Processed APINotify LIS that an order was processedNo

2.2 Tests API

Used by MedConnect to search and retrieve the LIS test catalog. This enables test mapping between instrument test codes and LIS test codes.

Request

POST <LabTestsAPI URL>
Content-Type: application/json
Authorization: Bearer <token>
FieldTypeRequiredDescription
NamestringNoTest name search filter (partial match)
CodestringNoTest code search filter (partial match)
{"Name": "", "Code": "cbc"}

Response

FieldTypeRequiredDescription
IDstringYesUnique LIS test identifier
NamestringYesHuman-readable test name
CodestringYesLIS test code
TypestringNoSample type for this test
{"tests": [{"ID": "101", "Name": "COMPLETE BLOOD COUNT (CBC)", "Code": "CBC", "Type": "EDTA Whole Blood"}]}

2.3 Orders API

Used by MedConnect to retrieve order details for a specific sample. MedConnect sends this request when an instrument scans a barcode.

POST <TransactionInfoAPI URL>
Content-Type: application/json
X-Request-ID: <unique-uuid>
X-Expected-Sample: <sample-number>
FieldTypeRequiredDescription
SampleNumberstringYesThe barcode/sample number to look up
allTestsstringNoSend "1" to retrieve all tests. Only relevant when Processed API is also used.
{"SampleNumber": "2071720201"}
The SampleNumber in the response must match the SampleNumber in the request. If they differ, MedConnect will reject the response and retry.

2.4 Results API

Used by MedConnect to submit completed test results to the LIS.

POST <ResultAPI URL>
Content-Type: application/json
FieldTypeRequiredDescription
SampleNumberstringYesSample number the result belongs to
TestCodestringYesLIS test code
SubTestCodestringNoLIS sub-test code (used for panel components)
ResultstringYesThe test result value
{"results": [{"SampleNumber": "2071630101", "TestCode": "15/11012", "SubTestCode": "", "Result": "36.19"}]}

2.5 Processed API (Optional)

Used by MedConnect to notify the LIS that an order has been accepted and processed by the instrument. This allows the LIS to track order status and prevent duplicate processing.

POST <OrderCompletedAPI URL>
Content-Type: application/json
FieldTypeRequiredDescription
SampleNumberstringYesThe processed order sample number
TestsstringYesJSON-serialized array of test IDs that were processed
{"SampleNumber": "2071720201", "Tests": "[\"100\",\"102\",\"300\"]"}

2.6 Local API Server (Incoming Push)

MedConnect can optionally run a local HTTP server to receive order pushes from the LIS. This is useful for LIS systems that prefer to actively push orders rather than waiting for MedConnect to poll.

POST http://<LocalAPIAddress>:<LocalAPIPort>/api/getSampleData
Content-Type: application/json
StatusCondition
422Order data is missing or empty
404Unknown route
405Wrong HTTP method (only POST is accepted)
500Internal server error
The local API server requires administrator privileges to run and bind to the specified address/port.

2.7 Error Handling

HTTP Error Response Format

When the LIS returns an error, MedConnect expects the following JSON structure:

{"message": "Description of what went wrong", "errors": ["Detailed error 1"]}

HTTP Status Codes

CodeMeaningMedConnect Behavior
200SuccessProcess response normally
400Bad RequestFail with error message
401UnauthorizedFail (check Bearer token)
404Not FoundFail — endpoint URL is incorrect
408Request TimeoutRetry (up to 2 additional attempts)
5xxServer ErrorRetry with exponential backoff
Transient errors (5xx, 408) trigger automatic retries with exponential backoff. Non-transient errors (4xx) fail immediately.

3. Reference Data

This section defines the standard code tables, enumerations, and data dictionaries used across the MedConnect API.

3.1 Sample Types

ValueDescription
EDTAEDTA anticoagulated whole blood
SerumSerum (clotted blood, no anticoagulant)
PlasmaPlasma (heparin, citrate, etc.)
UrineUrine sample
CSFCerebrospinal fluid
Whole bloodWhole blood (no anticoagulant)
OtherOther / unspecified

3.2 Test Mapping

Test mapping is the process of linking LIS test codes to instrument (device) test codes. This is a critical setup step.

Test Mapping Diagram

Mapping Process:

  1. MedConnect calls the Tests API to retrieve the LIS test catalog
  2. The operator maps each LIS test to the corresponding instrument test in the MedConnect UI
  3. This mapping is stored internally and used for converting test codes between LIS and instruments

4. Examples and Workflows

4.1 Interactive API Examples — Postman Collection

A complete, ready-to-use Postman Collection is provided alongside this document:

File: MedConnect_LIS_API.postman_collection.json

The collection includes every API endpoint with realistic request/response bodies, authentication headers, and environment variables.

4.2 Complete Integration Workflow

The end-to-end integration follows four sequential steps:

  1. Test Mapping — Retrieve Test Catalog: MedConnect calls the Tests API to retrieve the LIS test catalog. The operator then maps each LIS test to the corresponding instrument test.
  2. Order Retrieval — Get Order by Barcode: When an instrument scans a barcode, MedConnect queries the LIS for order details.
  3. Result Submission — Send Results to LIS: After the instrument completes testing, MedConnect submits results to the LIS.
  4. Mark Order as Processed (Optional): Notify the LIS that the order has been accepted and processed by the instrument.
End-to-End Integration Sequence