Skip to content

Commit 8fa8b4b

Browse files
committed
add reference to main db after eplication
1 parent e9d6cdc commit 8fa8b4b

File tree

3 files changed

+126
-80
lines changed

3 files changed

+126
-80
lines changed

schemas/importSeries.schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
},
2727
"importVisitId": {
2828
"type": "string"
29+
},
30+
"mainDatabaseId": {
31+
"type": "string"
2932
}
3033
},
3134
"required": [
@@ -79,6 +82,9 @@
7982
"label": {
8083
"type": "string"
8184
},
85+
"replicated": {
86+
"type": "boolean"
87+
},
8288
"dicomHeaderSummary": {
8389
"type": "object",
8490
"required": [

schemas/importSubject.schema.json

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,23 @@
2020
"properties": {
2121
"importId": {
2222
"type": "string"
23+
},
24+
"mainDatabaseId": {
25+
"type": "string"
2326
}
2427
},
2528
"required": [
2629
"importId"
2730
]
2831
},
29-
"originalCohortId":{
30-
"type": "string"
32+
"originalCohortId": {
33+
"type": "string"
3134
},
32-
"dob":{
33-
"type": "string"
35+
"dob": {
36+
"type": "string"
3437
},
35-
"sex":{
36-
"type": "string"
38+
"sex": {
39+
"type": "string"
3740
},
3841
"importSubjectDoc": {
3942
"type": "object",
@@ -51,13 +54,19 @@
5154
"$ref": "#/definitions/reference"
5255
},
5356
"originalCohortId": {
54-
"$ref": "#/definitions/originalCohortId"
57+
"$ref": "#/definitions/originalCohortId"
5558
},
5659
"dob": {
57-
"$ref": "#/definitions/dob"
60+
"$ref": "#/definitions/dob"
5861
},
5962
"sex": {
60-
"$ref": "#/definitions/sex"
63+
"$ref": "#/definitions/sex"
64+
},
65+
"processed": {
66+
"type": "boolean"
67+
},
68+
"replicated": {
69+
"type": "boolean"
6170
}
6271
},
6372
"additionalProperties": false,
@@ -68,4 +77,4 @@
6877
]
6978
}
7079
}
71-
}
80+
}

schemas/importVisit.schema.json

Lines changed: 101 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,114 @@
11
{
2-
"$id": "https://raw.githubusercontent.com/SPINEProject/SPINE-json-schema/master/schemas/importVisit.schema.json",
3-
"$schema": "http://json-schema.org/draft-07/schema#",
4-
"title": "Import visit",
5-
"definitions": {
6-
"_id": {
7-
"type": "string"
2+
"$id": "https://raw.githubusercontent.com/SPINEProject/SPINE-json-schema/master/schemas/importVisit.schema.json",
3+
"$schema": "http://json-schema.org/draft-07/schema#",
4+
"title": "Import visit",
5+
"definitions": {
6+
"_id": {
7+
"type": "string"
8+
},
9+
"_rev": {
10+
"type": "string"
11+
},
12+
"docType": {
13+
"type": "string",
14+
"enum": [
15+
"importVisit"
16+
]
17+
},
18+
"reference": {
19+
"type": "object",
20+
"properties": {
21+
"importId": {
22+
"type": "string"
823
},
9-
"_rev": {
24+
"importSubjectId": {
25+
"type": "string"
26+
},
27+
"mainDatabaseId": {
1028
"type": "string"
29+
}
30+
},
31+
"required": [
32+
"importId",
33+
"importSubjectId"
34+
]
35+
},
36+
"label": {
37+
"type": "string"
38+
},
39+
"visitType": {
40+
"type": "string",
41+
"enum": [
42+
"imaging"
43+
]
44+
},
45+
"date": {
46+
"type": "string"
47+
},
48+
"time": {
49+
"type": "string"
50+
},
51+
"importVisitDoc": {
52+
"type": "object",
53+
"properties": {
54+
"_id": {
55+
"$ref": "#/definitions/_id"
1156
},
12-
"docType": {
13-
"type": "string",
14-
"enum": [
15-
"importVisit"
16-
]
57+
"_rev": {
58+
"$ref": "#/definitions/_rev"
1759
},
1860
"reference": {
19-
"type": "object",
20-
"properties": {
21-
"importId": {
22-
"type": "string"
23-
},
24-
"importSubjectId": {
25-
"type": "string"
26-
}
27-
},
28-
"required": [
29-
"importId",
30-
"importSubjectId"
31-
]
61+
"$ref": "#/definitions/reference"
3262
},
33-
"label":{
34-
"type": "string"
63+
"label": {
64+
"$ref": "#/definitions/label"
3565
},
36-
"visitType":{
37-
"type": "string",
38-
"enum": ["imaging"]
66+
"visitType": {
67+
"$ref": "#/definitions/visitType"
3968
},
40-
"date":{
41-
"type": "string"
69+
"date": {
70+
"$ref": "#/definitions/date"
4271
},
43-
"time":{
44-
"type": "string"
72+
"time": {
73+
"$ref": "#/definitions/time"
74+
},
75+
"docType": {
76+
"$ref": "#/definitions/docType"
77+
},
78+
"processed": {
79+
"type": "boolean"
80+
},
81+
"replicated": {
82+
"type": "boolean"
83+
},
84+
"sex": {
85+
"type": [
86+
"string",
87+
"number",
88+
"boolean",
89+
"object",
90+
"array",
91+
"null"
92+
]
4593
},
46-
"importVisitDoc": {
47-
"type": "object",
48-
"properties": {
49-
"_id": {
50-
"$ref": "#/definitions/_id"
51-
},
52-
"_rev": {
53-
"$ref": "#/definitions/_rev"
54-
},
55-
"reference": {
56-
"$ref": "#/definitions/reference"
57-
},
58-
"label": {
59-
"$ref": "#/definitions/label"
60-
},
61-
"visitType": {
62-
"$ref": "#/definitions/visitType"
63-
},
64-
"date": {
65-
"$ref": "#/definitions/date"
66-
},
67-
"time": {
68-
"$ref": "#/definitions/time"
69-
},
70-
"docType": {
71-
"$ref": "#/definitions/docType"
72-
}
73-
},
74-
"additionalProperties": false,
75-
"required": [
76-
"reference",
77-
"docType",
78-
"label",
79-
"visitType"
80-
]
94+
"dob": {
95+
"type": [
96+
"string",
97+
"number",
98+
"boolean",
99+
"object",
100+
"array",
101+
"null"
102+
]
81103
}
104+
},
105+
"additionalProperties": false,
106+
"required": [
107+
"reference",
108+
"docType",
109+
"label",
110+
"visitType"
111+
]
82112
}
83-
}
113+
}
114+
}

0 commit comments

Comments
 (0)