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

BQI23PU.m

Go to the documentation of this file.
BQI23PU ;VNGT/HS/ALA-2.3 Install Utility Program ; 14 Sep 2011  11:58 AM
 ;;2.3;ICARE MANAGEMENT SYSTEM;;Apr 18, 2012;Build 59
 ;
 ;
IPC ; Set IPC
 NEW TEXT,BQIUPD,ERROR,BI,BJ,HELP,IEN
 NEW BI,BJ,BK,BN,BQIUPD,ERROR,IEN,ND,NDATA,TEXT,VAL
 S ^BQI(90508,1,22,0)="^90508.022^1^1"
 S ^BQI(90508,1,22,1,0)="IPC3",^BQI(90508,1,22,1,"B","IPC3",1)=""
 S $P(^BQI(90508,1,22,1,5),U,1)="http://ipcreporting.improvingindianhealth.org/FilesDownload.aspx"
 S $P(^BQI(90508,1,22,1,5),U,2)="http://ipcreporting.improvingindianhealth.org/FilesUpload.aspx"
 S $P(^BQI(90508,1,22,1,4),U,1)="http://icare.spreadinnovation.com/FilesDownload.aspx"
 S $P(^BQI(90508,1,22,1,4),U,2)="http://icare.spreadinnovation.com/FilesUpload.aspx"
 S ^BQI(90508,1,22,1,1,0)="^90508.221I^67^67"
 ;
 NEW DA,DIC,CLN,X
 S DA(1)=1,DIC(0)="LNZ",DIC="^BQI(90508,"_DA(1)_",23,",DLAYGO=90508.023,DIC("P")=DLAYGO
 I $G(^BQI(90508,1,23,0))="" S ^BQI(90508,1,23,0)="^90508.023P^^"
 F CLN="01",13,20,28 D
 . S X=$O(^DIC(40.7,"C",CLN,"")) I X="" Q
 . S X=$P(^DIC(40.7,X,0),U,1)
 . D ^DIC I Y=-1 K DO,DD D FILE^DICN
 ;
 F BI=1:1 S TEXT=$T(ARR+BI) Q:TEXT=" Q"  D
 . S TEXT=$P(TEXT,";;",2) I TEXT="" Q
 . F BJ=1:1:$L(TEXT,"~") D
 .. S NDATA=$P(TEXT,"~",BJ)
 .. S ND=$P(NDATA,"|",1),VAL=$P(NDATA,"|",2)
 .. I VAL="" Q
 .. S ^BQI(90508,1,22,1,1,BI,ND)=VAL
 ;
 F BI=1:1 S TEXT=$T(TIP+BI) Q:TEXT=" Q"  D
 . S TEXT=$P(TEXT,";;",2) I TEXT="" Q
 . F BJ=1:1:$L(TEXT,"~") D
 .. S NDATA=$P(TEXT,"~",BJ) I NDATA="" Q
 .. S ^BQI(90508,1,22,1,1,BI,3,BJ,0)=NDATA
 . S ^BQI(90508,1,22,1,1,BI,3,0)="^90508.2213^"_BJ_"^"_BJ
 ;
 F BI=1:1 S TEXT=$T(BUN+BI) Q:TEXT=" Q"  D
 . S TEXT=$P(TEXT,";;",2) I TEXT="" Q
 . F BJ=1:1:$L(TEXT,"~") D
 .. S NDATA=$P(TEXT,"~",BJ) I NDATA="" Q
 .. S ^BQI(90508,1,22,1,1,BI,2,BJ,0)=NDATA
 . S ^BQI(90508,1,22,1,1,BI,2,0)="^90508.2212^"_BJ_"^"_BJ
 ;
 NEW DIK
 S DIK="^BQI(90508,",DA=1
 ;D ENALL^DIK
 D IXALL^DIK
 ;
TAX ; Update taxonomies
 ; Add new taxonomies OR update existing ones
 D ^BQIHTX
 ;
 I $$VERSION^XPDUTL("BGP")="12.0" D CRS
 Q
 ;
