Customizing a Healthcare: Medical devices to EMR pattern instance

Customization subflows

Ten main customization points are available to users of the pattern. These subflows are invoked at various stages of processing as device messages are propagated by the MedicalDeviceInput node, transformed to HL7 and delivered to the EMR. The most common requirement is to customize the HL7 observation result message, this is best achieved by changing the OnDestination subflow.

Medical Devices flow

A diagram showing the Medical Devices flow

Status customization

The OnStatus subflow is invoked when a status message is propagated from the MedicalDeviceInput node. Status messages contain device status information, warnings and errors. An example of an error message is the MedicalDeviceInput node reporting that it cannot connect to a medical device. A common use of this subflow is to send an alert if a medical device reports an error condition.

Transform and Route flow

A diagram showing the Transform and Route flow

Invalid measurement customization

The OnInvalid subflow is invoked if a device measurement is propagated with a validity other than CM_VALID . The validity element in the device message provides a confidence in the measurement from the medical device. The pattern only transforms and delivers valid device messages.

No match customization

The OnNoMatch subflow is invoked when a device message is processed which has no patient identifier. This subflow is only invoked if the Patient identifiers pattern parameter is set to something other than No patient identifiers in observation results . It is not necessarily an error condition to have device messages which do not have an associated patient identifier. For example, a device can be left switched on and continues to generate device messages, but the patient association may have been removed from the database.

Measure customization

The OnMeasure subflow is invoked for every device measurement propagated by the MedicalDeviceInput node. This subflow is invoked before the device message is transformed to HL7 so it contains the unchanged measurement from the MedicalDeviceInput node. One use of this subflow is to adjust the PrimaryId in the message to be the correct code for the EMR (for example, a LOINC code).

Sender flow

A diagram showing the Sender flow

Destination customization

The OnDestination subflow is invoked after the device message has been transformed to HL7. After this subflow is invoked, the message is written to the destination queue ready to be delivered to the EMR. This subflow is commonly used to customize the HL7 observation result message for any site-specific message requirements.

Expired customization

The Expiry time pattern parameter ensures that aged messages are not delivered to the EMR. The expiry check is done just before the transformed HL7 message is sent to the destination application. Expired messages are written to an expiry queue and discarded. This subflow is invoked with the transformed HL7 message before it is written to the expiry queue.

Finished customization

The OnFinished subflow is invoked after a transformed HL7 message is delivered and acknowledged by the destination application.

Sender customization

The OnSend subflow is invoked prior to the transformed HL7 message being sent to the destination HL7 application. The subflow provides an opportunity to make any final changes before the HL7 message is sent to the EMR.

Web Services flow

A diagram showing the Web Services flow

Service customization

The pattern provides a web service to manage the patient identifiers database. The OnService subflow is invoked for every request to this web service.

Error handling

Each main flow in the pattern has its own error handling subflow. Error messages are written to a common error queue across the pattern.

Error customization

The OnErrorQueue is called when an error has been detected and an error message is written to the error queue. The default customization subflow has no effect on the message, but you can use this subflow to build an error message that matches the specifications required by your environment.

Back to the Healthcare: Medical devices to EMR pattern specification