source: WorldVistAEHR/trunk/r/GEN_MED_OTHER-GMV/GMVHW0.m@ 1474

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

initial load of WorldVistAEHR

File size: 2.7 KB
RevLine 
[613]1GMVHW0 ;HIOFO/YH,FT-HP LASER WEIGHT CHART - DATA ARRAY ;12/6/01 11:35
2 ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
3 ;
4 ; This routine uses the following IAs:
5 ; #10061 - ^VADPT calls (supported)
6 ;
7EN1 ;
8 S GMRHT=0 K ^TMP($J,"GMR"),^TMP($J,"GMRK"),^TMP($J,"GDT"),^TMP($J,"GTNM"),GWT S GWT=0
9 S GSTART1=(9999999-GMRFIN)-.0001,GEND1=9999999-GMRSTRT
10 F GTYPE="H","W" D SETT^GMVWT0
11 F I=1:1:8 S GWT(I)=""
12 I GWT>0 S GWT=GWT\10*10-40,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)
13 U IO D GRAPH
14Q1 D Q1^GMVWT0 K GRAPHW Q
15GRAPH ;
16 D DEM^VADPT,INP^VADPT S SSN=$P(VADM(2),"^",2)
17 S GPG=0 D SETV^GMVWT1 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)=""
18 S GTNM=0 F X=0:0 S X=$O(^TMP($J,"GDT",X)) Q:X'>0 S GTNM=GTNM+1
19 S GPG=$S(GTNM=0:1,1:GTNM\10+''(GTNM#10)),GDT1=0
20 F GPGS=1:1:GPG K GMRQUAL S ^TMP($J,"GMRK","G199")="Page "_GPGS D SETP^GMVWT1,DATE,PAGE D ^GMVHW1
21 D KVAR^VADPT K VA Q
22PAGE ;
23 ;DATA FOR WEIGHT GRAPH
24 K GRAPHW S GRAPHW=0,I=1,J=161,GPA=0 F GI=141:1:150 S GRAPHW=0.6+(1.6*(I-1)) D:^TMP($J,"GMRK","G"_GI)'="" S I=I+1,J=J+1
25 .S GRAPHW(I)=$S(GPA=0:"PA",1:"PD")_GRAPHW_","_^TMP($J,"GMRK","G"_GI)_";LB"_^TMP($J,"GMRK","G"_J)_"#;",GPA=1
26 I $D(GMRQUAL) D LEGEND^GMVLGQU
27 K GPA Q
28DATE 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
29 Q
30DATE1 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
31 Q
32SETD 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
33 Q
34SETA ;
35 I GK="Unavailable" S GK="Unavail"
36 S (GMRSITE,GMRSITE(1),GMRSITE(2),GMRINF,GMRVJ)=""
37 I GK'="" D
38 . S GMRSITE(1)=$P($G(^TMP($J,"GMRVG",GI,GDT1,GK)),"^"),GMRVJ=$P($G(^(GK)),"^",2),GMRINF=$P($G(^(GK)),"^",4)
39 . I GMRSITE(1)'="" D SYNOARY^GMVLGQU
40 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
41 S ^TMP($J,"GMRK","G"_(180+GCNTD))=GMRSITE
42 I GK>0 D
43 . S GMRBMI="",GMRBMI(1)=GDT1,GMRBMI(2)=GK D CALBMI^GMVBMI(.GMRBMI)
44 . S ^TMP($J,"GMRK","G"_(210+GCNTD))=$S(GMRBMI>0:GMRBMI,1:"") K GMRBMI
45 S ^TMP($J,"GMRK","G"_(100+GCNTD))=GK,^TMP($J,"GMRK","G"_(120+GCNTD))=$S(GK>0:$J(GK/2.2,0,2),1:"")
46 S ^TMP($J,"GMRK","G"_(140+GCNTD))=$S(GK>0:GK-(GWT-10)/5,1:"") S:GK>0 ^TMP($J,"GMRK","G"_(160+GCNTD))="W"
47 I GK>0 S ^TMP($J,"GMRK","G"_(140+GCNTD))=$S(^TMP($J,"GMRK","G"_(140+GCNTD))<0.4:0.4,^("G"_(140+GCNTD))>16.5:16.5,1:^("G"_(140+GCNTD))) S:^("G"_(140+GCNTD))<0.5!(^("G"_(140+GCNTD))>16.4) ^TMP($J,"GMRK","G"_(160+GCNTD))="W**"
48 Q
Note: See TracBrowser for help on using the repository browser.