CRS ; Update IPC if CRS v 12.0 has been installed
 NEW BQIYR,BGPYR
 S BQIYR=2011,BGPYR=2012
 ;  Update IPC
 NEW CRIPC,CRN,IDN,MEAS,NMEAS,BDN,PRV,PRN,FAC,FCN
 ; Get current IPC
 S CRIPC=$P($G(^BQI(90508,1,11)),U,1)
 S CRN=$O(^BQI(90508,1,22,"B",CRIPC,"")) I CRN="" Q
 S IDN=0
 F  S IDN=$O(^BQI(90508,1,22,CRN,1,IDN)) Q:'IDN  D
 . S MEAS=$P(^BQI(90508,1,22,CRN,1,IDN,0),U,1)
 . I $P(MEAS,"_",1)'=BQIYR D BDN Q
 . S NMEAS=$$CONV(MEAS)
 . NEW DA,IENS
 . S DA(2)=1,DA(1)=CRN,DA=IDN,IENS=$$IENS^DILF(.DA)
 . S BQIUPD(90508.221,IENS,.01)=NMEAS
 . S PRV=0
 . F  S PRV=$O(^BQIPROV(PRV)) Q:'PRV  D
 .. S PRN=$O(^BQIPROV(PRV,30,"B",MEAS,"")) Q:PRN=""  D
 ... NEW DA,IENS
 ... S DA(1)=PRV,DA=PRN,IENS=$$IENS^DILF(.DA)
 ... S BQIUPD(90505.43,IENS,.01)=NMEAS
 . S FAC=0
 . F  S FAC=$O(^BQIFAC(FAC)) Q:'FAC  D
 .. S FCN=$O(^BQIFAC(FAC,30,"B",MEAS,"")) Q:FCN=""  D
 ... NEW DA,IENS
 ... S DA(1)=FAC,DA=FCN,IENS=$$IENS^DILF(.DA)
 ... S BQIUPD(90505.43,IENS,.01)=NMEAS
 . D BDN
 D FILE^DIE("","BQIUPD","ERROR")
 Q
 ;
CONV(MSR) ;EP - Convert the Measure
 NEW NM
 S NM=BGPYR_"_"_$P(MSR,"_",2)
 Q NM
 ;
BDN ; Bundles
 S BDN=0
 F  S BDN=$O(^BQI(90508,1,22,CRN,1,IDN,2,BDN)) Q:'BDN  D
 . S MEAS=$P(^BQI(90508,1,22,CRN,1,IDN,2,BDN,0),U,1)
 . I $P(MEAS,"_",1)'=BQIYR Q
 . S NMEAS=$$CONV(MEAS)
 . NEW DA,IENS
 . S DA(3)=1,DA(2)=CRN,DA(1)=IDN,DA=BDN,IENS=$$IENS^DILF(.DA)
 . S BQIUPD(90508.2212,IENS,.01)=NMEAS
 Q
 ;
TIP ;  Tooltips
 ;;Numerator: Total revenue generated by the microsystem provider during the ~specified month.~ ~Denominator: Number of visits to the microsystem provider during the ~specified month.~
 ;;% of patients with a primary care visit in the last month who saw THEIR ~OWN DPCP.~
 ;;% of patients with a visit to any clinic in the last 3 years that have a ~DPCP listed in RPMS. ~ ~See glossary for details.~
 ;;% of patients in the microsystem who are up to date on their age- and ~gender-appropriate breast, cervical, and colorectal cancer screenings.~ ~See glossary for specific definitions.~
 ;;% of patients in the microsystem that have had age- and ~gender-appropriate screening  in the last year for alcohol use, ~depression, domestic violence/IPV, tobacco use, and BMI.~ ~See glossary for specific definitions.~
 ;;% of patients in the microsystem diagnosed with diabetes, and/or IHD, ~and/or hypertension that have had their blood pressure, and/or LDL, ~and/or HbA1c in control within the last year.~ ~See glossary for specific definitions.~
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;Patients who have documentation that they have set a goal during the last ~year.~
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;Number of ER/Urgent Care visits during the past month.~
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;Represents total patients assigned to the provider as a DPCP.~
 Q
 ;
BUN ;  Bundles
 ;;
 ;;
 ;;
 ;;2011_219~2011_1970~2011_1969~
 ;;2011_2045~2011_1965~2011_1964~2011_269~2011_530~2011_871~
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;2011_83~
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;2011_1002~2011_810^1~2011_811^2~2011_812^3~2011_99^1~2011_95^2~2011_106^3~
 ;;2011_907^1~2011_871^1~
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 ;;
 Q
 ;
