source: Scheduling/trunk/m/BSDX11.m@ 1386

Last change on this file since 1386 was 1187, checked in by Sam Habiel, 13 years ago

Changes to BSDX01 to prevent Scheduled,dc'ed,completed radiology appointments from being cancelled. Updated files to T2.

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