I am receiving an HL7 style message from our clinical system and need to pass the data as XML to our medical charting system. My problem is that the HL7 message has one custom segment we have defined as the CTR segment. This segment contains a patient account #, a starting date and an ending date. When I output the XML, I need to create 2 sets of repeating tags from this one CTR segment. For example:
I have not been able to figure out a way to do this. I’ve tried writing a TCL proc that creates a 2nd CTR segment in my message and then using the Iterate statement in my Xlate but I am still only getting the data from the 2nd CTR segment… it seems to be overlaying the Resident Id information.
Any help is greatly appreciated!