1 | BSDX11 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
|
---|
2 | ;;1.5;BSDX;;Jan 25, 2011
|
---|
3 | ;
|
---|
4 | ENV0100 ;EP Version 1.0 Environment check
|
---|
5 | I '$G(IOM) D HOME^%ZIS
|
---|
6 | I '$G(DUZ) W !,"DUZ UNDEFINED OR 0." D SORRY(2) Q
|
---|
7 | I '$L($G(DUZ(0))) W !,"DUZ(0) UNDEFINED OR NULL." D SORRY(2) Q
|
---|
8 | I '(DUZ(0)["@") W:'$D(ZTQUEUED) !,"DUZ(0) DOES NOT CONTAIN AN '@'." D SORRY(2) Q
|
---|
9 | S X=$$GET1^DIQ(200,DUZ,.01)
|
---|
10 | W !!,$$CJ^XLFSTR("Hello, "_$P(X,",",2)_" "_$P(X,","),IOM)
|
---|
11 | W !!,$$CJ^XLFSTR("Checking Environment...",IOM)
|
---|
12 | ;
|
---|
13 | ;is the PIMS requirement present?
|
---|
14 | I '$$INSTALLD("PIMS*5.3*1003") D
|
---|
15 | .D BMES^XPDUTL("Version 1.0 of the BSDX Package")
|
---|
16 | . D BMES^XPDUTL("Cannot Be Installed Unless")
|
---|
17 | . D BMES^XPDUTL("Patch 1003 of version 5.3 of the PIMS Package has been installed.")
|
---|
18 | . D SORRY(2)
|
---|
19 | . Q
|
---|
20 | ;is the BMX requirement present?
|
---|
21 | I '$$INSTALLD("BMX 1.0") D
|
---|
22 | .D BMES^XPDUTL("Version 1.0 of the BSDX Package")
|
---|
23 | . D BMES^XPDUTL("Cannot Be Installed Unless")
|
---|
24 | . D BMES^XPDUTL("version 1.0 of the BMX Package has been installed.")
|
---|
25 | . D SORRY(2)
|
---|
26 | . Q
|
---|
27 | Q
|
---|
28 | ;End Environment check
|
---|
29 | ;
|
---|
30 | V0100 ;EP Version 1.0 PostInit
|
---|
31 | ;Add Protocol items to BSDAM APPOINTMENT EVENTS protocol
|
---|
32 | ;
|
---|
33 | N BSDXDA,BSDXFDA,BSDXDA1,BSDXSEQ,BSDXDAT,BSDXNOD,BSDXIEN,BSDXMSG
|
---|
34 | S BSDXDA=$O(^ORD(101,"B","BSDAM APPOINTMENT EVENTS",0))
|
---|
35 | Q:'+BSDXDA
|
---|
36 | S BSDXDAT="BSDX ADD APPOINTMENT;10.2^BSDX CANCEL APPOINTMENT;10.4^BSDX CHECKIN APPOINTMENT;10.6^BSDX NOSHOW APPOINTMENT;10.8"
|
---|
37 | F J=1:1:$L(BSDXDAT,U) D
|
---|
38 | . K BSDXIEN,BSDXMSG,BSDXFDA
|
---|
39 | . S BSDXNOD=$P(BSDXDAT,U,J)
|
---|
40 | . S BSDXDA1=$P(BSDXNOD,";")
|
---|
41 | . S BSDXSEQ=$P(BSDXNOD,";",2)
|
---|
42 | . S BSDXDA1=$O(^ORD(101,"B",BSDXDA1,0))
|
---|
43 | . Q:'+BSDXDA1
|
---|
44 | . Q:$D(^ORD(101,BSDXDA,10,"B",BSDXDA1))
|
---|
45 | . S BSDXFDA(101.01,"+1,"_BSDXDA_",",".01")=BSDXDA1
|
---|
46 | . S BSDXFDA(101.01,"+1,"_BSDXDA_",","3")=BSDXSEQ
|
---|
47 | . D UPDATE^DIE("","BSDXFDA","BSDXIEN","BSDXMSG")
|
---|
48 | . Q
|
---|
49 | Q
|
---|
50 | ;
|
---|
51 | SORRY(X) ;
|
---|
52 | KILL DIFQ
|
---|
53 | S XPDQUIT=X
|
---|
54 | W *7,!,$$CJ^XLFSTR("Sorry....Please fix it.",IOM)
|
---|
55 | Q
|
---|
56 | ;
|
---|
57 | INSTALLD(BMXPKG) ;
|
---|
58 | ;Determine if BMXPKG is present.
|
---|
59 | Q 1
|
---|
60 | ;S BSDXFIN=$O(^XPD(9.7,"B","PIMS*5.3*1003",""))
|
---|
61 | S BSDXFIN=$O(^XPD(9.7,"B",BMXPKG,""))
|
---|
62 | I $G(BSDXFIN)="" Q 0
|
---|
63 | S BSDXSTAT=$P($G(^XPD(9.7,BSDXFIN,0)),U,9)
|
---|
64 | ;'0' Loaded from Distribution
|
---|
65 | ;'1' Queued for Install
|
---|
66 | ;'2' Start of Install
|
---|
67 | ;'3' Install Completed
|
---|
68 | ;'4' FOR De-Installed;
|
---|
69 | ;
|
---|
70 | I BSDXSTAT'=3 Q 0
|
---|
71 | Q 1
|
---|