copy entire hl7 message to a single xml field within xlate?

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf copy entire hl7 message to a single xml field within xlate?

  • Creator
    Topic
  • #53168
    Brad Gollifer
    Participant

      Does anyone have a brilliant idea of how to do this.  I know I could do it by not using the gui but I have already built most of what i need with the gui.  Keeping the whole message in tact by storing it in a single xml field is a new requirement mid project.

    Viewing 7 reply threads
    • Author
      Replies
      • #76775
        Jim Kosloskey
        Participant

          Brad,

          You will need some Tcl.

          What I plan on doing for this situation is to have 2 procs.

          One proc would be executed pre-xlate and place the message content in a keyed list item inside the USERDATA Metadata field.

          The other proc would be a xltp type proc executed from inside the Xlate wich would retrieve any keyed list item from USERDATA (in this case the key that has the message content) and return that data.

          The ability to reference the entire message from within the Xlate (even just using XPM functions) has been on the wish list for some time.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #76776
          Bryan Dort
          Participant

            You should be able to do this all through the xlate gui.  You could define the input as a VRL with a single field. With the output the XML.  Then copy that VRL to the element in the XML.

          • #76777
            Jim Kosloskey
            Participant

              Bryan,

              That would work as long as there is no need to get data from specific fields, components, etc. from the HL/7 message to populate some discrete fields of the XML (like MRN or other Identifiers).

              In our case we are seeing a future need for key fields plus the entire message not only for XML but for some other potential message structures as well.

              email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

            • #76778
              Brad Gollifer
              Participant

                Probably not the best way but i wanted others that might not be as tcl savy to be able the just edit or add fields here or there to the xml if it ever needs to be modified.

              • #76779
                Brad Gollifer
                Participant

                  code

                • #76780
                  Bryan Dort
                  Participant

                    The topic of this thread was asking how to take an entire HL7 and put it into one XML field.  But the code you posted breaks out the individual fields and builds the XML.  Why wouldn’t you do that in the xlate?

                  • #76781
                    Brad Gollifer
                    Participant

                      One of the fields contains the entire message.  We are passing this to an online registration project, they refuse to take the hl7.  When we pass back in anything that the patient updates via the webpage the people in control of our HIS only want certain fields to be updateable.  We do not have that kind of control, the HIS updates the fields we send and sometimes blanks out the fields we don’t send.  The solution was to pass the hl7 to the web people with some fields built out into their xml format so they can display them on the webpage.  Then if any of those fields are updated we will get the updated fields back in the xml format and retrieve the original message we sent them from one of the xml fields.  We then replace the updated fields in the origainal message and guarantee that we have not updated any other fields because they went back in as they were sent.  That is assuming they send us back the most up to date hl7 they received inside the xml field.

                    • #76782
                      Bryan Dort
                      Participant

                        I see it now.   Thanks.

                        Bryan

                    Viewing 7 reply threads
                    • The forum ‘Cloverleaf’ is closed to new topics and replies.