- VIAA01P1 ;ALB/CR - PATCH 1 POST INSTALL ;4/21/16 11:28 am
- ;;1.0;RTLS;**1**;April 22, 2013;Build 44
- ;
- Q
- ; Reference to ^VA(200 supported by ICR #10060
- ; application proxy creation supported by ICR #4677
- ;
- PRE ; checks for the connector proxy that the site created with the option
- ; 'Enter/Edit Connector Proxy User' under the 'Foundations Management' menu
- ; of Vistalink
- N X,NAME,NAME1
- S NAME="VIAASERVICE,RTLS CONNECTOR PROXY"
- S NAME1=$E(NAME,1,30) ; B x-ref keeps 30 chars only
- S X=$$FIND1^DIC(200,,"M",NAME1)
- D BMES^XPDUTL("PRE-INIT CHECKS: looking for the '"_NAME_"' user...")
- I 'X D BMES^XPDUTL("...User '"_NAME_"' not found. Please create it soon.") Q
- ;
- I X>0 D
- . D BMES^XPDUTL("...'"_NAME_"' already exists...")
- . D BMES^XPDUTL("...checking required fields...")
- . I $P($G(^VA(200,X,0)),U,3)'=""&($P($G(^VA(200,X,.1)),U,2)'="") D BMES^XPDUTL("...Access/verify codes appear to be in place...")
- . I '$D(^VA(200,X,203,1,0))&('$D(^VA(200,X,201))) D BMES^XPDUTL("...No illegal primary/secondary menus found...")
- . I $D(^VA(200,X,203,1,0))!($D(^VA(200,X,201))) D BMES^XPDUTL("...Illegal menu options found...")
- . I $P($G(^VA(200,X,"USC3",1,0)),U,1,2)["5^1" D BMES^XPDUTL("...User Class looks fine...")
- . I $P($G(^VA(200,X,"USC3",1,0)),U,1,2)'["5^1" D BMES^XPDUTL("...Wrong User Class...")
- . I $P($G(^VA(200,X,200)),U,4)=1 D BMES^XPDUTL("...Multiple sign-on is allowed...")
- . I $P($G(^VA(200,X,200)),U,4)'=1 D BMES^XPDUTL("...Multiple sign-on is not allowed...")
- . D BMES^XPDUTL("PRE-INIT CHECKS FINISHED.")
- ;
- E D BMES^XPDUTL("...No connector proxy user found - it needs to be created manually.")
- Q
- ;
- POST ; create an application proxy for the RTLS RPC menu option
- ; and attach it as a secondary menu
- N USER,USER1,USERIEN,OPT,OPTNAME,R
- S USER="VIAASERVICE,RTLS APPLICATION PROXY"
- S USER1=$E(USER,1,30) ; B x-ref keeps only 30 chars
- S OPTNAME="VIAA01 RTLS RPC MENU"
- S USERIEN=$$FIND1^DIC(200,,"M",USER1) ; get user's IEN
- D BMES^XPDUTL("")
- D BMES^XPDUTL("POST-INIT CHECKS: looking for the '"_USER_"' user...")
- ;
- I USERIEN>0 D Q
- . D BMES^XPDUTL("...'"_USER_"' already exists...")
- . D BMES^XPDUTL("...checking required fields...")
- . S OPT=$$FIND1^DIC(19,,"M",OPTNAME) I 'OPT D BMES^XPDUTL("...'"_OPTNAME_"' not found...") Q
- . I $P($G(^VA(200,USERIEN,0)),U,3)=""&('$D(^VA(200,USERIEN,.1))) D BMES^XPDUTL("...No illegal access/verify codes found...")
- . I $P($G(^VA(200,USERIEN,0)),U,3)'=""&($D(^VA(200,USERIEN,.1))) D BMES^XPDUTL("...Illegal access/verify codes found...")
- . I $P($G(^VA(200,USERIEN,203,1,0)),U)=OPT D BMES^XPDUTL("...Secondary menu looks fine...")
- . I $P($G(^VA(200,USERIEN,203,1,0)),U)'=OPT D BMES^XPDUTL("...Missing '"_OPTNAME_"'...")
- . I $P($G(^VA(200,USERIEN,"USC3",1,0)),U,1,2)["1^1" D BMES^XPDUTL("...User Class looks fine...")
- . I $P($G(^VA(200,USERIEN,"USC3",1,0)),U,1,2)'["1^1" D BMES^XPDUTL("...Wrong User Class found. Checks finished...")
- . D BMES^XPDUTL("POST-INIT CHECKS FINISHED.")
- ;
- E D BMES^XPDUTL("POST-INIT INSTALL: No application proxy user found - creating one...stand by...")
- ; set up the application proxy then
- S R=$$CREATE^XUSAP(USER,"",OPTNAME)
- D BMES^XPDUTL("...'"_USER_"'"_$S(R=-1:" creation failed",R=0:" already exists.",1:" user added."))
- D BMES^XPDUTL("POST-INIT INSTALL FINISHED.")
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVIAA01P1 3344 printed Feb 18, 2025@23:59:38 Page 2
- VIAA01P1 ;ALB/CR - PATCH 1 POST INSTALL ;4/21/16 11:28 am
- +1 ;;1.0;RTLS;**1**;April 22, 2013;Build 44
- +2 ;
- +3 QUIT
- +4 ; Reference to ^VA(200 supported by ICR #10060
- +5 ; application proxy creation supported by ICR #4677
- +6 ;
- PRE ; checks for the connector proxy that the site created with the option
- +1 ; 'Enter/Edit Connector Proxy User' under the 'Foundations Management' menu
- +2 ; of Vistalink
- +3 NEW X,NAME,NAME1
- +4 SET NAME="VIAASERVICE,RTLS CONNECTOR PROXY"
- +5 ; B x-ref keeps 30 chars only
- SET NAME1=$EXTRACT(NAME,1,30)
- +6 SET X=$$FIND1^DIC(200,,"M",NAME1)
- +7 DO BMES^XPDUTL("PRE-INIT CHECKS: looking for the '"_NAME_"' user...")
- +8 IF 'X
- DO BMES^XPDUTL("...User '"_NAME_"' not found. Please create it soon.")
- QUIT
- +9 ;
- +10 IF X>0
- Begin DoDot:1
- +11 DO BMES^XPDUTL("...'"_NAME_"' already exists...")
- +12 DO BMES^XPDUTL("...checking required fields...")
- +13 IF $PIECE($GET(^VA(200,X,0)),U,3)'=""&($PIECE($GET(^VA(200,X,.1)),U,2)'="")
- DO BMES^XPDUTL("...Access/verify codes appear to be in place...")
- +14 IF '$DATA(^VA(200,X,203,1,0))&('$DATA(^VA(200,X,201)))
- DO BMES^XPDUTL("...No illegal primary/secondary menus found...")
- +15 IF $DATA(^VA(200,X,203,1,0))!($DATA(^VA(200,X,201)))
- DO BMES^XPDUTL("...Illegal menu options found...")
- +16 IF $PIECE($GET(^VA(200,X,"USC3",1,0)),U,1,2)["5^1"
- DO BMES^XPDUTL("...User Class looks fine...")
- +17 IF $PIECE($GET(^VA(200,X,"USC3",1,0)),U,1,2)'["5^1"
- DO BMES^XPDUTL("...Wrong User Class...")
- +18 IF $PIECE($GET(^VA(200,X,200)),U,4)=1
- DO BMES^XPDUTL("...Multiple sign-on is allowed...")
- +19 IF $PIECE($GET(^VA(200,X,200)),U,4)'=1
- DO BMES^XPDUTL("...Multiple sign-on is not allowed...")
- +20 DO BMES^XPDUTL("PRE-INIT CHECKS FINISHED.")
- End DoDot:1
- +21 ;
- +22 IF '$TEST
- DO BMES^XPDUTL("...No connector proxy user found - it needs to be created manually.")
- +23 QUIT
- +24 ;
- POST ; create an application proxy for the RTLS RPC menu option
- +1 ; and attach it as a secondary menu
- +2 NEW USER,USER1,USERIEN,OPT,OPTNAME,R
- +3 SET USER="VIAASERVICE,RTLS APPLICATION PROXY"
- +4 ; B x-ref keeps only 30 chars
- SET USER1=$EXTRACT(USER,1,30)
- +5 SET OPTNAME="VIAA01 RTLS RPC MENU"
- +6 ; get user's IEN
- SET USERIEN=$$FIND1^DIC(200,,"M",USER1)
- +7 DO BMES^XPDUTL("")
- +8 DO BMES^XPDUTL("POST-INIT CHECKS: looking for the '"_USER_"' user...")
- +9 ;
- +10 IF USERIEN>0
- Begin DoDot:1
- +11 DO BMES^XPDUTL("...'"_USER_"' already exists...")
- +12 DO BMES^XPDUTL("...checking required fields...")
- +13 SET OPT=$$FIND1^DIC(19,,"M",OPTNAME)
- IF 'OPT
- DO BMES^XPDUTL("...'"_OPTNAME_"' not found...")
- QUIT
- +14 IF $PIECE($GET(^VA(200,USERIEN,0)),U,3)=""&('$DATA(^VA(200,USERIEN,.1)))
- DO BMES^XPDUTL("...No illegal access/verify codes found...")
- +15 IF $PIECE($GET(^VA(200,USERIEN,0)),U,3)'=""&($DATA(^VA(200,USERIEN,.1)))
- DO BMES^XPDUTL("...Illegal access/verify codes found...")
- +16 IF $PIECE($GET(^VA(200,USERIEN,203,1,0)),U)=OPT
- DO BMES^XPDUTL("...Secondary menu looks fine...")
- +17 IF $PIECE($GET(^VA(200,USERIEN,203,1,0)),U)'=OPT
- DO BMES^XPDUTL("...Missing '"_OPTNAME_"'...")
- +18 IF $PIECE($GET(^VA(200,USERIEN,"USC3",1,0)),U,1,2)["1^1"
- DO BMES^XPDUTL("...User Class looks fine...")
- +19 IF $PIECE($GET(^VA(200,USERIEN,"USC3",1,0)),U,1,2)'["1^1"
- DO BMES^XPDUTL("...Wrong User Class found. Checks finished...")
- +20 DO BMES^XPDUTL("POST-INIT CHECKS FINISHED.")
- End DoDot:1
- QUIT
- +21 ;
- +22 IF '$TEST
- DO BMES^XPDUTL("POST-INIT INSTALL: No application proxy user found - creating one...stand by...")
- +23 ; set up the application proxy then
- +24 SET R=$$CREATE^XUSAP(USER,"",OPTNAME)
- +25 DO BMES^XPDUTL("...'"_USER_"'"_$SELECT(R=-1:" creation failed",R=0:" already exists.",1:" user added."))
- +26 DO BMES^XPDUTL("POST-INIT INSTALL FINISHED.")
- +27 QUIT