-
Notifications
You must be signed in to change notification settings - Fork 143
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
Automate Case Details and Fields Preselection for Influenza Cases #13184 #13200
Conversation
SonarCloud analysis: https://sonarcloud.io/dashboard?id=SORMAS-Project&pullRequest=13200 |
@@ -638,7 +638,7 @@ public static CaseDataDto build(PersonReferenceDto person, Disease disease, Heal | |||
caze.setPortHealthInfo(PortHealthInfoDto.build()); | |||
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
@@ -550,6 +551,7 @@ private void setNoneFacility() { | |||
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 |
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."
@@ -544,6 +546,15 @@ private void updateDiseaseVariant(Disease disease) { | |||
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