I have a ORU message with a single OBX segment and I need to split it into multiple OBX segments based on OBX5 observations which are separated by \.br\ as opposed to a ~. Is there any string utilities that I can use to do that?
So the OBX looks like this:
OBX|1|ST|Coding Summary^Coding Summary||\.br\\.br\\.br\\.br\\.br\ Line1 \.br\ Line2\.br\\.br\ Line3:\.br\ Line4\.br\\.br\
and it should be parsed to:
OBX|1|ST|Coding Summary^Coding Summary|| Line1|||||
OBX |1|ST|Coding Summary^Coding Summary|Line2||||||
OBX |1|ST|Coding Summary^Coding Summary|Line3:||||
OBX |1|ST|Coding Summary^Coding Summary|Line4|||||
Please suggest the right script to use to accomplish this translation.