Skip to content

Conversation

@cazacmarin
Copy link
Contributor

Fixes #13184

@sormas-vitagroup
Copy link
Contributor

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

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

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
4 of 5 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]

5 participants