-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
432 lines (401 loc) · 18.8 KB
/
config.py
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
# -*- coding: utf-8 -*-
"""
@author: Justin Okeke
Configuring Emails to be sent
"""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# email address(es) of OBS staff notified when after the emails are sent
notification_email = 'my_email@something.com'
# email address(es) of OBS staff who will follow-up with subjects who have
# EPDS issues
epds_fu_email = 'email@something.com; email2@something.com'
# email address of individual who is sending the emails - proxy email
sent_from_email = 'my_email@something.com'
# email address of the 'Sent on behalf of'
sent_on_behalf = 'something@something.com'
# OBS communal folder name
obs_outlook_folder = 'Ontario Birth Study (MSH)'
# sets the gestational threshold for when associated LSQ is sent
# e.g. when 'lsq1ga' : (11*7), LSQ1 will be sent after 11 weeks
lsq_given_ga = {
'lsq1ga': (11*7),
'lsq2ga': (26*7),
'lsq3ga': (46*7),
'lsq3dd': (6*7)
}
# sets the number of days after which a follow-up/reminder email will be sent
lsq_fu_days = (2*7)
# path to the contact list; must be forward slash
path_contact = (
'T:/filepath/'
'Patient contact information/Patient contact information.xlsx'
)
# path to file with LSQ links and emails; must be forward slash
path_link = (
"T:/filepath"
"Distribution Passwords Emails/LSQpasswords.csv"
)
# path to access database; must be backward slash
path_access = 'T:\filepath\Screening\Research Database.accdb'
# email information to be included in the LSQ emails
email_info = {
'LSQ(1)Given': {
'link_subject': ('Ontario Birth Study Lifestyle Questionnaire 1'),
'link_body': (
"Dear Ontario Birth Study participant:\n\nThank you for enrolling"
" in the Ontario Birth Study. As part of the study, you will be"
" asked to complete 3 Lifestyle Questionnaires and 1 Diet History"
" Questionnaire. These questionnaires are designed to improve"
" our understanding of mother's and infant's health during"
" pregnancy and how this influences health over the life"
" course.\nA link to Lifestyle Questionnaire 1 is below:\n\n"
"{}" # link place holder
" \n\nA separate email will be sent to this email address which"
" contains a password to access your personal Lifestyle"
" Questionnaire 1. \n\nYou will receive Lifestyle Questionnaire"
" 2 when you are approximately 28 weeks gestational age. If you"
" have any questions, feel free to contact the Ontario Birth"
" Study at ontariobirthstudy@mtsinai.on.ca or 416-586-4800 ext."
" 6036. Once again, thank you for participating in the Ontario"
" Birth Study. Without your help, this research would not be"
" possible.\n\nSincerely,\n\nThe Ontario Birth Study team"
),
'password_subject': (
'Ontario Birth Study Lifestyle Questionnaire 1 Password'
),
'password_body': (
"Dear Ontario Birth Study participant:\n\nYour password for"
" Lifestyle Questionnaire 1 is as follows:\n\n"
"{}"
" \n\nPlease click the link provided in the previous email and"
" enter the above password to access your personal Lifestyle"
" Questionnaire.\n\nSincerely,\n\nThe Ontario Birth Study team"
)
},
'LSQ(1)Followup1': {
'link_subject': (
"Ontario Birth Study Lifestyle Questionnaire 1 Follow-up"
),
'link_body': (
"Dear Ontario Birth Study participant:\n\nThis is just a reminder"
" that you have not completed your most recent Lifestyle"
" Questionnaire.\n\nA link to Lifestyle Questionnaire 1 is"
" below:\n\n"
"{}"
" \n\nA separate email will be sent to this email address which"
" contains a password to access your personal Lifestyle"
" Questionnaire 1. \n\nIf you have any questions, feel free to"
" contact the Ontario Birth Study at"
" ontariobirthstudy@mtsinai.on.ca or 416-586-4800 ext. 6036."
" \n\nSincerely,\n\nThe Ontario Birth Study team"
),
'password_subject': (
'Ontario Birth Study Lifestyle Questionnaire 1 Password'
),
'password_body': (
"Dear Ontario Birth Study participant:\n\nYour password for"
" Lifestyle Questionnaire 1 is as follows:\n\n"
"{}"
" \n\nPlease click the link provided in the previous email and"
" enter the above password to access your personal Lifestyle"
" Questionnaire.\n\nSincerely,\n\nThe Ontario Birth Study team"
)
},
'LSQ(1)Followup2': {
'link_subject': (
'Ontario Birth Study Lifestyle Questionnaire 1 Follow-up'
),
'link_body': (
"Dear Ontario Birth Study participant:\n\nThis is just a reminder"
" that you have not completed your most recent Lifestyle"
" Questionnaire.\n\nA link to Lifestyle Questionnaire 1 is"
" below:\n\n"
"{}"
" \n\nA separate email will be sent to this email address which"
" contains a password to access your personal Lifestyle"
" Questionnaire 1. \n\nIf you would like a paper copy of the"
" Lifestyle Questionnaire or if you have any questions, feel free"
" to contact the Ontario Birth Study at"
" ontariobirthstudy@mtsinai.on.ca or 416-586-4800 ext. 6036."
" \n\nSincerely,\n\nThe Ontario Birth Study team"
),
'password_subject': (
"Ontario Birth Study Lifestyle Questionnaire 1 Password"
),
'password_body': (
"Dear Ontario Birth Study participant:\n\nYour password for"
" Lifestyle Questionnaire 1 is as follows:\n\n"
"{}"
" \n\nPlease click the link provided in the previous email and"
" enter the above password to access your personal Lifestyle"
" Questionnaire.\n\nSincerely,\n\nThe Ontario Birth Study team"
)
},
'LSQ(1)Followup3': {
'link_subject': (
"Ontario Birth Study Lifestyle Questionnaire 1 Follow-up"
),
'link_body': (
"Dear Ontario Birth Study participant:\n\nThis is just a reminder"
" that you have not completed your most recent Lifestyle"
" Questionnaire.\n\nA link to Lifestyle Questionnaire 1 is"
" below:\n\n"
"{}"
" \n\nA separate email will be sent to this email address which"
" contains a password to access your personal Lifestyle"
" Questionnaire 1. \n\nIf you would like a paper copy of the"
" Lifestyle Questionnaire or if you have any questions,"
" feel free to contact the Ontario Birth Study at"
" ontariobirthstudy@mtsinai.on.ca or 416-586-4800 ext. 6036."
" \n\nSincerely,\n\nThe Ontario Birth Study team"
),
'password_subject': (
"Ontario Birth Study Lifestyle Questionnaire 1 Password"
),
'password_body': (
"Dear Ontario Birth Study participant:\n\nYour password for"
" Lifestyle Questionnaire 1 is as follows:\n\n"
"{}"
" \n\nPlease click the link provided in the previous email and"
" enter the above password to access your personal Lifestyle"
" Questionnaire.\n\nSincerely,\n\nThe Ontario Birth Study team"
)
},
'LSQ(2)Given': {
'link_subject': ("Ontario Birth Study Lifestyle Questionnaire 2"),
'link_body': (
"Dear Ontario Birth Study participant:\n\nIncluded below is a"
" link to the Ontario Birth Study Lifestyle Questionnaire 2:\n\n"
"{}"
" \n\nA separate email will be sent to this email address which"
" contains a password to access your personal Lifestyle"
" Questionnaire 2. \n\nYou will receive Lifestyle Questionnaire 3"
" when you are approximately 6 weeks postpartum. If you have any"
" questions, feel free to contact the Ontario Birth Study at"
" ontariobirthstudy@mtsinai.on.ca or 416-586-4800 ext. 6036."
" \n\nOnce again, thank you for participating in the Ontario"
" Birth Study. Without your help, this research would not be"
" possible.\n\nSincerely,\n\nThe Ontario Birth Study team"
),
'password_subject': (
"Ontario Birth Study Lifestyle Questionnaire 2 Password"
),
'password_body': (
"Dear Ontario Birth Study participant:\n\nYour password for"
" Lifestyle Questionnaire 2 is as follows:\n\n"
"{}"
" \n\nPlease click the link provided in the previous email and"
" enter the above password to access your personal Lifestyle"
" Questionnaire.\n\nSincerely,\n\nThe Ontario Birth Study team"
)
},
'LSQ(2)Followup1': {
'link_subject': (
'Ontario Birth Study Lifestyle Questionnaire 2 Follow-up'
),
'link_body': (
"Dear Ontario Birth Study participant:\n\nThis is just a reminder"
" that you have not completed your most recent Lifestyle"
" Questionnaire.\n\nA link to Lifestyle Questionnaire 2 is"
" below:\n\n"
"{}"
" \n\nA separate email will be sent to this email address which"
" contains a password to access your personal Lifestyle"
" Questionnaire 2. \n\nIf you have any questions, feel free to"
" contact the Ontario Birth Study at"
" ontariobirthstudy@mtsinai.on.ca or 416-586-4800 ext. 6036."
" \n\nSincerely,\n\nThe Ontario Birth Study team"
),
'password_subject': (
"Ontario Birth Study Lifestyle Questionnaire 2 Password"
),
'password_body': (
"Dear Ontario Birth Study participant:\n\nYour password for"
" Lifestyle Questionnaire 2 is as follows:\n\n"
"{}"
" \n\nPlease click the link provided in the previous email and"
" enter the above password to access your personal Lifestyle"
" Questionnaire.\n\nSincerely,\n\nThe Ontario Birth Study team"
)
},
'LSQ(2)Followup2': {
'link_subject': (
"Ontario Birth Study Lifestyle Questionnaire 2 Follow-up"
),
'link_body': (
"Dear Ontario Birth Study participant:\n\nThis is just a reminder"
" that you have not completed your most recent Lifestyle"
" Questionnaire.\n\nA link to Lifestyle Questionnaire 2 is"
" below:\n\n"
"{}"
" \n\nA separate email will be sent to this email address which"
" contains a password to access your personal Lifestyle"
" Questionnaire 2. \n\nIf you would like a paper copy of the"
" Lifestyle Questionnaire or if you have any questions, feel free"
" to contact the Ontario Birth Study at"
" ontariobirthstudy@mtsinai.on.ca or 416-586-4800 ext. 6036."
" \n\nSincerely,\n\nThe Ontario Birth Study team"
),
'password_subject': (
"Ontario Birth Study Lifestyle Questionnaire 2 Password"
),
'password_body': (
"Dear Ontario Birth Study participant:\n\nYour password for"
" Lifestyle Questionnaire 2 is as follows:\n\n"
"{}"
" \n\nPlease click the link provided in the previous email and"
" enter the above password to access your personal Lifestyle"
" Questionnaire.\n\nSincerely,\n\nThe Ontario Birth Study team"
)
},
'LSQ(2)Followup3': {
'link_subject': (
"Ontario Birth Study Lifestyle Questionnaire 2 Follow-up"
),
'link_body': (
"Dear Ontario Birth Study participant:\n\nThis is just a reminder"
" that you have not completed your most recent Lifestyle"
" Questionnaire.\n\nA link to Lifestyle Questionnaire 2"
" is below:\n\n"
"{}"
" \n\nA separate email will be sent to this email address which"
" contains a password to access your personal Lifestyle"
" Questionnaire 2. \n\nIf you would like a paper copy of the"
" Lifestyle Questionnaire or if you have any questions, feel"
" free to contact the Ontario Birth Study at"
" ontariobirthstudy@mtsinai.on.ca or 416-586-4800 ext. 6036."
" \n\nSincerely,\n\nThe Ontario Birth Study team"
),
'password_subject': (
"Ontario Birth Study Lifestyle Questionnaire 2 Password"
),
'password_body': (
"Dear Ontario Birth Study participant:\n\nYour password for"
" Lifestyle Questionnaire 2 is as follows:\n\n"
"{}"
" \n\nPlease click the link provided in the previous email and"
" enter the above password to access your personal Lifestyle"
" Questionnaire.\n\nSincerely,\n\nThe Ontario Birth Study team"
)
},
'LSQ(3)Given': {
'link_subject': ("Ontario Birth Study Lifestyle Questionnaire 3"),
'link_body': (
"Dear Ontario Birth Study participant: \n\nCongratulations on"
" your new baby! This is the last survey for the Ontario Birth"
" Study. Once you complete this survey, you have fulfilled your"
" obligations to this study. A link to the Lifestyle"
" Questionnaire 3 is below:\n\n"
"{}"
" \n\nA separate email will be sent to this email address which"
" contains a password to access your personal Lifestyle"
" Questionnaire 3. \n\nIf you have any questions, feel free to"
" contact the Ontario Birth Study at"
" ontariobirthstudy@mtsinai.on.ca or 416-586-4800 ext. 6036."
" \n\nOnce again, thank you for participating in the Ontario"
" Birth Study. Without your help, this research would not be"
" possible.\n\nSincerely,\n\nThe Ontario Birth Study team"
),
'password_subject': (
"Ontario Birth Study Lifestyle Questionnaire 3 Password"
),
'password_body': (
"Dear Ontario Birth Study participant:\n\nYour password for"
" Lifestyle Questionnaire 3 is as follows:\n\n"
"{}"
" \n\nPlease click the link provided in the previous email and"
" enter the above password to access your personal Lifestyle"
" Questionnaire.\n\nSincerely,\n\nThe Ontario Birth Study team"
)
},
'LSQ(3)Followup1': {
'link_subject': (
"Ontario Birth Study Lifestyle Questionnaire 3 Follow-up"
),
'link_body': (
"Dear Ontario Birth Study participant:\n\nThis is just a reminder"
" that you have not completed your most recent Lifestyle"
" Questionnaire.\n\nA link to Lifestyle Questionnaire 3 is"
" below:\n\n"
"{}"
" \n\nA separate email will be sent to this email address which"
" contains a password to access your personal Lifestyle"
" Questionnaire 3. \n\nIf you have any questions, feel free to"
" contact the Ontario Birth Study at"
" ontariobirthstudy@mtsinai.on.ca or 416-586-4800 ext. 6036."
" \n\nSincerely,\n\nThe Ontario Birth Study team"
),
'password_subject': (
"Ontario Birth Study Lifestyle Questionnaire 3 Password"
),
'password_body': (
"Dear Ontario Birth Study participant:\n\nYour password for"
" Lifestyle Questionnaire 3 is as follows:\n\n"
"{}"
" \n\nPlease click the link provided in the previous email and"
" enter the above password to access your personal Lifestyle"
" Questionnaire.\n\nSincerely,\n\nThe Ontario Birth Study team"
)
},
'LSQ(3)Followup2': {
'link_subject': (
"Ontario Birth Study Lifestyle Questionnaire 3 Follow-up"
),
'link_body': (
"Dear Ontario Birth Study participant:\n\nThis is just a reminder"
" that you have not completed your most recent Lifestyle"
" Questionnaire.\n\nA link to Lifestyle Questionnaire 3 is"
" below:\n\n"
"{}"
" \n\nA separate email will be sent to this email address which"
" contains a password to access your personal Lifestyle"
" Questionnaire 3. \n\nIf you would like a paper copy of the"
" Lifestyle Questionnaire or if you have any questions, feel free"
" to contact the Ontario Birth Study at"
" ontariobirthstudy@mtsinai.on.ca or 416-586-4800 ext. 6036."
" \n\nSincerely,\n\nThe Ontario Birth Study team"
),
'password_subject': (
"Ontario Birth Study Lifestyle Questionnaire 3 Password"
),
'password_body': (
"Dear Ontario Birth Study participant:\n\nYour password for"
" Lifestyle Questionnaire 3 is as follows:\n\n"
"{}"
" \n\nPlease click the link provided in the previous email and"
" enter the above password to access your personal Lifestyle"
" Questionnaire.\n\nSincerely,\n\nThe Ontario Birth Study team"
)
},
'LSQ(3)Followup3': {
'link_subject': (
"Ontario Birth Study Lifestyle Questionnaire 3 Follow-up"
),
'link_body': (
"Dear Ontario Birth Study participant:\n\nThis is just a reminder"
" that you have not completed your most recent Lifestyle"
" Questionnaire.\n\nA link to Lifestyle Questionnaire 3 is"
" below:\n\n"
"{}"
" \n\nA separate email will be sent to this email address which"
" contains a password to access your personal Lifestyle"
" Questionnaire 3. \n\nIf you would like a paper copy of the"
" Lifestyle Questionnaire or if you have any questions, feel free"
" to contact the Ontario Birth Study at"
" ontariobirthstudy@mtsinai.on.ca or 416-586-4800 ext. 6036."
" \n\nSincerely,\n\nThe Ontario Birth Study team"
),
'password_subject': (
"Ontario Birth Study Lifestyle Questionnaire 3 Password"
),
'password_body': (
"Dear Ontario Birth Study participant:\n\nYour password for"
" Lifestyle Questionnaire 3 is as follows:\n\n"
"{}"
" \n\nPlease click the link provided in the previous email and"
" enter the above password to access your personal Lifestyle"
" Questionnaire.\n\nSincerely,\n\nThe Ontario Birth Study team"
)
},
}