Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion src/helpers/schemas/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"type": "object",
"properties": {
"patientIdCsvPath": {
"title": "Patient ID CSV File",
"type": "string"
},
"commonExtractorArgs": {
Expand All @@ -14,6 +15,7 @@
"$ref": "#/$defs/notificationInfo"
},
"extractors": {
"title": "Extractors",
"type": "array",
"items": {
"$ref": "#/$defs/extractor"
Expand All @@ -22,32 +24,40 @@
},
"$defs": {
"commonExtractorArgs": {
"title": "Common Extractor Arguments",
"type": "object",
"properties": {
"baseFhirUrl": {
"title": "Base FHIR URL",
"type": "string",
"format": "uri"
},
"requestHeaders": {
"title": "Request Headers",
"type": "object"
}
}
},
"notificationInfo": {
"title": "Notification Info",
"type": "object",
"properties": {
"host": {
"title": "Host",
"type": "string",
"format": "hostname"
},
"port": {
"title": "Port",
"type": "integer"
},
"from": {
"title": "From",
"type": "string",
"format": "email-with-name"
},
"to": {
"title": "To",
"anyOf": [
{
"type": "string",
Expand All @@ -63,6 +73,7 @@
]
},
"tlsRejectUnauthorized": {
"title": "TLS Reject Unauthorized Connections",
"type": "boolean"
}
},
Expand All @@ -72,12 +83,15 @@
]
},
"extractor": {
"title": "Extractor",
"type": "object",
"properties": {
"label": {
"title": "Label",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
},
"constructorArgs": {
Expand All @@ -86,25 +100,32 @@
}
},
"constructorArgs": {
"title": "Constructor Arguments",
"type": "object",
"properties": {
"filePath": {
"title": "File Path",
"type": "string"
},
"url": {
"title": "URL",
"type": "string",
"format": "uri"
},
"clinicalSiteID": {
"title": "Clinical Site ID",
"type": "string"
},
"clinicalSiteSystem": {
"title": "Clinical Site System",
"type": "string"
},
"type": {
"title": "Type",
"type": "string"
},
"mask": {
"title": "Masked Fields",
"type": "array",
"items": {
"type": "string"
Expand All @@ -117,4 +138,4 @@
"extractors",
"patientIdCsvPath"
]
}
}
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const { lowercaseLookupQuery, createLowercaseLookup, createInvertedLookup } = re
const { getConditionEntriesFromContext, getConditionsFromContext, getEncountersFromContext, getPatientFromContext } = require('./helpers/contextUtils');
const { parsePatientIds } = require('./helpers/appUtils');
const { getConfig, validateConfig } = require('./helpers/configUtils');
const configSchema = require('./helpers/schemas/config.schema.json');

module.exports = {
// CLI Related utilities
Expand Down Expand Up @@ -147,4 +148,6 @@ module.exports = {
getConditionsFromContext,
getEncountersFromContext,
getPatientFromContext,
// Configuration file schema
configSchema,
};