source: FOIAVistA/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVLWT0.m@ 1535

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1GMRVLWT0 ;HIRMFO/YH-DOT MATRIX WEIGHT GRAPH - DATA ARRAY ;5/27/97
2 ;;4.0;Vitals/Measurements;**1**;Apr 25, 1997
3EN1 ;
4 K ^TMP($J,"GMRVG"),^TMP($J,"GMRK"),^TMP($J,"GDT"),^TMP($J,"GTNM"),GWT
5 S GSTART1=(9999999-GMRFIN)-.0001,GEND1=9999999-GMRSTRT
6 F GTYPE="H","W" D SETT
7 F I=1:1:8 S GWT(I)=""
8 I $G(GWT)>0 S GWT=GWT\10*10+30,J=0 F I=1:1:8 S GWT(I)=GWT-(10*J),J=J+1,GWT(I)=GWT(I)_"/"_$J(GWT(I)/2.2,0,2)
9 E S GWT=""
10 U IO D ^GMRVLWT1
11Q1 K Z,GPG,GPGS,GAGE,GTYP,GTYPE,GX,GCNTD,GDATA,GDOB,GDT1,GEN,GI,GJ,GK,GMRVJ,GTNM,GWT,GINI,GMVDIAG,GMVDOB,GMVGEN,GMVNM,GSTART1,GEND1 D KVAR^VADPT K VA,VAROOT
12 K ^TMP($J,"GMRK"),^TMP($J,"GMR"),^TMP($J,"GDT"),^TMP($J,"GMRVG"),^TMP($J,"GTNM")
13 Q
14SETT S GTYP=$O(^GMRD(120.51,"B",$S(GTYPE="W":"WEIGHT",1:"HEIGHT"),""))
15 I GTYP>0 F GX=GSTART1:0 S GX=$O(^GMR(120.5,"AA",DFN,GTYP,GX)) Q:GX>GEND1!(GX'>0) F GEN=0:0 S GEN=$O(^GMR(120.5,"AA",DFN,GTYP,GX,GEN)) Q:GEN'>0 I '$D(^GMR(120.5,GEN,2)) D BLDARR
16 Q
17BLDARR ;
18 S GDATA=$S($D(^GMR(120.5,GEN,0)):^(0),1:"")
19 K GMRVARY S GMRVARY="" I $P($G(^GMR(120.5,GEN,5,0)),"^",4)>0 D CHAR^GMRVCHAR(GEN,.GMRVARY,GTYP)
20 K GG S GG="" I $O(GMRVARY(0)) D
21 . S GG(1)=0 F S GG(1)=$O(GMRVARY(GG(1))) Q:GG(1)'>0 S GG(2)=0 F S GG(2)=$O(GMRVARY(GG(1),GG(2))) Q:GG(2)'>0 S GG(3)="" F S GG(3)=$O(GMRVARY(GG(1),GG(2),GG(3))) Q:GG(3)="" S GG=GG_$S(GG="":"",1:";")_GG(3)
22 S ^TMP($J,"GMRVG",GTYPE,9999999-GX,$P(GDATA,"^",8))=GG_"^"_$S($G(GMRVX(1))>0:1,1:"")_"^^"_$P(GDATA,"^",8)
23 I $P(GDATA,"^",8)>0 S GDATA(0)=$P(GDATA,"^",8) S:GTYPE="W" GWT=GDATA(0)
24 Q
Note: See TracBrowser for help on using the repository browser.