This is an article outlining how PACS-integration was implemented on our local OpenMRS + Bahmni based hospital system. It may also help outline how Bahmni pacs-integration works in general. It is also my hope to be able to get feeback about this process, and to hopefully contribute to discussion about how pacs-integration is done in openmrs in general.

Outline

  1. Hospital Setting
  2. Hospital Systems
  3. PACS Integration Goals
  4. Default Integration
  5. Customized Integration
  6. PACS Processes
  7. Screenshots

Hospital Setting

Our local hospital setting is a small hospital for chest diseases / TB sanitorium. The hospital has an outpatient clinic seeing roughly 100 patients per day, as well as approximately 15-20 inpatients on average.

Being a hospital for chest diseases, many patients have a chest X-ray taken. Prior to around 4 years ago, the hospital used a non-digital record keeping system (other than a standalone X-ray storing and viewing station). We have been running a Bahmni-based system since 2017. The hospital has historically had limitted IT staff and support.

Hospital Systems

When we began EMR integration 4 years ago, it was helpful to think of at least 3 main digital systems which could be in place.

Other systems include the lab and pharmacy systems, but these aren’t included here for berevity.

PACS System

PACS Integration Goals

Our PACS integration was guided by a number of wishes / goals. Some of the wishes were:

  1. X-ray DICOM files from prior to 2017 should be loaded into the PACS system, and doctors should have the ability to find and view these X-rays.
  2. It should be possible for a Radiologist to review X-ray images and provide a radiologist note.
  3. It is nice if X-rays can continue to be taken without placing an order in the EMR system, in case the EMR system goes offline or has technical problems.
  4. It is helpful if the hospital can continue to use its existing accession number system, where an accession number is assigned to X-rays by hand at the modality.

In addition to the goals of the PACS system, integration with the EMR could also provide a number of useful features to streamline hospital workflows. These EMR features include:

  1. Doctors can order X-rays.
  2. Doctors can provide a note for the X-ray technician.
  3. X-rays taken by technician can have EMR data pre-filled (for consistent name spelling, etc).
  4. A radiologist can view and attach a radiologist note to the X-ray.
  5. Doctors can see a list of X-rays for a given patient.
  6. Doctors can view X-rays and see attached radiology notes.

Default Integration

Some of the above goals are provided by the default Bahmni configuration, but not all. The following outlines the basic structure of the default integration:

Default PACS Integration

  1. When a doctor orders a PACS image, the order is stored in the OpenMRS database, and an order is sent to the X-ray system.
  2. The X-ray order can be fulfilled by the X-ray technician and the X-ray is stored in the PACS system.
  3. When the doctor views PACS images for a patient, a list is generated using the orders in the OpenMRS database. Each image has a link generated based on the order number.
  4. Once the X-ray order is fulfilled, the link becomes ‘live’ and will allow the doctor to open and view the X-ray.

Some challenges for us with this method are:

For these reasons it seemed necessary to make some customizations to the pacs integration system.

Customized Integration

A primary modification in our customized integration is to provide an extra functionality in Bahmni to retrieve patient images directly from the PACS system. This is done using a DICOM query, and is used to generate the list of PACS images for a given patient on the patient dashboard.

Proposed PACS Integration

Rather than only depending on the orders in the OpenMRS database, we query the PACS sytem and match images to their associated OpenMRS order, and combine them into a single list. Then the link to view the X-ray can be generated using the PACS study uuid. This provides a few benefits:

A second modification of our integration is adding the ability for a radiologist to attach a radiologist note to a PACS image in Bahmni. This is done using a separate Bahmni app (ie link on home screen) where the radiologist can see X-Rays for each day, and enter a note if desires. The note is stored as an observation concept group, containing a reference to the external PACS resoure using the PACS uuid, and the observation note. These notes are then visible to doctors via the Clinical app display control.

The process of retrieving X-Ray orders / images for a patient then involves 3 inputs: OpenMRS pacs orders, external PACS images (queried from the PACS system), and OpenMRS Radiology Notes observations. This is shown in the following diagram:

Combining Orders and PACS Images

PACS Processes

The entire PACS integration system can seem fairly complicated. I will attempt here to outline the PACS integration system and processes. Note that this system is the same as the default Bahmni integration apart from some customizations and the extra DICOM query in steps 7 and 8.

PACS Setup Overview

  1. At the beginning of the process, a doctor places an X-ray order, selecting the appropriate procedure code. The order is then stored with the patient encounter in the OpenMRS database.
  2. The OpenMRS atomfeed module publishes the new patient encounter along with the X-ray order. The pacs-integration service continually queries the OpenMRS atomfeed, and when it detects the event it uses the acquired information to construct and send an HL7 order to the PACS system.
  3. The PACS system (dcm4chee) converts the HL7 order into a DICOM Modality Worklist item, filling in the DICOM fields using the conversion file orm2dcm_bahmni.xsl as configured in DCM4CHEE. The conversion file also assigns a uuid to the DICOM order/study. We construct this uuid as: {organization prefix}.{datetime}.{order number}.
  4. The X-ray modality regularly polls the PACS system for MWL items. When the patient arrives at the X-ray station, the X-ray technician selects the MWL order for the patient, which pre-fills a number of fields for the X-ray, such as the Patient ID. In our system, the X-ray technician also enters an X-ray accession number according to a seperate hand-written record.
  5. Once the X-ray is taken, it is sent by the Modality via DICOM to the PACS server.
  6. The PACS server stores the image, and sends a message to itself using emulated MPPS in order to mark the MWL as completed.
  7. The doctor’s client Bahmni frontend can be either refreshed or set up to poll for new X-ray images for the patient. Information about patient X-Rays is queried using an OpenMRS module ‘pacsquery’ which accepts a URL-based request, and performs a corresponding server-side DICOM query. The results are constructed into a JSON response which is sent back to the Bahmni frontend. This response is combined with a query of OpenMRS orders and radiology notes observations. Using these, a list of PACS images and pending orders is created, and for each PACS image a link is created to open the X-ray in a PACS viewer web application. We are using the OHIF Viewer.
  8. Using the Radiology app, a radiologist can view all of the PACS images for a given day. They can open an X-ray for vieweing, and they can also open the patient dashboard to see the patient history and previous PACS images. They can attach a radiologist note to the PACS image to be viewed by the doctors.

Screenshots

Radiology App Link

Radiology App: List of daily PACS images

Radiology App List

Radiology App: X-Ray Study Notes

Radiology App Image

Patient Dashboard

Patient Dashboard