source: FOIAVistA/trunk/r/GEN_MED_OTHER-GMV/GMVDCCHK.m@ 1250

Last change on this file since 1250 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.9 KB
Line 
1GMVDCCHK ;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 ;
7VALID(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 ;
27AG(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 ;
32AUD(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 ;
38BP(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 ;
45CG(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 ;
50CVP(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 ;
55FH(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 ;
60FT(X) ; FETAL HEART TONES
61 K:X'=+X!(X>250)!(X<50)!(X?.E1".".N) X
62 Q ''$D(X)
63 ;
64HC(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 ;
74HE(X) ; HEARING
75 K:"^A^N^"'[(U_X_U) X
76 Q ''$D(X)
77 ;
78HT(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 ;
83P(X) ; PULSE
84 K:+X'=X!(X>300)!(X<0)!(X?.E1".".N) X
85 Q ''$D(X)
86 ;
87PN(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 ;
91PO2(X) ; PULSE OXIMETRY
92 K:X<0!(X>100)!(X?.E1".".N) X
93 Q ''$D(X)
94 ;
95R(X) ; RESPIRATION
96 K:X'=+X!(X>100)!(X<0)!(X?.E1".".N) X
97 Q ''$D(X)
98 ;
99T(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 ;
104TON(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 ;
110VC(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 ;
116VU(X) ; VISION UNCORRECTED
117 Q $$VC(X)
118 ;
119WT(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)
Note: See TracBrowser for help on using the repository browser.