I am working on with ORM^O01 message. The IB variant is:
MSH
PID
PV1
ORC
[{NTE}]
[
{
OBR
[OBX]
}
]
The OB variant is:
MSH
PID
PV1
ORC
[
{
OBR
[{NTE}]
[OBX]
}
]
In the translator I have the iterates working for the OBR and NTE segments, but when I add the OBX segment in, I loose the 2nd and 3rd OBR segments.
This is the iterate section that will give me each OBR followed by NTEs. But I need the OBXs to follow the NTEs.
{ { OP ITERATE }
{ BASIS 1(0).0(0) }
{ VAR %g1 }
{ TYPE group }
{ BODY {
{ { OP COMMENT }
{ COMMENT {getting all the OBR segs} }
}
{ { OP PATHCOPY }
{ ERR 0 }
{ IN 1(0).0(%g1).OBR }
{ OUT 1(%g1).0(0).OBR }
}
{ { OP COPY }
{ ERR 0 }
{ IN {{0(0).ORC.#4.[0]}} }
{ OUT {{1(%g1).0(0).OBR.#2.[0]}} }
}
{ { OP ITERATE }
{ BASIS 0(0).NTE }
{ VAR %s1 }
{ TYPE segment }
{ BODY {
}
{ { OP PATHCOPY }
{ ERR 0 }
{ IN 0(0).NTE(%s1) }
{ OUT 1(%g1).0(0).NTE(%s1) }
}
}}
}
}}
}
Results:
1(0).0(0).ORC(0) : >|NW|031507:RI1^LAB||2186||N|^^^^^R||200703151313< 1(0).1(0).OBR(0) : >|1|031507:RI1^LAB||2627^CYTOMEGALOVIRUS CULTURE, RAPID^L|||200703151312|||||||200703151313||^O’BRYANT^LARRY^K^^^M.D.||||||||LAB|||^^^^^R< 1(0).1(0).NTE(0) : >|1||02/02/07 1252 DUDOMED,< 1(0).1(0).NTE(1) : >|2||STUCK X2< 1(0).1(0).NTE(2) : >|3||PT FEELING FAINT AFTER FIRST STICK< 1(0).1(1).OBR(0) : >|2|031507:RI1^LAB||2692^HERPES SIMPLEX VIRUS CULTURE^L|||200703151312|||||||200703151313||^O’BRYANT^LARRY^K^^^M.D.||||||||LAB|||^^^^^R< 1(0).1(1).NTE(0) : >|1||02/02/07 1252 DUDOMED,< 1(0).1(1).NTE(1) : >|2||STUCK X2< 1(0).1(1).NTE(2) : >|3||PT FEELING FAINT AFTER FIRST STICK< 1(0).1(2).OBR(0) : >|3|031507:RI1^LAB||34429^T3 FREE^L|||200703151312|||||||200703151313||^O’BRYANT^LARRY^K^^^M.D.||||||||LAB|||^^^^^R< 1(0).1(2).NTE(0) : >|1||02/02/07 1252 DUDOMED,< 1(0).1(2).NTE(1) : >|2||STUCK X2< 1(0).1(2).NTE(2) : >|3||PT FEELING FAINT AFTER FIRST STICK< When I add the OBX to the mix: Xlate { { OP PATHCOPY } { ERR 0 } { IN 1(0).0(%g1).OBX } { OUT 1(%g1).1(0).OBX } The Results is: [0:TEST] [mid:0x67fcf63c] The # 9 segment encountered ‘OBR’ is out of order for message type ‘ORM_O01’. Segment ignored. [0:TEST] [mid:0x67fcf63c] The # 14 segment encountered ‘OBR’ is out of order for message type ‘ORM_O01’. Segment ignored. 1(0).0(0).ORC(0) : >|NW|031507:RI1^LAB||2186||N|^^^^^R||200703151313< 1(0).1(0).OBR(0) : >|1|031507:RI1^LAB||2627^CYTOMEGALOVIRUS CULTURE, RAPID^L|||200703151312|||||||200703151313||^O’BRYANT^LARRY^K^^^M.D.||||||||LAB|||^^^^^R< 1(0).1(0).NTE(0) : >|1||02/02/07 1252 DUDOMED,< 1(0).1(0).NTE(1) : >|2||STUCK X2< 1(0).1(0).NTE(2) : >|3||PT FEELING FAINT AFTER FIRST STICK< 1(0).2(0).0(0).OBX(0) : >|1|TX|LAB.SRCE^CULTURE SOURCE?||CSF< 1(0).2(0).0(0).NTE(0) : >|1||02/02/07 1252 DUDOMED,< 1(0).2(0).0(0).NTE(1) : >|2||STUCK X2< 1(0).2(0).0(0).NTE(2) : >|3||PT FEELING FAINT AFTER FIRST STICK< If someone has some suggestions that would be great. Thanks! Lisa