source: Scheduling/trunk/m/BSDX2E.m@ 832

Last change on this file since 832 was 614, checked in by Sam Habiel, 15 years ago

Initial committ of scheduling package

File size: 3.2 KB
Line 
1BSDX2E ;IHS/OIT/MJL - ENVIRONMENT CHECK FOR WINDOWS SCHEDULING [ 08/22/2007 12:17 PM ]
2 ;;2.0;IHS WINDOWS SCHEDULING;;NOV 01, 2007
3 ;
4 S LINE="",$P(LINE,"*",81)=""
5 S XPDNOQUE="NO QUE" ;NO QUEUING ALLOWED
6 S XPDABORT=0
7 I '$G(DUZ) D SORRY("DUZ UNDEFINED OR 0") Q
8 ;
9 I '$L($G(DUZ(0))) D SORRY("DUZ(0) UNDEFINED OR NULL") Q
10 ;
11 D HOME^%ZIS,DT^DICRW
12 S X=$P($G(^VA(200,DUZ,0)),U)
13 I $G(X)="" W !,$$C^XBFUNC("Who are you????") D SORRY("Unknown User") Q
14 ;
15VERSION ;
16 W !,$$C^XBFUNC("Hello, "_$P(X,",",2)_" "_$P(X,","))
17 W !!,$$C^XBFUNC("Checking Environment for Install of Version "_$P($T(+2),";",3)_" of "_$P($T(+2),";",4)_".")
18 ;
19 Q:'$$VERCHK("VA FILEMAN",22)
20 Q:'$$VERCHK("KERNEL",8)
21 Q:'$$VERCHK("XB",3)
22 ;Is the PIMS requirement present?
23 Q:'$$VERCHK("SD",5.3)
24 ; Q:'$$PATCHCK("PIMS*5.3*1003") D
25 Q:'$$VERCHK("BMX",2)
26 ;
27OTHER ;
28 ;Other checks
29 ;
30ENVOK ; If this is just an environ check, end here.
31 W !!,$$C^XBFUNC("ENVIRONMENT OK.")
32 ;
33 ; The following line prevents the "Disable Options..." and "Move
34 ; Routines..." questions from being asked during the install.
35 I $G(XPDENV)=1 S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
36 ;
37 ;
38 ;VERIFY BACKUPS HAVE BEEN DONE
39 ;W !!
40 ;S DIR(0)="Y"
41 ;S DIR("B")="NO"
42 ;S DIR("A")="Has a SUCCESSFUL system backup been performed??"
43 ;D ^DIR
44 ;I $D(DIRUT)!($G(Y)=0) S XPDABORT=1 S XPX="BACKUP" D SORRY Q
45 ;S ^TMP("BPCPRE",$J,"BACKUPS CONFIRMED BY "_DUZ)=$H
46 ;
47 Q
48 ;
49VERCHK(XPXPKG,XVRMIN) ;
50 S X=$$VERSION^XPDUTL(XPXPKG)
51 W !!,$$C^XBFUNC("Need at least "_XPXPKG_" "_XVRMIN_"....."_XPXPKG_" "_$S(X'="":X,1:"Is Not")_" Present")
52 I X<XVRMIN D SORRY(XPXPKG_" "_XVRMIN_" Is Not Installed") Q 0
53 Q 1
54 ;
55PATCHCK(XPXPCH) ;
56 S X=$$PATCH^XPDUTL(XPXPCH)
57 W !!,$$C^XBFUNC("Need "_XPXPCH_"....."_XPXPCH_" "_$S(X:"Is",1:"Is Not")_" Present")
58 Q X
59 ;
60V0200 ;EP Version 2.0 PostInit
61 ;Add Protocol items to SDAM APPOINTMENT EVENTS protocol
62 ;
63 N BSDXDA,BSDXFDA,BSDXDA1,BSDXSEQ,BSDXDAT,BSDXNOD,BSDXIEN,BSDXMSG
64 S BSDXDA=$O(^ORD(101,"B","SDAM APPOINTMENT EVENTS",0))
65 Q:'+BSDXDA
66 S BSDXDAT="BSDX ADD APPOINTMENT;10.2^BSDX CANCEL APPOINTMENT;10.4^BSDX CHECKIN APPOINTMENT;10.6^BSDX NOSHOW APPOINTMENT;10.8"
67 F J=1:1:$L(BSDXDAT,U) D
68 . K BSDXIEN,BSDXMSG,BSDXFDA
69 . S BSDXNOD=$P(BSDXDAT,U,J)
70 . S BSDXDA1=$P(BSDXNOD,";")
71 . S BSDXSEQ=$P(BSDXNOD,";",2)
72 . S BSDXDA1=$O(^ORD(101,"B",BSDXDA1,0))
73 . Q:'+BSDXDA1
74 . Q:$D(^ORD(101,BSDXDA,10,"B",BSDXDA1))
75 . S BSDXFDA(101.01,"+1,"_BSDXDA_",",".01")=BSDXDA1
76 . S BSDXFDA(101.01,"+1,"_BSDXDA_",","3")=BSDXSEQ
77 . D UPDATE^DIE("","BSDXFDA","BSDXIEN","BSDXMSG")
78 . Q
79 Q
80 ;
81SORRY(XPX) ;
82 K DIFQ
83 S XPDABORT=1
84 W !,$$C^XBFUNC($P($T(+2),";",3)_" of "_$P($T(+2),";",4)_" Cannot Be Installed!")
85 W !,$$C^XBFUNC("Reason: "_XPX_".")
86 W *7,!!!,$$C^XBFUNC("Sorry....something is wrong with your environment")
87 W !,$$C^XBFUNC("Aborting "_XPDNM_" install!")
88 W !,$$C^XBFUNC("Correct error and reinstall otherwise")
89 W !,$$C^XBFUNC("please print/capture this screen and notify")
90 W !,$$C^XBFUNC("technical support")
91 W !!,LINE
92 D BMES^XPDUTL("Sorry....something is wrong with your environment")
93 D BMES^XPDUTL("Enviroment ERROR "_$G(XPX))
94 D BMES^XPDUTL("Aborting "_XPDNM_" install!")
95 D BMES^XPDUTL("Correct error and reinstall otherwise")
96 D BMES^XPDUTL("please print/capture this screen and notify")
97 D BMES^XPDUTL("technical support")
98 Q
99 ;
Note: See TracBrowser for help on using the repository browser.