Case Study - Efficient Health Record Data Processing with NodeJS and HL7 Parser

Type
Case Study
Year
Category
Healthcare System, NodeJS Service, Container Applications

In a healthcare environment, all patient information is entered directly into a Hospital Information System (HIS) or Electronic Medical Record (EMR). Electronic health records were created to make information travel between hospitals, doctors, and patients easier and more reliable.

Health Level Seven, abbreviated to HL7, is a range of global standards for the transfer of clinical and administrative health data between applications with the aim to improve patient outcomes and health system performance. HL7 standards were developed to help healthcare institutions get helpful digitalization and better interoperability between different systems.

Information sent using the HL7 standard is sent as a collection of one or more messages, each of which transmits one record or item of health-related information.

This implementation is part of a larger Healthcare system. In the context of the whole application, HL7 is the main source of data. To give a high-level understanding, we were able to ingest and process over 500 HL7 records Per Minute.


Although, this example shows only information related to HL7 events, we have a similar solution for the Nurse call data as well, it's very likely that a hospital has different systems for Health records and Nursing events.

At the raw level, the HL7 record looks like the below example, this event represent a Patient Admit record (ADT A01) for the hospital. ADT messages are one of the most widely-used and high volume HL7 message types, as it provides information for many trigger events including patient admissions, registrations, cancellations, updates, discharges, patient data merges, etc. :

MSH|^~\&|MegaReg|XYZHospC|SuperOE|XYZImgCtr|20060529090131-0500||ADT^A01^ADT_A01|01052901|P|2.5
EVN||200605290901||||
PID|||56782445^^^UAReg^PI||KLEINSAMPLE^BARRY^Q^JR||19620910|M||2028-9^^HL70005^RA99113^^XYZ|260 GOODWIN CREST DRIVE^^BIRMINGHAM^AL^35209^^M~NICKELL’S PICKLES^10000 W 100TH AVE^BIRMINGHAM^AL^35200^^O|||||||0105I30001^^^99DEF^AN
PV1||I|W^389^1^UABH^^^^3||||12345^MORGAN^REX^J^^^MD^0010^UAMC^L||67890^GRAINGER^LUCY^X^^^MD^0010^UAMC^L|MED|||||A0||13579^POTTER^SHERMAN^T^^^MD^0010^UAMC^L|||||||||||||||||||||||||||200605290900
OBX|1|NM|^Body Height||1.80|m^Meter^ISO+|||||F
OBX|2|NM|^Body Weight||79|kg^Kilogram^ISO+|||||F
AL1|1||^ASPIRIN
DG1|1||786.50^CHEST PAIN, UNSPECIFIED^I9|||A

For more detail, refer to this extensive documentation from Caristix.

We have built a small utility that converts the HL7 raw messages into JSON for easier processing.

http://hl7tojson.com.s3-website.ap-south-1.amazonaws.com/

Technology Stack

NodeJS

NodeJS is our go-to technology for building scalable, high-performance applications. Its non-blocking I/O and event-driven architecture make it ideal for handling multiple data streams concurrently, ensuring efficient processing.

Our current system runs as micro-services with Docker Compose, Docker Swarm or Kubernetes cluster. Our entire system is using JavaScript from front-end React components, NodeJS backend, React Native mobile applications, etc.

HL7 Parser

The HL7 Parser is essential for receiving and interpreting health records in HL7 format, a widely adopted standard in the healthcare industry for the exchange of information.

We are using this base library as a receiver and parser of the HL7 record data - https://github.com/AppGambitStudio/simple-hl7. The base library is modified to support custom acknowledgements.

Once we receive the data, we push the data into local queue so that we can acknowledge (ACK response) back to the origin system. This receive-queue-respond mechanism allows us to receive and durably store the messages for further processing, while also responding the main system promptly.

One of the most important task of our receiver process is to receive, parse, mask (redact) and store only required information. We DO NOT store information that is not needed for our system, and immediately purge it from memory.

Once the HL7 data is parsed, we transform the message based on the application template structure and store into the MongoDB database for further processing.

MongoDB (Percona)

For secure and efficient data storage, we use MongoDB with Percona. This combination allows us to store data in a masked and secured manner, protecting sensitive information and ensuring compliance with data privacy regulations.

One of the best feature of Percona for MongoDB is it's Encrypted WiredTiger Storage Engine. It provides data-at-rest encryption with optional KMIP and Hashicorp Key Vault integration.

Solution Highlights

1. Concurrent Data Processing

One of the key advantages of using NodeJS is its ability to handle multiple tasks simultaneously. This is particularly beneficial for processing large volumes of health data, as it allows us to manage multiple data streams without any bottlenecks. Our application can receive, parse, and store health records concurrently, significantly improving processing times.

2. Secure Data Storage

Security is paramount when dealing with health records. We store all data in a Percona-based MongoDB database, applying data masking techniques to protect sensitive information. This ensures that patient data is always secure and complies with data privacy regulations such as HIPAA.

3. Internal Access Only

To further enhance security, we restrict access to the stored data through our internal systems only. This adds an extra layer of protection, preventing unauthorized access and ensuring that only authorized users can interact with the data. All the data are stored with masked PII to ensure privacy.

Key Benefits

Scalability

Our solution is designed to scale easily. As the volume of health data varies from hospital to hospital, our NodeJS service can handle the additional load without compromising performance. This scalability is crucial for the application to manage growing amounts of data efficiently.

Security

By masking sensitive data and restricting access to internal systems, we ensure that patient information is always secure. Our approach complies with data privacy regulations, giving hospital IT team peace of mind that their data is protected.

Efficiency

The concurrent processing capabilities of NodeJS allow us to handle large volumes of health data quickly and efficiently. This reduces latency and ensures that the system have access to the information they need in real-time.

Summary

At APPGAMBiT, we're always excited to provide innovative solutions that meet the needs of the industry. Our NodeJS-based application for processing health records is a great example to this commitment, offering a scalable, secure, and efficient way to manage large volumes of data.

Stay tuned for more updates on our solutions and how we're using technology to drive improvements in healthcare.

View All

Building Effective Minimum Viable Product (MVP) using AWS and Serverless

At APPGAMBiT, we have been building AWS Serverless-based Cloud applications for many years now. Over the years, we have found that the most critical factors for an MVP are: Faster Time to Market, Cost and Reliability. One of the reasons, why we prefer to use AWS Serverless services, if they are applicable, because Serverless infrastructure and Event-driven architecture can fulfill these effectively and we can build a strong foundation as well.

Read more

How to Avail AWS Credits for Startups and Early-Stage Businesses

Here's a comprehensive list of ways startups and early-stage businesses can avail extra AWS credits.

Read more

Tell us about your project

Our office

  • 408-409, SNS Platina
    Opp Shrenik Residecy
    Vesu, Surat, India
    Google Map