-
Notifications
You must be signed in to change notification settings - Fork 161
Automate Case Details and Fields Preselection for Influenza Cases #13184 #13200
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
Automate Case Details and Fields Preselection for Influenza Cases #13184 #13200
Conversation
|
SonarCloud analysis: https://sonarcloud.io/dashboard?id=SORMAS-Project&pullRequest=13200 |
| caze.setDisease(disease); | ||
| caze.setInvestigationStatus(InvestigationStatus.PENDING); | ||
| caze.setCaseClassification(CaseClassification.NOT_CLASSIFIED); | ||
| caze.setCaseClassification(CaseClassification.CONFIRMED); |
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.
the changes required in the ticket should be only for Influenza cases
| FacilityReferenceDto noFacilityRef = FacadeProvider.getFacilityFacade().getByUuid(FacilityDto.NONE_FACILITY_UUID).toReference(); | ||
| facilityCombo.addItem(noFacilityRef); | ||
| facilityCombo.setValue(noFacilityRef); | ||
| facilityType.setRequired(false); |
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.
why is this needed?
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.
Without this line, this field will be set as required for validation. It happens only from code change. And in this case, in Validation Form, even if Place of Stay is set to Home, app will ask us to introduce the Facility Type(as Required).
…nd-fields-preselection-for-influenza-cases
|
SonarCloud analysis: https://sonarcloud.io/dashboard?id=SORMAS-Project&pullRequest=13200 |
leventegal-she
left a comment
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.
What about the first point:
"Automatically select "CONFIRMED CASE" for case classification, "PENDING" for investigation status, and "NO OUTCOME YET" for outcome."
| FieldHelper.updateItems(diseaseVariantField, diseaseVariants); | ||
| diseaseVariantField | ||
| .setVisible(disease != null && isVisibleAllowed(CaseDataDto.DISEASE_VARIANT) && CollectionUtils.isNotEmpty(diseaseVariants)); | ||
| if (Objects.nonNull(disease) && (Disease.INFLUENZA.compareTo(disease) == 0)) { |
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.
can be simplified to disease == Disease.INFLUENZA
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.
Simplified. About the first point, other 2 were selected to the right status by default.
|
SonarCloud analysis: https://sonarcloud.io/dashboard?id=SORMAS-Project&pullRequest=13200 |
Fixes #13184