Skip to content

Commit

Permalink
Merge pull request #13200 from SORMAS-Foundation/change-#13184-automa…
Browse files Browse the repository at this point in the history
…te-case-details-and-fields-preselection-for-influenza-cases

Automate Case Details and Fields Preselection for Influenza Cases #13184
  • Loading branch information
leventegal-she authored Dec 10, 2024
2 parents b83a604 + 206e1ea commit 7602439
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import java.util.Date;
import java.util.List;

import de.symeda.sormas.api.caze.CaseClassification;
import org.apache.commons.collections4.CollectionUtils;

import com.google.common.collect.Sets;
Expand Down Expand Up @@ -552,6 +553,15 @@ private void updateDiseaseVariant(Disease disease) {
FieldHelper.updateItems(diseaseVariantField, diseaseVariants);
diseaseVariantField
.setVisible(disease != null && isVisibleAllowed(CaseDataDto.DISEASE_VARIANT) && CollectionUtils.isNotEmpty(diseaseVariants));
if (disease == Disease.INFLUENZA) {
facilityOrHome.setValue(Sets.newHashSet(TypeOfPlace.HOME));
facilityOrHome.select(TypeOfPlace.HOME);
getValue().setCaseClassification(CaseClassification.CONFIRMED);
} else {
facilityOrHome.setValue(null);
facilityOrHome.unselect(TypeOfPlace.HOME);
getValue().setCaseClassification(CaseClassification.NOT_CLASSIFIED);
}
}

private void setNoneFacility() {
Expand Down

0 comments on commit 7602439

Please sign in to comment.