Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: LRLRRVF

LRLRRVF.m

Go to the documentation of this file.
  1. LRLRRVF ;VA/SLC/GDU - LAB REFERENCE RANGE VALUE FORMATTING - LAB UTILITY; 22-Oct-2013 09:22 ; MKK
  1. ;;5.2;LAB SERVICE;**372,1027,1033**;NOV 01, 1997
  1. ;
  1. EN(RLV,RHV) ;Entry point for this routine
  1. ;RLV - Range low value
  1. ;RHV - Range high value
  1. ;
  1. ;If both are null return the low value and quit
  1. ; I RLV="",RHV="" Q RLV
  1. I $TR(RLV," ")="",$TR(RHV," ")="" Q RLV ; IHS/MSC/MKK - LR*5.2*1033
  1. ;
  1. I RLV["Ref"&(RHV="") Q RLV
  1. I RHV["REF"&(RLV="") Q RHV
  1. I RLV["Ref"&(RHV["Ref") Q $$TRIM^XLFSTR($P(RLV,"Ref:",2)_" "_$P(RHV,"Ref:",2),"LR"," ")
  1. ;
  1. ;If only the low is defined
  1. I RLV'="",RHV="" D Q RLV
  1. . I $E(RLV)'?1N S RLV="Ref: "_RLV Q ; IHS/MSC/MKK - LR*5.2*1033 -- If first character is non-numeric, just return it
  1. . I RLV=0 S RLV="Ref: >="_RLV Q
  1. . I ($E(RLV,1,1)="<")!($E(RLV,1,1)=">") S RLV="Ref: "_RLV Q
  1. . I (RLV?.N.".".N) S RLV="Ref: >="_RLV Q
  1. . S RLV="Ref: "_RLV
  1. ;
  1. ;If only the high is defined
  1. I RLV="",RHV'="" D Q RHV
  1. . I $E(RHV)'?1N S RHV="Ref: "_RHV Q ; IHS/MSC/MKK - LR*5.2*1033 -- If first character is non-numeric, just return it
  1. . I RHV=0 S RHV="Ref: "_RHV Q
  1. . I ($E(RHV,1,1)="<")!($E(RHV,1,1)=">") S RHV="Ref: "_RHV Q
  1. . I (RHV?.N.".".N) S RHV="Ref: <="_RHV Q
  1. . S RHV="Ref: "_RHV
  1. ;
  1. ;If both are defined
  1. Q RLV_" - "_RHV