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