-
Notifications
You must be signed in to change notification settings - Fork 1
/
ClinicSetup.py.in
195 lines (191 loc) · 4.71 KB
/
ClinicSetup.py.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
'''
Created on Jun 19, 2012
@author: bcaine
This script sets up three clinics that allow scheduling.
The clinics created here are open 7 days a week and each one is open for 8 hours a day
Clinic1: 0000-0800
Clinic2: 0800-1600
Clinic3: 1600-2400
'''
import sys
import time
sys.path = ['${VISTA_SOURCE_DIR}/lib/vista'] + sys.path
from OSEHRAHelper import ConnectToMUMPS, PROMPT
VistA = ConnectToMUMPS("${VISTA_BINARY_DIR}/Testing/Log/ClinicSetup.log","${INSTANCE}","${NAMESPACE}")
if ('' and ''):
VistA.login('', '')
if VistA.type == 'cache':
try:
VistA.ZN('VISTA')
except IndexError, no_namechange:
pass
VistA.wait(PROMPT, 60)
clinic = ['Clinic1', 'Clinic2', 'Clinic3']
clinic_abr = ['C1', 'C2', 'C3']
start_time = ['0', '8', '16']
time = ['0000-0800', '0800-1600', '1600-2400']
for x in range(0,3):
VistA.write('W $$NOSEND^VAFHUTL')
VistA.wait('0')
VistA.write('S DUZ=1 D ^XUP')
VistA.wait('OPTION NAME:')
VistA.write('SDBUILD')
VistA.wait('CLINIC NAME:')
VistA.write(clinic[x])
VistA.wait('LOCATION?')
VistA.write('Yes')
VistA.wait('NAME:')
VistA.write('')
VistA.wait('ABBREVIATION')
VistA.write(clinic_abr[x])
VistA.wait('FACILITY?')
VistA.write('')
VistA.wait('SERVICE:')
VistA.write('MEDICINE')
VistA.wait('CLINIC?')
VistA.write('N')
VistA.wait('NUMBER:')
VistA.write('303')
VistA.wait('TYPE:')
VistA.write('')
VistA.wait('MEDS?')
VistA.write('')
VistA.wait('TELEPHONE')
VistA.write('')
VistA.wait('FILMS?')
VistA.write('Yes')
VistA.wait('PROFILES?')
VistA.write('Yes')
for a in range(0, 4):
VistA.wait('LETTER:')
VistA.write('')
VistA.wait('TIME:')
VistA.write('Yes')
VistA.wait('PROVIDER')
VistA.write('Alexander')
VistA.wait('LOCATION')
VistA.write('Yes')
VistA.wait('PROVIDER')
VistA.write('')
VistA.wait('PROVIDER')
VistA.write('')
VistA.wait('PRACTITIONER?')
VistA.write('')
VistA.wait('DIAGNOSIS')
VistA.write('')
VistA.wait('CHK OUT:')
VistA.write('')
VistA.wait('NO-SHOWS:')
VistA.write('10')
VistA.wait('BOOKING')
VistA.write('365')
VistA.wait('BEGINS:')
VistA.write(start_time[x])
VistA.wait('REBOOK:')
VistA.write('')
VistA.wait('REBOOK:')
VistA.write('365')
VistA.wait('HOLIDAYS')
VistA.write('Yes')
VistA.wait('CODE:')
VistA.write('303')
VistA.wait('CLINIC')
VistA.write('')
VistA.wait('LOCATION')
VistA.write('')
VistA.wait('CLINIC')
VistA.write('')
VistA.wait('MAXIMUM')
VistA.write('4')
VistA.wait('INSTRUCTIONS')
VistA.write('')
VistA.wait('LENGTH')
VistA.write('30')
VistA.wait('LENGTH')
VistA.write('')
VistA.wait('HOUR')
VistA.write('2')
VistA.wait('DATE:')
VistA.write('t')
VistA.wait('TIME:')
VistA.write(time[x])
VistA.wait('SLOTS:')
VistA.write('16')
VistA.wait('TIME:')
VistA.write('')
VistA.wait('INDEFINITELY')
VistA.write('Yes')
VistA.wait('DATE:')
VistA.write('t+1')
VistA.wait('TIME:')
VistA.write(time[x])
VistA.wait('SLOTS:')
VistA.write('16')
VistA.wait('TIME:')
VistA.write('')
VistA.wait('INDEFINITELY')
VistA.write('Yes')
VistA.wait('DATE:')
VistA.write('t+2')
VistA.wait('TIME:')
VistA.write(time[x])
VistA.wait('SLOTS:')
VistA.write('16')
VistA.wait('TIME:')
VistA.write('')
VistA.wait('INDEFINITELY')
VistA.write('Yes')
VistA.wait('DATE:')
VistA.write('t+3')
VistA.wait('TIME:')
VistA.write(time[x])
VistA.wait('SLOTS:')
VistA.write('16')
VistA.wait('TIME:')
VistA.write('')
VistA.wait('INDEFINITELY')
VistA.write('Yes')
VistA.wait('DATE:')
VistA.write('t+4')
VistA.wait('TIME:')
VistA.write(time[x])
VistA.wait('SLOTS:')
VistA.write('16')
VistA.wait('TIME:')
VistA.write('')
VistA.wait('INDEFINITELY')
VistA.write('Yes')
VistA.wait('DATE:')
VistA.write('t+5')
VistA.wait('TIME:')
VistA.write(time[x])
VistA.wait('SLOTS:')
VistA.write('16')
VistA.wait('TIME:')
VistA.write('')
VistA.wait('INDEFINITELY')
VistA.write('Yes')
VistA.wait('DATE:')
VistA.write('t+6')
VistA.wait('TIME:')
VistA.write(time[x])
VistA.wait('SLOTS:')
VistA.write('16')
VistA.wait('TIME:')
VistA.write('')
VistA.wait('INDEFINITELY')
VistA.write('Yes')
VistA.wait('DATE:')
VistA.write('t+7')
VistA.wait('TIME:')
VistA.write(time[x])
VistA.wait('SLOTS:')
VistA.write('16')
VistA.wait('TIME:')
VistA.write('')
VistA.wait('INDEFINITELY')
VistA.write('Yes')
VistA.wait('DATE:')
VistA.write('')
VistA.wait('NAME:')
VistA.write('')