I want to create an XML template from a sample XML file. I have two parts to my question.
1. I found this in the KB,
The second way and for more complex XML messages it is often easier to create a template representing the new XML message which is saved as a System Variable and then adding Node Tags in the template that reference the HL7 fields.
Example Template:
<patient id="{PID-2}" mrn="{PID-3}" timestamp="{SYSTEM_DATE[yyyy-MM-dd hh:mm:ss]}">
<demographics>
<nameGiven>{PID-5.2}</nameGiven>
<nameFirst>{PID-5.1}</nameFirst>
<birthDate>{PID-7}</birthDate>
<ssn>{PID-19}</ssn>
</demographics>
</patient>
My first question for this is: Should the labels be in quotes or not. The first line has them in quoted, the remainder are not.
My second question is do you need to replace all the values in the XML document with a replacement text using the curly braces.
Thank you!!