BQIGPUPD ;PRXM/HC/ALA-Update iCare with new GPRA ; 08 Oct 2007 2:24 PM
;;2.7;ICARE MANAGEMENT SYSTEM;**1**;Dec 19, 2017;Build 12
;
GCHK(UPDATE) ;EP - Check CRS year
NEW BGPYR,BQIYR,BGPIN,BQIN1,BQIN2,BQIN3,VER,BQIH,BQIMEASF,CODE,EXCEPT,DEF
NEW GCLIN,GOAL,HDR,HELP,IEN,MDATA,MIEN,PDIR,RCAT,RCLIN,RCODE,SOURCE,TEXT,TPI
NEW NSOURCE,LY,BQGYRN,PRVID,IPC
S BGPYR=$O(^BGPCTRL("B",""),-1),BGPIN=$O(^BGPCTRL("B",BGPYR,0))
S BQIH=$$SPM^BQIGPUTL()
S BQIYR=$$GET1^DIQ(90508,BQIH_",",2,"E")
S BQGYRN=$O(^BQI(90508,BQIH,20,"B",BQIYR,""))
K ^XTMP("BQICRSUPD")
; If the CRS Year is the same as the current iCare year, then a new
; version has NOT been installed, so quit
I BGPYR=BQIYR D UCHK(BQIYR,BQIH) Q
; A new version of CRS has been installed, need to update iCare
S BQIN1=$$GET1^DIQ(90241.01,BGPIN_",",.06,"I")
S BQIN2=$$GET1^DIQ(90241.01,BGPIN_",",.07,"I")
S BQIN3=$$GET1^DIQ(90241.01,BGPIN_",",.05,"E")
I BGPYR'=BQIYR S UPDATE=1
D EN(BGPYR,BQIN1,BQIN2,BQIN3,$G(UPDATE))
;K ^XTMP("BQICRSUPD")
Q
;
EN(BGPYR,BQIN1,BQIN2,BQIN3,INSTALL) ;EP
;
;Input parameters
; BGPYR = Year of GPRA
; BQIN1 = File number of the indicator file
; BQIN2 = File number of the individual indicator file
; BQIN3 = Program name
; INSTALL = Is this a call from a post-install program?
;
S INSTALL=$G(INSTALL,0)
NEW BGPHOME,BGPHN,BQIDA,Y,X,IDIN,BQIINDG,BQIGDA,BGIN,BGDATA5,BGDATA4,BQIDFN
NEW BQIGSCH
S BGPHN=$O(^BQI(90508,0)) S:BGPHN BGPHOME=$P($G(^BQI(90508,BGPHN,0)),U,1)
Q:$G(BGPHOME)=""
S BQIDA=1
NEW DA,IENS,DIC
S DA(1)=BQIDA,X=BGPYR,DIC(0)="LMNZ",DIC="^BQI(90508,"_DA(1)_",20,"
D ^DIC
I +Y<1 Q
S BQIGDA=+Y
S DA=BQIGDA,IENS=$$IENS^DILF(.DA)
S BQIUPD(90508.01,IENS,.02)=BQIN1
S BQIUPD(90508.01,IENS,.03)=BQIN2
S BQIUPD(90508.01,IENS,.04)=BQIN3
S BQIUPD(90508,BQIDA_",",2)=BGPYR
S BQIINDG=$$ROOT^DILFD(BQIN2,"",1)
D FILE^DIE("","BQIUPD","ERROR")
;
; Inactivate the indicators
S IEN=""
F S IEN=$O(^BQI(90506.1,"AC","G",IEN)) Q:IEN="" D
. S BQIUPD(90506.1,IEN_",",.1)=1
. I $P(^BQI(90506.1,IEN,0),U,11)="" S BQIUPD(90506.1,IEN_",",.11)=DT
. S CODE=$P(^BQI(90506.1,IEN,0),U,1) I $P(CODE,"_",1)=BQIYR S ^XTMP("BQICRSUPD",CODE)=""
D FILE^DIE("","BQIUPD","ERROR")
K BQIUPD
;
; Set the indicators
S IDIN=0,SOURCE="G",RCAT="",RCLIN="",NSOURCE="Performance"
S VER=$$VERSION^XPDUTL("BGP")
;
F S IDIN=$O(@BQIINDG@(IDIN)) Q:'IDIN D
. ; Get new values from the new file in BQIINDG
. ; GCAT = NG:National GPRA;NN:Non-National;O:Other;ONM:Other National Measures
. ; GCLIN =
. I VER>7.0 D
.. S MDATA=$G(@BQIINDG@(IDIN,17)) I MDATA="" Q
.. I +MDATA=0 Q
.. S GCLIN=$$GET1^DIQ(BQIN2,IDIN_",",1701,"E")
.. S GCATN=$$GET1^DIQ(BQIN2,IDIN_",",1706,"E")
.. I GCATN="" S GCATN="OTHER"
.. S GCATN=$$LOWER^VALM1(GCATN)
.. I GCATN["National Gpra" S GCATN="National GPRA"
.. S GCAT=$P(MDATA,U,6),TEXT=$P(MDATA,U,3)
.. S EXCEPT=$P(MDATA,U,4),PDIR=$P(MDATA,U,5)
.. S PRVID=$P(MDATA,U,8),IPC=$P(MDATA,U,7) D PREV(IDIN)
.. ;
.. S CODE=BGPYR_"_"_IDIN
.. S HDR="T00003"_CODE
.. D FILE
. Q
;
; Set all national gpra values to 'Default'
NEW GCAT,GCATN
S IEN=""
F S IEN=$O(^BQI(90506.1,"AC","G",IEN)) Q:IEN="" D
. I $$GET1^DIQ(90506.1,IEN_",",.1,"I")=1 Q
. S GCAT=$$GET1^DIQ(90506.1,IEN_",",2.02,"I")
. S GCATN=$$GET1^DIQ(90506.1,IEN_",",3.03,"E")
. I GCATN'="National GPRA" Q
. ;I '$$PATCH^XPDUTL("BGP*8.0*2"),GCAT'="NG" Q
. ;I $$PATCH^XPDUTL("BGP*8.0*2"),GCAT'="NG1" Q
. S BQIUPD(90506.1,IEN_",",.09)="D"
. S BQIUPD(90506.1,IEN_",",3.04)="D"
D FILE^DIE("","BQIUPD","ERROR")
K BQIUPD
;
; Reset the GPRA year for the panels and convert the views
NEW USR,PNL,SHR,GVW,MSN,MEAS,NMEAS
S USR=0
F S USR=$O(^BQICARE(USR)) Q:'USR D
. ; Convert templates
. S LY=0
. F S LY=$O(^BQICARE(USR,15,LY)) Q:'LY D
.. I $P(^BQICARE(USR,15,LY,0),U,2)'="G" Q
.. S MSN=0
.. F S MSN=$O(^BQICARE(USR,15,LY,1,MSN)) Q:'MSN D
... S MEAS=$P(^BQICARE(USR,15,LY,1,MSN,0),U,1)
... I MEAS'["_" Q
... I $P(MEAS,"_",1)'=BQIYR Q
... S NMEAS=$$CONV(MEAS) I NMEAS="" Q
... NEW DA,IENS
... S DA(2)=USR,DA(1)=LY,DA=MSN,IENS=$$IENS^DILF(.DA)
... S BQIUPD(90505.151,IENS,.01)=NMEAS
. ; For each panel
. S PNL=0
. F S PNL=$O(^BQICARE(USR,1,PNL)) Q:'PNL D
.. NEW DA,IENS
.. S DA(1)=USR,DA=PNL,IENS=$$IENS^DILF(.DA)
.. S BQIUPD(90505.01,IENS,3.3)=BGPYR
.. D FILE^DIE("","BQIUPD","ERROR")
.. K BQIUPD
.. ; Convert owner's GPRA customized view
.. S GVW=0
.. F S GVW=$O(^BQICARE(USR,1,PNL,25,GVW)) Q:'GVW D
... S MEAS=$P(^BQICARE(USR,1,PNL,25,GVW,0),U,1)
... I $P(MEAS,"_",1)'=BQIYR Q
... S NMEAS=$$CONV(MEAS) I NMEAS="" Q
... NEW DA,IENS
... S DA(2)=USR,DA(1)=PNL,DA=GVW,IENS=$$IENS^DILF(.DA)
... S BQIUPD(90505.125,IENS,.01)=NMEAS
.. ;
.. ; Convert shared user's GPRA customized view
.. S SHR=0
.. F S SHR=$O(^BQICARE(USR,1,PNL,30,SHR)) Q:'SHR D
... ; Convert customized
... S GVW=0
... F S GVW=$O(^BQICARE(USR,1,PNL,30,SHR,25,GVW)) Q:'GVW D
.... S MEAS=$P(^BQICARE(USR,1,PNL,30,SHR,25,GVW,0),U,1)
.... I $P(MEAS,"_",1)'=BQIYR Q
.... S NMEAS=$$CONV(MEAS) I NMEAS="" Q
.... NEW DA,IENS
.... S DA(3)=USR,DA(2)=PNL,DA(1)=SHR,DA=GVW,IENS=$$IENS^DILF(.DA)
.... S BQIUPD(90505.325,IENS,.01)=NMEAS
; Update Site Templates
NEW TMPN,MSN
S TMPN=0
F S TMPN=$O(^BQI(90508.1,TMPN)) Q:'TMPN D
. I $P(^BQI(90508.1,TMPN,0),U,2)'="G" Q
. S MSN=0
. F S MSN=$O(^BQI(90508.1,TMPN,10,MSN)) Q:'MSN D
.. S MEAS=$P(^BQI(90508.1,TMPN,10,MSN,0),U,1)
.. I $P(MEAS,"_",1)'=BQIYR Q
.. S NMEAS=$$CONV(MEAS) I NMEAS="" Q
.. NEW DA,IENS
.. S DA(1)=TMPN,DA=MSN,IENS=$$IENS^DILF(.DA)
.. S BQIUPD(90508.11,IENS,.01)=NMEAS
;
I $D(BQIUPD) D FILE^DIE("","BQIUPD","ERROR")
;
; 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
;
;Update current IPC version
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 BUN Q
. S NMEAS=$$CONV(MEAS) I NMEAS="" Q
. NEW DA,IENS
. S DA(2)=1,DA(1)=CRN,DA=IDN,IENS=$$IENS^DILF(.DA)
. S BQIUPD(90508.221,IENS,.01)=NMEAS
. D BUN
D FILE^DIE("","BQIUPD","ERROR")
;
; Update Provider data
S PRV=0
F S PRV=$O(^BQIPROV(PRV)) Q:'PRV D
. S PRN=0
. F S PRN=$O(^BQIPROV(PRV,30,PRN)) Q:'PRN D
.. S MEAS=$P(^BQIPROV(PRV,30,PRN,0),U,1)
.. I $P(MEAS,"_",1)=BGPYR Q
.. I $P(MEAS,"_",1)'?.N Q
.. S NMEAS=$$CONV(MEAS) I NMEAS="" Q
.. NEW DA,IENS
.. S DA(1)=PRV,DA=PRN,IENS=$$IENS^DILF(.DA)
.. S BQIUPD(90505.43,IENS,.01)=NMEAS
D FILE^DIE("","BQIUPD","ERROR")
;
S FAC=0
F S FAC=$O(^BQIFAC(FAC)) Q:'FAC D
. S FCN=0
. F S FCN=$O(^BQIFAC(FAC,30,FCN)) Q:'FCN D
.. S MEAS=$P(^BQIFAC(FAC,30,FCN,0),U,1)
.. I $P(MEAS,"_",1)=BGPYR Q
.. I $P(MEAS,"_",1)'?.N Q
.. S NMEAS=$$CONV(MEAS) I NMEAS="" Q
.. NEW DA,IENS
.. S DA(1)=FAC,DA=FCN,IENS=$$IENS^DILF(.DA)
.. S BQIUPD(90505.63,IENS,.01)=NMEAS
D FILE^DIE("","BQIUPD","ERROR")
;
S BQIDFN=0
F S BQIDFN=$O(^BQIPAT(BQIDFN)) Q:'BQIDFN D
. S $P(^BQIPAT(BQIDFN,0),U,2)=BGPYR
;
I INSTALL D
. D JB
. NEW USERS,DZ,BTEXT
. S USERS="",DZ=0
. F S DZ=$O(^BQICARE(DZ)) Q:'DZ S USERS=USERS_DZ_$C(28)
. S BTEXT(1,0)="The RPMS Clinical Reporting System (CRS) has been updated on your"
. S BTEXT(2,0)="facility's server. This update may affect your iCare Natl Measures"
. S BTEXT(3,0)="view, because of new or inactivated performance measures. Please"
. S BTEXT(4,0)="review your Natl Measures layout and update as needed."
. S BTEXT(5,0)=" "
. S BTEXT(6,0)="CRS UPDATE job scheduled to run "_$$FMTE^BQIUL1(BQIGSCH)_"."
. S BTEXT(7,0)="Your Natl Measures data will not be up-to-date until this job"
. S BTEXT(8,0)="has completed."
. D ADD^BQINOTF("",USERS,"CRS Updated",.BTEXT,1)
Q
;
JB ; Set up task to run to repopulate GPRA for all patients
NEW ZTDESC,ZTRTN,ZTIO,JBNOW,JBDATE,ZTDTH,ZTSK
S ZTDESC="ICARE GPRA UPDATE",ZTRTN="GPR^BQITASK2",ZTIO=""
S JBNOW=$$NOW^XLFDT()
S JBDATE=$S($E($P(JBNOW,".",2),1,2)<20:DT,1:$$FMADD^XLFDT(DT,+1))
S ZTDTH=JBDATE_".20",BQIGSCH=ZTDTH
D ^%ZTLOAD
NEW DA,IENS
S DA=BQIDA,IENS=$$IENS^DILF(.DA)
S BQIUPD(90508,IENS,.1)=ZTSK
D FILE^DIE("","BQIUPD","ERROR")
Q
;
FILE ;File record
NEW DA,X,DIC,DLAYGO
S DIC="^BQI(90506.1,",DIC(0)="L",X=CODE
S DA=$O(^BQI(90506.1,"B",CODE,""))
I DA="" D Q:$G(ERROR)=1
. K DO,DD D FILE^DICN
. S DA=+Y I DA=-1 S ERROR=1
. I 'INSTALL S INSTALL=1,MLIST=MLIST_CODE_$C(29)
S BQIUPD(90506.1,DA_",",.03)=TEXT
;S BQIUPD(90506.1,DA_",",2.01)=SOURCE
;S BQIUPD(90506.1,DA_",",2.02)=GCAT
;S BQIUPD(90506.1,DA_",",2.03)=RCAT
;S BQIUPD(90506.1,DA_",",2.05)=RCLIN
;S BQIUPD(90506.1,DA_",",2.06)=GCLIN
S BQIUPD(90506.1,DA_",",.08)=HDR
S BQIUPD(90506.1,DA_",",.09)=$S($G(DEF)=1:"D",1:"O")
S BQIUPD(90506.1,DA_",",.14)=PDIR
S BQIUPD(90506.1,DA_",",.15)=90
S BQIUPD(90506.1,DA_",",.1)="@"
S BQIUPD(90506.1,DA_",",.11)="@"
D FILE^DIE("","BQIUPD","ERROR")
;
S BQIUPD(90506.1,DA_",",3.01)=NSOURCE
S BQIUPD(90506.1,DA_",",3.02)=GCLIN
S BQIUPD(90506.1,DA_",",3.03)=GCATN
S BQIUPD(90506.1,DA_",",3.04)=$S($G(DEF)=1:"Default",1:"Optional")
D FILE^DIE("E","BQIUPD","ERROR")
Q
;
UCHK(BQIGYR,BQIDA) ; EP - Check for any updates
NEW BQIYDA,BQIMEASF,BQIINDF
S BQIYDA=$$LKP^BQIGPUTL(BQIGYR)
D GFN^BQIGPUTL(BQIDA,BQIYDA)
S BQIINDG=$$ROOT^DILFD(BQIMEASF,"",1)
S VER=$$VERSION^XPDUTL("BGP"),INSTALL=0
; Inactivate the indicators
S IEN=""
F S IEN=$O(^BQI(90506.1,"AC","G",IEN)) Q:IEN="" D
. S CODE=$P(^BQI(90506.1,IEN,0),U,1)
. I VER<8.0,$P(CODE,"_",1)=BQIGYR Q
. S BQIUPD(90506.1,IEN_",",.1)=1
. I $P(^BQI(90506.1,IEN,0),U,11)="" S BQIUPD(90506.1,IEN_",",.11)=DT
D FILE^DIE("","BQIUPD","ERROR")
K BQIUPD
;
; Set the indicators
S IDIN=0,SOURCE="G",RCAT="",RCLIN="",NSOURCE="Performance",MLIST=""
;
F S IDIN=$O(@BQIINDG@(IDIN)) Q:'IDIN D
. ; Get new values from the new file in BQIINDG
. ; GCAT = NG:National GPRA;NN:Non-National;O:Other;ONM:Other National Measures
. ; GCLIN =
. I VER>7.0 D
.. S MDATA=$G(@BQIINDG@(IDIN,17)) I MDATA="" Q
.. I +MDATA=0 Q
.. S GCLIN=$$GET1^DIQ(BQIMEASF,IDIN_",",1701,"E")
.. S GCATN=$$GET1^DIQ(BQIMEASF,IDIN_",",1706,"E")
.. I GCATN="" S GCATN="OTHER"
.. S GCATN=$$LOWER^VALM1(GCATN)
.. I GCATN["National Gpra" S GCATN="National GPRA"
.. S GCAT=$P(MDATA,U,6),TEXT=$P(MDATA,U,3)
.. S EXCEPT=$P(MDATA,U,4),PDIR=$P(MDATA,U,5)
.. I GCAT["NG" S GCATN="National GPRA"
.. ;
.. S CODE=BGPYR_"_"_IDIN
.. S HDR="T00003"_CODE
.. D FILE
. Q
;
; If new measures identified, job off GPRA update job and send notification
; about new measures
I INSTALL,$G(MLIST)'="" D
. D JB1
. NEW USERS,DZ,BTEXT
. S USERS="",DZ=0
. F S DZ=$O(^BQICARE(DZ)) Q:'DZ S USERS=USERS_DZ_$C(28)
. S BTEXT(1,0)="The RPMS Clinical Reporting System (CRS) has been updated on your"
. S BTEXT(2,0)="facility's server. This update may affect your iCare Natl Measures"
. S BTEXT(3,0)="view, because of new or inactivated performance measures. Please"
. S BTEXT(4,0)="review your Natl Measures layout and templates and update as needed."
. D ADD^BQINOTF("",USERS,"CRS Updated",.BTEXT,1)
;
; Set all national gpra values to 'Default'
NEW GCAT
S IEN=""
F S IEN=$O(^BQI(90506.1,"AC","G",IEN)) Q:IEN="" D
. I $$GET1^DIQ(90506.1,IEN_",",.1,"I")=1 Q
. S CODE=$P(^BQI(90506.1,IEN,0),U,1)
. I VER<8.0,$P(CODE,"_",1)=BQIGYR Q
. ;S GCAT=$$GET1^DIQ(90506.1,IEN_",",2.02,"I")
. S GCATN=$$GET1^DIQ(90506.1,IEN_",",3.03,"E")
. ;I '$$PATCH^XPDUTL("BGP*8.0*2"),GCAT'="NG" Q
. ;I $$PATCH^XPDUTL("BGP*8.0*2"),GCAT'="NG1" Q
. I GCATN'="National GPRA" Q
. ;S BQIUPD(90506.1,IEN_",",.09)="D"
. S BQIUPD(90506.1,IEN_",",3.04)="D"
D FILE^DIE("","BQIUPD","ERROR")
K BQIUPD
Q
;
CONV(MSR) ;EP - Convert the Measure
NEW NM
S NM=$G(^XTMP("BQICRSUPD",MSR))
;S NM=BGPYR_"_"_$P(MSR,"_",2)
Q NM
;
BUN ; 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) I NMEAS="" Q
. 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
;
PREV(CDIN) ;EP - Map previous year's IEN to new one
; Input CDIN = IDIN
NEW PYRDATA,PYRDD,PYRDG,PRYN
I PRVID="" Q
S PYRDATA=^BQI(90508,BQIH,20,BQGYRN,0),PYRDD=$P(PYRDATA,U,3)
S PYRDG=$$ROOT^DILFD(PYRDD,"",1)
S PRVIEN=$O(@PYRDG@("C",PRVID,""))
S PRVMEAS=$P(PYRDATA,U,1)_"_"_PRVIEN
S ^XTMP("BQICRSUPD",PRVMEAS)=BGPYR_"_"_CDIN
Q
;
JB1 ;EP
NEW ZTSK,IJOB,ZTDTH,ZTDESC,BQIUPD
S ZTDTH=$$FMADD^XLFDT($$NOW^XLFDT(),,,5)
S ZTDESC="CRS Measure Update",ZTRTN="EN^BQIGPRA6",ZTIO="",ZTSAVE("MLIST")=$G(MLIST)
D ^%ZTLOAD
K MLIST
Q
BQIGPUPD ;PRXM/HC/ALA-Update iCare with new GPRA ; 08 Oct 2007 2:24 PM
+1 ;;2.7;ICARE MANAGEMENT SYSTEM;**1**;Dec 19, 2017;Build 12
+2 ;
GCHK(UPDATE) ;EP - Check CRS year
+1 NEW BGPYR,BQIYR,BGPIN,BQIN1,BQIN2,BQIN3,VER,BQIH,BQIMEASF,CODE,EXCEPT,DEF
+2 NEW GCLIN,GOAL,HDR,HELP,IEN,MDATA,MIEN,PDIR,RCAT,RCLIN,RCODE,SOURCE,TEXT,TPI
+3 NEW NSOURCE,LY,BQGYRN,PRVID,IPC
+4 SET BGPYR=$ORDER(^BGPCTRL("B",""),-1)
SET BGPIN=$ORDER(^BGPCTRL("B",BGPYR,0))
+5 SET BQIH=$$SPM^BQIGPUTL()
+6 SET BQIYR=$$GET1^DIQ(90508,BQIH_",",2,"E")
+7 SET BQGYRN=$ORDER(^BQI(90508,BQIH,20,"B",BQIYR,""))
+8 KILL ^XTMP("BQICRSUPD")
+9 ; If the CRS Year is the same as the current iCare year, then a new
+10 ; version has NOT been installed, so quit
+11 IF BGPYR=BQIYR
DO UCHK(BQIYR,BQIH)
QUIT
+12 ; A new version of CRS has been installed, need to update iCare
+13 SET BQIN1=$$GET1^DIQ(90241.01,BGPIN_",",.06,"I")
+14 SET BQIN2=$$GET1^DIQ(90241.01,BGPIN_",",.07,"I")
+15 SET BQIN3=$$GET1^DIQ(90241.01,BGPIN_",",.05,"E")
+16 IF BGPYR'=BQIYR
SET UPDATE=1
+17 DO EN(BGPYR,BQIN1,BQIN2,BQIN3,$GET(UPDATE))
+18 ;K ^XTMP("BQICRSUPD")
+19 QUIT
+20 ;
EN(BGPYR,BQIN1,BQIN2,BQIN3,INSTALL) ;EP
+1 ;
+2 ;Input parameters
+3 ; BGPYR = Year of GPRA
+4 ; BQIN1 = File number of the indicator file
+5 ; BQIN2 = File number of the individual indicator file
+6 ; BQIN3 = Program name
+7 ; INSTALL = Is this a call from a post-install program?
+8 ;
+9 SET INSTALL=$GET(INSTALL,0)
+10 NEW BGPHOME,BGPHN,BQIDA,Y,X,IDIN,BQIINDG,BQIGDA,BGIN,BGDATA5,BGDATA4,BQIDFN
+11 NEW BQIGSCH
+12 SET BGPHN=$ORDER(^BQI(90508,0))
IF BGPHN
SET BGPHOME=$PIECE($GET(^BQI(90508,BGPHN,0)),U,1)
+13 IF $GET(BGPHOME)=""
QUIT
+14 SET BQIDA=1
+15 NEW DA,IENS,DIC
+16 SET DA(1)=BQIDA
SET X=BGPYR
SET DIC(0)="LMNZ"
SET DIC="^BQI(90508,"_DA(1)_",20,"
+17 DO ^DIC
+18 IF +Y<1
QUIT
+19 SET BQIGDA=+Y
+20 SET DA=BQIGDA
SET IENS=$$IENS^DILF(.DA)
+21 SET BQIUPD(90508.01,IENS,.02)=BQIN1
+22 SET BQIUPD(90508.01,IENS,.03)=BQIN2
+23 SET BQIUPD(90508.01,IENS,.04)=BQIN3
+24 SET BQIUPD(90508,BQIDA_",",2)=BGPYR
+25 SET BQIINDG=$$ROOT^DILFD(BQIN2,"",1)
+26 DO FILE^DIE("","BQIUPD","ERROR")
+27 ;
+28 ; Inactivate the indicators
+29 SET IEN=""
+30 FOR
SET IEN=$ORDER(^BQI(90506.1,"AC","G",IEN))
IF IEN=""
QUIT
Begin DoDot:1
+31 SET BQIUPD(90506.1,IEN_",",.1)=1
+32 IF $PIECE(^BQI(90506.1,IEN,0),U,11)=""
SET BQIUPD(90506.1,IEN_",",.11)=DT
+33 SET CODE=$PIECE(^BQI(90506.1,IEN,0),U,1)
IF $PIECE(CODE,"_",1)=BQIYR
SET ^XTMP("BQICRSUPD",CODE)=""
End DoDot:1
+34 DO FILE^DIE("","BQIUPD","ERROR")
+35 KILL BQIUPD
+36 ;
+37 ; Set the indicators
+38 SET IDIN=0
SET SOURCE="G"
SET RCAT=""
SET RCLIN=""
SET NSOURCE="Performance"
+39 SET VER=$$VERSION^XPDUTL("BGP")
+40 ;
+41 FOR
SET IDIN=$ORDER(@BQIINDG@(IDIN))
IF 'IDIN
QUIT
Begin DoDot:1
+42 ; Get new values from the new file in BQIINDG
+43 ; GCAT = NG:National GPRA;NN:Non-National;O:Other;ONM:Other National Measures
+44 ; GCLIN =
+45 IF VER>7.0
Begin DoDot:2
+46 SET MDATA=$GET(@BQIINDG@(IDIN,17))
IF MDATA=""
QUIT
+47 IF +MDATA=0
QUIT
+48 SET GCLIN=$$GET1^DIQ(BQIN2,IDIN_",",1701,"E")
+49 SET GCATN=$$GET1^DIQ(BQIN2,IDIN_",",1706,"E")
+50 IF GCATN=""
SET GCATN="OTHER"
+51 SET GCATN=$$LOWER^VALM1(GCATN)
+52 IF GCATN["National Gpra"
SET GCATN="National GPRA"
+53 SET GCAT=$PIECE(MDATA,U,6)
SET TEXT=$PIECE(MDATA,U,3)
+54 SET EXCEPT=$PIECE(MDATA,U,4)
SET PDIR=$PIECE(MDATA,U,5)
+55 SET PRVID=$PIECE(MDATA,U,8)
SET IPC=$PIECE(MDATA,U,7)
DO PREV(IDIN)
+56 ;
+57 SET CODE=BGPYR_"_"_IDIN
+58 SET HDR="T00003"_CODE
+59 DO FILE
End DoDot:2
+60 QUIT
End DoDot:1
+61 ;
+62 ; Set all national gpra values to 'Default'
+63 NEW GCAT,GCATN
+64 SET IEN=""
+65 FOR
SET IEN=$ORDER(^BQI(90506.1,"AC","G",IEN))
IF IEN=""
QUIT
Begin DoDot:1
+66 IF $$GET1^DIQ(90506.1,IEN_",",.1,"I")=1
QUIT
+67 SET GCAT=$$GET1^DIQ(90506.1,IEN_",",2.02,"I")
+68 SET GCATN=$$GET1^DIQ(90506.1,IEN_",",3.03,"E")
+69 IF GCATN'="National GPRA"
QUIT
+70 ;I '$$PATCH^XPDUTL("BGP*8.0*2"),GCAT'="NG" Q
+71 ;I $$PATCH^XPDUTL("BGP*8.0*2"),GCAT'="NG1" Q
+72 SET BQIUPD(90506.1,IEN_",",.09)="D"
+73 SET BQIUPD(90506.1,IEN_",",3.04)="D"
End DoDot:1
+74 DO FILE^DIE("","BQIUPD","ERROR")
+75 KILL BQIUPD
+76 ;
+77 ; Reset the GPRA year for the panels and convert the views
+78 NEW USR,PNL,SHR,GVW,MSN,MEAS,NMEAS
+79 SET USR=0
+80 FOR
SET USR=$ORDER(^BQICARE(USR))
IF 'USR
QUIT
Begin DoDot:1
+81 ; Convert templates
+82 SET LY=0
+83 FOR
SET LY=$ORDER(^BQICARE(USR,15,LY))
IF 'LY
QUIT
Begin DoDot:2
+84 IF $PIECE(^BQICARE(USR,15,LY,0),U,2)'="G"
QUIT
+85 SET MSN=0
+86 FOR
SET MSN=$ORDER(^BQICARE(USR,15,LY,1,MSN))
IF 'MSN
QUIT
Begin DoDot:3
+87 SET MEAS=$PIECE(^BQICARE(USR,15,LY,1,MSN,0),U,1)
+88 IF MEAS'["_"
QUIT
+89 IF $PIECE(MEAS,"_",1)'=BQIYR
QUIT
+90 SET NMEAS=$$CONV(MEAS)
IF NMEAS=""
QUIT
+91 NEW DA,IENS
+92 SET DA(2)=USR
SET DA(1)=LY
SET DA=MSN
SET IENS=$$IENS^DILF(.DA)
+93 SET BQIUPD(90505.151,IENS,.01)=NMEAS
End DoDot:3
End DoDot:2
+94 ; For each panel
+95 SET PNL=0
+96 FOR
SET PNL=$ORDER(^BQICARE(USR,1,PNL))
IF 'PNL
QUIT
Begin DoDot:2
+97 NEW DA,IENS
+98 SET DA(1)=USR
SET DA=PNL
SET IENS=$$IENS^DILF(.DA)
+99 SET BQIUPD(90505.01,IENS,3.3)=BGPYR
+100 DO FILE^DIE("","BQIUPD","ERROR")
+101 KILL BQIUPD
+102 ; Convert owner's GPRA customized view
+103 SET GVW=0
+104 FOR
SET GVW=$ORDER(^BQICARE(USR,1,PNL,25,GVW))
IF 'GVW
QUIT
Begin DoDot:3
+105 SET MEAS=$PIECE(^BQICARE(USR,1,PNL,25,GVW,0),U,1)
+106 IF $PIECE(MEAS,"_",1)'=BQIYR
QUIT
+107 SET NMEAS=$$CONV(MEAS)
IF NMEAS=""
QUIT
+108 NEW DA,IENS
+109 SET DA(2)=USR
SET DA(1)=PNL
SET DA=GVW
SET IENS=$$IENS^DILF(.DA)
+110 SET BQIUPD(90505.125,IENS,.01)=NMEAS
End DoDot:3
+111 ;
+112 ; Convert shared user's GPRA customized view
+113 SET SHR=0
+114 FOR
SET SHR=$ORDER(^BQICARE(USR,1,PNL,30,SHR))
IF 'SHR
QUIT
Begin DoDot:3
+115 ; Convert customized
+116 SET GVW=0
+117 FOR
SET GVW=$ORDER(^BQICARE(USR,1,PNL,30,SHR,25,GVW))
IF 'GVW
QUIT
Begin DoDot:4
+118 SET MEAS=$PIECE(^BQICARE(USR,1,PNL,30,SHR,25,GVW,0),U,1)
+119 IF $PIECE(MEAS,"_",1)'=BQIYR
QUIT
+120 SET NMEAS=$$CONV(MEAS)
IF NMEAS=""
QUIT
+121 NEW DA,IENS
+122 SET DA(3)=USR
SET DA(2)=PNL
SET DA(1)=SHR
SET DA=GVW
SET IENS=$$IENS^DILF(.DA)
+123 SET BQIUPD(90505.325,IENS,.01)=NMEAS
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+124 ; Update Site Templates
+125 NEW TMPN,MSN
+126 SET TMPN=0
+127 FOR
SET TMPN=$ORDER(^BQI(90508.1,TMPN))
IF 'TMPN
QUIT
Begin DoDot:1
+128 IF $PIECE(^BQI(90508.1,TMPN,0),U,2)'="G"
QUIT
+129 SET MSN=0
+130 FOR
SET MSN=$ORDER(^BQI(90508.1,TMPN,10,MSN))
IF 'MSN
QUIT
Begin DoDot:2
+131 SET MEAS=$PIECE(^BQI(90508.1,TMPN,10,MSN,0),U,1)
+132 IF $PIECE(MEAS,"_",1)'=BQIYR
QUIT
+133 SET NMEAS=$$CONV(MEAS)
IF NMEAS=""
QUIT
+134 NEW DA,IENS
+135 SET DA(1)=TMPN
SET DA=MSN
SET IENS=$$IENS^DILF(.DA)
+136 SET BQIUPD(90508.11,IENS,.01)=NMEAS
End DoDot:2
End DoDot:1
+137 ;
+138 IF $DATA(BQIUPD)
DO FILE^DIE("","BQIUPD","ERROR")
+139 ;
+140 ; Update IPC
+141 NEW CRIPC,CRN,IDN,MEAS,NMEAS,BDN,PRV,PRN,FAC,FCN
+142 ; Get current IPC
+143 SET CRIPC=$PIECE($GET(^BQI(90508,1,11)),U,1)
+144 SET CRN=$ORDER(^BQI(90508,1,22,"B",CRIPC,""))
IF CRN=""
QUIT
+145 ;
+146 ;Update current IPC version
+147 SET IDN=0
+148 FOR
SET IDN=$ORDER(^BQI(90508,1,22,CRN,1,IDN))
IF 'IDN
QUIT
Begin DoDot:1
+149 SET MEAS=$PIECE(^BQI(90508,1,22,CRN,1,IDN,0),U,1)
+150 IF $PIECE(MEAS,"_",1)'=BQIYR
DO BUN
QUIT
+151 SET NMEAS=$$CONV(MEAS)
IF NMEAS=""
QUIT
+152 NEW DA,IENS
+153 SET DA(2)=1
SET DA(1)=CRN
SET DA=IDN
SET IENS=$$IENS^DILF(.DA)
+154 SET BQIUPD(90508.221,IENS,.01)=NMEAS
+155 DO BUN
End DoDot:1
+156 DO FILE^DIE("","BQIUPD","ERROR")
+157 ;
+158 ; Update Provider data
+159 SET PRV=0
+160 FOR
SET PRV=$ORDER(^BQIPROV(PRV))
IF 'PRV
QUIT
Begin DoDot:1
+161 SET PRN=0
+162 FOR
SET PRN=$ORDER(^BQIPROV(PRV,30,PRN))
IF 'PRN
QUIT
Begin DoDot:2
+163 SET MEAS=$PIECE(^BQIPROV(PRV,30,PRN,0),U,1)
+164 IF $PIECE(MEAS,"_",1)=BGPYR
QUIT
+165 IF $PIECE(MEAS,"_",1)'?.N
QUIT
+166 SET NMEAS=$$CONV(MEAS)
IF NMEAS=""
QUIT
+167 NEW DA,IENS
+168 SET DA(1)=PRV
SET DA=PRN
SET IENS=$$IENS^DILF(.DA)
+169 SET BQIUPD(90505.43,IENS,.01)=NMEAS
End DoDot:2
End DoDot:1
+170 DO FILE^DIE("","BQIUPD","ERROR")
+171 ;
+172 SET FAC=0
+173 FOR
SET FAC=$ORDER(^BQIFAC(FAC))
IF 'FAC
QUIT
Begin DoDot:1
+174 SET FCN=0
+175 FOR
SET FCN=$ORDER(^BQIFAC(FAC,30,FCN))
IF 'FCN
QUIT
Begin DoDot:2
+176 SET MEAS=$PIECE(^BQIFAC(FAC,30,FCN,0),U,1)
+177 IF $PIECE(MEAS,"_",1)=BGPYR
QUIT
+178 IF $PIECE(MEAS,"_",1)'?.N
QUIT
+179 SET NMEAS=$$CONV(MEAS)
IF NMEAS=""
QUIT
+180 NEW DA,IENS
+181 SET DA(1)=FAC
SET DA=FCN
SET IENS=$$IENS^DILF(.DA)
+182 SET BQIUPD(90505.63,IENS,.01)=NMEAS
End DoDot:2
End DoDot:1
+183 DO FILE^DIE("","BQIUPD","ERROR")
+184 ;
+185 SET BQIDFN=0
+186 FOR
SET BQIDFN=$ORDER(^BQIPAT(BQIDFN))
IF 'BQIDFN
QUIT
Begin DoDot:1
+187 SET $PIECE(^BQIPAT(BQIDFN,0),U,2)=BGPYR
End DoDot:1
+188 ;
+189 IF INSTALL
Begin DoDot:1
+190 DO JB
+191 NEW USERS,DZ,BTEXT
+192 SET USERS=""
SET DZ=0
+193 FOR
SET DZ=$ORDER(^BQICARE(DZ))
IF 'DZ
QUIT
SET USERS=USERS_DZ_$CHAR(28)
+194 SET BTEXT(1,0)="The RPMS Clinical Reporting System (CRS) has been updated on your"
+195 SET BTEXT(2,0)="facility's server. This update may affect your iCare Natl Measures"
+196 SET BTEXT(3,0)="view, because of new or inactivated performance measures. Please"
+197 SET BTEXT(4,0)="review your Natl Measures layout and update as needed."
+198 SET BTEXT(5,0)=" "
+199 SET BTEXT(6,0)="CRS UPDATE job scheduled to run "_$$FMTE^BQIUL1(BQIGSCH)_"."
+200 SET BTEXT(7,0)="Your Natl Measures data will not be up-to-date until this job"
+201 SET BTEXT(8,0)="has completed."
+202 DO ADD^BQINOTF("",USERS,"CRS Updated",.BTEXT,1)
End DoDot:1
+203 QUIT
+204 ;
JB ; Set up task to run to repopulate GPRA for all patients
+1 NEW ZTDESC,ZTRTN,ZTIO,JBNOW,JBDATE,ZTDTH,ZTSK
+2 SET ZTDESC="ICARE GPRA UPDATE"
SET ZTRTN="GPR^BQITASK2"
SET ZTIO=""
+3 SET JBNOW=$$NOW^XLFDT()
+4 SET JBDATE=$SELECT($EXTRACT($PIECE(JBNOW,".",2),1,2)<20:DT,1:$$FMADD^XLFDT(DT,+1))
+5 SET ZTDTH=JBDATE_".20"
SET BQIGSCH=ZTDTH
+6 DO ^%ZTLOAD
+7 NEW DA,IENS
+8 SET DA=BQIDA
SET IENS=$$IENS^DILF(.DA)
+9 SET BQIUPD(90508,IENS,.1)=ZTSK
+10 DO FILE^DIE("","BQIUPD","ERROR")
+11 QUIT
+12 ;
FILE ;File record
+1 NEW DA,X,DIC,DLAYGO
+2 SET DIC="^BQI(90506.1,"
SET DIC(0)="L"
SET X=CODE
+3 SET DA=$ORDER(^BQI(90506.1,"B",CODE,""))
+4 IF DA=""
Begin DoDot:1
+5 KILL DO,DD
DO FILE^DICN
+6 SET DA=+Y
IF DA=-1
SET ERROR=1
+7 IF 'INSTALL
SET INSTALL=1
SET MLIST=MLIST_CODE_$CHAR(29)
End DoDot:1
IF $GET(ERROR)=1
QUIT
+8 SET BQIUPD(90506.1,DA_",",.03)=TEXT
+9 ;S BQIUPD(90506.1,DA_",",2.01)=SOURCE
+10 ;S BQIUPD(90506.1,DA_",",2.02)=GCAT
+11 ;S BQIUPD(90506.1,DA_",",2.03)=RCAT
+12 ;S BQIUPD(90506.1,DA_",",2.05)=RCLIN
+13 ;S BQIUPD(90506.1,DA_",",2.06)=GCLIN
+14 SET BQIUPD(90506.1,DA_",",.08)=HDR
+15 SET BQIUPD(90506.1,DA_",",.09)=$SELECT($GET(DEF)=1:"D",1:"O")
+16 SET BQIUPD(90506.1,DA_",",.14)=PDIR
+17 SET BQIUPD(90506.1,DA_",",.15)=90
+18 SET BQIUPD(90506.1,DA_",",.1)="@"
+19 SET BQIUPD(90506.1,DA_",",.11)="@"
+20 DO FILE^DIE("","BQIUPD","ERROR")
+21 ;
+22 SET BQIUPD(90506.1,DA_",",3.01)=NSOURCE
+23 SET BQIUPD(90506.1,DA_",",3.02)=GCLIN
+24 SET BQIUPD(90506.1,DA_",",3.03)=GCATN
+25 SET BQIUPD(90506.1,DA_",",3.04)=$SELECT($GET(DEF)=1:"Default",1:"Optional")
+26 DO FILE^DIE("E","BQIUPD","ERROR")
+27 QUIT
+28 ;
UCHK(BQIGYR,BQIDA) ; EP - Check for any updates
+1 NEW BQIYDA,BQIMEASF,BQIINDF
+2 SET BQIYDA=$$LKP^BQIGPUTL(BQIGYR)
+3 DO GFN^BQIGPUTL(BQIDA,BQIYDA)
+4 SET BQIINDG=$$ROOT^DILFD(BQIMEASF,"",1)
+5 SET VER=$$VERSION^XPDUTL("BGP")
SET INSTALL=0
+6 ; Inactivate the indicators
+7 SET IEN=""
+8 FOR
SET IEN=$ORDER(^BQI(90506.1,"AC","G",IEN))
IF IEN=""
QUIT
Begin DoDot:1
+9 SET CODE=$PIECE(^BQI(90506.1,IEN,0),U,1)
+10 IF VER<8.0
IF $PIECE(CODE,"_",1)=BQIGYR
QUIT
+11 SET BQIUPD(90506.1,IEN_",",.1)=1
+12 IF $PIECE(^BQI(90506.1,IEN,0),U,11)=""
SET BQIUPD(90506.1,IEN_",",.11)=DT
End DoDot:1
+13 DO FILE^DIE("","BQIUPD","ERROR")
+14 KILL BQIUPD
+15 ;
+16 ; Set the indicators
+17 SET IDIN=0
SET SOURCE="G"
SET RCAT=""
SET RCLIN=""
SET NSOURCE="Performance"
SET MLIST=""
+18 ;
+19 FOR
SET IDIN=$ORDER(@BQIINDG@(IDIN))
IF 'IDIN
QUIT
Begin DoDot:1
+20 ; Get new values from the new file in BQIINDG
+21 ; GCAT = NG:National GPRA;NN:Non-National;O:Other;ONM:Other National Measures
+22 ; GCLIN =
+23 IF VER>7.0
Begin DoDot:2
+24 SET MDATA=$GET(@BQIINDG@(IDIN,17))
IF MDATA=""
QUIT
+25 IF +MDATA=0
QUIT
+26 SET GCLIN=$$GET1^DIQ(BQIMEASF,IDIN_",",1701,"E")
+27 SET GCATN=$$GET1^DIQ(BQIMEASF,IDIN_",",1706,"E")
+28 IF GCATN=""
SET GCATN="OTHER"
+29 SET GCATN=$$LOWER^VALM1(GCATN)
+30 IF GCATN["National Gpra"
SET GCATN="National GPRA"
+31 SET GCAT=$PIECE(MDATA,U,6)
SET TEXT=$PIECE(MDATA,U,3)
+32 SET EXCEPT=$PIECE(MDATA,U,4)
SET PDIR=$PIECE(MDATA,U,5)
+33 IF GCAT["NG"
SET GCATN="National GPRA"
+34 ;
+35 SET CODE=BGPYR_"_"_IDIN
+36 SET HDR="T00003"_CODE
+37 DO FILE
End DoDot:2
+38 QUIT
End DoDot:1
+39 ;
+40 ; If new measures identified, job off GPRA update job and send notification
+41 ; about new measures
+42 IF INSTALL
IF $GET(MLIST)'=""
Begin DoDot:1
+43 DO JB1
+44 NEW USERS,DZ,BTEXT
+45 SET USERS=""
SET DZ=0
+46 FOR
SET DZ=$ORDER(^BQICARE(DZ))
IF 'DZ
QUIT
SET USERS=USERS_DZ_$CHAR(28)
+47 SET BTEXT(1,0)="The RPMS Clinical Reporting System (CRS) has been updated on your"
+48 SET BTEXT(2,0)="facility's server. This update may affect your iCare Natl Measures"
+49 SET BTEXT(3,0)="view, because of new or inactivated performance measures. Please"
+50 SET BTEXT(4,0)="review your Natl Measures layout and templates and update as needed."
+51 DO ADD^BQINOTF("",USERS,"CRS Updated",.BTEXT,1)
End DoDot:1
+52 ;
+53 ; Set all national gpra values to 'Default'
+54 NEW GCAT
+55 SET IEN=""
+56 FOR
SET IEN=$ORDER(^BQI(90506.1,"AC","G",IEN))
IF IEN=""
QUIT
Begin DoDot:1
+57 IF $$GET1^DIQ(90506.1,IEN_",",.1,"I")=1
QUIT
+58 SET CODE=$PIECE(^BQI(90506.1,IEN,0),U,1)
+59 IF VER<8.0
IF $PIECE(CODE,"_",1)=BQIGYR
QUIT
+60 ;S GCAT=$$GET1^DIQ(90506.1,IEN_",",2.02,"I")
+61 SET GCATN=$$GET1^DIQ(90506.1,IEN_",",3.03,"E")
+62 ;I '$$PATCH^XPDUTL("BGP*8.0*2"),GCAT'="NG" Q
+63 ;I $$PATCH^XPDUTL("BGP*8.0*2"),GCAT'="NG1" Q
+64 IF GCATN'="National GPRA"
QUIT
+65 ;S BQIUPD(90506.1,IEN_",",.09)="D"
+66 SET BQIUPD(90506.1,IEN_",",3.04)="D"
End DoDot:1
+67 DO FILE^DIE("","BQIUPD","ERROR")
+68 KILL BQIUPD
+69 QUIT
+70 ;
CONV(MSR) ;EP - Convert the Measure
+1 NEW NM
+2 SET NM=$GET(^XTMP("BQICRSUPD",MSR))
+3 ;S NM=BGPYR_"_"_$P(MSR,"_",2)
+4 QUIT NM
+5 ;
BUN ; Bundles
+1 SET BDN=0
+2 FOR
SET BDN=$ORDER(^BQI(90508,1,22,CRN,1,IDN,2,BDN))
IF 'BDN
QUIT
Begin DoDot:1
+3 SET MEAS=$PIECE(^BQI(90508,1,22,CRN,1,IDN,2,BDN,0),U,1)
+4 IF $PIECE(MEAS,"_",1)'=BQIYR
QUIT
+5 SET NMEAS=$$CONV(MEAS)
IF NMEAS=""
QUIT
+6 NEW DA,IENS
+7 SET DA(3)=1
SET DA(2)=CRN
SET DA(1)=IDN
SET DA=BDN
SET IENS=$$IENS^DILF(.DA)
+8 SET BQIUPD(90508.2212,IENS,.01)=NMEAS
End DoDot:1
+9 QUIT
+10 ;
PREV(CDIN) ;EP - Map previous year's IEN to new one
+1 ; Input CDIN = IDIN
+2 NEW PYRDATA,PYRDD,PYRDG,PRYN
+3 IF PRVID=""
QUIT
+4 SET PYRDATA=^BQI(90508,BQIH,20,BQGYRN,0)
SET PYRDD=$PIECE(PYRDATA,U,3)
+5 SET PYRDG=$$ROOT^DILFD(PYRDD,"",1)
+6 SET PRVIEN=$ORDER(@PYRDG@("C",PRVID,""))
+7 SET PRVMEAS=$PIECE(PYRDATA,U,1)_"_"_PRVIEN
+8 SET ^XTMP("BQICRSUPD",PRVMEAS)=BGPYR_"_"_CDIN
+9 QUIT
+10 ;
JB1 ;EP
+1 NEW ZTSK,IJOB,ZTDTH,ZTDESC,BQIUPD
+2 SET ZTDTH=$$FMADD^XLFDT($$NOW^XLFDT(),,,5)
+3 SET ZTDESC="CRS Measure Update"
SET ZTRTN="EN^BQIGPRA6"
SET ZTIO=""
SET ZTSAVE("MLIST")=$GET(MLIST)
+4 DO ^%ZTLOAD
+5 KILL MLIST
+6 QUIT