AQAOUSP ; IHS/ORDC/LJF - PRINT USER PROFILE (KEYS) ;
;;1.01;QAI MANAGEMENT;;OCT 05, 1995
;
;This rtn contains an entry point for the user interface and DIP call
;to print a user's QAI access profile. It also contains an entry
;point called by the print template to list the security keys
;assigned to the user.
;
KEYS ;ENTRY POINT to print security key portion of qi user profile
;called by print template [AQAO USER PROFILE]
W !!,"SECURITY KEYS:"
S AQAOX="AQAO"
F S AQAOX=$O(^DIC(19.1,"B",AQAOX)) Q:AQAOX="" Q:$E(AQAOX,1,4)'="AQAO" D
.S AQAOY=$O(^DIC(19.1,"B",AQAOX,0)) Q:AQAOY=""
.I $D(^XUSEC(AQAOX,AQAOUSR)) D Q ; if user has key
..W !,AQAOX,": ",$E(^DIC(19.1,AQAOY,1,1,0),1,47) ;key & descript
..Q:'$D(AQAOARR) Q:$D(AQAOARR(AQAOX)) ;okay to keep key
..W ?60,"REMOVE KEY FROM USER"
.E D ;else user doesn't have key
..Q:'$D(AQAOARR(AQAOX)) ;don't assign key
..W !,AQAOX,": ",$E(^DIC(19.1,AQAOY,1,1,0),1,47) ;key&descript
..W ?60,"ASSIGN KEY TO USER"
;
F AQAOX="AMQQZMENU","ATSZMENU" D
.S AQAOY=$O(^DIC(19.1,"B",AQAOX,0)) Q:AQAOY="" I $D(^XUSEC(AQAOX,AQAOUSR)) D Q ;if user has key
..W !,AQAOX,": ",$E(^DIC(19.1,AQAOY,1,1,0),1,47) ;key & descript
..Q:'$D(AQAOARR) Q:$D(AQAOARR(AQAOX)) ;okay to keep key
..W ?60,"REMOVE KEY FROM USER"
.E D ;else user doesn't have key
..Q:'$D(AQAOARR(AQAOX)) ;don't assign key
..W !,AQAOX,": ",$E(^DIC(19.1,AQAOY,1,1,0),1,47) ;key&descript
..W ?60,"ASSIGN KEY TO USER"
W !
K AQAOX,AQAOY Q
;
;
DISPLAY ;ENTRY POINT to print user profile from menu
;called by option AQAO USER DISPLAY
D DISPLAY^AQAOHUSR ;intro text
NAME ; >>> ask for user name
W ! K DIC S DIC="^AQAO(9,",DIC(0)="AEMZQ"
S DIC("A")="Select QI USER NAME: "
D ^DIC G END:$D(DTOUT),END:$D(DUOUT),END:X="",NAME:Y=-1
S AQAOUSR=+Y ;user ifn
;
PRINT ; >>> set variables and call dip
W !!,"Enter PRINTER NAME or 'HOME' to print to your screen"
S DIC="^AQAO(9,",L=0,FLDS="[AQAO USER PROFILE]",(TO,FR)=AQAOUSR
S BY="@NUMBER" D EN1^DIP ;print profile
;
END ; >>> eoj
D KILL^AQAOUTIL Q
AQAOUSP ; IHS/ORDC/LJF - PRINT USER PROFILE (KEYS) ;
+1 ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
+2 ;
+3 ;This rtn contains an entry point for the user interface and DIP call
+4 ;to print a user's QAI access profile. It also contains an entry
+5 ;point called by the print template to list the security keys
+6 ;assigned to the user.
+7 ;
KEYS ;ENTRY POINT to print security key portion of qi user profile
+1 ;called by print template [AQAO USER PROFILE]
+2 WRITE !!,"SECURITY KEYS:"
+3 SET AQAOX="AQAO"
+4 FOR
SET AQAOX=$ORDER(^DIC(19.1,"B",AQAOX))
IF AQAOX=""
QUIT
IF $EXTRACT(AQAOX,1,4)'="AQAO"
QUIT
Begin DoDot:1
+5 SET AQAOY=$ORDER(^DIC(19.1,"B",AQAOX,0))
IF AQAOY=""
QUIT
+6 ; if user has key
IF $DATA(^XUSEC(AQAOX,AQAOUSR))
Begin DoDot:2
+7 ;key & descript
WRITE !,AQAOX,": ",$EXTRACT(^DIC(19.1,AQAOY,1,1,0),1,47)
+8 ;okay to keep key
IF '$DATA(AQAOARR)
QUIT
IF $DATA(AQAOARR(AQAOX))
QUIT
+9 WRITE ?60,"REMOVE KEY FROM USER"
End DoDot:2
QUIT
+10 ;else user doesn't have key
IF '$TEST
Begin DoDot:2
+11 ;don't assign key
IF '$DATA(AQAOARR(AQAOX))
QUIT
+12 ;key&descript
WRITE !,AQAOX,": ",$EXTRACT(^DIC(19.1,AQAOY,1,1,0),1,47)
+13 WRITE ?60,"ASSIGN KEY TO USER"
End DoDot:2
End DoDot:1
+14 ;
+15 FOR AQAOX="AMQQZMENU","ATSZMENU"
Begin DoDot:1
+16 ;if user has key
SET AQAOY=$ORDER(^DIC(19.1,"B",AQAOX,0))
IF AQAOY=""
QUIT
IF $DATA(^XUSEC(AQAOX,AQAOUSR))
Begin DoDot:2
+17 ;key & descript
WRITE !,AQAOX,": ",$EXTRACT(^DIC(19.1,AQAOY,1,1,0),1,47)
+18 ;okay to keep key
IF '$DATA(AQAOARR)
QUIT
IF $DATA(AQAOARR(AQAOX))
QUIT
+19 WRITE ?60,"REMOVE KEY FROM USER"
End DoDot:2
QUIT
+20 ;else user doesn't have key
IF '$TEST
Begin DoDot:2
+21 ;don't assign key
IF '$DATA(AQAOARR(AQAOX))
QUIT
+22 ;key&descript
WRITE !,AQAOX,": ",$EXTRACT(^DIC(19.1,AQAOY,1,1,0),1,47)
+23 WRITE ?60,"ASSIGN KEY TO USER"
End DoDot:2
End DoDot:1
+24 WRITE !
+25 KILL AQAOX,AQAOY
QUIT
+26 ;
+27 ;
DISPLAY ;ENTRY POINT to print user profile from menu
+1 ;called by option AQAO USER DISPLAY
+2 ;intro text
DO DISPLAY^AQAOHUSR
NAME ; >>> ask for user name
+1 WRITE !
KILL DIC
SET DIC="^AQAO(9,"
SET DIC(0)="AEMZQ"
+2 SET DIC("A")="Select QI USER NAME: "
+3 DO ^DIC
IF $DATA(DTOUT)
GOTO END
IF $DATA(DUOUT)
GOTO END
IF X=""
GOTO END
IF Y=-1
GOTO NAME
+4 ;user ifn
SET AQAOUSR=+Y
+5 ;
PRINT ; >>> set variables and call dip
+1 WRITE !!,"Enter PRINTER NAME or 'HOME' to print to your screen"
+2 SET DIC="^AQAO(9,"
SET L=0
SET FLDS="[AQAO USER PROFILE]"
SET (TO,FR)=AQAOUSR
+3 ;print profile
SET BY="@NUMBER"
DO EN1^DIP
+4 ;
END ; >>> eoj
+1 DO KILL^AQAOUTIL
QUIT