use of de.symeda.sormas.app.caze.CaseSection in project SORMAS-Project by hzi-braunschweig.
the class CaseEditActivity method buildEditFragment.
@Override
protected BaseEditFragment buildEditFragment(PageMenuItem menuItem, Case activityRootData) {
CaseSection section = CaseSection.fromOrdinal(menuItem.getPosition());
BaseEditFragment fragment;
switch(section) {
case CASE_INFO:
fragment = CaseEditFragment.newInstance(activityRootData);
break;
case PERSON_INFO:
fragment = PersonEditFragment.newInstance(activityRootData);
break;
case MATERNAL_HISTORY:
fragment = CaseEditMaternalHistoryFragment.newInstance(activityRootData);
break;
case HOSPITALIZATION:
fragment = CaseEditHospitalizationFragment.newInstance(activityRootData);
break;
case PORT_HEALTH_INFO:
fragment = CaseEditPortHealthInfoFragment.newInstance(activityRootData);
break;
case SYMPTOMS:
fragment = SymptomsEditFragment.newInstance(activityRootData);
break;
case EPIDEMIOLOGICAL_DATA:
fragment = EpidemiologicalDataEditFragment.newInstance(activityRootData);
break;
case CONTACTS:
fragment = CaseEditContactListFragment.newInstance(activityRootData);
break;
case SAMPLES:
fragment = CaseEditSampleListFragment.newInstance(activityRootData);
break;
case PRESCRIPTIONS:
fragment = CaseEditPrescriptionListFragment.newInstance(activityRootData);
break;
case TREATMENTS:
fragment = CaseEditTreatmentListFragment.newInstance(activityRootData);
break;
case HEALTH_CONDITIONS:
fragment = CaseEditHealthConditionsFragment.newInstance(activityRootData);
break;
case CLINICAL_VISITS:
fragment = CaseEditClinicalVisitListFragment.newInstance(activityRootData);
break;
case TASKS:
fragment = CaseEditTaskListFragment.newInstance(activityRootData);
break;
case EVENTS:
fragment = CaseEditEventListFragment.newInstance(activityRootData);
break;
case IMMUNIZATIONS:
fragment = CaseEditImmunizationListFragment.newInstance(activityRootData);
break;
case VACCINATIONS:
fragment = CaseEditVaccinationListFragment.newInstance(activityRootData);
break;
default:
throw new IndexOutOfBoundsException(DataHelper.toStringNullable(section));
}
return fragment;
}
use of de.symeda.sormas.app.caze.CaseSection in project SORMAS-Project by hzi-braunschweig.
the class CaseReadActivity method goToEditView.
@Override
public void goToEditView() {
CaseSection section = CaseSection.fromOrdinal(getActivePage().getPosition());
CaseEditActivity.startActivity(CaseReadActivity.this, getRootUuid(), section);
}
use of de.symeda.sormas.app.caze.CaseSection in project SORMAS-Project by hzi-braunschweig.
the class CaseReadActivity method buildReadFragment.
@Override
protected BaseReadFragment buildReadFragment(PageMenuItem menuItem, Case activityRootData) {
CaseSection section = CaseSection.fromOrdinal(menuItem.getPosition());
BaseReadFragment fragment;
switch(section) {
case CASE_INFO:
fragment = CaseReadFragment.newInstance(activityRootData);
break;
case PERSON_INFO:
fragment = PersonReadFragment.newInstance(activityRootData);
break;
case MATERNAL_HISTORY:
fragment = CaseReadMaternalHistoryFragment.newInstance(activityRootData);
break;
case HOSPITALIZATION:
fragment = CaseReadHospitalizationFragment.newInstance(activityRootData);
break;
case PORT_HEALTH_INFO:
fragment = CaseReadPortHealthInfoFragment.newInstance(activityRootData);
break;
case SYMPTOMS:
fragment = SymptomsReadFragment.newInstance(activityRootData);
break;
case EPIDEMIOLOGICAL_DATA:
fragment = EpidemiologicalDataReadFragment.newInstance(activityRootData);
break;
case CONTACTS:
fragment = CaseReadContactListFragment.newInstance(activityRootData);
break;
case SAMPLES:
fragment = CaseReadSampleListFragment.newInstance(activityRootData);
break;
case EVENTS:
fragment = CaseReadEventListFragment.newInstance(activityRootData);
break;
case IMMUNIZATIONS:
fragment = CaseReadImmunizationListFragment.newInstance(activityRootData);
break;
case VACCINATIONS:
fragment = CaseReadVaccinationListFragment.newInstance(activityRootData);
break;
case PRESCRIPTIONS:
fragment = CaseReadPrescriptionListFragment.newInstance(activityRootData);
break;
case TREATMENTS:
fragment = CaseReadTreatmentListFragment.newInstance(activityRootData);
break;
case HEALTH_CONDITIONS:
fragment = CaseReadHealthConditionsFragment.newInstance(activityRootData);
break;
case CLINICAL_VISITS:
fragment = CaseReadClinicalVisitListFragment.newInstance(activityRootData);
break;
case TASKS:
fragment = CaseReadTaskListFragment.newInstance(activityRootData);
break;
default:
throw new IndexOutOfBoundsException(DataHelper.toStringNullable(section));
}
return fragment;
}
Aggregations