Search in sources :

Example 1 with CauseOfDeath

use of de.symeda.sormas.api.person.CauseOfDeath in project SORMAS-Project by hzi-braunschweig.

the class PersonEditFragment method setCauseOfDeathDetailsFieldVisibility.

private static void setCauseOfDeathDetailsFieldVisibility(final ControlPropertyField causeOfDeathField, final ControlPropertyField causeOfDeathDiseaseField, final ControlPropertyField causeOfDeathDetailsField) {
    CauseOfDeath selectedCauseOfDeath = (CauseOfDeath) causeOfDeathField.getValue();
    Disease selectedCauseOfDeathDisease = (Disease) causeOfDeathDiseaseField.getValue();
    if (selectedCauseOfDeath == CauseOfDeath.OTHER_CAUSE) {
        causeOfDeathDetailsField.setVisibility(VISIBLE);
        causeOfDeathDetailsField.setCaption(I18nProperties.getPrefixCaption(PersonDto.I18N_PREFIX, PersonDto.CAUSE_OF_DEATH_DETAILS));
    } else if (selectedCauseOfDeathDisease == Disease.OTHER) {
        causeOfDeathDetailsField.setVisibility(VISIBLE);
        causeOfDeathDetailsField.setCaption(I18nProperties.getPrefixCaption(PersonDto.I18N_PREFIX, PersonDto.CAUSE_OF_DEATH_DISEASE_DETAILS));
    } else {
        causeOfDeathDetailsField.setVisibility(GONE);
    }
}
Also used : Disease(de.symeda.sormas.api.Disease) CauseOfDeath(de.symeda.sormas.api.person.CauseOfDeath)

Aggregations

Disease (de.symeda.sormas.api.Disease)1 CauseOfDeath (de.symeda.sormas.api.person.CauseOfDeath)1