Announcement

Collapse
No announcement yet.

Really New - HL7 to HL7 with minor adjustments

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

  • Really New - HL7 to HL7 with minor adjustments

    Hey guys!

    I am really new to the Mirth engine. I have been playing with it for about 48 hours now and it has been much different than Qvera.

    With that said, when I add a message template for both inbound and outbound messages. I just basically copy an message I am receiving, and then add an transformer (source) message builder step where:

    Message segment: tmp['FT1']['FT1.21']['FT1.21.1']
    Mapping: msg['FT1']['FT1.20']['FT1.20.1'].toString()

    This should move the FT1-20.1 value to the FT1-21.1 in my final message.

    I set the destination to a file using ${message.encodedData}

    The file is created but it does not keep the original values and fields in tact and change just what I chose to change, instead it pushes through my template and makes only the adjustment I provided in the first FT1 segment (there can be multiple).

    So I am not getting the source messages with just the changes going to my destination folder, so it's not working well.

    Am I missing something? or doing something incorrect?

    I would appreciate your help! I have watched many videos on youtube, and read as much documentation as I could find so far.

  • #2
    Turn on process batch and set what to split by (default MSH)..

    Comment


    • #3
      Originally posted by nafwa03 View Post
      Turn on process batch and set what to split by (default MSH)..
      Just wondering but where might I find process batch?

      Wouldn't that just separate more than one hl7 message in a file creating separate ones? I am just trying to push one MSH per file through.

      Comment


      • #4
        Its on the source connector. It will write out to separate files or to one depending on what you want to do.. Can you post your channel to take a look?

        Comment


        • #5
          Here is an example hl7 message (it's not valid - I am just teaching myself how the Mirth system works by trying to move fields around currently)

          MSH|^~\&|TEST-TEST^TEST-TEST^TEST||TEST^TEST^TEST||20121211170953||SIU^S14 |D6B31EEB-EB84-4f15-B74C-C278B7C481B0|P|2.3||||NE
          FT1||||||||||||||||||TEST0|TEST|20|21|22|||||||||| ||||||||||||||

          I need to move '20' in the FT1-20 to FT1-21 while keeping the rest of the message in tact.

          Then I will need to perform the same task for multiple FT1's in a message if they exist so the result will be:

          MSH|^~\&|TEST-TEST^TEST-TEST^TEST||TEST^TEST^TEST||20121211170953||SIU^S14 |D6B31EEB-EB84-4f15-B74C-C278B7C481B0|P|2.3||||NE
          FT1||||||||||||||||||TEST0|TEST||20|22|||||||||||| ||||||||||||
          FT1||||||||||||||||||TEST0|TEST||20|22|||||||||||| ||||||||||||

          Comment


          • #6
            Originally posted by nafwa03 View Post
            Its on the source connector. It will write out to separate files or to one depending on what you want to do.. Can you post your channel to take a look?
            Sure, how do I post my channel? I am trying to learn the Mirth engine so I am just trying to perform some of the most simplistic tasks there are.

            Right now I want to move one value from one field to another. I don't know why but for some reason it wants to only make the change I give it and then use the template message as the result. It's confusing.

            Comment


            • #7
              You have to select Go Advanced in the reply box. Try this.. Edit your transformer step to Javascript. Remove your outbound template. Put this in:
              PHP Code:
              for(var i=0;i<msg['FT1'].length();i++)
              {
              msg['FT1'][i]['FT1.21']['FT1.21.1'] = msg['FT1'][i]['FT1.20']['FT1.20.1'].toString();
              delete msg['FT1'][i]['FT1.20']['FT1.20.1'];
              //for loop end

              Comment


              • #8
                Originally posted by nafwa03 View Post
                You have to select Go Advanced in the reply box. Try this.. Edit your transformer step to Javascript. Remove your outbound template. Put this in:
                PHP Code:
                for(var i=0;i<msg['FT1'].length();i++)
                {
                msg['FT1'][i]['FT1.21']['FT1.21.1'] = msg['FT1'][i]['FT1.20']['FT1.20.1'].toString();
                delete msg['FT1'][i]['FT1.20']['FT1.20.1'];
                //for loop end

                Okay i added the above line of code as javascript to the transform instead.

                Raw:
                MSH|^~\&|TEST-TEST^TEST-TEST^TEST||TEST^TEST^TEST||20121211170953||SIU^S14 |D6B31EEB-EB84-4f15-B74C-C278B7C481B0|P|2.3||||NE
                FT1||||||||||||||||||TEST0|TEST|20|21|22|||||||||| ||||||||||||||
                FT1||||||||||||||||||TEST0|TEST|20|21|22|||||||||| ||||||||||||||

                Encoded:
                MSH|^~\&|MIK-AIG^MIK-AIG^GUID||SRS^SRS^GUID||20121211170953||SIU^S14|D6 B31EEB-EB84-4f15-B74C-C278B7C481B0|P|2.3||||NE
                FT1||||||||||||||||||||20|21|||||||||||||||||||||| |||

                It still seems to be doing the same thing, it's not passing through the original message with only the change, it seems to still be pulling from the inbound or outbound msg template. Also note it only passed one FT1 segment through.

                Comment


                • #9
                  Attached Channel per request:
                  Attached Files

                  Comment


                  • #10
                    In the transformer remove the outbound message

                    Comment


                    • #11
                      So that was all it was? I should have an outbound template, just an inbound template?

                      So the inbound template just really needs to be 'test' message with my segments and fields.

                      Comment


                      • #12
                        You don't necessarily need them at all unless you want to utilize the drag and drop features to map or message build. It also can depend on your source connector you use, but that took me a while to get the grasp initially so glad you got it working..

                        Comment


                        • #13
                          Thank you so much! Do you have any good links or tutorials for working strictly with hl7 conversions and such? I don't want to jump into CDA or XML at all just yet. I want to get more familiar with working with hl7.

                          Does Mirth handle ACKS through a socket based system good?

                          Comment


                          • #14
                            This forum has a ton of threads which will probably cover what you need. Look for channel examples. As for the conversions, that's what mirth pretty much does. Transforms to xml message and encodes to whatever you want. The message templates help to understand where you are in to manipulate. Yes Mirth handles ACKS very well.

                            Comment


                            • #15
                              Originally posted by nafwa03 View Post
                              This forum has a ton of threads which will probably cover what you need. Look for channel examples. As for the conversions, that's what mirth pretty much does. Transforms to xml message and encodes to whatever you want. The message templates help to understand where you are in to manipulate. Yes Mirth handles ACKS very well.
                              Thank you so much - you've been so helpful!! A++

                              Comment

                              Working...
                              X