From dfeabbfb0e879dbe503e104997f622e7b8b9d753 Mon Sep 17 00:00:00 2001 From: DanPaseltiner Date: Wed, 10 May 2023 13:00:52 -0400 Subject: [PATCH 1/6] Add lab 3 to the message parser schema. --- containers/message-parser/app/default_schemas/ecr.json | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/containers/message-parser/app/default_schemas/ecr.json b/containers/message-parser/app/default_schemas/ecr.json index 6e4a1e3678..4a2f4c4b23 100644 --- a/containers/message-parser/app/default_schemas/ecr.json +++ b/containers/message-parser/app/default_schemas/ecr.json @@ -40,5 +40,13 @@ "specimen_type_2": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[1].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen source').valueString", "performing_lab_2": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[1].performer.display", "specimen_collection_date_2": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[1].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen collection time').valueDateTime", - "result_date_2": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[1].effectiveDateTime" + "result_date_2": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[1].effectiveDateTime", + "test_type_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[0].code.coding.display", + "test_result_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[0].valueString", + "test_result_interp_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[0].interpretation.coding.display", + "specimen_type_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[0].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen source').valueString", + "performing_lab_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[0].performer.display", + "specimen_collection_date_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[0].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen collection time').valueDateTime", + "result_date_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[0].effectiveDateTime", + } \ No newline at end of file From f5f04babd2df43a6d28b2e0127040b5a8e0c0604 Mon Sep 17 00:00:00 2001 From: DanPaseltiner Date: Wed, 10 May 2023 14:15:49 -0400 Subject: [PATCH 2/6] Labs 1-10 for the message parsing service. --- .../app/default_schemas/ecr.json | 62 ++++++++++++++++--- 1 file changed, 55 insertions(+), 7 deletions(-) diff --git a/containers/message-parser/app/default_schemas/ecr.json b/containers/message-parser/app/default_schemas/ecr.json index 4a2f4c4b23..c1e938b8f8 100644 --- a/containers/message-parser/app/default_schemas/ecr.json +++ b/containers/message-parser/app/default_schemas/ecr.json @@ -41,12 +41,60 @@ "performing_lab_2": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[1].performer.display", "specimen_collection_date_2": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[1].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen collection time').valueDateTime", "result_date_2": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[1].effectiveDateTime", - "test_type_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[0].code.coding.display", - "test_result_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[0].valueString", + "test_type_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[2].code.coding.display", + "test_result_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[2].valueString", "test_result_interp_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[0].interpretation.coding.display", - "specimen_type_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[0].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen source').valueString", - "performing_lab_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[0].performer.display", - "specimen_collection_date_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[0].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen collection time').valueDateTime", - "result_date_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[0].effectiveDateTime", - + "specimen_type_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[2].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen source').valueString", + "performing_lab_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[2].performer.display", + "specimen_collection_date_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[2].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen collection time').valueDateTime", + "result_date_3": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[2].effectiveDateTime", + "test_type_4": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[3].code.coding.display", + "test_result_4": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[3].valueString", + "test_result_interp_4": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[3].interpretation.coding.display", + "specimen_type_4": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[3].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen source').valueString", + "performing_lab_4": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[3].performer.display", + "specimen_collection_date_4": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[3].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen collection time').valueDateTime", + "result_date_4": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[3].effectiveDateTime", + "test_type_5": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[4].code.coding.display", + "test_result_5": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[4].valueString", + "test_result_interp_5": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[4].interpretation.coding.display", + "specimen_type_5": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[4].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen source').valueString", + "performing_lab_5": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[4].performer.display", + "specimen_collection_date_5": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[4].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen collection time').valueDateTime", + "result_date_5": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[4].effectiveDateTime", + "test_type_6": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[5].code.coding.display", + "test_result_6": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[5].valueString", + "test_result_interp_6": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[5].interpretation.coding.display", + "specimen_type_6": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[5].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen source').valueString", + "performing_lab_6": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[5].performer.display", + "specimen_collection_date_6": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[5].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen collection time').valueDateTime", + "result_date_6": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[5].effectiveDateTime", + "test_type_7": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[6].code.coding.display", + "test_result_7": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[6].valueString", + "test_result_interp_7": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[6].interpretation.coding.display", + "specimen_type_7": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[6].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen source').valueString", + "performing_lab_7": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[6].performer.display", + "specimen_collection_date_7": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[6].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen collection time').valueDateTime", + "result_date_7": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[6].effectiveDateTime", + "test_type_8": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[7].code.coding.display", + "test_result_8": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[7].valueString", + "test_result_interp_8": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[7].interpretation.coding.display", + "specimen_type_8": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[7].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen source').valueString", + "performing_lab_8": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[7].performer.display", + "specimen_collection_date_8": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[7].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen collection time').valueDateTime", + "result_date_8": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[7].effectiveDateTime", + "test_type_9": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[8].code.coding.display", + "test_result_9": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[8].valueString", + "test_result_interp_9": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[8].interpretation.coding.display", + "specimen_type_9": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[8].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen source').valueString", + "performing_lab_9": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[8].performer.display", + "specimen_collection_date_9": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[8].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen collection time').valueDateTime", + "result_date_9": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[8].effectiveDateTime", + "test_type_10": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[9].code.coding.display", + "test_result_10": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[9].valueString", + "test_result_interp_10": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[9].interpretation.coding.display", + "specimen_type_10": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[9].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen source').valueString", + "performing_lab_10": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[9].performer.display", + "specimen_collection_date_10": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[9].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen collection time').valueDateTime", + "result_date_10": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[9].effectiveDateTime" } \ No newline at end of file From bca42e967a2421829ba5c9ece71f348861368c27 Mon Sep 17 00:00:00 2001 From: Brady Fausett at Skylight Date: Wed, 10 May 2023 12:42:07 -0600 Subject: [PATCH 3/6] Update ecr.json --- .../app/default_schemas/ecr.json | 58 ++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/containers/kafka-to-delta-table/app/default_schemas/ecr.json b/containers/kafka-to-delta-table/app/default_schemas/ecr.json index e6d91ac789..eae513b447 100644 --- a/containers/kafka-to-delta-table/app/default_schemas/ecr.json +++ b/containers/kafka-to-delta-table/app/default_schemas/ecr.json @@ -40,5 +40,61 @@ "specimen_type_2": "string", "performing_lab_2": "string", "specimen_collection_date_2": "timestamp", - "result_date_2": "timestamp" + "result_date_2": "timestamp", + "test_type_3": "string", + "test_result_3": "string", + "test_result_interp_3": "string", + "specimen_type_3": "string", + "performing_lab_3": "string", + "specimen_collection_date_3": "timestamp", + "result_date_3": "timestamp", + "test_type_4": "string", + "test_result_4": "string", + "test_result_interp_4": "string", + "specimen_type_4": "string", + "performing_lab_4": "string", + "specimen_collection_date_4": "timestamp", + "result_date_4": "timestamp", + "test_type_5": "string", + "test_result_5": "string", + "test_result_interp_5": "string", + "specimen_type_5": "string", + "performing_lab_5": "string", + "specimen_collection_date_5": "timestamp", + "result_date_5": "timestamp", + "test_type_6": "string", + "test_result_6": "string", + "test_result_interp_6": "string", + "specimen_type_6": "string", + "performing_lab_6": "string", + "specimen_collection_date_6": "timestamp", + "result_date_6": "timestamp", + "test_type_7": "string", + "test_result_7": "string", + "test_result_interp_7": "string", + "specimen_type_7": "string", + "performing_lab_7": "string", + "specimen_collection_date_7": "timestamp", + "result_date_7": "timestamp", + "test_type_8": "string", + "test_result_8": "string", + "test_result_interp_8": "string", + "specimen_type_8": "string", + "performing_lab_8": "string", + "specimen_collection_date_8": "timestamp", + "result_date_8": "timestamp", + "test_type_9": "string", + "test_result_9": "string", + "test_result_interp_9": "string", + "specimen_type_9": "string", + "performing_lab_9": "string", + "specimen_collection_date_9": "timestamp", + "result_date_9": "timestamp", + "test_type_10": "string", + "test_result_10": "string", + "test_result_interp_10": "string", + "specimen_type_10": "string", + "performing_lab_10": "string", + "specimen_collection_date_10": "timestamp", + "result_date_10": "timestamp" } \ No newline at end of file From b7b2060ff979827d6b8ce34df0314715632fd3b8 Mon Sep 17 00:00:00 2001 From: DanPaseltiner Date: Wed, 10 May 2023 15:21:01 -0400 Subject: [PATCH 4/6] trigger CI --- containers/message-parser/app/default_schemas/ecr.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/message-parser/app/default_schemas/ecr.json b/containers/message-parser/app/default_schemas/ecr.json index c1e938b8f8..cae5f72867 100644 --- a/containers/message-parser/app/default_schemas/ecr.json +++ b/containers/message-parser/app/default_schemas/ecr.json @@ -97,4 +97,4 @@ "performing_lab_10": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[9].performer.display", "specimen_collection_date_10": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[9].extension.where(url='http://hl7.org/fhir/R4/specimen.html').extension.where(url='specimen collection time').valueDateTime", "result_date_10": "Bundle.entry.resource.where(resourceType='Observation').where(category.coding.code='laboratory')[9].effectiveDateTime" -} \ No newline at end of file +} From ec0e75372b921179f8788495b5ff0fccfbd3d5bf Mon Sep 17 00:00:00 2001 From: Brady Fausett at Skylight Date: Wed, 10 May 2023 14:38:35 -0600 Subject: [PATCH 5/6] adding 11-20 labs in the kafka schema --- .../app/default_schemas/ecr.json | 72 ++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/containers/kafka-to-delta-table/app/default_schemas/ecr.json b/containers/kafka-to-delta-table/app/default_schemas/ecr.json index eae513b447..dc623212f3 100644 --- a/containers/kafka-to-delta-table/app/default_schemas/ecr.json +++ b/containers/kafka-to-delta-table/app/default_schemas/ecr.json @@ -96,5 +96,75 @@ "specimen_type_10": "string", "performing_lab_10": "string", "specimen_collection_date_10": "timestamp", - "result_date_10": "timestamp" + "result_date_10": "timestamp", + "test_type_11": "string", + "test_result_11": "string", + "test_result_interp_11": "string", + "specimen_type_11": "string", + "performing_lab_11": "string", + "specimen_collection_date_11": "timestamp", + "result_date_11": "timestamp", + "test_type_12": "string", + "test_result_12": "string", + "test_result_interp_12": "string", + "specimen_type_12": "string", + "performing_lab_12": "string", + "specimen_collection_date_12": "timestamp", + "result_date_12": "timestamp", + "test_type_13": "string", + "test_result_13": "string", + "test_result_interp_13": "string", + "specimen_type_13": "string", + "performing_lab_13": "string", + "specimen_collection_date_13": "timestamp", + "result_date_13": "timestamp", + "test_type_14": "string", + "test_result_14": "string", + "test_result_interp_14": "string", + "specimen_type_14": "string", + "performing_lab_14": "string", + "specimen_collection_date_14": "timestamp", + "result_date_14": "timestamp", + "test_type_15": "string", + "test_result_15": "string", + "test_result_interp_15": "string", + "specimen_type_15": "string", + "performing_lab_15": "string", + "specimen_collection_date_15": "timestamp", + "result_date_15": "timestamp", + "test_type_16": "string", + "test_result_16": "string", + "test_result_interp_16": "string", + "specimen_type_16": "string", + "performing_lab_16": "string", + "specimen_collection_date_16": "timestamp", + "result_date_16": "timestamp", + "test_type_17": "string", + "test_result_17": "string", + "test_result_interp_17": "string", + "specimen_type_17": "string", + "performing_lab_17": "string", + "specimen_collection_date_17": "timestamp", + "result_date_17": "timestamp", + "test_type_18": "string", + "test_result_18": "string", + "test_result_interp_18": "string", + "specimen_type_18": "string", + "performing_lab_18": "string", + "specimen_collection_date_18": "timestamp", + "result_date_18": "timestamp", + "test_type_19": "string", + "test_result_19": "string", + "test_result_interp_19": "string", + "specimen_type_19": "string", + "performing_lab_19": "string", + "specimen_collection_date_19": "timestamp", + "result_date_19": "timestamp", + "test_type_20": "string", + "test_result_20": "string", + "test_result_interp_20": "string", + "specimen_type_20": "string", + "performing_lab_20": "string", + "specimen_collection_date_20": "timestamp", + "result_date_20": "timestamp" } \ No newline at end of file From d9f53bcb8dbb8d997ffc28174a501688a744c45e Mon Sep 17 00:00:00 2001 From: Brady Fausett at Skylight Date: Wed, 10 May 2023 15:44:29 -0600 Subject: [PATCH 6/6] fixed failing tests --- .../tests/test_parse_message_endpoint.py | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/containers/message-parser/tests/test_parse_message_endpoint.py b/containers/message-parser/tests/test_parse_message_endpoint.py index 5b6d23850c..aa23b1db5e 100644 --- a/containers/message-parser/tests/test_parse_message_endpoint.py +++ b/containers/message-parser/tests/test_parse_message_endpoint.py @@ -68,6 +68,62 @@ "performing_lab_2": "", "specimen_collection_date_2": "", "result_date_2": "", + "test_type_3": "", + "test_result_3": "", + "test_result_interp_3": "", + "specimen_type_3": "", + "performing_lab_3": "", + "specimen_collection_date_3": "", + "result_date_3": "", + "test_type_4": "", + "test_result_4": "", + "test_result_interp_4": "", + "specimen_type_4": "", + "performing_lab_4": "", + "specimen_collection_date_4": "", + "result_date_4": "", + "test_type_5": "", + "test_result_5": "", + "test_result_interp_5": "", + "specimen_type_5": "", + "performing_lab_5": "", + "specimen_collection_date_5": "", + "result_date_5": "", + "test_type_6": "", + "test_result_6": "", + "test_result_interp_6": "", + "specimen_type_6": "", + "performing_lab_6": "", + "specimen_collection_date_6": "", + "result_date_6": "", + "test_type_7": "", + "test_result_7": "", + "test_result_interp_7": "", + "specimen_type_7": "", + "performing_lab_7": "", + "specimen_collection_date_7": "", + "result_date_7": "", + "test_type_8": "", + "test_result_8": "", + "test_result_interp_8": "", + "specimen_type_8": "", + "performing_lab_8": "", + "specimen_collection_date_8": "", + "result_date_8": "", + "test_type_9": "", + "test_result_9": "", + "test_result_interp_9": "", + "specimen_type_9": "", + "performing_lab_9": "", + "specimen_collection_date_9": "", + "result_date_9": "", + "test_type_10": "", + "test_result_10": "", + "test_result_interp_10": "", + "specimen_type_10": "", + "performing_lab_10": "", + "specimen_collection_date_10": "", + "result_date_10": "", }, }