Skip to content

Commit

Permalink
Update call to FhirToHl7Converter to pass in correct BlobContainerMet…
Browse files Browse the repository at this point in the history
…adata (#16505)

* Update call to FhirToHl7Converter to pass in correct BlobContainerMetadata

* Update TODO comment in Receiver.consistencyErrorMessage
  • Loading branch information
arnejduranovic authored Jan 10, 2025
1 parent cccf16d commit 9ec0a59
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions prime-router/src/main/kotlin/Receiver.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -249,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}'"
Expand All @@ -258,8 +260,13 @@ 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)
FhirToHl7Converter(
translation.schemaName,
BlobAccess.BlobContainerMetadata.build(
"metadata",
Environment.get().storageEnvVar
)
)
} catch (e: SchemaException) {
return e.message
}
Expand Down

0 comments on commit 9ec0a59

Please sign in to comment.