We are running Epic to LabCorp orders interface.
Cloverleaf 6.1 Converting to 6.2 on AIX.
Currently I do this with a TCL script. But would like to move it to a translation.
We get from Epic this iteration of OBX segments. We have at least 5 different Z segments to create.
2(0).1(0).2(0).0(0).OBX(0) : >|1|ST|ZCI2-1^HEIGHT||62|||||||||<
2(0).1(0).2(0).0(1).OBX(0) : >|2|ST|ZCI3-1^WEIGHT||111|||||||||<
2(0).1(0).2(0).0(12).OBX(0) : >|13|ST|ZCI2-2^HEIGHT UNITS||IN|||||||||<
2(0).1(0).2(0).0(13).OBX(0) : >|14|ST|ZCI3-2^WEIGHT UNITS||LB|||||||||<
2(0).1(0).2(0).0(14).OBX(0) : >|15|ST|ZCI4-2^URINE VOLUME UNITS||ML|||||||||<
2(0).1(0).2(0).0(15).OBX(0) : >|16|ST|ZCI5-1^FASTING?||N|||||||||<
OBX.3 hold the Segment field and subfield to put the value in OBX.5 into.
I know I could add dozens of IF statements and do it. But I’m hoping for a more elegant way to do this.
So the above ideally would become
ZCI|62^IN|111^LB|^ML|N
So is there a way to take the ZCI(5-1) as a variable in use it in the destination field ?
IN OBX(0).#5 Copy Out ZCI(0).#($Var).($Var1)
I have tried multiple variations but it seems this can’t be done.
But I know there a lot of experienced people here and they may have done this.
Thanks for taking the time to review.