-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.json
211 lines (193 loc) · 8.41 KB
/
config.json
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
{
"name": "Enhanced SMS Conversation",
"namespace": "Stanford\\EnhancedSMSConversation",
"description": "This module mimics the built-in REDCap SMS survey conversation but adds more flexibility around reminders, expiration, and custom context based on event/instance.",
"documentation": "README.md",
"framework-version": 11,
"authors": [
{
"name": "Andrew Martin",
"email": "andy123@stanford.edu",
"institution": "Stanford"
},
{
"name": "Jae Lee",
"email": "jael@stanford.edu",
"institution": "Stanford"
}
],
"permissions": [
"redcap_email",
"redcap_module_link_check_display"
],
"enable-every-page-hooks-on-system-pages": false,
"links": {
"project": [
{
"name": "ESMS Conversations",
"icon": "fas fa-cog",
"url": "pages/conversations.php",
"show-header-and-footer": true
},
{
"name": "ESMS: Superuser Testing",
"superuseronly": true,
"icon": "fas fa-cog",
"url": "pages/superuser_test.php"
},
{
"name": "Enhanced SMS Conversation: test",
"icon": "fas fa-cog",
"url": "test.php"
}
],
"control-center": [
]
},
"no-auth-pages": [
"pages/inbound"
],
"no-csrf-pages": [
"pages/inbound"
],
"auth-ajax-actions": [
"getConversations",
"deleteConversations",
"refreshConversations"
],
"crons": [
{
"cron_name": "esms_scan_conversation_state",
"cron_description": "This cron will run once a minute to check whether a reminder or expiry needs to go out to any existing conversations",
"method": "cronScanConversationState",
"cron_frequency": "60",
"cron_max_run_time": "3600"
}
],
"enable-no-auth-logging": true,
"enable-email-hook-in-system-contexts": true,
"project-settings": [
{
"key": "phone-field",
"name": "<b>Phone Field</b><br>Field containing the participants phone number validated as a phone number.",
"required": true,
"type": "field-list"
},
{
"key": "phone-field-event-id",
"name": "<b>Phone Field Event</b><br>If project is longitudinal, please select the event containing the phone field",
"required": false,
"type": "event-list"
},
{
"key": "twilio-number",
"name": "<b>Twilio Number</b><br>In E.164 format, e.g. +16508675309",
"required": true,
"type": "text"
},
{
"key": "twilio-sid",
"name": "<b>Twilio API SID</b>",
"required": true,
"type": "text"
},
{
"key": "twilio-token",
"name": "<b>Twilio API Token</b>",
"required": true,
"type": "password"
},
{
"key": "default-conversation-reminder-minutes",
"name": "<b>Reminder Delay</b><br><i>(optional)</i> If set to a value, conversations will sent a reminder message after this number of minutes without a response. The counter restarts after each participant response.",
"required": false,
"type": "text"
},
{
"key": "reminder-text-warning",
"name": "<b>Missing Text Reminder</b><br>After the allowed reminder time has elapsed, this message will be included in the reminder message in this format. <br> <THIS MESSAGE><ORIGINAL TEXT><TEXTING INSTRUCTIONS>",
"required": false,
"type": "text"
},
{
"key": "default-conversation-expiry-minutes",
"name": "<b>Expire Conversations</b><br><i>(optional)</i> If set to a value, conversations will expire after this number of minutes without a response. If blank, the conversation/survey will never expire. To decrease server load, we recommend setting an expiration, even if it is very large",
"required": false,
"type": "text"
},
{
"key": "default-expiry-text",
"name": "<b>Default Expiry Text</b><br>If an active conversation expires, this message will be sent to the user.",
"required": true,
"type": "text"
},
{
"key": "nonsense-text-warning",
"name": "<b>Default Nonsense Text Warning</b><br><br>Upon receipt of a text that does not match an expected response, this message will be included in the reply message in this format. <br> <THIS MESSAGE><CURRENT QUESTION INSTRUCTIONS><br>This value can be overridden on a per-question basis using the actiontag, <i>e.g.</i> <code>@ESMS-INVALID-RESPONSE=\"You must enter a number between 5 and 10\"</code>",
"required": true,
"type": "text"
},
{
"key": "no-open-conversation-message",
"name": "<b>No Open Conversation Message</b><br><br><i>(optional)</i> If a participant sends a SMS message when no conversation/survey is open, this message, if defined, will be sent in reply. A good value might be: <code>No surveys are currently available. Please wait until your next invitation or contact the study team. Your responses are not actively monitored.</code>",
"required": false,
"type": "text"
},
{
"key": "sms-opt-out-field",
"name": "<b>SMS Opt Out field</b><br>This must be a checkbox field with an option of '1, Opted Out'. If unchecked, the participant is assumed to be available. If checked, the participant has opted out and messages will no longer be delivered. A participant can opt-out by replying with 'STOP' or 'OPT-OUT' and can opt back into messaging by replying with 'START'",
"required": true,
"type": "field-list"
},
{
"key": "sms-opt-out-field-event-id",
"name": "<b>SMS Opt Out field Event ID</b><br>If project is longitudinal, please select the event containing the SMS Opt Out field",
"required": false,
"type": "event-list"
},
{
"key": "study-withdrawn-logic",
"name": "<b>Study Withdrawn Logic</b><br><i>(Optional)</i> If specified, this LOGICAL EXPRESSION will be evaluated prior to sending outbound messages. If the result is TRUE, the participant is deemed to be withdrawn from the study and outbound messages will not be sent. Stopping SMS does not necessarily withdraw person from study. If longitudinal, be sure to include event info in the logical expression.<br><i>e.g.</i><code>[event_1_arm_1][calc_withdrawn]='1'</code>",
"required": false,
"type": "text"
},
{
"key": "disable-outgoing-sms",
"name": "<b>Disable Outgoing Twilio SMS</b><br><i>(optional)</i> If checked, module will prevent ALL outbound SMS messages for this project regardless of record opt-out status",
"required": true,
"type": "checkbox"
},
{
"key": "disable-incoming-sms",
"name": "<b>Disable Incoming Twilio SMS</b><br><i>(optional)</i> If checked, module will not process inbound twilio messages",
"required": true,
"type": "checkbox"
},
{
"key": "enable-project-debug-logging",
"name": "<b>Enable Debug Logging</b><br><i>(optional)</i> Requires installation and configuration of emLogger",
"required": false,
"type": "checkbox"
}
],
"system-settings": [
{
"key": "ignore-cron",
"name": "<b>Ignore Cron (system-wide)</b><i>(optional)</i> If checked, we will not run the cron method",
"required": false,
"type": "checkbox"
},
{
"key": "enable-system-debug-logging",
"name": "<b>Enable Debug Logging (system-wide)</b><i>(optional)</i> Requires installation and configuration of emLogger",
"required": false,
"type": "checkbox"
}
],
"compatibility": {
"php-version-min": "",
"php-version-max": "",
"redcap-version-min": "",
"redcap-version-max": ""
}
}