source: FOIAVistA/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVSR1.m@ 1650

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

initial load of FOIAVistA 6/30/08 version

File size: 4.8 KB
Line 
1GMRVSR1 ;HIRMFO/RM,YH-PATIENT VITAL SIGNS-I/O SF 511 GRAPH - 1 ;2/7/99
2 ;;4.0;Vitals/Measurements;**1,7,9**;Apr 25, 1997
3SF511 ;PRODUCE PATIENT VITAL SIGNS-I/O GRAPH
4 S GRPT=5,GMRHT=0 D SETIO^GMRVGR0 D DEM^VADPT,INP^VADPT S GMRBTH=$P(VADM(3),"^",2),GMRNAM=VADM(1)
5 F GMRK="P","T","B","H","W","R","PO2","CVP","CG","XI1","PN" D GMRDT^GMRVVS3
6 I $D(^TMP($J,"GMRVG","I")) F GMRI=0:0 S GMRI=$O(^TMP($J,"GMRVG","I",GMRI)) Q:GMRI'>0 S GFOUND=0 D CKDT^GMRVVS3 S:GFOUND=0 ^TMP($J,"GMRDT",GMRI)=""
7 I $D(^TMP($J,"GMRVG","O")) F GMRI=0:0 S GMRI=$O(^TMP($J,"GMRVG","O",GMRI)) Q:GMRI'>0 S GFOUND=0 D CKDT^GMRVVS3 S:GFOUND=0 ^TMP($J,"GMRDT",GMRI)=""
8 S (GMRTNM,GMRI)=0 I $D(^TMP($J,"GMRDT")) F S GMRI=$O(^TMP($J,"GMRDT",GMRI)) Q:GMRI'>0 S GMRTNM=GMRTNM+1
9 D GRAPH K GMR3,GMRDAT,GMREN,GMRHDR1,GMRHDR11,GMRHDR10,GMRHDR2,GMRHT,GMRI,GMRJ,GMRK,GMRLINE,GDATA,GMROLD,GMRP,GMRPDIF,GMRPG,GMRPGC,GMRPGS,GMRPHI,GMRPLO,GMRPOFF,GMRSITE,GMRT,GMRTDIF,GMRTHI,GMRTLO,GMRTNM
10 K GLPRNTR,GMRTOFF,GMRTY,GMRNM,GMRVX,GMRVX1,GMRVX2,^TMP($J,"GMRDT"),^TMP($J,"GMRG"),^TMP($J,"GMR")
11 Q
12GRAPH ;
13 S:'$D(GFLAG) GFLAG=0 S GMRPGC=0,GMRX1="" F X=1:1:10 S GMRX1=GMRX1_" "_"|"
14 S (GMRX,GMRX2)=GMRX1 F X=1:1:10 S $P(GMRX,"|",X)="__________",$P(GMRX2,"|",X)="----------"
15 S GMRPG=$S(GMRTNM=0:1,1:GMRTNM\10+$S(GMRTNM#10>0:1,1:0)) F GMRPGS=1:1:GMRPG S GMRTLO=105.8335,GMRPLO=168.335 D PAGE Q:GMROUT
16 K GDIP,GDOP,GRNDIP,GRNDOP,GSIP,GSOP Q
17PAGE ;
18 K GMRQUAL,GLINE W:'($E(IOST)'="C"&'GFLAG) @IOF S GFLAG=1,GMRPGC=GMRPGC+1 W !
19 I '$D(^TMP($J,"GMR")) W !!!!!!!!,?5,"THERE IS NO DATA FOR THIS REPORT" X "F Y=$Y:1:(IOSL-6) W !" D FOOTER^GMRVVS2 Q
20 W ! D DATES^GMRVVS2 W !,?3,"Pulse Temp/F/C",?17,"|",?18,GMRX
21 F GMRI=0:0 Q:$Y>43 W ! D SETHD^GMRVVS4 W ?2,$S(GMRHDR1'["41.1":GMRHDR1,1:""),?16,$S(GMR3!($Y=28):"-",1:""),?17,"|" D DATAPRT^GMRVVS4
22 W !,?17,"|",GMRX2 F GMRI="T","P","R","B","B1","B2","W","H","PO2","CVP","CG","PN" S GMRLINE(GMRI)=GMRX1
23 S (GMRLINE("H1"),GMRLINE("W1"),GMRLINE("BMI"),GMRLINE("P1"),GMRLINE("OX1"),GMRLINE("OX2"),GMRLINE("OX3"),GMRLINE("CVP1"),GMRLINE("CG1"),GMRLINE("CG2"))=GMRX1
24 S GMRNM=0 F GMRDT=0:0 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 S GMRNM=GMRNM+1 Q:GMRNM>10 F GMRI="T","P","R","H","W","PO2","CVP","CG","PN" D:$D(^TMP($J,"GMR",GMRI,GMRDT)) STLNP^GMRVVS1
25 S GMRNM=0 F GMRDT=0:0 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 S GMRNM=GMRNM+1 Q:GMRNM>10 D BP^GMRVVS2
26 F GMRI="T","P","P1","R","PO2","OX1","OX2","OX3","B","B1","B2","W","W1","BMI","H","H1","CG","CG2","CVP","CVP1" D
27 .S G=$S(GMRI="T":"Temperature",GMRI="P":"Pulse",GMRI="R":"Respiration",GMRI="W":"Weight (lb)",GMRI="H":"Height (in)",GMRI="B":"BLOOD",GMRI="B1":" PRESSURE",GMRI="W1":" (kg)",GMRI="H1":" (cm)",GMRI="BMI":"Body Mass Index",1:"")
28 . I G="" S G=$S(GMRI="PO2":"Pulse Ox.",GMRI="OX1":" L/Min",GMRI="OX2":" %",GMRI="OX3":" Method",GMRI="CG":"C/G (in)",GMRI="CVP":"CVP (cm H2O)",GMRI="CVP1":" (mm Hg)",GMRI="CG2":" (cm)",1:"")
29 . W !,G,?17,"|",GMRLINE(GMRI)
30 D IO
31 S G="Pain" W !,G,?17,"|",GMRLINE("PN")
32 I 'GMROUT W !,?17,$$REPEAT^XLFSTR("-",111)
33 W !,"T: Temperature P: Pulse C/G: Circumference/Girth * - Abnormal value ** - Abnormal value off of graph"
34 W !,"Pain: 99 - Unable to respond 0 - No pain 10 - Worst imaginable pain"
35 W ! I $D(GMRQUAL) S GLPRNTR=1 D LEGEND^GMRVLGQU F I=1:1:5 W !,GLINE(I)
36 I IOSL'<($Y+10) F X=1:1 W ! Q:IOSL<($Y+10)
37 D FOOTER^GMRVVS2 S GMRDT="" F GMRNM=1:1:10 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 K ^TMP($J,"GMRDT",GMRDT)
38 K GG,GI,GMRVJ,GSYNO Q
39IO ;PRINT INTAKE/OUTPUT SECTION OF VITAL SIGNS-I/O SHEET
40 S (GMRLINE("I"),GMRLINE("O"))=GMRX1
41 S GMRNM=0 F GMRDT=0:0 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 S GMRNM=GMRNM+1 Q:GMRNM>10 S GDT=+$E(GMRDT,1,7) I $D(^TMP($J,"GMRVG","I",GDT))!($D(^TMP($J,"GMRVG","O",GDT))) D SETDATA
42 W !,"Intake(24 Hr)(cc)",?17,"|",GMRLINE("I")
43 W !,"Output(24 Hr)(cc)",?17,"|",GMRLINE("O")
44 Q
45SETDATA ; FILL GMRLINE WITH I/O DATA AND WRITE GMRLINE
46 I $D(^TMP($J,"GMRVG","I",GDT)) S GDATA=$O(^(GDT,0)) S:GDATA>0 $P(GMRLINE("I"),"|",GMRNM)=$E(GDATA_" ",1,10) K ^TMP($J,"GMRVG","I",GDT)
47 I $D(^TMP($J,"GMRVG","O",GDT)) S GDATA=$O(^(GDT,0)) S:GDATA>0 $P(GMRLINE("O"),"|",GMRNM)=$E(GDATA_" ",1,10) K ^TMP($J,"GMRVG","O",GDT)
48 Q
49SELECT(J) ;TYPE OF GRAPH FOR REPORT
50 N X,I W !
51TRYAGN F I=1:1:5 W !,?2,I_" "_$P($T(GCHART+I),";;",2)
52 W !!,?2,"Select a number between 1 and 5: 1 Vital Signs Record// " S X="" R X:DTIME I '$T!(X["^") S J=0 Q
53 I X="" S J=1 Q
54 I $L(X)>2 G TRYAGN
55 I '(X?1N&(X>0&(X<6)))!(X["?") W !!,"Enter the number for the graph you wish to print.",!,"The default is Vital Signs Record.",! G TRYAGN
56 W " ",$P($T(GCHART+X),";;",2) S J=X Q
57 Q
58WRT1 W !!,?5,$C(7),"This report must be queued to a 132 column printer.",!!
59 Q
60SETT ; SET GMRT
61 D SETT^GMRVSR2 Q
62GCHART ;
63 ;;Vital Signs Record
64 ;;B/P Plotting Chart
65 ;;Weight Chart
66 ;;Pulse Oximetry/Respiratory Graph
67 ;;Pain Chart
Note: See TracBrowser for help on using the repository browser.