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

BSDX2E.m

Go to the documentation of this file.
  1. BSDX2E ;IHS/OIT/MJL - ENVIRONMENT CHECK FOR WINDOWS SCHEDULING [ 08/22/2007 12:17 PM ]
  1. ;;2.0;IHS WINDOWS SCHEDULING;;NOV 01, 2007
  1. ;
  1. S LINE="",$P(LINE,"*",81)=""
  1. S XPDNOQUE="NO QUE" ;NO QUEUING ALLOWED
  1. S XPDABORT=0
  1. I '$G(DUZ) D SORRY("DUZ UNDEFINED OR 0") Q
  1. ;
  1. I '$L($G(DUZ(0))) D SORRY("DUZ(0) UNDEFINED OR NULL") Q
  1. ;
  1. D HOME^%ZIS,DT^DICRW
  1. S X=$P($G(^VA(200,DUZ,0)),U)
  1. I $G(X)="" W !,$$C^XBFUNC("Who are you????") D SORRY("Unknown User") Q
  1. ;
  1. VERSION ;
  1. W !,$$C^XBFUNC("Hello, "_$P(X,",",2)_" "_$P(X,","))
  1. W !!,$$C^XBFUNC("Checking Environment for Install of Version "_$P($T(+2),";",3)_" of "_$P($T(+2),";",4)_".")
  1. ;
  1. Q:'$$VERCHK("VA FILEMAN",22)
  1. Q:'$$VERCHK("KERNEL",8)
  1. ;Is the PIMS requirement present?
  1. Q:'$$VERCHK("PIMS",5.3)
  1. Q:'$$PATCHCK("PIMS*5.3*1003") D
  1. Q:'$$VERCHK("BMX",2.0)
  1. ;
  1. OTHER ;
  1. ;Other checks
  1. ;
  1. ENVOK ; If this is just an environ check, end here.
  1. W !!,$$C^XBFUNC("ENVIRONMENT OK.")
  1. ;
  1. ; The following line prevents the "Disable Options..." and "Move
  1. ; Routines..." questions from being asked during the install.
  1. I $G(XPDENV)=1 S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
  1. ;
  1. ;
  1. ;VERIFY BACKUPS HAVE BEEN DONE
  1. ;W !!
  1. ;S DIR(0)="Y"
  1. ;S DIR("B")="NO"
  1. ;S DIR("A")="Has a SUCCESSFUL system backup been performed??"
  1. ;D ^DIR
  1. ;I $D(DIRUT)!($G(Y)=0) S XPDABORT=1 S XPX="BACKUP" D SORRY Q
  1. ;S ^TMP("BPCPRE",$J,"BACKUPS CONFIRMED BY "_DUZ)=$H
  1. ;
  1. Q
  1. ;
  1. VERCHK(XPXPKG,XVRMIN) ;
  1. S X=$$VERSION^XPDUTL(XPXPKG)
  1. W !!,$$C^XBFUNC("Need at least "_XPXPKG_" "_XVRMIN_"....."_XPXPKG_" "_$S(X'="":X,1:"Is Not")_" Present")
  1. I X<XVRMIN D SORRY(XPXPKG_" "_XVRMIN_" Is Not Installed") Q 0
  1. Q 1
  1. ;
  1. PATCHCK(XPXPCH) ;
  1. S X=$$PATCH^XPDUTL(XPXPCH)
  1. W !!,$$C^XBFUNC("Need "_XPXPCH_"....."_XPXPCH_" "_$S(X:"Is",1:"Is Not")_" Present")
  1. Q X
  1. ;
  1. V0200 ;EP Version 2.0 PostInit
  1. ;Add Protocol items to BSDAM APPOINTMENT EVENTS protocol
  1. ;
  1. N BSDXDA,BSDXFDA,BSDXDA1,BSDXSEQ,BSDXDAT,BSDXNOD,BSDXIEN,BSDXMSG
  1. S BSDXDA=$O(^ORD(101,"B","BSDAM APPOINTMENT EVENTS",0))
  1. Q:'+BSDXDA
  1. S BSDXDAT="BSDX ADD APPOINTMENT;10.2^BSDX CANCEL APPOINTMENT;10.4^BSDX CHECKIN APPOINTMENT;10.6^BSDX NOSHOW APPOINTMENT;10.8"
  1. F J=1:1:$L(BSDXDAT,U) D
  1. . K BSDXIEN,BSDXMSG,BSDXFDA
  1. . S BSDXNOD=$P(BSDXDAT,U,J)
  1. . S BSDXDA1=$P(BSDXNOD,";")
  1. . S BSDXSEQ=$P(BSDXNOD,";",2)
  1. . S BSDXDA1=$O(^ORD(101,"B",BSDXDA1,0))
  1. . Q:'+BSDXDA1
  1. . Q:$D(^ORD(101,BSDXDA,10,"B",BSDXDA1))
  1. . S BSDXFDA(101.01,"+1,"_BSDXDA_",",".01")=BSDXDA1
  1. . S BSDXFDA(101.01,"+1,"_BSDXDA_",","3")=BSDXSEQ
  1. . D UPDATE^DIE("","BSDXFDA","BSDXIEN","BSDXMSG")
  1. . Q
  1. Q
  1. ;
  1. SORRY(XPX) ;
  1. K DIFQ
  1. S XPDABORT=1,XPDBLD=$O(^XTMP("XPDI",XPDA,"BLD",0))
  1. W !,$$C^XBFUNC($P(^XTMP("XPDI",XPDST,"BLD",XPDBLD,0),U,1)_" "_$P(^XTMP("XPDI",XPDST,"BLD",XPDBLD,0),U,2)_" Cannot Be Installed!")
  1. W !,$$C^XBFUNC("Reason: "_XPX_".")
  1. W *7,!!!,$$C^XBFUNC("Sorry....something is wrong with your environment")
  1. W !,$$C^XBFUNC("Aborting "_XPDNM_" install!")
  1. W !,$$C^XBFUNC("Correct error and reinstall otherwise")
  1. W !,$$C^XBFUNC("please print/capture this screen and notify")
  1. W !,$$C^XBFUNC("the Help Desk")
  1. W !!,LINE
  1. D BMES^XPDUTL("Sorry....something is wrong with your environment")
  1. D BMES^XPDUTL("Enviroment ERROR "_$G(XPX))
  1. D BMES^XPDUTL("Aborting "_XPDNM_" install!")
  1. D BMES^XPDUTL("Correct error and reinstall otherwise")
  1. D BMES^XPDUTL("please print/capture this screen and notify")
  1. D BMES^XPDUTL("the Help Desk")
  1. Q
  1. ;