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

HMPPRXY2.m

Go to the documentation of this file.
  1. HMPPRXY2 ;ASMR/JCH,PB - Post-Install Routine to Create HMP User ; 02/01/16 11:56
  1. ;;2.0;ENTERPRISE HEALTH MANAGEMENT PLATFORM;**;Feb 03, 2015;Build 63
  1. ;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. ;Jan 29, 2016 - PB added code to add the APPLICATION PROXY user class to the HMP,APPLILCATION PROXY proxy account
  1. Q
  1. ;
  1. POST ; Entry point for post install
  1. D BMES^XPDUTL(" Starting post-install")
  1. D ADDUSR
  1. Q
  1. ;
  1. ADDUSR() ; FileMan calls to add user, update fields, update sub-files
  1. N DIC ; DIC(0) is required by the LAGYO code attached to NAME (#.01) field in NEW PERSON (#200) file (see below)
  1. ; NEW PERSON (#200 file : ^DD(200,.01,"LAYGO",1,0)="D LAYGO^XUA4A7"
  1. ; Routine XUA4A7 : LAYGO ;Called from ^DD(200,.01,"LAYGO",1,0)
  1. ; Q:DIC(0)'["E"
  1. N FDA ; The name of the root of a VA FileMan Data Array, which describes the entries to add to the database.
  1. N ERR ; Array containing error messages.
  1. N HMPERTXT ; Array containing generic user message text indicating fields/files that were not updated
  1. N USRIEN ; The Internal Entry Number (IEN) of the
  1. N FDAIEN ; The IEN of HMP,APPLICATION PROXY user found in the NEW PERSON (#200) file
  1. N HMPERR ; The full reference to each ERR error node, including the array with subscripts and data (i.e., ERR("DIERR",1,"TEXT")="Error Message")
  1. ;
  1. ; Add new user to ^VA(200
  1. S DIC(0)="" ; Define DIC(0) so DD(200,.01,"LAGYO" code doesn't blow up (LAYGO^XUA4A7)
  1. S FDA(200,"?+1,",.01)="HMP,APPLICATION PROXY"
  1. D UPDATE^DIE("E","FDA","FDAIEN","ERR")
  1. ; Quit if user not added
  1. S USRIEN=$G(FDAIEN(1))
  1. I '$G(USRIEN) D Q
  1. .D BMES^XPDUTL("HMP,APPLICATION PROXY user not added")
  1. .I $D(ERR) D ERROUT(.ERR)
  1. ;
  1. S HMPERTXT=$S($G(FDAIEN(1,0))="?":"User HMP,APPLICATION PROXY already on file.",$G(FDAIEN(1,0))="+":"User HMP,APPLICATION PROXY added",1:"")
  1. D BMES^XPDUTL(HMPERTXT)
  1. ;
  1. ; Add fields for new user file entry
  1. K FDA,ERR
  1. S FDA(200,USRIEN_",",1)="PU" ; Initials
  1. S FDA(200,USRIEN_",",7.2)="Y"
  1. S FDA(200,USRIEN_",",20.2)="HMPPROXY USER" ; Signature Block
  1. S FDA(200,USRIEN_",",101.01)="NO" ; Restrict Patient Selection
  1. S FDA(200,USRIEN_",",201)="XMUSER" ; Primary Menu Option
  1. D FILE^DIE("E","FDA","ERR")
  1. ;
  1. ; display progress (Data is refiled each time post-install is run - updated message will display each time)
  1. K HMPERTXT
  1. S HMPERTXT(1)="The following HMP,APPLICATION PROXY fields were "_$S($D(ERR):"NOT updated: ",1:"updated: ")
  1. S HMPERTXT(2)="INITIALS, ACCESS CODE, SIGNATURE BLOCK, RESTRICT PATIENT SELECTION, PRIMARY MENU OPTION"
  1. D BMES^XPDUTL(.HMPERTXT)
  1. ;
  1. ; If failure, provide details
  1. I $D(ERR) D ERROUT(.ERR)
  1. ;
  1. ; Update sub-files for new user file entry
  1. K FDA,ERR
  1. S FDA(200.051,"?+1,"_USRIEN_",",.01)="HMP ADMIN"
  1. S FDA(200.051,"?+2,"_USRIEN_",",.01)="PROVIDER"
  1. S FDA(200.010113,"?+3,"_USRIEN_",",.01)="COR"
  1. S FDA(200.03,"?+5,"_USRIEN_",",.01)="HMP UI CONTEXT"
  1. S FDA(200.03,"?+6,"_USRIEN_",",.01)="HMP SYNCHRONIZATION CONTEXT"
  1. D UPDATE^DIE("E","FDA",,"ERR")
  1. ;
  1. ; It's an all or nothing transaction - display progress (Data is refiled each time post-install is run - updated message will display each time)
  1. K HMPERTXT
  1. S HMPERTXT(1)="The following sub-files for user HMP,APPLICATION PROXY were "_$S($D(ERR):"NOT updated: ",1:"updated: ")
  1. S HMPERTXT(2)=" KEYS, CPRS TAB, SECONDARY MENU OPTIONS"
  1. D BMES^XPDUTL(.HMPERTXT)
  1. ;
  1. ; If failure, provide details
  1. I $D(ERR) D ERROUT(.ERR)
  1. ;
  1. ;JAN 29, 2016 - PB - Add User Class, APPLICATION PROXY to the HMP,APPLICATION PROXY account
  1. ;get pointers for classes in file 201
  1. K FDA,ERR
  1. S FDA(200.07,"?+1,"_USRIEN_",",.01)="APPLICATION PROXY"
  1. S FDA(200.07,"?+1,"_USRIEN_",",2)="1"
  1. D UPDATE^DIE("E","FDA",,"ERR")
  1. ;if user class, APPLICATION PROXY is not added notify users
  1. K HMPERTXT
  1. S HMPERTXT(1)="The following sub-files for user HMP,APPLICATION PROXY were "_$S($D(ERR):"NOT updated: ",1:"updated: ")
  1. S HMPERTXT(2)=" User Class - APPLICATION PROXY"
  1. D BMES^XPDUTL(.HMPERTXT)
  1. Q
  1. ;end changes to add user classes to the HMP,APPLICATION PROXY proxy user account.
  1. ;
  1. ERROUT(ERR) ; Output ERR array
  1. D BMES^XPDUTL("Error Details:")
  1. S HMPERR="ERR(""DIERR"")" F S HMPERR=$Q(@HMPERR) Q:HMPERR="" D MES^XPDUTL(HMPERR_"="_@HMPERR)
  1. Q