source: FOIAVistA/trunk/r/GEN_MED_OTHER-GMV/GMVLBP0.m@ 1569

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1GMVLBP0 ;HIOFO/YH,FT-PATIENT BLOOD PRESSURE LINE PRINTER GRAPH - 1 ;11/6/01 15:49
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 ;
8SF512 ;BLOOD PRESSURE GRAPH
9 D DEM^VADPT,INP^VADPT S GMRBTH=$P(VADM(3),"^",2),GMRNAM=VADM(1)
10 S GSTART1=(9999999-GMRFIN)-.0001,GEND1=9999999-GMRSTRT
11 F GTYPE="B","P" D SETT^GMVBP0
12 F GMRK="P","B" D GMRDT
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 U IO D GRAPH
15 K GMR3,GMRDAT,GMREN,GMRHDR1,GMRHDR11,GMRHDR10,GMRHDR2,GMRHT,GMRI,GMRJ,GMRK,GMRLINE,GDATA,GMROLD,GMRP,GMRSDIF,GMRPG,GMRPGC,GMRPGS,GMRSHI,GMRSLO,GMRSOFF,GMRSITE,GMRD,GMRDDIF,GMRDHI,GMRDLO,GMRTNM
16 K Z,GCHA,GEN,GTYP,GTYPE,GMAP,GX,GEND1,GSTART1,GLPRNTR,GMRDOFF,GMRTY,GMRNM,GMRVX,GMRVX1,GMRVX2,^TMP($J,"GMRDT"),^TMP($J,"GMRG"),^TMP($J,"GMRVG")
17 Q
18GRAPH ;
19 S:'$D(GFLAG) GFLAG=0 S GMRPGC=0,GMRX1="" F X=1:1:10 S GMRX1=GMRX1_" "_"|"
20 S (GMRX,GMRX2)=GMRX1 F X=1:1:10 S $P(GMRX,"|",X)="__________",$P(GMRX2,"|",X)="----------"
21 S GMRPG=$S(GMRTNM=0:1,1:GMRTNM\10+$S(GMRTNM#10>0:1,1:0)) F GMRPGS=1:1:GMRPG S (GMRSLO,GMRDLO)=228.335 D PAGE Q:GMROUT
22 Q
23PAGE ;
24 K GMRQUAL,GLINE W:'($E(IOST)'="C"&'GFLAG) @IOF S GFLAG=1,GMRPGC=GMRPGC+1 W !
25 I '$D(^TMP($J,"GMRVG")) W !!!!!!!!,?5,"THERE IS NO DATA FOR THIS REPORT" X "F Y=$Y:1:(IOSL-6) W !" D FOOTER^GMVLBP2 Q
26 W ! D DATES^GMVVS2 W !,?3,"Blood Pressure",?17,"|",?18,GMRX
27 F GMRI=0:0 Q:$Y>61 W ! D SETHD^GMVLBP1 W ?10,GMRHDR10,?16,$S(GMR3:"-",1:""),?17,"|" D DATAPRT^GMVLBP1
28 W !,?17,"|",GMRX2 F GMRI="P","P1","B","D","BQUAL","MAP" S GMRLINE(GMRI)=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="P","B" D:$D(^TMP($J,"GMRVG",GMRI,GMRDT)) STLNP^GMVLBP2
30 F GMRI="P","P1","B","D","BQUAL","MAP" D
31 .S G=$S(GMRI="P":"Pulse",GMRI="B":"BLOOD",GMRI="D":" PRESSURE",GMRI="MAP":"MAP",1:"")
32 . W !,?5,G,?17,"|",GMRLINE(GMRI)
33 I 'GMROUT W !,?17,$$REPEAT^XLFSTR("-",111)
34 W !,"S: Systolic B/P D: Diastolic B/P MAP: Mean Arterial Pressure * - Abnormal value ** - Abnormal value off of graph"
35 W ! I $D(GMRQUAL) S GLPRNTR=1 D LEGEND^GMVLGQU 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^GMVLBP2 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
39CKDT F GMRJ=0:0 S GMRJ=$O(^TMP($J,"GMRDT",GMRJ)) Q:GMRJ'>0!(+$P(GMRJ,".")>GMRI) S:+$P(GMRJ,".")=GMRI GFOUND=1
40 Q
41GMRDT S GMRTNM(GMRK)=0 F GMRI=0:0 S GMRI=$O(^TMP($J,"GMRVG",GMRK,GMRI)) Q:GMRI'>0 S GMRJ="" F X=0:0 S GMRJ=$O(^TMP($J,"GMRVG",GMRK,GMRI,GMRJ)) Q:GMRJ="" S GMRTNM(GMRK)=GMRTNM(GMRK)+1 S:GMRK'="XI1" ^TMP($J,"GMRDT",GMRI)=""
42 Q
Note: See TracBrowser for help on using the repository browser.