GMVUT0 ;HIOFO/RM,YH,FT-INPUT TRANSFORMS FOR VITAL TYPES ;2/5/02 14:54
;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
;
; This routine uses the following IAs:
; <None>
;
EN3 ; INPUT TRANSFORM FOR HEIGHT RATES
; Called from ^GMRD(120.51,8,1)
N GMR
S GMR=$P(X,+X,2,10) I GMR="" S X=0 Q
I $E(GMR)="C"!($E(GMR)="c")&("CMCmcMcm"[GMR) S X=$J(.3937*(+X),0,2) Q
I $E(GMR)="I"!($E(GMR)="i")!($E(GMR)="""") S X=+X Q
I $E(GMR)="F"!($E(GMR)="f")!($E(GMR)="'") D FTIN Q
S X=0
Q
FTIN ; Feet and Inches
N GMRF,GMRIN,GMRXX,GMRYY
S GMRF=$E(GMR),GMR=$E(GMR,2,$L(GMR)) F GMRXX=1:0 S GMRYY=$E(GMR) Q:GMRYY?1N!(GMRYY="") S GMRF=GMRF_GMRYY,GMR=$E(GMR,2,$L(GMR))
I "FTFtfTft'"'[GMRF Q
S GMRIN=$P(GMR,+GMR,2) I "INIniNin""''"'[GMRIN!(GMRIN="'") Q
S X=+X*12+(+GMR)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HGMVUT0 781 printed Dec 13, 2024@01:59:59 Page 2
GMVUT0 ;HIOFO/RM,YH,FT-INPUT TRANSFORMS FOR VITAL TYPES ;2/5/02 14:54
+1 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
+2 ;
+3 ; This routine uses the following IAs:
+4 ; <None>
+5 ;
EN3 ; INPUT TRANSFORM FOR HEIGHT RATES
+1 ; Called from ^GMRD(120.51,8,1)
+2 NEW GMR
+3 SET GMR=$PIECE(X,+X,2,10)
IF GMR=""
SET X=0
QUIT
+4 IF $EXTRACT(GMR)="C"!($EXTRACT(GMR)="c")&("CMCmcMcm"[GMR)
SET X=$JUSTIFY(.3937*(+X),0,2)
QUIT
+5 IF $EXTRACT(GMR)="I"!($EXTRACT(GMR)="i")!($EXTRACT(GMR)="""")
SET X=+X
QUIT
+6 IF $EXTRACT(GMR)="F"!($EXTRACT(GMR)="f")!($EXTRACT(GMR)="'")
DO FTIN
QUIT
+7 SET X=0
+8 QUIT
FTIN ; Feet and Inches
+1 NEW GMRF,GMRIN,GMRXX,GMRYY
+2 SET GMRF=$EXTRACT(GMR)
SET GMR=$EXTRACT(GMR,2,$LENGTH(GMR))
FOR GMRXX=1:0
SET GMRYY=$EXTRACT(GMR)
if GMRYY?1N!(GMRYY="")
QUIT
SET GMRF=GMRF_GMRYY
SET GMR=$EXTRACT(GMR,2,$LENGTH(GMR))
+3 IF "FTFtfTft'"'[GMRF
QUIT
+4 SET GMRIN=$PIECE(GMR,+GMR,2)
IF "INIniNin""''"'[GMRIN!(GMRIN="'")
QUIT
+5 SET X=+X*12+(+GMR)
+6 QUIT