XUINEND1 ;SF-ISC/STAFF - POSTINIT FOR KERNEL V7 ;4/15/93 12:33
;;7.1;KERNEL;;May 11, 1993
W !,"Don't call from top." Q
A5 ;Now to change your XUCOMMAND option. Please review."
G A5X:($$LKOPT("XUCOMMAND")'>0)
F XU1="XUUSERDISP","XUSEREDITSELF","XUUSERHELP","XU-SPL-MENU" S X=$$ITEMDEL("XUCOMMAND",XU1)
F XU1=1:1:3 S X=$$ADD("XUCOMMAND",$P("XUSERTOOLS^XQALERT^XUSERWHERE",U,XU1),$P("TBOX^VA^",U,XU1))
A5X ;Exit tag for A5
;
Q
;
ADD(MENU,OPT,SYN,ORD) ;EF. Add options to a menu
Q:$G(MENU)']"" 0 Q:$G(OPT)']"" 0 S SYN=$G(SYN),ORD=$G(ORD)
N X,XPD1,XPD2,XPD3,DIC,DA,D0,DR,DLAYGO S DLAYGO=19
S XPD1=$$LKOPT(MENU) Q:XPD1'>0 0 I $$TYPE(XPD1)'["M" Q 0
S DIC="^DIC(19,"_XPD1_",10,"
S XPD2=$$LKOPT(OPT) Q:XPD2'>0 0
I '$D(^DIC(19,XPD1,10,"B",XPD2)) S X=XPD2,(D0,DA(1))=XPD1,DIC(0)="MLF",DIC("P")=$P(^DD(19,10,0),"^",2) D FILE^DICN
S XPD3=$O(^DIC(19,XPD1,10,"B",XPD2,0))
I XPD3>0 S DR="" S:SYN]"" DR="2///"_SYN_";" S:ORD]"" DR=DR_"3///"_ORD I DR]"" S DIE=DIC,DA=XPD3,DA(1)=XPD1 D ^DIE
Q XPD3>0
LKOPT(X) ;EF. To lookup on "B"
Q $O(^DIC(19,"B",X,0))
TYPE(X) ;EF. Return option type, Pass IFN.
Q:X'>0 "" Q $P($G(^DIC(19,X,0)),"^",4)
ITEMDEL(MENU,OPT) ;EF. Delete item from menu.
N XPD1,XPD2,DIK,DA,X
Q:MENU']"" 0 Q:OPT']"" 0
S XPD1=$$LKOPT(MENU) Q:XPD1'>0 0 I $$TYPE(XPD1)'="M" Q 0
S XPD2=$$LKOPT(OPT) Q:XPD2'>0 0
S DA=$O(^DIC(19,XPD1,10,"B",XPD2,0)) Q:DA'>0 0
S DA(1)=XPD1,DIK="^DIC(19,XPD1,10," D ^DIK
Q 1
XUINEND1 ;SF-ISC/STAFF - POSTINIT FOR KERNEL V7 ;4/15/93 12:33
+1 ;;7.1;KERNEL;;May 11, 1993
+2 WRITE !,"Don't call from top."
QUIT
A5 ;Now to change your XUCOMMAND option. Please review."
+1 IF ($$LKOPT("XUCOMMAND")'>0)
GOTO A5X
+2 FOR XU1="XUUSERDISP","XUSEREDITSELF","XUUSERHELP","XU-SPL-MENU"
SET X=$$ITEMDEL("XUCOMMAND",XU1)
+3 FOR XU1=1:1:3
SET X=$$ADD("XUCOMMAND",$PIECE("XUSERTOOLS^XQALERT^XUSERWHERE",U,XU1),$PIECE("TBOX^VA^",U,XU1))
A5X ;Exit tag for A5
+1 ;
+2 QUIT
+3 ;
ADD(MENU,OPT,SYN,ORD) ;EF. Add options to a menu
+1 IF $GET(MENU)']""
QUIT 0
IF $GET(OPT)']""
QUIT 0
SET SYN=$GET(SYN)
SET ORD=$GET(ORD)
+2 NEW X,XPD1,XPD2,XPD3,DIC,DA,D0,DR,DLAYGO
SET DLAYGO=19
+3 SET XPD1=$$LKOPT(MENU)
IF XPD1'>0
QUIT 0
IF $$TYPE(XPD1)'["M"
QUIT 0
+4 SET DIC="^DIC(19,"_XPD1_",10,"
+5 SET XPD2=$$LKOPT(OPT)
IF XPD2'>0
QUIT 0
+6 IF '$DATA(^DIC(19,XPD1,10,"B",XPD2))
SET X=XPD2
SET (D0,DA(1))=XPD1
SET DIC(0)="MLF"
SET DIC("P")=$PIECE(^DD(19,10,0),"^",2)
DO FILE^DICN
+7 SET XPD3=$ORDER(^DIC(19,XPD1,10,"B",XPD2,0))
+8 IF XPD3>0
SET DR=""
IF SYN]""
SET DR="2///"_SYN_";"
IF ORD]""
SET DR=DR_"3///"_ORD
IF DR]""
SET DIE=DIC
SET DA=XPD3
SET DA(1)=XPD1
DO ^DIE
+9 QUIT XPD3>0
LKOPT(X) ;EF. To lookup on "B"
+1 QUIT $ORDER(^DIC(19,"B",X,0))
TYPE(X) ;EF. Return option type, Pass IFN.
+1 IF X'>0
QUIT ""
QUIT $PIECE($GET(^DIC(19,X,0)),"^",4)
ITEMDEL(MENU,OPT) ;EF. Delete item from menu.
+1 NEW XPD1,XPD2,DIK,DA,X
+2 IF MENU']""
QUIT 0
IF OPT']""
QUIT 0
+3 SET XPD1=$$LKOPT(MENU)
IF XPD1'>0
QUIT 0
IF $$TYPE(XPD1)'="M"
QUIT 0
+4 SET XPD2=$$LKOPT(OPT)
IF XPD2'>0
QUIT 0
+5 SET DA=$ORDER(^DIC(19,XPD1,10,"B",XPD2,0))
IF DA'>0
QUIT 0
+6 SET DA(1)=XPD1
SET DIK="^DIC(19,XPD1,10,"
DO ^DIK
+7 QUIT 1