Announcement

Collapse
No announcement yet.

Mapper vs. Message Builder vs. Javascript

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

  • Mapper vs. Message Builder vs. Javascript

    Hi! What are the uses of the the 3 types? When will we know what type to use?
    Thanks!
    Tonet

  • #2
    Re: Mapper vs. Message Builder vs. Javascript

    Mapper - Maps segments from your message to a variable in Mirth
    Message Builder - Replace segments in OUTGOING DATA with segments from INCOMING DATA
    Javascript - General purpose scripting area for executing any type of javascript or Java code.
    Chris Lang

    Comment


    • #3
      Re: Mapper vs. Message Builder vs. Javascript

      ok! So if I only need to convert XML to HL7 I only need a mapper?
      Tonet

      Comment


      • #4
        Re: Mapper vs. Message Builder vs. Javascript

        No,

        You will need a message builder.

        The steps are:

        1. Create a channel and set the type to XML
        2. In your SOURCE transformer, go to the incoming data tab. Paste a sample of the XML you are expected to receive.
        3. Go to the outgoing data tab, make sure the outgoing data type is set to HL7 v2
        4. Paste a sample HL7 formatted message in the outgoing data box (this is your template)
        5. Create a new step, change the type to Message Builder
        6. Expand the Tree on the outgoing tab that was formed from your HL7 template
        7. Drag the first segment you want to map to the first box in the message builder
        8. Switch to your Incoming Data tab
        9. In the tree that represents your XML, find the field that matches with the HL7 field and drag to the second box in the message builder
        10. Continue to do this for all the fields you wanted mapped.
        11. Make sure you edit your OUTGOING DATA hl7 message and remove any data you do not want in your final message
        12. Go to the destinations tab on the channel, on your destination go to "Edit Transformer"
        13. The incoming data type should be HL7v2
        14. Make sure the outgoing data type is HL7v2
        15. Make sure your destination is set to use ${message.encodedData} in whatever template field is available

        Do you have a sample of your XML and a sample of the HL7 you'd like to create? We might be able to draft up a quick sample and upload to the file repository.

        -Chris
        Chris Lang

        Comment


        • #5
          Re: Mapper vs. Message Builder vs. Javascript

          Thanks for the instruction. I've tried it already but there is an error
          Java Exception: StrictParser is undefined....
          I'm just wondering: Do I need to choose HL7 v.2 as both the incoming and outgoing data type like you said? How come?

          Anyway, here's my HL7


          MSH|^~\&|Mirth|1|||2006044535||ADT^A04|603340|D|2. 3.1
          EVN|A04|20060404090742
          PID|1|800888^^^Mirth^PN|999945682^^^AccMgr^MR^1||T EST^PATIENT MF||19570414|M||W|21 PALM MANOR^^EAST SYRACUSE^NY^130570000^^M|31|||E|M||6635130^^^Mirth ^VN^1|000987655|||2|||||NOT A VETERAN|||N
          PD1||||1335^ALCOTT^KAREN^^^^^^AccMgr^^^^CI|||I
          NK1|1|TEST^MARGARET|W|21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||Y
          PV1|1|E|ED^^^1|1|||1281^MARKHAM^JOSEPH^^^^^^AccMgr ^^^^CI|1281^LANG^JOE^^^^^^Mirth^^^^CI||ED||||7|S|| |62|6635130^^^AccMgr^VN^1|865^SP KOPP|||||||||||||||||||1||A|||20060404090500
          PV2||^NO||||||20060404090500|||||||||||||||||||||| ||||||||S
          DG1|1||^HEADACHE|HEADACHE||A|||||||||0
          GT1|1|382582|TEST^PATIENT MF||21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||19570414|M|||000987655|||| ||||11
          IN1|1|SELF PAY NYS|734|SELF PAY NYS|||||||||||5|TEST^PATIENT MF|1|19570414|21 PALM MANOR^^EAST SYRACUSE^NY^130570000|||||||||||||||||||||||11|M|| ||||382582
          IN1|2|SELF PAY|705|SELFPAY|||||||||||5||1
          IN2|1||000987655




          The xml file created by Mirth 1.4 is the xml I've been using.

          Tonet

          Comment


          • #6
            Re: Mapper vs. Message Builder vs. Javascript

            Hey Chris, when I import the PVI transformer, I placed an XML message AS INPUT. But I received an HL7. How come? I really really am wondering why..Because you said that I must use Message builder.

            ThanKS A LOT! :d
            Tonet

            Comment


            • #7
              Re: Mapper vs. Message Builder vs. Javascript

              Hi Chris!
              My XML message has been converted. thanks to you! However, do you think I need to do every single mapping in the message builder?
              Shall I use "Mapper"?
              Tonet

              Comment


              • #8
                Re: Mapper vs. Message Builder vs. Javascript

                Yes, every mapping should be in the message builder. The mapper is for pulling data out of messages and writing to files or databases.
                Chris Lang

                Comment


                • #9
                  Re: Mapper vs. Message Builder vs. Javascript

                  HI! ok! I get it now! I just wondered, does the sample message especially in HL7 (outgoing msg) serve as a default?
                  Tonet

                  Comment


                  • #10
                    Re: Mapper vs. Message Builder vs. Javascript

                    HI! ok! I get it now! I just wondered, does the sample message especially in HL7 (outgoing msg) serve as a default?
                    Tonet

                    Comment


                    • #11
                      Re: Mapper vs. Message Builder vs. Javascript

                      Yes, the outgoing will be the default template sent out.
                      Chris Lang

                      Comment


                      • #12
                        Re: Mapper vs. Message Builder vs. Javascript

                        Alright :laugh: thanks!
                        Tonet

                        Comment


                        • #13
                          new starter

                          hi,
                          i am new to this HL7 mirthgateway, i know a little bit about hl7 and would like start using it in our setup here for sending some transcriptions out to our cleints, do you know where i can start, i have flat text files to be converted to Hl7 and sent out.DO you know of a resource that could be a step by step instruction or tutorial.
                          thanks

                          Comment


                          • #14
                            Re:Mapper vs. Message Builder vs. Javascript

                            Sanjay,

                            In the forum search text box above enter screencast and refer to links in the search results.

                            Hope it helps!

                            Comment

                            Working...
                            X