BDMD31P ; IHS/CMI/LAB - 2003 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("BDMDM31",BDMJOB,BDMBTH,"AUDIT",BDMPD)) Q:BDMPD'=+BDMPD!(BDMQUIT) D
.W:$D(IOF) @IOF
.W !,$$CTR("ASSESSMENT OF DIABETES CARE, 2003 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)
.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:",?40,"IMMUNIZATIONS"
.W !?1,"CMS Register: ",$$I(22),?40,"Flu vaccine (past yr): ",$$I(64)
.W !?1,"Problem List: ",$$I(23),?40,"Pneumovax Ever: ",$$I(66)
.W !?1,"1st DX recorded in PCC: ",$$I(21),?40,"Td in past 10 yrs: ",$$I(68)
.W !,"Diabetes Type: ",$$I(29),?40,"PPD Status: ",$$I(70)
.W !?1,"CMS Register: ",$$I(24),?40,"If PPD Pos, INH Tx Complete: "
.W !?1,"Problem List: ",$$I(25),?42,$P($$I(72),U)," ",$P($$I(72),U,2)
.W !?1,"PCC POV's: ",$$I(26),?40,"If PPD Neg, Last PPD date: " W $$FMTE^XLFDT($$I(114))
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !!,"TOBACCO USE: ",$$I(27),?40,"Date of Last EKG: ",$$I(76)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,"Referred for (or provided)"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,"Cessation Counseling: ",$$I(28),?40,"LABORATORY DATA"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?40,"HbA1c (most recent): ",$P($$I(78),U,1)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"VITAL STATISTICS",?41,"Date Obtained: ",$P($$I(78),U,2)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Height: ",$$I(30),?40,"HbA1c (next most recent): ",$P($$I(78),U,4)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Last Weight: ",$$I(32),?41,"Date Obtained: ",$P($$I(78),U,5)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"HTN (documented DX): ",$$I(34),?40,"Last 3 Blood Sugars (in past yr)"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Last 3 Blood Pressures (in past yr):",?42,$P($$I(82),U)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?2,$P($$I(36),";"),?42,$P($$I(82),U,2)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?2,$P($$I(36),";",2),?42,$P($$I(82),U,3)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?2,$P($$I(36),";",3),?40,"MOST RECENT SERUM VALUE (in the"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?40,"past 12 months):"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"EXAMINATIONS (in past year)",?41,"Creatinine: ",$$I(84)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Foot exam-complete: ",?41,"Total Cholesterol: ",$$I(86)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?2,$$I(38)
.W ?41,"HDL Cholesterol: ",$$I(89)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Eye exam (dilated/fundus): "
.W ?41,"LDL Cholesterol: ",$$I(88)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?2,$$I(40)
.W ?41,"Triglycerides: ",$$I(90)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Dental exam: "
.W ?41,"Urinalysis: ",$$I(92)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?2,$$I(42)
.W ?41,"Proteinuria: ",$$I(94)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"EDUCATION (in past year)"
.W ?41,"Microalbuminuria: ",$$I(96)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Diet Instruction: ",$$I(44)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Exercise Instruction: ",$$I(46)
.W ?40,"Self monitoring of blood glucose"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"DM Education (Other): ",$$I(48)
.W ?41,"documented in chart: ",$$I(98)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !!,"DM THERAPY"
.;W ?40,"Is patient participating in SDM? ",$$I(100)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Select all that currently apply"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,$$I(51),?4,"1 Diet & Exercise Alone"
.;W ?40,"Peridontal Exam: ",$$I(102)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,$$I(52),?4,"2 Insulin"
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,$$I(53),?4,"3 Sulfonylurea "
.;W ?40,"Last AST date: ",$$I(104)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,$$I(54),?4,"4 Metformin "
.;W ?40,"Last ALT: ",$$I(106)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,$$I(55),?4,"5 Acarbose "
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,$$I(56),?4,"6 Glitazones"
.W ?40,"Pap Smear in past yr: ",$$I(108)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !?1,?4,"9 Unknown/Refused"
.;W ?40,"Mammogram in past yr: ",$$I(110)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"ACE Inhibitor Use: ",$$I(60)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Aspirin/Anti-Platelet Therapy: ",$$I(62)
.W ?40,"BMI: ",$$I(112)
.I $Y>(IOSL-1) D PAGE Q:BDMQUIT
.W !,"Lipid Lowering Agent: ",$$I(61),!
CUML ;
I BDMPREP=4!(BDMPREP=3) D CUML^BDMD314
DONE ;
K ^TMP($J)
K ^XTMP("BDMDM31",BDMJOB,BDMBTH),BDMJOB,BDMBTH
Q
I(I) ;
Q ^XTMP("BDMDM31",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
;----------
BDMD31P ; IHS/CMI/LAB - 2003 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("BDMDM31",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, 2003 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 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)
+14 WRITE !,"REVIEWER: ",$$I(14),?17,"CHART #: ",$$I(16),?38,"DOB: ",$$I(18),?66,"SEX: ",$$I(20)
+15 WRITE !,"PRIMARY CARE PROVIDER: ",$$I(15)
+16 WRITE !!,"DATE OF DIABETES DIAGNOSIS:",?40,"IMMUNIZATIONS"
+17 WRITE !?1,"CMS Register: ",$$I(22),?40,"Flu vaccine (past yr): ",$$I(64)
+18 WRITE !?1,"Problem List: ",$$I(23),?40,"Pneumovax Ever: ",$$I(66)
+19 WRITE !?1,"1st DX recorded in PCC: ",$$I(21),?40,"Td in past 10 yrs: ",$$I(68)
+20 WRITE !,"Diabetes Type: ",$$I(29),?40,"PPD Status: ",$$I(70)
+21 WRITE !?1,"CMS Register: ",$$I(24),?40,"If PPD Pos, INH Tx Complete: "
+22 WRITE !?1,"Problem List: ",$$I(25),?42,$PIECE($$I(72),U)," ",$PIECE($$I(72),U,2)
+23 WRITE !?1,"PCC POV's: ",$$I(26),?40,"If PPD Neg, Last PPD date: "
WRITE $$FMTE^XLFDT($$I(114))
+24 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+25 WRITE !!,"TOBACCO USE: ",$$I(27),?40,"Date of Last EKG: ",$$I(76)
+26 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+27 WRITE !?1,"Referred for (or provided)"
+28 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+29 WRITE !?1,"Cessation Counseling: ",$$I(28),?40,"LABORATORY DATA"
+30 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+31 WRITE !?40,"HbA1c (most recent): ",$PIECE($$I(78),U,1)
+32 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+33 WRITE !,"VITAL STATISTICS",?41,"Date Obtained: ",$PIECE($$I(78),U,2)
+34 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+35 WRITE !,"Height: ",$$I(30),?40,"HbA1c (next most recent): ",$PIECE($$I(78),U,4)
+36 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+37 WRITE !,"Last Weight: ",$$I(32),?41,"Date Obtained: ",$PIECE($$I(78),U,5)
+38 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+39 WRITE !,"HTN (documented DX): ",$$I(34),?40,"Last 3 Blood Sugars (in past yr)"
+40 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+41 WRITE !,"Last 3 Blood Pressures (in past yr):",?42,$PIECE($$I(82),U)
+42 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+43 WRITE !?2,$PIECE($$I(36),";"),?42,$PIECE($$I(82),U,2)
+44 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+45 WRITE !?2,$PIECE($$I(36),";",2),?42,$PIECE($$I(82),U,3)
+46 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+47 WRITE !?2,$PIECE($$I(36),";",3),?40,"MOST RECENT SERUM VALUE (in the"
+48 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+49 WRITE !?40,"past 12 months):"
+50 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+51 WRITE !,"EXAMINATIONS (in past year)",?41,"Creatinine: ",$$I(84)
+52 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+53 WRITE !,"Foot exam-complete: ",?41,"Total Cholesterol: ",$$I(86)
+54 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+55 WRITE !?2,$$I(38)
+56 WRITE ?41,"HDL Cholesterol: ",$$I(89)
+57 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+58 WRITE !,"Eye exam (dilated/fundus): "
+59 WRITE ?41,"LDL Cholesterol: ",$$I(88)
+60 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+61 WRITE !?2,$$I(40)
+62 WRITE ?41,"Triglycerides: ",$$I(90)
+63 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+64 WRITE !,"Dental exam: "
+65 WRITE ?41,"Urinalysis: ",$$I(92)
+66 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+67 WRITE !?2,$$I(42)
+68 WRITE ?41,"Proteinuria: ",$$I(94)
+69 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+70 WRITE !,"EDUCATION (in past year)"
+71 WRITE ?41,"Microalbuminuria: ",$$I(96)
+72 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+73 WRITE !,"Diet Instruction: ",$$I(44)
+74 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+75 WRITE !,"Exercise Instruction: ",$$I(46)
+76 WRITE ?40,"Self monitoring of blood glucose"
+77 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+78 WRITE !,"DM Education (Other): ",$$I(48)
+79 WRITE ?41,"documented in chart: ",$$I(98)
+80 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+81 WRITE !!,"DM THERAPY"
+82 ;W ?40,"Is patient participating in SDM? ",$$I(100)
+83 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+84 WRITE !,"Select all that currently apply"
+85 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+86 WRITE !?1,$$I(51),?4,"1 Diet & Exercise Alone"
+87 ;W ?40,"Peridontal Exam: ",$$I(102)
+88 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+89 WRITE !?1,$$I(52),?4,"2 Insulin"
+90 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+91 WRITE !?1,$$I(53),?4,"3 Sulfonylurea "
+92 ;W ?40,"Last AST date: ",$$I(104)
+93 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+94 WRITE !?1,$$I(54),?4,"4 Metformin "
+95 ;W ?40,"Last ALT: ",$$I(106)
+96 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+97 WRITE !?1,$$I(55),?4,"5 Acarbose "
+98 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+99 WRITE !?1,$$I(56),?4,"6 Glitazones"
+100 WRITE ?40,"Pap Smear in past yr: ",$$I(108)
+101 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+102 WRITE !?1,?4,"9 Unknown/Refused"
+103 ;W ?40,"Mammogram in past yr: ",$$I(110)
+104 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+105 WRITE !,"ACE Inhibitor Use: ",$$I(60)
+106 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+107 WRITE !,"Aspirin/Anti-Platelet Therapy: ",$$I(62)
+108 WRITE ?40,"BMI: ",$$I(112)
+109 IF $Y>(IOSL-1)
DO PAGE
IF BDMQUIT
QUIT
+110 WRITE !,"Lipid Lowering Agent: ",$$I(61),!
End DoDot:1
CUML ;
+1 IF BDMPREP=4!(BDMPREP=3)
DO CUML^BDMD314
DONE ;
+1 KILL ^TMP($JOB)
+2 KILL ^XTMP("BDMDM31",BDMJOB,BDMBTH),BDMJOB,BDMBTH
+3 QUIT
I(I) ;
+1 QUIT ^XTMP("BDMDM31",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 ;----------