Skip to content
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

Johanna/6723 add destination disease columns upload table #6857

Conversation

johanna-skylight
Copy link
Contributor

@johanna-skylight johanna-skylight commented Oct 27, 2023

BACKEND PULL REQUEST

Related Issue

Changes Proposed

  • Creates the model for the new table UploadDiseaseDetails and corresponding repository.
  • Updates to TestResultUploadService include:
    • CVS validation logic moved to its own method.
    • Processing of the ReportStream response (covid and universal pipeline) have been moved to their own method.
    • Method saveSubmissionToDb now receives the destination pipeline and the disease/count breakdown.
  • Creates auxiliary classes :
    • FHIRBundleRecord : contains the serialized fhir bundle plus the diseases/count breakdown as metadata.
    • CovidSummisionSummary: contains the RS response and other information relevant to covid reporting (e.g.: submissionId, org, destination).
    • UniversalSummisionSummary: contains the RS response and other information relevant to universal reporting (e.g.: submissionId, org, destination).
    • Pipeline: new type to represent COVID | UNIVERSAL pipeline names.
  • TestResultUpload now uses the @builder annotation.

Testing

Code is available in dev2.

  • Upload a file and verify that the upload records and the disease details are correctly logged in our DB.
  • Verify validations work as usual.

@johanna-skylight johanna-skylight temporarily deployed to dev5 October 30, 2023 15:53 — with GitHub Actions Inactive
@johanna-skylight johanna-skylight temporarily deployed to dev5 October 30, 2023 16:10 — with GitHub Actions Inactive
@johanna-skylight johanna-skylight temporarily deployed to dev2 November 1, 2023 14:45 — with GitHub Actions Inactive
@Entity
@Slf4j
@AllArgsConstructor
@NoArgsConstructor
@Builder

Check notice

Code scanning / CodeQL

Use of default toString() Note

Default toString(): Organization inherits toString() from Object, and so is not suitable for printing.
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Builder

Check notice

Code scanning / CodeQL

Use of default toString() Note

Default toString(): TestResultUpload inherits toString() from Object, and so is not suitable for printing.
Default toString(): SupportedDisease inherits toString() from Object, and so is not suitable for printing.
@johanna-skylight johanna-skylight temporarily deployed to dev2 November 1, 2023 14:52 — with GitHub Actions Inactive
@johanna-skylight johanna-skylight temporarily deployed to dev2 November 1, 2023 18:15 — with GitHub Actions Inactive
@johanna-skylight johanna-skylight temporarily deployed to dev2 November 1, 2023 18:23 — with GitHub Actions Inactive
@johanna-skylight johanna-skylight temporarily deployed to dev2 November 1, 2023 19:22 — with GitHub Actions Inactive
@johanna-skylight johanna-skylight temporarily deployed to dev2 November 1, 2023 19:29 — with GitHub Actions Inactive
@johanna-skylight johanna-skylight temporarily deployed to dev2 November 1, 2023 19:47 — with GitHub Actions Inactive
@johanna-skylight johanna-skylight temporarily deployed to dev2 November 1, 2023 19:55 — with GitHub Actions Inactive
@johanna-skylight johanna-skylight marked this pull request as ready for review November 1, 2023 20:14
@johanna-skylight johanna-skylight temporarily deployed to dev2 November 2, 2023 16:42 — with GitHub Actions Inactive
@johanna-skylight johanna-skylight temporarily deployed to dev2 November 2, 2023 16:47 — with GitHub Actions Inactive
BobanL
BobanL previously approved these changes Nov 2, 2023
Copy link
Contributor

@BobanL BobanL left a comment

Choose a reason for hiding this comment

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

Changes look good! just one nit about the codesmells that sonar has identified.

Comment on lines 153 to 164
try {
processCovidResponse(covidSubmission.get()).ifPresent(uploadSummary::add);
} catch (CsvProcessingException | ExecutionException | InterruptedException e) {
log.error("Error processing csv in bulk result upload", e);
Thread.currentThread().interrupt();
}
try {
processUniversalResponse(universalSubmission.get()).ifPresent(uploadSummary::add);
} catch (CsvProcessingException | ExecutionException | InterruptedException e) {
log.error("Error processing FHIR in bulk result upload", e);
Thread.currentThread().interrupt();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

These nested try catches are code smells, could you pull these out into their own private methods to resolve that?

Copy link

sonarqubecloud bot commented Nov 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

87.4% 87.4% Coverage
0.0% 0.0% Duplication

@johanna-skylight
Copy link
Contributor Author

johanna-skylight commented Nov 2, 2023

I have addressed the feedback from Boban and Bob. New code is available in dev2 thanks!

Copy link
Contributor

@BobanL BobanL left a comment

Choose a reason for hiding this comment

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

😄

Copy link
Collaborator

@emyl3 emyl3 left a comment

Choose a reason for hiding this comment

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

LGTM! Tested on dev2! RSV uploads look good and no regression with the upload history view

@johanna-skylight johanna-skylight added this pull request to the merge queue Nov 3, 2023
Merged via the queue into main with commit 5eb9973 Nov 3, 2023
37 checks passed
@johanna-skylight johanna-skylight deleted the johanna/6723_add_destination_disease_columns_upload_table branch November 3, 2023 12:41
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.

Add disease and destination values to Uploads table
3 participants