-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Johanna/6723 add destination disease columns upload table (#6857)
* Added two new columns to upload table * Added cascade to rollback * Removed not null constraint so the schema changes are backwards compatible * added manual rollback for the disease_id column * Implemented insert of new information in table and unit testing partially updated * Fixed some more test cases * Updated models and fixed some test suites * save to DB logic moved back to main thread * Added mocks for repo_save * Fixed sonar cloud smells * Fixed more code smells * addresses feedback
- Loading branch information
1 parent
a685331
commit 5eb9973
Showing
18 changed files
with
448 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
backend/src/main/java/gov/cdc/usds/simplereport/db/model/UploadDiseaseDetails.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package gov.cdc.usds.simplereport.db.model; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.JoinColumn; | ||
import javax.persistence.ManyToOne; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Entity | ||
@Builder | ||
public class UploadDiseaseDetails extends AuditedEntity { | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "supported_disease_id", nullable = false) | ||
private SupportedDisease disease; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "upload_id", nullable = false) | ||
private TestResultUpload upload; | ||
|
||
@Column(nullable = false) | ||
private int recordsCount; | ||
} |
13 changes: 13 additions & 0 deletions
13
...nd/src/main/java/gov/cdc/usds/simplereport/db/model/auxiliary/CovidSubmissionSummary.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package gov.cdc.usds.simplereport.db.model.auxiliary; | ||
|
||
import gov.cdc.usds.simplereport.db.model.Organization; | ||
import gov.cdc.usds.simplereport.service.model.reportstream.UploadResponse; | ||
import java.util.HashMap; | ||
import java.util.UUID; | ||
|
||
public record CovidSubmissionSummary( | ||
UUID submissionId, | ||
Organization org, | ||
UploadResponse submissionResponse, | ||
Exception processingException, | ||
HashMap<String, Integer> reportedDiseases) {} |
6 changes: 6 additions & 0 deletions
6
backend/src/main/java/gov/cdc/usds/simplereport/db/model/auxiliary/FHIRBundleRecord.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package gov.cdc.usds.simplereport.db.model.auxiliary; | ||
|
||
import java.util.HashMap; | ||
import java.util.List; | ||
|
||
public record FHIRBundleRecord(List<String> serializedBundle, HashMap<String, Integer> metadata) {} |
6 changes: 6 additions & 0 deletions
6
backend/src/main/java/gov/cdc/usds/simplereport/db/model/auxiliary/Pipeline.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package gov.cdc.usds.simplereport.db.model.auxiliary; | ||
|
||
public enum Pipeline { | ||
COVID, | ||
UNIVERSAL; | ||
} |
12 changes: 12 additions & 0 deletions
12
...rc/main/java/gov/cdc/usds/simplereport/db/model/auxiliary/UniversalSubmissionSummary.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package gov.cdc.usds.simplereport.db.model.auxiliary; | ||
|
||
import gov.cdc.usds.simplereport.db.model.Organization; | ||
import gov.cdc.usds.simplereport.service.model.reportstream.UploadResponse; | ||
import java.util.HashMap; | ||
import java.util.UUID; | ||
|
||
public record UniversalSubmissionSummary( | ||
UUID submissionId, | ||
Organization org, | ||
UploadResponse submissionResponse, | ||
HashMap<String, Integer> reportedDiseases) {} |
6 changes: 6 additions & 0 deletions
6
...src/main/java/gov/cdc/usds/simplereport/db/repository/UploadDiseaseDetailsRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package gov.cdc.usds.simplereport.db.repository; | ||
|
||
import gov.cdc.usds.simplereport.db.model.UploadDiseaseDetails; | ||
|
||
public interface UploadDiseaseDetailsRepository | ||
extends AuditedEntityRepository<UploadDiseaseDetails> {} |
Oops, something went wrong.