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

RORP027.m

Go to the documentation of this file.
  1. RORP027 ;ALB/TK - CCR PRE/POST-INSTALL PATCH 27 ;29 Jul 2014 4:02 PM
  1. ;;1.5;CLINICAL CASE REGISTRIES;**27**;Feb 17, 2006;Build 58
  1. ;
  1. ; This routine uses the following IAs:
  1. ; #3277 OWNSKEY^XUSRB (supported)
  1. ; #10141 BMES^XPDUTL
  1. ; MES^XPDUTL
  1. ;
  1. ;******************************************************************************
  1. ;******************************************************************************
  1. ; --- ROUTINE MODIFICATION LOG ---
  1. ;
  1. ;PKG/PATCH DATE DEVELOPER MODIFICATION
  1. ;----------- ---------- ----------- ----------------------------------------
  1. ;ROR*1.5*27 FEB 2015 T KOPP Patch 27 pre and post install
  1. ;******************************************************************************
  1. ;******************************************************************************
  1. ;
  1. Q
  1. ;Pre-Install routine for Patch 27
  1. PRE ;
  1. ; CHECK FOR ROR VA IRM KEY, ABORT IF USER DOES NOT POSSESS
  1. N RORKEYOK
  1. D BMES^XPDUTL("Verifying installing user has the ROR VA IRM security key")
  1. D OWNSKEY^XUSRB(.RORKEYOK,"ROR VA IRM",DUZ)
  1. I '$G(RORKEYOK(0)) D Q
  1. . S XPDABORT=1
  1. . D BMES^XPDUTL("****** INSTALL ABORTED!!! ******")
  1. . D BMES^XPDUTL("This patch can only be installed by a user who is assigned the ROR VA IRM key")
  1. . D BMES^XPDUTL("Restart the installation again once the appropriate key has been assigned")
  1. D BMES^XPDUTL(" User has the ROR VA IRM key - OK to install")
  1. Q
  1. ;
  1. ;Post-Install routine for Patch 27
  1. POST ;
  1. N CT,ROR,RORERR,REGNAME,REGIEN,RORBUF,RORFDA,RORMSG,RORMSGX
  1. D BMES^XPDUTL("Post install started")
  1. ; Check if any registries from patch 24 have been inactivated
  1. S ROR(1)="VA ALS",ROR(2)="VA OSTEOPOROSIS",ROR(3)="VA HCC",ROR(4)="VA LUNG CANCER"
  1. S ROR(5)="VA MELANOMA",ROR(6)="VA COLORECTAL CANCER",ROR(7)="VA PANCREATIC CANCER",ROR(8)="VA PROSTATE CANCER"
  1. D BMES^XPDUTL("Checking for inactive registries")
  1. S CT=1,RORERR=0
  1. F ROR=1:1:8 D
  1. . K RORBUF,RORMSGX,RORFDA
  1. . S REGIEN=$$REGIEN^RORUTL02(ROR(ROR),"11I",.RORBUF)
  1. . I $G(RORBUF("DILIST","ID",1,11)) D
  1. .. S RORFDA(798.1,REGIEN_",",11)=0
  1. .. D FILE^DIE(,"RORFDA","RORMSGX")
  1. .. S CT=CT+1,RORMSG(CT)=$J("",10)_ROR(ROR)
  1. .. I '$G(RORMSGX) D
  1. ... S RORMSG(CT)=RORMSG(CT)_" was reactivated"
  1. .. E D
  1. ... S RORMSG(CT)=RORMSG(CT)_" must be manually reactivated",RORERR=1
  1. I CT=1 K RORMSG D BMES^XPDUTL("No inactive registries found")
  1. I CT>1 D
  1. . S RORMSG(1)="REGISTRY UPDATE STATUS:" D MES^XPDUTL(.RORMSG)
  1. . I RORERR D BMES^XPDUTL("***** AT LEAST ONE REGISTRY MUST BE MANUALLY REACTIVATED *****")
  1. D BMES^XPDUTL(" Step Complete")
  1. ;
  1. D BMES^XPDUTL("Updating List Items")
  1. D UPDLIST
  1. D BMES^XPDUTL(" Step Complete")
  1. ;
  1. D BMES^XPDUTL("Post install completed")
  1. Q
  1. ;
  1. UPDLIST ;
  1. N RORI,RORI1,RORREG,RORDATA,REGIEN,Z,CT
  1. F RORI=1:1 S RORREG=$P($P($T(@("REGS+"_RORI_"^RORP027")),";;",2),U) Q:RORREG="" D
  1. . S REGIEN=$$REGIEN^RORUTL02(RORREG)
  1. . I REGIEN>0 D
  1. .. F RORI1=1:1 S RORDATA=$P($T(@("LISTITEM+"_RORI1_"^RORP027")),";;",2) Q:RORDATA="" D
  1. ... Q:$D(^ROR(799.1,"KEY",+$P(RORDATA,U,2),REGIEN,+$P(RORDATA,U,3))) ; Entry already exists
  1. ... K RORFDA,RORMSG,RORERR,DIERR
  1. ... S RORFDA(799.1,"?+1,",.01)=$P(RORDATA,U)
  1. ... S RORFDA(799.1,"?+1,",.02)=$P(RORDATA,U,2)
  1. ... S RORFDA(799.1,"?+1,",.03)=REGIEN
  1. ... S RORFDA(799.1,"?+1,",.04)=$P(RORDATA,U,3)
  1. ... D UPDATE^DIE(,"RORFDA",,"RORMSG")
  1. ... I $G(DIERR) D
  1. .... K RORERR
  1. .... S RORERR(1)=" New entry for "_RORREG_"(ien #"_REGIEN_") encountered the following error"
  1. .... S RORERR(2)=" and was not added to the ROR LIST ITEM file."
  1. .... S RORERR(3)=" (Data = "_RORDATA_")"
  1. .... S RORERR(4)=" Please report this error to your CCR contact:"
  1. .... S RORERR(5)=""
  1. .... S Z=0,CT=5 F S Z=$O(RORMSG("DIERR",1,"TEXT",Z)) Q:'Z S CT=CT+1,RORERR(CT)=$J("",6)_$G(RORMSG("DIERR",1,"TEXT",Z))
  1. .... D MES^XPDUTL(.RORERR)
  1. Q
  1. ;
  1. REGS ; List of registries whose LIST ITEM entries should be added to file 799.1
  1. ;;VA ALS
  1. ;;VA APNEA
  1. ;;VA COLORECTAL CANCER
  1. ;;VA HCC
  1. ;;VA LUNG CANCER
  1. ;;VA MELANOMA
  1. ;;VA OSTEOPOROSIS
  1. ;;VA PANCREATIC CANCER
  1. ;;VA PROSTATE CANCER
  1. ;;
  1. ;
  1. LISTITEM ; Entries to add to file 799.1 text^group^code
  1. ;;eGFR by CKD-EPI^7^3
  1. ;;eGFR by MDRD^7^2
  1. ;;Creatinine clearance by Cockcroft-Gault^7^1
  1. ;;FIB-4^6^4
  1. ;;APRI^6^3
  1. ;;MELD-Na^6^2
  1. ;;MELD^6^1
  1. ;;BMI^5^1
  1. ;;Registry Lab^3^1
  1. ;;