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

BDMP7.m

Go to the documentation of this file.
BDMP7 ; IHS/CMI/LAB - BDM patch 7 ;
 ;;2.0;DIABETES MANAGEMENT SYSTEM;**2**;JUN 14, 2007
 ;
PRE ;EP - pre init
 D RENAME^XPDMENU("BDM M DM AUDIT","BDM M MAIN DM MENU")
 Q
EN ;
 S ATXFLG=1
 D ^BDMP71X
 D ^BDMP72
 D ^BDMP73
 D ^BDMP74
 D ^BDMP75
 D ^BDMP76
 S ATXFLG=1
 D CESS
 D DRUGS
 D SDM
 D DMEDUC
 D LAB
XIT ;
 I '$D(BDMGUI) D EN^XBVK("BDM"),EN^XBVK("ATX")
 Q
 ;
LAB ;
 S BDMX="DM AUDIT CREATININE TAX" D LAB1
 S BDMX="DM AUDIT CHOLESTEROL TAX" D LAB1
 S BDMX="DM AUDIT GLUCOSE TESTS TAX" D LAB1
 S BDMX="DM AUDIT URINE PROTEIN TAX" D LAB1
 S BDMX="DM AUDIT HGB A1C TAX" D LAB1
 S BDMX="DM AUDIT TRIGLYCERIDE TAX" D LAB1
 S BDMX="DM AUDIT URINALYSIS TAX" D LAB1
 S BDMX="DM AUDIT MICROALBUMINURIA TAX" D LAB1
 S BDMX="DM AUDIT AST TAX" D LAB1
 S BDMX="DM AUDIT ALT TAX" D LAB1
 S BDMX="DM AUDIT LDL CHOLESTEROL TAX" D LAB1
 Q
LAB1 ;
 W !,"Creating ",BDMX," Taxonomy..."
 S BDMDA=$O(^ATXLAB("B",BDMX,0))
 Q:BDMDA  ;taxonomy already exisits
 S X=BDMX,DIC="^ATXLAB(",DIC(0)="L",DIADD=1,DLAYGO=9002228 D ^DIC K DIC,DA,DIADD,DLAYGO,I
 I Y=-1 W !!,"ERROR IN CREATING ",BDMX," TAX" Q
 S BDMTX=+Y,$P(^ATXLAB(BDMTX,0),U,2)=BDMX,$P(^(0),U,5)=DUZ,$P(^(0),U,6)=DT,$P(^(0),U,8)="B",$P(^(0),U,9)=60,^ATXLAB(BDMTX,21,0)="^9002228.02101PA^0^0"
 S DA=BDMTX,DIK="^ATXAX(" D IX1^DIK
 Q
DRUGS ;set up drug taxonomies
 S BDMX="DM AUDIT ACE INHIBITORS" D DRUG1
 S BDMX="DM AUDIT INSULIN DRUGS" D DRUG1
 S BDMX="DM AUDIT SELF MONITOR DRUGS" D DRUG1
 S BDMX="DM AUDIT SULFONYLUREA DRUGS" D DRUG1
 S BDMX="DM AUDIT METFORMIN DRUGS" D DRUG1
 S BDMX="DM AUDIT ACARBOSE DRUGS" D DRUG1
 S BDMX="DM AUDIT TROGLITAZONE DRUGS" D DRUG1
 S BDMX="DM AUDIT ASPIRIN DRUGS" D DRUG1
 Q
DRUG1 ;
 W !,"Creating ",BDMX," Taxonomy..."
 S BDMDA=$O(^ATXAX("B",BDMX,0))
 Q:BDMDA  ;taxonomy already exisits
 S X=BDMX,DIC="^ATXAX(",DIC(0)="L",DIADD=1,DLAYGO=9002226 D ^DIC K DIC,DA,DIADD,DLAYGO,I
 I Y=-1 W !!,"ERROR IN CREATING ",BDMX," TAX" Q
 S BDMTX=+Y,$P(^ATXAX(BDMTX,0),U,2)=BDMX,$P(^(0),U,5)=DUZ,$P(^(0),U,8)=0,$P(^(0),U,9)=DT,$P(^(0),U,12)=173,$P(^(0),U,13)=0,$P(^(0),U,15)=50,^ATXAX(BDMTX,21,0)="^9002226.02101A^0^0"
 S DA=BDMTX,DIK="^ATXAX(" D IX1^DIK
 Q
