source: IHS-VA_UTILITIES-XB/trunk/XBSITE.m@ 1394

Last change on this file since 1394 was 642, checked in by Sam Habiel, 15 years ago

Modified directory structure; moved routines.

File size: 1.1 KB
Line 
1XBSITE ; IHS/ADC/GTH - SET "DUZ(2)" ; [ 02/07/97 3:02 PM ]
2 ;;4.0;XB;;Jul 20, 2009;Build 2
3 ;
4L1 ;
5 KILL DIC
6 G:$D(DUZ)=0!($D(DUZ)=10) ERRMSG
7 I ('$D(^DIC(3,DUZ,0))),('$D(^VA(200,DUZ,0))) G ERRMSG
8 I ('$D(^DIC(3,DUZ,2,0))),('$D(^VA(200,DUZ,2,0))) G ERRMSG1
9 I +DUZ(2)>0 S DIC("B")=$P(^DIC(4,DUZ(2),0),"^",1) G B1
10 S DIC("B")="Site set to zero (0) for Universal"
11B1 ;
12 W !!
13 D ASK
14 S SITENUM=DUZ(2)
15 KILL DIC("A"),DIC("B"),DA,DR,Y
16 Q
17 ;
18ASK ;
19 S DIC="^DIC(3,DUZ,2,",DIC("A")="Enter your facility's name: ",DIC(0)="QAEM"
20 I $D(^VA(200,DUZ,2,0)) S DIC="^VA(200,DUZ,2,"
21 D ^DIC
22 G:X["?" ASK
23 I X="^",$D(DIC("B")) W !,*7,"The default facility remains ",DIC("B"),!! Q
24 S DUZ(2)=+Y
25 I DUZ(2)<1 S DUZ(2)=$P(^AUTTSITE(1,0),U,1) W !,*7,"The default facility has been set to ",$P(^DIC(4,DUZ(2),0),"^",1),!!
26 S SITENUM=DUZ(2)
27 Q
28 ;
29SET ;PEP - Request Set of DUZ(2) from applications.
30 G L1
31 ;
32ERRMSG ;
33 W !!,"USER not set in DUZ - use KERNEL!"
34 Q
35 ;
36ERRMSG1 ;
37 W !!,"No Divisions (facilities) set in USER file!"
38 Q
39 ;
40ERRMSG2 ;
41 W !!,"That facility is not included in your Divisions field in the USER file!"
42 Q
43 ;
Note: See TracBrowser for help on using the repository browser.