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

Automate Case Details and Fields Preselection for Influenza Cases #13184 #13200

Conversation

cazacmarin
Copy link
Contributor

Fixes #13184

@sormas-vitagroup
Copy link
Contributor

@@ -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);
Copy link
Contributor

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);
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this needed?

Copy link
Contributor Author

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).

@sormas-vitagroup
Copy link
Contributor

Copy link
Contributor

@leventegal-she leventegal-she left a 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)) {
Copy link
Contributor

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

Copy link
Contributor Author

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.

 - after review comments. Simplified 1 if statement.
@sormas-vitagroup
Copy link
Contributor

@leventegal-she leventegal-she merged commit 7602439 into development Dec 10, 2024
5 of 7 checks passed
@leventegal-she leventegal-she deleted the change-#13184-automate-case-details-and-fields-preselection-for-influenza-cases branch December 10, 2024 13:21
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.

Automate Case Details and Fields Preselection for Influenza Cases [1]
4 participants