Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: BDMDG2

BDMDG2.m

Go to the documentation of this file.
  1. BDMDG2 ; IHS/CMI/LAB - IHS Diabetes Audit 2019 ;
  1. ;;2.0;DIABETES MANAGEMENT SYSTEM;**12**;JUN 14, 2007;Build 51
  1. ;
  1. ;W:$D(IOF) @IOF
  1. REGASK ;
  1. W !,$$CTR("ASSESSMENT OF DIABETES CARE, 2019")
  1. W !,$$CTR("DIABETES E-AUDIT")
  1. W !!,"This option is used to run the 2019 Electronic Diabetes Audit for a"
  1. W !,"predefined set of patients. The patients selected are 'Active Diabetic"
  1. W !,"Patients' as defined by the Clinical Reporting system (GPRA). In "
  1. W !,"addition you can optionally only include the patient if they are an"
  1. W !,"active member of the Diabetes register."
  1. W !,"The definition used to select patients is the following:"
  1. W !?3,"1. Must reside in a community specified in the official GPRA "
  1. W !?6,"community taxonomy."
  1. W !?3,"2. Must be alive on the audit date."
  1. W !?3,"3. Indian/Alaska Natives Only - based on Classification of 01."
  1. W !?3,"4. Must have 2 visits to medical clinics in the 3 years prior to the"
  1. W !?6,"audit date. At least one visit must include: 01 General,"
  1. W !?6,"06 Diabetic, 10 GYN, 12 Immunization, 13 Internal Med,"
  1. W !?6,"20 Pediatrics, 24 Well Child, 28 Family Practice, 57 EPSDT,"
  1. W !?6,"70 Women's Health, 80 Urgent, 89 Evening."
  1. W !?3,"5. The patient must have been diagnosed with diabetes at"
  1. W !?6,"least 1 year prior to the audit date."
  1. W !?3,"6. The patient must have had at least 2 visits during the"
  1. W !?6,"year prior to the Audit date, AND 2 DM-related visits ever."
  1. W !
  1. K DIR S DIR(0)="E",DIR("A")="Please press enter to continue" D ^DIR K DIR
  1. W !!
  1. COMM ;get gpra community taxonomy
  1. W !!,"Specify the community taxonomy to determine which patients will be",!,"included in the report. You should have created this taxonomy using QMAN.",!
  1. K BDMTAX
  1. S BDMTAXI=""
  1. D ^XBFMK
  1. S DIC("S")="I $P(^(0),U,15)=9999999.05",DIC="^ATXAX(",DIC(0)="AEMQ",DIC("A")="Enter the Name of the Community Taxonomy: "
  1. S B=$P($G(^BGPSITE(DUZ(2),0)),U,5) I B S DIC("B")=$P(^ATXAX(B,0),U)
  1. D ^DIC K DIC
  1. I Y=-1 Q
  1. S BDMTAXI=+Y
  1. COM1 S X=0
  1. F S X=$O(^ATXAX(BDMTAXI,21,X)) Q:'X D
  1. .S BDMTAX($P(^ATXAX(BDMTAXI,21,X,0),U))=""
  1. .Q
  1. I '$D(BDMTAX) W !!,"There are no communities in that taxonomy." G COMM
  1. BEN ;
  1. S BDMBEN=1
  1. ACT ;
  1. S BDMACTI=0 I BDMDMRG="" Q
  1. S DIR(0)="Y",DIR("A")="Include only ACTIVE members of the "_$P(^ACM(41.1,BDMDMRG,0),U)_" register",DIR("B")="N" KILL DA
  1. D ^DIR KILL DIR
  1. I $D(DIRUT) G COMM
  1. S BDMACTI=Y
  1. PREG ;
  1. S BDMPREG="",BDMSTP=0
  1. S DIR(0)="S^I:Include Pregnant Patients;E:Exclude Pregnant Patients",DIR("A")="Select whether to include or exclude pregnant patients in the audit"
  1. S DIR("B")="E" KILL DA D ^DIR KILL DIR
  1. I $D(DIRUT) G ACT
  1. S BDMPREG=Y
  1. Q
  1. CTR(X,Y) ;EP - Center X in a field Y wide.
  1. Q $J("",$S($D(Y):Y,1:IOM)-$L(X)\2)_X
  1. ;----------