SROAMEAS ;BIR/MAM - INPUT TRANSFORMS, HEIGHT & WEIGHT ;06/09/09
;;3.0; Surgery ;**38,125,153,166,170**;24 Jun 93;Build 3
H Q:'$D(X) I X'?.N1"C"&(X'?.N1"c"),(+X'=X) K X Q
I +X=X S X=X+.5\1 I X'>24.9!(X'<86.1) K X Q
S:X["c" X=+X_"C"
I X?.N1"C",(X'>62.9!(X'<218.1)) K X
Q
W Q:'$D(X) I +X'=X,(X'?.N1"K")&(X'?.N1"k") K X Q
I +X=X S X=X+.5\1 I X'>49.9!(X'<700.1) K X Q
S:X["k" X=+X_"K"
I X?.N1"K",(X'>22.9!(X'<318.1)) K X
Q
HWC ; reject NS entry if the case is cardiac one
S X=$S(X="ns":"NS",1:X)
I $P($G(^SRF($S($G(SRTN):SRTN,1:DA),"RA")),"^",2)="C",X="NS" S X=""
Q
SROAMEAS ;BIR/MAM - INPUT TRANSFORMS, HEIGHT & WEIGHT ;06/09/09
+1 ;;3.0; Surgery ;**38,125,153,166,170**;24 Jun 93;Build 3
H IF '$DATA(X)
QUIT
IF X'?.N1"C"&(X'?.N1"c")
IF (+X'=X)
KILL X
QUIT
+1 IF +X=X
SET X=X+.5\1
IF X'>24.9!(X'<86.1)
KILL X
QUIT
+2 IF X["c"
SET X=+X_"C"
+3 IF X?.N1"C"
IF (X'>62.9!(X'<218.1))
KILL X
+4 QUIT
W IF '$DATA(X)
QUIT
IF +X'=X
IF (X'?.N1"K")&(X'?.N1"k")
KILL X
QUIT
+1 IF +X=X
SET X=X+.5\1
IF X'>49.9!(X'<700.1)
KILL X
QUIT
+2 IF X["k"
SET X=+X_"K"
+3 IF X?.N1"K"
IF (X'>22.9!(X'<318.1))
KILL X
+4 QUIT
HWC ; reject NS entry if the case is cardiac one
+1 SET X=$SELECT(X="ns":"NS",1:X)
+2 IF $PIECE($GET(^SRF($SELECT($GET(SRTN):SRTN,1:DA),"RA")),"^",2)="C"
IF X="NS"
SET X=""
+3 QUIT