use of de.symeda.sormas.app.component.menu.PageMenuItem in project SORMAS-Project by hzi-braunschweig.
the class BaseReportActivity method updateSubHeadingTitle.
@Override
public void updateSubHeadingTitle() {
String subHeadingTitle = "";
if (activeFragment != null) {
PageMenuItem activeMenu = getActivePage();
subHeadingTitle = (activeMenu == null) ? activeFragment.getSubHeadingTitle() : activeMenu.getTitle();
}
setSubHeadingTitle(subHeadingTitle);
}
use of de.symeda.sormas.app.component.menu.PageMenuItem in project SORMAS-Project by hzi-braunschweig.
the class BaseReadActivity method updateSubHeadingTitle.
@Override
public void updateSubHeadingTitle() {
String subHeadingTitle = "";
if (activeFragment != null) {
PageMenuItem activeMenu = getActivePage();
subHeadingTitle = (activeMenu == null) ? activeFragment.getSubHeadingTitle() : activeMenu.getTitle();
}
setSubHeadingTitle(subHeadingTitle);
}
use of de.symeda.sormas.app.component.menu.PageMenuItem in project SORMAS-Project by hzi-braunschweig.
the class CaseEditActivity method getPageMenuData.
@Override
public List<PageMenuItem> getPageMenuData() {
List<PageMenuItem> menuItems = PageMenuItem.fromEnum(CaseSection.values(), getContext());
Case caze = getStoredRootEntity();
// Sections must be removed in reverse order
if (DatabaseHelper.getFeatureConfigurationDao().isFeatureDisabled(FeatureType.TASK_MANAGEMENT)) {
menuItems.set(CaseSection.TASKS.ordinal(), null);
}
if (!ConfigProvider.hasUserRight(UserRight.CLINICAL_COURSE_VIEW) || DatabaseHelper.getFeatureConfigurationDao().isFeatureDisabled(FeatureType.VIEW_TAB_CASES_CLINICAL_COURSE) || (caze != null && caze.isUnreferredPortHealthCase()) || (caze != null && caze.getClinicalCourse() == null) || DatabaseHelper.getFeatureConfigurationDao().isFeatureDisabled(FeatureType.CLINICAL_MANAGEMENT)) {
menuItems.set(CaseSection.CLINICAL_VISITS.ordinal(), null);
menuItems.set(CaseSection.HEALTH_CONDITIONS.ordinal(), null);
}
if (!ConfigProvider.hasUserRight(UserRight.THERAPY_VIEW) || DatabaseHelper.getFeatureConfigurationDao().isFeatureDisabled(FeatureType.VIEW_TAB_CASES_THERAPY) || (caze != null && caze.isUnreferredPortHealthCase()) || (caze != null && caze.getTherapy() == null) || DatabaseHelper.getFeatureConfigurationDao().isFeatureDisabled(FeatureType.CLINICAL_MANAGEMENT)) {
menuItems.set(CaseSection.TREATMENTS.ordinal(), null);
menuItems.set(CaseSection.PRESCRIPTIONS.ordinal(), null);
}
if (caze != null && caze.isUnreferredPortHealthCase()) {
menuItems.set(CaseSection.SAMPLES.ordinal(), null);
}
if (!ConfigProvider.hasUserRight(UserRight.IMMUNIZATION_VIEW) || DatabaseHelper.getFeatureConfigurationDao().isPropertyValueTrue(FeatureType.IMMUNIZATION_MANAGEMENT, FeatureTypeProperty.REDUCED)) {
menuItems.set(CaseSection.IMMUNIZATIONS.ordinal(), null);
}
if (!ConfigProvider.hasUserRight(UserRight.IMMUNIZATION_VIEW) || !DatabaseHelper.getFeatureConfigurationDao().isPropertyValueTrue(FeatureType.IMMUNIZATION_MANAGEMENT, FeatureTypeProperty.REDUCED)) {
menuItems.set(CaseSection.VACCINATIONS.ordinal(), null);
}
if (!ConfigProvider.hasUserRight(UserRight.CONTACT_VIEW) || (caze != null && caze.isUnreferredPortHealthCase()) || (caze != null && !DiseaseConfigurationCache.getInstance().hasFollowUp(caze.getDisease()))) {
menuItems.set(CaseSection.CONTACTS.ordinal(), null);
}
if (caze != null && caze.getDisease() == Disease.CONGENITAL_RUBELLA || DatabaseHelper.getFeatureConfigurationDao().isFeatureDisabled(FeatureType.VIEW_TAB_CASES_EPIDEMIOLOGICAL_DATA)) {
menuItems.set(CaseSection.EPIDEMIOLOGICAL_DATA.ordinal(), null);
}
if (caze != null && (caze.getCaseOrigin() != CaseOrigin.POINT_OF_ENTRY || !ConfigProvider.hasUserRight(UserRight.PORT_HEALTH_INFO_VIEW))) {
menuItems.set(CaseSection.PORT_HEALTH_INFO.ordinal(), null);
}
if (caze != null && (caze.isUnreferredPortHealthCase() || UserRole.isPortHealthUser(ConfigProvider.getUser().getUserRoles()) || DatabaseHelper.getFeatureConfigurationDao().isFeatureDisabled(FeatureType.VIEW_TAB_CASES_HOSPITALIZATION))) {
menuItems.set(CaseSection.HOSPITALIZATION.ordinal(), null);
}
if (caze != null && caze.getDisease() != Disease.CONGENITAL_RUBELLA) {
menuItems.set(CaseSection.MATERNAL_HISTORY.ordinal(), null);
}
if (DatabaseHelper.getFeatureConfigurationDao().isFeatureDisabled(FeatureType.VIEW_TAB_CASES_SYMPTOMS)) {
menuItems.set(CaseSection.SYMPTOMS.ordinal(), null);
}
return menuItems;
}
use of de.symeda.sormas.app.component.menu.PageMenuItem in project SORMAS-Project by hzi-braunschweig.
the class SampleReadActivity method getPageMenuData.
@Override
public List<PageMenuItem> getPageMenuData() {
List<PageMenuItem> menuItems = PageMenuItem.fromEnum(SampleSection.values(), getContext());
Sample sample = getStoredRootEntity();
// }
return menuItems;
}
use of de.symeda.sormas.app.component.menu.PageMenuItem in project SORMAS-Project by hzi-braunschweig.
the class EventParticipantEditActivity method getPageMenuData.
@Override
public List<PageMenuItem> getPageMenuData() {
List<PageMenuItem> menuItems = PageMenuItem.fromEnum(EventParticipantSection.values(), getContext());
Event event = DatabaseHelper.getEventDao().queryUuid(eventUuid);
if (!ConfigProvider.hasUserRight(UserRight.IMMUNIZATION_VIEW) || DatabaseHelper.getFeatureConfigurationDao().isPropertyValueTrue(FeatureType.IMMUNIZATION_MANAGEMENT, FeatureTypeProperty.REDUCED)) {
menuItems.set(EventParticipantSection.IMMUNIZATIONS.ordinal(), null);
}
if (!ConfigProvider.hasUserRight(UserRight.IMMUNIZATION_VIEW) || !DatabaseHelper.getFeatureConfigurationDao().isPropertyValueTrue(FeatureType.IMMUNIZATION_MANAGEMENT, FeatureTypeProperty.REDUCED) || event.getDisease() == null) {
menuItems.set(EventParticipantSection.VACCINATIONS.ordinal(), null);
}
return menuItems;
}
Aggregations