Skip to main content

Demonstration: The Data Transformation Details

  1. The data transformation should copy all of the information in the source message into the target. Create the required mappings using the GUI by clicking on a source segment and dragging the arrow to the corresponding target segment. The connection is made when the target segment "lights up".

    generated description: customschemas10

  2. The final step is to assign a value to the first (and only) field of the target message's ZWG segment. The possible values are: BigWing and SmallWing. The assignment is based on the account number in the source message. Assign BigWing in the case of account numbers larger than 500000 and SmallWing otherwise.

    Use a DTL If action to test the source account number field. To create the If action, first open up the PID segment of the Source message by clicking on the triangle on the left side. Scroll to PatientAccountNumber and click to select it. Click the -Add Action- list (top right-hand side of the editor) and select If.

    generated description: customschemas11 20152

  3. Now, in the action editor on the right side of the screen, compare the ID number to 500000, which is a simple way of separating patients into two sets. Fill in source.{PID:PatientAccountNumber.ID} > 500000 in the Condition field.

    generated description: customschemas12

  4. If this statement evaluates to true, we want to set the ZWG segment accordingly. Open the ZWG segment and add a set action to the only field. This should show up as nested in the code below the diagram. Set the value equal to "BIGWING".

    generated description: customschemas13

  5. The else statement was automatically added for our action if the condition is not met. Add another Set action under else by clicking the else statement in the code block, then opening the ZWG segment and adding another set action, this time to "SMALLWING".

    generated description: customschemas14

  6. Compile the Data Transformation.

Note:

We must go through the steps of assigning each segment because we are not able to use the "Create=Copy" setting for the data transformation. The copy setting is an exact copy, so we would not be able to change the structure of the message.

BIGWING and SMALLWING are strings, and in DTL they must be surrounded by double quotes within the single quotes in order to be parsed as strings ('"BIGWING"' and '"SMALLWING"').

FeedbackOpens in a new tab