source: WorldVistAEHR/trunk/r/VISTA_OFFICE_EHR-VEPE/VEPERI4.m@ 1195

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1VEPERI4 ;DAOU/WCJ - Incoming HL7 messages ;2-MAY-2005
2 ;;1.0;VOEB;;Jun 12, 2005
3 ;;;VISTA OFFICE/EHR;
4 ;;Per VHA Directive 10-93-142, this routine should not be modified.
5 ;
6 ;**Program Description**
7 ; Set up as INTERFACE,BILLING user.
8 ; If there isn't one, add one first
9 Q
10 ;
11 ; Sets up needed variables DUZ, DUZ(1), DUZ(2), DUZ("AG"), ...
12 ; for user INTERFACE,BILLING. If the user is not on file, it will
13 ; be added.
14 ;
15 ; Returns Fatal Error if BAD things happened
16 ;
17GETUSER(DUZ,FE,HLMTIEN) ;
18 S FE=0
19 D ADDUSR(.DUZ)
20 ;
21 I 'DUZ S FE=$$FATALERR^VEPERI6(1,"USER","CAN'T FIND/ADD INTERFACE,BILLING USER",HLMTIEN) Q
22 ;
23 D DUZ^XUP(DUZ)
24 Q
25 ;
26 ; This will add a user INTERFACE,BILLING to file 200.
27 ; DUZ which is passed in by reference will either be returned with
28 ; the entry number to 200 or a 0 if something bad happened.
29 ;
30ADDUSR(DUZ) ;
31 N DR,DIC,DIE,D0,X,Y,DA
32 N FDA,MSG,VER,ACC,MENU,IENS,IEN
33 ;
34 ; Check to see if User already exists
35 S DUZ=0
36 S X="INTERFACE,BILLING"
37 S Y=$$FIND1^DIC(200,"","B",X,"","")
38 ;
39 ; Found more than one. BAD
40 I Y="" Q
41 ;
42 ; Found one. GOOD
43 I Y>0 S DUZ=+Y Q
44 ;
45 ; Found none. Add New Person. OK
46 S DIC="^VA(200,",DIC(0)="L"
47 D FILE^DICN I Y<1 Q
48 S (DUZ,IEN)=+Y
49 ;
50 S $P(^VA(200,IEN,0),U,4)="@" ; give them real access
51 ;
52 ; add some fields to 200
53 S ACC="49668467798373",VER="738379354950678466"
54 S IENS=IEN_","
55 S FDA(200,IENS,200.05)=0
56 S FDA(200,IENS,200.04)=1
57 S FDA(200,IENS,1)="BCI"
58 S FDA(200,IENS,2)=ACC
59 S FDA(200,IENS,11)=VER
60 S FDA(200,IENS,7.2)=1
61 S FDA(200,IENS,201)="Systems Manager Menu"
62 K ^VA(200,"AOLD",ACC) ;Delete old Access code
63 K ^VA(200,IEN,"VOLD") ;Kill off old verify codes for user
64 D UPDATE^DIE("","FDA","IENS","MSG")
65 ;
66 ; add division to subfile
67 K FDA,MSG,IENS
68 S IENS="?2,"_IEN_","
69 S FDA(200.02,IENS,.01)="VISTA EHR"
70 S FDA(200.02,IENS,1)="Y"
71 D UPDATE^DIE("","FDA","IENS","MSG")
72 Q
Note: See TracBrowser for help on using the repository browser.