Skip to content

Commit eb965ff

Browse files
committed
wip
1 parent d10799c commit eb965ff

File tree

2 files changed

+88
-12
lines changed

2 files changed

+88
-12
lines changed

schemas/import.schema.json

Lines changed: 80 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,72 @@
33
"$schema": "http://json-schema.org/draft-07/schema#",
44
"title": "Import",
55
"definitions": {
6+
"filterDicomsRule": {
7+
"type": "object",
8+
"properties": {
9+
"type": {
10+
"type": "string",
11+
"enum": [
12+
"valueStartsWith",
13+
"valueInList"
14+
]
15+
},
16+
"dicom_field": {
17+
"type": "string"
18+
},
19+
"values": {
20+
"type": "array",
21+
"item": {
22+
"type": "string"
23+
}
24+
}
25+
},
26+
"required": [
27+
"type",
28+
"dicom_field",
29+
"values"
30+
]
31+
},
32+
"filterDicoms": {
33+
"type": "object",
34+
"properties": {
35+
"filterDicoms": {
36+
"type": "boolean"
37+
},
38+
"filterDicomsRules": {
39+
"type": "array",
40+
"items": {
41+
"$ref": "#/definitions/filterDicomsRule"
42+
}
43+
}
44+
},
45+
"required": [
46+
"filterDicoms"
47+
],
48+
"oneOf": [
49+
{
50+
"properties": {
51+
"filterDicoms": {
52+
"enum": [
53+
true
54+
]
55+
}
56+
},
57+
"required": [
58+
"filterDicomsRules"
59+
]
60+
},
61+
{
62+
"properties": {
63+
"filterDicoms": {
64+
"enum": [
65+
false
66+
]
67+
}
68+
}
69+
}
70+
]
71+
},
672
"lutTableItems": {
773
"type": "object",
874
"required": [
@@ -56,7 +122,6 @@
56122
"subjectLabelAnonMethod": {
57123
"type": "string",
58124
"enum": [
59-
"RANDOM_LABELS",
60125
"SAME_LABELS",
61126
"LUT_LABELS"
62127
]
@@ -280,7 +345,6 @@
280345
"required": [
281346
"dicomFileCount",
282347
"nonDicomFileCount",
283-
284348
"uploadDate",
285349
"status",
286350
"totalFileCount"
@@ -344,7 +408,7 @@
344408
"properties": {
345409
"status": {
346410
"enum": [
347-
"REPLICATING_DONE"
411+
"DONE"
348412
]
349413
}
350414
},
@@ -575,6 +639,9 @@
575639
},
576640
"reference": {
577641
"$ref": "#/definitions/reference"
642+
},
643+
"filterDicoms": {
644+
"$ref": "#/definitions/filterDicoms"
578645
}
579646
},
580647
"allOf": [
@@ -593,7 +660,8 @@
593660
"pathToFolder",
594661
"anonymize",
595662
"lutId",
596-
"exhaustiveLut"
663+
"exhaustiveLut",
664+
"filterDicoms"
597665
]
598666
},
599667
"postImportLutExhaustiveNoAnon": {
@@ -654,8 +722,7 @@
654722
{
655723
"$ref": "#/definitions/postImportLutNonExhaustiveNoAnon"
656724
}
657-
],
658-
"additionalProperties": false
725+
]
659726
},
660727
"postImportAnonRandomLabels": {
661728
"type": "object",
@@ -752,8 +819,7 @@
752819
{
753820
"$ref": "#/definitions/postImportAnonLutLabels"
754821
}
755-
],
756-
"additionalProperties": false
822+
]
757823
},
758824
"postImport": {
759825
"type": "object",
@@ -775,13 +841,17 @@
775841
},
776842
"fieldsToAnonymize": {
777843
"$ref": "#/definitions/fieldsToAnonymizeTable"
844+
},
845+
"filterDicoms": {
846+
"$ref": "#/definitions/filterDicoms"
778847
}
779848
},
780849
"required": [
781850
"dicomPath",
782851
"anonymization",
783852
"lut",
784-
"exhaustiveLut"
853+
"exhaustiveLut",
854+
"filterDicoms"
785855
],
786856
"additionalProperties": false,
787857
"oneOf": [
@@ -958,4 +1028,4 @@
9581028
"additionalProperties": false
9591029
}
9601030
}
961-
}
1031+
}

schemas/importVisit.schema.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@
3434
"type": "string"
3535
},
3636
"visitType":{
37-
"type": "string"
37+
"type": "string",
3838
"enum": ["imaging"]
3939
},
4040
"date":{
4141
"type": "string"
4242
},
43+
"time":{
44+
"type": "string"
45+
},
4346
"importVisitDoc": {
4447
"type": "object",
4548
"properties": {
@@ -59,7 +62,10 @@
5962
"$ref": "#/definitions/visitType"
6063
},
6164
"date": {
62-
"$ref": "#/definitions/sex"
65+
"$ref": "#/definitions/date"
66+
},
67+
"time": {
68+
"$ref": "#/definitions/time"
6369
},
6470
"docType": {
6571
"$ref": "#/definitions/docType"

0 commit comments

Comments
 (0)