Bahmni LIS Integration
In late 2020 we wanted to have a similar integration of the Laboratory Information System (LIS) as it is with Picture Archiving and Communication System (PACS). This is why we took the PACS integration project as a basis of the new solution and further adopted its features to fit with LIS workflows. In addition we developed other new features. The idea is that just like PACS, LIS would be a solution that can be integrated with Bahmni EMR. We are fully aware that OpenELIS is part of Bahmni out of the box. We have used Senaite as LIS for integration, as we thought the product to be better maintained. Also a clean HL7 integration allows to use other LIS products (that might be already in place at a facility). A Mirth ESB was used to convert the HL7 messages to Senaite API requests. In this text, we describe the Integration approach using HL7 messages.
The solution works very well, so we decided it is the time to publish now. If bahmni team would like to “pull” this into the organization’s projects, this is of course more than welcome. We are open to suggestions of course
My special thanks go to @aidjali @triumf @vesakelmendi @zjashanica. Also thank you @mksd for the interesting discussions and @angshuonline for replies to some of our questions.
Let us now take a look at the project:
HL7
HL7 is a set of international standards for transfer of clinical and administrative data between software applications used by various healthcare providers. There are different versions of HL7 standards available (2.x, 3.x, FHIR), the solution we developed uses HL7 v2. For this integration, we are interested in HL7 Order Entry (ORM) messages needed to place laboratory orders from Bahmni EMR to the LIS. Furthermore, HL7 Observation Result (ORU) messages are needed to send results from the LIS to Bahmni EMR.
Workflows
Place Order
A patient is admitted to a hospital, and it is decided that a Leukocyte blood test is needed. The order can be placed from the Clinical module in the Orders tab. The figure below shows the Request Order placed in Bahmni EMR.
When the test is ordered, the order is automatically transmitted from the HIS EMR to the LIS system, using a standardized HL7 v2 ORM interface. ORM message type holds information about a request for materials or services (in our case, one or more laboratory tests on a sample). Some of the information that can be found in the message are patient data (Name, ID-number in system), who made the order (Name, UUID, Email) and the order data (Test name, Sample, UUID).
Example of an Order Entry ORM Message:
MSH|^~\&||BahmniEMR|LIS||2021072111||ORM^O01|1626865227681307|P|2.5
PID|||LAO445428||Smith^Bill||19910721000000+0000|M
PV1||O|||||||||||||||||3998ee6d-048e-4c50-8fb6-9fc5d4c91b6b|||||||||||||||||||||||||20210721105928+0000
ORC|NW|3735499d-99f3-4b35-9393-da992ac75030|||||^^^^^R|||^^BahmniEMR||c1c26908-3f10-11e4-adec-0800271c1b75^Man^Super||^^^root@example.com
OBR||||26464-8^Leukocytes|||20210721110024+0000||||||||&Blood||||||||||||||||||||||||^Leukocytes||||^Smith,Bill
Cancel Order
If the case occurs, that an ordered laboratory test is not needed anymore, it is also possible to cancel the placed order from the Bahmni UI, by using the cancel button in the “Orders” tab.
Example of an Order Cancel ORM Message:
MSH|^~\&||BahmniEMR|LIS||2021072111||ORM^O01|1626865227681307|P|2.5
PID|||DD445428||Smith^Bill||19910721000000+0000|M
ORC|CA|3735499d-99f3-4b35-9393-da992ac75030|LIS-1234
Receive Results
In the laboratory, a couple of tests are performed. Once the values have been entered into the LIS system, and are confirmed by the laboratory staff, the results are sent back to Bahmni in an HL7 ORU R01 message:
MSH|^~\&||Some^Laboratory|BahmniEMR|BahmniEMR|||ORU^R01^ORU_R01||P|2.5
ORC|RE|75739d90-1c15-46e5-b386-c56f6834904c|d88f6677d6fc4c5da53e08a6c8ad1236||||^^^^^R
OBR|1|||^Erythrocytes
OBX|1|NM|^Erythrocyte distribution width [Ratio]||8.0|||||||||20210721123459
ORC|RE
OBR|2|||^Patient Document
OBX|1|ED|^Laboratory-Report-Wed-21-Jul-2021-12-35-41-UTC.pdf^^^arreport-5.pdf||MDAwNDAxN...<PDF Result Report as Base 64>...DUwOQolJUVPRgo=|||||||||20210721123541
ORC|RE
OBR|3|||^Results Interpretation
OBX|1|TX|||This is the lab results report for Sample Blood-0001 for Patient Smith Bill
The results stored as values and the textual interpretation are extracted from the ORC segments and stored as observations. They are now visible in the patient dashboard.
The PDF report, that was stored in an ORC segment as well is saved as a patient document in the patients dashboard.