HL7 to XML using an iterate Homepage › Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › HL7 to XML using an iterate Search for: This topic has 8 replies, 4 voices, and was last updated 15 years, 11 months ago by Nate Kruse. Creator Topic January 3, 2008 at 2:24 pm #49721 Brian SweetlandParticipant I Creator Topic Viewing 7 reply threads Author Replies January 3, 2008 at 2:50 pm #63276 John HamiltonParticipant 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. January 3, 2008 at 5:41 pm #63277 Brian SweetlandParticipant Assuming I set this up correctly, that didn January 3, 2008 at 6:09 pm #63278 John HamiltonParticipant 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 ? January 3, 2008 at 6:13 pm #63279 Brian SweetlandParticipant 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). -> 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. January 3, 2008 at 7:00 pm #63280 Nate KruseParticipant 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). January 3, 2008 at 7:20 pm #63281 Jim KosloskeyParticipant 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: email@example.com January 3, 2008 at 8:38 pm #63282 Brian SweetlandParticipant Bunch of hacks those GE DBA’s… January 3, 2008 at 8:50 pm #63283 Nate KruseParticipant 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. Author Replies Viewing 7 reply threads The forum ‘Cloverleaf’ is closed to new topics and replies.