From 298069a0f27532c05f6f50187d6bfb3d2fe89024 Mon Sep 17 00:00:00 2001 From: Matthew Gramigna Date: Fri, 18 Jun 2021 13:28:17 -0400 Subject: [PATCH 1/3] Update csv config schema to include all properties --- src/helpers/schemas/config.schema.json | 66 ++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 3 deletions(-) diff --git a/src/helpers/schemas/config.schema.json b/src/helpers/schemas/config.schema.json index 4a64f925..1d3e4bc0 100644 --- a/src/helpers/schemas/config.schema.json +++ b/src/helpers/schemas/config.schema.json @@ -1,9 +1,15 @@ { "$id": "csv-config", "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "Schema for CSV config files. TODO: Fill out the rest of this schema will all config properties", + "description": "Schema for CSV config files", "type": "object", "properties": { + "patientIdCsvPath": { + "type": "string" + }, + "notificationInfo": { + "$ref": "#/$defs/notificationInfo" + }, "extractors": { "type": "array", "items": { @@ -12,15 +18,69 @@ } }, "$defs": { + "notificationInfo": { + "type": "object", + "properties": { + "host": { + "type": "string", + "format": "hostname" + }, + "port": { + "type": "integer" + }, + "from": { + "type": "string" + }, + "to": { + "type": "string", + "format": "email" + }, + "tlsRejectUnauthorized": { + "type": "boolean" + } + }, + "required": [ + "host", + "port", + "from", + "to" + ] + }, "extractor": { "type": "object", "properties": { + "label": { + "type": "string" + }, + "type": { + "type": "string" + }, + "constructorArgs": { + "$ref": "#/$defs/constructorArgs" + } + } + }, + "constructorArgs": { + "type": "object", + "properties": { + "filePath": { + "type": "string" + }, + "clinicalSiteID": { + "type": "string" + }, + "clinicalSiteSystem": { + "type": "string" + }, "type": { "type": "string" } }, - "required": ["type"] + "required": ["filePath"] } }, - "required": ["extractors"] + "required": [ + "extractors", + "patientIdCsvPath" + ] } From d8d3f1d44d7380a620593f8e1cfde244a27d87b6 Mon Sep 17 00:00:00 2001 From: Matthew Gramigna Date: Mon, 21 Jun 2021 16:59:50 -0400 Subject: [PATCH 2/3] Add common args; update email format; removed filePath mandate --- src/helpers/schemas/config.schema.json | 31 ++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/src/helpers/schemas/config.schema.json b/src/helpers/schemas/config.schema.json index 1d3e4bc0..933d2a85 100644 --- a/src/helpers/schemas/config.schema.json +++ b/src/helpers/schemas/config.schema.json @@ -7,6 +7,9 @@ "patientIdCsvPath": { "type": "string" }, + "commonExtractorArgs": { + "$ref": "#/$defs/commonExtractorArgs" + }, "notificationInfo": { "$ref": "#/$defs/notificationInfo" }, @@ -18,6 +21,18 @@ } }, "$defs": { + "commonExtractorArgs": { + "type": "object", + "properties": { + "baseFhirUrl": { + "type": "string", + "format": "uri" + }, + "requestHeaders": { + "type": "object" + } + } + }, "notificationInfo": { "type": "object", "properties": { @@ -32,8 +47,17 @@ "type": "string" }, "to": { - "type": "string", - "format": "email" + "anyOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] }, "tlsRejectUnauthorized": { "type": "boolean" @@ -75,8 +99,7 @@ "type": { "type": "string" } - }, - "required": ["filePath"] + } } }, "required": [ From 1625687ddf1f70c81115e93244ef95aa69e33e34 Mon Sep 17 00:00:00 2001 From: Matthew Gramigna Date: Tue, 22 Jun 2021 16:32:07 -0400 Subject: [PATCH 3/3] Change desc; remove req port and from; add mask --- src/helpers/schemas/config.schema.json | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/helpers/schemas/config.schema.json b/src/helpers/schemas/config.schema.json index 933d2a85..ebe678a7 100644 --- a/src/helpers/schemas/config.schema.json +++ b/src/helpers/schemas/config.schema.json @@ -1,7 +1,7 @@ { "$id": "csv-config", "$schema": "https://json-schema.org/draft/2020-12/schema", - "description": "Schema for CSV config files", + "description": "Schema for mcode-extraction-framework config files", "type": "object", "properties": { "patientIdCsvPath": { @@ -65,8 +65,6 @@ }, "required": [ "host", - "port", - "from", "to" ] }, @@ -98,6 +96,12 @@ }, "type": { "type": "string" + }, + "mask": { + "type": "array", + "items": { + "type": "string" + } } } }