From f3a7b35352990756ecec5a66254ee67e134b7394 Mon Sep 17 00:00:00 2001 From: Andrew Pham Date: Fri, 10 Jan 2025 16:36:05 -0500 Subject: [PATCH] adjustments from IDE notes --- .../src/main/kotlin/azure/SenderFunction.kt | 9 -------- .../test/kotlin/azure/SenderFunctionTest.kt | 22 +++++++------------ 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/prime-router/src/main/kotlin/azure/SenderFunction.kt b/prime-router/src/main/kotlin/azure/SenderFunction.kt index 2327cf2c8af..2b19e42369d 100644 --- a/prime-router/src/main/kotlin/azure/SenderFunction.kt +++ b/prime-router/src/main/kotlin/azure/SenderFunction.kt @@ -9,9 +9,6 @@ import com.microsoft.azure.functions.annotation.AuthorizationLevel import com.microsoft.azure.functions.annotation.FunctionName import com.microsoft.azure.functions.annotation.HttpTrigger import gov.cdc.prime.router.azure.db.enums.TaskAction -import gov.cdc.prime.router.azure.observability.event.IReportStreamEventService -import gov.cdc.prime.router.azure.observability.event.ReportStreamEventService -import gov.cdc.prime.router.azure.service.SubmissionResponseBuilder import gov.cdc.prime.router.cli.LookupTableCompareMappingCommand import gov.cdc.prime.router.metadata.ObservationMappingConstants import gov.cdc.prime.router.tokens.AuthenticatedClaims @@ -22,12 +19,6 @@ import org.apache.logging.log4j.kotlin.Logging class SenderFunction( private val workflowEngine: WorkflowEngine = WorkflowEngine(), private val actionHistory: ActionHistory = ActionHistory(TaskAction.receive), - private val reportEventService: IReportStreamEventService = ReportStreamEventService( - workflowEngine.db, - workflowEngine.azureEventService, - workflowEngine.reportService - ), - private val submissionResponseBuilder: SubmissionResponseBuilder = SubmissionResponseBuilder(), ) : RequestFunction(workflowEngine), Logging { diff --git a/prime-router/src/test/kotlin/azure/SenderFunctionTest.kt b/prime-router/src/test/kotlin/azure/SenderFunctionTest.kt index 9786f8a430f..2e5845dbe72 100644 --- a/prime-router/src/test/kotlin/azure/SenderFunctionTest.kt +++ b/prime-router/src/test/kotlin/azure/SenderFunctionTest.kt @@ -37,10 +37,10 @@ class SenderFunctionTest { val accessSpy = spyk(DatabaseAccess(connection)) val metadata = UnitTestUtils.simpleMetadata val settings = mockkClass(SettingsProvider::class) - val serializer = spyk(Hl7Serializer(metadata, settings)) val blobMock = mockkClass(BlobAccess::class) - val queueMock = mockkClass(QueueAccess::class) - val timing1 = mockkClass(Receiver.Timing::class) + private val serializer = spyk(Hl7Serializer(metadata, settings)) + private val queueMock = mockkClass(QueueAccess::class) + private val timing1 = mockkClass(Receiver.Timing::class) val REQ_BODY_TEST_CSV = "test code,test description,coding system\n" + "97097-0,SARS-CoV-2 (COVID-19) Ag [Presence] in Upper respiratory specimen by Rapid immunoassay,LOINC\n" + @@ -114,13 +114,7 @@ class SenderFunctionTest { ObservationMappingConstants.CONDITION_NAME_KEY ), listOf( - "80382-5", - "6142004", - "SNOMEDCT", - "Influenza (disorder)" - ), - listOf( - "260373001", + "00001", "Some Condition Code", "Condition Code System", "Condition Name" @@ -131,15 +125,15 @@ class SenderFunctionTest { val codeToConditionMapping = listOf( mapOf( - "test code" to "001", + "test code" to "00001", "test description" to "test description 1", - "coding system" to "LOINC", + "coding system" to "Condition Code System", "mapped?" to "Y" ), mapOf( - "test code" to "002", + "test code" to "00002", "test description" to "test description 2", - "coding system" to "LOINC", + "coding system" to "Another Condition Code System", "mapped?" to "N" ) )