Processing a Message

Mirth Connect is used to communicate with Mindray eGateway.

Mindray eGateway collects the data from Mindray patient monitor and sends the HL7 data to the clients. On the CWE side, the Mirth server acts as a LLP listener and the eGateway connects to the Mirth server and sends the HL7 message.

When the eGateway send the HL7 message to the CWE Mirth server, it first checks if “msg['OBX'][0]['OBX.2']['OBX.2.1']” segment has ‘CWE’ (Code with Exception) and “msg['OBX'][0]['OBX.3']['OBX.3.2']” has ‘MDC_EVT_ALARM’. Next, it checks if it has a valid alarm reason that is configured in the ‘Deploy’ section of the script. If both are valid, then it starts further transformation and mapping.

In the transformation phase, it checks if the incoming alarm event has ‘MDC_EVT_LO_VAL_LT_LIM’ or ‘MDC_EVT_HI_VAL_GT_LIM’ or ‘MNDRY_EVT_VAL_OUTSIDE_LIM’. If the incoming alarm event has any of the three, then it gets the respective alarm reason from the ObservationCode variable and maps it to the ‘AlarmReason’ field. If the incoming alarm event is anything other than these three, then it gets the alarm from the ‘RequiredAlarmReason_Event’ array and maps it to ‘AlarmReason’ variable. Similarly, it maps the other variable that is listed in the below transformer list.

Once the mapping is done, it creates the JSON file with the required fields and sends it to the destination. In the Load Balancer environment, the destination is LLPSender and in a single instance CWE, the destination is FileWriter.

In the HL7 file, if the msg['OBX'][2]['OBX.5']['OBX.5.1'] segment of HL7 contains start of alarm and the Action field of JSON file is empty, then it is considered as a new alarm in CWE. If the msg['OBX'][2]['OBX.5']['OBX.5.1'] segment of HL7 contains end of alarm then Mirth server writes the Cancel as an Action in the JSON file. This stops the workflow in the CWE.

Note: