HL7 to XML using an iterate

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf HL7 to XML using an iterate

Viewing 7 reply threads
  • Author
    Replies
    • #63276
      John Hamilton
      Participant

      I have not done any XML. But  don’t think that will be at issue.

      What you need to do is setup an iterate on you STF field.

      It will have to copy each sub field out into your destination.

      I would use a variable to copy it to then after the Iterate copy the variable to your XML field.

      I assume all those function should work when working with XML.

      Type field

      basis ((0).SFT.#16 ( This will have to be modified to pint correctly.

      Variable %f1

      concat  0(0)SFT.#16(%f1)  -> @TEMP

      (END ITERATE)

      copy

      @TEMP -> DMS…..FLD

      That should do your trick. I type this in from memory so maybe not real accurate but should get you pointed in the right direction.

    • #63277
      Brian Sweetland
      Participant

      Assuming I set this up correctly, that didn

    • #63278
      John Hamilton
      Participant

      I mis read what you wanted to do sorry.

      But it appears that the second way you setup should have worked.

      I’m not sure how XML works. Do you need to define the output fields as repeating?  Any experts in XML willing to help with this ?

    • #63279
      Brian Sweetland
      Participant

      Looks like I have a way. I removed the CONCAT and went with the ITERATE and COPY only.

      Iterate = Field -> 0(0).STF(0).00785 -> %f1

      Copy = 0(0).STF(0).00785(%f1).[0] -> DmsEmployeeSchema.EmployeeDetails.JobTitle(%f1).#text

      Output now looks like this:

      DmsEmployeeSchema.EmployeeDetails.JobTitle(0).#text:   >Reffering Phy< DmsEmployeeSchema.EmployeeDetails.JobTitle(1).#text:   >Ordering Phy< DmsEmployeeSchema.EmployeeDetails.JobTitle(2).#text:   >Diagnostic Cardiologist< Thanks for your help with this.

    • #63280
      Nate Kruse
      Participant

      Maybe the boys at GE Healthcare IT in Sioux Falls should write better code.  😆

      Even though I’ve never met you Brian, I’ve heard much about you through my former coworkers – Chris L and Kyle M (who I work with now and probably wrote the code you are looking at).

    • #63281
      Jim Kosloskey
      Participant

      Brian,

      As you have discovered, the issue was the CONCAT to a temp variable.

      Then referencing the same temp variable for each copy would at best repeat the temp field as many times as there were inbound occurences.

      Glad you have it working.

      Jim Kosloskey

      email: jim.kosloskey@jim-kosloskey.com

    • #63282
      Brian Sweetland
      Participant

      Bunch of hacks those GE DBA’s…

    • #63283
      Nate Kruse
      Participant

      Brian Sweetland wrote:

      Bunch of hacks those GE DBA’s…

      Couldn’t have said it better myself!  Between beer Friday’s and playing pool, it’s amazing we ever got a solid version of DMS out the door.

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

Forum Statistics

Registered Users
4,966
Forums
28
Topics
9,106
Replies
33,627
Topic Tags
248