LRLRRVF ;LAB REFERENCE RANGE VALUE FORMATTING - LAB UTILITY; SLC-GDU; 5/25/07 3:50pm ; 5/29/07 3:21pm
;;5.2;LAB SERVICE;**372**;Sep 27, 1994;Build 11
EN(RLV,RHV) ;Entry point for this routine
;RLV - Range low value
;RHV - Range high value
;If both are null return the low value and quit
I RLV="",RHV="" Q RLV
;If only the low is defined
I RLV'="",RHV="" D Q RLV
. I RLV=0 S RLV="Ref: >="_RLV Q
. I ($E(RLV,1,1)="<")!($E(RLV,1,1)=">") S RLV="Ref: "_RLV Q
. I (RLV?.N.".".N) S RLV="Ref: >="_RLV Q
. S RLV="Ref: "_RLV
;If only the high is defined
I RLV="",RHV'="" D Q RHV
. I RHV=0 S RHV="Ref: "_RHV Q
. I ($E(RHV,1,1)="<")!($E(RHV,1,1)=">") S RHV="Ref: "_RHV Q
. I (RHV?.N.".".N) S RHV="Ref: <="_RHV Q
. S RHV="Ref: "_RHV
;If both are defined
Q RLV_" - "_RHV
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRLRRVF 799 printed Oct 16, 2024@18:17:32 Page 2
LRLRRVF ;LAB REFERENCE RANGE VALUE FORMATTING - LAB UTILITY; SLC-GDU; 5/25/07 3:50pm ; 5/29/07 3:21pm
+1 ;;5.2;LAB SERVICE;**372**;Sep 27, 1994;Build 11
EN(RLV,RHV) ;Entry point for this routine
+1 ;RLV - Range low value
+2 ;RHV - Range high value
+3 ;If both are null return the low value and quit
+4 IF RLV=""
IF RHV=""
QUIT RLV
+5 ;If only the low is defined
+6 IF RLV'=""
IF RHV=""
Begin DoDot:1
+7 IF RLV=0
SET RLV="Ref: >="_RLV
QUIT
+8 IF ($EXTRACT(RLV,1,1)="<")!($EXTRACT(RLV,1,1)=">")
SET RLV="Ref: "_RLV
QUIT
+9 IF (RLV?.N.".".N)
SET RLV="Ref: >="_RLV
QUIT
+10 SET RLV="Ref: "_RLV
End DoDot:1
QUIT RLV
+11 ;If only the high is defined
+12 IF RLV=""
IF RHV'=""
Begin DoDot:1
+13 IF RHV=0
SET RHV="Ref: "_RHV
QUIT
+14 IF ($EXTRACT(RHV,1,1)="<")!($EXTRACT(RHV,1,1)=">")
SET RHV="Ref: "_RHV
QUIT
+15 IF (RHV?.N.".".N)
SET RHV="Ref: <="_RHV
QUIT
+16 SET RHV="Ref: "_RHV
End DoDot:1
QUIT RHV
+17 ;If both are defined
+18 QUIT RLV_" - "_RHV