From e5d7a5a9a2ff64b00c67c88669d32223b9febccf Mon Sep 17 00:00:00 2001 From: Bill Cutshall Date: Tue, 3 Dec 2024 14:49:37 -0500 Subject: [PATCH 01/10] [16143] Checking in WIP. --- .../kotlin/fhirengine/engine/FHIRConverter.kt | 61 ++++++++-- .../fhirengine/utils/FHIRBundleHelpers.kt | 21 ++++ .../common/UniversalPipelineTestUtils.kt | 13 +++ .../azure/FHIRConverterIntegrationTests.kt | 14 +-- .../fhirengine/engine/FhirConverterTests.kt | 108 ++++++++++++++++++ .../utils/FHIRBundleHelpersTests.kt | 67 +++++++++++ 6 files changed, 265 insertions(+), 19 deletions(-) diff --git a/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt b/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt index e5cd8908412..134ceca7e29 100644 --- a/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt +++ b/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt @@ -44,6 +44,7 @@ import gov.cdc.prime.router.azure.observability.event.AzureEventServiceImpl import gov.cdc.prime.router.azure.observability.event.IReportStreamEventService import gov.cdc.prime.router.azure.observability.event.ReportStreamEventName import gov.cdc.prime.router.azure.observability.event.ReportStreamEventProperties +import gov.cdc.prime.router.common.BaseEngine import gov.cdc.prime.router.fhirengine.translation.HL7toFhirTranslator import gov.cdc.prime.router.fhirengine.translation.hl7.FhirTransformer import gov.cdc.prime.router.fhirengine.translation.hl7.utils.CustomContext @@ -52,6 +53,7 @@ import gov.cdc.prime.router.fhirengine.utils.FhirTranscoder import gov.cdc.prime.router.fhirengine.utils.HL7Reader import gov.cdc.prime.router.fhirengine.utils.HL7Reader.Companion.parseHL7Message import gov.cdc.prime.router.fhirengine.utils.getObservations +import gov.cdc.prime.router.fhirengine.utils.isElr import gov.cdc.prime.router.logging.LogMeasuredTime import gov.cdc.prime.router.report.ReportService import gov.cdc.prime.router.validation.IItemValidator @@ -508,21 +510,56 @@ class FHIRConverter( } // 'stamp' observations with their condition code if (item.bundle != null) { + val isElr = item.bundle!!.isElr() item.bundle!!.getObservations().forEach { observation -> - val result = stamper.stampObservation(observation) - if (!result.success) { - val logger = actionLogger.getItemLogger(item.index + 1, observation.id) - if (result.failures.isEmpty()) { - logger.warn(UnmappableConditionMessage()) - } else { - logger.warn( - result.failures.map { - UnmappableConditionMessage( - it.failures.map { it.code }, - it.source + // Only do this if it is an ELR item. + if (isElr) { + val result = stamper.stampObservation(observation) + if (!result.success) { + val logger = actionLogger.getItemLogger(item.index + 1, observation.id) + if (result.failures.isEmpty()) { + logger.warn(UnmappableConditionMessage()) + } else { + logger.warn( + result.failures.map { + UnmappableConditionMessage( + it.failures.map { it.code }, + it.source + ) + } ) } - ) +// } else { +// // TODO Generate an ITEM_TRANSFORMED Azure Event. +// val bundleDigestExtractor = BundleDigestExtractor( +// FhirPathBundleDigestLabResultExtractorStrategy( +// CustomContext( +// item.bundle!!, +// item.bundle!!, +// mutableMapOf(), +// CustomFhirPathFunctions() +// ) +// ) +// ) +// reportEventService.sendItemEvent( +// eventName = ReportStreamEventName.ITEM_TRANSFORMED, +// childReport = report, +// pipelineStepName = TaskAction.convert +// ) { +// parentReportId(message.reportId) +// params( +// mapOf( +// ReportStreamEventProperties.RECEIVER_NAME to receiver.fullName, +// ReportStreamEventProperties.BUNDLE_DIGEST +// to bundleDigestExtractor.generateDigest(item.bundle!!), +// ReportStreamEventProperties.ORIGINAL_FORMAT to format.name, +// ReportStreamEventProperties.TARGET_FORMAT to MimeFormat.FHIR.name, +// ReportStreamEventProperties.ENRICHMENTS to +// listOf(receiver.translation.schemaName) +// ) +// ) +// trackingId(item.bundle!!) +// } } } } diff --git a/prime-router/src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt b/prime-router/src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt index 564d0d5e0e7..3835c5d5eb9 100644 --- a/prime-router/src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt +++ b/prime-router/src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt @@ -20,6 +20,7 @@ import org.hl7.fhir.r4.model.Coding import org.hl7.fhir.r4.model.DateTimeType import org.hl7.fhir.r4.model.DiagnosticReport import org.hl7.fhir.r4.model.Extension +import org.hl7.fhir.r4.model.MessageHeader import org.hl7.fhir.r4.model.Observation import org.hl7.fhir.r4.model.Patient import org.hl7.fhir.r4.model.Property @@ -116,6 +117,26 @@ fun Bundle.addProvenanceReference() { } } +/** + * Return true if Bundle contains an ELR in the MessageHeader. + * + * @return true if the MesssageHeader contains an R01, otherwise false. + */ +fun Bundle.isElr(): Boolean { + var isElr = false + if (this.type == Bundle.BundleType.MESSAGE && this.entry.isNotEmpty()) { + // By rule, the first entry must be a MessageHeader + val resource = this.entry[0].resource + if (resource is MessageHeader) { + val event = resource.event + if (event is Coding && event.code == "R01") { + isElr = true + } + } + } + return isElr +} + /** * Gets all properties for a [Base] resource recursively and filters only its references * diff --git a/prime-router/src/test/kotlin/common/UniversalPipelineTestUtils.kt b/prime-router/src/test/kotlin/common/UniversalPipelineTestUtils.kt index 9a3aaf1c8b8..7380c6a2974 100644 --- a/prime-router/src/test/kotlin/common/UniversalPipelineTestUtils.kt +++ b/prime-router/src/test/kotlin/common/UniversalPipelineTestUtils.kt @@ -43,14 +43,27 @@ const val validFHIRRecord1 = """{"resourceType":"Bundle","id":"1667861767830636000.7db38d22-b713-49fc-abfa-2edba9c12347","meta":{"lastUpdated":"2022-11-07T22:56:07.832+00:00"},"identifier":{"value":"1234d1d1-95fe-462c-8ac6-46728dba581c"},"type":"message","timestamp":"2021-08-03T13:15:11.015+00:00","entry":[{"fullUrl":"Observation/d683b42a-bf50-45e8-9fce-6c0531994f09","resource":{"resourceType":"Observation","id":"d683b42a-bf50-45e8-9fce-6c0531994f09","status":"final","code":{"coding":[{"system":"http://loinc.org","code":"80382-5"}],"text":"Flu A"},"subject":{"reference":"Patient/9473889b-b2b9-45ac-a8d8-191f27132912"},"performer":[{"reference":"Organization/1a0139b9-fc23-450b-9b6c-cd081e5cea9d"}],"valueCodeableConcept":{"coding":[{"system":"http://snomed.info/sct","code":"260373001","display":"Detected"}]},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0078","code":"A","display":"Abnormal"}]}],"method":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/equipment-uid","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}}],"coding":[{"display":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B*"}]},"specimen":{"reference":"Specimen/52a582e4-d389-42d0-b738-bee51cf5244d"},"device":{"reference":"Device/78dc4d98-2958-43a3-a445-76ceef8c0698"}}}]}""" const val validFHIRRecord1Identifier = "1234d1d1-95fe-462c-8ac6-46728dba581c" +@Suppress("ktlint:standard:max-line-length") +const val validFHIRRecord1a = + """{"resourceType":"Bundle","id":"1667861767830636000.7db38d22-b713-49fc-abfa-2edba9c12347","meta":{"lastUpdated":"2022-11-07T22:56:07.832+00:00"},"identifier":{"value":"1234d1d1-95fe-462c-8ac6-46728dba581c"},"type":"message","timestamp":"2021-08-03T13:15:11.015+00:00","entry":[{"fullUrl":"MessageHeader/0993dd0b-6ce5-3caf-a177-0b81cc780c18","resource":{"resourceType":"MessageHeader","id":"0993dd0b-6ce5-3caf-a177-0b81cc780c18","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters","valueString":"^~\\&#"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/character-set","valueString":"UNICODE UTF-8"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header","extension":[{"url":"MSH.7","valueString":"20230501102531-0400"}]}],"eventCoding":{"system":"http://terminology.hl7.org/CodeSystem/v2-0003","code":"R01","display":"ORU^R01^ORU_R01"},"sender":{"reference":"Organization/1710886092467181000.213628f7-9569-4400-a95d-621c3bfbf121"}}},{"fullUrl":"Observation/d683b42a-bf50-45e8-9fce-6c0531994f09","resource":{"resourceType":"Observation","id":"d683b42a-bf50-45e8-9fce-6c0531994f09","status":"final","code":{"coding":[{"system":"http://loinc.org","code":"80382-5"}],"text":"Flu A"},"subject":{"reference":"Patient/9473889b-b2b9-45ac-a8d8-191f27132912"},"performer":[{"reference":"Organization/1a0139b9-fc23-450b-9b6c-cd081e5cea9d"}],"valueCodeableConcept":{"coding":[{"system":"http://snomed.info/sct","code":"260373001","display":"Detected"}]},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0078","code":"A","display":"Abnormal"}]}],"method":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/equipment-uid","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}}],"coding":[{"display":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B*"}]},"specimen":{"reference":"Specimen/52a582e4-d389-42d0-b738-bee51cf5244d"},"device":{"reference":"Device/78dc4d98-2958-43a3-a445-76ceef8c0698"}}}]}""" +const val validFHIRRecord1aIdentifier = "1234d1d1-95fe-462c-8ac6-46728dba581c" + @Suppress("ktlint:standard:max-line-length") const val conditionCodedValidFHIRRecord1 = """{"resourceType":"Bundle","id":"1667861767830636000.7db38d22-b713-49fc-abfa-2edba9c12347","meta":{"lastUpdated":"2022-11-07T22:56:07.832+00:00"},"identifier":{"value":"1234d1d1-95fe-462c-8ac6-46728dba581c"},"type":"message","timestamp":"2021-08-03T13:15:11.015+00:00","entry":[{"fullUrl":"Observation/d683b42a-bf50-45e8-9fce-6c0531994f09","resource":{"resourceType":"Observation","id":"d683b42a-bf50-45e8-9fce-6c0531994f09","status":"final","code":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code","valueCoding":{"system":"SNOMEDCT","code":"6142004","display":"Influenza (disorder)"}}],"system":"http://loinc.org","code":"80382-5"}],"text":"Flu A"},"subject":{"reference":"Patient/9473889b-b2b9-45ac-a8d8-191f27132912"},"performer":[{"reference":"Organization/1a0139b9-fc23-450b-9b6c-cd081e5cea9d"}],"valueCodeableConcept":{"coding":[{"system":"http://snomed.info/sct","code":"260373001","display":"Detected"}]},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0078","code":"A","display":"Abnormal"}]}],"method":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/equipment-uid","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}}],"coding":[{"display":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B*"}]},"specimen":{"reference":"Specimen/52a582e4-d389-42d0-b738-bee51cf5244d"},"device":{"reference":"Device/78dc4d98-2958-43a3-a445-76ceef8c0698"}}}]}""" +@Suppress("ktlint:standard:max-line-length") +const val conditionCodedValidFHIRRecord1a = + """{"resourceType":"Bundle","id":"1667861767830636000.7db38d22-b713-49fc-abfa-2edba9c12347","meta":{"lastUpdated":"2022-11-07T22:56:07.832+00:00"},"identifier":{"value":"1234d1d1-95fe-462c-8ac6-46728dba581c"},"type":"message","timestamp":"2021-08-03T13:15:11.015+00:00","entry":[{"fullUrl":"MessageHeader/0993dd0b-6ce5-3caf-a177-0b81cc780c18","resource":{"resourceType":"MessageHeader","id":"0993dd0b-6ce5-3caf-a177-0b81cc780c18","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters","valueString":"^~\\&#"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/character-set","valueString":"UNICODE UTF-8"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header","extension":[{"url":"MSH.7","valueString":"20230501102531-0400"}]}],"eventCoding":{"system":"http://terminology.hl7.org/CodeSystem/v2-0003","code":"R01","display":"ORU^R01^ORU_R01"},"sender":{"reference":"Organization/1710886092467181000.213628f7-9569-4400-a95d-621c3bfbf121"}}},{"fullUrl":"Observation/d683b42a-bf50-45e8-9fce-6c0531994f09","resource":{"resourceType":"Observation","id":"d683b42a-bf50-45e8-9fce-6c0531994f09","status":"final","code":{"coding":[{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code","valueCoding":{"system":"SNOMEDCT","code":"6142004","display":"Influenza (disorder)"}}],"system":"http://loinc.org","code":"80382-5"}],"text":"Flu A"},"subject":{"reference":"Patient/9473889b-b2b9-45ac-a8d8-191f27132912"},"performer":[{"reference":"Organization/1a0139b9-fc23-450b-9b6c-cd081e5cea9d"}],"valueCodeableConcept":{"coding":[{"system":"http://snomed.info/sct","code":"260373001","display":"Detected"}]},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0078","code":"A","display":"Abnormal"}]}],"method":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/equipment-uid","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}}],"coding":[{"display":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B*"}]},"specimen":{"reference":"Specimen/52a582e4-d389-42d0-b738-bee51cf5244d"},"device":{"reference":"Device/78dc4d98-2958-43a3-a445-76ceef8c0698"}}}]}""" + @Suppress("ktlint:standard:max-line-length") const val validFHIRRecord2 = """{"resourceType":"Bundle","id":"1667861767830636000.7db38d22-b713-49fc-abfa-2edba9c09876","meta":{"lastUpdated":"2022-11-07T22:56:07.832+00:00"},"identifier":{"value":"1234d1d1-95fe-462c-8ac6-46728dbau8cd"},"type":"message","timestamp":"2021-08-03T13:15:11.015+00:00","entry":[{"fullUrl":"Observation/d683b42a-bf50-45e8-9fce-6c0531994f09","resource":{"resourceType":"Observation","id":"d683b42a-bf50-45e8-9fce-6c0531994f09","status":"final","code":{"coding":[{"system":"http://loinc.org","code":"41458-1"}],"text":"SARS "},"subject":{"reference":"Patient/9473889b-b2b9-45ac-a8d8-191f27132912"},"performer":[{"reference":"Organization/1a0139b9-fc23-450b-9b6c-cd081e5cea9d"}],"valueCodeableConcept":{"coding":[{"system":"http://snomed.info/sct","code":"260373001","display":"Detected"}]},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0078","code":"A","display":"Abnormal"}]}],"method":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/equipment-uid","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}}],"coding":[{"display":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B*"}]},"specimen":{"reference":"Specimen/52a582e4-d389-42d0-b738-bee51cf5244d"},"device":{"reference":"Device/78dc4d98-2958-43a3-a445-76ceef8c0698"}}}]}""" +@Suppress("ktlint:standard:max-line-length") +const val validFHIRRecord2a = + """{"resourceType":"Bundle","id":"1667861767830636000.7db38d22-b713-49fc-abfa-2edba9c09876","meta":{"lastUpdated":"2022-11-07T22:56:07.832+00:00"},"identifier":{"value":"1234d1d1-95fe-462c-8ac6-46728dbau8cd"},"type":"message","timestamp":"2021-08-03T13:15:11.015+00:00","entry":[{"fullUrl":"MessageHeader/0993dd0b-6ce5-3caf-a177-0b81cc780c18","resource":{"resourceType":"MessageHeader","id":"0993dd0b-6ce5-3caf-a177-0b81cc780c18","extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters","valueString":"^~\\&#"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/character-set","valueString":"UNICODE UTF-8"},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header","extension":[{"url":"MSH.7","valueString":"20230501102531-0400"}]}],"eventCoding":{"system":"http://terminology.hl7.org/CodeSystem/v2-0003","code":"R01","display":"ORU^R01^ORU_R01"},"sender":{"reference":"Organization/1710886092467181000.213628f7-9569-4400-a95d-621c3bfbf121"}}},{"fullUrl":"Observation/d683b42a-bf50-45e8-9fce-6c0531994f09","resource":{"resourceType":"Observation","id":"d683b42a-bf50-45e8-9fce-6c0531994f09","status":"final","code":{"coding":[{"system":"http://loinc.org","code":"41458-1"}],"text":"SARS "},"subject":{"reference":"Patient/9473889b-b2b9-45ac-a8d8-191f27132912"},"performer":[{"reference":"Organization/1a0139b9-fc23-450b-9b6c-cd081e5cea9d"}],"valueCodeableConcept":{"coding":[{"system":"http://snomed.info/sct","code":"260373001","display":"Detected"}]},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0078","code":"A","display":"Abnormal"}]}],"method":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/equipment-uid","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}}],"coding":[{"display":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B*"}]},"specimen":{"reference":"Specimen/52a582e4-d389-42d0-b738-bee51cf5244d"},"device":{"reference":"Device/78dc4d98-2958-43a3-a445-76ceef8c0698"}}}]}""" + const val invalidEmptyFHIRRecord = "{}" const val invalidMalformedFHIRRecord = """{"resourceType":"Bund}""" diff --git a/prime-router/src/test/kotlin/fhirengine/azure/FHIRConverterIntegrationTests.kt b/prime-router/src/test/kotlin/fhirengine/azure/FHIRConverterIntegrationTests.kt index e95fb3d5806..da04315bf38 100644 --- a/prime-router/src/test/kotlin/fhirengine/azure/FHIRConverterIntegrationTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/azure/FHIRConverterIntegrationTests.kt @@ -53,7 +53,7 @@ import gov.cdc.prime.router.common.badEncodingHL7Record import gov.cdc.prime.router.common.cleanHL7Record import gov.cdc.prime.router.common.cleanHL7RecordConverted import gov.cdc.prime.router.common.cleanHL7RecordConvertedAndTransformed -import gov.cdc.prime.router.common.conditionCodedValidFHIRRecord1 +import gov.cdc.prime.router.common.conditionCodedValidFHIRRecord1a import gov.cdc.prime.router.common.garbledHL7Record import gov.cdc.prime.router.common.invalidEmptyFHIRRecord import gov.cdc.prime.router.common.invalidHL7Record @@ -62,8 +62,8 @@ import gov.cdc.prime.router.common.invalidHL7RecordConvertedAndTransformed import gov.cdc.prime.router.common.invalidMalformedFHIRRecord import gov.cdc.prime.router.common.invalidRadxMarsHL7Message import gov.cdc.prime.router.common.unparseableHL7Record -import gov.cdc.prime.router.common.validFHIRRecord1 -import gov.cdc.prime.router.common.validFHIRRecord2 +import gov.cdc.prime.router.common.validFHIRRecord1a +import gov.cdc.prime.router.common.validFHIRRecord2a import gov.cdc.prime.router.common.validRadxMarsHL7Message import gov.cdc.prime.router.common.validRadxMarsHL7MessageConverted import gov.cdc.prime.router.db.ReportStreamTestDatabaseContainer @@ -690,9 +690,9 @@ class FHIRConverterIntegrationTests { val receivedReportContents = listOf( - validFHIRRecord1, + validFHIRRecord1a, invalidEmptyFHIRRecord, - validFHIRRecord2, + validFHIRRecord2a, invalidMalformedFHIRRecord ).joinToString( "\n" @@ -748,7 +748,7 @@ class FHIRConverterIntegrationTests { } .map { Pair(it.first, it.second.toString(Charset.defaultCharset())) } assertThat(reportAndBundles).transform { pairs -> pairs.map { it.second } } - .containsOnly(conditionCodedValidFHIRRecord1, validFHIRRecord2) + .containsOnly(conditionCodedValidFHIRRecord1a, validFHIRRecord2a) val expectedQueueMessages = reportAndBundles.map { (report, fhirBundle) -> FhirDestinationFilterQueueMessage( report.reportId, @@ -835,7 +835,7 @@ class FHIRConverterIntegrationTests { patientState = emptyList(), orderingFacilityState = emptyList(), performerState = emptyList(), - eventType = "" + eventType = "ORU^R01^ORU_R01" ) ) ) diff --git a/prime-router/src/test/kotlin/fhirengine/engine/FhirConverterTests.kt b/prime-router/src/test/kotlin/fhirengine/engine/FhirConverterTests.kt index 33731c0e5af..be85a4e54e0 100644 --- a/prime-router/src/test/kotlin/fhirengine/engine/FhirConverterTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/engine/FhirConverterTests.kt @@ -344,6 +344,106 @@ class FhirConverterTests { @Test fun `test condition code stamping`() { + @Suppress("ktlint:standard:max-line-length") + val fhirRecord = + """{"resourceType":"Bundle","id":"1667861767830636000.7db38d22-b713-49fc-abfa-2edba9c12347","meta":{"lastUpdated":"2022-11-07T22:56:07.832+00:00"},"identifier":{"value":"1234d1d1-95fe-462c-8ac6-46728dba581c"},"type":"message","timestamp":"2021-08-03T13:15:11.015+00:00","entry":[{"fullUrl" : "MessageHeader/0993dd0b-6ce5-3caf-a177-0b81cc780c18","resource" : {"resourceType" : "MessageHeader","id" : "0993dd0b-6ce5-3caf-a177-0b81cc780c18","extension" : [ {"url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/encoding-characters","valueString" : "^~\\&#"}, {"url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/character-set","valueString" : "UNICODE UTF-8"}, {"url" : "https://reportstream.cdc.gov/fhir/StructureDefinition/msh-message-header","extension" : [ {"url" : "MSH.7","valueString" : "20230501102531-0400"} ]} ],"eventCoding" : {"system" : "http://terminology.hl7.org/CodeSystem/v2-0003","code" : "R01","display" : "ORU^R01^ORU_R01"},"sender" : {"reference" : "Organization/1710886092467181000.213628f7-9569-4400-a95d-621c3bfbf121"}}},{"fullUrl":"Observation/d683b42a-bf50-45e8-9fce-6c0531994f09","resource":{"resourceType":"Observation","id":"d683b42a-bf50-45e8-9fce-6c0531994f09","status":"final","code":{"coding":[{"system":"http://loinc.org","code":"80382-5"}],"text":"Flu A"},"subject":{"reference":"Patient/9473889b-b2b9-45ac-a8d8-191f27132912"},"performer":[{"reference":"Organization/1a0139b9-fc23-450b-9b6c-cd081e5cea9d"}],"valueCodeableConcept":{"coding":[{"system":"http://snomed.info/sct","code":"260373001","display":"Detected"}]},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0078","code":"A","display":"Abnormal"}]}],"method":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/equipment-uid","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}}],"coding":[{"display":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B*"}]},"specimen":{"reference":"Specimen/52a582e4-d389-42d0-b738-bee51cf5244d"},"device":{"reference":"Device/78dc4d98-2958-43a3-a445-76ceef8c0698"}}}]}""" + + val conditionCodeExtensionURL = "https://reportstream.cdc.gov/fhir/StructureDefinition/condition-code" + mockkObject(BlobAccess) + mockkObject(Report) + metadata.lookupTableStore += mapOf( + "observation-mapping" to LookupTable( + "observation-mapping", + listOf( + listOf( + ObservationMappingConstants.TEST_CODE_KEY, + ObservationMappingConstants.CONDITION_CODE_KEY, + ObservationMappingConstants.CONDITION_CODE_SYSTEM_KEY, + ObservationMappingConstants.CONDITION_NAME_KEY + ), + listOf( + "80382-5", + "6142004", + "SNOMEDCT", + "Influenza (disorder)" + ), + listOf( + "260373001", + "Some Condition Code", + "Condition Code System", + "Condition Name" + ) + ) + ) + ) + + // set up + val actionHistory = mockk() + val actionLogger = mockk() + val transformer = mockk() + + val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) + val message = spyk( + FhirConvertQueueMessage( + UUID.randomUUID(), + BLOB_FHIR_URL, + "test", + BLOB_SUB_FOLDER_NAME, + Topic.FULL_ELR, + SCHEMA_NAME + ) + ) + + val bodyFormat = MimeFormat.FHIR + val bodyUrl = "https://anyblob.com" + + every { actionLogger.hasErrors() } returns false + every { actionLogger.getItemLogger(any(), any()) } returns actionLogger + every { actionLogger.warn(any>()) } just runs + every { actionLogger.setReportId(any()) } returns actionLogger + every { BlobAccess.downloadBlob(any(), any()) } returns (fhirRecord) + every { Report.getFormatFromBlobURL(message.blobURL) } returns MimeFormat.FHIR + every { BlobAccess.Companion.uploadBlob(any(), any()) } returns "test" + every { accessSpy.insertTask(any(), bodyFormat.toString(), bodyUrl, any()) }.returns(Unit) + every { actionHistory.trackCreatedReport(any(), any(), blobInfo = any()) }.returns(Unit) + every { actionHistory.trackExistingInputReport(any()) }.returns(Unit) + val action = Action() + action.actionName = TaskAction.convert + every { actionHistory.action } returns action + every { engine.getTransformerFromSchema(SCHEMA_NAME) }.returns(transformer) + every { transformer.process(any()) } returnsArgument (0) + + // act + accessSpy.transact { txn -> + engine.run(message, actionLogger, actionHistory, txn) + } + + val bundle = FhirContext.forR4().newJsonParser().parseResource(Bundle::class.java, fhirRecord) + bundle.entry.filter { it.resource is Observation }.forEach { + val observation = (it.resource as Observation) + observation.code.coding[0].addExtension( + conditionCodeExtensionURL, + Coding("SNOMEDCT", "6142004", "Influenza (disorder)") + ) + observation.valueCodeableConcept.coding[0].addExtension( + conditionCodeExtensionURL, + Coding("Condition Code System", "Some Condition Code", "Condition Name") + ) + } + + // assert + verify(exactly = 1) { + // TODO clean up assertions + // engine.getContentFromFHIR(any(), any()) + actionHistory.trackExistingInputReport(any()) + transformer.process(any()) + actionHistory.trackCreatedReport(any(), any(), blobInfo = any()) + BlobAccess.Companion.uploadBlob(any(), FhirTranscoder.encode(bundle).toByteArray(), any()) + } + } + + @Test + fun `test condition code stamping without message header`() { @Suppress("ktlint:standard:max-line-length") val fhirRecord = """{"resourceType":"Bundle","id":"1667861767830636000.7db38d22-b713-49fc-abfa-2edba9c12347","meta":{"lastUpdated":"2022-11-07T22:56:07.832+00:00"},"identifier":{"value":"1234d1d1-95fe-462c-8ac6-46728dba581c"},"type":"message","timestamp":"2021-08-03T13:15:11.015+00:00","entry":[{"fullUrl":"Observation/d683b42a-bf50-45e8-9fce-6c0531994f09","resource":{"resourceType":"Observation","id":"d683b42a-bf50-45e8-9fce-6c0531994f09","status":"final","code":{"coding":[{"system":"http://loinc.org","code":"80382-5"}],"text":"Flu A"},"subject":{"reference":"Patient/9473889b-b2b9-45ac-a8d8-191f27132912"},"performer":[{"reference":"Organization/1a0139b9-fc23-450b-9b6c-cd081e5cea9d"}],"valueCodeableConcept":{"coding":[{"system":"http://snomed.info/sct","code":"260373001","display":"Detected"}]},"interpretation":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v2-0078","code":"A","display":"Abnormal"}]}],"method":{"extension":[{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/testkit-name-id","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}},{"url":"https://reportstream.cdc.gov/fhir/StructureDefinition/equipment-uid","valueCoding":{"code":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B_Becton, Dickinson and Company (BD)"}}],"coding":[{"display":"BD Veritor System for Rapid Detection of SARS-CoV-2 & Flu A+B*"}]},"specimen":{"reference":"Specimen/52a582e4-d389-42d0-b738-bee51cf5244d"},"device":{"reference":"Device/78dc4d98-2958-43a3-a445-76ceef8c0698"}}}]}""" @@ -438,6 +538,8 @@ class FhirConverterTests { actionHistory.trackExistingInputReport(any()) transformer.process(any()) actionHistory.trackCreatedReport(any(), any(), blobInfo = any()) + } + verify(exactly = 0) { BlobAccess.Companion.uploadBlob(any(), FhirTranscoder.encode(bundle).toByteArray(), any()) } } @@ -544,6 +646,12 @@ class FhirConverterTests { } } +// @Test +// fun `test isElr when bundle is empty`() { +// val emptyBundle = Bundle() +// assertThat(BaseEngine.Companion.isElr(emptyBundle)).isFalse() +// } + @Nested inner class FhirConverterProcessTest { diff --git a/prime-router/src/test/kotlin/fhirengine/utils/FHIRBundleHelpersTests.kt b/prime-router/src/test/kotlin/fhirengine/utils/FHIRBundleHelpersTests.kt index a9d4a282cf6..1b5968845ba 100644 --- a/prime-router/src/test/kotlin/fhirengine/utils/FHIRBundleHelpersTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/utils/FHIRBundleHelpersTests.kt @@ -45,6 +45,7 @@ import org.hl7.fhir.r4.model.Coding import org.hl7.fhir.r4.model.DiagnosticReport import org.hl7.fhir.r4.model.Endpoint import org.hl7.fhir.r4.model.Extension +import org.hl7.fhir.r4.model.MessageHeader import org.hl7.fhir.r4.model.Observation import org.hl7.fhir.r4.model.Patient import org.hl7.fhir.r4.model.PractitionerRole @@ -195,6 +196,72 @@ class FHIRBundleHelpersTests { assertThat(diagnosticReport.getResourceProperties()).isNotEmpty() } + @Test + fun `Test if ELR when bundle is empty`() { + val fhirBundle = Bundle() + assertThat(fhirBundle.isElr()).isFalse() + } + + @Test + fun `Test if ELR when bundle is not BundleType MESSAGE`() { + val fhirBundle = Bundle() + fhirBundle.type = Bundle.BundleType.DOCUMENT + assertThat(fhirBundle.isElr()).isFalse() + } + + @Test + fun `Test if ELR when bundle has no entries`() { + val fhirBundle = Bundle() + fhirBundle.type = Bundle.BundleType.MESSAGE + assertThat(fhirBundle.isElr()).isFalse() + } + + @Test + fun `Test if ELR when bundle has no MessageHeader`() { + val fhirBundle = Bundle() + fhirBundle.type = Bundle.BundleType.MESSAGE + val entry = Bundle.BundleEntryComponent() + fhirBundle.entry.add(0, entry) + assertThat(fhirBundle.isElr()).isFalse() + } + + @Test + fun `Test if ELR when bundle has MessageHeader but no Coding event`() { + val fhirBundle = Bundle() + fhirBundle.type = Bundle.BundleType.MESSAGE + val entry = Bundle.BundleEntryComponent() + entry.resource = MessageHeader() + fhirBundle.entry.add(0, entry) + assertThat(fhirBundle.isElr()).isFalse() + } + + @Test + fun `Test if ELR when bundle has MessageHeader but Coding event not R01`() { + val fhirBundle = Bundle() + fhirBundle.type = Bundle.BundleType.MESSAGE + val entry = Bundle.BundleEntryComponent() + val messageHeader = MessageHeader() + val event = Coding() + messageHeader.event = event + entry.resource = messageHeader + fhirBundle.entry.add(0, entry) + assertThat(fhirBundle.isElr()).isFalse() + } + + @Test + fun `Test if ELR when bundle is happy path`() { + val fhirBundle = Bundle() + fhirBundle.type = Bundle.BundleType.MESSAGE + val entry = Bundle.BundleEntryComponent() + val messageHeader = MessageHeader() + val event = Coding() + event.code = "R01" + messageHeader.event = event + entry.resource = messageHeader + fhirBundle.entry.add(0, entry) + assertThat(fhirBundle.isElr()).isTrue() + } + @Test fun `Test find Diagnostic report no observation`() { val actionLogger = ActionLogger() From 2891d0c9fe854c6d89dd993333c115f4dfd38d07 Mon Sep 17 00:00:00 2001 From: Bill Cutshall Date: Wed, 4 Dec 2024 09:20:50 -0500 Subject: [PATCH 02/10] [16143] Checking in WIP. --- .../kotlin/fhirengine/engine/FHIRConverter.kt | 82 ++++++++++--------- .../fhirengine/engine/FhirConverterTests.kt | 46 ++++++----- 2 files changed, 69 insertions(+), 59 deletions(-) diff --git a/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt b/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt index 134ceca7e29..6b950a7d49c 100644 --- a/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt +++ b/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt @@ -260,7 +260,7 @@ class FHIRConverter( // TODO: https://github.com/CDCgov/prime-reportstream/issues/14287 FhirPathUtils - val processedItems = process(format, input.blobURL, input.blobDigest, input.topic, actionLogger) + val processedItems = process(format, input, actionLogger) // processedItems can be empty in three scenarios: // - the blob had no contents, i.e. an empty file was submitted @@ -452,14 +452,12 @@ class FHIRConverter( */ internal fun process( format: MimeFormat, - blobURL: String, - blobDigest: String, - topic: Topic, + input: FHIRConvertInput, actionLogger: ActionLogger, routeReportWithInvalidItems: Boolean = true, ): List> { - val validator = topic.validator - val rawReport = BlobAccess.downloadBlob(blobURL, blobDigest) + val validator = input.topic.validator + val rawReport = BlobAccess.downloadBlob(input.blobURL, input.blobDigest) return if (rawReport.isBlank()) { actionLogger.error(InvalidReportMessage("Provided raw data is empty.")) emptyList() @@ -473,7 +471,7 @@ class FHIRConverter( "format" to format.name ) ) { - getBundlesFromRawHL7(rawReport, validator, topic.hl7ParseConfiguration) + getBundlesFromRawHL7(rawReport, validator, input.topic.hl7ParseConfiguration) } } catch (ex: ParseFailureError) { actionLogger.error( @@ -529,37 +527,45 @@ class FHIRConverter( } ) } -// } else { -// // TODO Generate an ITEM_TRANSFORMED Azure Event. -// val bundleDigestExtractor = BundleDigestExtractor( -// FhirPathBundleDigestLabResultExtractorStrategy( -// CustomContext( -// item.bundle!!, -// item.bundle!!, -// mutableMapOf(), -// CustomFhirPathFunctions() -// ) -// ) -// ) -// reportEventService.sendItemEvent( -// eventName = ReportStreamEventName.ITEM_TRANSFORMED, -// childReport = report, -// pipelineStepName = TaskAction.convert -// ) { -// parentReportId(message.reportId) -// params( -// mapOf( -// ReportStreamEventProperties.RECEIVER_NAME to receiver.fullName, -// ReportStreamEventProperties.BUNDLE_DIGEST -// to bundleDigestExtractor.generateDigest(item.bundle!!), -// ReportStreamEventProperties.ORIGINAL_FORMAT to format.name, -// ReportStreamEventProperties.TARGET_FORMAT to MimeFormat.FHIR.name, -// ReportStreamEventProperties.ENRICHMENTS to -// listOf(receiver.translation.schemaName) -// ) -// ) -// trackingId(item.bundle!!) -// } + } else { + // TODO Generate an ITEM_TRANSFORMED Azure Event. + val bundleDigestExtractor = BundleDigestExtractor( + FhirPathBundleDigestLabResultExtractorStrategy( + CustomContext( + item.bundle!!, + item.bundle!!, + mutableMapOf(), + CustomFhirPathFunctions() + ) + ) + ) + val report = Report( + MimeFormat.FHIR, + emptyList(), + parentItemLineageData = listOf( + Report.ParentItemLineageData(input.reportId, item.index.toInt() + 1) + ), + metadata = this.metadata, + topic = input.topic, + nextAction = TaskAction.none + ) + reportEventService.sendItemEvent( + eventName = ReportStreamEventName.ITEM_TRANSFORMED, + childReport = report, + pipelineStepName = TaskAction.convert + ) { + parentReportId(input.reportId) + params( + mapOf( + ReportStreamEventProperties.BUNDLE_DIGEST + to bundleDigestExtractor.generateDigest(item.bundle!!), + ReportStreamEventProperties.ORIGINAL_FORMAT to format.name, + ReportStreamEventProperties.TARGET_FORMAT to MimeFormat.FHIR.name, + ReportStreamEventProperties.ENRICHMENTS to listOf(input.schemaName) + ) + ) + trackingId(item.bundle!!) + } } } } diff --git a/prime-router/src/test/kotlin/fhirengine/engine/FhirConverterTests.kt b/prime-router/src/test/kotlin/fhirengine/engine/FhirConverterTests.kt index be85a4e54e0..96015341e88 100644 --- a/prime-router/src/test/kotlin/fhirengine/engine/FhirConverterTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/engine/FhirConverterTests.kt @@ -668,12 +668,11 @@ class FhirConverterTests { @Test fun `should log an error and return no bundles if the message is empty`() { mockkObject(BlobAccess) + val input = FHIRConverter.FHIRConvertInput(UUID.randomUUID(), Topic.FULL_ELR, "", "", "", "") val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val actionLogger = ActionLogger() every { BlobAccess.downloadBlob(any(), any()) } returns "" - val bundles = engine.process( - MimeFormat.FHIR, "", "", Topic.FULL_ELR, actionLogger - ) + val bundles = engine.process(MimeFormat.FHIR, input, actionLogger) assertThat(bundles).isEmpty() assertThat(actionLogger.errors.map { it.detail.message }).contains("Provided raw data is empty.") } @@ -695,9 +694,8 @@ class FhirConverterTests { every { mockMessage.topic } returns Topic.FULL_ELR every { mockMessage.reportId } returns UUID.randomUUID() every { BlobAccess.downloadBlob(any(), any()) } returns simpleHL7 - val bundles = engine.process( - MimeFormat.HL7, "", "", Topic.FULL_ELR, actionLogger - ) + val input = FHIRConverter.FHIRConvertInput(UUID.randomUUID(), Topic.FULL_ELR, "", "", "", "") + val bundles = engine.process(MimeFormat.HL7, input, actionLogger) assertThat(bundles).isEmpty() assertThat( actionLogger.errors.map { @@ -712,9 +710,8 @@ class FhirConverterTests { val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val actionLogger = ActionLogger() every { BlobAccess.downloadBlob(any(), any()) } returns "test,1,2" - val bundles = engine.process( - MimeFormat.CSV, "", "", Topic.FULL_ELR, actionLogger - ) + val input = FHIRConverter.FHIRConvertInput(UUID.randomUUID(), Topic.FULL_ELR, "", "", "", "") + val bundles = engine.process(MimeFormat.CSV, input, actionLogger) assertThat(bundles).isEmpty() assertThat(actionLogger.errors.map { it.detail.message }) .contains("Received unsupported report format: CSV") @@ -726,7 +723,8 @@ class FhirConverterTests { val engine = spyk(makeFhirEngine(metadata, settings, TaskAction.process) as FHIRConverter) val actionLogger = ActionLogger() every { BlobAccess.downloadBlob(any(), any()) } returns "{\"id\":}" - val processedItems = engine.process(MimeFormat.FHIR, "", "", Topic.FULL_ELR, actionLogger) + val input = FHIRConverter.FHIRConvertInput(UUID.randomUUID(), Topic.FULL_ELR, "", "", "", "") + val processedItems = engine.process(MimeFormat.FHIR, input, actionLogger) assertThat(processedItems).hasSize(1) assertThat(processedItems.first().bundle).isNull() assertThat(actionLogger.errors.map { it.detail.message }).contains( @@ -756,9 +754,8 @@ class FhirConverterTests { every { mockMessage.topic } returns Topic.FULL_ELR every { mockMessage.reportId } returns UUID.randomUUID() every { BlobAccess.downloadBlob(any(), any()) } returns "{\"id\":\"1\", \"resourceType\":\"Bundle\"}" - val processedItems = engine.process( - MimeFormat.FHIR, "", "", Topic.FULL_ELR, actionLogger - ) + val input = FHIRConverter.FHIRConvertInput(UUID.randomUUID(), Topic.FULL_ELR, "", "", "", "") + val processedItems = engine.process(MimeFormat.FHIR, input, actionLogger) assertThat(processedItems).hasSize(1) assertThat(processedItems.first().bundle).isNull() assertThat(actionLogger.errors.map { it.detail.message }).contains( @@ -777,7 +774,8 @@ class FhirConverterTests { every { BlobAccess.downloadBlob(any(), any()) } returns unparseableHL7 - val processedItems = engine.process(MimeFormat.HL7, "", "", Topic.FULL_ELR, actionLogger) + val input = FHIRConverter.FHIRConvertInput(UUID.randomUUID(), Topic.FULL_ELR, "", "", "", "") + val processedItems = engine.process(MimeFormat.HL7, input, actionLogger) assertThat(processedItems).hasSize(1) assertThat(processedItems.first().bundle).isNull() assertThat( @@ -812,7 +810,8 @@ class FhirConverterTests { every { BlobAccess.downloadBlob(any(), any()) } returns simpleHL7 - val processedItems = engine.process(MimeFormat.HL7, "", "", Topic.FULL_ELR, actionLogger) + val input = FHIRConverter.FHIRConvertInput(UUID.randomUUID(), Topic.FULL_ELR, "", "", "", "") + val processedItems = engine.process(MimeFormat.HL7, input, actionLogger) assertThat(processedItems).hasSize(1) assertThat(processedItems.first().bundle).isNull() @Suppress("ktlint:standard:max-line-length") @@ -841,7 +840,8 @@ class FhirConverterTests { every { BlobAccess.downloadBlob(any(), any()) } returns simpleHL7 - val processedItems = engine.process(MimeFormat.HL7, "", "", Topic.FULL_ELR, actionLogger) + val input = FHIRConverter.FHIRConvertInput(UUID.randomUUID(), Topic.FULL_ELR, "", "", "", "") + val processedItems = engine.process(MimeFormat.HL7, input, actionLogger) assertThat(processedItems).hasSize(1) assertThat(processedItems.first().bundle).isNull() assertThat( @@ -867,14 +867,15 @@ class FhirConverterTests { } returns """{\"id\":} {"id":"1", "resourceType":"Bundle"} """.trimMargin() - val processedItems = engine.process(MimeFormat.FHIR, "", "", Topic.FULL_ELR, actionLogger) + val input = FHIRConverter.FHIRConvertInput(UUID.randomUUID(), Topic.FULL_ELR, "", "", "", "") + val processedItems = engine.process(MimeFormat.FHIR, input, actionLogger) assertThat(processedItems).hasSize(2) assertThat(actionLogger.errors.map { it.detail.message }).contains( @Suppress("ktlint:standard:max-line-length") "Item 1 in the report was not parseable. Reason: exception while parsing FHIR: HAPI-1861: Failed to parse JSON encoded FHIR content: Unexpected character ('\\' (code 92)): was expecting double-quote to start field name\n at [line: 1, column: 2]" ) - val bundles2 = engine.process(MimeFormat.FHIR, "", "", Topic.FULL_ELR, actionLogger, false) + val bundles2 = engine.process(MimeFormat.FHIR, input, actionLogger, false) assertThat(bundles2).hasSize(0) assertThat(actionLogger.errors.map { it.detail.message }).contains( @Suppress("ktlint:standard:max-line-length") @@ -894,7 +895,8 @@ class FhirConverterTests { every { BlobAccess.downloadBlob(any(), any()) } returns simpleHL7 - val bundles = engine.process(MimeFormat.HL7, "", "", Topic.FULL_ELR, actionLogger) + val input = FHIRConverter.FHIRConvertInput(UUID.randomUUID(), Topic.FULL_ELR, "", "", "", "") + val bundles = engine.process(MimeFormat.HL7, input, actionLogger) assertThat(bundles).hasSize(1) assertThat(actionLogger.errors).isEmpty() } @@ -914,7 +916,8 @@ class FhirConverterTests { every { BlobAccess.downloadBlob(any(), any()) } returns simpleHL7 + "\n" + simpleHL7 + "\n" + simpleHL7 - val bundles = engine.process(MimeFormat.HL7, "", "", Topic.FULL_ELR, actionLogger) + val input = FHIRConverter.FHIRConvertInput(UUID.randomUUID(), Topic.FULL_ELR, "", "", "", "") + val bundles = engine.process(MimeFormat.HL7, input, actionLogger) assertThat(bundles).hasSize(3) assertThat(actionLogger.errors).isEmpty() @@ -945,7 +948,8 @@ class FhirConverterTests { every { BlobAccess.downloadBlob(any(), any()) } returns simpleHL7 - val bundles = engine.process(MimeFormat.HL7, "", "", Topic.FULL_ELR, actionLogger) + val input = FHIRConverter.FHIRConvertInput(UUID.randomUUID(), Topic.FULL_ELR, "", "", "", "") + val bundles = engine.process(MimeFormat.HL7, input, actionLogger) assertThat(bundles).hasSize(1) assertThat(actionLogger.errors).isEmpty() } From 12aaeb2a76c6883b914b923f5d4eba4891ef60a5 Mon Sep 17 00:00:00 2001 From: Bill Cutshall Date: Wed, 4 Dec 2024 13:45:37 -0500 Subject: [PATCH 03/10] [16143] Added new code to check for ELR.. --- .../kotlin/fhirengine/engine/FHIRConverter.kt | 2 +- .../fhirengine/utils/FHIRBundleHelpers.kt | 4 +- .../utils/FHIRBundleHelpersTests.kt | 6 +- prime-router/tmp.txt | 1013 +++++++++++++++++ 4 files changed, 1021 insertions(+), 4 deletions(-) create mode 100644 prime-router/tmp.txt diff --git a/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt b/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt index 6b950a7d49c..b4f79187ee1 100644 --- a/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt +++ b/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt @@ -528,7 +528,7 @@ class FHIRConverter( ) } } else { - // TODO Generate an ITEM_TRANSFORMED Azure Event. + // Generate an ITEM_TRANSFORMED Azure Event. val bundleDigestExtractor = BundleDigestExtractor( FhirPathBundleDigestLabResultExtractorStrategy( CustomContext( diff --git a/prime-router/src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt b/prime-router/src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt index 3835c5d5eb9..0d9f71c49c6 100644 --- a/prime-router/src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt +++ b/prime-router/src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt @@ -120,7 +120,7 @@ fun Bundle.addProvenanceReference() { /** * Return true if Bundle contains an ELR in the MessageHeader. * - * @return true if the MesssageHeader contains an R01, otherwise false. + * @return true if has a MesssageHeader that contains an R01 or ORU_R01, otherwise false. */ fun Bundle.isElr(): Boolean { var isElr = false @@ -129,7 +129,7 @@ fun Bundle.isElr(): Boolean { val resource = this.entry[0].resource if (resource is MessageHeader) { val event = resource.event - if (event is Coding && event.code == "R01") { + if (event is Coding && ((event.code == "R01") || (event.code == "ORU_R01"))) { isElr = true } } diff --git a/prime-router/src/test/kotlin/fhirengine/utils/FHIRBundleHelpersTests.kt b/prime-router/src/test/kotlin/fhirengine/utils/FHIRBundleHelpersTests.kt index 1b5968845ba..c22b45fc312 100644 --- a/prime-router/src/test/kotlin/fhirengine/utils/FHIRBundleHelpersTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/utils/FHIRBundleHelpersTests.kt @@ -254,12 +254,16 @@ class FHIRBundleHelpersTests { fhirBundle.type = Bundle.BundleType.MESSAGE val entry = Bundle.BundleEntryComponent() val messageHeader = MessageHeader() - val event = Coding() + var event = Coding() event.code = "R01" messageHeader.event = event entry.resource = messageHeader fhirBundle.entry.add(0, entry) assertThat(fhirBundle.isElr()).isTrue() + event.code = "ORU_R01" + assertThat(fhirBundle.isElr()).isTrue() + event.code = "R21" + assertThat(fhirBundle.isElr()).isFalse() } @Test diff --git a/prime-router/tmp.txt b/prime-router/tmp.txt new file mode 100644 index 00000000000..13c28a4cb34 --- /dev/null +++ b/prime-router/tmp.txt @@ -0,0 +1,1013 @@ + 1 cd prime-router + 2 ./cleanslate.sh --verbose + 3 docker ps + 4 ./gradlew tasks + 5 gradle tasks + 6 docker compose down + 7 docker ps + 8 docker compose down + 9 docker-compose down + 10 docker-compose down d698f0920a37 + 11 docker-compose down prime-router-postgresql-1 + 12 docker-compose down prime-router-postgresql + 13 docker ps + 14 ./gradlew tasks + 15 ls + 16 ls prime + 17 gradle tasks + 18 docker ps + 19 git fetch -p + 20 git status + 21 git fetch -p + 22 cd .. + 23 grep -ir azurite * + 24 grep -ir azurite * | grep -v build | grep -v test + 25 find . -name "*.sh" + 26 cd prime-router + 27 less cleanslate.sh + 28 less docker-compose.yml + 29 grep -ir azurite * | grep -v '(build|test)' + 30 grep -ir azurite * | grep -v (build|test) + 31 grep -ir azurite * | grep -v build|test + 32 grep -ir azurite * | grep -v 'build|test' + 33 grep -ir azurite * | grep -v "build|test" + 34 grep -ir azurite * | grep -v "build\|test" + 35 ls + 36 ls -al + 37 less devenv-infrastructure.sh + 38 less docker-compose.yml + 39 ls + 40 ls .. + 41 less docker-compose.yml + 42 find . -name "Docker*" + 43 cd .. + 44 find . -name "Docker*" + 45 less ./.environment/docker/docker-compose/Dockerfile.azurite + 46 less ./.environment/docker/docker-compose/Dockerfile.azurite + 47 less docker-compose.yml + 48 cd prime-router + 49 less docker-compose.yml + 50 cd .. + 51 git branch + 52 git checkout main + 53 git fetch -p + 54 git pull + 55 cd .. + 56 history 1 | grep clone + 57 ls + 58 rm -rf prime-reportstream + 59 git clone https://github.com/CDCgov/prime-reportstream.git + 60 git checkout main + 61 cd prime-reportstream + 62 git checkout main + 63 git fetch -p + 64 ls + 65 cd prime-router + 66 git fetch -p + 67 cd .. + 68 git fetch -p + 69 cd prime-router + 70 ./cleanslate.sh --verbose + 71 docker ps + 72 ls + 73 gradle tasks + 74 cat /Users/bill/projects/report-stream/prime-reportstream/prime-router/.vault/env/.env.local + 75 docker compose -f docker-compose.build.yml up --detach + 76 docker ps + 77 docker compose up --detach vault 1>/dev/null 2>/dev/null + 78 docker ps + 79 ls + 80 gradle primeCLI --args "create-credential --type=UserPass --persist=DEFAULT-SFTP --user foo --pass pass" + 81 gradle reloadTables + 82 docker ps + 83 gradle reloadTables + 84 docker ps + 85 gradle reloadTables + 86 grep -r 7071 * | grep -v 'test\|build' + 87 docker ps + 88 gradle run + 89 ../gradlew run + 90 docker ps + 91 ../gradlew reloadTables + 92 ../gradlew quickRun + 93 docker ps + 94 ../gradlew reloadTables + 95 ../gradlew run + 96 ../gradlew tasks + 97 ../gradlew clean build + 98 docker ps + 99 ../gradlew clean build -x test + 100 ../gradlew run -x test + 101 ls ls /Users/bill/projects/report-stream/prime-reportstream/prime-router/build/azure-functions + 102 ls ls /Users/bill/projects/report-stream/prime-reportstream/prime-router/build/azure-functions/prime-data-hub-router + 103 ls /Users/bill/projects/report-stream/prime-reportstream/prime-router/build/azure-functions/prime-data-hub-router + 104 ../gradlew reloadSettings + 105 docker ps + 106 ../gradlew quickRun + 107 docker ps + 108 ../gradlew composeDown + 109 ../gradlew composeDownForced + 110 docker ps + 111 docker ps + 112 docker ps + 113 ../gradlew run + 114 ls + 115 docker compose -f docker-compose.build.yml up --detach + 116 docker ps + 117 ../gradlew run + 118 docker ps + 119 ../gradlew quickRun + 120 ../gradlew run + 121 ../gradlew run --debug + 122 echo $JAVA_HOME + 123 java -version + 124 env + 125 cat ~/.zshrc + 126 export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH" + 127 export JAVA_HOME=$(/usr/libexec/java_home) + 128 env + 129 ../gradlew run --debug + 130 docker ps + 131 docker ps + 132 grep -r 5432 * + 133 grep -r 5432 * | grep -v 'build|test' + 134 grep -r 5432 * | grep -v "build\|test" + 135 docker ps + 136 ../gradlew composeDown + 137 docker ps + 138 ../gradlew composeDownForced + 139 exit + 140 cd + 141 ls -al + 142 less .gitconfig + 143 cat .stCommitMsg + 144 cat .gitconfig + 145 gpg --version + 146 gpg2 --version + 147 exit + 148 gpg2 --version + 149 gpg2 --full-generate-key + 150 ls -al + 151 ls .gnupg + 152 vi .gitconfig + 153 ls .gnupg + 154 vi .gitconfig + 155 gpg2 --armor --export real.name@organization.tld + 156 gpg2 --armor --export billcutshall@navapbc.com.tld + 157 gpg2 --armor --export Bill.Cutshall@navapbc.com.tld + 158 gpg2 --armor --export billcutshall@navapbc.com + 159 exit + 160 docker ps + 161 cd .. + 162 ./prime --help + 163 ls + 164 cd prime-router + 165 ls + 166 ./prime --help + 167 cat prime + 168 ../gradlew reloadTables + 169 ../gradlew reloadSettings + 170 curl --help + 171 curl http://localhost:7071/api/health + 172 curl -vvv http://localhost:7071/api/health + 173 ps + 174 netstat -vanp + 175 netstat -an + 176 lsof -i + 177 lsof -i tcp:7071 + 178 top + 179 docker ps + 180 lsof -i tcp:3000 + 181 ps aux + 182 ps aux | grep 7071 + 183 ps aux | grep 1113 + 184 curl -vvv http://localhost:7071/api/health + 185 curl -vvv http://localhost:7071/health + 186 curl -vvv http://localhost:7071/api/reports + 187 curl -vvv http://localhost:7071/prime-data-hub-router/health + 188 curl -vvv http://localhost:7071/prime-data-hub-router/api/health + 189 curl -vvv http://localhost:3001/prime-data-hub-router/api/health + 190 curl -vvv http://localhost:3001/api/health + 191 curl -vvv http://localhost:3001/health + 192 curl -vvv http://localhost:8080/health + 193 curl -vvv http://localhost:8081/health + 194 ps + 195 ps aux | grep 832 + 196 ps aux | grep java + 197 curl -vvv http://localhost:57179/health + 198 curl -vvv http://localhost:57179/api/health + 199 ../gradlew tasks + 200 ../gradlew properties + 201 curl -vvv http://localhost:57179/api/vi/health + 202 curl -vvv http://localhost:7071/api/vi/health + 203 curl -vvv http://localhost:3001/api/vi/health + 204 curl -vvv http://localhost:3001/api/health + 205 curl -vvv http://localhost:3001/health + 206 curl -vvv http://localhost:3001/actuator + 207 curl -vvv http://localhost:57179/actuator + 208 ps aux | grep java + 209 curl -vvv http://localhost:60811/actuator + 210 ../gradlew --help + 211 ../gradlew --status + 212 docker ps + 213 docker ps + 214 git status + 215 git checkout -- settings/organizations.yml + 216 ../gradlew reloadSettings + 217 ../gradlew reloadSettings + 218 ../gradlew status + 219 ../gradlew --status + 220 ../gradlew --help + 221 openssl --version + 222 grep -r "elr-fhir-translate" * | grep -v "(build\|test)" + 223 grep -r "elr-fhir-translate" * | grep -v "build\|test" + 224 find . -name "*elr-fhir-translate*" + 225 cd .. + 226 find . -name "*elr-fhir-translate*" + 227 grep -r "elr-fhir-translate" * | grep -v "build\|test" + 228 sftp --help + 229 grep -r FhirTranslateQueueMessage * | grep -v "build\|test" + 230 pwd + 231 cd .. + 232 grep -r FhirTranslateQueueMessage * | grep -v "build\|test" + 233 ls + 234 cd prime-reportstream + 235 ls + 236 find . name "*.tf" . + 237 find . name "*\.tf" . + 238 find . name "*tf" . + 239 find . name "*.tf" + 240 find . name "*\.tf" + 241 find . name "*tf + 242 find . name "*tf" + 243 find . -name "*.tf" + 244 cd operations + 245 ls + 246 ls app + 247 cd app + 248 ls functions + 249 ls terraform + 250 cd ../.. + 251 cd prime-router + 252 grep -r QueueTrigger * | grep -v "build\|test" + 253 history 1 | grep translate + 254 grep -r "elr-fhir-translate" * | grep -v "build\|test" + 255 cd .. + 256 grep -r "elr-fhir-translate" * | grep -v "build\|test" + 257 grep -r elrTranslationQueueName * | grep -v "build\|test" + 258 cd prime-router + 259 grep -ir azureevent * | grep -v "builld\|test" + 260 grep -ir azureevent * | grep -v "build\|test" + 261 grep -ir FhirTranslateQueueMessage * | grep -v "build\|test" + 262 grep -r digest * | grep -v "build\|test" + 263 git status + 264 git checkout -b 16144 origin/main + 265 git fetch -p + 266 git pull + 267 git fetch -p + 268 git pull + 269 git status + 270 grep -ir azureEventService * | grep -v "build\|test" + 271 grep -ir trackevent * | grep -v "build\|test" + 272 cd .. + 273 grep -ir azureEventService * | grep -v "build\|test" + 274 grep -ir trackevent * | grep -v "build\|test" + 275 cd .. + 276 ls + 277 cd prime-reportstream + 278 grep -ir ReportStreamItemEventBuilder * | grep -v "build\|test" + 279 grep -r ITEM_TRANSFORMED * + 280 grep -r ITEM_ * + 281 grep -r ReportStreamItemEvent * + 282 git status + 283 git diff prime-router/src/main/kotlin/fhirengine/engine/FHIRTranslator.kt + 284 git fetch -p + 285 git pull + 286 docker ps + 287 docker ps + 288 exit + 289 cd projects/report-stream/prime-reportstream + 290 ls + 291 cd prime-router + 292 env + 293 docker compose --file "docker-compose.build.yml" up --detach + 294 docker ps + 295 docker ps + 296 ../gradlew run + 297 docker ps + 298 ../gradlew composeDownForce + 299 docker ps + 300 git fetch -p + 301 git status + 302 git pull + 303 ../gradlew clean build + 304 ../gradlew run + 305 git status + 306 git fetch -p + 307 ../gradlew composeDownForce + 308 git pull + 309 ../gradlew clean build + 310 docker ps + 311 docker ps + 312 ../gradlew run + 313 ../gradlew run + 314 ../gradlew run + 315 ../gradlew run -x test + 316 ./gradlew clean build + 317 ../gradlew clean build + 318 ../gradlew clean build -x test + 319 ../gradlew run -x test --stacktrace + 320 ../gradlew clean build + 321 ../gradlew clean build + 322 ../gradlew clean build -x test + 323 ../gradlew run -x test --stacktrace + 324 ../gradlew composeDownForce + 325 git status + 326 git checkout -- . + 327 ../gradlew clean build + 328 ../gradlew run --stacktrace + 329 ../gradlew clean build + 330 ../gradlew clean build --stacktrace + 331 ../gradlew clean build --stacktrace + 332 ../gradlew clean build + 333 ../gradlew clean build + 334 ../gradlew clean build + 335 git fetch -p + 336 git pull + 337 git status + 338 git diff src/main/kotlin/fhirengine/engine/FHIRTranslator.kt + 339 docker ps + 340 ../gradlew clean build + 341 git fetch -p + 342 git pull + 343 ../gradlew clean build + 344 ../gradlew clean build + 345 ../gradlew clean build + 346 ../gradlew clean build + 347 ../gradlew clean build + 348 docker ps + 349 ../gradlew clean build + 350 ../gradlew clean build + 351 ../gradlew clean build + 352 git status + 353 git status + 354 git fetch =p + 355 git fetch -p + 356 git pull + 357 git status + 358 git add . + 359 git status + 360 git commit -m "[16144] Modifications for user story 16144 - Implement Translate Step Updates" + 361 git status + 362 git push origin 16144:platform/bill/16144 + 363 cd .git + 364 ls -al + 365 exit + 366 cd projects/report-stream/prime-reportstream + 367 git status + 368 git push origin 16144:platform/bill/16144 + 369 ls + 370 cd .. + 371 mv prime-reportstream prime-reportstream-SAV + 372 ls -al ~/.ssh + 373 ssh-keygen -t ed25519 -C "billcutshall@navapbc.com" + 374 cd + 375 ls -al ~/.ssh + 376 eval "$(ssh-agent -s)" + 377 touch ~/.ssh/config + 378 vi ~/.ssh/config + 379 ssh-add --apple-use-keychain ~/.ssh/id_ed25519 + 380 pbcopy < ~/.ssh/id_ed25519.pub + 381 vi .gitconfig + 382 git clone git@github.com:CDCgov/prime-reportstream.git + 383 ls + 384 rm -rf prime-reportstream + 385 cd projects + 386 ls + 387 cd report-stream + 388 git clone git@github.com:CDCgov/prime-reportstream.git + 389 ls + 390 ls + 391 ls prime-reportstream + 392 rm -rf prime-reportstream + 393 exit + 394 cd projects/report-stream/ + 395 ls + 396 git clone git@github.com:CDCgov/prime-reportstream.git + 397 cd prime-reportstream + 398 cd prime-router + 399 ../gradlew clean build + 400 env + 401 ls + 402 ../gradlew clean build + 403 git fetch -p + 404 git pull + 405 git status + 406 ../gradlew clean + 407 ./cleanslate.sh + 408 cd ../.. + 409 rm -rf prime-reportstream + 410 ./cleanslate.sh + 411 git clone git@github.com:CDCgov/prime-reportstream.git + 412 rm -rf prime-reportstream + 413 git clone git@github.com:CDCgov/prime-reportstream.git + 414 cd prime-reportstream/prime-router + 415 ./cleanslate.sh + 416 docker ps + 417 docker ps + 418 docker compose -f docker-compose.build.yml up --detach + 419 docker ps + 420 docker compose up --detach vault 1>/dev/null 2>/dev/null + 421 docker ps + 422 ../gradlew composeDown + 423 docker ps + 424 ./gradlew clean build + 425 ../gradlew clean build + 426 git status + 427 git fetch -p + 428 git pull + 429 pwd + 430 ../gradlew clean build + 431 cd .. + 432 ../gradlew clean build + 433 ./gradlew clean build + 434 cd prime-router + 435 ./gradlew build + 436 ../gradlew build + 437 cd ../.. + 438 ls + 439 exit + 440 cd projects/report-stream + 441 ls + 442 git clone git@github.com:CDCgov/prime-reportstream.git + 443 cd prime-reportstream + 444 cd prime-router + 445 ./cleanslate.sh --verbose + 446 docker ps + 447 docker compose -f docker-compose.build.yml up --detach + 448 docker ps + 449 docker compose up --detach vault 1>/dev/null 2>/dev/null + 450 docker ps + 451 docker compose --file "docker-compose.build.yml" up --detach + 452 docker ps + 453 ../gradlew clean build + 454 ls -al + 455 ../gradlew clean build --stacktrace + 456 cd ../.gradle + 457 ls + 458 cd vcs-1 + 459 ls + 460 cat vcs-1.lock + 461 cat hl7v2-fhir_ceb5eyxyfvflmdloyy6lk5d5c + 462 ls hl7v2-fhir_ceb5eyxyfvflmdloyy6lk5d5c + 463 ls hl7v2-fhir_ceb5eyxyfvflmdloyy6lk5d5c/hl7v2-fhir-converter + 464 rm -rf hl7v2-fhir_ceb5eyxyfvflmdloyy6lk5d5c + 465 cd ../ + 466 cd ../prime-router + 467 ../gradlew clean build --stacktrace + 468 ../gradlew run + 469 docker ps + 470 history 1 | grep checkout + 471 git checkout -b 16144 origin/main + 472 git status + 473 git fetch -p + 474 git pull + 475 git status + 476 ../gradlew clean build + 477 git status + 478 ../gradlew clean build -x test + 479 git status + 480 git add . + 481 history 1 | grep commit + 482 git commit -m "[16144] Modifications for user story 16144 - Implement Translate Step Updates" + 483 git status + 484 history 1 | grep push + 485 git push origin 16144:platform/bill/16144 + 486 ../gradlew clean build + 487 ../gradlew clean build + 488 ../gradlew clean build + 489 ../gradlew clean build + 490 ../gradlew clean build + 491 git status + 492 git add . + 493 history 1 | grep commit + 494 git commit -m "[16144] Change to attempt fix for existing unit and integration tests." + 495 history 1 | grep push + 496 git push origin 16144:platform/bill/16144 + 497 grep -r reportServiceMock.getRootReport * + 498 ../gradlew clean build + 499 ../gradlew clean build -x test + 500 ../gradlew clean build -x test + 501 ../gradlew clean build -x test + 502 ../gradlew clean build -x test + 503 ../gradlew clean build + 504 git status + 505 git add . + 506 git commit -m "[16144] Fixed unit tests in FHIRTranslatorTests." + 507 git push origin 16144:platform/bill/16144 + 508 docker ps + 509 docker ps + 510 docker ps + 511 docker ps + 512 docker ps + 513 docker ps + 514 docker ps + 515 docker ps + 516 docker ps + 517 history 1 | grep docker + 518 docker compose --file "docker-compose.build.yml" up --detach + 519 docker ps + 520 docker ps + 521 docker ps + 522 docker ps + 523 docker ps + 524 docker ps + 525 docker ps + 526 docker ps + 527 docker ps + 528 docker ps + 529 git status + 530 git status + 531 git checkout -- src/test/kotlin/fhirengine/engine/FhirTranslatorTests.kt + 532 git status + 533 git add . + 534 git commit -m "[16144] Fixed integration tests by modifying FHIRTranslator." + 535 git push origin 16144:platform/bill/16144 + 536 ../gradlew clean build + 537 ../gradlew run + 538 ../gradlew composeDownForce + 539 docker ps + 540 git status + 541 git checkout -- src/test/kotlin/fhirengine/engine/FhirTranslatorTests.kt + 542 grep -r "not supported" * + 543 grep -r "not supported" * | grep -v "build\|test" + 544 git status + 545 ../gradlew clean build + 546 ../gradlew clean build + 547 git status + 548 git fetch -p + 549 git pull + 550 docker ps + 551 ../gradlew clean build + 552 ../gradlew clean build + 553 ../gradlew clean build + 554 git status + 555 ../gradlew clean build + 556 ../gradlew clean build + 557 ../gradlew clean build + 558 docker ps + 559 ../gradlew clean build + 560 git status + 561 git add . + 562 history 1 | grep commit + 563 git commit -m "[16144] Added code for tests." + 564 history 1 | grep push + 565 git push origin 16144:platform/bill/16144 + 566 ../gradlew run + 567 ../gradlew run --trace + 568 ../gradlew run + 569 ../gradlew testSmoke + 570 grep -r setBlobDigest * + 571 ../gradlew clean build + 572 ../gradlew clean build + 573 ../gradlew clean build + 574 ../gradlew clean build + 575 grep -r ".blobDigest =" * + 576 grep -r ".digest =" * + 577 ../gradlew clean build + 578 cd .. + 579 grep -r setBlobDigest * + 580 grep -r setBlobDigest * | grep -v "build\|test" + 581 grep -r ".blobDigest =" * | grep -v "build\|test" + 582 docker ps + 583 pwd + 584 grep -r setBlobDigest * | grep -v "\build\|test" + 585 grep -r setBlobDigest * | grep -v "build\|test" + 586 less prime-router/build/generated-src/jooq/src/main/java/gov/cdc/prime/router/azure/db/tables/records/ReportFileRecord.java + 587 grep -r ReportFileRecord * | grep -v "build\|test" + 588 docker ps + 589 ../gradlew clean build + 590 cd prime-router + 591 ../gradlew clean build + 592 git status + 593 git diff src/main/kotlin/fhirengine/engine/FHIRTranslator.kt + 594 git diff src/test/kotlin/common/UniversalPipelineTestUtils.kt + 595 git diff src/test/kotlin/fhirengine/azure/FHIRTranslatorIntegrationTests.kt + 596 git checkout -- src/test/kotlin/fhirengine/azure/FHIRTranslatorIntegrationTests.kt + 597 git diff src/test/kotlin/fhirengine/engine/FhirTranslatorTests.kt + 598 ../gradlew clean build + 599 git status + 600 git add . + 601 history 1 | grep commit + 602 git commit -m "[16144] Added code to account for blob digest properly." + 603 history 1 | grep push + 604 git push origin 16144:platform/bill/16144 + 605 git status + 606 git status + 607 git checkout -b 16144-a origin/platform/bill/16144 + 608 ../gradlew clean build + 609 git fetch -p + 610 git pull + 611 git status + 612 git diff src/main/kotlin/fhirengine/engine/FHIRTranslator.kt + 613 git checkout -- . + 614 git status + 615 git pull + 616 git fetch -p + 617 ../gradlew clean build + 618 ../gradlew clean build + 619 ../gradlew clean build + 620 ../gradlew clean build + 621 ../gradlew clean build + 622 ../gradlew clean build -x test + 623 ../gradlew clean build -x test + 624 ../gradlew clean build + 625 history 1 | grep vault. + 626 history 1 | grep vault. + 627 ../gradlew clean build + 628 docker ps + 629 history 1 | grep docker + 630 find . -name "TaskAction*" + 631 ls -al + 632 cd .vault + 633 ls + 634 cd env + 635 ls + 636 ls -al + 637 cat .env.local + 638 c d + 639 cd ../.. + 640 ../gradlew clean build -x test + 641 ../gradlew clean build + 642 env + 643 cat .zshrc + 644 cacat ~/.zshrc + 645 cat ~/.zshrc + 646 env | grep JAVA + 647 ../gradlew run + 648 ../gradlew composeDownForce + 649 cd .. + 650 ls + 651 ./gradlew tasks + 652 cd prime-router + 653 ../gradlew tasks + 654 ../gradlew package + 655 docker ps + 656 docker ps + 657 exit + 658 cd + 659 ls -al + 660 cd .gradle + 661 ls + 662 ls caches + 663 cd + 664 docker ps + 665 cd projects + 666 cd pr + 667 cd report-stream + 668 cd prime-reportstream-SAV + 669 git status + 670 cd ../prime-reportstream + 671 cd prime-router + 672 ../gradlew composeDown + 673 ../gradlew composeDownForce + 674 docker ps + 675 ../gradlew composeDownForced + 676 docker ps + 677 docker ps + 678 find . -name "FHIRTranslatorIntegrationTests*" + 679 git fetch -p + 680 docker ps + 681 docker ps + 682 git status + 683 grep -oE '^[a-zA-Z][a-zA-Z0-9]*$' "test translation happy path with file digest exception" + 684 echo -n "test translation happy path with file digest exception" | grep -oE '^[a-zA-Z][a-zA-Z0-9]*$' + 685 env + 686 docker ps + 687 docker ps + 688 docker ps + 689 cd .. + 690 cd prime-router + 691 less cleanslate.sh + 692 less cleanslate.sh + 693 docker ps + 694 less cleanslate.sh + 695 ls + 696 less prime + 697 ls + 698 less cleanslate.sh.log + 699 git status + 700 ls + 701 less cleanslate.sh + 702 exit + 703 env + 704 cat ~/.zshrc + 705 uname -a + 706 less cleanslate.sh + 707 uname -m + 708 uname -an + 709 cd .vault + 710 ls + 711 ls config + 712 cat config/local.json + 713 cat env/.env.local + 714 vault + 715 cd .. + 716 less cleanslate.sh + 717 exit + 718 docker ps + 719 docker ps + 720 git status + 721 git diff src/main/kotlin/fhirengine/engine/FHIREngine.kt + 722 git diff src/test/kotlin/fhirengine/engine/FhirTranslatorTests.kt + 723 cd .. + 724 grep -r testSmoke * + 725 cd prime-router + 726 ../gradlew testSmoke + 727 ls + 728 ./prime test + 729 git status + 730 git add . + 731 git status + 732 ../gradlew testSmoke + 733 git status + 734 ../gradlew clearDB + 735 ../gradlew reloadSettings + 736 ../gradlew reloadTables + 737 ../gradlew testSmoke + 738 ../gradlew clearDB + 739 ../gradlew reloadSettings + 740 ../gradlew reloadTables + 741 ../gradlew testEnd2EndUP + 742 cat /etc/hosts + 743 grep -r R01 * | grep -v "build\|test" + 744 grep -r CSTE * | grep -v "build\|test" + 745 git fetch -p + 746 git status + 747 git fetch -p + 748 history 1 | grep checkout + 749 git checkout -b 16143 origin/main + 750 ../gradlew clean build + 751 ../gradlew run + 752 ../gradlew clearDB + 753 ../gradlew reloadSettings + 754 ../gradlew reloadTables + 755 ../gradlew testEnd2EndUP + 756 ../gradlew clearDB + 757 ../gradlew reloadSettings + 758 ../gradlew reloadTables + 759 ../gradlew testEnd2EndUP + 760 grep -r "SFTP credentials" * + 761 less cleanslate.sh + 762 cd .vault + 763 ls -al + 764 ls + 765 ls -l + 766 cd config + 767 ls + 768 cat init.sh + 769 ls + 770 cat local.json + 771 cd ../env + 772 ls -al + 773 cat .env.local + 774 cat key + 775 cd ../.. + 776 grep -i sftp cleanslate.sh + 777 ../gradlew quickRun + 778 ../gradlew composeDownForce + 779 ../gradlew clearDB + 780 ../gradlew reloadSettings + 781 ../gradlew reloadTables + 782 ../gradlew testEnd2EndUP + 783 export CREDENTIAL_STORAGE_METHOD="HASHICORP_VAULT" + 784 less cleanslate.sh + 785 ../gradlew clearDB + 786 ../gradlew reloadSettings + 787 ../gradlew reloadTables + 788 ../gradlew testEnd2EndUP + 789 exit + 790 cd projects/report-stream/prime-reportstream/prime-router + 791 history 1 | grep docker + 792 docker compose --file "docker-compose.build.yml" up --detach + 793 docker ps + 794 ../gradlew clean build + 795 ../gradlew clean build + 796 grep -r "any(" * + 797 docker ps + 798 grep -r "no answer found for AzureEventService" * + 799 ../gradlew clean build + 800 docker ps + 801 ../gradlew clean build + 802 ../gradlew clean build + 803 git status + 804 git diff src/main/kotlin/fhirengine/engine/FHIRTranslator.kt + 805 git add . + 806 history 1 | grep commit + 807 git commit -m "[16144] Checking in WIP." + 808 history 1 | grep push + 809 git push origin 16144-a:platform/bill/16144 + 810 grep -r params * + 811 ../gradlew clean build + 812 grep -r bodyFormat * | grep -v "build\|test" + 813 ../gradlew clean build + 814 ../gradlew clean build + 815 ../gradlew clean build + 816 ../gradlew clean build + 817 ../gradlew clean build + 818 ../gradlew clean build + 819 ../gradlew clean build + 820 ../gradlew clean build + 821 ../gradlew clean build + 822 ../gradlew clean build + 823 docker ps + 824 git status + 825 ../gradlew clean build + 826 ../gradlew clean build + 827 ../gradlew clean build + 828 ../gradlew clean build + 829 grep -r IReportStreamEventService * + 830 grep -r IReportStreamEventService * | grep -v "build\|test" + 831 grep -r IReportStreamEventService * | grep -v build + 832 grep -r IReportStreamEventService * | grep -v build + 833 git status + 834 git add . + 835 history 1 | grep commit + 836 git commit -m "[16144] Checking in WIP." + 837 history 1 | grep push + 838 git push origin 16144-a:platform/bill/16144 + 839 ../gradlew clean build + 840 docker ps + 841 docker ps + 842 ../gradlew clean build + 843 ../gradlew clean build + 844 ../gradlew clean build + 845 ../gradlew clean build + 846 git status + 847 git add . + 848 git commit -m "[16144] Made change to FHIREngine to account for nullable reportEventService actually having a value in builder." + 849 git push origin 16144-a:platform/bill/16144 + 850 git fetch -p + 851 git pull + 852 ../gradlew clean build + 853 ../gradlew clean build + 854 ../gradlew clean build + 855 git status + 856 git add . + 857 git commit -m "[16144] Updates based on PR review." + 858 git push origin 16144-a:platform/bill/16144 + 859 ../gradlew clean build + 860 git fetch -p + 861 git pull + 862 git fetch -p + 863 ../gradlew clean build + 864 git status + 865 git add . + 866 git commit -m "[16144] Update based on PR review." + 867 git push origin 16144-a:platform/bill/16144 + 868 ../gradlew clean build + 869 ../gradlew clean build + 870 ../gradlew clean build + 871 ../gradlew clean build + 872 ../gradlew testSmoke + 873 history 1 | grep testSmoke + 874 docker ps + 875 git commit -m "[16144] Changed url and digest to use correct reportdocument." + 876 git push origin 16144-a:platform/bill/16144 + 877 ../gradlew run + 878 docker ps + 879 ../gradlew composeDownForce + 880 git status + 881 git status + 882 git add . + 883 git commit -m "[16144] Added additional checks to integration test." + 884 git fetch -p + 885 git pull + 886 ../gradlew clean build + 887 ../gradlew clean build + 888 git status + 889 git add src/test/kotlin/fhirengine/azure/FHIRTranslatorIntegrationTests.kt + 890 git commit -m "[16144] Added additional checks to integration test." + 891 git push origin 16144-a:platform/bill/16144 + 892 git fetch -p + 893 git pull + 894 git fetch -p + 895 git pull + 896 ../gradlew clean build + 897 ../gradlew clean build + 898 git status + 899 git add . + 900 git commit -m "[16144] Added additional check to integration tests." + 901 git push origin 16144-a:platform/bill/16144 + 902 ../gradlew run + 903 docker ps + 904 docker ps + 905 docker ps + 906 ../gradlew composeDownForce + 907 docker ps + 908 ../gradlew quickRun + 909 ../gradlew composeDownForce + 910 ../gradlew quickRun + 911 ../gradlew composeDownForce + 912 ../gradlew tasks + 913 grep -r credentials * + 914 grep -r credentials * | grep -v "build\|test" + 915 less cleanslate.sh + 916 ./prime create-credential --type=UserPass --persist=DEFAULT-SFTP --user foo --pass pass 1>>${LOG?} 2>&1 + 917 ls + 918 less cleanslate.sh.log + 919 less cleanslate.sh + 920 export LOG=fred.txt + 921 ./prime create-credential --type=UserPass --persist=DEFAULT-SFTP --user foo --pass pass 1>>${LOG?} 2>&1 + 922 cat fred.txt + 923 less cleanslate.sh + 924 ./prime multiple-settings set --silent --input settings/organizations.yml 1>>${LOG?} 2>&1 + 925 cat fred.txt + 926 ../gradlew quickRun + 927 ../gradlew composeDownForce + 928 export CREDENTIAL_STORAGE_METHOD="HASHICORP_VAULT" + 929 ../gradlew quickRun + 930 ../gradlew composeDownForce + 931 cd .. + 932 cd .. + 933 ls + 934 mv prime-reportstream prime-reportstream-SAV-1 + 935 exit + 936 cd + 937 cd .gradle + 938 \tls -al + 939 cd .. + 940 mv .gradle .gradle-SAV + 941 cd .gradle + 942 ls -al + 943 cd + 944 cd + 945 cd projects/report-stream/prime-reportstream/prime-router + 946 ../gradlew cleanDB + 947 ../gradlew clearDB + 948 ../gradlew reloadSettings + 949 ../gradlew reloadTables + 950 ../gradlew testEnd2EndUP + 951 ../gradlew clearDB + 952 ../gradlew reloadSettings + 953 ../gradlew reloadTables + 954 ../gradlew testSmoke + 955 less build.gradle.kts + 956 git status + 957 git branch + 958 git checkout -b 16143 origin/main + 959 git fetch -p + 960 git pull + 961 ../gradlew clean build + 962 git fetch -p + 963 git pull + 964 git fetch -p + 965 git pull + 966 docker ps + 967 git fetch -p + 968 exit + 969 env + 970 cd projects/report-stream + 971 ls + 972 history 1 | grep clone + 973 git clone git@github.com:CDCgov/prime-reportstream.git + 974 cd prime-reportstream + 975 cd prime-router + 976 ./cleanslate --verbose + 977 ls + 978 ./cleanslate.sh --verbose + 979 cd .. + 980 cd ./prime-router\n./cleanslate.sh + 981 cd ../.. + 982 rm -rf prime-reportstream + 983 git clone git@github.com:CDCgov/prime-reportstream.git + 984 cd prime-reportstream/prime-router + 985 ./cleanslate --verbose + 986 ./cleanslate.sh --verbose + 987 docker ps + 988 docker compose up --detach vault 1>/dev/null 2>/dev/null + 989 ./gradlew primeCLI --args "create-credential --type=UserPass --persist=DEFAULT-SFTP --user foo --pass pass" + 990 ../gradlew primeCLI --args "create-credential --type=UserPass --persist=DEFAULT-SFTP --user foo --pass pass" + 991 ../gradlew reloadTables + 992 ../gradlew composeDownForced + 993 ../gradlew quickRun + 994 ../gradlew composeDownForced + 995 ../gradlew quickRun + 996 ../gradlew quickRun + 997 ../gradlew clean build + 998 ../gradlew quickRun + 999 ../gradlew composeDownForced + 1000 exit + 1001 git fetch -p + 1002 git status + 1003 git fetch -p + 1004 history 1 | grep e2e + 1005 history 1 | grep gradlew | sort -U + 1006 history 1 | grep gradlew | sort -u + 1007 history 1 | grep nd + 1008 ../gradlew tasks + 1009 ./gradlew testEnd2EndUP + 1010 ../gradlew testEnd2EndUP + 1011 ../gradlew testSmoke + 1012 history 1 | grep clear + 1013 history 1 | grep reload From 48cf73bbf63335ad3edf6460827d9da1c6e5b528 Mon Sep 17 00:00:00 2001 From: Bill Cutshall Date: Wed, 4 Dec 2024 13:46:26 -0500 Subject: [PATCH 04/10] [16143] Removed tmp file. --- prime-router/tmp.txt | 1013 ------------------------------------------ 1 file changed, 1013 deletions(-) delete mode 100644 prime-router/tmp.txt diff --git a/prime-router/tmp.txt b/prime-router/tmp.txt deleted file mode 100644 index 13c28a4cb34..00000000000 --- a/prime-router/tmp.txt +++ /dev/null @@ -1,1013 +0,0 @@ - 1 cd prime-router - 2 ./cleanslate.sh --verbose - 3 docker ps - 4 ./gradlew tasks - 5 gradle tasks - 6 docker compose down - 7 docker ps - 8 docker compose down - 9 docker-compose down - 10 docker-compose down d698f0920a37 - 11 docker-compose down prime-router-postgresql-1 - 12 docker-compose down prime-router-postgresql - 13 docker ps - 14 ./gradlew tasks - 15 ls - 16 ls prime - 17 gradle tasks - 18 docker ps - 19 git fetch -p - 20 git status - 21 git fetch -p - 22 cd .. - 23 grep -ir azurite * - 24 grep -ir azurite * | grep -v build | grep -v test - 25 find . -name "*.sh" - 26 cd prime-router - 27 less cleanslate.sh - 28 less docker-compose.yml - 29 grep -ir azurite * | grep -v '(build|test)' - 30 grep -ir azurite * | grep -v (build|test) - 31 grep -ir azurite * | grep -v build|test - 32 grep -ir azurite * | grep -v 'build|test' - 33 grep -ir azurite * | grep -v "build|test" - 34 grep -ir azurite * | grep -v "build\|test" - 35 ls - 36 ls -al - 37 less devenv-infrastructure.sh - 38 less docker-compose.yml - 39 ls - 40 ls .. - 41 less docker-compose.yml - 42 find . -name "Docker*" - 43 cd .. - 44 find . -name "Docker*" - 45 less ./.environment/docker/docker-compose/Dockerfile.azurite - 46 less ./.environment/docker/docker-compose/Dockerfile.azurite - 47 less docker-compose.yml - 48 cd prime-router - 49 less docker-compose.yml - 50 cd .. - 51 git branch - 52 git checkout main - 53 git fetch -p - 54 git pull - 55 cd .. - 56 history 1 | grep clone - 57 ls - 58 rm -rf prime-reportstream - 59 git clone https://github.com/CDCgov/prime-reportstream.git - 60 git checkout main - 61 cd prime-reportstream - 62 git checkout main - 63 git fetch -p - 64 ls - 65 cd prime-router - 66 git fetch -p - 67 cd .. - 68 git fetch -p - 69 cd prime-router - 70 ./cleanslate.sh --verbose - 71 docker ps - 72 ls - 73 gradle tasks - 74 cat /Users/bill/projects/report-stream/prime-reportstream/prime-router/.vault/env/.env.local - 75 docker compose -f docker-compose.build.yml up --detach - 76 docker ps - 77 docker compose up --detach vault 1>/dev/null 2>/dev/null - 78 docker ps - 79 ls - 80 gradle primeCLI --args "create-credential --type=UserPass --persist=DEFAULT-SFTP --user foo --pass pass" - 81 gradle reloadTables - 82 docker ps - 83 gradle reloadTables - 84 docker ps - 85 gradle reloadTables - 86 grep -r 7071 * | grep -v 'test\|build' - 87 docker ps - 88 gradle run - 89 ../gradlew run - 90 docker ps - 91 ../gradlew reloadTables - 92 ../gradlew quickRun - 93 docker ps - 94 ../gradlew reloadTables - 95 ../gradlew run - 96 ../gradlew tasks - 97 ../gradlew clean build - 98 docker ps - 99 ../gradlew clean build -x test - 100 ../gradlew run -x test - 101 ls ls /Users/bill/projects/report-stream/prime-reportstream/prime-router/build/azure-functions - 102 ls ls /Users/bill/projects/report-stream/prime-reportstream/prime-router/build/azure-functions/prime-data-hub-router - 103 ls /Users/bill/projects/report-stream/prime-reportstream/prime-router/build/azure-functions/prime-data-hub-router - 104 ../gradlew reloadSettings - 105 docker ps - 106 ../gradlew quickRun - 107 docker ps - 108 ../gradlew composeDown - 109 ../gradlew composeDownForced - 110 docker ps - 111 docker ps - 112 docker ps - 113 ../gradlew run - 114 ls - 115 docker compose -f docker-compose.build.yml up --detach - 116 docker ps - 117 ../gradlew run - 118 docker ps - 119 ../gradlew quickRun - 120 ../gradlew run - 121 ../gradlew run --debug - 122 echo $JAVA_HOME - 123 java -version - 124 env - 125 cat ~/.zshrc - 126 export PATH="/opt/homebrew/opt/openjdk@17/bin:$PATH" - 127 export JAVA_HOME=$(/usr/libexec/java_home) - 128 env - 129 ../gradlew run --debug - 130 docker ps - 131 docker ps - 132 grep -r 5432 * - 133 grep -r 5432 * | grep -v 'build|test' - 134 grep -r 5432 * | grep -v "build\|test" - 135 docker ps - 136 ../gradlew composeDown - 137 docker ps - 138 ../gradlew composeDownForced - 139 exit - 140 cd - 141 ls -al - 142 less .gitconfig - 143 cat .stCommitMsg - 144 cat .gitconfig - 145 gpg --version - 146 gpg2 --version - 147 exit - 148 gpg2 --version - 149 gpg2 --full-generate-key - 150 ls -al - 151 ls .gnupg - 152 vi .gitconfig - 153 ls .gnupg - 154 vi .gitconfig - 155 gpg2 --armor --export real.name@organization.tld - 156 gpg2 --armor --export billcutshall@navapbc.com.tld - 157 gpg2 --armor --export Bill.Cutshall@navapbc.com.tld - 158 gpg2 --armor --export billcutshall@navapbc.com - 159 exit - 160 docker ps - 161 cd .. - 162 ./prime --help - 163 ls - 164 cd prime-router - 165 ls - 166 ./prime --help - 167 cat prime - 168 ../gradlew reloadTables - 169 ../gradlew reloadSettings - 170 curl --help - 171 curl http://localhost:7071/api/health - 172 curl -vvv http://localhost:7071/api/health - 173 ps - 174 netstat -vanp - 175 netstat -an - 176 lsof -i - 177 lsof -i tcp:7071 - 178 top - 179 docker ps - 180 lsof -i tcp:3000 - 181 ps aux - 182 ps aux | grep 7071 - 183 ps aux | grep 1113 - 184 curl -vvv http://localhost:7071/api/health - 185 curl -vvv http://localhost:7071/health - 186 curl -vvv http://localhost:7071/api/reports - 187 curl -vvv http://localhost:7071/prime-data-hub-router/health - 188 curl -vvv http://localhost:7071/prime-data-hub-router/api/health - 189 curl -vvv http://localhost:3001/prime-data-hub-router/api/health - 190 curl -vvv http://localhost:3001/api/health - 191 curl -vvv http://localhost:3001/health - 192 curl -vvv http://localhost:8080/health - 193 curl -vvv http://localhost:8081/health - 194 ps - 195 ps aux | grep 832 - 196 ps aux | grep java - 197 curl -vvv http://localhost:57179/health - 198 curl -vvv http://localhost:57179/api/health - 199 ../gradlew tasks - 200 ../gradlew properties - 201 curl -vvv http://localhost:57179/api/vi/health - 202 curl -vvv http://localhost:7071/api/vi/health - 203 curl -vvv http://localhost:3001/api/vi/health - 204 curl -vvv http://localhost:3001/api/health - 205 curl -vvv http://localhost:3001/health - 206 curl -vvv http://localhost:3001/actuator - 207 curl -vvv http://localhost:57179/actuator - 208 ps aux | grep java - 209 curl -vvv http://localhost:60811/actuator - 210 ../gradlew --help - 211 ../gradlew --status - 212 docker ps - 213 docker ps - 214 git status - 215 git checkout -- settings/organizations.yml - 216 ../gradlew reloadSettings - 217 ../gradlew reloadSettings - 218 ../gradlew status - 219 ../gradlew --status - 220 ../gradlew --help - 221 openssl --version - 222 grep -r "elr-fhir-translate" * | grep -v "(build\|test)" - 223 grep -r "elr-fhir-translate" * | grep -v "build\|test" - 224 find . -name "*elr-fhir-translate*" - 225 cd .. - 226 find . -name "*elr-fhir-translate*" - 227 grep -r "elr-fhir-translate" * | grep -v "build\|test" - 228 sftp --help - 229 grep -r FhirTranslateQueueMessage * | grep -v "build\|test" - 230 pwd - 231 cd .. - 232 grep -r FhirTranslateQueueMessage * | grep -v "build\|test" - 233 ls - 234 cd prime-reportstream - 235 ls - 236 find . name "*.tf" . - 237 find . name "*\.tf" . - 238 find . name "*tf" . - 239 find . name "*.tf" - 240 find . name "*\.tf" - 241 find . name "*tf - 242 find . name "*tf" - 243 find . -name "*.tf" - 244 cd operations - 245 ls - 246 ls app - 247 cd app - 248 ls functions - 249 ls terraform - 250 cd ../.. - 251 cd prime-router - 252 grep -r QueueTrigger * | grep -v "build\|test" - 253 history 1 | grep translate - 254 grep -r "elr-fhir-translate" * | grep -v "build\|test" - 255 cd .. - 256 grep -r "elr-fhir-translate" * | grep -v "build\|test" - 257 grep -r elrTranslationQueueName * | grep -v "build\|test" - 258 cd prime-router - 259 grep -ir azureevent * | grep -v "builld\|test" - 260 grep -ir azureevent * | grep -v "build\|test" - 261 grep -ir FhirTranslateQueueMessage * | grep -v "build\|test" - 262 grep -r digest * | grep -v "build\|test" - 263 git status - 264 git checkout -b 16144 origin/main - 265 git fetch -p - 266 git pull - 267 git fetch -p - 268 git pull - 269 git status - 270 grep -ir azureEventService * | grep -v "build\|test" - 271 grep -ir trackevent * | grep -v "build\|test" - 272 cd .. - 273 grep -ir azureEventService * | grep -v "build\|test" - 274 grep -ir trackevent * | grep -v "build\|test" - 275 cd .. - 276 ls - 277 cd prime-reportstream - 278 grep -ir ReportStreamItemEventBuilder * | grep -v "build\|test" - 279 grep -r ITEM_TRANSFORMED * - 280 grep -r ITEM_ * - 281 grep -r ReportStreamItemEvent * - 282 git status - 283 git diff prime-router/src/main/kotlin/fhirengine/engine/FHIRTranslator.kt - 284 git fetch -p - 285 git pull - 286 docker ps - 287 docker ps - 288 exit - 289 cd projects/report-stream/prime-reportstream - 290 ls - 291 cd prime-router - 292 env - 293 docker compose --file "docker-compose.build.yml" up --detach - 294 docker ps - 295 docker ps - 296 ../gradlew run - 297 docker ps - 298 ../gradlew composeDownForce - 299 docker ps - 300 git fetch -p - 301 git status - 302 git pull - 303 ../gradlew clean build - 304 ../gradlew run - 305 git status - 306 git fetch -p - 307 ../gradlew composeDownForce - 308 git pull - 309 ../gradlew clean build - 310 docker ps - 311 docker ps - 312 ../gradlew run - 313 ../gradlew run - 314 ../gradlew run - 315 ../gradlew run -x test - 316 ./gradlew clean build - 317 ../gradlew clean build - 318 ../gradlew clean build -x test - 319 ../gradlew run -x test --stacktrace - 320 ../gradlew clean build - 321 ../gradlew clean build - 322 ../gradlew clean build -x test - 323 ../gradlew run -x test --stacktrace - 324 ../gradlew composeDownForce - 325 git status - 326 git checkout -- . - 327 ../gradlew clean build - 328 ../gradlew run --stacktrace - 329 ../gradlew clean build - 330 ../gradlew clean build --stacktrace - 331 ../gradlew clean build --stacktrace - 332 ../gradlew clean build - 333 ../gradlew clean build - 334 ../gradlew clean build - 335 git fetch -p - 336 git pull - 337 git status - 338 git diff src/main/kotlin/fhirengine/engine/FHIRTranslator.kt - 339 docker ps - 340 ../gradlew clean build - 341 git fetch -p - 342 git pull - 343 ../gradlew clean build - 344 ../gradlew clean build - 345 ../gradlew clean build - 346 ../gradlew clean build - 347 ../gradlew clean build - 348 docker ps - 349 ../gradlew clean build - 350 ../gradlew clean build - 351 ../gradlew clean build - 352 git status - 353 git status - 354 git fetch =p - 355 git fetch -p - 356 git pull - 357 git status - 358 git add . - 359 git status - 360 git commit -m "[16144] Modifications for user story 16144 - Implement Translate Step Updates" - 361 git status - 362 git push origin 16144:platform/bill/16144 - 363 cd .git - 364 ls -al - 365 exit - 366 cd projects/report-stream/prime-reportstream - 367 git status - 368 git push origin 16144:platform/bill/16144 - 369 ls - 370 cd .. - 371 mv prime-reportstream prime-reportstream-SAV - 372 ls -al ~/.ssh - 373 ssh-keygen -t ed25519 -C "billcutshall@navapbc.com" - 374 cd - 375 ls -al ~/.ssh - 376 eval "$(ssh-agent -s)" - 377 touch ~/.ssh/config - 378 vi ~/.ssh/config - 379 ssh-add --apple-use-keychain ~/.ssh/id_ed25519 - 380 pbcopy < ~/.ssh/id_ed25519.pub - 381 vi .gitconfig - 382 git clone git@github.com:CDCgov/prime-reportstream.git - 383 ls - 384 rm -rf prime-reportstream - 385 cd projects - 386 ls - 387 cd report-stream - 388 git clone git@github.com:CDCgov/prime-reportstream.git - 389 ls - 390 ls - 391 ls prime-reportstream - 392 rm -rf prime-reportstream - 393 exit - 394 cd projects/report-stream/ - 395 ls - 396 git clone git@github.com:CDCgov/prime-reportstream.git - 397 cd prime-reportstream - 398 cd prime-router - 399 ../gradlew clean build - 400 env - 401 ls - 402 ../gradlew clean build - 403 git fetch -p - 404 git pull - 405 git status - 406 ../gradlew clean - 407 ./cleanslate.sh - 408 cd ../.. - 409 rm -rf prime-reportstream - 410 ./cleanslate.sh - 411 git clone git@github.com:CDCgov/prime-reportstream.git - 412 rm -rf prime-reportstream - 413 git clone git@github.com:CDCgov/prime-reportstream.git - 414 cd prime-reportstream/prime-router - 415 ./cleanslate.sh - 416 docker ps - 417 docker ps - 418 docker compose -f docker-compose.build.yml up --detach - 419 docker ps - 420 docker compose up --detach vault 1>/dev/null 2>/dev/null - 421 docker ps - 422 ../gradlew composeDown - 423 docker ps - 424 ./gradlew clean build - 425 ../gradlew clean build - 426 git status - 427 git fetch -p - 428 git pull - 429 pwd - 430 ../gradlew clean build - 431 cd .. - 432 ../gradlew clean build - 433 ./gradlew clean build - 434 cd prime-router - 435 ./gradlew build - 436 ../gradlew build - 437 cd ../.. - 438 ls - 439 exit - 440 cd projects/report-stream - 441 ls - 442 git clone git@github.com:CDCgov/prime-reportstream.git - 443 cd prime-reportstream - 444 cd prime-router - 445 ./cleanslate.sh --verbose - 446 docker ps - 447 docker compose -f docker-compose.build.yml up --detach - 448 docker ps - 449 docker compose up --detach vault 1>/dev/null 2>/dev/null - 450 docker ps - 451 docker compose --file "docker-compose.build.yml" up --detach - 452 docker ps - 453 ../gradlew clean build - 454 ls -al - 455 ../gradlew clean build --stacktrace - 456 cd ../.gradle - 457 ls - 458 cd vcs-1 - 459 ls - 460 cat vcs-1.lock - 461 cat hl7v2-fhir_ceb5eyxyfvflmdloyy6lk5d5c - 462 ls hl7v2-fhir_ceb5eyxyfvflmdloyy6lk5d5c - 463 ls hl7v2-fhir_ceb5eyxyfvflmdloyy6lk5d5c/hl7v2-fhir-converter - 464 rm -rf hl7v2-fhir_ceb5eyxyfvflmdloyy6lk5d5c - 465 cd ../ - 466 cd ../prime-router - 467 ../gradlew clean build --stacktrace - 468 ../gradlew run - 469 docker ps - 470 history 1 | grep checkout - 471 git checkout -b 16144 origin/main - 472 git status - 473 git fetch -p - 474 git pull - 475 git status - 476 ../gradlew clean build - 477 git status - 478 ../gradlew clean build -x test - 479 git status - 480 git add . - 481 history 1 | grep commit - 482 git commit -m "[16144] Modifications for user story 16144 - Implement Translate Step Updates" - 483 git status - 484 history 1 | grep push - 485 git push origin 16144:platform/bill/16144 - 486 ../gradlew clean build - 487 ../gradlew clean build - 488 ../gradlew clean build - 489 ../gradlew clean build - 490 ../gradlew clean build - 491 git status - 492 git add . - 493 history 1 | grep commit - 494 git commit -m "[16144] Change to attempt fix for existing unit and integration tests." - 495 history 1 | grep push - 496 git push origin 16144:platform/bill/16144 - 497 grep -r reportServiceMock.getRootReport * - 498 ../gradlew clean build - 499 ../gradlew clean build -x test - 500 ../gradlew clean build -x test - 501 ../gradlew clean build -x test - 502 ../gradlew clean build -x test - 503 ../gradlew clean build - 504 git status - 505 git add . - 506 git commit -m "[16144] Fixed unit tests in FHIRTranslatorTests." - 507 git push origin 16144:platform/bill/16144 - 508 docker ps - 509 docker ps - 510 docker ps - 511 docker ps - 512 docker ps - 513 docker ps - 514 docker ps - 515 docker ps - 516 docker ps - 517 history 1 | grep docker - 518 docker compose --file "docker-compose.build.yml" up --detach - 519 docker ps - 520 docker ps - 521 docker ps - 522 docker ps - 523 docker ps - 524 docker ps - 525 docker ps - 526 docker ps - 527 docker ps - 528 docker ps - 529 git status - 530 git status - 531 git checkout -- src/test/kotlin/fhirengine/engine/FhirTranslatorTests.kt - 532 git status - 533 git add . - 534 git commit -m "[16144] Fixed integration tests by modifying FHIRTranslator." - 535 git push origin 16144:platform/bill/16144 - 536 ../gradlew clean build - 537 ../gradlew run - 538 ../gradlew composeDownForce - 539 docker ps - 540 git status - 541 git checkout -- src/test/kotlin/fhirengine/engine/FhirTranslatorTests.kt - 542 grep -r "not supported" * - 543 grep -r "not supported" * | grep -v "build\|test" - 544 git status - 545 ../gradlew clean build - 546 ../gradlew clean build - 547 git status - 548 git fetch -p - 549 git pull - 550 docker ps - 551 ../gradlew clean build - 552 ../gradlew clean build - 553 ../gradlew clean build - 554 git status - 555 ../gradlew clean build - 556 ../gradlew clean build - 557 ../gradlew clean build - 558 docker ps - 559 ../gradlew clean build - 560 git status - 561 git add . - 562 history 1 | grep commit - 563 git commit -m "[16144] Added code for tests." - 564 history 1 | grep push - 565 git push origin 16144:platform/bill/16144 - 566 ../gradlew run - 567 ../gradlew run --trace - 568 ../gradlew run - 569 ../gradlew testSmoke - 570 grep -r setBlobDigest * - 571 ../gradlew clean build - 572 ../gradlew clean build - 573 ../gradlew clean build - 574 ../gradlew clean build - 575 grep -r ".blobDigest =" * - 576 grep -r ".digest =" * - 577 ../gradlew clean build - 578 cd .. - 579 grep -r setBlobDigest * - 580 grep -r setBlobDigest * | grep -v "build\|test" - 581 grep -r ".blobDigest =" * | grep -v "build\|test" - 582 docker ps - 583 pwd - 584 grep -r setBlobDigest * | grep -v "\build\|test" - 585 grep -r setBlobDigest * | grep -v "build\|test" - 586 less prime-router/build/generated-src/jooq/src/main/java/gov/cdc/prime/router/azure/db/tables/records/ReportFileRecord.java - 587 grep -r ReportFileRecord * | grep -v "build\|test" - 588 docker ps - 589 ../gradlew clean build - 590 cd prime-router - 591 ../gradlew clean build - 592 git status - 593 git diff src/main/kotlin/fhirengine/engine/FHIRTranslator.kt - 594 git diff src/test/kotlin/common/UniversalPipelineTestUtils.kt - 595 git diff src/test/kotlin/fhirengine/azure/FHIRTranslatorIntegrationTests.kt - 596 git checkout -- src/test/kotlin/fhirengine/azure/FHIRTranslatorIntegrationTests.kt - 597 git diff src/test/kotlin/fhirengine/engine/FhirTranslatorTests.kt - 598 ../gradlew clean build - 599 git status - 600 git add . - 601 history 1 | grep commit - 602 git commit -m "[16144] Added code to account for blob digest properly." - 603 history 1 | grep push - 604 git push origin 16144:platform/bill/16144 - 605 git status - 606 git status - 607 git checkout -b 16144-a origin/platform/bill/16144 - 608 ../gradlew clean build - 609 git fetch -p - 610 git pull - 611 git status - 612 git diff src/main/kotlin/fhirengine/engine/FHIRTranslator.kt - 613 git checkout -- . - 614 git status - 615 git pull - 616 git fetch -p - 617 ../gradlew clean build - 618 ../gradlew clean build - 619 ../gradlew clean build - 620 ../gradlew clean build - 621 ../gradlew clean build - 622 ../gradlew clean build -x test - 623 ../gradlew clean build -x test - 624 ../gradlew clean build - 625 history 1 | grep vault. - 626 history 1 | grep vault. - 627 ../gradlew clean build - 628 docker ps - 629 history 1 | grep docker - 630 find . -name "TaskAction*" - 631 ls -al - 632 cd .vault - 633 ls - 634 cd env - 635 ls - 636 ls -al - 637 cat .env.local - 638 c d - 639 cd ../.. - 640 ../gradlew clean build -x test - 641 ../gradlew clean build - 642 env - 643 cat .zshrc - 644 cacat ~/.zshrc - 645 cat ~/.zshrc - 646 env | grep JAVA - 647 ../gradlew run - 648 ../gradlew composeDownForce - 649 cd .. - 650 ls - 651 ./gradlew tasks - 652 cd prime-router - 653 ../gradlew tasks - 654 ../gradlew package - 655 docker ps - 656 docker ps - 657 exit - 658 cd - 659 ls -al - 660 cd .gradle - 661 ls - 662 ls caches - 663 cd - 664 docker ps - 665 cd projects - 666 cd pr - 667 cd report-stream - 668 cd prime-reportstream-SAV - 669 git status - 670 cd ../prime-reportstream - 671 cd prime-router - 672 ../gradlew composeDown - 673 ../gradlew composeDownForce - 674 docker ps - 675 ../gradlew composeDownForced - 676 docker ps - 677 docker ps - 678 find . -name "FHIRTranslatorIntegrationTests*" - 679 git fetch -p - 680 docker ps - 681 docker ps - 682 git status - 683 grep -oE '^[a-zA-Z][a-zA-Z0-9]*$' "test translation happy path with file digest exception" - 684 echo -n "test translation happy path with file digest exception" | grep -oE '^[a-zA-Z][a-zA-Z0-9]*$' - 685 env - 686 docker ps - 687 docker ps - 688 docker ps - 689 cd .. - 690 cd prime-router - 691 less cleanslate.sh - 692 less cleanslate.sh - 693 docker ps - 694 less cleanslate.sh - 695 ls - 696 less prime - 697 ls - 698 less cleanslate.sh.log - 699 git status - 700 ls - 701 less cleanslate.sh - 702 exit - 703 env - 704 cat ~/.zshrc - 705 uname -a - 706 less cleanslate.sh - 707 uname -m - 708 uname -an - 709 cd .vault - 710 ls - 711 ls config - 712 cat config/local.json - 713 cat env/.env.local - 714 vault - 715 cd .. - 716 less cleanslate.sh - 717 exit - 718 docker ps - 719 docker ps - 720 git status - 721 git diff src/main/kotlin/fhirengine/engine/FHIREngine.kt - 722 git diff src/test/kotlin/fhirengine/engine/FhirTranslatorTests.kt - 723 cd .. - 724 grep -r testSmoke * - 725 cd prime-router - 726 ../gradlew testSmoke - 727 ls - 728 ./prime test - 729 git status - 730 git add . - 731 git status - 732 ../gradlew testSmoke - 733 git status - 734 ../gradlew clearDB - 735 ../gradlew reloadSettings - 736 ../gradlew reloadTables - 737 ../gradlew testSmoke - 738 ../gradlew clearDB - 739 ../gradlew reloadSettings - 740 ../gradlew reloadTables - 741 ../gradlew testEnd2EndUP - 742 cat /etc/hosts - 743 grep -r R01 * | grep -v "build\|test" - 744 grep -r CSTE * | grep -v "build\|test" - 745 git fetch -p - 746 git status - 747 git fetch -p - 748 history 1 | grep checkout - 749 git checkout -b 16143 origin/main - 750 ../gradlew clean build - 751 ../gradlew run - 752 ../gradlew clearDB - 753 ../gradlew reloadSettings - 754 ../gradlew reloadTables - 755 ../gradlew testEnd2EndUP - 756 ../gradlew clearDB - 757 ../gradlew reloadSettings - 758 ../gradlew reloadTables - 759 ../gradlew testEnd2EndUP - 760 grep -r "SFTP credentials" * - 761 less cleanslate.sh - 762 cd .vault - 763 ls -al - 764 ls - 765 ls -l - 766 cd config - 767 ls - 768 cat init.sh - 769 ls - 770 cat local.json - 771 cd ../env - 772 ls -al - 773 cat .env.local - 774 cat key - 775 cd ../.. - 776 grep -i sftp cleanslate.sh - 777 ../gradlew quickRun - 778 ../gradlew composeDownForce - 779 ../gradlew clearDB - 780 ../gradlew reloadSettings - 781 ../gradlew reloadTables - 782 ../gradlew testEnd2EndUP - 783 export CREDENTIAL_STORAGE_METHOD="HASHICORP_VAULT" - 784 less cleanslate.sh - 785 ../gradlew clearDB - 786 ../gradlew reloadSettings - 787 ../gradlew reloadTables - 788 ../gradlew testEnd2EndUP - 789 exit - 790 cd projects/report-stream/prime-reportstream/prime-router - 791 history 1 | grep docker - 792 docker compose --file "docker-compose.build.yml" up --detach - 793 docker ps - 794 ../gradlew clean build - 795 ../gradlew clean build - 796 grep -r "any(" * - 797 docker ps - 798 grep -r "no answer found for AzureEventService" * - 799 ../gradlew clean build - 800 docker ps - 801 ../gradlew clean build - 802 ../gradlew clean build - 803 git status - 804 git diff src/main/kotlin/fhirengine/engine/FHIRTranslator.kt - 805 git add . - 806 history 1 | grep commit - 807 git commit -m "[16144] Checking in WIP." - 808 history 1 | grep push - 809 git push origin 16144-a:platform/bill/16144 - 810 grep -r params * - 811 ../gradlew clean build - 812 grep -r bodyFormat * | grep -v "build\|test" - 813 ../gradlew clean build - 814 ../gradlew clean build - 815 ../gradlew clean build - 816 ../gradlew clean build - 817 ../gradlew clean build - 818 ../gradlew clean build - 819 ../gradlew clean build - 820 ../gradlew clean build - 821 ../gradlew clean build - 822 ../gradlew clean build - 823 docker ps - 824 git status - 825 ../gradlew clean build - 826 ../gradlew clean build - 827 ../gradlew clean build - 828 ../gradlew clean build - 829 grep -r IReportStreamEventService * - 830 grep -r IReportStreamEventService * | grep -v "build\|test" - 831 grep -r IReportStreamEventService * | grep -v build - 832 grep -r IReportStreamEventService * | grep -v build - 833 git status - 834 git add . - 835 history 1 | grep commit - 836 git commit -m "[16144] Checking in WIP." - 837 history 1 | grep push - 838 git push origin 16144-a:platform/bill/16144 - 839 ../gradlew clean build - 840 docker ps - 841 docker ps - 842 ../gradlew clean build - 843 ../gradlew clean build - 844 ../gradlew clean build - 845 ../gradlew clean build - 846 git status - 847 git add . - 848 git commit -m "[16144] Made change to FHIREngine to account for nullable reportEventService actually having a value in builder." - 849 git push origin 16144-a:platform/bill/16144 - 850 git fetch -p - 851 git pull - 852 ../gradlew clean build - 853 ../gradlew clean build - 854 ../gradlew clean build - 855 git status - 856 git add . - 857 git commit -m "[16144] Updates based on PR review." - 858 git push origin 16144-a:platform/bill/16144 - 859 ../gradlew clean build - 860 git fetch -p - 861 git pull - 862 git fetch -p - 863 ../gradlew clean build - 864 git status - 865 git add . - 866 git commit -m "[16144] Update based on PR review." - 867 git push origin 16144-a:platform/bill/16144 - 868 ../gradlew clean build - 869 ../gradlew clean build - 870 ../gradlew clean build - 871 ../gradlew clean build - 872 ../gradlew testSmoke - 873 history 1 | grep testSmoke - 874 docker ps - 875 git commit -m "[16144] Changed url and digest to use correct reportdocument." - 876 git push origin 16144-a:platform/bill/16144 - 877 ../gradlew run - 878 docker ps - 879 ../gradlew composeDownForce - 880 git status - 881 git status - 882 git add . - 883 git commit -m "[16144] Added additional checks to integration test." - 884 git fetch -p - 885 git pull - 886 ../gradlew clean build - 887 ../gradlew clean build - 888 git status - 889 git add src/test/kotlin/fhirengine/azure/FHIRTranslatorIntegrationTests.kt - 890 git commit -m "[16144] Added additional checks to integration test." - 891 git push origin 16144-a:platform/bill/16144 - 892 git fetch -p - 893 git pull - 894 git fetch -p - 895 git pull - 896 ../gradlew clean build - 897 ../gradlew clean build - 898 git status - 899 git add . - 900 git commit -m "[16144] Added additional check to integration tests." - 901 git push origin 16144-a:platform/bill/16144 - 902 ../gradlew run - 903 docker ps - 904 docker ps - 905 docker ps - 906 ../gradlew composeDownForce - 907 docker ps - 908 ../gradlew quickRun - 909 ../gradlew composeDownForce - 910 ../gradlew quickRun - 911 ../gradlew composeDownForce - 912 ../gradlew tasks - 913 grep -r credentials * - 914 grep -r credentials * | grep -v "build\|test" - 915 less cleanslate.sh - 916 ./prime create-credential --type=UserPass --persist=DEFAULT-SFTP --user foo --pass pass 1>>${LOG?} 2>&1 - 917 ls - 918 less cleanslate.sh.log - 919 less cleanslate.sh - 920 export LOG=fred.txt - 921 ./prime create-credential --type=UserPass --persist=DEFAULT-SFTP --user foo --pass pass 1>>${LOG?} 2>&1 - 922 cat fred.txt - 923 less cleanslate.sh - 924 ./prime multiple-settings set --silent --input settings/organizations.yml 1>>${LOG?} 2>&1 - 925 cat fred.txt - 926 ../gradlew quickRun - 927 ../gradlew composeDownForce - 928 export CREDENTIAL_STORAGE_METHOD="HASHICORP_VAULT" - 929 ../gradlew quickRun - 930 ../gradlew composeDownForce - 931 cd .. - 932 cd .. - 933 ls - 934 mv prime-reportstream prime-reportstream-SAV-1 - 935 exit - 936 cd - 937 cd .gradle - 938 \tls -al - 939 cd .. - 940 mv .gradle .gradle-SAV - 941 cd .gradle - 942 ls -al - 943 cd - 944 cd - 945 cd projects/report-stream/prime-reportstream/prime-router - 946 ../gradlew cleanDB - 947 ../gradlew clearDB - 948 ../gradlew reloadSettings - 949 ../gradlew reloadTables - 950 ../gradlew testEnd2EndUP - 951 ../gradlew clearDB - 952 ../gradlew reloadSettings - 953 ../gradlew reloadTables - 954 ../gradlew testSmoke - 955 less build.gradle.kts - 956 git status - 957 git branch - 958 git checkout -b 16143 origin/main - 959 git fetch -p - 960 git pull - 961 ../gradlew clean build - 962 git fetch -p - 963 git pull - 964 git fetch -p - 965 git pull - 966 docker ps - 967 git fetch -p - 968 exit - 969 env - 970 cd projects/report-stream - 971 ls - 972 history 1 | grep clone - 973 git clone git@github.com:CDCgov/prime-reportstream.git - 974 cd prime-reportstream - 975 cd prime-router - 976 ./cleanslate --verbose - 977 ls - 978 ./cleanslate.sh --verbose - 979 cd .. - 980 cd ./prime-router\n./cleanslate.sh - 981 cd ../.. - 982 rm -rf prime-reportstream - 983 git clone git@github.com:CDCgov/prime-reportstream.git - 984 cd prime-reportstream/prime-router - 985 ./cleanslate --verbose - 986 ./cleanslate.sh --verbose - 987 docker ps - 988 docker compose up --detach vault 1>/dev/null 2>/dev/null - 989 ./gradlew primeCLI --args "create-credential --type=UserPass --persist=DEFAULT-SFTP --user foo --pass pass" - 990 ../gradlew primeCLI --args "create-credential --type=UserPass --persist=DEFAULT-SFTP --user foo --pass pass" - 991 ../gradlew reloadTables - 992 ../gradlew composeDownForced - 993 ../gradlew quickRun - 994 ../gradlew composeDownForced - 995 ../gradlew quickRun - 996 ../gradlew quickRun - 997 ../gradlew clean build - 998 ../gradlew quickRun - 999 ../gradlew composeDownForced - 1000 exit - 1001 git fetch -p - 1002 git status - 1003 git fetch -p - 1004 history 1 | grep e2e - 1005 history 1 | grep gradlew | sort -U - 1006 history 1 | grep gradlew | sort -u - 1007 history 1 | grep nd - 1008 ../gradlew tasks - 1009 ./gradlew testEnd2EndUP - 1010 ../gradlew testEnd2EndUP - 1011 ../gradlew testSmoke - 1012 history 1 | grep clear - 1013 history 1 | grep reload From 63d36499ec856ebb6714ec76aa3bd95fff3e30e7 Mon Sep 17 00:00:00 2001 From: Bill Cutshall Date: Thu, 5 Dec 2024 09:48:28 -0500 Subject: [PATCH 05/10] [16143] Added additional testing to integration test. --- .../fhirengine/azure/FHIRConverterIntegrationTests.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/prime-router/src/test/kotlin/fhirengine/azure/FHIRConverterIntegrationTests.kt b/prime-router/src/test/kotlin/fhirengine/azure/FHIRConverterIntegrationTests.kt index da04315bf38..174bb86c4ee 100644 --- a/prime-router/src/test/kotlin/fhirengine/azure/FHIRConverterIntegrationTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/azure/FHIRConverterIntegrationTests.kt @@ -798,7 +798,7 @@ class FHIRConverterIntegrationTests { ) assertThat(azureEventService.reportStreamEvents[ReportStreamEventName.ITEM_ACCEPTED]!!).hasSize(2) - val event = azureEventService + var event = azureEventService .reportStreamEvents[ReportStreamEventName.ITEM_ACCEPTED]!!.last() as ReportStreamItemEvent assertThat(event.reportEventData).isEqualToIgnoringGivenProperties( ReportEventData( @@ -839,6 +839,15 @@ class FHIRConverterIntegrationTests { ) ) ) + assertThat(azureEventService.reportStreamEvents[ReportStreamEventName.ITEM_TRANSFORMED]!!).hasSize(1) + event = azureEventService + .reportStreamEvents[ReportStreamEventName.ITEM_TRANSFORMED]!!.first() as ReportStreamItemEvent + assertThat(event.reportEventData.parentReportId).isEqualTo(receiveReport.id) + assertThat(event.reportEventData.topic).isEqualTo(Topic.FULL_ELR) + assertThat(event.reportEventData.pipelineStepName).isEqualTo(TaskAction.convert) + assertThat(event.params).hasSize(4) + assertThat(event.params[ReportStreamEventProperties.ORIGINAL_FORMAT]).isEqualTo("FHIR") + assertThat(event.params[ReportStreamEventProperties.TARGET_FORMAT]).isEqualTo("FHIR") } } From 87e3c7a37c056faae00e6f68fcc61f069d6accc4 Mon Sep 17 00:00:00 2001 From: Bill Cutshall Date: Fri, 6 Dec 2024 16:06:01 -0500 Subject: [PATCH 06/10] [16143] Cleanup based on PR review. --- .../kotlin/fhirengine/engine/FHIRConverter.kt | 50 ++++--------------- .../azure/FHIRConverterIntegrationTests.kt | 18 +++---- 2 files changed, 16 insertions(+), 52 deletions(-) diff --git a/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt b/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt index b4f79187ee1..5b01e8fa6c2 100644 --- a/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt +++ b/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt @@ -325,6 +325,10 @@ class FHIRConverter( // We know from the null check above that this cannot be null val bundle = processedItem.bundle!! transformer?.process(bundle) + logger.info( + "Applied transform - parentReportId=[${input.reportId}]" + + ", childReportId=[], schemaName=[${input.schemaName}]" + ) // make a 'report' val report = Report( @@ -384,7 +388,8 @@ class FHIRConverter( mapOf( ReportStreamEventProperties.BUNDLE_DIGEST to bundleDigestExtractor.generateDigest(processedItem.bundle!!), - ReportStreamEventProperties.ITEM_FORMAT to format + ReportStreamEventProperties.ITEM_FORMAT to format, + ReportStreamEventProperties.ENRICHMENTS to input.schemaName ) ) } @@ -527,48 +532,13 @@ class FHIRConverter( } ) } - } else { - // Generate an ITEM_TRANSFORMED Azure Event. - val bundleDigestExtractor = BundleDigestExtractor( - FhirPathBundleDigestLabResultExtractorStrategy( - CustomContext( - item.bundle!!, - item.bundle!!, - mutableMapOf(), - CustomFhirPathFunctions() - ) - ) - ) - val report = Report( - MimeFormat.FHIR, - emptyList(), - parentItemLineageData = listOf( - Report.ParentItemLineageData(input.reportId, item.index.toInt() + 1) - ), - metadata = this.metadata, - topic = input.topic, - nextAction = TaskAction.none - ) - reportEventService.sendItemEvent( - eventName = ReportStreamEventName.ITEM_TRANSFORMED, - childReport = report, - pipelineStepName = TaskAction.convert - ) { - parentReportId(input.reportId) - params( - mapOf( - ReportStreamEventProperties.BUNDLE_DIGEST - to bundleDigestExtractor.generateDigest(item.bundle!!), - ReportStreamEventProperties.ORIGINAL_FORMAT to format.name, - ReportStreamEventProperties.TARGET_FORMAT to MimeFormat.FHIR.name, - ReportStreamEventProperties.ENRICHMENTS to listOf(input.schemaName) - ) - ) - trackingId(item.bundle!!) - } } } } + logger.info( + "Applied transform - parentReportId=[${input.reportId}]" + + ", childReportId=[], schemaName=[${input.schemaName}]" + ) } item } diff --git a/prime-router/src/test/kotlin/fhirengine/azure/FHIRConverterIntegrationTests.kt b/prime-router/src/test/kotlin/fhirengine/azure/FHIRConverterIntegrationTests.kt index 174bb86c4ee..b58057ec07d 100644 --- a/prime-router/src/test/kotlin/fhirengine/azure/FHIRConverterIntegrationTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/azure/FHIRConverterIntegrationTests.kt @@ -508,7 +508,8 @@ class FHIRConverterIntegrationTests { orderingFacilityState = listOf("FL"), performerState = emptyList(), eventType = "ORU^R01^ORU_R01" - ) + ), + ReportStreamEventProperties.ENRICHMENTS to "" ) ) } @@ -663,7 +664,8 @@ class FHIRConverterIntegrationTests { orderingFacilityState = listOf("FL"), performerState = emptyList(), eventType = "ORU^R01^ORU_R01" - ) + ), + ReportStreamEventProperties.ENRICHMENTS to "" ) ) } @@ -836,18 +838,10 @@ class FHIRConverterIntegrationTests { orderingFacilityState = emptyList(), performerState = emptyList(), eventType = "ORU^R01^ORU_R01" - ) + ), + ReportStreamEventProperties.ENRICHMENTS to "" ) ) - assertThat(azureEventService.reportStreamEvents[ReportStreamEventName.ITEM_TRANSFORMED]!!).hasSize(1) - event = azureEventService - .reportStreamEvents[ReportStreamEventName.ITEM_TRANSFORMED]!!.first() as ReportStreamItemEvent - assertThat(event.reportEventData.parentReportId).isEqualTo(receiveReport.id) - assertThat(event.reportEventData.topic).isEqualTo(Topic.FULL_ELR) - assertThat(event.reportEventData.pipelineStepName).isEqualTo(TaskAction.convert) - assertThat(event.params).hasSize(4) - assertThat(event.params[ReportStreamEventProperties.ORIGINAL_FORMAT]).isEqualTo("FHIR") - assertThat(event.params[ReportStreamEventProperties.TARGET_FORMAT]).isEqualTo("FHIR") } } From 466e4d78e78fcf0d4cb44a5f9e9ccefbad7fb30d Mon Sep 17 00:00:00 2001 From: Bill Cutshall Date: Mon, 9 Dec 2024 14:57:43 -0500 Subject: [PATCH 07/10] [16143] Added code based on PR review. --- .../kotlin/fhirengine/engine/FHIRConverter.kt | 3 ++- .../kotlin/fhirengine/engine/RSMessageType.kt | 11 +++++++++++ .../kotlin/fhirengine/utils/FHIRBundleHelpers.kt | 13 +++++++++++++ .../fhirengine/utils/FHIRBundleHelpersTests.kt | 16 ++++++++++++++++ 4 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 prime-router/src/main/kotlin/fhirengine/engine/RSMessageType.kt diff --git a/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt b/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt index 5b01e8fa6c2..9416be40ad1 100644 --- a/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt +++ b/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt @@ -53,6 +53,7 @@ import gov.cdc.prime.router.fhirengine.utils.FhirTranscoder import gov.cdc.prime.router.fhirengine.utils.HL7Reader import gov.cdc.prime.router.fhirengine.utils.HL7Reader.Companion.parseHL7Message import gov.cdc.prime.router.fhirengine.utils.getObservations +import gov.cdc.prime.router.fhirengine.utils.getRSMessageType import gov.cdc.prime.router.fhirengine.utils.isElr import gov.cdc.prime.router.logging.LogMeasuredTime import gov.cdc.prime.router.report.ReportService @@ -513,7 +514,7 @@ class FHIRConverter( } // 'stamp' observations with their condition code if (item.bundle != null) { - val isElr = item.bundle!!.isElr() + val isElr = if (item.bundle!!.getRSMessageType() == RSMessageType.LAB_RESULT) true else false item.bundle!!.getObservations().forEach { observation -> // Only do this if it is an ELR item. if (isElr) { diff --git a/prime-router/src/main/kotlin/fhirengine/engine/RSMessageType.kt b/prime-router/src/main/kotlin/fhirengine/engine/RSMessageType.kt new file mode 100644 index 00000000000..d1db9dd9d12 --- /dev/null +++ b/prime-router/src/main/kotlin/fhirengine/engine/RSMessageType.kt @@ -0,0 +1,11 @@ +package gov.cdc.prime.router.fhirengine.engine + +/** + * This class represents a way to group message types from an RS perspective. As we add additional logical + * groupings, FHIRBundleHelpers.getRSMessageType will need to be updated. + * + */ +enum class RSMessageType { + LAB_RESULT, + UNKNOWN, +} \ No newline at end of file diff --git a/prime-router/src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt b/prime-router/src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt index 0d9f71c49c6..0ab1ac76400 100644 --- a/prime-router/src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt +++ b/prime-router/src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt @@ -9,6 +9,7 @@ import gov.cdc.prime.router.azure.ConditionStamper.Companion.BUNDLE_CODE_IDENTIF import gov.cdc.prime.router.azure.ConditionStamper.Companion.BUNDLE_VALUE_IDENTIFIER import gov.cdc.prime.router.azure.ConditionStamper.Companion.conditionCodeExtensionURL import gov.cdc.prime.router.codes +import gov.cdc.prime.router.fhirengine.engine.RSMessageType import gov.cdc.prime.router.fhirengine.translation.hl7.utils.CustomContext import gov.cdc.prime.router.fhirengine.translation.hl7.utils.FhirPathUtils import gov.cdc.prime.router.fhirengine.utils.FHIRBundleHelpers.Companion.getChildProperties @@ -137,6 +138,18 @@ fun Bundle.isElr(): Boolean { return isElr } +/** + * Return RSMessageType based on grouping logic. + * + * @return RSMessageType of this Bundle. + */ +fun Bundle.getRSMessageType(): RSMessageType { + when { + isElr() -> return RSMessageType.LAB_RESULT + else -> return RSMessageType.UNKNOWN + } +} + /** * Gets all properties for a [Base] resource recursively and filters only its references * diff --git a/prime-router/src/test/kotlin/fhirengine/utils/FHIRBundleHelpersTests.kt b/prime-router/src/test/kotlin/fhirengine/utils/FHIRBundleHelpersTests.kt index c22b45fc312..5abc630dc42 100644 --- a/prime-router/src/test/kotlin/fhirengine/utils/FHIRBundleHelpersTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/utils/FHIRBundleHelpersTests.kt @@ -31,6 +31,7 @@ import gov.cdc.prime.router.azure.ConditionStamper.Companion.conditionCodeExtens import gov.cdc.prime.router.azure.DatabaseAccess import gov.cdc.prime.router.azure.LookupTableConditionMapper import gov.cdc.prime.router.azure.QueueAccess +import gov.cdc.prime.router.fhirengine.engine.RSMessageType import gov.cdc.prime.router.fhirengine.translation.hl7.utils.CustomContext import gov.cdc.prime.router.fhirengine.translation.hl7.utils.FhirPathUtils import gov.cdc.prime.router.metadata.LookupTable @@ -266,6 +267,21 @@ class FHIRBundleHelpersTests { assertThat(fhirBundle.isElr()).isFalse() } + @Test + fun `Test current values for rs message type`() { + val fhirBundle = Bundle() + assertThat(fhirBundle.getRSMessageType()).isEqualTo(RSMessageType.UNKNOWN) + fhirBundle.type = Bundle.BundleType.MESSAGE + val entry = Bundle.BundleEntryComponent() + val messageHeader = MessageHeader() + val event = Coding() + event.code = "R01" + messageHeader.event = event + entry.resource = messageHeader + fhirBundle.entry.add(0, entry) + assertThat(fhirBundle.getRSMessageType()).isEqualTo(RSMessageType.LAB_RESULT) + } + @Test fun `Test find Diagnostic report no observation`() { val actionLogger = ActionLogger() From 270faefd2ead52c8f7f52adc5e2a67a02e04ddd3 Mon Sep 17 00:00:00 2001 From: Bill Cutshall Date: Wed, 11 Dec 2024 08:42:34 -0500 Subject: [PATCH 08/10] [16143] Cleanup from PR review. --- .../main/kotlin/fhirengine/engine/FHIRConverter.kt | 13 +++++++------ .../kotlin/fhirengine/engine/FhirConverterTests.kt | 6 ------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt b/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt index 9416be40ad1..a3a7121700e 100644 --- a/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt +++ b/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt @@ -326,10 +326,6 @@ class FHIRConverter( // We know from the null check above that this cannot be null val bundle = processedItem.bundle!! transformer?.process(bundle) - logger.info( - "Applied transform - parentReportId=[${input.reportId}]" + - ", childReportId=[], schemaName=[${input.schemaName}]" - ) // make a 'report' val report = Report( @@ -343,6 +339,12 @@ class FHIRConverter( nextAction = TaskAction.destination_filter ) + logger.info( + "Applied transform - parentReportId=[${input.reportId}]" + + ", childReportId=[${report.id}], schemaName=[${input.schemaName}]" + + ", trackingId=[${processedItem.getTrackingId()}]" + ) + // create route event val routeEvent = ProcessEvent( Event.EventAction.DESTINATION_FILTER, @@ -514,9 +516,8 @@ class FHIRConverter( } // 'stamp' observations with their condition code if (item.bundle != null) { - val isElr = if (item.bundle!!.getRSMessageType() == RSMessageType.LAB_RESULT) true else false + val isElr = item.bundle!!.getRSMessageType() == RSMessageType.LAB_RESULT item.bundle!!.getObservations().forEach { observation -> - // Only do this if it is an ELR item. if (isElr) { val result = stamper.stampObservation(observation) if (!result.success) { diff --git a/prime-router/src/test/kotlin/fhirengine/engine/FhirConverterTests.kt b/prime-router/src/test/kotlin/fhirengine/engine/FhirConverterTests.kt index 96015341e88..e23ef1b6e35 100644 --- a/prime-router/src/test/kotlin/fhirengine/engine/FhirConverterTests.kt +++ b/prime-router/src/test/kotlin/fhirengine/engine/FhirConverterTests.kt @@ -646,12 +646,6 @@ class FhirConverterTests { } } -// @Test -// fun `test isElr when bundle is empty`() { -// val emptyBundle = Bundle() -// assertThat(BaseEngine.Companion.isElr(emptyBundle)).isFalse() -// } - @Nested inner class FhirConverterProcessTest { From d8a5314cdbd1147f71e59c9913c5ae64cf414193 Mon Sep 17 00:00:00 2001 From: Bill Cutshall Date: Thu, 12 Dec 2024 14:10:13 -0500 Subject: [PATCH 09/10] [16143] Modification based on review. --- .../src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prime-router/src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt b/prime-router/src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt index 0ab1ac76400..d243a85e593 100644 --- a/prime-router/src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt +++ b/prime-router/src/main/kotlin/fhirengine/utils/FHIRBundleHelpers.kt @@ -144,9 +144,9 @@ fun Bundle.isElr(): Boolean { * @return RSMessageType of this Bundle. */ fun Bundle.getRSMessageType(): RSMessageType { - when { - isElr() -> return RSMessageType.LAB_RESULT - else -> return RSMessageType.UNKNOWN + return when { + isElr() -> RSMessageType.LAB_RESULT + else -> RSMessageType.UNKNOWN } } From 44d4b603a9134b553050a7371c2da6fd4ac9ab9c Mon Sep 17 00:00:00 2001 From: Bill Cutshall Date: Thu, 12 Dec 2024 14:35:04 -0500 Subject: [PATCH 10/10] [16143] Modification based on review. --- .../src/main/kotlin/fhirengine/engine/FHIRConverter.kt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt b/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt index a3a7121700e..53a4242dfc4 100644 --- a/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt +++ b/prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt @@ -537,10 +537,6 @@ class FHIRConverter( } } } - logger.info( - "Applied transform - parentReportId=[${input.reportId}]" + - ", childReportId=[], schemaName=[${input.schemaName}]" - ) } item }