@@ -258,7 +258,12 @@ protected void initView(String params) {
258258 .isPropertyValueTrue (FeatureType .IMMUNIZATION_MANAGEMENT , FeatureTypeProperty .REDUCED )) {
259259 layout .addSidePanelComponent (new SideComponentLayout (new ImmunizationListComponent (() -> {
260260 ContactDto refreshedContact = FacadeProvider .getContactFacade ().getByUuid (getContactRef ().getUuid ());
261- return new ImmunizationListCriteria .Builder (refreshedContact .getPerson ()).withDisease (refreshedContact .getDisease ()).build ();
261+ Disease criteriaDisease = refreshedContact .getDisease ();
262+ if (criteriaDisease == null && refreshedContact .getCaze () != null ) {
263+ CaseDataDto refreshedCase = FacadeProvider .getCaseFacade ().getCaseDataByUuid (refreshedContact .getCaze ().getUuid ());
264+ criteriaDisease = refreshedCase != null ? refreshedCase .getDisease () : null ;
265+ }
266+ return new ImmunizationListCriteria .Builder (refreshedContact .getPerson ()).withDisease (criteriaDisease ).build ();
262267 }, null , this ::showUnsavedChangesPopup , editAllowed )), IMMUNIZATION_LOC );
263268 } else {
264269 layout .addSidePanelComponent (new SideComponentLayout (new VaccinationListComponent (() -> {
@@ -267,7 +272,11 @@ protected void initView(String params) {
267272 if (refreshedContact .getCaze () != null ) {
268273 refreshedCase = FacadeProvider .getCaseFacade ().getCaseDataByUuid (refreshedContact .getCaze ().getUuid ());
269274 }
270- return new VaccinationCriteria .Builder (refreshedContact .getPerson ()).withDisease (refreshedContact .getDisease ())
275+ Disease criteriaDisease = refreshedContact .getDisease ();
276+ if (criteriaDisease == null && refreshedCase != null ) {
277+ criteriaDisease = refreshedCase .getDisease ();
278+ }
279+ return new VaccinationCriteria .Builder (refreshedContact .getPerson ()).withDisease (criteriaDisease )
271280 .build ()
272281 .vaccinationAssociationType (VaccinationAssociationType .CONTACT )
273282 .contactReference (getContactRef ())
0 commit comments