SDM ;
 W !,"Creating DM SDM Provider Taxonomy..."
 S BDMDA=$O(^ATXAX("B","DM AUDIT SDM PROVIDERS",0))
 Q:BDMDA  ;taxonomy already exisits
 S X="DM AUDIT SDM PROVIDERS",DIC="^ATXAX(",DIC(0)="L",DIADD=1,DLAYGO=9002226 D ^DIC K DIC,DA,DIADD,DLAYGO,I
 I Y=-1 W !!,"ERROR IN CREATING DM AUDIT SDM PROVIDERS TAX" Q
 S BDMTX=+Y,$P(^ATXAX(BDMTX,0),U,2)="DM AUDIT SDM PROVIDERS",$P(^(0),U,5)=DUZ,$P(^(0),U,8)=0,$P(^(0),U,9)=DT,$P(^(0),U,12)=209,$P(^(0),U,13)=0,$P(^(0),U,15)=16,^ATXAX(BDMTX,21,0)="^9002226.02101A^0^0"
 S DA=BDMTX,DIK="^ATXAX(" D IX1^DIK
 Q
CESS ;
 W !,"Creating Tobacco Cessation Health factors taxonomy... "
 S BDMDA=$O(^ATXAX("B","DM AUDIT CESSATION HLTH FACTOR",0))
 Q:BDMDA  ;taxonomy already exists
 S X="DM AUDIT CESSATION HLTH FACTOR",DIC="^ATXAX(",DIC(0)="L",DIADD=1,DLAYGO=9002226 D ^DIC K DIC,DA,DIADD,DLAYGO,I
 I Y=-1 W !!,"ERROR IN CREATING DM AUDIT CESSATION HLTH FACTORS TAX" Q
 S BDMTX=+Y,$P(^ATXAX(BDMTX,0),U,2)="DM AUDIT CESSATION HLTH FACTOR",$P(^(0),U,5)=DUZ,$P(^(0),U,8)=0,$P(^(0),U,9)=DT,$P(^(0),U,12)=78,$P(^(0),U,13)=0,$P(^(0),U,15)=9999999.64,^ATXAX(BDMTX,21,0)="^9002226.02101A^0^0"
 S BDMTEXT="CESSHF" F BDMX=1:1:2 S X=$P($T(@BDMTEXT+BDMX),";;",2),DIC="^AUTTHF(",DIC(0)="M" D ^DIC K DIC,DA,DR,DIADD,DLAYGO,DQ,DI,D1,D0 I $P(Y,U)>0 D
 .S ^ATXAX(BDMTX,21,BDMX,0)=+Y,$P(^ATXAX(BDMTX,21,0),U,3)=BDMX,$P(^(0),U,4)=BDMX,^ATXAX(BDMTX,21,"AA",+Y,+Y)=""
 .Q
 S DA=BDMTX,DIK="^ATXAX(" D IX1^DIK
 Q
 ;
