| 1 | GMRVKPN0 ;HCIOFO/YH-KYOCERA PAIN CHART - DATA ARRAY ;2/12/99
|
---|
| 2 | ;;4.0;Vitals/Measurements;**9**;Apr 25, 1997
|
---|
| 3 | EN1 ;ENTRY POINT TO PRINT KYOCERA PAIN CHART
|
---|
| 4 | ;S DFN=72,GMRSTRT=2990201,GMRFIN=2990215
|
---|
| 5 | 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)=""
|
---|
| 6 | S GSTART1=(9999999-GMRFIN)-.0001,GEND1=9999999-GMRSTRT,^TMP($J,"GMRK","G50M")=0.4
|
---|
| 7 | F GTYPE="PN" D SETT^GMRVHPN0
|
---|
| 8 | U IO D GRAPH
|
---|
| 9 | 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
|
---|
| 10 | 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")
|
---|
| 11 | K ^TMP($J,"GTNM") Q
|
---|
| 12 | GRAPH D DEM^VADPT,INP^VADPT,SETV^GMRVGR1
|
---|
| 13 | 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)=""
|
---|
| 14 | S GTNM=0 F X=0:0 S X=$O(^TMP($J,"GDT",X)) Q:X'>0 S GTNM=GTNM+1
|
---|
| 15 | S GPG=$S(GTNM=0:1,1:GTNM\10+''(GTNM#10)),GDT1=0
|
---|
| 16 | F GPGS=1:1:GPG S ^TMP($J,"GMRK","G199")="Page "_GPGS D SETP,DATE S ^TMP($J,"GMRK","G200")=GMRRMBD D PAGE,^GMRVKPN1,^GMRVKPN2
|
---|
| 17 | D KVAR^VADPT K VA,GRAPHR,GRAPHP,GRAPHS,GRAPHD,GPA Q
|
---|
| 18 | PAGE ;SET GRAPH DATA
|
---|
| 19 | ;DATA FOR PAIN CHART
|
---|
| 20 | F GI=50:1:59 S ^TMP($J,"GMRK","G50")=^TMP($J,"GMRK","G"_GI),^TMP($J,"GMRK","G50M")=0.4+(1.6*(GI-50)) Q:^TMP($J,"GMRK","G50")'=""
|
---|
| 21 | Q
|
---|
| 22 | 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
|
---|
| 23 | Q
|
---|
| 24 | 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
|
---|
| 25 | Q
|
---|
| 26 | SETD S GI="PN" S GJ=48,GK=$S($L(GDT1):$O(^TMP($J,"GMRVG",GI,GDT1,"")),1:"") D SETA
|
---|
| 27 | Q
|
---|
| 28 | SETP ;INITIALIZE ^TMP FOR QUALIFIERS
|
---|
| 29 | ; 410 - STORE P
|
---|
| 30 | ; 250+I - DATA
|
---|
| 31 | F I=1:1:10 S (^TMP($J,"GMRK","G"_(410+I)),^("G"_(250+I)))=""
|
---|
| 32 | Q
|
---|
| 33 | SETA ;
|
---|
| 34 | I GK="Unavailable" S GK="Unavail"
|
---|
| 35 | S ^TMP($J,"GMRK","G"_(GJ+200+GCNTD+1))=GK
|
---|
| 36 | I (GK=99)!("PASSREFUSEDUNAVAIL"[$$UP^XLFSTR(GK)) S ^TMP($J,"GMRK","G"_(49+GCNTD))="" Q
|
---|
| 37 | S ^TMP($J,"GMRK","G"_(49+GCNTD))=12-GK
|
---|
| 38 | S ^TMP($J,"GMRK","G"_(410+GCNTD))="P"
|
---|
| 39 | Q
|
---|