CDCgov / prime-reportstream

ReportStream is a public intermediary tool for delivery of data between different parts of the healthcare ecosystem.
https://reportstream.cdc.gov
Creative Commons Zero v1.0 Universal
72 stars 40 forks source link

Create ReportStreamSubmissionEvent #16011

Open brick-green opened 1 month ago

brick-green commented 1 month ago

User Story

As an RS engineer I want to create an azure event that contains information about a submission so that events without a report or item can be logged

Description/Use Case

Currently, the system supports azure events relating to a report or item. There are steps in the pipeline before reports have been created that we still need to log. An example is in the FHIRReceiver when a sender is not found, we do not create a Report but we still create an azure event. Currently that emits a sendSubmissionProcessingError which uses an initializer ReportStreamReportProcessingErrorEventBuilder. There is no report that was ever created in this case so using that initializer is inaccurate. The result is that events in azure have a field not relevant to submissions such as reportId that is filled with a submission ID.

Risks/Impacts/Considerations

The abstract class AbstractReportStreamEventBuilder has parameters that are not relevant to all submissions(e.g., theTopic, childReportId). In creating the ReportStreamSubmissionEvent, those parameters will need to be adjusted so that they are not present on the new event.

Dev Notes

sendSubmissionProcessingError is used twice in FHIRReceiver. The use cases are:

Acceptance Criteria

arnejduranovic commented 1 month ago

Hey team! Please add your planning poker estimate with Zenhub @adegolier @david-navapbc @jack-h-wang @jalbinson @JFisk42 @mkalish

arnejduranovic commented 1 month ago

Blocker: Review implementation of FHIRReceiver. Potential issue: In the case of an error, we are not creating an output report. Up until now, the rule has been report in and report out.

Presently, the FHIRReceiver function passes in the parentReportID to the event instead of the expected child. Furthermore, this function doesn't create a child report in all cases.

SubmissionErrorEvent function should not be required, can just use existing one.

@arnejduranovic to create a new ticket for this cleanup.