DMEDUC ;
 W !,"Creating Education topics taxonomy..."
 S BDMDA=0 S BDMDA=$O(^ATXAX("B","DM AUDIT DIET EDUC TOPICS",BDMDA)) I 'BDMDA D
 .S X="DM AUDIT DIET EDUC TOPICS",DIC="^ATXAX(",DIC(0)="L",DIADD=1,DLAYGO=9002226 D ^DIC K DIC,DA,DIADD,DLAYGO,I
 .I Y=-1 W !!,"ERROR IN CREATING DM AUDIT DIET EDUC TOPICS TAX" Q
 .S BDMTX=+Y,$P(^ATXAX(BDMTX,0),U,2)="DM AUDIT DIET EDUC TOPICS",$P(^(0),U,5)=DUZ,$P(^(0),U,8)=0,$P(^(0),U,9)=DT,$P(^(0),U,12)=280,$P(^(0),U,13)=0,$P(^(0),U,15)=9999999.09,^ATXAX(BDMTX,21,0)="^9002226.02101A^0^0"
 .S BDMTEXT="DIET" F BDMX=1:1:6 S X=$P($T(@BDMTEXT+BDMX),";;",2),DIC="^AUTTEDT(",DIC(0)="M" D ^DIC K DIC,DA,DR,DIADD,DLAYGO,DQ,DI,D1,D0 I $P(Y,U)>0 D
 ..S ^ATXAX(BDMTX,21,BDMX,0)=+Y,$P(^ATXAX(BDMTX,21,0),U,3)=BDMX,$P(^(0),U,4)=BDMX,^ATXAX(BDMTX,21,"AA",+Y,+Y)=""
 ..Q
 .S DA=BDMTX,DIK="^ATXAX(" D IX1^DIK
 S BDMDA=0 S BDMDA=$O(^ATXAX("B","DM AUDIT EXERCISE EDUC TOPICS",BDMDA)) I 'BDMDA D
 .S X="DM AUDIT EXERCISE EDUC TOPICS",DIC="^ATXAX(",DIC(0)="L",DIADD=1,DLAYGO=9002226 D ^DIC K DIC,DA,DIADD,DLAYGO,I
 .I Y=-1 W !!,"ERROR IN CREATING DM AUDIT EXERCISE EDUC TOPICS TAX" Q
 .S BDMTX=+Y,$P(^ATXAX(BDMTX,0),U,2)="DM AUDIT EXERCISE EDUC TOPICS",$P(^(0),U,5)=DUZ,$P(^(0),U,8)=0,$P(^(0),U,9)=DT,$P(^(0),U,12)=280,$P(^(0),U,13)=0,$P(^(0),U,15)=9999999.09,^ATXAX(BDMTX,21,0)="^9002226.02101A^0^0"
 .S BDMTEXT="EXC" F BDMX=1:1:3 S X=$P($T(@BDMTEXT+BDMX),";;",2),DIC="^AUTTEDT(",DIC(0)="M" D ^DIC K DIC,DA,DR,DIADD,DLAYGO,DQ,DI,D1,D0 I $P(Y,U)>0 D
 ..S ^ATXAX(BDMTX,21,BDMX,0)=+Y,$P(^ATXAX(BDMTX,21,0),U,3)=BDMX,$P(^(0),U,4)=BDMX,^ATXAX(BDMTX,21,"AA",+Y,+Y)=""
 ..Q
 .S DA=BDMTX,DIK="^ATXAX(" D IX1^DIK
 S BDMDA=0 S BDMDA=$O(^ATXAX("B","DM AUDIT OTHER EDUC TOPICS",BDMDA)) I 'BDMDA D
 .S X="DM AUDIT OTHER EDUC TOPICS",DIC="^ATXAX(",DIC(0)="L",DIADD=1,DLAYGO=9002226 D ^DIC K DIC,DA,DIADD,DLAYGO,I
 .I Y=-1 W !!,"ERROR IN CREATING DM AUDIT OTHER EDUC TOPICS TAX" Q
 .S BDMTX=+Y,$P(^ATXAX(BDMTX,0),U,2)="DM AUDIT OTHER EDUC TOPICS",$P(^(0),U,5)=DUZ,$P(^(0),U,8)=0,$P(^(0),U,9)=DT,$P(^(0),U,12)=280,$P(^(0),U,13)=0,$P(^(0),U,15)=9999999.09,^ATXAX(BDMTX,21,0)="^9002226.02101A^0^0"
 .S BDMTEXT="OTHER" F BDMX=1:1:79 S X=$P($T(@BDMTEXT+BDMX),";;",2),DIC="^AUTTEDT(",DIC(0)="M" D ^DIC K DIC,DA,DR,DIADD,DLAYGO,DQ,DI,D1,D0 I $P(Y,U)>0 D
 ..S ^ATXAX(BDMTX,21,BDMX,0)=+Y,$P(^ATXAX(BDMTX,21,0),U,3)=BDMX,$P(^(0),U,4)=BDMX,^ATXAX(BDMTX,21,"AA",+Y,+Y)=""
 ..Q
 .S DA=BDMTX,DIK="^ATXAX(" D IX1^DIK
 Q
