Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: VIAA01P1

VIAA01P1.m

Go to the documentation of this file.
  1. VIAA01P1 ;ALB/CR - PATCH 1 POST INSTALL ;4/21/16 11:28 am
  1. ;;1.0;RTLS;**1**;April 22, 2013;Build 44
  1. ;
  1. Q
  1. ; Reference to ^VA(200 supported by ICR #10060
  1. ; application proxy creation supported by ICR #4677
  1. ;
  1. PRE ; checks for the connector proxy that the site created with the option
  1. ; 'Enter/Edit Connector Proxy User' under the 'Foundations Management' menu
  1. ; of Vistalink
  1. N X,NAME,NAME1
  1. S NAME="VIAASERVICE,RTLS CONNECTOR PROXY"
  1. S NAME1=$E(NAME,1,30) ; B x-ref keeps 30 chars only
  1. S X=$$FIND1^DIC(200,,"M",NAME1)
  1. D BMES^XPDUTL("PRE-INIT CHECKS: looking for the '"_NAME_"' user...")
  1. I 'X D BMES^XPDUTL("...User '"_NAME_"' not found. Please create it soon.") Q
  1. ;
  1. I X>0 D
  1. . D BMES^XPDUTL("...'"_NAME_"' already exists...")
  1. . D BMES^XPDUTL("...checking required fields...")
  1. . 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...")
  1. . I '$D(^VA(200,X,203,1,0))&('$D(^VA(200,X,201))) D BMES^XPDUTL("...No illegal primary/secondary menus found...")
  1. . I $D(^VA(200,X,203,1,0))!($D(^VA(200,X,201))) D BMES^XPDUTL("...Illegal menu options found...")
  1. . I $P($G(^VA(200,X,"USC3",1,0)),U,1,2)["5^1" D BMES^XPDUTL("...User Class looks fine...")
  1. . I $P($G(^VA(200,X,"USC3",1,0)),U,1,2)'["5^1" D BMES^XPDUTL("...Wrong User Class...")
  1. . I $P($G(^VA(200,X,200)),U,4)=1 D BMES^XPDUTL("...Multiple sign-on is allowed...")
  1. . I $P($G(^VA(200,X,200)),U,4)'=1 D BMES^XPDUTL("...Multiple sign-on is not allowed...")
  1. . D BMES^XPDUTL("PRE-INIT CHECKS FINISHED.")
  1. ;
  1. E D BMES^XPDUTL("...No connector proxy user found - it needs to be created manually.")
  1. Q
  1. ;
  1. POST ; create an application proxy for the RTLS RPC menu option
  1. ; and attach it as a secondary menu
  1. N USER,USER1,USERIEN,OPT,OPTNAME,R
  1. S USER="VIAASERVICE,RTLS APPLICATION PROXY"
  1. S USER1=$E(USER,1,30) ; B x-ref keeps only 30 chars
  1. S OPTNAME="VIAA01 RTLS RPC MENU"
  1. S USERIEN=$$FIND1^DIC(200,,"M",USER1) ; get user's IEN
  1. D BMES^XPDUTL("")
  1. D BMES^XPDUTL("POST-INIT CHECKS: looking for the '"_USER_"' user...")
  1. ;
  1. I USERIEN>0 D Q
  1. . D BMES^XPDUTL("...'"_USER_"' already exists...")
  1. . D BMES^XPDUTL("...checking required fields...")
  1. . S OPT=$$FIND1^DIC(19,,"M",OPTNAME) I 'OPT D BMES^XPDUTL("...'"_OPTNAME_"' not found...") Q
  1. . I $P($G(^VA(200,USERIEN,0)),U,3)=""&('$D(^VA(200,USERIEN,.1))) D BMES^XPDUTL("...No illegal access/verify codes found...")
  1. . I $P($G(^VA(200,USERIEN,0)),U,3)'=""&($D(^VA(200,USERIEN,.1))) D BMES^XPDUTL("...Illegal access/verify codes found...")
  1. . I $P($G(^VA(200,USERIEN,203,1,0)),U)=OPT D BMES^XPDUTL("...Secondary menu looks fine...")
  1. . I $P($G(^VA(200,USERIEN,203,1,0)),U)'=OPT D BMES^XPDUTL("...Missing '"_OPTNAME_"'...")
  1. . I $P($G(^VA(200,USERIEN,"USC3",1,0)),U,1,2)["1^1" D BMES^XPDUTL("...User Class looks fine...")
  1. . I $P($G(^VA(200,USERIEN,"USC3",1,0)),U,1,2)'["1^1" D BMES^XPDUTL("...Wrong User Class found. Checks finished...")
  1. . D BMES^XPDUTL("POST-INIT CHECKS FINISHED.")
  1. ;
  1. E D BMES^XPDUTL("POST-INIT INSTALL: No application proxy user found - creating one...stand by...")
  1. ; set up the application proxy then
  1. S R=$$CREATE^XUSAP(USER,"",OPTNAME)
  1. D BMES^XPDUTL("...'"_USER_"'"_$S(R=-1:" creation failed",R=0:" already exists.",1:" user added."))
  1. D BMES^XPDUTL("POST-INIT INSTALL FINISHED.")
  1. Q