source: FOIAVistA/trunk/r/BAR_CODE_MED_ADMIN-ALPB-PSB/ALPBGEN2.m@ 1635

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1ALPBGEN2 ;SFVAMC/JC - Init New Person Data on Workstations ;05/12/2003 07:40
2 ;;3.0;BAR CODE MED ADMIN;**8**;Mar 2004
3 ;
4 ; Reference/IA
5 ; DEQUE^XUSERP/4511
6 ;
7INIT ;Initial Load
8 N DIR,DTOUT,DUOUT,X,Y,ZTDESC,ZTIO,ZTRTN,ZTSAVE,ZTSK
9 ;Populate workstations with Vista New Person data
10 W !,"This option searches for users that hold the option, 'PSB GUI CONTEXT - USER'"
11 W !,"and if they are active users, transmits the information to your BCMA Backup Workstations."
12 W !,"NOTE that you must have completed the step of assigning workstations to either a"
13 W !,"single default group or by division."
14 W !!,"Do you wish to continue?" S DIR(0)="YA",DIR("B")="YES" D ^DIR
15 Q:Y<1!($D(DTOUT))!($D(DUOUT))
16 W !!,"Do you wish to queue this init?" S DIR(0)="YA",DIR("B")="YES" D ^DIR
17 Q:($D(DTOUT))!($D(DUOUT))
18 I Y D Q
19 . S ZTRTN="Q^ALPBGEN2",ZTDESC="BCBU New Person Init",ZTSAVE("*")="",ZTIO=""
20 . D ^%ZTLOAD I $D(ZTSK) W !,"TASK #: ",ZTSK
21Q ;
22 N ALPBI,ALPBJ,ALPBK
23 S DTS=$$FMTE^XLFDT($$NOW^XLFDT)
24 S (ALPBK)=0,ALPBJ="" F S ALPBJ=$O(^VA(200,ALPBJ)) Q:ALPBJ="" D
25 . Q:+ALPBJ<1
26 . I $$ISBCMA(ALPBJ)>0 D
27 . . I '$D(ZTSK) W !,ALPBJ_" "_$P(^VA(200,ALPBJ,0),U)
28 . . D DEQUE^XUSERP(ALPBJ,1)
29 . . K HLA,HL
30 . . S ALPBK=$G(ALPBK)+1
31 K XQA,XQAMSG
32 S DTE=$$FMTE^XLFDT($$NOW^XLFDT)
33 S XQA(DUZ)=""
34 S XQAMSG="BCBU INIT Start:"_DTS_" Finish:"_DTE_". "_ALPBK_" users sent."
35 D SETUP^XQALERT
36 K DTS,DTE,ALPBK
37 Q
38ISBCMA(USER) ;Does this person have BCMA access?
39 ;Returns 0 if no such user
40 ;user terminated or no access code
41 ;no option in file
42 ;no access due to locks
43 ;Returns 1 if user has the PSB GUI CONTEXT - USER option
44 N OPT
45 S DIC="^DIC(19,",DIC(0)="MX",X="PSB GUI CONTEXT - USER"
46 D ^DIC K DIC,DA,DR
47 I +Y<1 Q 0
48 S OPT=+Y
49 Q $$ACCESS^XQCHK(USER,OPT)
Note: See TracBrowser for help on using the repository browser.