-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcanonical_study.schema.json
More file actions
462 lines (462 loc) · 16.4 KB
/
Copy pathcanonical_study.schema.json
File metadata and controls
462 lines (462 loc) · 16.4 KB
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
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CanonicalStudyDesignSchema",
"description": "Formal JSON Schema for StitchEDC study definitions, covering protocol description, trial design, data collection structure, logic constraints, rules, roles, and review audit blocks.",
"type": "object",
"properties": {
"protocol": { "$ref": "#/definitions/protocol_identity" },
"design_descriptors": { "$ref": "#/definitions/design_descriptors" },
"stages": {
"type": "array",
"items": { "$ref": "#/definitions/stage" }
},
"arms": {
"type": "array",
"items": { "$ref": "#/definitions/arm" }
},
"stratification": {
"type": "array",
"items": { "$ref": "#/definitions/stratification" }
},
"eligibility": { "$ref": "#/definitions/structured_eligibility" },
"endpoints": {
"type": "array",
"items": { "$ref": "#/definitions/endpoint" }
},
"estimands": {
"type": "array",
"items": { "$ref": "#/definitions/estimand" }
},
"epochs": {
"type": "array",
"items": { "$ref": "#/definitions/epoch" }
},
"events": {
"type": "array",
"items": { "$ref": "#/definitions/event" }
},
"forms": {
"type": "array",
"items": { "$ref": "#/definitions/form" }
},
"item_groups": {
"type": "array",
"items": { "$ref": "#/definitions/item_group" }
},
"fields": {
"type": "array",
"items": { "$ref": "#/definitions/field" }
},
"code_lists": {
"type": "array",
"items": { "$ref": "#/definitions/code_list" }
},
"visit_form_matrix": {
"type": "array",
"items": { "$ref": "#/definitions/visit_form_link" }
},
"edit_checks": {
"type": "array",
"items": { "$ref": "#/definitions/edit_check" }
},
"derivations": {
"type": "array",
"items": { "$ref": "#/definitions/derivation" }
},
"roles": {
"type": "array",
"items": { "$ref": "#/definitions/role" }
},
"door_rankings": {
"type": "array",
"items": { "$ref": "#/definitions/door_ranking" }
},
"analysis_gates": {
"type": "array",
"items": { "$ref": "#/definitions/analysis_gate" }
},
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": [
"protocol",
"design_descriptors",
"stages",
"arms",
"stratification",
"eligibility",
"endpoints",
"estimands",
"epochs",
"events",
"forms",
"item_groups",
"fields",
"code_lists",
"visit_form_matrix",
"edit_checks",
"derivations",
"roles",
"door_rankings",
"analysis_gates"
],
"definitions": {
"provenance": {
"type": "object",
"description": "Review and confidence metadata metadata block for AI tracking and human override tracking.",
"properties": {
"confidence_score": {
"type": "number",
"minimum": 0.0,
"maximum": 1.0
},
"model_generator": { "type": "string" },
"timestamp": { "type": "string", "format": "date-time" },
"reviewed_by": { "type": ["string", "null"] },
"review_status": {
"type": "string",
"enum": ["unreviewed", "partially_reviewed", "approved", "rejected"]
},
"comments": { "type": "string" }
},
"required": ["confidence_score", "model_generator", "timestamp", "review_status"]
},
"protocol_identity": {
"type": "object",
"description": "Core identity elements mapping a clinical protocol.",
"properties": {
"protocol_id": { "type": "string" },
"title": { "type": "string" },
"phase": {
"type": "string",
"enum": ["I", "Ib", "II", "IIa", "IIb", "III", "IV", "l", "ll", "lll", "lV"]
},
"sponsor": { "type": "string" },
"therapeutic_area": { "type": "string" },
"target_enrollment": { "type": "integer", "minimum": 1 },
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["protocol_id", "title", "phase", "therapeutic_area", "target_enrollment"]
},
"design_descriptors": {
"type": "object",
"description": "Comprehensive flags for structural features specifying MAMS, non-inferiority, masking and seamless transitions.",
"properties": {
"is_mams": { "type": "boolean", "description": "Is Multi-Arm Multi-Stage design?" },
"masking": {
"type": "string",
"enum": ["open-label", "single-blind", "double-blind", "triple-blind"]
},
"is_non_inferiority": { "type": "boolean" },
"non_inferiority_margin": {
"type": ["number", "null"],
"description": "Defined noninferiority boundary percentage or limit if applicable."
},
"is_seamless": { "type": "boolean", "description": "Is a seamless Phase II/III adaptive design transition?" },
"randomization_style": { "type": "string" },
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["is_mams", "masking", "is_non_inferiority", "is_seamless", "randomization_style"]
},
"stage": {
"type": "object",
"description": "Trial Adaptive Stage mapping rules, endpoints, or timing blocks.",
"properties": {
"stage_id": { "type": "string" },
"name": { "type": "string" },
"seq_number": { "type": "integer" },
"gate_oids": {
"type": "array",
"items": { "type": "string" },
"description": "References to analysis_gates ruling transitions out of this stage."
},
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["stage_id", "name", "seq_number"]
},
"arm": {
"type": "object",
"description": "Subject treatment pathways linked cleanly to trial stages.",
"properties": {
"arm_id": { "type": "string" },
"name": { "type": "string" },
"code": { "type": "string" },
"stage_ids": {
"type": "array",
"items": { "type": "string" },
"description": "Wired stages that this study arm lives in."
},
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["arm_id", "name", "code", "stage_ids"]
},
"stratification": {
"type": "object",
"description": "Details key variables guiding randomization stratification.",
"properties": {
"stratum_id": { "type": "string" },
"name": { "type": "string" },
"factor_field_id": { "type": "string", "description": "Field ID that forms the stratification source" },
"levels": {
"type": "array",
"items": { "type": "string" }
},
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["stratum_id", "name", "factor_field_id", "levels"]
},
"structured_eligibility": {
"type": "object",
"description": "Formalizing Inclusion and Exclusion protocols.",
"properties": {
"inclusion_rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"criterion": { "type": "string" },
"field_id": { "type": "string", "description": "The target field which must resolve to validating value" }
},
"required": ["id", "criterion", "field_id"]
}
},
"exclusion_rules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": { "type": "string" },
"criterion": { "type": "string" },
"field_id": { "type": "string" }
},
"required": ["id", "criterion", "field_id"]
}
},
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["inclusion_rules", "exclusion_rules"]
},
"endpoint": {
"type": "object",
"description": "Formal trial endpoints, either standard clinical read or multi-criteria structures like DOOR.",
"properties": {
"endpoint_id": { "type": "string" },
"type": {
"type": "string",
"enum": ["primary", "secondary", "exploratory"]
},
"description": { "type": "string" },
"is_door": { "type": "boolean", "description": "Is this a Desirability of Outcome Ranking endpoint?" },
"door_ranking_oid": {
"type": ["string", "null"],
"description": "Reference OID key to formal DOOR rank tables."
},
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["endpoint_id", "type", "description", "is_door"]
},
"estimand": {
"type": "object",
"description": "The precise scientific formulation of the trial question.",
"properties": {
"estimand_id": { "type": "string" },
"population": { "type": "string" },
"treatment_variable": { "type": "string" },
"endpoint_id": { "type": "string", "description": "Points to endpoint OID" },
"intercurrent_handling": { "type": "string" },
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["estimand_id", "population", "treatment_variable", "endpoint_id", "intercurrent_handling"]
},
"epoch": {
"type": "object",
"description": "Grouping timeline bounds, e.g. Screening/Enrichment, Active, Safety Washout.",
"properties": {
"epoch_id": { "type": "string" },
"name": { "type": "string" },
"sequence": { "type": "integer" },
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["epoch_id", "name", "sequence"]
},
"event": {
"type": "object",
"description": "Encounter visit structures mapping target timeline moments.",
"properties": {
"event_id": { "type": "string" },
"name": { "type": "string" },
"epoch_id": { "type": "string", "description": "The epoch that bounds this event" },
"window": { "type": "string" },
"day_offset": { "type": "integer" },
"type": {
"type": "string",
"enum": ["Screening", "Baseline", "Treatment", "FollowUp", "EndOfStudy"]
},
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["event_id", "name", "epoch_id", "window", "day_offset", "type"]
},
"form": {
"type": "object",
"description": "Case Report Form template grouping logical attributes.",
"properties": {
"form_id": { "type": "string" },
"name": { "type": "string" },
"cdisc_domain": { "type": "string" },
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["form_id", "name", "cdisc_domain"]
},
"item_group": {
"type": "object",
"description": "Sub-structural block layout inside forms.",
"properties": {
"item_group_id": { "type": "string" },
"form_id": { "type": "string", "description": "Form ID scoping this group" },
"name": { "type": "string" },
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["item_group_id", "form_id", "name"]
},
"field": {
"type": "object",
"description": "Individual variable definition with formal typing attributes.",
"properties": {
"field_id": { "type": "string" },
"form_id": { "type": "string" },
"item_group_id": { "type": "string", "description": "The inner group wrapping the field" },
"name": { "type": "string" },
"data_type": {
"type": "string",
"enum": ["Date", "Integer", "Float", "Text", "Boolean", "Coded"]
},
"unit": { "type": ["string", "null"] },
"required": { "type": "boolean" },
"code_list_id": {
"type": ["string", "null"],
"description": "Refers to formal code_lists definition OID if coded"
},
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["field_id", "form_id", "item_group_id", "name", "data_type", "required"]
},
"code_list": {
"type": "object",
"description": "Durable schema vocabulary codelists containing key decode pairs.",
"properties": {
"code_list_id": { "type": "string" },
"name": { "type": "string" },
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": { "type": "string" },
"decode": { "type": "string" }
},
"required": ["code", "decode"]
}
},
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["code_list_id", "name", "items"]
},
"visit_form_link": {
"type": "object",
"description": "Binds a visit event to a form, creating the schedule of collection matrix.",
"properties": {
"event_id": { "type": "string" },
"form_id": { "type": "string" },
"mandatory": { "type": "boolean" },
"order": { "type": "integer" },
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["event_id", "form_id", "mandatory", "order"]
},
"edit_check": {
"type": "object",
"description": "Logic checks to safeguard data entry sanity including cross-form parameters.",
"properties": {
"check_id": { "type": "string" },
"trigger_field_id": { "type": "string", "description": "Target field starting evaluation" },
"rule_expression": { "type": "string" },
"error_message": { "type": "string" },
"severity": {
"type": "string",
"enum": ["ERROR", "WARNING", "INFO"]
},
"dependent_field_ids": {
"type": "array",
"items": { "type": "string" },
"description": "Other fields involved facilitating cross-form edit checks."
},
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["check_id", "trigger_field_id", "rule_expression", "error_message", "severity", "dependent_field_ids"]
},
"derivation": {
"type": "object",
"description": "Calculated entries based on other field calculations, e.g. BMI.",
"properties": {
"derivation_id": { "type": "string" },
"target_field_id": { "type": "string" },
"formula": { "type": "string" },
"source_field_ids": {
"type": "array",
"items": { "type": "string" }
},
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["derivation_id", "target_field_id", "formula", "source_field_ids"]
},
"role": {
"type": "object",
"description": "Clinical investigator/manager workspace permission sets.",
"properties": {
"role_id": { "type": "string" },
"name": { "type": "string" },
"permissions": {
"type": "array",
"items": { "type": "string" }
},
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["role_id", "name", "permissions"]
},
"door_ranking": {
"type": "object",
"description": "Desirability of Outcome Ranking (DOOR) scale levels ordered by severity/clinical desirability (lowest index is best outcome, highest index is worst outcome, e.g., death).",
"properties": {
"door_id": { "type": "string" },
"name": { "type": "string" },
"levels": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rank_order": { "type": "integer", "minimum": 1 },
"label": { "type": "string" },
"clinical_state": { "type": "string" }
},
"required": ["rank_order", "label", "clinical_state"]
}
},
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["door_id", "name", "levels"]
},
"analysis_gate": {
"type": "object",
"description": "Safety interim review parameters, e.g. DSMB adaptive gates.",
"properties": {
"gate_id": { "type": "string" },
"name": { "type": "string" },
"sample_size_trigger": { "type": "integer" },
"futility_rule": { "type": "string" },
"efficacy_rule": { "type": "string" },
"provenance": { "$ref": "#/definitions/provenance" }
},
"required": ["gate_id", "name", "sample_size_trigger"]
}
}
}