BEDD2P02 ;GDIT/HS/BEE-BEDD VERSION 2.0 Patch 2 ENV/PST ROUTINE ; 08 Nov 2011 12:00 PM
;;2.0;BEDD DASHBOARD;**2**;Jun 04, 2014;Build 26
;
NEW VERSION,X
;
;Check for AMER*3.0*9
I '$$INSTALLD("AMER*3.0*9") D BMES^XPDUTL("Version 3.0 Patch 9 of AMER is required!") S XPDQUIT=2 Q
;
;Check for BEDD*2.0*1
I '$$INSTALLD("BEDD*2.0*1") D BMES^XPDUTL("Version 2.0 Patch 1 of BEDD is required!") S XPDQUIT=2 Q
;
;Check for the XML build
I $T(XML^BEDD2X02)="" D BMES^XPDUTL("The BEDD XML build bedd0200.02.xml must first be installed!") S XPDQUIT=2 Q
;
;Check for the VUECENTRIC FRAMEWORK
I $T(DEVICE^CIAVUTIO)="" D BMES^XPDUTL("Version 1.1V2 of the VUECENTRIC FRAMEWORK must first be installed!") S XPDQUIT=2 Q
;
Q
;
ENT ;Post install entry point
;
NEW SC,EXEC
;Rebuild the new index
S EXEC="S SC=##class(BEDD.EDSYSTEM).%BuildIndices()" X EXEC
;
;Force recompile of project
D $SYSTEM.OBJ.CompileProject("bedd0200","k-u")
D $SYSTEM.OBJ.CompileProject("bedd0200p1","k-u")
D $SYSTEM.OBJ.CompileProject("bedd0200p2","k-u")
D $SYSTEM.OBJ.CompileList("csp/bedd/BEDD*.csp","k-u")
;
PCC ;Update PCC+ protocol to ignore BEDD Admit requests
;
N X,IEN
;
;Quit if protocol isn't installed
S X="VEN PRINT PCC+ ENCOUNTER FORM"
I '$D(^ORD(101,"B",X)) Q
S IEN=$O(^ORD(101,"B",X,"")) I IEN="" Q
;
;Update the entry action
S ^ORD(101,IEN,20)="I $G(SDAMEVT)=4,'$G(BEDDADM),$D(^XUSEC(""VENZPRINT"",DUZ)) D SC53^VENPCCX($G(BSDVSTN),$G(BSDVCN),$G(SDT))"
;
Q
;
INSTALLD(BEDDSTAL) ;EP - Determine if patch BEDDSTAL was installed, where
;BEDDSTAL is the name of the INSTALL. E.g "AMER*3.0*9"
;
NEW DIC,X,Y,D
S X=$P(BEDDSTAL,"*",1)
S DIC="^DIC(9.4,",DIC(0)="FM",D="C"
D IX^DIC
I Y<1 Q 0
S DIC=DIC_+Y_",22,",X=$P(BEDDSTAL,"*",2)
D ^DIC
I Y<1 Q 0
S DIC=DIC_+Y_",""PAH"",",X=$P(BEDDSTAL,"*",3)
D ^DIC
Q $S(Y<1:0,1:1)
BEDD2P02 ;GDIT/HS/BEE-BEDD VERSION 2.0 Patch 2 ENV/PST ROUTINE ; 08 Nov 2011 12:00 PM
+1 ;;2.0;BEDD DASHBOARD;**2**;Jun 04, 2014;Build 26
+2 ;
+3 NEW VERSION,X
+4 ;
+5 ;Check for AMER*3.0*9
+6 IF '$$INSTALLD("AMER*3.0*9")
DO BMES^XPDUTL("Version 3.0 Patch 9 of AMER is required!")
SET XPDQUIT=2
QUIT
+7 ;
+8 ;Check for BEDD*2.0*1
+9 IF '$$INSTALLD("BEDD*2.0*1")
DO BMES^XPDUTL("Version 2.0 Patch 1 of BEDD is required!")
SET XPDQUIT=2
QUIT
+10 ;
+11 ;Check for the XML build
+12 IF $TEXT(XML^BEDD2X02)=""
DO BMES^XPDUTL("The BEDD XML build bedd0200.02.xml must first be installed!")
SET XPDQUIT=2
QUIT
+13 ;
+14 ;Check for the VUECENTRIC FRAMEWORK
+15 IF $TEXT(DEVICE^CIAVUTIO)=""
DO BMES^XPDUTL("Version 1.1V2 of the VUECENTRIC FRAMEWORK must first be installed!")
SET XPDQUIT=2
QUIT
+16 ;
+17 QUIT
+18 ;
ENT ;Post install entry point
+1 ;
+2 NEW SC,EXEC
+3 ;Rebuild the new index
+4 SET EXEC="S SC=##class(BEDD.EDSYSTEM).%BuildIndices()"
XECUTE EXEC
+5 ;
+6 ;Force recompile of project
+7 DO $SYSTEM.OBJ.CompileProject("bedd0200","k-u")
+8 DO $SYSTEM.OBJ.CompileProject("bedd0200p1","k-u")
+9 DO $SYSTEM.OBJ.CompileProject("bedd0200p2","k-u")
+10 DO $SYSTEM.OBJ.CompileList("csp/bedd/BEDD*.csp","k-u")
+11 ;
PCC ;Update PCC+ protocol to ignore BEDD Admit requests
+1 ;
+2 NEW X,IEN
+3 ;
+4 ;Quit if protocol isn't installed
+5 SET X="VEN PRINT PCC+ ENCOUNTER FORM"
+6 IF '$DATA(^ORD(101,"B",X))
QUIT
+7 SET IEN=$ORDER(^ORD(101,"B",X,""))
IF IEN=""
QUIT
+8 ;
+9 ;Update the entry action
+10 SET ^ORD(101,IEN,20)="I $G(SDAMEVT)=4,'$G(BEDDADM),$D(^XUSEC(""VENZPRINT"",DUZ)) D SC53^VENPCCX($G(BSDVSTN),$G(BSDVCN),$G(SDT))"
+11 ;
+12 QUIT
+13 ;
INSTALLD(BEDDSTAL) ;EP - Determine if patch BEDDSTAL was installed, where
+1 ;BEDDSTAL is the name of the INSTALL. E.g "AMER*3.0*9"
+2 ;
+3 NEW DIC,X,Y,D
+4 SET X=$PIECE(BEDDSTAL,"*",1)
+5 SET DIC="^DIC(9.4,"
SET DIC(0)="FM"
SET D="C"
+6 DO IX^DIC
+7 IF Y<1
QUIT 0
+8 SET DIC=DIC_+Y_",22,"
SET X=$PIECE(BEDDSTAL,"*",2)
+9 DO ^DIC
+10 IF Y<1
QUIT 0
+11 SET DIC=DIC_+Y_",""PAH"","
SET X=$PIECE(BEDDSTAL,"*",3)
+12 DO ^DIC
+13 QUIT $SELECT(Y<1:0,1:1)