SCMSPEN ;ALB/JRP - AMB CARE ENVIRONMENT CHECKER;04-JUN-96
;;5.3;Scheduling;**44,1015**;AUG 13, 1993;Build 21
CHKENV ;Main entry point for environment checker
;Input : All variables set by KIDS
;Output : Variables required by KIDS to denote success or failure
; of environment check (XPDQUIT and XPDABORT)
;
;Declare variables
N VERSION,PATCHED,NODE,PTR,NAME
W !!,">>> Beginning environment check",!!
;Check for installation of PCE version 1.0 - required for install
W !!," Checking for installation of PCE version 1.0 ..."
S VERSION=$$VERSION^XPDUTL("PX")
I ((+VERSION)<1) D
.W !!," *** Required element missing ***",!
.W !," Installation of Ambulatory Care requires that PCE version"
.W !," 1.0 be installed - you have version ",VERSION," installed."
.W !," Installation will be aborted at end of environment check."
.W !
.S XPDABORT=2
;Check for installation of HL7 version 1.6 - required for install
W !!," Checking for installation of HL7 version 1.6 ..."
S VERSION=+$$VERSION^XPDUTL("HL")
I (VERSION<1.6) D
.W !!," *** Required element missing ***",!
.W !," Installation of Ambulatory Care requires that HL7 version"
.W !," 1.6 be installed - you have version ",VERSION," installed."
.W !," Installation will be aborted at end of environment check."
.W !
.S XPDABORT=2
;Check for installation of XU*8.0*27 - required for install
W !!," Checking for installation of patch XU*8.0*27 ..."
S PATCHED=$$PATCH^XPDUTL("XU*8.0*27")
I ('PATCHED) D
.W !!," *** Required element missing ***",!
.W !," Installation of Ambulatory Care requires that Kernel patch"
.W !," XU*8.0*27 be installed. Install will be aborted at end of"
.W !," environment check."
.W !
.S XPDABORT=2
;Check for installation of HL*1.6*8 - required for install
W !!," Checking for installation of patch HL*1.6*8 ..."
S PATCHED=$$PATCH^XPDUTL("HL*1.6*8")
I ('PATCHED) D
.W !!," *** Required element missing ***",!
.W !," Installation of Ambulatory Care requires that HL7 patch"
.W !," HL*1.6*8 be installed. Install will be aborted at end of"
.W !," environment check."
.W !
.S XPDABORT=2
;Check for installation of IB*2.0*60 - required for install
W !!," Checking for installation of patch IB*2.0*60 ..."
S PATCHED=$$PATCH^XPDUTL("IB*2.0*60")
I ('PATCHED) D
.W !!," *** Required element missing ***",!
.W !," Installation of Ambulatory Care requires that Integrated"
.W !," Billing patch IB*2.O*60 be installed. Install will be aborted"
.W !," at end of environment check."
.W !
.S XPDABORT=2
;Check for existance of Q-ACS.MED.VA.GOV domain - required for install
W !!," Checking for existance of Q-ACS.MED.VA.GOV domain ..."
I ('$O(^DIC(4.2,"B","Q-ACS.MED.VA.GOV",0))) D
.W !!," *** Required element missing ***",!
.W !," Installation of Ambulatory Care requires that the domain"
.W !," Q-ACS.MED.VA.GOV be defined. Install will be aborted at end"
.W !," of environment check."
.W !
.S XPDABORT=2
;Check for installation of PCMM - not required for install but
; causes a problem if installed after Amb Care
W !!," Checking for installation of patch SD*5.3*41 (PCMM) ..."
S PATCHED=$$PATCH^XPDUTL("SD*5.3*41")
I ('PATCHED) D
.W !!," *** Warning ***",!
.W !," Primary Care Management Module (SD*5.3*41) has not been"
.W !," installed. After installing PCMM, call the routine SCMSP"
.W !," at the line tag SDM (i.e. D SDM^SCMSP) in order to install"
.W !," a version of routine SDM with the ACRP & PCMM changes"
.W !," applied to it."
.W !
;Check for installation of RA*4.5*4 - not required for install but
; loose workload credit if not installed
W !!," Checking for installation of patch RA*4.5*4 ..."
S PATCHED=$$PATCH^XPDUTL("RA*4.5*4")
I ('PATCHED) D
.W !!," *** Warning ***",!
.W !," Radiology patch RA*4.5*4 has not been installed. This patch"
.W !," must be installed in order for all workload credit to be"
.W !," reported."
.W !
;Check for installation of LR*5.2*127 - not required for install but
; loose workload credit if not installed
W !!," Checking for installation of patch LR*5.2*127 ..."
S PATCHED=$$PATCH^XPDUTL("LR*5.2*127")
I ('PATCHED) D
.W !!," *** Warning ***",!
.W !," Lab patch LR*5.2*127 has not been installed. This patch must"
.W !," be installed in order for all workload credit to be reported."
.W !
;Check for installation of SOW*3*42 - not required for install but
; loose ability to correctly transmit homeless indicator
W !!," Checking for installation of patch SOW*3*42 ..."
S PATCHED=$$PATCH^XPDUTL("SOW*3*42")
I ('PATCHED) D
.;Don't have it listed in patch history (pre KIDS patch) - check for
.; existance of line tag used by VAFHLZPD
.Q:($T(HOMELESS^SOWKHIRM)'="")
.W !!," *** Warning ***",!
.W !," Social Work patch SOW*3*42 has not been installed. This"
.W !," patch must be installed in order to correctly report whether"
.W !," a patient is homeless or not."
.W !
;Check for entry in OPC GENERATE MAIL GROUP field (#216) of the
; MAS PARAMETERS file (#43) - not required for install but is used
; during pre/post-init
W !!," Checking MAS PARAMETER file for OPC mail group ..."
;Get node value is stored on
S NODE=$G(^DG(43,1,"SCLR"))
;Get pointer
S PTR=+$P(NODE,"^",16)
;Get name of Mail Group
S NODE=$G(^XMB(3.8,PTR,0))
S NAME=$P(NODE,"^",1)
I (NAME="") D
.W !!," *** Warning ***",!
.W !," The OPC GENERATE MAIL GROUP field (#216) of the MAS PARAMETERS"
.W !," file (#43) does not contain a valid mail group. The mail group"
.W !," stored in this field is attached to entries that will be created"
.W !," in the HL APPLICATION file (#771) and BULLETIN file (#3.8)."
.W !
;End of environment check
W !!!,">>> Environment check completed"
;Write abort message (if appropriate)
I (+$G(XPDABORT)) D
.W !!,"*** Element(s) critical to installation of Ambulatory Care are missing"
.W !,"*** Installation will be aborted"
.W !
;Write A-OK message (if appropriate)
W:('$G(XPDABORT)) !!,"Installation will proceed as planned",!!
;Done
Q
SCMSPEN ;ALB/JRP - AMB CARE ENVIRONMENT CHECKER;04-JUN-96
+1 ;;5.3;Scheduling;**44,1015**;AUG 13, 1993;Build 21
CHKENV ;Main entry point for environment checker
+1 ;Input : All variables set by KIDS
+2 ;Output : Variables required by KIDS to denote success or failure
+3 ; of environment check (XPDQUIT and XPDABORT)
+4 ;
+5 ;Declare variables
+6 NEW VERSION,PATCHED,NODE,PTR,NAME
+7 WRITE !!,">>> Beginning environment check",!!
+8 ;Check for installation of PCE version 1.0 - required for install
+9 WRITE !!," Checking for installation of PCE version 1.0 ..."
+10 SET VERSION=$$VERSION^XPDUTL("PX")
+11 IF ((+VERSION)<1)
Begin DoDot:1
+12 WRITE !!," *** Required element missing ***",!
+13 WRITE !," Installation of Ambulatory Care requires that PCE version"
+14 WRITE !," 1.0 be installed - you have version ",VERSION," installed."
+15 WRITE !," Installation will be aborted at end of environment check."
+16 WRITE !
+17 SET XPDABORT=2
End DoDot:1
+18 ;Check for installation of HL7 version 1.6 - required for install
+19 WRITE !!," Checking for installation of HL7 version 1.6 ..."
+20 SET VERSION=+$$VERSION^XPDUTL("HL")
+21 IF (VERSION<1.6)
Begin DoDot:1
+22 WRITE !!," *** Required element missing ***",!
+23 WRITE !," Installation of Ambulatory Care requires that HL7 version"
+24 WRITE !," 1.6 be installed - you have version ",VERSION," installed."
+25 WRITE !," Installation will be aborted at end of environment check."
+26 WRITE !
+27 SET XPDABORT=2
End DoDot:1
+28 ;Check for installation of XU*8.0*27 - required for install
+29 WRITE !!," Checking for installation of patch XU*8.0*27 ..."
+30 SET PATCHED=$$PATCH^XPDUTL("XU*8.0*27")
+31 IF ('PATCHED)
Begin DoDot:1
+32 WRITE !!," *** Required element missing ***",!
+33 WRITE !," Installation of Ambulatory Care requires that Kernel patch"
+34 WRITE !," XU*8.0*27 be installed. Install will be aborted at end of"
+35 WRITE !," environment check."
+36 WRITE !
+37 SET XPDABORT=2
End DoDot:1
+38 ;Check for installation of HL*1.6*8 - required for install
+39 WRITE !!," Checking for installation of patch HL*1.6*8 ..."
+40 SET PATCHED=$$PATCH^XPDUTL("HL*1.6*8")
+41 IF ('PATCHED)
Begin DoDot:1
+42 WRITE !!," *** Required element missing ***",!
+43 WRITE !," Installation of Ambulatory Care requires that HL7 patch"
+44 WRITE !," HL*1.6*8 be installed. Install will be aborted at end of"
+45 WRITE !," environment check."
+46 WRITE !
+47 SET XPDABORT=2
End DoDot:1
+48 ;Check for installation of IB*2.0*60 - required for install
+49 WRITE !!," Checking for installation of patch IB*2.0*60 ..."
+50 SET PATCHED=$$PATCH^XPDUTL("IB*2.0*60")
+51 IF ('PATCHED)
Begin DoDot:1
+52 WRITE !!," *** Required element missing ***",!
+53 WRITE !," Installation of Ambulatory Care requires that Integrated"
+54 WRITE !," Billing patch IB*2.O*60 be installed. Install will be aborted"
+55 WRITE !," at end of environment check."
+56 WRITE !
+57 SET XPDABORT=2
End DoDot:1
+58 ;Check for existance of Q-ACS.MED.VA.GOV domain - required for install
+59 WRITE !!," Checking for existance of Q-ACS.MED.VA.GOV domain ..."
+60 IF ('$ORDER(^DIC(4.2,"B","Q-ACS.MED.VA.GOV",0)))
Begin DoDot:1
+61 WRITE !!," *** Required element missing ***",!
+62 WRITE !," Installation of Ambulatory Care requires that the domain"
+63 WRITE !," Q-ACS.MED.VA.GOV be defined. Install will be aborted at end"
+64 WRITE !," of environment check."
+65 WRITE !
+66 SET XPDABORT=2
End DoDot:1
+67 ;Check for installation of PCMM - not required for install but
+68 ; causes a problem if installed after Amb Care
+69 WRITE !!," Checking for installation of patch SD*5.3*41 (PCMM) ..."
+70 SET PATCHED=$$PATCH^XPDUTL("SD*5.3*41")
+71 IF ('PATCHED)
Begin DoDot:1
+72 WRITE !!," *** Warning ***",!
+73 WRITE !," Primary Care Management Module (SD*5.3*41) has not been"
+74 WRITE !," installed. After installing PCMM, call the routine SCMSP"
+75 WRITE !," at the line tag SDM (i.e. D SDM^SCMSP) in order to install"
+76 WRITE !," a version of routine SDM with the ACRP & PCMM changes"
+77 WRITE !," applied to it."
+78 WRITE !
End DoDot:1
+79 ;Check for installation of RA*4.5*4 - not required for install but
+80 ; loose workload credit if not installed
+81 WRITE !!," Checking for installation of patch RA*4.5*4 ..."
+82 SET PATCHED=$$PATCH^XPDUTL("RA*4.5*4")
+83 IF ('PATCHED)
Begin DoDot:1
+84 WRITE !!," *** Warning ***",!
+85 WRITE !," Radiology patch RA*4.5*4 has not been installed. This patch"
+86 WRITE !," must be installed in order for all workload credit to be"
+87 WRITE !," reported."
+88 WRITE !
End DoDot:1
+89 ;Check for installation of LR*5.2*127 - not required for install but
+90 ; loose workload credit if not installed
+91 WRITE !!," Checking for installation of patch LR*5.2*127 ..."
+92 SET PATCHED=$$PATCH^XPDUTL("LR*5.2*127")
+93 IF ('PATCHED)
Begin DoDot:1
+94 WRITE !!," *** Warning ***",!
+95 WRITE !," Lab patch LR*5.2*127 has not been installed. This patch must"
+96 WRITE !," be installed in order for all workload credit to be reported."
+97 WRITE !
End DoDot:1
+98 ;Check for installation of SOW*3*42 - not required for install but
+99 ; loose ability to correctly transmit homeless indicator
+100 WRITE !!," Checking for installation of patch SOW*3*42 ..."
+101 SET PATCHED=$$PATCH^XPDUTL("SOW*3*42")
+102 IF ('PATCHED)
Begin DoDot:1
+103 ;Don't have it listed in patch history (pre KIDS patch) - check for
+104 ; existance of line tag used by VAFHLZPD
+105 IF ($TEXT(HOMELESS^SOWKHIRM)'="")
QUIT
+106 WRITE !!," *** Warning ***",!
+107 WRITE !," Social Work patch SOW*3*42 has not been installed. This"
+108 WRITE !," patch must be installed in order to correctly report whether"
+109 WRITE !," a patient is homeless or not."
+110 WRITE !
End DoDot:1
+111 ;Check for entry in OPC GENERATE MAIL GROUP field (#216) of the
+112 ; MAS PARAMETERS file (#43) - not required for install but is used
+113 ; during pre/post-init
+114 WRITE !!," Checking MAS PARAMETER file for OPC mail group ..."
+115 ;Get node value is stored on
+116 SET NODE=$GET(^DG(43,1,"SCLR"))
+117 ;Get pointer
+118 SET PTR=+$PIECE(NODE,"^",16)
+119 ;Get name of Mail Group
+120 SET NODE=$GET(^XMB(3.8,PTR,0))
+121 SET NAME=$PIECE(NODE,"^",1)
+122 IF (NAME="")
Begin DoDot:1
+123 WRITE !!," *** Warning ***",!
+124 WRITE !," The OPC GENERATE MAIL GROUP field (#216) of the MAS PARAMETERS"
+125 WRITE !," file (#43) does not contain a valid mail group. The mail group"
+126 WRITE !," stored in this field is attached to entries that will be created"
+127 WRITE !," in the HL APPLICATION file (#771) and BULLETIN file (#3.8)."
+128 WRITE !
End DoDot:1
+129 ;End of environment check
+130 WRITE !!!,">>> Environment check completed"
+131 ;Write abort message (if appropriate)
+132 IF (+$GET(XPDABORT))
Begin DoDot:1
+133 WRITE !!,"*** Element(s) critical to installation of Ambulatory Care are missing"
+134 WRITE !,"*** Installation will be aborted"
+135 WRITE !
End DoDot:1
+136 ;Write A-OK message (if appropriate)
+137 IF ('$GET(XPDABORT))
WRITE !!,"Installation will proceed as planned",!!
+138 ;Done
+139 QUIT