Is there a way in the translate to see if a specific HL7 segment was sent. I want to be able to do an if statement on the segment identifier (MSH, PID, ZP1, etc). For example, I have a ZP1 segment that I may receive. If I receive this segment I would then want to perform the various xlate (copy, if, etc) statements. If the segment was not sent, I do not want to execute the xlate statements. Also, on the ZP1 segment, I do not have a field which is always valued when it is sent to me. So I cannot always check a specific field to see if it is null and then assume that the segment was not there.
For example:
IF ZP1 was sent
Copy ZP1-2 to @temp
If ZP1-18 is null
Copy N to @temp1
Else
Copy ZP1-18 to @temp1
.
.
.
.
If I do not know that segment was sent and just perform the copy and if statements, the if ZP1-18 will move an N to the temp. I only want to do this when the ZP1 segment is sent to me and this field is not valued.