web stats
how to remove unwanted information from Hl7 file - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 01-11-2008, 06:33 AM
kashif kashif is offline
OBX.1 Kenobi
 
Join Date: Jan 2008
Location: Aga Khan Universitiy Hospital
Posts: 41
kashif
Default how to remove unwanted information from Hl7 file

I want to process Hl7 batch messages from a log file. That file also contains some comments which are not part of HL7 syntex. I want to remove that text/comments from the file before doing transformations.

My question is, can i do it with MIRTH? if yes how. Example text is below.


-----------------------
I want to remove remove these date and comments stamps above messge header.


12/1/2001 9:27:46 AM [T7]: 1 reports are pending delivery; Processing...
12/1/2001 9:27:46 AM [T7]: Processing Report '84130' - Status: Final


MSH|^~\&|RA-XYZ-TCP|STATION|VOICESERVER|RADIO|1092746||
ORU^R01|5533|P|2.3|
PID|||0-9939|71116|MR.XYZ||1831000000|F|||^^^^^^||||||||26 9939||

....hl7 Message continues .....

------------------------------
Reply With Quote
  #2  
Old 01-11-2008, 09:51 AM
albertosaez albertosaez is offline
 
Join Date: Sep 2006
Location: Valladolid, Spain
Posts: 842
albertosaez is an unknown quantity at this point
Default Re:how to remove unwanted information from Hl7 fil

Yes.

You can use the preprocessor to remove the non-HL7 lines.
Reply With Quote
  #3  
Old 01-11-2008, 11:15 AM
kashif kashif is offline
OBX.1 Kenobi
 
Join Date: Jan 2008
Location: Aga Khan Universitiy Hospital
Posts: 41
kashif
Default Re:how to remove unwanted information from Hl7 fil

Thanks. Can yo please provide some example scripts to do this job.

I dont know how to use and which one of these to use:

I have found folloiwng functions but how to use them , i need some sample or examples of codes.

var date = DateUtil.getDate(pattern, date);
var contents = FileUtil.read('filename');
var results = replacer.replaceValues(template, map);

please help.
Reply With Quote
  #4  
Old 01-11-2008, 11:36 AM
albertosaez albertosaez is offline
 
Join Date: Sep 2006
Location: Valladolid, Spain
Posts: 842
albertosaez is an unknown quantity at this point
Default Re:how to remove unwanted information from Hl7 fil

Well.

At preprocessor you have the message variable, which has the content of the file you've readed.

The idea is to read the file and removes the non-HL7 data. You could use some javascript functions as regexp. You can find a good example here:

http://www.regular-expressions.info/...ptexample.html
Reply With Quote
Reply

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove and Renumber IN1 MikeCaldwell Support 4 05-17-2009 11:50 PM
how to remove text encoding using Transformer kashif Support 3 05-15-2008 07:32 AM
Getting information from many OBX Segments Svetlomir Kasabov Support 0 02-26-2008 12:51 PM
Dashboard remove all messages huubvandemortel Support 2 06-04-2007 11:15 AM
i need information medicalis Support 2 05-28-2007 02:35 AM


All times are GMT -8. The time now is 11:54 PM.


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