web stats
How do I transform a Dicom Message? - Mirth Community

Go Back   Mirth Community > Mirth Connect > General Discussion

Thread Tools Display Modes
Old 08-26-2009, 11:40 AM
jasimons1 jasimons1 is offline
What's HL7?
Join Date: Mar 2009
Posts: 4
Default How do I transform a Dicom Message?

I created a channel Dicom Listener to FileWriter as a test?
in the source transformer I mapped and created an accession number variable
In the Destination transformer I set the Accession number to the new varaible +"test123"
in the template I use ${message.transformedData}

If I set the filewrite to ascii I see the the transformed data. If I leave it to binary then it is no longer a dicom file (will not open in a dicom viewer)

If I change ${message.transformedData} to ${DICOMMESSAGE} and leave the filewriter to binary all I can open the file in a dicom viewer but no changes are made.

How can I accomplish this task?

In a nutshell I need to be able to change some tags in a dicom file.

Reply With Quote
Old 08-27-2009, 10:58 AM
jasimons1 jasimons1 is offline
What's HL7?
Join Date: Mar 2009
Posts: 4

I thin I figured it out

This worked for me
do not create a template for output only for input

in the source transformer step 1 (type javascript) I do

// if patientis does not contain -Suffix then add it
if (msg['tag00100020'].search("-Suffix") == -1){
tstr = msg['tag00100020'].toString() + "-Suffix";
msg['tag00100020'] = tstr.toString();

then I use ${DICOMMESSAGE} for the template in the filewriter

Anyone see a problem with this?
Reply With Quote
Old 11-08-2018, 06:30 AM
eberth85 eberth85 is offline
What's HL7?
Join Date: Aug 2017
Posts: 1
eberth85 is on a distinguished road

Thanks jasimons1. It worked to me.
Reply With Quote

dicom, transform

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 04:55 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation