Skip to content

Send single entry results to HL7 queue#9134

Merged
mpbrown merged 13 commits into
mainfrom
mike/8834-hl7-single-entry-queue
Oct 17, 2025
Merged

Send single entry results to HL7 queue#9134
mpbrown merged 13 commits into
mainfrom
mike/8834-hl7-single-entry-queue

Conversation

@mpbrown
Copy link
Copy Markdown
Collaborator

@mpbrown mpbrown commented Sep 12, 2025

BACKEND PULL REQUEST

Related Issue

Changes Proposed

  • Adds config for sending single entry results to HL7 reporting queue
  • Adds aimsReportingEnabled feature flag

Additional Information

  • When aimsReportingEnabled is true, the app will send single entry results to the HL7QueueReportingService. The value of simple-report.azure-reporting-queue.hl7-queue-enabled will determine if it is sent to the Azure queue or if the no-op service is used instead.
    • Prod - aimsReportingEnabled and hl7-queue-enabled should both be false
    • Azure dev environments - aimsReportingEnabled and hl7-queue-enabled should both be true. This means all single entry results submitted in Azure dev environments will be sent to AIMS.
    • Local dev and other envs like demo or training - aimsReportingEnabled should be true, but hl7-queue-enabled should be false so that it defaults to the no-op configuration. If testing the Azure queue is necessary for local development, you can always just override hl7-queue-enabled locally.
  • Currently, the app will always still send to ReportStream no matter the value of aimsReportingEnabled. That flag will only determine whether the test event is also sent to AIMS.

Testing

  • Deployed on dev5 (I recommend accessing Big Organization and Test Facility)
  • Open the hl7v2-data-publishing in dev5 (recommend Azure Storage Explorer instead of the Azure portal, but either works fine)
  • Submit a single entry test
  • Refresh the queue and observe the new message in the queue
  • View the message and find the message id in the MSH segment just after ORU^R01^ORU_R01
  • After about 5 minutes, the message should be processed by the function app
  • To verify it reached AIMS, you can use our AIMS CLI tool to check the contents of the AIMS S3 bucket with node aims.ts listsent

@mpbrown mpbrown changed the title Mike/8834 hl7 single entry queue Send single entry results to HL7 queue Sep 12, 2025
@mpbrown mpbrown force-pushed the mike/8834-hl7-single-entry-queue branch from c8b880d to f78491f Compare September 12, 2025 17:51
@mpbrown mpbrown marked this pull request as ready for review September 15, 2025 15:16
@mpbrown mpbrown requested a review from a team as a code owner September 15, 2025 15:16
@mpbrown mpbrown requested review from DanielSass, DavidMcClatchey, arinkulshi-skylight, kevinfiol, mehansen and schreiaj and removed request for a team September 15, 2025 15:16
@sonarqubecloud
Copy link
Copy Markdown

@kevinfiol
Copy link
Copy Markdown
Collaborator

Tested by submitting a test event on dev5, and verified:

  1. Message enters the queue
  2. Message is sent to AIMS S3 Bucket after 5 minutes
Screenshot_20250922_160025 Screenshot_20250922_160626

.build();
}

@Profile("!" + PROD)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this just mean "NOT PROD"?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah and this same Spring profile pattern is also used for the covid pipeline (csvQueue) and universal pipeline (fhirQueue) to determine which implementation should be used at runtime

kevinfiol
kevinfiol previously approved these changes Sep 22, 2025
Copy link
Copy Markdown
Collaborator

@kevinfiol kevinfiol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well and I see no obvious errors. I noted in a comment above about some more error handling we may want to do in the future.

Copy link
Copy Markdown
Collaborator

@DavidMcClatchey DavidMcClatchey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of non-blocking suggestions but looks good code-wise and was able to land a message in the S3 bucket from dev5!

} catch (IOException e) {
throw new TestEventSerializationFailureException(
testEvent.getInternalId(), e.getCause().getMessage());
testEvent.getInternalId(), e.getCause().getMessage(), "Covid");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly out of scope, but, as long as we're touching this file, do we need to be adding this with the covid csv pipeline going/gone away? Is it possible to delete this whole file along with the csvQueueReportingService bean definitions in AzureTestEventReportingQueueConfiguration? My only hesitation for not doing that would be if any alerts are affected.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Primarily left the Covid pipeline stuff so that any deletion could be handled in #8979 since otherwise it would also involve modifying/removing tests and at that point feels quite out of scope with the rest of this ticket

@mpbrown
Copy link
Copy Markdown
Collaborator Author

mpbrown commented Sep 24, 2025

Thanks for the reviews! Updated this with some of those minor fixes

kevinfiol
kevinfiol previously approved these changes Sep 24, 2025
@mpbrown mpbrown enabled auto-merge September 24, 2025 15:35
@mpbrown mpbrown disabled auto-merge September 24, 2025 18:48
@mpbrown mpbrown dismissed stale reviews from kevinfiol and DavidMcClatchey via 4bd3eee September 24, 2025 18:51
@mpbrown mpbrown enabled auto-merge September 24, 2025 19:00
@mpbrown
Copy link
Copy Markdown
Collaborator Author

mpbrown commented Sep 24, 2025

Reverted the commits that changed the aimsProcessingModeCode = "T" since they caused tests to fail with a null pointer exception

@mehansen mehansen removed their request for review October 6, 2025 16:17
@mpbrown mpbrown force-pushed the mike/8834-hl7-single-entry-queue branch from 4bd3eee to 9befbd2 Compare October 17, 2025 19:20
@sonarqubecloud
Copy link
Copy Markdown

@mpbrown mpbrown added this pull request to the merge queue Oct 17, 2025
Merged via the queue into main with commit c976989 Oct 17, 2025
34 checks passed
@mpbrown mpbrown deleted the mike/8834-hl7-single-entry-queue branch October 17, 2025 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants