Search in sources :

Example 1 with ClinicalVisitSection

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;
}
Also used : ClinicalVisitSection(de.symeda.sormas.app.clinicalcourse.ClinicalVisitSection) BaseReadFragment(de.symeda.sormas.app.BaseReadFragment)

Example 2 with ClinicalVisitSection

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;
}
Also used : ClinicalVisitSection(de.symeda.sormas.app.clinicalcourse.ClinicalVisitSection) BaseEditFragment(de.symeda.sormas.app.BaseEditFragment)

Example 3 with ClinicalVisitSection

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);
}
Also used : ClinicalVisitSection(de.symeda.sormas.app.clinicalcourse.ClinicalVisitSection)

Aggregations

ClinicalVisitSection (de.symeda.sormas.app.clinicalcourse.ClinicalVisitSection)3 BaseEditFragment (de.symeda.sormas.app.BaseEditFragment)1 BaseReadFragment (de.symeda.sormas.app.BaseReadFragment)1