Lab Machine Integration Guide

Step-by-step guide to connecting your laboratory analyzers to ClinicalHIS.

Overview

ClinicalHIS provides a seamless integration API that allows your laboratory machines (analyzers) to send test results directly into the system. This eliminates manual entry, reduces errors, and speeds up turn-around times.

How it works:

  1. Your Lab Machine performs the test.
  2. The machine sends data (HL7/ASTM) to a local "Middleware" computer.
  3. The Middleware converts the data to JSON and sends it to ClinicalHIS.
  4. ClinicalHIS automatically matches the result to the Patient's Sample.

Step 1: Prerequisites

Hardware

  • Laboratory Analyzer (e.g., Roche Cobas, Mindray, Sysmex)
  • A PC connected to the same network as the analyzer
  • Internet connection on the PC

Software

  • Mirth Connect (Recommended) or Iguana
    Open-source integration engine
  • Network connectivity details (IP Address & Port of Analyzer)

Step 2: Configuration Tutorial

Configuring Mirth Connect

1
Create a Channel

Open Mirth Connect Administrator and create a new channel named "ClinicalHIS Lab Upload".

2
Set Source (Listener)

Configure the Source tab:

  • Connector Type: LLP Listener (or TCP Listener)
  • Local Address: 0.0.0.0
  • Local Port: 6661 (or any free port)
  • Set your Lab Analyzer to send results to this PC's IP and Port 6661.

3
Set Destination (Sender)

Configure the Destinations tab:

  • Connector Type: HTTP Sender
  • URL: https://clinicalhis.com/api/v1/lab/integration/results
  • Method: POST
  • Headers: Content-Type: application/json

4
Data Transformation (The Magic)

In the Source Transformer, allow the raw HL7 message. In the Destination Transformer, map the HL7 fields to JSON.

// Example JavaScript Transformer in Mirth var payload = { accession_number: msg['OBR']['OBR.2']['OBR.2.1'].toString(), // Accession # machine_id: "COBAS-01", results: [] }; // Loop through OBX segments for each (var seg in msg['OBX']) { payload.results.push({ test_code: seg['OBX.3']['OBX.3.1'].toString(), value: seg['OBX.5']['OBX.5.1'].toString(), unit: seg['OBX.6']['OBX.6.1'].toString(), flags: seg['OBX.8']['OBX.8.1'].toString(), timestamp: new Date().toISOString() }); } // Set message content to JSON msg = JSON.stringify(payload);

5
Deploy

Save the channel and Click Deploy. Your channel is now listening for results from the machine and forwarding them to ClinicalHIS!

Need Help?

If you are unsure about HL7 mappings or your specific analyzer model, please contact our support team at support@clinicalhis.com. We can provide pre-built Mirth channels for common instruments.