source: FOIAVistA/trunk/r/GEN_MED_OTHER-GMV/GMVSR1.m@ 1611

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

initial load of FOIAVistA 6/30/08 version

File size: 4.9 KB
Line 
1GMVSR1 ;HIOFO/RM,YH-PATIENT VITAL SIGNS-I/O SF 511 GRAPH - 1 ;11/6/01 16:00
2 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
3 ;
4 ; This routine uses the following IAs:
5 ; #10061 - ^VADPT calls (supported)
6 ; #10104 - ^XLFSTR calls (supported)
7 ;
8SF511 ;PRODUCE PATIENT VITAL SIGNS-I/O GRAPH
9 S GRPT=5,GMRHT=0 D SETIO^GMVGR0 D DEM^VADPT,INP^VADPT S GMRBTH=$P(VADM(3),"^",2),GMRNAM=VADM(1)
10 F GMRK="P","T","B","H","W","R","PO2","CVP","CG","XI1","PN" D GMRDT^GMVVS3
11 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^GMVVS3 S:GFOUND=0 ^TMP($J,"GMRDT",GMRI)=""
12 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^GMVVS3 S:GFOUND=0 ^TMP($J,"GMRDT",GMRI)=""
13 S (GMRTNM,GMRI)=0 I $D(^TMP($J,"GMRDT")) F S GMRI=$O(^TMP($J,"GMRDT",GMRI)) Q:GMRI'>0 S GMRTNM=GMRTNM+1
14 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
15 K GLPRNTR,GMRTOFF,GMRTY,GMRNM,GMRVX,GMRVX1,GMRVX2,^TMP($J,"GMRDT"),^TMP($J,"GMRG"),^TMP($J,"GMR")
16 Q
17GRAPH ;
18 S:'$D(GFLAG) GFLAG=0 S GMRPGC=0,GMRX1="" F X=1:1:10 S GMRX1=GMRX1_" "_"|"
19 S (GMRX,GMRX2)=GMRX1 F X=1:1:10 S $P(GMRX,"|",X)="__________",$P(GMRX2,"|",X)="----------"
20 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
21 K GDIP,GDOP,GRNDIP,GRNDOP,GSIP,GSOP Q
22PAGE ;
23 K GMRQUAL,GLINE W:'($E(IOST)'="C"&'GFLAG) @IOF S GFLAG=1,GMRPGC=GMRPGC+1 W !
24 I '$D(^TMP($J,"GMR")) W !!!!!!!!,?5,"THERE IS NO DATA FOR THIS REPORT" X "F Y=$Y:1:(IOSL-6) W !" D FOOTER^GMVVS2 Q
25 W ! D DATES^GMVVS2 W !,?3,"Pulse Temp/F/C",?17,"|",?18,GMRX
26 F GMRI=0:0 Q:$Y>43 W ! D SETHD^GMVVS4 W ?2,$S(GMRHDR1'["41.1":GMRHDR1,1:""),?16,$S(GMR3!($Y=28):"-",1:""),?17,"|" D DATAPRT^GMVVS4
27 W !,?17,"|",GMRX2 F GMRI="T","P","R","B","B1","B2","W","H","PO2","CVP","CG","PN" S GMRLINE(GMRI)=GMRX1
28 S (GMRLINE("H1"),GMRLINE("W1"),GMRLINE("BMI"),GMRLINE("P1"),GMRLINE("OX1"),GMRLINE("OX2"),GMRLINE("OX3"),GMRLINE("CVP1"),GMRLINE("CG1"),GMRLINE("CG2"))=GMRX1
29 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^GMVVS1
30 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^GMVVS2
31 F GMRI="T","P","P1","R","PO2","OX1","OX2","OX3","B","B1","B2","W","W1","BMI","H","H1","CG","CG2","CVP","CVP1" D
32 .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:"")
33 . 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:"")
34 . W !,G,?17,"|",GMRLINE(GMRI)
35 D IO
36 S G="Pain" W !,G,?17,"|",GMRLINE("PN")
37 I 'GMROUT W !,?17,$$REPEAT^XLFSTR("-",111)
38 W !,"T: Temperature P: Pulse C/G: Circumference/Girth * - Abnormal value ** - Abnormal value off of graph"
39 W !,"Pain: 99 - Unable to respond 0 - No pain 10 - Worst imaginable pain"
40 W ! I $D(GMRQUAL) S GLPRNTR=1 D LEGEND^GMVLGQU F I=1:1:5 W !,GLINE(I)
41 I IOSL'<($Y+10) F X=1:1 W ! Q:IOSL<($Y+10)
42 D FOOTER^GMVVS2 S GMRDT="" F GMRNM=1:1:10 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 K ^TMP($J,"GMRDT",GMRDT)
43 K GG,GI,GMRVJ,GSYNO Q
44IO ;PRINT INTAKE/OUTPUT SECTION OF VITAL SIGNS-I/O SHEET
45 S (GMRLINE("I"),GMRLINE("O"))=GMRX1
46 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
47 W !,"Intake(24 Hr)(cc)",?17,"|",GMRLINE("I")
48 W !,"Output(24 Hr)(cc)",?17,"|",GMRLINE("O")
49 Q
50SETDATA ; FILL GMRLINE WITH I/O DATA AND WRITE GMRLINE
51 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)
52 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)
53 Q
54SELECT(J) ;TYPE OF GRAPH FOR REPORT
55 N X,I W !
56TRYAGN F I=1:1:5 W !,?2,I_" "_$P($T(GCHART+I),";;",2)
57 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
58 I X="" S J=1 Q
59 I $L(X)>2 G TRYAGN
60 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
61 W " ",$P($T(GCHART+X),";;",2) S J=X Q
62 Q
63WRT1 W !!,?5,$C(7),"This report must be queued to a 132 column printer.",!!
64 Q
65SETT ; SET GMRT
66 D SETT^GMVSR2 Q
67GCHART ;
68 ;;Vital Signs Record
69 ;;B/P Plotting Chart
70 ;;Weight Chart
71 ;;Pulse Oximetry/Respiratory Graph
72 ;;Pain Chart
Note: See TracBrowser for help on using the repository browser.