source: WorldVistAEHR/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVLBP0.m@ 1166

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

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1GMRVLBP0 ;HIRMFO/YH-PATIENT BLOOD PRESSURE LINE PRINTER GRAPH - 1 ;5/25/97
2 ;;4.0;Vitals/Measurements;**1**;Apr 25, 1997
3SF512 ;BLOOD PRESSURE GRAPH
4 D DEM^VADPT,INP^VADPT S GMRBTH=$P(VADM(3),"^",2),GMRNAM=VADM(1)
5 S GSTART1=(9999999-GMRFIN)-.0001,GEND1=9999999-GMRSTRT
6 F GTYPE="B","P" D SETT^GMRVBP0
7 F GMRK="P","B" D GMRDT
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 U IO D GRAPH
10 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
11 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")
12 Q
13GRAPH ;
14 S:'$D(GFLAG) GFLAG=0 S GMRPGC=0,GMRX1="" F X=1:1:10 S GMRX1=GMRX1_" "_"|"
15 S (GMRX,GMRX2)=GMRX1 F X=1:1:10 S $P(GMRX,"|",X)="__________",$P(GMRX2,"|",X)="----------"
16 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
17 Q
18PAGE ;
19 K GMRQUAL,GLINE W:'($E(IOST)'="C"&'GFLAG) @IOF S GFLAG=1,GMRPGC=GMRPGC+1 W !
20 I '$D(^TMP($J,"GMRVG")) W !!!!!!!!,?5,"THERE IS NO DATA FOR THIS REPORT" X "F Y=$Y:1:(IOSL-6) W !" D FOOTER^GMRVLBP2 Q
21 W ! D DATES^GMRVVS2 W !,?3,"Blood Pressure",?17,"|",?18,GMRX
22 F GMRI=0:0 Q:$Y>61 W ! D SETHD^GMRVLBP1 W ?10,GMRHDR10,?16,$S(GMR3:"-",1:""),?17,"|" D DATAPRT^GMRVLBP1
23 W !,?17,"|",GMRX2 F GMRI="P","P1","B","D","BQUAL","MAP" S GMRLINE(GMRI)=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="P","B" D:$D(^TMP($J,"GMRVG",GMRI,GMRDT)) STLNP^GMRVLBP2
25 F GMRI="P","P1","B","D","BQUAL","MAP" D
26 .S G=$S(GMRI="P":"Pulse",GMRI="B":"BLOOD",GMRI="D":" PRESSURE",GMRI="MAP":"MAP",1:"")
27 . W !,?5,G,?17,"|",GMRLINE(GMRI)
28 I 'GMROUT W !,?17,$$REPEAT^XLFSTR("-",111)
29 W !,"S: Systolic B/P D: Diastolic B/P MAP: Mean Arterial Pressure * - Abnormal value ** - Abnormal value off of graph"
30 W ! I $D(GMRQUAL) S GLPRNTR=1 D LEGEND^GMRVLGQU F I=1:1:5 W !,GLINE(I)
31 I IOSL'<($Y+10) F X=1:1 W ! Q:IOSL<($Y+10)
32 D FOOTER^GMRVLBP2 S GMRDT="" F GMRNM=1:1:10 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 K ^TMP($J,"GMRDT",GMRDT)
33 K GG,GI,GMRVJ,GSYNO Q
34CKDT F GMRJ=0:0 S GMRJ=$O(^TMP($J,"GMRDT",GMRJ)) Q:GMRJ'>0!(+$P(GMRJ,".")>GMRI) S:+$P(GMRJ,".")=GMRI GFOUND=1
35 Q
36GMRDT 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)=""
37 Q
Note: See TracBrowser for help on using the repository browser.