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

AQAOUSR.m

Go to the documentation of this file.
  1. AQAOUSR ; IHS/ORDC/LJF - ENTER/EDIT QI USER ;
  1. ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
  1. ;
  1. ;This is the first rtn containing the user interface for adding and
  1. ;editing a user entry in the QI User file. Even with all the security
  1. ;keys, a user cannot enter the main QAI menu without the proper entry
  1. ;in the QI User file.
  1. ;
  1. NAME ;ENTRY POINT from continuation rtn AQAOUSR1
  1. D INTRO^AQAOHUSR ;intro text
  1. ; >>> ask for user name
  1. I $D(AQAOUSR) L -^AQAO(9,AQAOUSR) ;unlock last user edited
  1. D KILL^AQAOUTIL ;clean out variables
  1. W ! K DIC S DIC=200,DIC(0)="AEMZQ",DIC("A")="Select QI USER NAME: "
  1. D ^DIC G END:$D(DTOUT),END:$D(DUOUT),END:X="",NAME:Y=-1
  1. S AQAOUSR=+Y,AQAONM=$P(Y,U,2) ;user ifn and name
  1. ;
  1. ADD ; >> if not in qi user file, ask to add
  1. I '$D(^AQAO(9,AQAOUSR,0)) D G NAME:$D(DIRUT),NAME:Y=0
  1. .W ! K DIR S DIR(0)="Y",DIR("B")="YES"
  1. .S DIR("A")="Do you wish to add "_AQAONM_" to the QI USER file"
  1. .D ^DIR Q:$D(DIRUT) Q:Y=0
  1. .K DD,DO,DIC S DIC="^AQAO(9,",DIC(0)="L",(X,DINUM)=AQAOUSR
  1. .S DIC("DR")=".02///^S X=DT;.03///^S X=""`""_DUZ"
  1. .L +(^AQAO(9,0)):1 I '$T D Q
  1. ..W !!,"CANNOT ADD; ANOTHER USER ADDING TO THIS FILE. TRY AGAIN.",!
  1. .D FILE^DICN L -(^AQAO(9,0)) S AQAONEW=""
  1. I '$D(^AQAO(9,AQAOUSR)) G END ;add didn't work
  1. L +^AQAO(9,AQAOUSR):1 I '$T D G NAME
  1. .W !!,"CANNOT EDIT; ANOTHER USER IS EDITING THIS USER ENTRY.",!
  1. ;
  1. INACTIVE ; >> check for inactive entry
  1. I $P(^AQAO(9,AQAOUSR,0),U,4)'="" D
  1. .W !!?5,*7,AQAONM," has been INACTIVATED!",!!
  1. .K DIR S DIR(0)="Y",DIR("B")="NO"
  1. .S DIR("A")="Do you wish to REACTIVATE this QI User entry"
  1. .D ^DIR Q:$D(DIRUT) Q:Y'=1
  1. .S DIE="^AQAO(9,",DA=AQAOUSR,DR=".04///@;.05///@" D ^DIE
  1. ;
  1. ;
  1. START ; >> start security key array
  1. K AQAOARR S AQAOARR("AQAOZMENU")=""
  1. ;
  1. QISTAFF ; >> ask if user is member of QI staff for package-wide access
  1. W ! K DIR S DIR(0)="Y"
  1. S DIR("B")=$S($P(^AQAO(9,AQAOUSR,0),U,6)["Q":"YES",1:"NO")
  1. S DIR("?",1)="QI STAFF as defined for this package have access to ALL"
  1. S DIR("?",2)="indicators and occurrences. For any user to have this"
  1. S DIR("?",3)="level of access, you must designate them as QI STAFF."
  1. S DIR("?")=" "
  1. S DIR("A")="Is "_AQAONM_" a member of the QI Staff"
  1. D ^DIR G NAME:$D(DIRUT)
  1. I Y=0,DIR("B")="YES" D G TEAM ;if no longer qi staff member
  1. .S DIE="^AQAO(9,",DA=AQAOUSR,DR=".06///@" D ^DIE
  1. G TEAM:Y=0
  1. ;
  1. PKGADMIN ; >> is user to be a pkg administrator
  1. W ! K DIR S DIR(0)="Y" K AQAOARR("AQAOZPKG")
  1. S DIR("B")=$S($P(^AQAO(9,AQAOUSR,0),U,6)="QA":"YES",1:"NO")
  1. S DIR("?",1)="From among the QI staff members, you may designate some"
  1. S DIR("?",2)="as PACKAGE ADMINISTRATORS. These users will have access"
  1. S DIR("?",3)="to manage the QI USER file; to manage QI Teams and their"
  1. S DIR("?",4)="their membership lists; to print the AUDIT REPORTS that"
  1. S DIR("?",5)="track changes to the QAI files; and to the package files"
  1. S DIR("?",6)="that require initialization and updates."
  1. S DIR("?")=" "
  1. S DIR("A")="Is "_AQAONM_" to be a PACKAGE ADMINISTRATOR"
  1. D ^DIR G NAME:$D(DIRUT)
  1. ;
  1. I Y=0 S DR=".06///^S X=""QI"""
  1. I Y=1 S DR=".06///^S X=""QA""",AQAOARR("AQAOZPKG")=""
  1. S DIE="^AQAO(9,",DA=AQAOUSR D ^DIE
  1. I $D(AQAOARR("AQAOZPKG")) S DIE=200,DA=AQAOUSR,DR=".132" D ^DIE
  1. I $D(Y) G NAME ;"^" entered
  1. G PCUSER ;qi staff don't need team affiliations
  1. ;
  1. TEAM ; >> enter team affiliations
  1. W !!,"Please add ALL QI Teams to which this user is a member. You"
  1. W !,"will also be asked to designate the user's access level for each"
  1. W !,"team. For example, a user may be able to enter occurrences for"
  1. W !,"one team (CREATE/EDIT) but have only INQUIRY access to the"
  1. W !,"occurrences for another team.",!!
  1. K DIC,DIE S DIE="^AQAO(9,",DA=AQAOUSR,DR="1"
  1. S DR(2,9002168.91)=".01:.02"
  1. D ^DIE I $D(Y) G NAME ;"^" entered
  1. ;
  1. ;
  1. PCUSER ;ENTRY POINT >> is user advanced enough to use capture of ASCII files
  1. W !!," Some of reports available in this package can be transferred"
  1. W !," to a user's PC via 'Data Capture'. The data will be sent in "
  1. W !," ASCII file format. The user will NOT be given this choice"
  1. W !," unless you answer YES here. This gives you the chance to"
  1. W !," make sure the user is KNOWLEDGEABLE in using data capture and"
  1. W !," understands the importance of SAFEGUARDING the data once it"
  1. W !," resides on their PC. This gives the user access to RPMS data"
  1. W !," for use with statistical software.",!
  1. W ! K DIC,DIE S DIE="^AQAO(9,",DA=AQAOUSR,DR=".07" D ^DIE
  1. I $D(Y) G NAME
  1. ;
  1. ;
  1. NEXT G ^AQAOUSR1 ;continuation of this rtn
  1. ;
  1. END ; >>> eoj
  1. I $D(AQAOUSR) L -^AQAO(9,AQAOUSR)
  1. D KILL^AQAOUTIL Q