CESSHF ;;
 ;;CESSATION-SMOKELESS
 ;;CESSATION-SMOKER
 ;;
DIET ;
 ;;DIABETES NUTRITION
 ;;DM-DIET
 ;;DM-NUTRITION
 ;;DM DIET
 ;;DM-CHOLESTEROL NU EDUCATION
 ;;DM NUTRITION PROTEIN
 ;;
EXC ;;
 ;;DM-EXERCISE
 ;;DM EXERCISE
 ;;DIABETES EXERCISE
 ;;
OTHER ;
 ;;DM-DISEASE PROCESS
 ;;DM DISEASE PROCESS
 ;;DM-FOLLOW UP
 ;;DM FOLLOWUP
 ;;DM-FOOT CARE
 ;;DM FOOT CARE
 ;;DIABETES FOOT CARE
 ;;DM-GENERAL INFORMATION
 ;;DM-INFORMATION
 ;;DIABETES GENERAL INFORMATION
 ;;DM-LIFESTYLE ADAPTATIONS
 ;;DM LIFESTYLE ADAPTATIONS
 ;;DM-MEDICATIONS
 ;;DM MEDICATIONS
 ;;DIABETES MEDICATIONS
 ;;DM-KNOW YOUR NUMBER
 ;;DM-PSYCH ED
 ;;DM-COMPLICATIONS
 ;;DM UTI
 ;;DM SMOKING CESSATION
 ;;DM SELF MONITORING TEST TAPES
 ;;DM SELF MONITORING CHEM STRIPS
 ;;DM PREGNANCY COUNSELING
 ;;DM NEUROPATHY
 ;;DM NEPHROPATHY
 ;;DM-NEPHROPATHY
 ;;DM-NEUROPATHY
 ;;DM-ORAL AGENTS
 ;;DM-RETINOPATHY/EYE
 ;;DM-SELF-GLUCOSE
 ;;DM-SEXUAL/REPRODUCTIVE
 ;;DM-SICK DAY MANAGEMENT
 ;;DM-WEIGHT CONTROL
 ;;DM HYPERTENSION
 ;;DM GESTATIONAL
 ;;DM EMOTIONAL ASPECTS
 ;;DM COMPLICATIONS
 ;;DIABETIC RETINOPATHY TEACHING
 ;;DIABETES-SICK DAYS
 ;;DIABETES DENTAL HYGIENE
 ;;DM - GLUCOMETER USE
 ;;DM MODULE 1
 ;;DM MODULE 10
 ;;DM MODULE 11
 ;;DM MODULE 12
 ;;DM MODULE 13
 ;;DM MODULE 14
 ;;DM MODULE 15
 ;;DM MODULE 16
 ;;DM MODULE 17
 ;;DM MODULE 18
 ;;DM MODULE 2
 ;;DM MODULE 3
 ;;DM MODULE 4
 ;;DM MODULE 5
 ;;DM MODULE 6
 ;;DM MODULE 7
 ;;DM MODULE 8
 ;;DM MODULE 9
 ;;DM WELLNESS 1
 ;;DM WELLNESS 2
 ;;DM WELLNESS 3
 ;;DM WELLNESS 4
 ;;DM WELLNESS 5
 ;;DM WELLNESS 6
 ;;DM WELLNESS 7
 ;;DM WELLNESS 8
 ;;DM-HOME MANAGEMENT
 ;;DM-KIDNEY DISEASE
 ;;DM-PATIENT LITERATURE
 ;;DM-PREVENTION
 ;;DM-CARDIOVASCULAR PROBLEMS
 ;;DM-TREATMENT
 ;;DM-DENTAL
 ;;DM-HYPERGLYCEMIA
 ;;DM-HYPOGLYCEMIA
 ;;DM-INFECTION
 ;;DM-INFORMATIN
 ;;DM-INSULIN ADMINISTRATION
 ;;