Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1582,8 +1582,7 @@ private void saveCaseWithOutcomeChangedWarning(CaseDataDto caze, CaseDataDto old
Label valuesLabel = new Label(I18nProperties.getCaption(Captions.confirmChangesValue));
valuesLabel.addStyleName(CssStyles.LABEL_SECONDARY);
valuesLayout.addComponent(valuesLabel);
valuesLayout.addComponent(
new Label((person.getPresentCondition() == null ? PresentCondition.DEAD : person.getPresentCondition()).toString()));
valuesLayout.addComponent(new Label(getNewPresentConditionFromOutcome(caze.getOutcome()).toString()));
valuesLayout.addComponent(new Label(CauseOfDeath.EPIDEMIC_DISEASE.toString()));
valuesLayout.addComponent(new Label(caze.getDisease().toString()));
valuesLayout.addComponent(new Label(DateFormatHelper.formatDate(caze.getOutcomeDate())));
Expand All @@ -1610,6 +1609,22 @@ private void saveCaseWithOutcomeChangedWarning(CaseDataDto caze, CaseDataDto old
saveCase(caze);
}

private PresentCondition getNewPresentConditionFromOutcome(CaseOutcome outcome) {
if (outcome == null) {
return PresentCondition.UNKNOWN;
}
switch (outcome) {
case DECEASED:
return PresentCondition.DEAD;
case RECOVERED:
return PresentCondition.ALIVE;
case NO_OUTCOME:
case UNKNOWN:
default:
return PresentCondition.UNKNOWN;
}
}

public void referFromPointOfEntry(CaseDataDto caze) {

CaseFacilityChangeForm form = new CaseFacilityChangeForm();
Expand Down
Loading