Transforming data between any of the different types of node trees follows a very similar pattern, see the other “Transforming Messages:” tutorials in this section for examples.
These are the steps:
- Create a source node tree structure
- Create target node tree
- Use assignment statements to map and transform the data from the source node tree to the target node tree
The code for Transforming HL7 to Database, Transforming HL7 to JSON and Transforming HL7 to Database all follow the same pattern.
Transforming HL7 to Database:
Transforming HL7 to XML:
Note: Transforming to XML varies slightly as it uses the
:setInner() function to assign values.