Category: Mirth Connect

Mirth (NextGen) Connect Bits #9: FileUtil Usage

The FileUtil class allows you to read files anywhere in the channel where you can execute a script. Special use cases for this is if you want to read external files in between process. If you want to do like a file-based database, then this class will be a...

Mirth (NextGen) Connect Bits #8: Using Attachment Handler

Mirth (NextGen) Connect allows you to handle attachments from an HL7 message or by reading a file. Attachments can be viewed in the Dashboard in the “Attachments Tab”. The viewer supports four types: Text, Image, DICOM, and PDF. Using the Attachment handler allows you to reduce the memory footprint...

Mirth (NextGen) Connect Bits #7: Code Templates Usage

If you’re a developer familiar with full-stack technologies and some software design patterns like MVC, you’ll know that you have parts of your codebase where you have helpers, model, controller, and others. Basically organizing functions, classes, and methods to be re-usable. In Mirth (NextGen) Connect, you can do scripting...

Mirth (NextGen) Connect Bits #6: HL7 Data Update & Manipulation

HL7 data manipulation in Mirth (NextGen) Connect can be done using the different options in the Transformer. However, for complex conditions where you want to change specific parts of the HL7 message, you can code it using JavaScript. If you’re reading and outputting the data as HL7, then the...

Mirth (NextGen) Connect Bits #4: How To Use DateUtil Class

DateUtil is a powerful function found in the Mirth Connect application. When calling it in a JavaScript type Filter/Transformer, you should see the definition and arguments needed. You can also find it in the “Reference” section. This is part of the User API in the application, you can check...

Mirth (NextGen) Connect Bits #3: CRUD Database Operations Using JavaScript

Mirth (NextGen) Connect has a Database Reader in the “Source” and a Database Writer in the “Destination”. However, if you have some complex processes like getting additional information in between, you can do database operations (create, read, update and delete) anywhere that executes the JavaScript code (ex. Filter, Transformer,...

Mirth (NextGen) Connect Bits #1: Looping & Deleting Segments

[UPDATED] : Fixed the delete logic since I found issues on it. Loop will start at the bottom or last child instead. A quick rundown on how to loop and delete specific segments based on some conditions. Here I want to check all OBX segments and delete those that...