Announcement

Collapse
No announcement yet.

how to remove unwanted information from Hl7 file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 .....

    ------------------------------

  • #2
    Re:how to remove unwanted information from Hl7 fil

    Yes.

    You can use the preprocessor to remove the non-HL7 lines.

    Comment


    • #3
      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.

      Comment


      • #4
        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

        Comment

        Working...
        X