LA7MUOBX ;ihs/cmi/maw - MU2 OBX Ask at Order Questions ; 22-Oct-2013 09:22 ; MAW
;;5.2;BLR IHS REFERENCE LAB;**1033**;NOV 01, 1997
;
OBX3(CS,AC,RI,RA) ;-- observation identifier
N OBX3,ROI,CD,TX
S CD=$P($G(^BLRRLO(RI,4,RA,0)),U,5)
S TX=$P($G(^BLRRLO(RI,4,RA,0)),U,3)
S OBX3=CD_CS_TX_CS_"LN"_CS_$E(TX,1,3)_CS_TX_CS_"L"_CS_"2.40"_CS_LA7VER
Q OBX3
;
OBX5(CS,AC,RI,RA) ;-- observation value
N OBX5,CMP,NM,VAL
S VAL=$P($G(^BLRRLO(RI,4,RA,0)),U,4)
I $E(VAL)?.N S CMP="",NM=VAL
I $E(VAL)="=" S CMP=$E(VAL,1),NM=$E(VAL,2,99)
I $E(VAL)="<" S CMP=$E(VAL,1),NM=$E(VAL,2,99)
I $E(VAL)=">" S CMP=$E(VAL,1),NM=$E(VAL,2,99)
S OBX5=CMP_CS_NM_CS_CS
Q OBX5
;
OBX6(CS) ;-- observation units
N OBX6
S OBX6="a"_CS_"Year"_CS_"UCUM"_CS_"Y"_CS_"Years"_CS_"L"_CS_"1.1"_CS_LA7VER ;hardcoded
Q OBX6
;
LA7MUOBX ;ihs/cmi/maw - MU2 OBX Ask at Order Questions ; 22-Oct-2013 09:22 ; MAW
+1 ;;5.2;BLR IHS REFERENCE LAB;**1033**;NOV 01, 1997
+2 ;
OBX3(CS,AC,RI,RA) ;-- observation identifier
+1 NEW OBX3,ROI,CD,TX
+2 SET CD=$PIECE($GET(^BLRRLO(RI,4,RA,0)),U,5)
+3 SET TX=$PIECE($GET(^BLRRLO(RI,4,RA,0)),U,3)
+4 SET OBX3=CD_CS_TX_CS_"LN"_CS_$EXTRACT(TX,1,3)_CS_TX_CS_"L"_CS_"2.40"_CS_LA7VER
+5 QUIT OBX3
+6 ;
OBX5(CS,AC,RI,RA) ;-- observation value
+1 NEW OBX5,CMP,NM,VAL
+2 SET VAL=$PIECE($GET(^BLRRLO(RI,4,RA,0)),U,4)
+3 IF $EXTRACT(VAL)?.N
SET CMP=""
SET NM=VAL
+4 IF $EXTRACT(VAL)="="
SET CMP=$EXTRACT(VAL,1)
SET NM=$EXTRACT(VAL,2,99)
+5 IF $EXTRACT(VAL)="<"
SET CMP=$EXTRACT(VAL,1)
SET NM=$EXTRACT(VAL,2,99)
+6 IF $EXTRACT(VAL)=">"
SET CMP=$EXTRACT(VAL,1)
SET NM=$EXTRACT(VAL,2,99)
+7 SET OBX5=CMP_CS_NM_CS_CS
+8 QUIT OBX5
+9 ;
OBX6(CS) ;-- observation units
+1 NEW OBX6
+2 ;hardcoded
SET OBX6="a"_CS_"Year"_CS_"UCUM"_CS_"Y"_CS_"Years"_CS_"L"_CS_"1.1"_CS_LA7VER
+3 QUIT OBX6
+4 ;