-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
16409 do not use receive step to determine root report #16723
base: main
Are you sure you want to change the base?
16409 do not use receive step to determine root report #16723
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
Scanned Manifest Files |
Test Results1 257 tests +2 1 253 ✅ +2 7m 45s ⏱️ +10s Results for commit b7c1982. ± Comparison against base commit e8025be. This pull request removes 2 and adds 4 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
5c35630
to
4f56b4b
Compare
@@ -178,7 +180,8 @@ class FHIRConverter( | |||
// is properly recorded in the report file table with the correct sender | |||
actionHistory.trackExternalInputReport( | |||
report, | |||
BlobAccess.BlobInfo(format, blobUrl, blobDigest.toByteArray()) | |||
BlobAccess.BlobInfo(format, blobUrl, blobDigest.toByteArray()), | |||
payloadName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change to carry over payloadname
from the submissions API is needed to continue supporting the sendOriginal
function. This adds the information to the root report being created here.
.leftJoin(REPORT_LINEAGE) | ||
.on(REPORT_FILE.REPORT_ID.eq(REPORT_LINEAGE.CHILD_REPORT_ID)) | ||
.where(REPORT_LINEAGE.PARENT_REPORT_ID.isNull()) | ||
.orderBy(REPORT_FILE.ACTION_ID.asc()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The previous query was to join the action
table in order to check if the action_name
is receive
. The new query instead filters the list of reports to only include those that do not appear in report_lineage
as a child. This list is then ordered by action_id
to ensure the results are output in a consistent order. The join to the action
table is removed since it is no longer necessary.
@@ -798,4 +798,166 @@ class FHIRTranslatorIntegrationTests : Logging { | |||
assertThat(translatedValue).isEqualTo(reportContents.toByteArray()) | |||
} | |||
} | |||
|
|||
@Test | |||
fun `successfully translate HL7 for FHIR receiver when isSendOriginal is true from convert step`() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests ensure sendOriginal
items still function when convert
is the root report, as the case would be when the submissions API is used.
…appear as child in report_lineage
d665d9b
to
b7c1982
Compare
Quality Gate passedIssues Measures |
This PR adjusts the search for root reports to not rely on explicitly searching for the
receive
step report. Additionally, the root report from the submissions endpoint should now include the sender-suppliedpayloadname
if present.Test Steps:
ReportGraphTest
andFhirTranslatorIntegrationTests
are sufficientChanges
receive
step as indicator of a root report.report_lineage
table as a child report.payloadname
from submission endpoint message headers when creating root report.Checklist
Testing
./prime test
or./gradlew testSmoke
against local Docker ReportStream container?npm run lint:write
?Linked Issues