use of de.symeda.sormas.app.clinicalcourse.ClinicalVisitSection in project SORMAS-Project by hzi-braunschweig.
the class ClinicalVisitReadActivity method buildReadFragment.
@Override
protected BaseReadFragment buildReadFragment(PageMenuItem menuItem, ClinicalVisit activityRootData) {
ClinicalVisitSection section = ClinicalVisitSection.fromOrdinal(menuItem.getPosition());
BaseReadFragment fragment;
switch(section) {
case VISIT_INFO:
fragment = ClinicalVisitReadFragment.newInstance(activityRootData);
break;
case CLINICAL_MEASUREMENTS:
fragment = ClinicalMeasurementsReadFragment.newInstance(activityRootData.getSymptoms());
break;
case SYMPTOMS:
fragment = SymptomsReadFragment.newInstance(activityRootData);
break;
default:
throw new IndexOutOfBoundsException(DataHelper.toStringNullable(section));
}
return fragment;
}
use of de.symeda.sormas.app.clinicalcourse.ClinicalVisitSection in project SORMAS-Project by hzi-braunschweig.
the class ClinicalVisitEditActivity method buildEditFragment.
@Override
protected BaseEditFragment buildEditFragment(PageMenuItem menuItem, ClinicalVisit activityRootData) {
ClinicalVisitSection section = ClinicalVisitSection.fromOrdinal(menuItem.getPosition());
BaseEditFragment fragment;
switch(section) {
case VISIT_INFO:
fragment = ClinicalVisitEditFragment.newInstance(activityRootData);
break;
case CLINICAL_MEASUREMENTS:
fragment = ClinicalMeasurementsEditFragment.newInstance(activityRootData.getSymptoms());
break;
case SYMPTOMS:
fragment = SymptomsEditFragment.newInstance(activityRootData, caseUuid);
break;
default:
throw new IndexOutOfBoundsException(DataHelper.toStringNullable(section));
}
return fragment;
}
use of de.symeda.sormas.app.clinicalcourse.ClinicalVisitSection in project SORMAS-Project by hzi-braunschweig.
the class ClinicalVisitReadActivity method goToEditView.
@Override
public void goToEditView() {
ClinicalVisitSection section = ClinicalVisitSection.fromOrdinal(getActivePage().getPosition());
ClinicalVisitEditActivity.startActivity(getContext(), getRootUuid(), caseUuid, section);
}
Aggregations