AQALPOST ; IHS/ORDC/LJF - SET UP MAS/QI EVENT DRIVER LINKS ;
;;1;QI LINKAGES-RPMS;;AUG 15, 1994
;
;This routine adds the option AQAL ADT EVENT to Protocol file.
;Then it will add the protocol AQAL ADT EVENT to the MAS event
;driver protocol entry if MAS 5 has been installed.
;
I '$$MAS5 W !!,*7,"MAS5 NOT INSTALLED, BYPASSING POSTINIT!",!! Q
D 1,2,QUIT Q
;
1 ; >> step 1: add aqal option to file 101
S AQALOPT=$O(^DIC(19,"B","AQAL ADT EVENT",0))
I AQALOPT="" D Q
.W !!,*7,"**ERROR!! Option AQAL ADT EVENT was not filed!**"
.W !,"Contact developer immediately!!",!!,*7
S X="ORV19" X ^%ZOSF("TEST") I '$T D Q
.W !!,*7,"**ERROR!! Routine ^ORV19 not in this UCI!"
.W !,"Should have been installed with MAS version 5.0."
.W !,"Contact developer immediately!!",!!,*7
S X="AQAL" D EN^ORV19 ;moves options to file 101
Q
;
2 ; >> step 2: add aqal protocol to mas event driver
Q:AQALOPT=""
S Y=+$O(^ORD(101,"B","DGPM MOVEMENT EVENTS",0))
I 'Y D Q
.W !!,*7,"**ERROR!! Protocol DGPM MOVEMENT EVENTS does not exist!"
.W !!,"Contact developer immediately!!",!!,*7
I '$D(^ORD(101,Y,10,0)) S ^(0)="^101.01PA^^"
S X="AQAL ADT EVENT",DA(1)=Y,DIC="^ORD(101,"_DA(1)_",10,"
S DLAYGO=101,DIC(0)="L",DIC("DR")="3////2" D ^DIC K DIC,DLAYGO
W !!,"Adding AQAL ADT EVENT to DGPM MOVEMENT EVENTS protocol. . ."
W !!
Q
;
QUIT ; >> eoj
K AQALOPT D ^XBFMK Q
;
;
MAS5() ;EXTRN VAR to see if MAS version 5 has been installed
N X,Y S (X,Y)=0
F S X=$O(^DIC(9.4,"C","DG",X)) Q:X="" D
.I $G(^DIC(9.4,X,"VERSION"))'<5 S Y=1 ;v5 is installed
Q Y
AQALPOST ; IHS/ORDC/LJF - SET UP MAS/QI EVENT DRIVER LINKS ;
+1 ;;1;QI LINKAGES-RPMS;;AUG 15, 1994
+2 ;
+3 ;This routine adds the option AQAL ADT EVENT to Protocol file.
+4 ;Then it will add the protocol AQAL ADT EVENT to the MAS event
+5 ;driver protocol entry if MAS 5 has been installed.
+6 ;
+7 IF '$$MAS5
WRITE !!,*7,"MAS5 NOT INSTALLED, BYPASSING POSTINIT!",!!
QUIT
+8 DO 1
DO 2
DO QUIT
QUIT
+9 ;
1 ; >> step 1: add aqal option to file 101
+1 SET AQALOPT=$ORDER(^DIC(19,"B","AQAL ADT EVENT",0))
+2 IF AQALOPT=""
Begin DoDot:1
+3 WRITE !!,*7,"**ERROR!! Option AQAL ADT EVENT was not filed!**"
+4 WRITE !,"Contact developer immediately!!",!!,*7
End DoDot:1
QUIT
+5 SET X="ORV19"
XECUTE ^%ZOSF("TEST")
IF '$TEST
Begin DoDot:1
+6 WRITE !!,*7,"**ERROR!! Routine ^ORV19 not in this UCI!"
+7 WRITE !,"Should have been installed with MAS version 5.0."
+8 WRITE !,"Contact developer immediately!!",!!,*7
End DoDot:1
QUIT
+9 ;moves options to file 101
SET X="AQAL"
DO EN^ORV19
+10 QUIT
+11 ;
2 ; >> step 2: add aqal protocol to mas event driver
+1 IF AQALOPT=""
QUIT
+2 SET Y=+$ORDER(^ORD(101,"B","DGPM MOVEMENT EVENTS",0))
+3 IF 'Y
Begin DoDot:1
+4 WRITE !!,*7,"**ERROR!! Protocol DGPM MOVEMENT EVENTS does not exist!"
+5 WRITE !!,"Contact developer immediately!!",!!,*7
End DoDot:1
QUIT
+6 IF '$DATA(^ORD(101,Y,10,0))
SET ^(0)="^101.01PA^^"
+7 SET X="AQAL ADT EVENT"
SET DA(1)=Y
SET DIC="^ORD(101,"_DA(1)_",10,"
+8 SET DLAYGO=101
SET DIC(0)="L"
SET DIC("DR")="3////2"
DO ^DIC
KILL DIC,DLAYGO
+9 WRITE !!,"Adding AQAL ADT EVENT to DGPM MOVEMENT EVENTS protocol. . ."
+10 WRITE !!
+11 QUIT
+12 ;
QUIT ; >> eoj
+1 KILL AQALOPT
DO ^XBFMK
QUIT
+2 ;
+3 ;
MAS5() ;EXTRN VAR to see if MAS version 5 has been installed
+1 NEW X,Y
SET (X,Y)=0
+2 FOR
SET X=$ORDER(^DIC(9.4,"C","DG",X))
IF X=""
QUIT
Begin DoDot:1
+3 ;v5 is installed
IF $GET(^DIC(9.4,X,"VERSION"))'<5
SET Y=1
End DoDot:1
+4 QUIT Y