Skip to content

Commit

Permalink
[16143] Cleanup from PR review.
Browse files Browse the repository at this point in the history
  • Loading branch information
wcutshall committed Dec 11, 2024
1 parent 7224ee4 commit 270faef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
13 changes: 7 additions & 6 deletions prime-router/src/main/kotlin/fhirengine/engine/FHIRConverter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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,
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down

0 comments on commit 270faef

Please sign in to comment.