Skip to content

Commit d5e3013

Browse files
authored
Merge pull request #133 from mcode/config-schema
Update csv config schema to include all properties
2 parents 7190191 + 1625687 commit d5e3013

File tree

1 file changed

+91
-4
lines changed

1 file changed

+91
-4
lines changed
Lines changed: 91 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
{
22
"$id": "csv-config",
33
"$schema": "https://json-schema.org/draft/2020-12/schema",
4-
"description": "Schema for CSV config files. TODO: Fill out the rest of this schema will all config properties",
4+
"description": "Schema for mcode-extraction-framework config files",
55
"type": "object",
66
"properties": {
7+
"patientIdCsvPath": {
8+
"type": "string"
9+
},
10+
"commonExtractorArgs": {
11+
"$ref": "#/$defs/commonExtractorArgs"
12+
},
13+
"notificationInfo": {
14+
"$ref": "#/$defs/notificationInfo"
15+
},
716
"extractors": {
817
"type": "array",
918
"items": {
@@ -12,15 +21,93 @@
1221
}
1322
},
1423
"$defs": {
24+
"commonExtractorArgs": {
25+
"type": "object",
26+
"properties": {
27+
"baseFhirUrl": {
28+
"type": "string",
29+
"format": "uri"
30+
},
31+
"requestHeaders": {
32+
"type": "object"
33+
}
34+
}
35+
},
36+
"notificationInfo": {
37+
"type": "object",
38+
"properties": {
39+
"host": {
40+
"type": "string",
41+
"format": "hostname"
42+
},
43+
"port": {
44+
"type": "integer"
45+
},
46+
"from": {
47+
"type": "string"
48+
},
49+
"to": {
50+
"anyOf": [
51+
{
52+
"type": "string"
53+
},
54+
{
55+
"type": "array",
56+
"items": {
57+
"type": "string"
58+
}
59+
}
60+
]
61+
},
62+
"tlsRejectUnauthorized": {
63+
"type": "boolean"
64+
}
65+
},
66+
"required": [
67+
"host",
68+
"to"
69+
]
70+
},
1571
"extractor": {
1672
"type": "object",
1773
"properties": {
74+
"label": {
75+
"type": "string"
76+
},
1877
"type": {
1978
"type": "string"
79+
},
80+
"constructorArgs": {
81+
"$ref": "#/$defs/constructorArgs"
2082
}
21-
},
22-
"required": ["type"]
83+
}
84+
},
85+
"constructorArgs": {
86+
"type": "object",
87+
"properties": {
88+
"filePath": {
89+
"type": "string"
90+
},
91+
"clinicalSiteID": {
92+
"type": "string"
93+
},
94+
"clinicalSiteSystem": {
95+
"type": "string"
96+
},
97+
"type": {
98+
"type": "string"
99+
},
100+
"mask": {
101+
"type": "array",
102+
"items": {
103+
"type": "string"
104+
}
105+
}
106+
}
23107
}
24108
},
25-
"required": ["extractors"]
109+
"required": [
110+
"extractors",
111+
"patientIdCsvPath"
112+
]
26113
}

0 commit comments

Comments
 (0)