source: FOIAVistA/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVSC2.m@ 1154

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

initial load of FOIAVistA 6/30/08 version

File size: 3.1 KB
Line 
1GMRVSC2 ;HIRMFO/YH,FT-CUMULATIVE V/M - CONTINUED ;6/13/01 10:12
2 ;;4.0;Vitals/Measurements;**1,7,11,13**;Apr 25, 1997
3SETLN ;
4 S GMRVER=^TMP($J,"GMRV",GMRDATE,GMRVTY,GMRVDA) N GMRVPO
5 D:IOSL<($Y+9) HDR Q:GMROUT W ! W:GMRVER "(E)"
6 I GPRT(GMRVTY)=0 D
7 . W ?4,$S(GMRVTY="T":"T: ",GMRVTY="P":"P: ",GMRVTY="R":"R: ",GMRVTY="BP":"B/P: ",GMRVTY="WT":"Wt: ",GMRVTY="HT":"Ht: ",GMRVTY="CG":"Circumference/Girth: ",GMRVTY="CVP":"Central Venous Pressure: ",GMRVTY="PO2":"Pulse Oximetry: ",1:"")
8 . I GMRVTY="PN" W ?4,"Pain: "
9 S GPRT(GMRVTY)=1
10 S GMRDAT=$G(^GMR(120.5,GMRVDA,0))
11 I "PRBPCVPCGPO2PN"[GMRVTY S GMRVX=GMRVTY,GMRVX(0)=$P(GMRDAT,"^",8) D
12 . I "UNAVAILABLEPASSREFUSED"[$$UP^XLFSTR(GMRVX(0)) W ?9,GMRVX(0) Q
13 . I GMRVTY="PN" D
14 . . I GMRVX(0)=0 W ?9,GMRVX(0)_" - No pain" Q
15 . . I GMRVX(0)=99 W ?9,GMRVX(0)_" - Unable to respond" Q
16 . . I GMRVX(0)=10 W ?9,GMRVX(0)_" - Worst imaginable pain" Q
17 . . W ?9,GMRVX(0) Q
18 . ;I GMRVTY'="PN" W ?9,GMRVX(0)
19 . D EN1^GMRVSAS0
20 . I GMRVTY="P",$D(^GMR(120.5,GMRVDA,5,"B",GPEDIS)),$P(GMRDAT,"^",8)=1 S GMRVX(1)=""
21 . S Z=$S(GMRVTY="CG":$J($P(GMRDAT,"^",8),0,2),GMRVTY="CVP":$J($P(GMRDAT,"^",8),0,1),GMRVTY'="BP":$J($P(GMRDAT,"^",8),3,0),1:$P(GMRDAT,"^",8)) D:GMRVTY'="BP" BLNK W:GMRVTY'="PN" ?9,Z_$S('$D(GMRVX(1)):" ",'GMRVX(1):"",1:"*")
22 . I GMRVTY="CG" W " in ("_$J(Z/.3937,0,2)_" cm)"
23 . I GMRVTY="CVP" W " cmH2O ("_$J(Z/1.36,0,1)_" mmHg)"
24 . I GMRVTY="PO2" S GMRVPO=$P(GMRDAT,"^",10) W "%"_$S(GMRVPO'="":" with supplemental O2 "_$S(GMRVPO["l/min":$P(GMRVPO," l/min")_"L/min",1:"")_$S(GMRVPO["l/min":$P(GMRVPO," l/min",2),1:GMRVPO),1:"")
25 I GMRVTY="T" S X=$P(GMRDAT,"^",8) D
26 . I X'>0 W ?9,X Q
27 . S GMRVX=GMRVTY,GMRVX(0)=X D EN1^GMRVSAS0
28 . D EN1^GMRVUTL S:'Y Y="" S Z=$J(X,5,1) D BLNK W ?9,Z_" F " S Z=$J(Y,4,1) D BLNK W "("_Z_" C)"_$S('$D(GMRVX(1)):" ",'GMRVX(1):"",1:"*")
29 I GMRVTY="HT" S X=$P(GMRDAT,"^",8) D
30 . I X'>0 W ?9,X Q
31 . D EN2^GMRVUTL S:'Y Y="" S Z=$J(X,5,2) D BLNK W ?9,Z_" in " S Z=$J(Y,5,2) D BLNK W "("_Z_" cm)" I 'GMRVER S GMRVHT=Z/100
32 I GMRVTY="WT" S X=$P(GMRDAT,"^",8) D
33 . I X'>0 W ?9,X Q
34 . D EN3^GMRVUTL S:'Y Y="" S Z=$J(X,7,2) D BLNK W ?9,Z_" lb " S Z=$J(Y,6,2) D BLNK W "("_Z_" kg)"
35 Q:+$P(GMRDAT,"^",8)'>0&(+$P($G(^GMR(120.5,GMRVDA,5,0)),"^",4)'>0) S GMRVITY=+$P(GMRDAT,"^",3)
36 K GMRVARY S (GMRZZ,GMRVARY)="" I $P($G(^GMR(120.5,GMRVDA,5,0)),"^",4)>0 D
37 . D CHAR^GMRVCHAR(GMRVDA,.GMRVARY,GMRVITY) S GMRZZ=$$WRITECH^GMRVCHAR(GMRVDA,.GMRVARY,9) S:GMRZZ'=""&(GMRVTY'="PO2") GMRZZ=" ("_GMRZZ_")"
38 . W:GMRVTY="PO2" !,?8," via " W GMRZZ
39 I GMRVTY="WT",'GMRVER S GMRBMI="",GMRBMI(1)=$P(GMRDAT,"^"),GMRBMI(2)=+$P(GMRDAT,"^",8) D CALBMI^GMRVBMI(.GMRBMI) W:GMRBMI>0 !,?4,"Body Mass Index: "_GMRBMI
40 K Z Q
41HDR ;
42 I 'GMR1ST D FOOTER^GMRVSC0
43 I $E(IOST)'="P",'GMR1ST W "Press return to continue ""^"" to escape " R X:DTIME I X="^"!'$T S GMROUT=1 Q
44 W:'($E(IOST)'="C"&'$D(GFLAG)) @IOF S GMRPG=GMRPG+1,GFLAG=1
45 W !,GMRPDT,?25,"Cumulative Vitals/Measurements Report",?70,"Page ",GMRPG,!!,$E(GMRDSH,1,78)
46 I 'GMR1ST,$P(GMRDATE,".")=GMRDATE(0) W !,$E(GMRDATE(0),4,5)_"/"_$E(GMRDATE(0),6,7)_"/"_$E(GMRDATE,2,3)_" (continued)",!
47 S GMR1ST=0
48 Q
49BLNK ;
50 F I=1:1:$L(Z) Q:$E(Z,I)'=" "
51 S Z=$E(Z,I,$L(Z))
52 Q
Note: See TracBrowser for help on using the repository browser.