Presentation is loading. Please wait.

Presentation is loading. Please wait.

Clinical Data Exchange using HL7 and Mirth Connect Lecture 14 - DICOM connectors - Encoding/decoding Base64 data - Message Attachments - System Events.

Similar presentations


Presentation on theme: "Clinical Data Exchange using HL7 and Mirth Connect Lecture 14 - DICOM connectors - Encoding/decoding Base64 data - Message Attachments - System Events."— Presentation transcript:

1 Clinical Data Exchange using HL7 and Mirth Connect Lecture 14 - DICOM connectors - Encoding/decoding Base64 data - Message Attachments - System Events - Import/Export Siv Raman, MD, MS

2 2 DICOM Connectors  DICOM: Digital Imaging and Communications in Medicine (http://medical.nema.org/ and http://en.wikipedia.org/wiki/DICOM)http://medical.nema.org/http://en.wikipedia.org/wiki/DICOM  DICOM is both a binary file format and communications protocol (over TCP/IP)  The DICOM file format contains data other than image data (e.g., patient data)  DICOM Listener and DICOM Sender connectors available in Mirth Connect  Receive/send DICOM messages over DICOM protocol  All protocol attributes supported  The DICOM Header information is available in Inbound/Outbound Message Templates as XML  This DICOM Header information is automatically generated when opening a DICOM message as a message template  Images can be viewed in the Mirth Connect Administrator on the Attachments tab in the Message View

3 3 DICOM Connectors, cont.  Raw message is Base64 code representing binary DICOM data  DICOM Sender:  Use the DICOM Message Raw Data destination mapping in the template field to write out DICOM data  Creates a Response Map variable with the message "DICOM message successfully sent“  Currently, the DICOM Connectors work best with uncompressed DICOM data.  Sample DICOM data downloaded from ftp://medical.nema.org/medical/dicom/ (from the /medical/Dicom/DataSets/WG04 folder) ftp://medical.nema.org/medical/dicom/ =============================================  Base64 encoding (http://en.wikipedia.org/wiki/Base64)http://en.wikipedia.org/wiki/Base64  Base64 is a group of similar encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation.  The Base64 term originates from a specific MIME (Multipurpose Internet Mail Extensions ) content transfer encoding. ================================================  Open-source software for working with DICOM: http://ginkgo-cadx.com/en/ http://ginkgo-cadx.com/en/

4 4 Encoding and Decoding Base64 data  Binary data can be added to messages using Base64 encoding  Base64 is a MIME content transfer encoding scheme that represents data using alphanumeric characters  E.g. NDAuMTAwMDguNS4xLjQuMS4xLjcAAgADAFVJMAAxLjMuNi4xLjQuMS41OTYyLjEuMS4xNC4xLjEu MjAwNDA4MjYxODUwNTkuNTQ1NwACABAAVUkUADEuMi44NDAuMTAwMDguMS4yLjEAAgASAFVJEgAx LjMuNi4xLjQuMS41OTYyLjICABMAU0gKAERDVE9PTDEwMCACABYAQUUIAENMVU5JRTEgCAASAERB CAAyMDA0MDgyNggAEwBUTQYAMTg1ODU2CAAUAFVJEgAxLjMuNi4xLjQuMS41OTYyLjMIABYAVUka  File Reader and File Writer connectors support binary data files  File Reader automatically converts incoming binary data to Base64  Use a Preprocessor script to put Base64 data into XML structure  By default, the message variable is Base64 data  File Writer automatically converts outbound Base64 data to binary

5 5 Encoding and Decoding Base64 data, cont.  In JavaScript context:  Call FileUtil.encode() to encode binary data  Takes a byte array as the parameter and returns a String  Available as "BASE-64 Encode Data" code template from the Reference tab (Utility Functions category)  Call FileUtil.decode() to decode Base64 data  Takes a String as the parameter and returns a byte array  Available as "Decode BASE-64 Data" code template from the Reference tab (Utility Functions category)

6 6 Encoding and Decoding Base64 data, cont.  Base64 data can be embedded into HL7 messages (e.g. in Z segment, OBX segment)  When embedding Base64 data into HL7 messages, many systems require linefeed characters to be escaped  For example: \X0A\  To do this escaping, use the String object's replace() function to do a global replace using a regular expression match for the newline  Example: base64dataString.replace(/\n/g, "\\X0A\\")  When extracting Base64 data from inbound HL7 messages, if the linefeed characters are escaped, replace the escape sequences with actual linefeed characters  To do this, use the String object's replace() function to do a global replace using a regular expression match for the escaped characters  Example: base64dataString.replace(/\\X0A\\/g, "\n")

7 7 Encoding and Decoding Base64 data, cont.  If linefeed characters in the inbound message are not escaped, disable the convert LF to CR option on the inbound message template for all connectors that handle the Base64  Or use a preprocessor script to strip out the linefeed characters  This needs to be done so that the HL7 parser does not try to interpret lines of Base64 code as segments

8 8 Message Attachments  Base64-encoded data in messages can be temporarily removed from messages and "attached" to message data in the internal Mirth Connect database  This can include  documents, images, etc. from HL7 messages,  image data in DICOM files,  etc.  Such data can often account for increasing the size of a message dramatically  When receiving a message with Base64 data, removing the data from the message and creating an attachment can greatly improve performance  Do this in a Preprocessor script  Replace Base64 data with the attachment's ID  ${MESSAGEATTACH} destination mapping is available and is the encoded message with the attachments re-inserted as Base64

9 9 Message Attachments, cont.  Call the addAttachment() function to add an attachment to any message  Takes Base64 data and MIME type as parameters  Returns internal Attachment class representation  Call getAttachments() to return the attachments  Returns ArrayList of Attachment objects  The getData() method returns the attachment's binary data

10 10 Message Attachments, cont.  When a message has attachments, the Attachments tab lists the attachments in the Channel Messages view  Mirth Connect has built-in viewers for PDF, RTF, DICOM and images  For the DICOM protocol, the image is automatically attached to the message data

11 11 System Events  Mirth Connect system events are logged to an internal database and can be viewed using the System Events browser  User login and logout events are stored for auditing  Errors in channel configuration are displayed in the event log upon deployment

12 12 Import and Export  Several Mirth Connect components can be imported and exported  Channels  Global Scripts  Connectors  Code Templates  Transformers  Alerts  Filters  Messages  Exported files are XML  In addition, server configuration back-ups and restores are possible


Download ppt "Clinical Data Exchange using HL7 and Mirth Connect Lecture 14 - DICOM connectors - Encoding/decoding Base64 data - Message Attachments - System Events."

Similar presentations


Ads by Google