Record Map with Repeating Fields
I'm working on a project were we are going to be receiving a non-HL7 formatted flat file that will contain a single result message per line and each result messages may contain repeating OBX fields that will need to be parsed out so that can be sent as an HL7 ORU messages that contains multiple OBX segments.
The record map I currently have doesn't appear to be able to parse out the repeating OBX fields in the source file, currently my Record Map uses the “|” as the first field separator and the “^” as the second and the “~” as the repeat separator.
Source file format:
|<PID-3>|<PID-5>|<PID-7>|<PID-8>|<PID-19>|<PV1-3>|<PV1-19>|<OBR-3>|<OBR-4>|<OBR-7>|<OBR-16>|<OBR-22>|<OBR-25>|<OBX-2( repetition 1)>^<OBX-3(repetition 1
)>^<OBX-5(repetition 1)>^<OBX-6(repetition 1)>^<OBX-7(repetition 1)>^<OBX-8(repetition 1)>^<OBX-11(repetition 1)>~<OBX-2( repetition 2)>^<OBX-3(repetition 2)>^<OBX-5(repetition 2)>^<OBX-6(repetition 2)>^<OBX-7(repetition 2)>^<OBX-8(repetition 2)>^<OBX-11(repetition 2)>~ETC>|
Target HL7 formatted OBX Segments:
OBX|1|OBX2|OBX3||OBX5|OBX6|OBX7|OBX8|||OBX11
OBX|2|OBX2|OBX3||OBX5|OBX6|OBX7|OBX8|||OBX11
Any assistance help would be greatly appreciated.
Thanks
Doug