ARR ; Array
 ;;0|IPC_REVG^R^5^Revenue Generated Per Visit^^31^^Monthly_Data_Supplemental^L^K^^^A~1|D EN^BQIIPRVG(BQDATE)
 ;;0|IPC_CCPR^R^2^Continuity of Care Primary Provider^^29^^Monthly_Data_Core^CU^CT^9^80%^A~1|D EN^BQIIPCCP(BQDATE)
 ;;0|IPC_PEMP^R^2^% of Pts Empanelled to a Primary Care Provider^^2^^Monthly_Data_Core^H^G^9^90%^A^F~1|D EN^BQIIPEMP(BQDATE)
 ;;0|IPC_CANC^R^2^Cancer Screening Bundle^B^18^^Monthly_Data_Core^AU^AT^1^70%~1|D EN^BQIIPBNL(CRN,MSN,BQDATE,CODE)
 ;;0|IPC_HRISK^R^2^Health Risk Screening Bundle^B^4^^Monthly_Data_Core^R^Q^3^80%~1|D EN^BQIIPBNL(CRN,MSN,BQDATE,CODE)
 ;;0|IPC_OUTC^R^2^Outcome Measures Bundle^B^22^^Monthly_Data_Core^BL^BK^4^70%~1|D EN^BQIIPOTC(BQDATE)
 ;;0|2011_1970^G^2^Pap Smear Rates 21-64^^20^^Monthly_Data_Core^BC^BB^1~1|
 ;;0|2011_1969^G^2^Mammogram Rates 52-64^^19^^Monthly_Data_Core^AY^AX^1~1|
 ;;0|2011_219^G^2^Colorectal Cancer Screen 51-80 ^^21^^Monthly_Data_Core^BG^BF^1~1|
 ;;0|2011_55^G^5^DM: Comprehensive Care: A1C^^~1|
 ;;0|2011_59^G^5^DM: Comprehensive Care: Retinal Evaluation^^~1|
 ;;0|2011_60^G^2^DM: Comprehensive Care^^3^^Monthly_Data_Core^M^L^9^70%~1|
 ;;0|2011_83^G^2^DM: A1c Glycemic Control Ideal <7^^~1|
 ;;0|2011_87^G^2^DM: BP Controlled <130/80^^~1|
 ;;0|2011_95^G^2^DM: LDL Low <=100^^~1|
 ;;0|2011_127^G^5^DM: Dental Access^^34^^Monthly_Data_Supplemental^AF^AE^^70%~1|
 ;;0|2011_1981^G^5^Topical Fluoride: 2-15 (Dev)^^35^^Monthly_Data_Supplemental^AJ^AI~1|
 ;;0|2011_1275^G^5^DM: Foot Exam^^~1|
 ;;0|2011_2033^G^2^Comprehensive Cancer Screening (Dev)^^~1|
 ;;0|2011_2092^G^5^Pts 5+ Physical Activity Assessment^^~1|
 ;;0|2011_2153^G^5^Patients 2+:  Comprehensive Health Screening^^~1|
 ;;0|2011_2154^G^5^Patients 2+:  Comprehensive Health Screening excluding Physical Activity^^~1|
 ;;0|2011_2155^G^2^Patients 12-75: Comprehensive Health Screening:  Alcohol Screen^^6^1~1|
 ;;0|2011_2156^G^2^Patients 18+: Comprehensive Health Screening:  Depression Screen^^12^1~1|
 ;;0|2011_2157^G^2^Female Patients15-40: Comprehensive Health Screening:  IPV/DV Screening^^14^1~1|
 ;;0|2011_2158^G^2^Patients 5+: Comprehensive Health Screening: Tobacco Use Assessed^^16^1~1|
 ;;0|2011_2159^G^2^Patients 2-74: Comprehensive Health Screening:  BMI Calculated^^8^1~1|
 ;;0|2011_2160^G^2^Patients 20+:  Comprehensive Health Screening:  BP Assessed^^10^1~1|
 ;;0|2011_2161^G^5^Patients 5+:  Comprehensive Health Screening:  Physical Activity ^^33^^Monthly_Data_Supplemental^AA^Z^^70%~1|
 ;;0|2011_2452^G^2^Self Mgmt Goal Set^^28^^Monthly_Data_Core^^CJ^9^70%~1|
 ;;0|2011_2453^G^2^Goal Setting:  Goal Met^^~1|
 ;;0|IPC_DMCTRL^R^2^A1C in Control^B^23^^Monthly_Data_Core^BP^BO^4~1|D DM^BQIIPOTC(CRN,MSN,BQDATE,CODE,$G(DFN))
 ;;0|2011_2045^G^2^Alcohol Screen: 12-75 (Dev)^^5^^Monthly_Data_Core^V^U^3~1|
 ;;0|2011_1965^G^2^IPV/DV Screen Females 15-40^^13^^Monthly_Data_Core^AL^AK^3~1|
 ;;0|2011_1964^G^2^Depression: Screening or Diagnosis 18+^^11^^Monthly_Data_Core^AH^AG^3~1|
 ;;0|2011_269^G^2^Tobacco Use/Exposure Assessment 5+^^15^^Monthly_Data_Core^AP^AO^3~1|
 ;;0|2011_530^G^2^BMI Measured 2-74^^7^^Monthly_Data_Core^Z^Y^3~1|
 ;;0|2011_871^G^2^20+: BP Assessed^^9^^Monthly_Data_Core^AD^AC^3~1|
 ;;0|2011_1^G^2^DM Prevalence (DX Ever)^^~1|
 ;;0|2011_92^G^2^DM BP Assessed^^~1|
 ;;0|2011_99^G^2^DM LDL Assessed^^~1|
 ;;0|2011_106^G^2^DM: LDL 101-129^^~1|
 ;;0|2011_810^G^2^23+: LDL Assessed^^~1|
 ;;0|2011_811^G^2^23+: LDL <=100^^~1|
 ;;0|2011_812^G^2^23+: LDL 101-130^^~1|
 ;;0|2011_872^G^2^20+: Normal BP^^~1|
 ;;0|2011_873^G^2^20+: Pre-HTN I BP^^~1|
 ;;0|2011_874^G^2^20+: Pre-HTN II BP^^~1|
 ;;0|2011_875^G^2^20+: Stage 1 HTN BP^^~1|
 ;;0|2011_876^G^2^20+: Stage 2 HTN BP^^~1|
 ;;0|2011_907^G^2^IHD: BP Assessed^^~1|
 ;;0|2011_908^G^2^IHD: Normal BP^^~1|
 ;;0|2011_909^G^2^IHD: Pre-HTN I BP^^~1|
 ;;0|2011_910^G^2^IHD: Pre-HTN II BP^^~1|
 ;;0|2011_911^G^2^IHD: Stage 1 HTN BP^^~1|
 ;;0|2011_912^G^2^IHD: Stage 2 HTN BP^^~1|
 ;;0|IPC_LDCTRL^R^2^LDL in Control^B^25^^Monthly_Data_Core^BX^BW^4~1|D LD^BQIIPOTC(CRN,MSN,BQDATE,CODE,$G(DFN))
 ;;0|IPC_BPCTRL^R^2^BP in Control^B^24^^Monthly_Data_Core^BT^BS^4~1|D BP^BQIIPOTC(CRN,MSN,BQDATE,CODE,$G(DFN))
 ;;0|IPC_ERUR^R^5^ER/Urgent Care visits^^30^^Monthly_Data_Supplemental^G^F^^^A~1|D ERUR^BQIIPPRG(BQDATE)
 ;;0|2011_398^G^5^Peds IZ 4 DTaP Active IMM^^~1|
 ;;0|2011_1271^G^5^Peds IZ 4 Doses Pneumococcal Active IMM^^~1|
 ;;0|2011_1971^G^5^Peds IZ 4:3:1:3:3 Active IMM^^~1|
 ;;0|2011_1972^G^5^Peds IZ 4:3:1:3:3:1 Active IMM^^~1|
 ;;0|2011_1973^G^5^Peds IZ 4:3:1:3:3:1:4 Active IMM^^32^^Monthly_Data_Supplemental^Q^P^^90%~1|
 ;;0|2011_1967^G^2^Tobacco Cessation: Counseling, RX^^27^^Monthly_Data_Core^CF^CE^9^70%~1|
 ;;0|2011_270^G^2^Tobacco Use Prevalence 5+^^26^^Monthly_Data_Core^^CB^9~1|
 ;;0|IPC_TOTP^R^2^Total Patients^^1^^Monthly_Data_Core^C^^9^^A~1|D TOT^BQIIPPRG(BQDATE)
 Q