HL7

◷ Reading Time: 3 minutes

Using FlexRule HL7 extension, users can decode and Validate HL7 messages.

Health Level Seven or HL7 is a set of international standards used for transferring clinical and administrative data between software applications used by healthcare providers.

Sample HL7 message:

MSH|^~`&|ECG REPORTING|ROCHESTER|ERIS|ROCHESTER|20110621050440||ORU^R01|20110621050440|P|2.1
PID|||999999999||TEST^PATIENT||18450101|F
OBR|||211088491|0^ADULT^ROCHECG|||20110620170631|||||||||M999999^^^^^^^RACFID||||||20110621060232||EC|F|||||||M999999^LASTNAME MD^FIRSTNAME^^^^^RACFID
OBX||ST|93000.2^VENTRICULAR RATE EKG/MIN^CPT4|1|52|/SEC
OBX||ST|93000.4^PR INTERVAL(MSEC)^CPT4|2|208|MSEC
OBX||ST|93000.5^QRS - INTERVAL(MSEC)^CPT4|3|88|MSEC
OBX||ST|93000.6^QT - INTERVAL(MSEC)^CPT4|4|466|MSEC
OBX||ST|93000&PTL^PHYSICAL TEST LOCATION^CPT4|5|STMA
OBX||ST|93000&PTR^PHYSICAL TEST ROOM^CPT4|6|04254
OBX||CE|93000.17^^CPT4|7|21&101^Sinus bradycardia`T`with 1st degree A-V block^MEIECG
OBX||CE|93000.17^^CPT4|8|1687^Otherwise normal ECG^MEIECG
OBX||CE|93000&CMP^^CPT4|9|1301^When compared with ECG of^MEIECG
OBX||TS|93000&CMD^EKG COMPARISON DATE^CPT4|10|201106171659
OBX||CE|93000&CMP^^CPT4|11|1305^No significant change was found^MEIECG
OBX||TX|93000.48^EKG COMMENT^CPT4|12|9917^LASTNAME MD^FIRSTNAME
OBX||FT|93000^ECG 12-LEAD^CPT4|13|{\rtf1\ansi \deff1\deflang1033\ {\fonttbl{\f1\fmodern\fcharset0 Courier;}{\f2\fmodern\fcharset0 Courier;}} \pard\plain \f1\fs18\par 20Jun2011 17:06\par VENTRICULAR RATE 52\par Sinus bradycardia with 1st degree A-V block\par Otherwise normal ECG\par When compared with ECG of 17-JUN-2011 16:59,\par No significant change was found\par 47507`S`'LASTNAME MD`S`'FIRSTNAME \par }

After decoding the above message:

HL7 healthcare-decoding message

One it is decoded as a JSON object, you can use it in various business rules.

Define variable to store HL7 message

The variable to store the message has to be defined as a custom type, HL7.

HL7 healthcare-Define variable to store HL7 message

Input an HL7 message in JSON Composer

For debugging in FlexRule Designer, you can use the JSON Composer.
Right-click on the value and select, Edit --> Value.

HL7 healthcare-Input an HL7 message in JSON Composer

Enter the HL7 message as the value. You can copy and paste the message.

HL7 healthcare-Enter the HL7 message as the value

Sample Project

The attached sample project (HL7-Validation.zip) shows how to decode and validate an HL7 message.

Once you input the message, it will go through a decision table for validations.

HL7 healthcare-Validation

As we recommend, the expressions are added as a BoxedExpression document.

HL7 healthcare-BoxedExpression

In the end, after validating the decoded HL7 message, it shows the errors as a notification.

HL7 healthcare-Validationg the decode
Updated on September 21, 2020

Article Attachments

Was this article helpful?

Related Articles