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

Go Back   Mirth Community > Mirth Connect > General Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 08-26-2009, 12:40 PM
jasimons1 jasimons1 is offline
What's HL7?
 
Join Date: Mar 2009
Posts: 4
jasimons1
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.

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

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();
msg['tag00100020']['@len']=tstr.toString().length;
msg['tag00100020']['@tag']="00100020";
msg['tag00100020']['@vr']="LO";
}



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



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

Thanks jasimons1. It worked to me.
Reply With Quote
Reply

Tags
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:23 AM.


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