source: WorldVistAEHR/trunk/r/GEN_MED_REC_VITALS-GMRV/GMRVWT0.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: 1.5 KB
RevLine 
[613]1GMRVWT0 ;HIRMFO/YH-KYOCERA WEIGHT GRAPH - DATA ARRAY ;5/14/97
2 ;;4.0;Vitals/Measurements;**1**;Apr 25, 1997
3EN1 ;
4 K ^TMP($J,"GMR"),^TMP($J,"GMRK"),^TMP($J,"GDT"),^TMP($J,"GTNM"),GWT S (GMRHT,GWT)=0
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 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 U IO D ^GMRVWT1
10Q1 K 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
11 K ^TMP($J,"GMRK"),^TMP($J,"GMR"),^TMP($J,"GDT"),^TMP($J,"GMRVG"),^TMP($J,"GTNM")
12 Q
13SETT S GTYP=$O(^GMRD(120.51,"B",$S(GTYPE="W":"WEIGHT",1:"HEIGHT"),""))
14 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
15 Q
16BLDARR ;
17 S GDATA=$S($D(^GMR(120.5,GEN,0)):^(0),1:"")
18 K GMRVARY S GMRVARY="" I $P($G(^GMR(120.5,GEN,5,0)),"^",4)>0 D CHAR^GMRVCHAR(GEN,.GMRVARY,GTYP)
19 K GG S GG="" I $O(GMRVARY(0)) D
20 . 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)
21 S ^TMP($J,"GMRVG",GTYPE,9999999-GX,$P(GDATA,"^",8))=GG_"^"_$S($G(GMRVX(1))>0:1,1:"")_"^^"_$P(GDATA,"^",8)
22 I $P(GDATA,"^",8)>0 S GDATA(0)=$P(GDATA,"^",8) S:GTYPE="W" GWT=GDATA(0)
23 Q
Note: See TracBrowser for help on using the repository browser.