source: FOIAVistA/trunk/r/GEN_MED_OTHER-GMV/GMVHG0.m@ 1123

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

initial load of FOIAVistA 6/30/08 version

File size: 3.8 KB
Line 
1GMVHG0 ;HIOFO/YH,FT-HP LASER SF 511 GRAPH - DATA ARRAY ;11/6/01 15:07
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 ;ENTRY POINT FROM GMVSR0 TO PRINT SF-511 GRAPH FOR HP-3/4
8 S GMRHT=0 K ^TMP($J,"GMR"),^TMP($J,"GMRK"),^TMP($J,"GDT"),^TMP($J,"GMRVG"),^TMP($J,"GTNM") F GI=1:1:200 S ^TMP($J,"GMRK","G"_GI)=""
9 S (GMROUT,GHT)="",^TMP($J,"GMRK","G50M")=0.2,^TMP($J,"GMRK","G82M")=0.6
10 S GSTART1=(9999999-GMRFIN)-.0001,GEND1=9999999-GMRSTRT
11 F GTYPE="B","H","P","R","T","W","PO2","CVP","CG","PN" D SETT^GMVGR0
12 S GRPT=5 D SETIO^GMVGR0 U IO D GRAPH
13Q1 K GSOL,GIVDT,GMRHLOC,GMRVJ,GDATA,GDT,GEN,GEND1,GI,GJ,GK,GMRVX,GSTART1,GTNM,GTYP,GTYPE,GX,I D KVAR^VADPT K VA,VAROOT
14 D QIO^GMVGR5 K GRPT,GMRRMBD,GAGE,GCNT,GDOB,GCNTB,GCNTD,GCNTP,GCNTR,GCNTT,GCNTT1,GCNTI,GCNTO,GDT1,GCNTPD,GCNTTD,GCNTW,GPG,GPGS,GHT,GTYPE1,GCNTB3,GDTA,XDT,XIO,XX,^TMP($J,"GMRK"),^TMP($J,"GMR"),^TMP($J,"GDT"),^TMP($J,"GMRVG")
15 K GLINE,GMRQUAL,^TMP($J,"GTNM") Q
16GRAPH D DEM^VADPT,INP^VADPT,SETV^GMVGR1
17 F GK="H","W","T","P","R","B","I","O","PO2","CVP","CG","PN" D
18 . 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)=""
19 S GTNM=0 F X=0:0 S X=$O(^TMP($J,"GDT",X)) Q:X'>0 S GTNM=GTNM+1
20 S GPG=$S(GTNM=0:1,1:GTNM\10+''(GTNM#10)),GDT1=0
21 F GPGS=1:1:GPG D
22 . F GI=1:1:200 S ^TMP($J,"GMRK","G"_GI)=""
23 . S ^TMP($J,"GMRK","G199")="Page "_GPGS D SETP,DATE S ^TMP($J,"GMRK","G200")=GMRRMBD D PAGE D ^GMVHG1 D
24 . . S ^TMP($J,"GMRK","G50M")=0.2,^TMP($J,"GMRK","G82M")=0.6,^TMP($J,"GMRK","G210M")=0.2,^TMP($J,"GMRK","G226M")=0.2
25 D KVAR^VADPT K VA,GRAPHT,GRAPHP,GRAPHS,GRAPHD,GPA Q
26PAGE ;SET GRAPH DATA
27 ;DATA FOR T GRAPH
28 D SETV^GMVGR1
29 K GRAPHT S GRAPHT=0,I=1,J=411,GPA=0 F GI=50:1:59 S GRAPHT=0.4+((I-1)*1.6) D:^TMP($J,"GMRK","G"_GI)'="" S I=I+1,J=J+1
30 .S GRAPHT(I)=$S(GPA=0:"PA",1:"PD")_GRAPHT_","_^TMP($J,"GMRK","G"_GI)_";LB"_^TMP($J,"GMRK","G"_J)_"#;",GPA=1
31 ;DATA FOR P GRAPH
32 K GRAPHP S GRAPHP=0,I=1,J=431,GPA=0 F GI=82:1:92 S GRAPHP=0.6+((I-1)*1.6) D:^TMP($J,"GMRK","G"_GI)'="" S I=I+1,J=J+1
33 .S GRAPHP(I)=$S(GPA=0:"PA",1:"PD")_GRAPHP_","_^TMP($J,"GMRK","G"_GI)_";LB"_^TMP($J,"GMRK","G"_J)_"#;",GPA=1
34 I $D(GMRQUAL) D LEGEND^GMVLGQU
35 K GMRQUAL,GG,GI,GMRVJ,GSYNO,GHOLD Q
36DATE S GHOLD="" 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
37 Q
38DATE1 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
39 Q
40SETD F GI="H","W","T","P","R","B","I","O","C" S GJ=$F("WTXPXRBIOCHDS",GI),GK=$S($L(GDT1):$O(^TMP($J,"GMRVG",GI,GDT1,"")),1:"") D SETA^GMVHG4
41 F GI="PO2","CVP","CG","PN" S GJ=0,GK=$S($L(GDT1):$O(^TMP($J,"GMRVG",GI,GDT1,"")),1:"") D SETA^GMVHG4
42 Q
43SETP ;INITIALIZE ^TMP FOR HEIGHT AND V/M QUALIFIERS
44 ;470 - STORE HEIGHT IN INCH 1100 - STORE HEIGHT IN CM
45 ;1200 - STORE WEIGHT IN KG 1300 - STORE BODY MASS INDEX
46 ; 410 - STORE T* 430 - STORE P* 450 - STORE BP QUALIFIER
47 ;1400+I - PULSE OXIMETRY DATA 1430+I - PULSE OX. L/MIN
48 ;1450+I - PULSE OX. % 1470+I - PULSE OX. METHOD
49 ;1500+I - CVP DATA IN CM H2O 1530+I - CVP DATA IN MMHG
50 ;1550+I - C/G DATA IN INCH 1570+I - C/G QUALIFIER 1600+I - PULSE QUALIFIER
51 ;1620+I - C/G DATA IN CM 1640+I - THE THIRD PIECE OF BP
52 ;1660+I - PAIN
53 F I=1:1:10 D
54 . S (^TMP($J,"GMRK","G"_(410+I)),^("G"_(430+I)),^("G"_(450+I)),^("G"_(470+I)),^("G"_(1100+I)),^("G"_(1200+I)),^("G"_(1300+I)),^("G"_(1640+I)))=""
55 . S (^TMP($J,"GMRK","G"_(1400+I)),^("G"_(1430+I)),^("G"_(1450+I)),^("G"_(1470+I)),^("G"_(1500+I)),^("G"_(1530+I)),^("G"_(1550+I)),^("G"_(1570+I)))=""
56 . S (^TMP($J,"GMRK","G"_(1600+I)),^("G"_(1620+I)),^("G"_(1660+I)))=""
57 Q
Note: See TracBrowser for help on using the repository browser.