[613] | 1 | GMVDCCHK ;HOIFO/DAD,FT-VITALS COMPONENT: CHECK DATA VALUE ;9/29/00 09:15
|
---|
| 2 | ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
|
---|
| 3 | ;
|
---|
| 4 | ; This routine uses the following IAs:
|
---|
| 5 | ; #10104 - ^XLFSTR calls (supported)
|
---|
| 6 | ;
|
---|
| 7 | VALID(GMVALUE,GMVMSYS,GMVTYPE) ;
|
---|
| 8 | ; *** Validate a vital measurement ***
|
---|
| 9 | ; Input:
|
---|
| 10 | ; GMVALUE = The vital measurement to be validated
|
---|
| 11 | ; GMVMSYS = The measurement system the measurement is expressed in
|
---|
| 12 | ; (C - US Customary, M - Metric)
|
---|
| 13 | ; GMVTYPE = A vital type abbreviation
|
---|
| 14 | ; Output:
|
---|
| 15 | ; 0 - Invalid, 1 - Valid
|
---|
| 16 | S GMVTYPE=$$UP^XLFSTR(GMVTYPE)
|
---|
| 17 | I $T(@GMVTYPE)]"" D
|
---|
| 18 | . N GMVCODE,GMVOK
|
---|
| 19 | . S GMVCODE="S GMVOK=$$"_GMVTYPE_"(GMVALUE)"
|
---|
| 20 | . X GMVCODE I 'GMVOK K GMVALUE
|
---|
| 21 | . Q
|
---|
| 22 | E D
|
---|
| 23 | . K GMVALUE
|
---|
| 24 | . Q
|
---|
| 25 | Q ''$D(GMVALUE)
|
---|
| 26 | ;
|
---|
| 27 | AG(X) ; ABDOMINAL GIRTH
|
---|
| 28 | S X=$$CNV^GMVDCCNV(X,GMVMSYS,"S",GMVTYPE)
|
---|
| 29 | K:X'=+X!(X>150)!(X<0)!(X?.E1".".N) X
|
---|
| 30 | Q ''$D(X)
|
---|
| 31 | ;
|
---|
| 32 | AUD(X) ; AUDIOMETRY
|
---|
| 33 | N I,Y
|
---|
| 34 | K:X'?.N1"/".N1"/".N1"/".N1"/".N1"/".N1"/".N1"/".N1"/".N1"/".N1"/".N1"/".N1"/".N1"/".N1"/".N1"/".N1"/" X
|
---|
| 35 | I $D(X) F I=1:1:16 S Y=$P(Y,"/",I) I Y]"" I Y'=+Y!(Y>110)!(Y<0) K X Q
|
---|
| 36 | Q ''$D(X)
|
---|
| 37 | ;
|
---|
| 38 | BP(X) ; BLOOD PRESSURE
|
---|
| 39 | N I,Y
|
---|
| 40 | K:(X'?1.3N1"/"1.3N1"/"1.3N)&(X'?1.3N1"/"1.3N)&(X'?1.3N) X
|
---|
| 41 | I $D(X) F I=1:1:$L(X,"/") S Y=$P(X,"/",I) I Y]"" I Y<0!(Y>300) K X Q
|
---|
| 42 | I $D(X),(X'?1.3N),$P(X,"/")'>$P(X,"/",$L(X,"/")) K X
|
---|
| 43 | Q ''$D(X)
|
---|
| 44 | ;
|
---|
| 45 | CG(X) ; CIRCUMFERENCE/GIRTH
|
---|
| 46 | S X=$$CNV^GMVDCCNV(X,GMVMSYS,"S",GMVTYPE)
|
---|
| 47 | K:X'=+X!(X>200)!(X<0)!(X?.E1"."3.N) X
|
---|
| 48 | Q ''$D(X)
|
---|
| 49 | ;
|
---|
| 50 | CVP(X) ; CENTRAL VENOUS PRESSURE
|
---|
| 51 | S X=$$CNV^GMVDCCNV(X,GMVMSYS,"S",GMVTYPE)
|
---|
| 52 | K:X<-13.6!(X>136)!(X?.E1"."2.N) X
|
---|
| 53 | Q ''$D(X)
|
---|
| 54 | ;
|
---|
| 55 | FH(X) ; FUNDAL HEIGHT
|
---|
| 56 | S X=$$CNV^GMVDCCNV(X,GMVMSYS,"S",GMVTYPE)
|
---|
| 57 | K:X'=+X!(X>50)!(X<10)!(X?.E1".".N) X
|
---|
| 58 | Q ''$D(X)
|
---|
| 59 | ;
|
---|
| 60 | FT(X) ; FETAL HEART TONES
|
---|
| 61 | K:X'=+X!(X>250)!(X<50)!(X?.E1".".N) X
|
---|
| 62 | Q ''$D(X)
|
---|
| 63 | ;
|
---|
| 64 | HC(X) ; HEAD CIRCUMFERENCE
|
---|
| 65 | I GMVMSYS="M" D
|
---|
| 66 | . K:+X>76!(+X<26)!(X?.E1"."3.N) X
|
---|
| 67 | . Q
|
---|
| 68 | I GMVMSYS="C" D
|
---|
| 69 | . K:+X>30!(+X<10)!(X?.E1"."4.N) X
|
---|
| 70 | . I $D(X),X#1>0 K:"^.125^.25^.375^.5^.625^.75^.875^"'[(U_(X#1)_U) X
|
---|
| 71 | . Q
|
---|
| 72 | Q ''$D(X)
|
---|
| 73 | ;
|
---|
| 74 | HE(X) ; HEARING
|
---|
| 75 | K:"^A^N^"'[(U_X_U) X
|
---|
| 76 | Q ''$D(X)
|
---|
| 77 | ;
|
---|
| 78 | HT(X) ; HEIGHT
|
---|
| 79 | S X=$$CNV^GMVDCCNV(X,GMVMSYS,"S",GMVTYPE)
|
---|
| 80 | K:X'=+X!(X>100)!(X<1)!(X?.E1"."3.N) X
|
---|
| 81 | Q ''$D(X)
|
---|
| 82 | ;
|
---|
| 83 | P(X) ; PULSE
|
---|
| 84 | K:+X'=X!(X>300)!(X<0)!(X?.E1".".N) X
|
---|
| 85 | Q ''$D(X)
|
---|
| 86 | ;
|
---|
| 87 | PN(X) ; PAIN
|
---|
| 88 | K:"^0^1^2^3^4^5^6^7^8^9^10^99^"'[(U_X_U) X
|
---|
| 89 | Q ''$D(X)
|
---|
| 90 | ;
|
---|
| 91 | PO2(X) ; PULSE OXIMETRY
|
---|
| 92 | K:X<0!(X>100)!(X?.E1".".N) X
|
---|
| 93 | Q ''$D(X)
|
---|
| 94 | ;
|
---|
| 95 | R(X) ; RESPIRATION
|
---|
| 96 | K:X'=+X!(X>100)!(X<0)!(X?.E1".".N) X
|
---|
| 97 | Q ''$D(X)
|
---|
| 98 | ;
|
---|
| 99 | T(X) ; TEMPERATURE
|
---|
| 100 | S X=$$CNV^GMVDCCNV(X,GMVMSYS,"S",GMVTYPE)
|
---|
| 101 | K:X'=+X!(X>120)!(X<45)!(X?.E1"."3.N) X
|
---|
| 102 | Q ''$D(X)
|
---|
| 103 | ;
|
---|
| 104 | TON(X) ; TONOMETRY
|
---|
| 105 | N I,Y
|
---|
| 106 | K:(X'?1.2N1"/"1.2N)&(X'?1.2N1"/")&(X'?1"/"1.2N) X
|
---|
| 107 | I $D(X) F I=1,2 S Y=$P(X,"/",I) I Y]"" I Y'=+Y!(Y>80)!(Y<0) K X Q
|
---|
| 108 | Q ''$D(X)
|
---|
| 109 | ;
|
---|
| 110 | VC(X) ; VISION CORRECTED
|
---|
| 111 | N I,Y
|
---|
| 112 | K:(X'?1.3N1"/"1.3N)&(X'?1.3N1"/")&(X'?1"/"1.3N) X
|
---|
| 113 | I $D(X) F I=1,2 S Y=$P(X,"/",I) I Y]"" I Y'=+Y!(Y>999)!(Y<10) K X Q
|
---|
| 114 | Q ''$D(X)
|
---|
| 115 | ;
|
---|
| 116 | VU(X) ; VISION UNCORRECTED
|
---|
| 117 | Q $$VC(X)
|
---|
| 118 | ;
|
---|
| 119 | WT(X) ; WEIGHT
|
---|
| 120 | S X=$$CNV^GMVDCCNV(X,GMVMSYS,"S",GMVTYPE)
|
---|
| 121 | K:X'=+X!(X>1500)!(X'>0)!(X?.E1"."3.N) X
|
---|
| 122 | Q ''$D(X)
|
---|