- This topic has 4 replies, 3 voices, and was last updated 15 years, 4 months ago by .
-
Topic
-
I am trying to write my first translation with the “iterate” function…. and need some help. First, here’s an example of an HL7 message I want to translate:
MSH|^~&|PCM|L|RAD|L|20090605133706|OkToBundle|ORM^O01|94520|P|2.2|||AL|NE
PID|1|00001316|0001205^^^ST02L^MR^L||DIAMOND^NEIL^S||19450506000000|M||||||||||0915600007^^^L|678-90-1234
PV1|1|O|RAD^^^L||||255^COOK^RANDOLPH^B^^MD^MD|||MED|||||||255^COOK^RANDOLPH^B^^MD^MD|OP||SP|||||||||||||||||||L|||||20090605132100
ORC|PA|315795^PCM|315795^PCM|41943|SC||1^STAT^O1^20090605133600^20090605133600^4||20090605133702|ISADANG^DANG^ANH^N^^DP^SA||255^COOK^RANDOLPH^B^^MD^MD|MED||20090605133702|||MED|ISADANG^DANG^ANH^N^^DP^SA
OBR|1|315795^PCM|315795^PCM|30210^CCL EKG PRE OR POST PROC^PCM||20090605133702||||||||||255^COOK^RANDOLPH^B^^MD^MD|||||||||||1^STAT^01^20090605133600^20090605133600^4|||BO2^BED W/O2|^CHEST PAIN
OBX|1|ST|CODPROMPT-ISOL^PATIENT IN ISOLATION|1|STANDARD PRECAUTIONS
ORC|NW|315796^PCM||41943|SC||1^^^20090605133600^^4|315795&PCM|20090605133702|ISADANG^DANG^ANH^N^^DP^SA||255^COOK^RANDOLPH^B^^MD^MD|MED||20090605133702|||MED|ISADANG^DANG^ANH^N^^DP^SA
OBR|1|315796^PCM||30210^CCL EKG PRE OR POST PROC^PCM||20090605133702||||||||||255^COOK^RANDOLPH^B^^MD^MD|||||||||||1^STAT^01^20090605133600^^4|||BO2^BED W/O2|^CHEST PAIN|||||20090605133600
OBX|1|ST|CODPROMPT-ISOL^PATIENT IN ISOLATION|1|STANDARD PRECAUTIONS
Note that it has two OBR segments – and the values I wish to blank out are in the OBR-27.2 and the OBR-27.3 (“STAT” and “01”, respectively)
The translate I have written blanks out the appropriate values in the 1st instance of the OBR, but not the second.
I defined 2 iterate statements:
the first iterate details – ENGINE=group, basis=2(0).1(0), variable=%g1
then subordinate to the first iteration is the second –
The 2nd iterate details – ENGINE=field, basis=2(0).1(%g1).0(0).OBR.00221, variable=%f1
Then I have the staement –
@null @null -> {2(0).1(0).0(0).OBR.00221(%f1).[1] {2(0).1(0).0(0).OBR.00221(%f1).[2]
This all succeeds in correcting one of the OBR statements, but not both…
Any help would be appreciated!
Thanks!
Tom Arrowsmith
(703) 779-5474
- The forum ‘Cloverleaf’ is closed to new topics and replies.