From 4b2ae86b61419ef93cea32faae1f7932341493d1 Mon Sep 17 00:00:00 2001 From: Arnej Duranovic Date: Thu, 7 Nov 2024 15:59:51 -0600 Subject: [PATCH 1/2] Update call to FhirToHl7Converter to pass in correct BlobContainerMetadata --- prime-router/src/main/kotlin/Receiver.kt | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/prime-router/src/main/kotlin/Receiver.kt b/prime-router/src/main/kotlin/Receiver.kt index 5d0e74d3fe6..106b282ffdc 100644 --- a/prime-router/src/main/kotlin/Receiver.kt +++ b/prime-router/src/main/kotlin/Receiver.kt @@ -3,6 +3,7 @@ package gov.cdc.prime.router import com.fasterxml.jackson.annotation.JsonIgnore import gov.cdc.prime.router.azure.BlobAccess import gov.cdc.prime.router.common.DateUtilities +import gov.cdc.prime.router.common.Environment import gov.cdc.prime.router.fhirengine.translation.hl7.FhirToHl7Converter import gov.cdc.prime.router.fhirengine.translation.hl7.SchemaException import java.time.LocalTime @@ -258,8 +259,14 @@ open class Receiver( if (translation is CustomConfiguration) { if (this.topic.isUniversalPipeline) { try { - // This is already scheduled for deletion in https://github.com/CDCgov/prime-reportstream/pull/13313 - FhirToHl7Converter(translation.schemaName, BlobAccess.defaultBlobMetadata) + // This is already scheduled for deletion in https://github.com/CDCgov/prime-reportstream/pull/13313/files#r1489489429 + FhirToHl7Converter( + translation.schemaName, + BlobAccess.BlobContainerMetadata.build( + "metadata", + Environment.get().storageEnvVar + ) + ) } catch (e: SchemaException) { return e.message } From 1b93d4515fcf94e93142a6c93a43698acff94c52 Mon Sep 17 00:00:00 2001 From: Arnej Duranovic Date: Wed, 8 Jan 2025 12:59:14 -0600 Subject: [PATCH 2/2] Update TODO comment in Receiver.consistencyErrorMessage --- prime-router/src/main/kotlin/Receiver.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prime-router/src/main/kotlin/Receiver.kt b/prime-router/src/main/kotlin/Receiver.kt index 106b282ffdc..3c7e5641795 100644 --- a/prime-router/src/main/kotlin/Receiver.kt +++ b/prime-router/src/main/kotlin/Receiver.kt @@ -250,6 +250,7 @@ open class Receiver( * Validate the object and return null or an error message */ fun consistencyErrorMessage(metadata: Metadata): String? { + // TODO: The logic in this method is slated to be removed as part of #17020 if (conditionFilter.isNotEmpty() || mappedConditionFilter.isNotEmpty()) { if (!topic.isUniversalPipeline) { return "Condition filter(s) not allowed for receivers with topic '${topic.jsonVal}'" @@ -259,7 +260,6 @@ open class Receiver( if (translation is CustomConfiguration) { if (this.topic.isUniversalPipeline) { try { - // This is already scheduled for deletion in https://github.com/CDCgov/prime-reportstream/pull/13313/files#r1489489429 FhirToHl7Converter( translation.schemaName, BlobAccess.BlobContainerMetadata.build(