No announcement yet.

How to do: XML to HL7 in 1.4

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to do: XML to HL7 in 1.4

    Hi everyone! I can't make my xml change to HL7? I have changed the source to xml and was wondering why it didn't work out. Do I have to configure something else? Can anybody please give me valid xml files? Thank you very much!

  • #2
    Re: How to do: XML to HL7 in 1.4


    you have not only to change the Source to XML. You must also, insert an XML Message and then do different mappings of the info you want to
    put in the HL7 Message



    • #3
      Re: How to do: XML to HL7 in 1.4

      Hi Jorg,
      Thank you so much for your reply. HOnestly, I don't have a background in HL7 so I can't create the mapping required. Can u please give me a sample? I need to convert XML to HL7 badly asap..



      • #4
        Re: How to do: XML to HL7 in 1.4


        i will try to describe it :-)

        1. You have to select XML as incoming data
        2. Source Panel: For example I use a FileReader which reads XML-Messages form a Directory
        3. Destination Panel: use the destination you need. for example filewriter
        Now you need a XML-Message that will be parsed and a HL7_message in which it should be converted !!
        Klick "Edit Transformer". On the right side klick "Incoming data" and "copy and paste" the "xml" Message in the box.
        Now klick "Outgoing data" and copy and paste the desired HL7-Message in it.
        In the Fields below there should be seen a TreeView from the XML or HL7-Message
        Now you can klick add a new step (at the left side) and change the type to message builder.
        In the Field "Message Segment" you can drag and drop the destination in your case, the desired HL7-Field. (klick outgoing data,
        and then in Tree View expand the tree until you find the field you need and then take the value!!! of the field and drag and drop it to
        the "Message Segment" fied)
        In the Mapping Field, you have to do the same steps, the only difference is, that you take the fields from the incoming data treeview



        • #5
          Re: How to do: XML to HL7 in 1.4

          Thank you for the instructions!
          I've found out the tree view, but I don't know what value I must select. What do I need to consider? by the way, do you have a sample Xml message converted to HL7 message?
          Another question if you don't mind: Do I need to do the mapping for several times?
          THANKS a lot for helping me...=)



          • #6
            Re: How to do: XML to HL7 in 1.4


            for testing i use a very simple XML Structure like:


            and then you can take the field fname and put it e.g. in a A01 PID segment in the filed for the patientsname

            Yes, for every Value you have to do the mapping.



            • #7
              Re: How to do: XML to HL7 in 1.4

              HI! Ok, I placed something like this. I don&#039;t know if its right
              Variable: fname
              Mapping: msg[&#039;fname&#039;].toString()
              Since i want to produce the HL7 after the the transformation, I placed $(msg.transformedData) on the template, is it right?
              You mentioned earlier about the message segment but where can I find it? Using the xml example you gave me, what will i placeed on the outgoing panel?
              Thanks and sorry for asking too much. I just need to get this so I can be able finally evaluate the software.


              • #8
                Re: How to do: XML to HL7 in 1.4

                in the transformer page, you must change the type of the transformer to "message builder" (in the top window, double click on Mapper)
                and then you can place the desired values.

                if you give me your email adress i can send you screenshots from my system. (i do not know how to insert pics here :-( )



                • #9
                  Re: How to do: XML to HL7 in 1.4

                  my email add is: [email protected]
                  I found out the message segment but then I don&#039;t know what to put in the outgoing message. KIndly send the screenshots to me.
                  Thank you very much!


                  • #10
                    Re: How to do: XML to HL7 in 1.4

                    Hi JOrg,
                    By the way, you just mentioned desired values? Can you please send to me the xml file of your transformer? I would be importing it so it would be a lot easier. Thanks a lot Jorg! I&#039;ll wait..



                    • #11
                      Re: How to do: XML to HL7 in 1.4

                      hey the sample message which i have posted , mirth is taking data from there n not my xml ????
                      My xml looks like <?xml version="1.0" encoding="UTF-8"?>
                      n i have pasted the out going data as follows:MSH|^~\&|Mirth|1|||2006044535||ADT^A04|603 340|D|2.3.1
                      PID|1|800888^^^Mirth^PN|999945682^^^^1||TEST^PATIE NT 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
                      when i begin the transformation my file looks something like this:
                      <?xml version="1.0" encoding="UTF-8"?>
                      <CX.1>&lt;caseid&gt;101&lt;/caseid&gt; &lt;caseid&gt;102&lt;/caseid&gt; &lt;caseid/&gt;</CX.1>
                      <XPN.2>PATIENT MF</XPN.2>
                      <XAD.1>21 PALM MANOR</XAD.1>
                      <XAD.3>EAST SYRACUSE</XAD.3>
                      <CE.1>NOT A VETERAN</CE.1>
                      where is the data which i had send in my xml file ? why is it showing me the data which i posted as a sample .please tell me asap


                      • #12
                        Re: How to do: XML to HL7 in 1.4

                        Hi Jorg,

                        there's something not clear to me in what you say.

                        I'm trying the very same situation :

                        1) Source is a File Reader that looks for an xml file.
                        2) Destination is a SoapWriter that should set PersonName , Person Prename and something more caught from the incoming xml file.

                        Prbl.1 In the Trasform panel or Destination it is not possible to paste an XML sample file in IncomingData because the choice is locked on HL7v2.x

                        Only the Outgoing Data can be filled with an xml file (and the tree is correctly generated)

                        Prlb.2 Moreover even if i put a sample in the OutgoingData , during runtime real data are not considered but only sample data (as user "deepaganu" is telling )

                        Do you know how to refer to real xml data read from file , while setting Soap field?

                        AAAASP32_20070614_180414.jpg (91883 bytes)
                        Stefano Mastrogiacomo


                        • #13
                          Re: How to do: XML to HL7 in 1.4

                          Hi Stefano:

                          I am working on a similar interface converting XML to HL7 that also includes JPG encoded data for patient forms and document. Althoug I upgraded to 1.5 I beleive that the mapping definitions should be the same. I have mine working doing the following.

                          You need to set the inmcoming data type in the Channel Summary Page to XML. Your Transformer should be defined in the Source Channel page or Tab. Once you set your incoming data type to XML you are now able to post an XML template in the incoming data tab of the transformer. In the outgoing data tab you paste your HL7 template and begin to add the steps for mapping the XML data elements to the HL7 transaction.

                          Your HL7 fields and or components will be used as the Variable in the Message Segment Box where you drag the HL7 field or compnonent to it. Your XML layout will be used to drag the XML data element to the mapping box. For example

                          Message Segment: tmp['PID']['PID.3']['PID.3.1']
                          Mapping: msg['pt_id'].toString()

                          This will map the Patient ID number from the XML file to the PID.3.1 HL7 Patient ID component.

                          I am finalizing this channel and transformer and getting it ready for testing. I did preliminary testing with it and was able to create the HL7 transaction. I can share it with you, if you'd like. I am not sure if you can import a latest version channel and transformer to a previous version.

                          Hope the information is usefull.
                          Charlie Olmeda


                          • #14
                            Re: How to do: XML to HL7 in 1.4

                            Hi olmeda9535,

                            your post has been very useful.
                            Thanks a lot.

                            I did not figured out that also Source Panel (I was using a simple File Reader ) had a transformation subpanel to configure.

                            So there are three location where it can be specified datatype handled ( Channel Property , Source-Trasformation-IncomingData and Destination-Trasformation-OutgoingData).

                            Now data are correctly handled.
                            I got to understand if this Mirth can handle a load of message.

                            Do you have an idea if it can process something like a 200 message per minute?

                            Anyway thanks a lot.
                            Stefano Mastrogiacomo


                            • #15
                              Re: How to do: XML to HL7 in 1.4

                              Hi Stefano:

                              I have not tried to test with mass loads of messages on LLP Listner or TCP. I can tell you that I have tested with a file reader and file writer channel using ORU^R01 transactions containing JPG encoded data about 1/2MG in size and it took Mirth exactly 60 seconds to process 21 records from one directory to another across our network. Considerign the size of the transactions this is acceptable.

                              If your records fall within the HL7 norm, for example 25k per ADT/Order record then Mirth should not have a problem handling a mass load of records. But again you would have to test for performance in test environment before going live.

                              I am glad the information was helpfull.
                              Charlie Olmeda