Clovertech
› Clovertech Forums › Read Only Archives › Cloverleaf › Cloverleaf › Need help with logic
Hi,
I have a large result (ORU) message coming in from a cath lab system that I am sending to an ancillary as a document (MDM). They only care about seeing the procedure log so all I do is iterate on the OBR
Carl,
That should be doable.
What you will probably need to do is to maintain your own iteration counter for the OUTBOUND only.
So if you are using %g1 for OBR repetitions and %g2 for OBX group repetitions for example, you would use %g3 for the OUTBOUND OBX group.
You would be responsible for incrementing,etc. the %g3 counter.
When referencing an iteration counter OUTSIDE the address path or ITERATION Action, if you prepend the counter with a $ you can reference it.
So an MATH ADD would have $%g3 and =1 in the Source and $%g3 in the Destination.
Within an address path you would use %g3 (no $).
I do this a lot.
Jim Kosloskey
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
Sorry for the lack of clarity…..
I need to group the OBX’s from both OBR’s and send them out based on the timestamp in OBX.14 no matter which of the OBR’s they come from.
Stick all of the OBX segments in an array using OBX.14 as the index/
After you have all of them, start appending tem where you want them like:
foreach idx [lsort -integer [array names obxArray]] {
lappend segments $obsArray($idx)
}
Does someone have a sample they’d be willing to share??
Thanks!!