So I have an interesting problem. I am going to be using a process and rule to determine if an HL7 message qualifies to be sent out, then using a record map to write certain aspects of that HL7 message to disk (with an HL7 to record map DTL). This is simple enough but the recipient of this file is requiring a single record map entry per DG1 segment in the HL7 message.
For instance if said HL7 message for PATIENT^TEST has 3 DG1 segments, I would need to write three lines (or records) like so:
123^^^^MR|TEST|PATIENT|DG1(1) TEXT|DG1(1) CODE|DG1(1) DATE