source: FOIAVistA/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XQSMD31.m@ 1397

Last change on this file since 1397 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1XQSMD31 ;SEA/MJM - Secure Menu Delegation (Cont.) ;01/19/2006
2 ;;8.0;KERNEL;**372**;Jul 10, 1995;Build 3
3 ;Continued from XQSMD3
4DOIT ;Set up the parameters for a calls to %XY^%RCR and XQSMD2
5 S %X=XQPERX
6 S %Y="^TMP($J,""OP""," D %XY^%RCR K ^TMP($J,"OP",0),^("B") S DIC=19,DIC(0)="MNF"
7 S XQN="" F XQI=0:0 S XQN=$O(^TMP($J,"OP",XQN)) Q:XQN="" S X=+XQN D ^DIC I +Y>0 S ^TMP($J,"OP",+Y)="",^TMP($J,"ZN",$P(^DIC(19,+Y,0),U,1))=$P(^(0),U,2,99) K ^TMP($J,"OP",+XQN,0)
8 ;
9KILL ;Delete the delegated options of XQU1 and clean up.
10 I XQDEL S DA(1)=XQU1Y,DA="",ZTRTN="DEL^XQSMD31",ZTSAVE("DA(")="",ZTIO="",ZTDTH=$H,ZTDESC="Delete delegated option set for "_XQU1 D ^%ZTLOAD S XQDEL=0
11 K %X,%Y,DIC,XQPERX,XQU1,XQU1Y,XQU2,ZTSK
12 ;
13 G BUILD^XQSMD2
14 ;
15DEL ;Taskman entry for killing off delegated option sets
16 S DIK="^VA(200,"_DA(1)_",19.5,",DA=0
17 F XQI=0:0 S DA=$O(^VA(200,DA(1),19.5,DA)) Q:DA="" D ^DIK
18 K DIK,DA
19 Q
20 ;
21DELM ;Taskman entry for deleting option sets from multiple users.
22 S DA(1)=0 F XQJ=0:0 S DA(1)=$O(XQHOLD(DA(1))) Q:DA(1)="" S DIK="^VA(200,"_DA(1)_",19.5,",DA=0 F XQI=0:0 S DA=$O(^VA(200,DA(1),19.5,DA)) Q:DA="" D ^DIK
23 Q
24 ;
25ZTSK ;Taskman entry for adding and deleting delegated options (XQSMD2)
26 S XQLEV=XQLEV+1,DR="19////"_DUZ_";19.2///"_XQLEV,DIE=200,XQM=0
27 F XQJ=1:1 S XQM=$O(XQHOLD(XQM)) Q:XQM="" S DA=XQM D:$D(^VA(200,DA,19))[0!($O(^(19.5,0))="") ^DIE D @$S(XQDOP:"REM",1:"ADD")
28 D GIVOPT ; Give USER MENU OPTION as a secondary option if the user doesn't already have it.
29 K DIE,DR,DA,XQLEV,XQM,XQDOP,XQJ,XQK,XQN,XQPRO,XQUF,XQHOLD,ZTSK
30 Q
31 ;
32ADD ;Add options that have been delegated to this user.
33 S DA(1)=XQM,DIC="^VA(200,"_DA(1)_",19.5,",DIC(0)="NFL",DLAYGO=200,XQN="",XQUF=0 I '$D(^VA(200,XQM,19.5,0)) S ^(0)="^200.19P^^"
34 F XQK=0:0 S XQN=$O(^TMP($J,"OP",XQN)) Q:XQN="" D:'XQPRO CHCK I 'XQUF S (X,DINUM)=XQN D:$D(^VA(200,DA(1),19.5,X,0))[0 FILE^DICN S XQUF=0
35 Q
36 ;
37REM ;Remove delegated options from this delegate.
38 S DA(1)=XQM,DIK="^VA(200,"_DA(1)_",19.5,",XQN="",XQUF=0 F XQL=0:0 S XQN=$O(^TMP($J,"OP",XQN)) Q:XQN="" D:'XQPRO CHCK I 'XQUF S DA=XQN D:$D(^VA(200,DA(1),19.5,DA,0)) ^DIK S XQUF=0
39 Q
40 ;
41CHCK ;See if this person has this option before delegating it.
42 S:'$D(^VA(200,DUZ,19.5,XQN,0))#2 XQUF=1 I XQUF S XQON=^DIC(19,XQN,0)
43 Q
44 ;
45GIVOPT ; GIVE USER MENU SO HE CAN USE THE DELEGATED CAPABILITY
46 ;
47 S X="XQSMD USER MENU",DIC=19,DIC(0)="MX" D ^DIC Q:Y'>0
48 S XQSMDX=$P(Y,U,2),DA(1)=0 F I=1:1 S DA(1)=$O(XQHOLD(DA(1))) Q:DA(1)="" S X=XQSMDX,DIC="^VA(200,"_DA(1)_",203,",P=3.03,DIC(0)="ML",DLAYGO=200 S:'$D(@(DIC_"0)")) @(DIC_"0)")="^200.03P" D ^DIC
49 K XQSMDX
50 Q
51 ;
52OUT K DIC,DIK,DA,DISYS,DINUM,POP,XQ,XQD,XQH,XQI,XQJ,XQK,XQL,XQM,XQN,XQT,XQON,XQON0,XQAL,XQDATE,XQDEL,XQDT,XQLEV,XQLK,XQMG,XQMGR,XQNAM,XQNGO,XQUF,XQPRO,XQSTART,XQEND,XQHOLD,XQKEY,X,Y,XY,%,^TMP($J),C,XQU1L
53 Q
Note: See TracBrowser for help on using the repository browser.