BDMD51P ; IHS/CMI/LAB - 2005 DIABETES AUDIT PRINT ;
;;2.0;DIABETES MANAGEMENT SYSTEM;**2**;JUN 14, 2007
;
;
S BDMQUIT=0
I BDMPREP=3 G CUML
;print ind audits first
S BDMPD=0 F S BDMPD=$O(^XTMP("BDMDM51",BDMJOB,BDMBTH,"AUDIT",BDMPD)) Q:BDMPD'=+BDMPD!(BDMQUIT) D
.W:$D(IOF) @IOF
.W $$CTR("ASSESSMENT OF DIABETES CARE, 2005 DATE AUDIT RUN: "_$$FMTE^XLFDT(BDMRED),80)
.;W !,$$CTR("DATE AUDIT RUN: "_$$FMTE^XLFDT(DT),80)
.W !,"AUDIT DATE: ",$$FMTE^XLFDT(BDMRED),?30,"FACILITY NAME: ",$P(^DIC(4,DUZ(2),0),U)
.W !,"AREA: ",$$I(6),?12,"SU: ",$$I(8),?30,"FACILITY: ",$$I(10),?48,"# PTS ON DM REGISTER: ",$$I(12)
.I $G(BDMSDPI)]"" W !,"Does you community receive SDPI grant funds? "_$S(BDMSDPI=1:"Yes",BDMSDPI=2:"No",BDMSDPI=3:"Don't know",1:"")
.I $G(BDMSDPI)=1 W " ",BDMSDPG
.W !!,"TRIBAL AFFIL: ",$P($$I(120),U,1)," ",$E($P($$I(120),U,2),1,20)," ","COMMUNITY: ",$P($$I(121),U)," ",$E($P($$I(121),U,2),1,19)
.W !,"REVIEWER: ",$$I(14),?17,"CHART #: ",$$I(16),?38,"DOB: ",$$I(18),?66,"SEX: ",$$I(20)
.W !,"PRIMARY CARE PROVIDER: ",$$I(15)
.W !!,"DATE OF DIABETES DIAGNOSIS:"
.W ?40,"Lipid Lowering Agent: ",$$I(61)
.W !?1,"CMS Register: ",$$I(22)
.W !?1,"Problem List: ",$$I(23)
.W ?40,"IMMUNIZATIONS"
.W !?1,"1st DX recorded in PCC: ",$$I(21)
.W ?40,"Flu vaccine (past yr): ",$$I(64)
.W !,"Diabetes Type: ",$$I(29)
.W ?40,"Pneumovax Ever: ",$$I(66)
.W !?1,"CMS Register: ",$$I(24)
.W ?40,"Td in past 10 yrs: ",$$I(68)
.W !?1,"Problem List: ",$$I(25)
.W ?40,"PPD Status: ",$$I(70)
.W !?1,"PCC POV's: ",$$I(26)
.W ?40,"If PPD Pos, INH Tx Complete: "
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !
.W ?42,$P($$I(72),U)," ",$P($$I(72),U,2)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"TOBACCO USE: ",$$I(27)
.W ?40,"If PPD Neg, Last PPD date: " W $$FMTE^XLFDT($$I(114))
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,"Referred for (or provided) Cessation"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,"Counseling: ",$$I(28)
.W ?40,"Date of Last EKG: ",$$I(76)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"VITAL STATISTICS"
.W ?40,"LABORATORY DATA"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Height: ",$$I(30)
.W ?40,"HbA1c (most recent): ",$P($$I(78),U,1)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Last Weight: ",$$I(32)
.W ?41,"Date Obtained: ",$P($$I(78),U,2)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !," BMI: ",$$I(112)
.W ?40,"HbA1c (next most recent): ",$P($$I(78),U,4)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"HTN (documented DX): ",$$I(34)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Last 3 Blood Pressures (in past yr):"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?2,$P($$I(36),";")
.W ?40,"MOST RECENT SERUM VALUE (in the"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?2,$P($$I(36),";",2)
.W ?40,"past 12 months):"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?2,$P($$I(36),";",3)
.W ?41,"Creatinine: ",$$I(84)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !
.W ?41,"Total Cholesterol: ",$$I(86)
.W !,"EXAMINATIONS (in past year)"
.W ?41,"HDL Cholesterol: ",$$I(89)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Foot exam-complete: "
.W ?41,"LDL Cholesterol: ",$$I(88)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?2,$$I(38)
.W ?41,"Triglycerides: ",$$I(90)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Eye exam (dilated/fundus): "
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?2,$$I(40)
.W ?41,"Urinalysis or A/C Ratio: "
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Dental exam: "
.W ?42,$$I(92)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?2,$$I(42)
.W ?41,"Proteinuria: "
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !
.W ?42,$$I(94)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"EDUCATION (in past year)"
.W ?41,"Microalbuminuria: "
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Diet Instruction: ",$$I(44)
.W ?42,$$I(96)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Exercise Instruction: ",$$I(46)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"DM Education (Other): ",$$I(48)
.W ?40,"Self monitoring of blood glucose"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !
.W ?41,"documented in chart: ",$$I(98)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"DM THERAPY"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Select all that currently apply"
.W ?40,"Supplemental Section"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,$$I(51),?4,"1 Diet & Exercise Alone"
.W ?40,"Does pt have depression as an active"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,$$I(52),?4,"2 Insulin"
.W ?41,"problem? ",$$I(200)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,$$I(53),?4,"3 Sulfonylurea "
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,$$I(54),?4,"4 Metformin "
.W ?40,"If 'No', has pt been screened for"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,$$I(55),?4,"5 Acarbose "
.W ?41,"depression in the past year?"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,$$I(56),?4,"6 Glitazones"
.W ?42,$$I(210)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,$P($$I(57),U),?4,"9 Unknown/Refused" I $$I(57)]"" W " ",$P($$I(57),U,2)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"ACE Inhibitor/ARB Use: ",$$I(60)
.W ?41,"Local Option question:"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Aspirin/Anti-Platelet Therapy: ",$$I(62)
.D PAGE Q:BDMQUIT
CUML ;
I BDMPREP=4!(BDMPREP=3) D CUML^BDMD514
DONE ;
K ^TMP($J)
K ^XTMP("BDMDM51",BDMJOB,BDMBTH),BDMJOB,BDMBTH
Q
I(I) ;
Q ^XTMP("BDMDM51",BDMJOB,BDMBTH,"AUDIT",BDMPD,I)
;
PAGE ;
I $E(IOST)="C",IO=IO(0) W ! S DIR(0)="EO" D ^DIR K DIR I Y=0!(Y="^")!($D(DTOUT)) S BDMQUIT=1 Q
W:$D(IOF) @IOF
Q
CTR(X,Y) ;EP - Center X in a field Y wide.
Q $J("",$S($D(Y):Y,1:IOM)-$L(X)\2)_X
;----------
BDMD51P ; IHS/CMI/LAB - 2005 DIABETES AUDIT PRINT ;
+1 ;;2.0;DIABETES MANAGEMENT SYSTEM;**2**;JUN 14, 2007
+2 ;
+3 ;
+4 SET BDMQUIT=0
+5 IF BDMPREP=3
GOTO CUML
+6 ;print ind audits first
+7 SET BDMPD=0
FOR
SET BDMPD=$ORDER(^XTMP("BDMDM51",BDMJOB,BDMBTH,"AUDIT",BDMPD))
IF BDMPD'=+BDMPD!(BDMQUIT)
QUIT
Begin DoDot:1
+8 IF $DATA(IOF)
WRITE @IOF
+9 WRITE $$CTR("ASSESSMENT OF DIABETES CARE, 2005 DATE AUDIT RUN: "_$$FMTE^XLFDT(BDMRED),80)
+10 ;W !,$$CTR("DATE AUDIT RUN: "_$$FMTE^XLFDT(DT),80)
+11 WRITE !,"AUDIT DATE: ",$$FMTE^XLFDT(BDMRED),?30,"FACILITY NAME: ",$PIECE(^DIC(4,DUZ(2),0),U)
+12 WRITE !,"AREA: ",$$I(6),?12,"SU: ",$$I(8),?30,"FACILITY: ",$$I(10),?48,"# PTS ON DM REGISTER: ",$$I(12)
+13 IF $GET(BDMSDPI)]""
WRITE !,"Does you community receive SDPI grant funds? "_$SELECT(BDMSDPI=1:"Yes",BDMSDPI=2:"No",BDMSDPI=3:"Don't know",1:"")
+14 IF $GET(BDMSDPI)=1
WRITE " ",BDMSDPG
+15 WRITE !!,"TRIBAL AFFIL: ",$PIECE($$I(120),U,1)," ",$EXTRACT($PIECE($$I(120),U,2),1,20)," ","COMMUNITY: ",$PIECE($$I(121),U)," ",$EXTRACT($PIECE($$I(121),U,2),1,19)
+16 WRITE !,"REVIEWER: ",$$I(14),?17,"CHART #: ",$$I(16),?38,"DOB: ",$$I(18),?66,"SEX: ",$$I(20)
+17 WRITE !,"PRIMARY CARE PROVIDER: ",$$I(15)
+18 WRITE !!,"DATE OF DIABETES DIAGNOSIS:"
+19 WRITE ?40,"Lipid Lowering Agent: ",$$I(61)
+20 WRITE !?1,"CMS Register: ",$$I(22)
+21 WRITE !?1,"Problem List: ",$$I(23)
+22 WRITE ?40,"IMMUNIZATIONS"
+23 WRITE !?1,"1st DX recorded in PCC: ",$$I(21)
+24 WRITE ?40,"Flu vaccine (past yr): ",$$I(64)
+25 WRITE !,"Diabetes Type: ",$$I(29)
+26 WRITE ?40,"Pneumovax Ever: ",$$I(66)
+27 WRITE !?1,"CMS Register: ",$$I(24)
+28 WRITE ?40,"Td in past 10 yrs: ",$$I(68)
+29 WRITE !?1,"Problem List: ",$$I(25)
+30 WRITE ?40,"PPD Status: ",$$I(70)
+31 WRITE !?1,"PCC POV's: ",$$I(26)
+32 WRITE ?40,"If PPD Pos, INH Tx Complete: "
+33 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+34 WRITE !
+35 WRITE ?42,$PIECE($$I(72),U)," ",$PIECE($$I(72),U,2)
+36 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+37 WRITE !,"TOBACCO USE: ",$$I(27)
+38 WRITE ?40,"If PPD Neg, Last PPD date: "
WRITE $$FMTE^XLFDT($$I(114))
+39 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+40 WRITE !?1,"Referred for (or provided) Cessation"
+41 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+42 WRITE !?1,"Counseling: ",$$I(28)
+43 WRITE ?40,"Date of Last EKG: ",$$I(76)
+44 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+45 WRITE !
+46 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+47 WRITE !,"VITAL STATISTICS"
+48 WRITE ?40,"LABORATORY DATA"
+49 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+50 WRITE !,"Height: ",$$I(30)
+51 WRITE ?40,"HbA1c (most recent): ",$PIECE($$I(78),U,1)
+52 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+53 WRITE !,"Last Weight: ",$$I(32)
+54 WRITE ?41,"Date Obtained: ",$PIECE($$I(78),U,2)
+55 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+56 WRITE !," BMI: ",$$I(112)
+57 WRITE ?40,"HbA1c (next most recent): ",$PIECE($$I(78),U,4)
+58 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+59 WRITE !,"HTN (documented DX): ",$$I(34)
+60 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+61 WRITE !,"Last 3 Blood Pressures (in past yr):"
+62 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+63 WRITE !?2,$PIECE($$I(36),";")
+64 WRITE ?40,"MOST RECENT SERUM VALUE (in the"
+65 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+66 WRITE !?2,$PIECE($$I(36),";",2)
+67 WRITE ?40,"past 12 months):"
+68 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+69 WRITE !?2,$PIECE($$I(36),";",3)
+70 WRITE ?41,"Creatinine: ",$$I(84)
+71 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+72 WRITE !
+73 WRITE ?41,"Total Cholesterol: ",$$I(86)
+74 WRITE !,"EXAMINATIONS (in past year)"
+75 WRITE ?41,"HDL Cholesterol: ",$$I(89)
+76 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+77 WRITE !,"Foot exam-complete: "
+78 WRITE ?41,"LDL Cholesterol: ",$$I(88)
+79 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+80 WRITE !?2,$$I(38)
+81 WRITE ?41,"Triglycerides: ",$$I(90)
+82 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+83 WRITE !,"Eye exam (dilated/fundus): "
+84 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+85 WRITE !?2,$$I(40)
+86 WRITE ?41,"Urinalysis or A/C Ratio: "
+87 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+88 WRITE !,"Dental exam: "
+89 WRITE ?42,$$I(92)
+90 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+91 WRITE !?2,$$I(42)
+92 WRITE ?41,"Proteinuria: "
+93 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+94 WRITE !
+95 WRITE ?42,$$I(94)
+96 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+97 WRITE !,"EDUCATION (in past year)"
+98 WRITE ?41,"Microalbuminuria: "
+99 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+100 WRITE !,"Diet Instruction: ",$$I(44)
+101 WRITE ?42,$$I(96)
+102 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+103 WRITE !,"Exercise Instruction: ",$$I(46)
+104 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+105 WRITE !,"DM Education (Other): ",$$I(48)
+106 WRITE ?40,"Self monitoring of blood glucose"
+107 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+108 WRITE !
+109 WRITE ?41,"documented in chart: ",$$I(98)
+110 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+111 WRITE !,"DM THERAPY"
+112 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+113 WRITE !,"Select all that currently apply"
+114 WRITE ?40,"Supplemental Section"
+115 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+116 WRITE !?1,$$I(51),?4,"1 Diet & Exercise Alone"
+117 WRITE ?40,"Does pt have depression as an active"
+118 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+119 WRITE !?1,$$I(52),?4,"2 Insulin"
+120 WRITE ?41,"problem? ",$$I(200)
+121 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+122 WRITE !?1,$$I(53),?4,"3 Sulfonylurea "
+123 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+124 WRITE !?1,$$I(54),?4,"4 Metformin "
+125 WRITE ?40,"If 'No', has pt been screened for"
+126 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+127 WRITE !?1,$$I(55),?4,"5 Acarbose "
+128 WRITE ?41,"depression in the past year?"
+129 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+130 WRITE !?1,$$I(56),?4,"6 Glitazones"
+131 WRITE ?42,$$I(210)
+132 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+133 WRITE !?1,$PIECE($$I(57),U),?4,"9 Unknown/Refused"
IF $$I(57)]""
WRITE " ",$PIECE($$I(57),U,2)
+134 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+135 WRITE !,"ACE Inhibitor/ARB Use: ",$$I(60)
+136 WRITE ?41,"Local Option question:"
+137 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+138 WRITE !,"Aspirin/Anti-Platelet Therapy: ",$$I(62)
+139 DO PAGE
IF BDMQUIT
QUIT
End DoDot:1
CUML ;
+1 IF BDMPREP=4!(BDMPREP=3)
DO CUML^BDMD514
DONE ;
+1 KILL ^TMP($JOB)
+2 KILL ^XTMP("BDMDM51",BDMJOB,BDMBTH),BDMJOB,BDMBTH
+3 QUIT
I(I) ;
+1 QUIT ^XTMP("BDMDM51",BDMJOB,BDMBTH,"AUDIT",BDMPD,I)
+2 ;
PAGE ;
+1 IF $EXTRACT(IOST)="C"
IF IO=IO(0)
WRITE !
SET DIR(0)="EO"
DO ^DIR
KILL DIR
IF Y=0!(Y="^")!($DATA(DTOUT))
SET BDMQUIT=1
QUIT
+2 IF $DATA(IOF)
WRITE @IOF
+3 QUIT
CTR(X,Y) ;EP - Center X in a field Y wide.
+1 QUIT $JUSTIFY("",$SELECT($DATA(Y):Y,1:IOM)-$LENGTH(X)\2)_X
+2 ;----------