BDMD209 ; IHS/CMI/LAB - 2000 DIABETES AUDIT ;
;;2.0;DIABETES MANAGEMENT SYSTEM;**2,4**;JUN 14, 2007
;
;
W:$D(IOF) @IOF
W !!,"Checking for Taxonomies to support the 2000 Audit. ",!,"Please enter the device for printing.",!
ZIS ;
S XBRC="",XBRP="TAXCHK^BDMD209",XBNS="",XBRX="XIT^BDMD209"
D ^XBDBQUE
D XIT
Q
TAXCHK ;EP
W:$D(IOF) @IOF
K BDMQUIT
W !,"Checking for Taxonomies to support the 2000 Audit...",!
NEW A,BDMX,I,Y,Z,J
K A
S T="TAXS" F J=1:1 S Z=$T(@T+J),BDMX=$P(Z,";;",2),Y=$P(Z,";;",3) Q:BDMX="" D
.I '$D(^ATXAX("B",BDMX)) S A(BDMX)=Y_"^is Missing" Q
.S I=$O(^ATXAX("B",BDMX,0))
.I '$D(^ATXAX(I,21,"B")) S A(BDMX)=Y_"^has no entries "
S T="LAB" F J=1:1 S Z=$T(@T+J),BDMX=$P(Z,";;",2),Y=$P(Z,";;",3) Q:BDMX="" D
.I '$D(^ATXLAB("B",BDMX)) S A(BDMX)=Y_"^is Missing " Q
.S I=$O(^ATXLAB("B",BDMX,0))
.I '$D(^ATXLAB(I,21,"B")) S A(BDMX)=Y_"^has no entries "
I $Y>(IOSL-2) D PAGE
I '$D(A) W !,"All taxonomies are present.",! K A,BDMX,Y,I,Z Q
W !!,"In order for the 2000 Diabetes Audit to find all necessary data, several",!,"taxonomies must be established. The following taxonomies are missing or have",!,"no entries:"
S BDMX="" F S BDMX=$O(A(BDMX)) Q:BDMX=""!($D(BDMQUIT)) D
.I $Y>(IOSL-2) D PAGE Q:$D(BDMQUIT)
.W !,$P(A(BDMX),U)," [",BDMX,"] ",$P(A(BDMX),U,2)
.Q
DONE ;
I $E(IOST)="C",IO=IO(0) S DIR(0)="EO",DIR("A")="End of taxonomy check. HIT RETURN" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
Q
XIT ;EP
K BDM,BDMX,BDMQUIT,BDMLINE,BDMJ,BDMX,BDMTEXT,BDM
K X,Y,J
Q
BANNER ;EP - banner for 2000 audit menu
S BDMTEXT="TEXTD",BDM("VERSION")="2.0 (Patch 4)"
F BDMJ=1:1 S BDMX=$T(@BDMTEXT+BDMJ),BDMX=$P(BDMX,";;",2) Q:BDMX="QUIT"!(BDMX="") S BDMLINE=BDMJ
PRINT D ^XBCLS W:$D(IOF) @IOF
F BDMJ=1:1:BDMLINE S BDMX=$T(@BDMTEXT+BDMJ),BDMX=$P(BDMX,";;",2) W !?80-$L(BDMX)\2,BDMX K BDMX
W !?80-(8+$L(BDM("VERSION")))/2,"Version ",BDM("VERSION")
G XIT:'$D(DUZ(2)) G:'DUZ(2) XIT S BDM("SITE")=$P(^DIC(4,DUZ(2),0),"^") W !!?80-$L(BDM("SITE"))\2,BDM("SITE")
D XIT
Q
TEXTD ;EP
;;****************************************
;;** Diabetes Management System **
;;** 2000 Diabetes Audit Report Menu **
;;****************************************
;;QUIT
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="" Q
Q
TAXS ;
;;SURVEILLANCE DIABETES;;Diabetes Diagnoses Codes
;;SURVEILLANCE HYPERTENSION;;Hypertension Diagnoses Codes
;;SURVEILLANCE TUBERCULOSIS;;Tuberculosis Diagnoses Codes
;;DM AUDIT DIABETES EDUC TOPICS;;Diabetes Education Topics
;;DM AUDIT DIET EDUC TOPICS;;Diabetes Diet Education Topics
;;DM AUDIT EXERCISE EDUC TOPICS;;Diabetes Excercise Education Topics
;;DM AUDIT OTHER EDUC TOPICS;;Other Diabetes Education Topics
;;DM AUDIT SMOKING CESS EDUC;;Smoking Cess Education Topics
;;DM AUDIT TOBACCO HLTH FACTORS;;Tobacco Health Factors
;;DM AUDIT PROBLEM SMOKING DXS;;Smoking related diagnoses for Problem List
;;DM AUDIT PROBLEM HTN DIAGNOSES;;Hypertension Diagnoses
;;DM AUDIT PROBLEM DIABETES DX;;Diabetes Diagnoses
;;DM AUDIT SMOKING RELATED DXS;;Smoking related diagnoses for POVs
;;DM AUDIT CESSATION HLTH FACTOR;;Smoking Cessation Health Factors
;;DM AUDIT SELF MONITOR DRUGS;;Self Monitoring Drugs Taxonomy
;;DM AUDIT TB HEALTH FACTORS;;TB Status Health Factors
;;DM AUDIT INSULIN DRUGS;;Insulin Drug Taxonomy
;;DM AUDIT SULFONYLUREA DRUGS;;Sulfonylurea Drug Taxonomy
;;DM AUDIT METFORMIN DRUGS;;Metformin Drug Taxonomy
;;DM AUDIT ACARBOSE DRUGS;;Acarbose Drug Taxonomy
;;DM AUDIT LIPID LOWERING DRUGS;;Lipid Lowering Drug Taxonomy
;;DM AUDIT GLITAZONE DRUGS;;Glitzaone Drug Taxonomy
;;DM AUDIT ACE INHIBITORS;;ACE Inhibitor Drug Taxonomy
;;DM AUDIT ASPIRIN DRUGS;;Aspirin Drug Taxonomy
;;DM AUDIT SDM PROVIDERS;;SDM providers Taxonomy
;;DM AUDIT TYPE II DXS;;Type II Diagnoses
;;DM AUDIT TYPE I DXS;;Type I Diagnoses
;;
LAB ;
;;DM AUDIT URINE PROTEIN TAX;;Urine Protein Lab Taxonomy
;;DM AUDIT MICROALBUMINURIA TAX;;Microalbuminuia Lab Taxonomy
;;DM AUDIT HGB A1C TAX;;HGB A1C Lab Taxonomy
;;DM AUDIT GLUCOSE TESTS TAX;;Glucose Tests Taxonomy
;;DM AUDIT AST TAX;;AST Lab Taxonomy
;;DM AUDIT ALT TAX;;ALT Lab Taxonomy
;;DM AUDIT CREATININE TAX;;Creatinine Lab Taxonomy
;;DM AUDIT CHOLESTEROL TAX;;Cholesterol Lab Taxonomy
;;DM AUDIT LDL CHOLESTEROL TAX;;LDL Cholesterol Lab Taxonomy
;;DM AUDIT HDL TAX;;HDL Lab Taxonomy
;;DM AUDIT TRIGLYCERIDE TAX;;Triglyceride Lab Taxonomy
;;DM AUDIT URINALYSIS TAX;;Urinalysis Lab Taxonomy
;;
BDMD209 ; IHS/CMI/LAB - 2000 DIABETES AUDIT ;
+1 ;;2.0;DIABETES MANAGEMENT SYSTEM;**2,4**;JUN 14, 2007
+2 ;
+3 ;
+4 IF $DATA(IOF)
WRITE @IOF
+5 WRITE !!,"Checking for Taxonomies to support the 2000 Audit. ",!,"Please enter the device for printing.",!
ZIS ;
+1 SET XBRC=""
SET XBRP="TAXCHK^BDMD209"
SET XBNS=""
SET XBRX="XIT^BDMD209"
+2 DO ^XBDBQUE
+3 DO XIT
+4 QUIT
TAXCHK ;EP
+1 IF $DATA(IOF)
WRITE @IOF
+2 KILL BDMQUIT
+3 WRITE !,"Checking for Taxonomies to support the 2000 Audit...",!
+4 NEW A,BDMX,I,Y,Z,J
+5 KILL A
+6 SET T="TAXS"
FOR J=1:1
SET Z=$TEXT(@T+J)
SET BDMX=$PIECE(Z,";;",2)
SET Y=$PIECE(Z,";;",3)
IF BDMX=""
QUIT
Begin DoDot:1
+7 IF '$DATA(^ATXAX("B",BDMX))
SET A(BDMX)=Y_"^is Missing"
QUIT
+8 SET I=$ORDER(^ATXAX("B",BDMX,0))
+9 IF '$DATA(^ATXAX(I,21,"B"))
SET A(BDMX)=Y_"^has no entries "
End DoDot:1
+10 SET T="LAB"
FOR J=1:1
SET Z=$TEXT(@T+J)
SET BDMX=$PIECE(Z,";;",2)
SET Y=$PIECE(Z,";;",3)
IF BDMX=""
QUIT
Begin DoDot:1
+11 IF '$DATA(^ATXLAB("B",BDMX))
SET A(BDMX)=Y_"^is Missing "
QUIT
+12 SET I=$ORDER(^ATXLAB("B",BDMX,0))
+13 IF '$DATA(^ATXLAB(I,21,"B"))
SET A(BDMX)=Y_"^has no entries "
End DoDot:1
+14 IF $Y>(IOSL-2)
DO PAGE
+15 IF '$DATA(A)
WRITE !,"All taxonomies are present.",!
KILL A,BDMX,Y,I,Z
QUIT
+16 WRITE !!,"In order for the 2000 Diabetes Audit to find all necessary data, several",!,"taxonomies must be established. The following taxonomies are missing or have",!,"no entries:"
+17 SET BDMX=""
FOR
SET BDMX=$ORDER(A(BDMX))
IF BDMX=""!($DATA(BDMQUIT))
QUIT
Begin DoDot:1
+18 IF $Y>(IOSL-2)
DO PAGE
IF $DATA(BDMQUIT)
QUIT
+19 WRITE !,$PIECE(A(BDMX),U)," [",BDMX,"] ",$PIECE(A(BDMX),U,2)
+20 QUIT
End DoDot:1
DONE ;
+1 IF $EXTRACT(IOST)="C"
IF IO=IO(0)
SET DIR(0)="EO"
SET DIR("A")="End of taxonomy check. HIT RETURN"
DO ^DIR
KILL DIR
IF $DATA(DUOUT)
SET DIRUT=1
+2 QUIT
XIT ;EP
+1 KILL BDM,BDMX,BDMQUIT,BDMLINE,BDMJ,BDMX,BDMTEXT,BDM
+2 KILL X,Y,J
+3 QUIT
BANNER ;EP - banner for 2000 audit menu
+1 SET BDMTEXT="TEXTD"
SET BDM("VERSION")="2.0 (Patch 4)"
+2 FOR BDMJ=1:1
SET BDMX=$TEXT(@BDMTEXT+BDMJ)
SET BDMX=$PIECE(BDMX,";;",2)
IF BDMX="QUIT"!(BDMX="")
QUIT
SET BDMLINE=BDMJ
PRINT DO ^XBCLS
IF $DATA(IOF)
WRITE @IOF
+1 FOR BDMJ=1:1:BDMLINE
SET BDMX=$TEXT(@BDMTEXT+BDMJ)
SET BDMX=$PIECE(BDMX,";;",2)
WRITE !?80-$LENGTH(BDMX)\2,BDMX
KILL BDMX
+2 WRITE !?80-(8+$LENGTH(BDM("VERSION")))/2,"Version ",BDM("VERSION")
+3 IF '$DATA(DUZ(2))
GOTO XIT
IF 'DUZ(2)
GOTO XIT
SET BDM("SITE")=$PIECE(^DIC(4,DUZ(2),0),"^")
WRITE !!?80-$LENGTH(BDM("SITE"))\2,BDM("SITE")
+4 DO XIT
+5 QUIT
TEXTD ;EP
+1 ;;****************************************
+2 ;;** Diabetes Management System **
+3 ;;** 2000 Diabetes Audit Report Menu **
+4 ;;****************************************
+5 ;;QUIT
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=""
QUIT
+2 QUIT
TAXS ;
+1 ;;SURVEILLANCE DIABETES;;Diabetes Diagnoses Codes
+2 ;;SURVEILLANCE HYPERTENSION;;Hypertension Diagnoses Codes
+3 ;;SURVEILLANCE TUBERCULOSIS;;Tuberculosis Diagnoses Codes
+4 ;;DM AUDIT DIABETES EDUC TOPICS;;Diabetes Education Topics
+5 ;;DM AUDIT DIET EDUC TOPICS;;Diabetes Diet Education Topics
+6 ;;DM AUDIT EXERCISE EDUC TOPICS;;Diabetes Excercise Education Topics
+7 ;;DM AUDIT OTHER EDUC TOPICS;;Other Diabetes Education Topics
+8 ;;DM AUDIT SMOKING CESS EDUC;;Smoking Cess Education Topics
+9 ;;DM AUDIT TOBACCO HLTH FACTORS;;Tobacco Health Factors
+10 ;;DM AUDIT PROBLEM SMOKING DXS;;Smoking related diagnoses for Problem List
+11 ;;DM AUDIT PROBLEM HTN DIAGNOSES;;Hypertension Diagnoses
+12 ;;DM AUDIT PROBLEM DIABETES DX;;Diabetes Diagnoses
+13 ;;DM AUDIT SMOKING RELATED DXS;;Smoking related diagnoses for POVs
+14 ;;DM AUDIT CESSATION HLTH FACTOR;;Smoking Cessation Health Factors
+15 ;;DM AUDIT SELF MONITOR DRUGS;;Self Monitoring Drugs Taxonomy
+16 ;;DM AUDIT TB HEALTH FACTORS;;TB Status Health Factors
+17 ;;DM AUDIT INSULIN DRUGS;;Insulin Drug Taxonomy
+18 ;;DM AUDIT SULFONYLUREA DRUGS;;Sulfonylurea Drug Taxonomy
+19 ;;DM AUDIT METFORMIN DRUGS;;Metformin Drug Taxonomy
+20 ;;DM AUDIT ACARBOSE DRUGS;;Acarbose Drug Taxonomy
+21 ;;DM AUDIT LIPID LOWERING DRUGS;;Lipid Lowering Drug Taxonomy
+22 ;;DM AUDIT GLITAZONE DRUGS;;Glitzaone Drug Taxonomy
+23 ;;DM AUDIT ACE INHIBITORS;;ACE Inhibitor Drug Taxonomy
+24 ;;DM AUDIT ASPIRIN DRUGS;;Aspirin Drug Taxonomy
+25 ;;DM AUDIT SDM PROVIDERS;;SDM providers Taxonomy
+26 ;;DM AUDIT TYPE II DXS;;Type II Diagnoses
+27 ;;DM AUDIT TYPE I DXS;;Type I Diagnoses
+28 ;;
LAB ;
+1 ;;DM AUDIT URINE PROTEIN TAX;;Urine Protein Lab Taxonomy
+2 ;;DM AUDIT MICROALBUMINURIA TAX;;Microalbuminuia Lab Taxonomy
+3 ;;DM AUDIT HGB A1C TAX;;HGB A1C Lab Taxonomy
+4 ;;DM AUDIT GLUCOSE TESTS TAX;;Glucose Tests Taxonomy
+5 ;;DM AUDIT AST TAX;;AST Lab Taxonomy
+6 ;;DM AUDIT ALT TAX;;ALT Lab Taxonomy
+7 ;;DM AUDIT CREATININE TAX;;Creatinine Lab Taxonomy
+8 ;;DM AUDIT CHOLESTEROL TAX;;Cholesterol Lab Taxonomy
+9 ;;DM AUDIT LDL CHOLESTEROL TAX;;LDL Cholesterol Lab Taxonomy
+10 ;;DM AUDIT HDL TAX;;HDL Lab Taxonomy
+11 ;;DM AUDIT TRIGLYCERIDE TAX;;Triglyceride Lab Taxonomy
+12 ;;DM AUDIT URINALYSIS TAX;;Urinalysis Lab Taxonomy
+13 ;;