[613] | 1 | GMRVWT1 ;HIRMFO/YH-KYOCERA WEIGHT GRAPH - GRAPH DATA ;5/14/97
|
---|
| 2 | ;;4.0;Vitals/Measurements;**1**;Apr 25, 1997
|
---|
| 3 | GRAPH ;
|
---|
| 4 | D DEM^VADPT,INP^VADPT S SNN=$P(VADM(2),"^",2)
|
---|
| 5 | S GPG=0 D SETV F GK="H","W" S ^TMP($J,"GTNM",GK)=0 F GI=0:0 S GI=$O(^TMP($J,"GMRVG",GK,GI)) Q:GI'>0 S GJ="" F X=0:0 S GJ=$O(^TMP($J,"GMRVG",GK,GI,GJ)) Q:GJ="" S ^TMP($J,"GTNM",GK)=^TMP($J,"GTNM",GK)+1,^TMP($J,"GDT",GI)=""
|
---|
| 6 | S GTNM=0 F X=0:0 S X=$O(^TMP($J,"GDT",X)) Q:X'>0 S GTNM=GTNM+1
|
---|
| 7 | S GPG=$S(GTNM=0:1,1:GTNM\10+''(GTNM#10)),GDT1=0,GINI=0.4
|
---|
| 8 | F GPGS=1:1:GPG K GMRQUAL S ^TMP($J,"GMRK","G199")="Page "_GPGS D SETP,DATE,PAGE D ^GMRVWT2,^GMRVWT3,^GMRVWT4 S GINI=0.4
|
---|
| 9 | D KVAR^VADPT K VA Q
|
---|
| 10 | PAGE I ^TMP($J,"GMRK","G141")="" F GI=2:1:10 S ^TMP($J,"GMRK","G141")=^TMP($J,"GMRK","G"_(140+GI)),GINI=GINI+1.6 Q:^TMP($J,"GMRK","G141")'=""
|
---|
| 11 | I $D(GMRQUAL) D LEGEND^GMRVLGQU
|
---|
| 12 | K GG,I,J,GMRQUAL,GSYNO Q
|
---|
| 13 | SETV S GMVNM=$S(VADM(1)'="":VADM(1),1:" ")_" "_$S(VADM(2)'="":$P(VADM(2),"^",2),1:" "),GDOB=$S($D(VADM(3)):$P(VADM(3),"^",2),1:" "),GAGE=$S($D(VADM(4)):VADM(4),1:" ")
|
---|
| 14 | S GMVGEN=$S($D(VADM(5)):$P(VADM(5),"^",2),1:" "),GMVWRD=$S($D(GMRWARD(1)):"Unit: "_GMRWARD(1),1:"Unit: "),GMVDIAG=$S(VAIN(9)'="":$P(VAIN(9),"^"),1:" ")
|
---|
| 15 | S GMVRMBD=$S('(VAIN(5)=""):"Room: "_$P(VAIN(5),"-",1,2),1:"Room: "),GMVDOB=$S($D(GDOB)&($D(GAGE)):GDOB_" ("_GAGE_")",1:" ")
|
---|
| 16 | I '$D(GMRVHLOC) S GMRVHLOC=$P($G(^DIC(42,+$G(VAIN(4)),44)),"^")
|
---|
| 17 | S GMRDIV="Division: "_$S(GMRVHLOC>0:$$GET1^DIQ(4,+$$GET1^DIQ(44,+GMRVHLOC,3,"I"),.01,"I"),1:"")
|
---|
| 18 | Q
|
---|
| 19 | DATE F GCNTD=1:1:10 S:$L(GDT1) GDT1=$O(^TMP($J,"GDT",GDT1)) S ^TMP($J,"GMRK","G"_GCNTD)=$S($L(GDT1):$E(GDT1,4,5)_"-"_$E(GDT1,6,7)_"-"_$E(GDT1,2,3),1:"") D DATE1
|
---|
| 20 | Q
|
---|
| 21 | DATE1 S Y=$E($P(GDT1,".",2)_"0000",1,4),^TMP($J,"GMRK","G"_(GCNTD+16))=$S($L(GDT1):$E(Y,1,2)_":"_$E(Y,3,4),1:"") D SETD
|
---|
| 22 | Q
|
---|
| 23 | SETD F GI="H","W" S GJ=$S(GI="W":100,1:160),GK=$S($L(GDT1):$O(^TMP($J,"GMRVG",GI,GDT1,"")),1:"") D SETA
|
---|
| 24 | Q
|
---|
| 25 | SETP ;INITIALIZE ^TMP FOR HEIGHT AND WEIGHT
|
---|
| 26 | ;100+I - WEIGHT IN LB 120+I - WEIGHT IN KG
|
---|
| 27 | ;140+I - WEIGHT GRAPH POSITION 160+I - "W" OR "W**"
|
---|
| 28 | ;180+I - QUALIFIERS 300+I - HEIGHT 320+I - HEIGHT IN CM
|
---|
| 29 | ;210+I - BODY MASS INDEX 340+I - HEIGHT QUALIFIER
|
---|
| 30 | F I=1:1:10 S (^TMP($J,"GMRK","G"_(100+I)),^("G"_(120+I)),^("G"_(140+I)),^("G"_(160+I)),^("G"_(180+I)),^("G"_(300+I)),^("G"_(320+I)),^("G"_(210+I)),^("G"_(340+I)))=""
|
---|
| 31 | Q
|
---|
| 32 | SETA ;
|
---|
| 33 | I GK="Unavailable" S GK="Unavail"
|
---|
| 34 | S (GMRSITE,GMRSITE(1),GMRSITE(2),GMRINF,GMRVJ)=""
|
---|
| 35 | I GK'="" D
|
---|
| 36 | . S GMRSITE(1)=$P($G(^TMP($J,"GMRVG",GI,GDT1,GK)),"^"),GMRVJ=$P($G(^(GK)),"^",2),GMRINF=$P($G(^(GK)),"^",4)
|
---|
| 37 | . I GMRSITE(1)'="" D SYNOARY^GMRVLGQU
|
---|
| 38 | I GI="H" S ^TMP($J,"GMRK","G"_(300+GCNTD))=GK,^("G"_(340+GCNTD))=GMRSITE,^TMP($J,"GMRK","G"_(320+GCNTD))=$S(GK>0:$J(GK*2.54,0,2),1:"") S:GK>0 GMRHT=GK*2.54/100 Q
|
---|
| 39 | S ^TMP($J,"GMRK","G"_(180+GCNTD))=GMRSITE
|
---|
| 40 | S ^TMP($J,"GMRK","G"_(100+GCNTD))=GK,^TMP($J,"GMRK","G"_(120+GCNTD))=$S(GK>0:$J(GK/2.2,0,2),1:"")
|
---|
| 41 | S ^TMP($J,"GMRK","G"_(140+GCNTD))=$S(GK>0:+$P(GWT(1),"/")-GK+10/5,1:"") S:GK>0 ^TMP($J,"GMRK","G"_(160+GCNTD))="W"
|
---|
| 42 | I GK>0 D
|
---|
| 43 | . S GMRBMI="",GMRBMI(1)=GDT1,GMRBMI(2)=GK D CALBMI^GMRVBMI(.GMRBMI)
|
---|
| 44 | . S ^TMP($J,"GMRK","G"_(210+GCNTD))=$S(GMRBMI>0:GMRBMI,1:"") K GMRBMI
|
---|
| 45 | I GK>0 S ^TMP($J,"GMRK","G"_(140+GCNTD))=$S(^TMP($J,"GMRK","G"_(140+GCNTD))<1.4:1.3,^("G"_(140+GCNTD))>17.5:17.6,1:^("G"_(140+GCNTD))) S:^("G"_(140+GCNTD))<1.4!(^("G"_(140+GCNTD))>17.5) ^TMP($J,"GMRK","G"_(160+GCNTD))="W**"
|
---|
| 46 | Q
|
---|