From 17f685f4290d9d5a86a92c8d561c6091501b6f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=A9=20Strysewske?= Date: Fri, 16 Feb 2024 14:30:24 +0100 Subject: [PATCH] #11919 - Display correct information on hospitalization change (#12968) --- .../de/symeda/sormas/ui/caze/PlaceOfStayEditForm.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/PlaceOfStayEditForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/PlaceOfStayEditForm.java index 9a4ee9374a1..5ab1b71b0ad 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/PlaceOfStayEditForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/PlaceOfStayEditForm.java @@ -25,6 +25,7 @@ import java.util.Collections; import com.vaadin.ui.Label; +import com.vaadin.v7.data.util.converter.Converter; import com.vaadin.v7.ui.CheckBox; import com.vaadin.v7.ui.ComboBox; import com.vaadin.v7.ui.TextField; @@ -192,4 +193,12 @@ private void updateFacility() { facilityCombo.setEnabled(false); } } + + @Override + public void setValue(CaseDataDto newFieldValue) throws ReadOnlyException, Converter.ConversionException { + super.setValue(newFieldValue); + if (newFieldValue.getRegion() != null && newFieldValue.getRegion().getUuid() != newFieldValue.getResponsibleRegion().getUuid()) { + differentPlaceOfStayJurisdiction.setValue(true); + } + } }