[613] | 1 | GMVHPN0 ;HIOFO/YH,FT-HP LASER PAIN CHART - DATA ARRAY ;11/6/01 15:14
|
---|
| 2 | ;;5.0;GEN. MED. REC. - VITALS;;Oct 31, 2002
|
---|
| 3 | ;
|
---|
| 4 | ; This routine uses the following IAs:
|
---|
| 5 | ; #10061 - ^VADPT calls (supported)
|
---|
| 6 | ; #10104 - ^XLFSTR calls (supported)
|
---|
| 7 | ;
|
---|
| 8 | EN1 ;ENTRY POINT FROM GMVSR0 TO PRINT CHART FOR HP LASER PRINTER
|
---|
| 9 | S GMROUT=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)=""
|
---|
| 10 | S GMROUT=0
|
---|
| 11 | S GSTART1=(9999999-GMRFIN)-.0001,GEND1=9999999-GMRSTRT
|
---|
| 12 | F GTYPE="PN" D SETT
|
---|
| 13 | U IO D GRAPH
|
---|
| 14 | Q1 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
|
---|
| 15 | K GMRRMBD,GAGE,GCNT,GDOB,GCNTB,GCNTD,GCNTP,GCNTR,GCNTT,GCNTT1,GCNTI,GCNTO,GDT1,GCNTPD,GCNTTD,GCNTW,GPG,GPGS,GTYPE1,GCNTB3,GDTA,XDT,XIO,XX,^TMP($J,"GMRK"),^TMP($J,"GMR"),^TMP($J,"GDT"),^TMP($J,"GMRVG")
|
---|
| 16 | K ^TMP($J,"GTNM") Q
|
---|
| 17 | GRAPH D DEM^VADPT,INP^VADPT,SETV^GMVGR1
|
---|
| 18 | S GK="PN",^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 | . S ^TMP($J,"GMRK","G199")="Page "_GPGS D SETP,DATE S ^TMP($J,"GMRK","G200")=GMRRMBD D PAGE D EN2^GMVHPN1
|
---|
| 23 | D KVAR^VADPT K VA,GRAPHR,GRAPHS,GRAPHD,GPA Q
|
---|
| 24 | PAGE ;SET GRAPH DATA
|
---|
| 25 | ;DATA FOR PAIN CHART
|
---|
| 26 | K GRAPHR S GRAPHR=0,I=1,J=411,GPA=0 F GI=312:1:321 S GRAPHR=0.4+(1.6*(I-1)) S GK=^TMP($J,"GMRK","G"_GI) D:(GK'="")&(GK'=99)&("PASSREFUSEDUNAVAL"'[$$UP^XLFSTR(GK)) S I=I+1,J=J+1
|
---|
| 27 | .S GRAPHR(I)=$S(GPA=0:"PA",1:"PD")_GRAPHR_","_GK_";LB"_^TMP($J,"GMRK","G"_J)_"#;",GPA=1
|
---|
| 28 | K GG,GI,GMRVJ,GSYNO Q
|
---|
| 29 | 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
|
---|
| 30 | Q
|
---|
| 31 | 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
|
---|
| 32 | Q
|
---|
| 33 | SETD S GI="PN",GJ=310,GK=$S($L(GDT1):$O(^TMP($J,"GMRVG",GI,GDT1,"")),1:"") D SETA^GMVHPN2
|
---|
| 34 | Q
|
---|
| 35 | SETP ;INITIALIZE ^TMP FOR QUALIFIERS
|
---|
| 36 | ; 410 - STORE PN*
|
---|
| 37 | F I=1:1:10 S (^TMP($J,"GMRK","G"_(410+I)),^("G"_(311+I)),^("G"_(331+I)))=""
|
---|
| 38 | Q
|
---|
| 39 | SETT S GTYP=$O(^GMRD(120.51,"B","PAIN",0))
|
---|
| 40 | 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^GMVGR0
|
---|
| 41 | Q
|
---|