source: WorldVistAEHR/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVLWT1.m@ 1604

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

initial load of WorldVistAEHR

File size: 2.5 KB
RevLine 
[613]1GMRVLWT1 ;HIRMFO/YH,FT-DOT MATRIX PATIENT WEIGHT GRAPH - 2 ;6/13/01 15:00
2 ;;4.0;Vitals/Measurements;**1,13**;Apr 25, 1997
3 ;
4 ; This routine uses the following IAs:
5 ; #10061 ^VADPT calls (supported)
6 ;
7VAF ;WEIGHT GRAPH
8 D DEM^VADPT,INP^VADPT S GMRBTH=$P(VADM(3),"^",2),GMRNAM=VADM(1)
9 F GMRK="W","H" D GMRDT
10 S (GMRTNM,GMRI)=0 I $D(^TMP($J,"GMRDT")) F S GMRI=$O(^TMP($J,"GMRDT",GMRI)) Q:GMRI'>0 S GMRTNM=GMRTNM+1
11 D GRAPH K GMR3,GMRDAT,GMREN,GMRHDR1,GMRHDR11,GMRHDR10,GMRHDR2,GMRHT,GMRI,GMRJ,GMRK,GMRLINE,GDATA,GMROLD,GMRW,GMRWDIF,GMRPG,GMRPGC,GMRPGS,GMRWHI,GMRWLO,GMRWOFF,GMRSITE,GMRTNM
12 K GMRWT,GLPRNTR,GMRTY,GMRNM,GMRVX,GMRVX1,GMRVX2,^TMP($J,"GMRDT"),^TMP($J,"GMRG"),^TMP($J,"GMRVG")
13 Q
14GRAPH ;
15 S:'$D(GFLAG) GFLAG=0 S GMRPGC=0,GMRX1="" F X=1:1:10 S GMRX1=GMRX1_" "_"|"
16 S (GMRX,GMRX2)=GMRX1 F X=1:1:10 S $P(GMRX,"|",X)="__________",$P(GMRX2,"|",X)="----------"
17 S GMRPG=$S(GMRTNM=0:1,1:GMRTNM\10+$S(GMRTNM#10>0:1,1:0)) F GMRPGS=1:1:GMRPG S GMRWT=$G(GWT(1))+14.165,GMRWT(1)=9,GMRWT(2)=1 D PAGE Q:GMROUT ;GMRWT = WEIGHT VALUE WHEN $Y=1
18 Q
19PAGE ;
20 K GMRQUAL W:'($E(IOST)'="C"&'GFLAG) @IOF S GFLAG=1,GMRPGC=GMRPGC+1 W !
21 I '$D(^TMP($J,"GMRVG")) W !!!!!!!!,?5,"THERE IS NO DATA FOR THIS PERIOD" X "F Y=$Y:1:(IOSL-6) W !" D FOOTER^GMRVLWT3 Q
22 W ! D DATES^GMRVVS2 W !,?6,"Pounds/Kgs",?17,"|",?18,GMRX
23 F GMRI=0:0 Q:$Y>55 W ! D SETHD^GMRVLWT2 W ?5,GMRHDR10,?16,$S(GMR3:"-",1:""),?17,"|" D DATAPRT^GMRVLWT2
24 W !,?17,"|",GMRX2 F GMRI="W","W1","WQUAL","H","H1","HQUAL","BMI" S GMRLINE(GMRI)=GMRX1
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 F GMRI="W","H" D:$D(^TMP($J,"GMRVG",GMRI,GMRDT)) STLNP^GMRVLWT3
26 F GMRI="W","W1","WQUAL","BMI","H","H1","HQUAL" D
27 .S G=$S(GMRI="W":"Weight (lb)",GMRI="W1":" (kg)",GMRI="WQUAL":"Qualifier",GMRI="H":"Height (in)",GMRI="H1":" (cm)",GMRI="HQUAL":"Qualifier",GMRI="BMI":"Body Mass Index",1:"")
28 . W !,G,?17,"|",GMRLINE(GMRI)
29 I 'GMROUT W !,?17,$$REPEAT^XLFSTR("-",111)
30 W !,"W: Weight ** - Abnormal value off of graph"
31 W ! I $D(GMRQUAL) S GLPRNTR=1 D LEGEND^GMRVLGQU F I=1:1:5 W !,GLINE(I)
32 I IOSL'<($Y+10) F X=1:1 W ! Q:IOSL<($Y+10)
33 D FOOTER^GMRVLWT3 S GMRDT="" F GMRNM=1:1:10 S GMRDT=$O(^TMP($J,"GMRDT",GMRDT)) Q:GMRDT'>0 K ^TMP($J,"GMRDT",GMRDT)
34 K GG,GI,GMRVJ,GSYNO Q
35GMRDT 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)=""
36 Q
Note: See TracBrowser for help on using the repository browser.