Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: GMVLBP0

GMVLBP0.m

Go to the documentation of this file.
GMVLBP0 ;HIOFO/YH,FT-PATIENT BLOOD PRESSURE LINE PRINTER GRAPH - 1 ;11/6/01  15:49
 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
 ;
 ; This routine uses the following IAs:
 ; #10061 - ^VADPT calls           (supported)
 ; #10104 - ^XLFSTR calls          (supported)
 ;
SF512 ;BLOOD PRESSURE GRAPH
 D DEM^VADPT,INP^VADPT S GMRBTH=$P(VADM(3),"^",2),GMRNAM=VADM(1)
 S GSTART1=(9999999-GMRFIN)-.0001,GEND1=9999999-GMRSTRT
 F GTYPE="B","P" D SETT^GMVBP0
 F GMRK="P","B" D GMRDT
 S (GMRTNM,GMRI)=0 I $D(^TMP($J,"GMRDT")) F  S GMRI=$O(^TMP($J,"GMRDT",GMRI)) Q:GMRI'>0  S GMRTNM=GMRTNM+1
 U IO D GRAPH
 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
 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")
 Q
GRAPH ;
 S:'$D(GFLAG) GFLAG=0 S GMRPGC=0,GMRX1="" F X=1:1:10 S GMRX1=GMRX1_"          "_"|"
 S (GMRX,GMRX2)=GMRX1 F X=1:1:10 S $P(GMRX,"|",X)="__________",$P(GMRX2,"|",X)="----------"
 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
 Q
PAGE ;
 K GMRQUAL,GLINE W:'($E(IOST)'="C"&'GFLAG) @IOF S GFLAG=1,GMRPGC=GMRPGC+1 W !
 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
 W ! D DATES^GMVVS2 W !,?3,"Blood Pressure",?17,"|",?18,GMRX
 F GMRI=0:0 Q:$Y>61  W ! D SETHD^GMVLBP1 W ?10,GMRHDR10,?16,$S(GMR3:"-",1:""),?17,"|" D DATAPRT^GMVLBP1
 W !,?17,"|",GMRX2 F GMRI="P","P1","B","D","BQUAL","MAP" S GMRLINE(GMRI)=GMRX1
 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
 F GMRI="P","P1","B","D","BQUAL","MAP" D
 .S G=$S(GMRI="P":"Pulse",GMRI="B":"BLOOD",GMRI="D":"  PRESSURE",GMRI="MAP":"MAP",1:"")
 . W !,?5,G,?17,"|",GMRLINE(GMRI)
 I 'GMROUT W !,?17,$$REPEAT^XLFSTR("-",111)
 W !,"S: Systolic B/P   D: Diastolic B/P   MAP: Mean Arterial Pressure  * - Abnormal value  ** - Abnormal value off of graph"
 W ! I $D(GMRQUAL) S GLPRNTR=1 D LEGEND^GMVLGQU F I=1:1:5 W !,GLINE(I)
 I IOSL'<($Y+10) F X=1:1 W ! Q:IOSL<($Y+10)
 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)
 K GG,GI,GMRVJ,GSYNO Q
CKDT F GMRJ=0:0 S GMRJ=$O(^TMP($J,"GMRDT",GMRJ)) Q:GMRJ'>0!(+$P(GMRJ,".")>GMRI)  S:+$P(GMRJ,".")=GMRI GFOUND=1
 Q
GMRDT 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)=""
 Q