I’ve asked to format a relatively complex report of Text Lines from an incoming HRL, and then put it into an ORU message that looks something like this:
MSH|^~&|PCMS|LACP|CERNER|LACP|20101116211601||ORU^R03|123456789|T|2.2
PID|||1234||TEST^PATIENT||20030607|F||||||||||1032000924
PV1|1|E|ECC^^^F^^^F||||800^ECC^Physician|||MED|ECC||||||800^ECC^Physician|ERQ||6
OBR|||30021018|PCMS DOC^PCMS Document|||20101116132014||||||||||||||||||F
OBX|1|TX| PCMS DOC^PCMS Document ||Text Line 1||||||F
OBX|2|TX| PCMS DOC^PCMS Document ||Text Line 2||||||F
OBX|3|TX| PCMS DOC^PCMS Document ||Text Line 3||||||F
OBX|4|TX| PCMS DOC^PCMS Document ||Text Line 4||||||F
OBX|5|TX| PCMS DOC^PCMS Document ||Text Line 1||||||F
How can I set up the report such that I can then iterate over the report, placing each line into consecutive OBX segments. My various experiments have failed. Can I make a list from the text lines and then use that list as a basis for an ITERATE?