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