-
Notifications
You must be signed in to change notification settings - Fork 54
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
Use same endpoint for download results as the results list view #8110
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
13c5ef7
Add survey data on TestResultsListItem
mpbrown c196690
Use GetResultsForDownload query for csv download
mpbrown 920b24f
Add resolved survey data
mpbrown 5b8f98c
Use SymptomOnset instead of SymptomOnsetDate
mpbrown 124d6fd
Add resolved patient link
mpbrown 27e513e
Update TestResultTest
mpbrown eca5da8
Update codegen graphql
mpbrown da1d257
Filter disabled diseases on csv download
mpbrown File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
27 changes: 27 additions & 0 deletions
27
backend/src/main/java/gov/cdc/usds/simplereport/db/model/auxiliary/ResolvedSurveyData.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.auxiliary; | ||
|
||
import java.time.LocalDate; | ||
import java.util.List; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
public class ResolvedSurveyData { | ||
|
||
private String pregnancy; | ||
private String syphilisHistory; | ||
private String symptoms; | ||
private Boolean noSymptoms; | ||
private LocalDate symptomOnset; | ||
private List<String> genderOfSexualPartners; | ||
|
||
public ResolvedSurveyData(AskOnEntrySurvey surveyData) { | ||
this.pregnancy = surveyData.getPregnancy(); | ||
this.syphilisHistory = surveyData.getSyphilisHistory(); | ||
this.symptoms = surveyData.getSymptomsJSON(); | ||
this.noSymptoms = surveyData.getNoSymptoms(); | ||
this.symptomOnset = surveyData.getSymptomOnsetDate(); | ||
this.genderOfSexualPartners = surveyData.getGenderOfSexualPartners(); | ||
} | ||
} |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do we need the
patientLink
field? I don't think we are using it on the results page or mapping it to the CSV when we download the results 🤔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.
I'm pretty sure there was some error it ran into with the tests, but I can't remember what it specifically was so maybe that error was made obsolete by other changes, gonna test out removing that patient link then.
patientLink
is on theTestResult
type which might be on the path to being deprecated in favor ofResult
nowThere 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.
For TestResultTest, this line expects
patientLink
to be there on the result. This old unit test might be left over from when we used to need the patient link on the result but maybe we no longer do? Do you think we should edit/remove the unit test or add patient link for now?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.
Ahhhh oops sorry for missing that! Thank you for looking into that again 😓 I think maybe for now we can put the
patientLink
field back so the tests could pass and this bug fix can be merged in. Thank you for your patience with me on this 😅 🙏But if you think it'll be helpful, we can make a tech debt ticket to clean this up. That field doesn't seem to be used (based on my rough reading of the codebase) but probably best to dig more thoroughly.
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.
Sounds good! I'll create a new ticket to address some of that tech debt around
TestResult
vsResult
overall