-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.json
200 lines (200 loc) · 9.45 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
{
"name": "Copy Data on Save",
"namespace": "MCRI\\CopyDataOnSave",
"description": "Copy data from one place to another when you save a form. You can set up multiple copy processes to different projects or even to other fields in the same project.",
"authors": [
{
"name": "Luke Stevens",
"email": "luke.stevens@mcri.edu.au",
"institution": "Murdoch Children's Research Institute"
}
],
"framework-version": 14,
"project-settings": [
{
"key": "summary-page",
"name": "<div style=\"display:inline-block;width:392px;\">View summary of copy instructions:</div><div style=\"display:inline-block;width:200px;\"><a class=\"btn btn-sm btn-primaryrc\" style=\"color:#fff;\" target=\"_blank\" href=\"#\">Open<i class=\"fas fa-external-link-alt ml-1\"></i></a></div>",
"type": "descriptive"
},
{
"key": "section-header",
"name": "<div class=\"blue text-center\" style=\"position:relative;left:-8px;width:733px\">Copy Instructions</div>",
"type": "descriptive"
},
{
"key": "copy-config",
"name": "<span class=\"fs-6 badge bg-primary\">Copy Configuration</span>",
"required": false,
"type": "sub_settings",
"repeatable": true,
"sub_settings": [
{
"key": "section-description",
"name": "Name / Description (Optional)",
"required": false,
"type": "textarea"
},
{
"key": "copy-enabled",
"name": "Enabled?",
"type": "checkbox"
},
{
"name": "<div class=\"blue text-center\">Trigger and Destination</div>",
"key": "header-trigger",
"type": "descriptive"
},
{
"name": "Trigger form(s)<br>Evaluate trigger logic on save of this form",
"key": "trigger-form",
"repeatable": true,
"type": "form-list"
},
{
"name": "Trigger condition (REDCap logic syntax)<br>(Optional - leave empty to always copy.)",
"key": "trigger-logic",
"required": false,
"type": "text"
},
{
"name": "Destination project<br>(Can be <i>this</i> project)",
"key": "dest-project",
"required": true,
"type": "project-id"
},
{
"name": "Destination event unique name<br>(Optional - leave empty if destination not longitudinal or copying to first event)",
"key": "dest-event",
"required": false,
"type": "text"
},
{
"name": "<div class=\"blue text-center\">Destination Record</div>",
"key": "header-record",
"type": "descriptive"
},
{
"name": "Field containing record id for destination<br>(Use the value from this field to find the record in the destination project.)",
"key": "record-id-field",
"required": true,
"type": "field-list"
},
{
"key": "record-create",
"name": "Record matching option<ul><li>Match record id (do not create):<br><span class=\"text-muted\">Copy to record id saved to the field specified above. If no matching record found then do nothing.</span></li><li>Match record id (create matching):<br><span class=\"text-muted\">Copy to record id saved to the field specified above. If no matching record found then create one with matching record id.</span></li><li>Match record id (create auto-numbered):<br><span class=\"text-muted\">Copy to record id saved to the field specified above. If no value is present in the field then create an auto-numbered record in the destination and save the created record id to the field specified above. If a value is present and does not match a record in the destination, do nothing.</span></li><li>Look up via secondary unique field:<br><span class=\"text-muted\">Find a record with the value from the field specified above in the secondary unique field of the destination project. If no match is found, do nothing.</span></li></ul>",
"type": "dropdown",
"required": true,
"choices": [
{ "value": "0", "name": "Match record id (do not create)" },
{ "value": "1", "name": "Match record id (create matching)" },
{ "value": "2", "name": "Match record id (create auto-numbered)" },
{ "value": "3", "name": "Look up via secondary unique field" } ]
},
{
"name": "<div class=\"blue text-center\">DAG Options</div>",
"key": "header-dag",
"type": "descriptive"
},
{
"name": "Data Access Group option",
"key": "dag-option",
"type": "dropdown",
"required": true,
"choices": [
{ "value": "0", "name": "Ignore or N/A" },
{ "value": "1", "name": "Include DAG in copy" },
{ "value": "2", "name": "Map source to destination" }
]
},
{
"name": "<div class=\"text-muted\">DAG mapping notes:<ul><li class=\"font-weight-bold\">Utilised for DAG option \"Map source to destination\" only.</li><li>Do not enter settings here if no DAGs to copy or if DAG names match.</li><li>Source DAGs not listed here will be ignored and there will be no DAG assigned in the destination.</li><li>Mapping multiple source DAGs to a single destination DAG is perfectly legitimate...</li><li>Mapping a source DAG to multiple destination DAGs is not. The last one wins.</li><li>(And yes, it would good if this could be hidden except when needed)</li></ul></div>",
"key": "dag-map-desc",
"type": "descriptive"
},
{
"name": "<span class=\"text-muted\">DAG mapping</span>",
"key": "dag-map",
"type": "sub_settings",
"repeatable": true,
"sub_settings": [
{
"name": "<span class=\"text-muted\">DAG in source project</span>",
"key": "source-dag",
"required": false,
"type": "dag-list"
},
{
"name": "<span class=\"text-muted\">DAG unique name in destination project</span>",
"key": "dest-dag",
"required": false,
"type": "text"
}
]
},
{
"name": "<div class=\"blue text-center\">Copy Specification</div>",
"key": "header-copy",
"type": "descriptive"
},
{
"name": "Copy field",
"key": "copy-fields",
"type": "sub_settings",
"repeatable": true,
"sub_settings": [
{
"name": "Field in source project",
"key": "source-field",
"required": true,
"type": "field-list"
},
{
"name": "Destination field name",
"key": "dest-field",
"required": true,
"type": "text"
},
{
"name": "Copy only if destination field empty (don't update)?",
"key": "only-if-empty",
"type": "checkbox"
}
]
}
]
},
{
"name": "<div class=\"my-2 gray text-center\" style=\"width:733px;\">End of copy configuration instructions</div>",
"key": "spacer-end-instructions",
"type": "descriptive"
},
{
"name": "<div class=\"my-2 gray text-center\" style=\"width:733px;\">Additional Configuration Options</div>",
"key": "spacer-other-options",
"type": "descriptive"
},
{
"name": "Delay module execution<br><span class=\"text-muted\">Use this option to ensure that data copying instructions above occur <em>after</em> other <code>redcap_save_record()</code> module process, such as \"Realtime Randomization\" or \"REDCap REST\" API calls",
"key": "delay",
"type": "checkbox"
},
{
"name": "Include save data in logging?<br><span class=\"text-muted\">Use this for troubleshooting/debugging only.</span>",
"key": "log-copy-contents",
"type": "checkbox",
"super-users-only": true
},
{
"key": "header-fail-alert",
"name": "<h4><span class='text-lg badge badge-lg badge-primary'>Failure Alerts</span></h4>Alert these people if process fails",
"type": "descriptive"
},
{
"key": "fail-alert-email",
"name": "Email address of failure alert recipient",
"required": false,
"type": "email",
"repeatable": true
}
]
}