Skip to content

Commit a92a233

Browse files
authored
Merge pull request #143 from mcode/update-schema-and-export
Update config.schema.json for use with react-jsonschema-form; export …
2 parents d904b4b + 4cd323b commit a92a233

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

src/helpers/schemas/config.schema.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"type": "object",
66
"properties": {
77
"patientIdCsvPath": {
8+
"title": "Patient ID CSV File",
89
"type": "string"
910
},
1011
"commonExtractorArgs": {
@@ -14,6 +15,7 @@
1415
"$ref": "#/$defs/notificationInfo"
1516
},
1617
"extractors": {
18+
"title": "Extractors",
1719
"type": "array",
1820
"items": {
1921
"$ref": "#/$defs/extractor"
@@ -22,32 +24,40 @@
2224
},
2325
"$defs": {
2426
"commonExtractorArgs": {
27+
"title": "Common Extractor Arguments",
2528
"type": "object",
2629
"properties": {
2730
"baseFhirUrl": {
31+
"title": "Base FHIR URL",
2832
"type": "string",
2933
"format": "uri"
3034
},
3135
"requestHeaders": {
36+
"title": "Request Headers",
3237
"type": "object"
3338
}
3439
}
3540
},
3641
"notificationInfo": {
42+
"title": "Notification Info",
3743
"type": "object",
3844
"properties": {
3945
"host": {
46+
"title": "Host",
4047
"type": "string",
4148
"format": "hostname"
4249
},
4350
"port": {
51+
"title": "Port",
4452
"type": "integer"
4553
},
4654
"from": {
55+
"title": "From",
4756
"type": "string",
4857
"format": "email-with-name"
4958
},
5059
"to": {
60+
"title": "To",
5161
"anyOf": [
5262
{
5363
"type": "string",
@@ -63,6 +73,7 @@
6373
]
6474
},
6575
"tlsRejectUnauthorized": {
76+
"title": "TLS Reject Unauthorized Connections",
6677
"type": "boolean"
6778
}
6879
},
@@ -72,12 +83,15 @@
7283
]
7384
},
7485
"extractor": {
86+
"title": "Extractor",
7587
"type": "object",
7688
"properties": {
7789
"label": {
90+
"title": "Label",
7891
"type": "string"
7992
},
8093
"type": {
94+
"title": "Type",
8195
"type": "string"
8296
},
8397
"constructorArgs": {
@@ -86,25 +100,32 @@
86100
}
87101
},
88102
"constructorArgs": {
103+
"title": "Constructor Arguments",
89104
"type": "object",
90105
"properties": {
91106
"filePath": {
107+
"title": "File Path",
92108
"type": "string"
93109
},
94110
"url": {
111+
"title": "URL",
95112
"type": "string",
96113
"format": "uri"
97114
},
98115
"clinicalSiteID": {
116+
"title": "Clinical Site ID",
99117
"type": "string"
100118
},
101119
"clinicalSiteSystem": {
120+
"title": "Clinical Site System",
102121
"type": "string"
103122
},
104123
"type": {
124+
"title": "Type",
105125
"type": "string"
106126
},
107127
"mask": {
128+
"title": "Masked Fields",
108129
"type": "array",
109130
"items": {
110131
"type": "string"
@@ -117,4 +138,4 @@
117138
"extractors",
118139
"patientIdCsvPath"
119140
]
120-
}
141+
}

src/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ const { lowercaseLookupQuery, createLowercaseLookup, createInvertedLookup } = re
6868
const { getConditionEntriesFromContext, getConditionsFromContext, getEncountersFromContext, getPatientFromContext } = require('./helpers/contextUtils');
6969
const { parsePatientIds } = require('./helpers/appUtils');
7070
const { getConfig, validateConfig } = require('./helpers/configUtils');
71+
const configSchema = require('./helpers/schemas/config.schema.json');
7172

7273
module.exports = {
7374
// CLI Related utilities
@@ -147,4 +148,6 @@ module.exports = {
147148
getConditionsFromContext,
148149
getEncountersFromContext,
149150
getPatientFromContext,
151+
// Configuration file schema
152+
configSchema,
150153
};

0 commit comments

Comments
 (0)