source: WorldVistAEHR/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVUT3.m@ 1211

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

initial load of WorldVistAEHR

File size: 3.2 KB
Line 
1GMRVUT3 ;HIRMFO/YH,FT-VITAL MEASUREMENT SITE/QUALIFIER SELECTIO ;6/13/01 10:12
2 ;;4.0;Vitals/Measurements;**1,11,13**;Apr 25, 1997
3SETSITE ;SET THE V/M SITE FOR THE VARIAVLE GMRSITE
4 ;GMRV WAS SET BY THE CALLING ROUTINE
5 N G S G="" F S G=$O(GMRW(G)) Q:G="" I $E(G,1,$L(GMRSITE))=GMRSITE S GMRV=GMRV+1,GMRV(GMRV)=G
6 Q:GMRV=0 I GMRV=1 S (GMRSITE(GMRVITY),GMRSITE)=GMRV(GMRV)_"^"_$G(GMRW(GMRV(GMRV))) Q
7ASK W !!,GMRVIT(1)_":",! S G=0 F S G=$O(GMRV(G)) Q:G'>0 W !,?5,G_". "_GMRV(+G)
8 W !!,"Select a number between 1 and "_GMRV_": " S G(1)=0 R G(1):DTIME I '$T!(G(1)["^") S GMROUT=1 Q
9 I $L(G(1))>3 G ASK
10 I '$D(GMRV(+G(1))) G ASK
11 S (GMRSITE,GMRSITE(GMRVITY))=GMRV(+G(1))_"^"_$G(GMRW(GMRV(+G(1))))
12 Q
13ROOMSEL ;
14 W ! W:$G(GMRMSL($G(I(1))))'="" I(1),". ",?6,$G(GMRMSL(I(1))) W:$G(GMRMSL($G(I(2))))'="" ?16,I(2),". ",$G(GMRMSL(I(2))) W:$G(GMRMSL($G(I(3))))'="" ?33,I(3),". ",$G(GMRMSL(I(3)))
15 W:$G(GMRMSL($G(I(4))))'="" ?49,I(4),". ",$G(GMRMSL(I(4))) W:$G(GMRMSL($G(I(5))))'="" ?65,I(5),". ",$G(GMRMSL(I(5)))
16 S I(1)=(I(1)+1),I(2)=(I(2)+1),I(3)=(I(3)+1),I(4)=(I(4)+1),I(5)=(I(5)+1)
17 Q
18GIRTH ;INPUT TRANSFORM FOR CIRCUMFERENCE/GIRTH
19 Q:"UNAVAILABLEPASSREFUSED"[$$UP^XLFSTR(X) N UNIT S UNIT=$$UP^XLFSTR($P(X,+X,2)),X=+X I UNIT="" S UNIT="I" Q
20 I UNIT="C" S X=$J(.3937*X,0,2),UNIT="I"
21 I UNIT'="I" K X Q
22 K:+X'=X!(X>200)!(X<0) X
23 Q
24CVP ;INPUT TRANSFORM FOR CVP
25 Q:"UNAVAILABLEPASSREFUSED"[$$UP^XLFSTR(X) N UNIT S UNIT=$$UP^XLFSTR($P(X,+X,2)) I $L(UNIT)>1!($L(UNIT)=1&($E(UNIT)'="G")) K X Q
26 I UNIT'="" S X=X*1.36
27 K:X<-13.6!(X>136) X
28 Q
29O2 ;SUPPLEMENTAL O2 FOR PULSE OXIMETRY
30 N %,GMRV,GMRZ,GMRX,GMRY S (GMRSITE(GMRVITY),GMRINF(GMRVITY),GMRO2(GMRVITY))=""
31ASKO2 S %=1 W !,"Is the patient on supplemental oxygen" D YN^DICN I %<0 S GMROUT=1 Q
32 I %=0 G ASKO2
33 Q:%=2
34ASKINF W !!,"Enter the numeric value(s) for amount of supplemental oxygen provided",!,"(Separate values with a ',') : "
35 S GMRV="" R GMRV:DTIME I '$T!(GMRV["^") S GMROUT=1 Q
36 I $L(GMRV)>15 G ASKINF
37 I GMRV["?" W !!,"Enter a number between 0.5-20 for liters/minute, and/or ",!,?23,"21-100 for percent of oxygen concentration.",!,"If you wish to enter both rates, separate the values with a ','.",! G ASKINF
38 Q:GMRV=""
39 S GMRZ=0 D CHECK I GMRZ W !!,"ERROR ENTRY!",! G ASKINF
40 I (GMRX["l/min"&(GMRY["l/min"))!(GMRX["%"&(GMRY["%")) W !!,"ERROR ENTRY!" G ASKINF
41 I GMRY'="" D
42 .N GMRVPO
43 .I GMRX'["l/min",(GMRY["l/min") S:GMRX["%" GMRVPO=GMRY,GMRY=GMRX,GMRX=GMRVPO
44 .Q
45 S GMRO2(GMRVITY)=GMRX S:GMRY'="" GMRO2(GMRVITY)=GMRO2(GMRVITY)_$S(GMRO2(GMRVITY)="":"",1:" ")_GMRY S:GMRO2(GMRVITY)'="" GMRO2(GMRVITY)=GMRO2(GMRVITY)
46 S GLVL=8 D LISTQ^GMRVQUAL
47 Q:'$D(GCHART1)
48ASKM S GMRV=$O(GCOUNT(1,GMRV))
49 N GMRVSAVE
50 S GMRVSAVE=GMRV
51ASKM1 S GMRV=GMRVSAVE
52 W !,"Oxygen is supplied by",!
53 F I=1:1:GCOUNT(1,GMRV) W !,?5,I_" "_$P(GCHART1(I),"^")
54 W !,"Enter a number: " S GMRV="" R GMRV:DTIME I '$T!(GMRV["^") S GMROUT=1 Q
55 I $L(GMRV)>3 G ASKM1
56 I $D(GCHART1(+GMRV)) S GMRSITE(GMRVITY)=GCHART1(+GMRV) Q
57 I '$D(GCHART1(+GMRV)) G ASKM1
58 I GMRV["?" G ASKM1
59 Q
60CHECK ;
61 S GMRY=$P($G(GMRV),","),GMRX=$P($G(GMRV),",",2)
62 I GMRX'="" D O2DATA(.GMRX,.GMRZ) Q:GMRZ
63 I GMRY'="" D O2DATA(.GMRY,.GMRZ)
64 Q
65O2DATA(I,J) ;
66 I '(I>0&(I<100.001)) S J=1 Q
67 I I<20.01,I?0.3N0.1"."0.1N S I=I_" l/min" Q
68 I I>20&(I<100.001),I?1.3N S I=I_"%" Q
69 S J=1
70 Q
Note: See TracBrowser for help on using the repository browser.