From cfb4b9ad87542b23f918d78b49694f3f8692a773 Mon Sep 17 00:00:00 2001 From: douglasderrick Date: Tue, 17 Oct 2023 22:40:42 +0000 Subject: [PATCH 01/25] Revert "- Added CaseSampleView, ContactSamplesView, EventSamplesView, CCESamplesGrid" This reverts commit 6424fff5c453eb70b424cfcc8aa279eb494c6ef3. --- .../de/symeda/sormas/api/i18n/Captions.java | 3 - .../java/de/symeda/sormas/ui/MainScreen.java | 2 - .../sormas/ui/caze/AbstractCaseView.java | 6 - .../symeda/sormas/ui/caze/CaseController.java | 7 - .../symeda/sormas/ui/caze/CaseDataView.java | 13 + .../symeda/sormas/ui/caze/CaseSampleView.java | 270 -------------- .../ui/contact/AbstractContactView.java | 4 - .../sormas/ui/contact/ContactController.java | 1 - .../sormas/ui/contact/ContactDataView.java | 10 + .../sormas/ui/contact/ContactSamplesView.java | 275 -------------- .../ui/events/EventParticipantDataView.java | 14 +- .../sormas/ui/events/EventSamplesView.java | 349 ------------------ .../sormas/ui/samples/CCESamplesGrid.java | 250 ------------- 13 files changed, 34 insertions(+), 1170 deletions(-) delete mode 100644 sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseSampleView.java delete mode 100644 sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactSamplesView.java delete mode 100644 sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventSamplesView.java delete mode 100644 sormas-ui/src/main/java/de/symeda/sormas/ui/samples/CCESamplesGrid.java diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java index 4947b64d4a0..7568a61057f 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java @@ -270,7 +270,6 @@ public interface Captions { String caseCloneCaseWithNewDisease = "caseCloneCaseWithNewDisease"; String caseConfirmCase = "caseConfirmCase"; String caseContacts = "caseContacts"; - String caseSamples = "caseSamples"; String caseCreateCase = "caseCreateCase"; String caseCreateNew = "caseCreateNew"; String CaseData = "CaseData"; @@ -696,7 +695,6 @@ public interface Captions { String Contact_uuid = "Contact.uuid"; String Contact_vaccinationStatus = "Contact.vaccinationStatus"; String Contact_visits = "Contact.visits"; - String Contact_samples = "Contact.samples"; String contactActiveContacts = "contactActiveContacts"; String contactAllContacts = "contactAllContacts"; String contactArchivedContacts = "contactArchivedContacts"; @@ -1134,7 +1132,6 @@ public interface Captions { String eventEditEventGroup = "eventEditEventGroup"; String eventEventActions = "eventEventActions"; String eventEventParticipants = "eventEventParticipants"; - String eventEventParticipantsSamples = "eventEventParticipantsSamples"; String eventEventsList = "eventEventsList"; String eventEvolutionCommentWithStatus = "eventEvolutionCommentWithStatus"; String eventEvolutionDateWithStatus = "eventEvolutionDateWithStatus"; diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/MainScreen.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/MainScreen.java index d79451d78d4..9c7f58a7862 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/MainScreen.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/MainScreen.java @@ -74,7 +74,6 @@ import de.symeda.sormas.ui.dashboard.surveillance.SurveillanceDashboardView; import de.symeda.sormas.ui.events.EventGroupDataView; import de.symeda.sormas.ui.events.EventParticipantDataView; -import de.symeda.sormas.ui.events.EventSamplesView; import de.symeda.sormas.ui.events.EventsView; import de.symeda.sormas.ui.externalmessage.ExternalMessagesView; import de.symeda.sormas.ui.immunization.ImmunizationsView; @@ -194,7 +193,6 @@ public View getView(String viewName) { if (permitted(FeatureType.EVENT_SURVEILLANCE, UserRight.EVENT_VIEW)) { ControllerProvider.getEventController().registerViews(navigator); navigator.addView(EventParticipantDataView.VIEW_NAME, EventParticipantDataView.class); - navigator.addView(EventSamplesView.VIEW_NAME, EventSamplesView.class); navigator.addView(EventGroupDataView.VIEW_NAME, EventGroupDataView.class); menu.addView(EventsView.class, EventsView.VIEW_NAME, I18nProperties.getCaption(Captions.mainMenuEvents), VaadinIcons.PHONE); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractCaseView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractCaseView.java index 8c11b046895..e5af39e5c38 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractCaseView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractCaseView.java @@ -214,12 +214,6 @@ public void refreshMenu(SubMenu menu, String params) { menu.addView(CaseContactsView.VIEW_NAME, I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, Captions.caseContacts), params); } - if (FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.SAMPLES_LAB) - && UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW) - && !caze.checkIsUnreferredPortHealthCase()) { - menu.addView(CaseSampleView.VIEW_NAME, I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, Captions.caseSamples), params); - } - if (caze.getExternalData() != null && !caze.getExternalData().isEmpty()) { menu.addView(CaseExternalDataView.VIEW_NAME, I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, CaseDataDto.EXTERNAL_DATA), params); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseController.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseController.java index 9c42271d427..6a6a15eab92 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseController.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseController.java @@ -179,13 +179,6 @@ public void registerViews(Navigator navigator) { navigator.addView(CaseVisitsView.VIEW_NAME, CaseVisitsView.class); } - if(FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.SAMPLES_LAB) - && userProvider.hasUserRight(UserRight.SAMPLE_VIEW) - && userProvider.hasUserRight(UserRight.SAMPLE_EDIT) - ) { - navigator.addView(CaseSampleView.VIEW_NAME, CaseSampleView.class); - } - navigator.addView(CaseExternalDataView.VIEW_NAME, CaseExternalDataView.class); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataView.java index aaf060c49d5..bd21430a0c2 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataView.java @@ -63,6 +63,7 @@ public class CaseDataView extends AbstractCaseView { public static final String CASE_LOC = "case"; public static final String CASE_SIDE_PANEL_LOC = "caseSidePanel"; public static final String TASKS_LOC = "tasks"; + public static final String SAMPLES_LOC = "samples"; public static final String EVENTS_LOC = "events"; public static final String IMMUNIZATION_LOC = "immunizations"; public static final String VACCINATIONS_LOC = "vaccinations"; @@ -94,6 +95,7 @@ protected void initView(String params) { LayoutWithSidePanel layout = new LayoutWithSidePanel( editComponent, TASKS_LOC, + SAMPLES_LOC, EVENTS_LOC, IMMUNIZATION_LOC, VACCINATIONS_LOC, @@ -120,6 +122,17 @@ protected void initView(String params) { layout.addSidePanelComponent(smsList, SMS_LOC); } + if (FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.SAMPLES_LAB) + && UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW) + && !caze.checkIsUnreferredPortHealthCase()) { + SampleListComponent sampleList = new SampleListComponent( + new SampleCriteria().caze(getCaseRef()).sampleAssociationType(SampleAssociationType.CASE).disease(caze.getDisease()), + this::showUnsavedChangesPopup); + SampleListComponentLayout sampleListComponentLayout = + new SampleListComponentLayout(sampleList, I18nProperties.getString(Strings.infoCreateNewSampleDiscardsChangesCase)); + layout.addSidePanelComponent(sampleListComponentLayout, SAMPLES_LOC); + } + if (FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.EVENT_SURVEILLANCE) && UserProvider.getCurrent().hasUserRight(UserRight.EVENT_VIEW)) { VerticalLayout eventLayout = new VerticalLayout(); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseSampleView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseSampleView.java deleted file mode 100644 index c4f0fa16193..00000000000 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseSampleView.java +++ /dev/null @@ -1,270 +0,0 @@ -package de.symeda.sormas.ui.caze; - -import com.vaadin.icons.VaadinIcons; -import com.vaadin.ui.*; -import com.vaadin.ui.themes.ValoTheme; -import com.vaadin.v7.ui.ComboBox; -import de.symeda.sormas.api.EntityRelevanceStatus; -import de.symeda.sormas.api.i18n.Captions; -import de.symeda.sormas.api.i18n.I18nProperties; -import de.symeda.sormas.api.sample.SampleAssociationType; -import de.symeda.sormas.api.sample.SampleCriteria; -import de.symeda.sormas.api.sample.SampleDto; -import de.symeda.sormas.api.user.UserRight; -import de.symeda.sormas.ui.ControllerProvider; -import de.symeda.sormas.ui.SormasUI; -import de.symeda.sormas.ui.UserProvider; -import de.symeda.sormas.ui.ViewModelProviders; -import de.symeda.sormas.ui.samples.CCESamplesGrid; -import de.symeda.sormas.ui.samples.SampleCreateForm; -import de.symeda.sormas.ui.utils.*; - -import java.util.HashMap; - -public class CaseSampleView extends AbstractCaseView { - public static final String VIEW_NAME = ROOT_VIEW_NAME + "/samples"; - private CommitDiscardWrapperComponent editComponent; - private SampleCriteria criteria; - private final ViewConfiguration viewConfiguration; - private HashMap statusButtons; - private Button activeStatusButton; - private ComboBox relevanceStatusFilter; - private ComboBox sampleTypeFilter; - private static final String NOT_SHIPPED = "notShipped"; - private static final String SHIPPED = "shipped"; - private static final String RECEIVED = "received"; - private static final String REFERRED = "referred"; - private CCESamplesGrid grid; - private DetailSubComponentWrapper gridLayout; - - public CaseSampleView() { - super(VIEW_NAME, false); - setSizeFull(); - - viewConfiguration = ViewModelProviders.of(getClass()).get(ViewConfiguration.class); - viewConfiguration.setInEagerMode(true); - criteria = ViewModelProviders.of(CaseSampleView.class).get(SampleCriteria.class); - } - - @Override - protected void initView(String params) { - criteria.caze(getCaseRef()); - - if (grid == null) { - grid = new CCESamplesGrid(criteria); - gridLayout = new DetailSubComponentWrapper(() -> null); - gridLayout.addComponent(createFilterBar()); - gridLayout.addComponent(createShipmentFilterBar()); - gridLayout.addComponent(grid); - gridLayout.setMargin(true); - gridLayout.setSpacing(false); - gridLayout.setSizeFull(); - gridLayout.setExpandRatio(grid, 1); - - if (viewConfiguration.isInEagerMode()) { - grid.setEagerDataProvider(); - } - - grid.getDataProvider().addDataProviderListener(e -> updateStatusButtons()); - - setSubComponent(gridLayout); - } - - if (params.startsWith("?")) { - params = params.substring(1); - criteria.fromUrlParams(params); - } - - updateFilterComponents(); - - grid.reload(); - setCaseEditPermission(gridLayout); - } - - public HorizontalLayout createFilterBar() { - HorizontalLayout topLayout = new HorizontalLayout(); - topLayout.setSpacing(true); - topLayout.setSizeUndefined(); - - return topLayout; - } - - public HorizontalLayout createShipmentFilterBar() { - HorizontalLayout shipmentFilterLayout = new HorizontalLayout(); - shipmentFilterLayout.setMargin(false); - shipmentFilterLayout.setSpacing(true); - shipmentFilterLayout.setWidth(100, Unit.PERCENTAGE); - shipmentFilterLayout.addStyleName(CssStyles.VSPACE_3); - - statusButtons = new HashMap<>(); - - HorizontalLayout buttonFilterLayout = new HorizontalLayout(); - buttonFilterLayout.setSpacing(true); - { - Button statusAll = - ButtonHelper.createButton(Captions.all, e -> processStatusChange(null), ValoTheme.BUTTON_BORDERLESS, CssStyles.BUTTON_FILTER); - statusAll.setCaptionAsHtml(true); - - buttonFilterLayout.addComponent(statusAll); - - statusButtons.put(statusAll, I18nProperties.getCaption(Captions.all)); - activeStatusButton = statusAll; - - createAndAddStatusButton(Captions.sampleNotShipped, NOT_SHIPPED, buttonFilterLayout); - createAndAddStatusButton(Captions.sampleShipped, SHIPPED, buttonFilterLayout); - createAndAddStatusButton(Captions.sampleReceived, RECEIVED, buttonFilterLayout); - createAndAddStatusButton(Captions.sampleReferred, REFERRED, buttonFilterLayout); - } - - shipmentFilterLayout.addComponent(buttonFilterLayout); - - HorizontalLayout actionButtonsLayout = new HorizontalLayout(); - actionButtonsLayout.setSpacing(true); - { - // Show active/archived/all dropdown - if (UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW)) { - relevanceStatusFilter = ComboBoxHelper.createComboBoxV7(); - relevanceStatusFilter.setId("relevanceStatusFilter"); - relevanceStatusFilter.setWidth(140, Unit.PERCENTAGE); - relevanceStatusFilter.setNullSelectionAllowed(false); - relevanceStatusFilter.addItems((Object[]) EntityRelevanceStatus.values()); - relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ACTIVE, I18nProperties.getCaption(Captions.sampleActiveSamples)); - relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ARCHIVED, I18nProperties.getCaption(Captions.sampleArchivedSamples)); - relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ALL, I18nProperties.getCaption(Captions.sampleAllSamples)); - relevanceStatusFilter.addValueChangeListener(e -> { - criteria.relevanceStatus((EntityRelevanceStatus) e.getProperty().getValue()); - navigateTo(criteria); - }); - actionButtonsLayout.addComponent(relevanceStatusFilter); - } - - // Bulk operation dropdown - if (UserProvider.getCurrent().hasUserRight(UserRight.PERFORM_BULK_OPERATIONS_CASE_SAMPLES)) { - shipmentFilterLayout.setWidth(100, Unit.PERCENTAGE); - - MenuBar bulkOperationsDropdown = MenuBarHelper.createDropDown( - Captions.bulkActions, - new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.bulkDelete), VaadinIcons.TRASH, selectedItem -> { - ControllerProvider.getSampleController().deleteAllSelectedItems(grid.asMultiSelect().getSelectedItems(), new Runnable() { - - public void run() { - navigateTo(criteria); - } - }); - })); - - bulkOperationsDropdown.setVisible(viewConfiguration.isInEagerMode()); - - actionButtonsLayout.addComponent(bulkOperationsDropdown); - } - - sampleTypeFilter = ComboBoxHelper.createComboBoxV7(); - sampleTypeFilter.setWidth(140, Unit.PERCENTAGE); - sampleTypeFilter.setId("sampleTypeFilter"); - sampleTypeFilter.setNullSelectionAllowed(false); - sampleTypeFilter.addItems((Object[]) SampleAssociationType.values()); - sampleTypeFilter.setItemCaption(SampleAssociationType.ALL, I18nProperties.getEnumCaption(SampleAssociationType.ALL)); - sampleTypeFilter.setItemCaption(SampleAssociationType.CASE, I18nProperties.getEnumCaption(SampleAssociationType.CASE)); - sampleTypeFilter.setItemCaption(SampleAssociationType.CONTACT, I18nProperties.getEnumCaption(SampleAssociationType.CONTACT)); - sampleTypeFilter - .setItemCaption(SampleAssociationType.EVENT_PARTICIPANT, I18nProperties.getEnumCaption(SampleAssociationType.EVENT_PARTICIPANT)); - sampleTypeFilter.addValueChangeListener(e -> { - criteria.sampleAssociationType(((SampleAssociationType) e.getProperty().getValue())); - navigateTo(criteria); - }); - actionButtonsLayout.addComponent(sampleTypeFilter); - } - - final Button newButton = ButtonHelper.createIconButtonWithCaption( - Captions.sampleNewSample, - I18nProperties.getPrefixCaption(SampleDto.I18N_PREFIX, Captions.sampleNewSample), - VaadinIcons.PLUS_CIRCLE, - e -> ControllerProvider.getSampleController().create(criteria.getCaze(), criteria.getDisease(), SormasUI::refreshView), - ValoTheme.BUTTON_PRIMARY); - - actionButtonsLayout.addComponent(newButton); - - shipmentFilterLayout.addComponent(actionButtonsLayout); - shipmentFilterLayout.setComponentAlignment(actionButtonsLayout, Alignment.TOP_RIGHT); - shipmentFilterLayout.setExpandRatio(actionButtonsLayout, 1); - - return shipmentFilterLayout; - } - - private void processStatusChange(String status) { - if (NOT_SHIPPED.equals(status)) { - criteria.shipped(false); - criteria.received(null); - criteria.referred(null); - } else if (SHIPPED.equals(status)) { - criteria.shipped(true); - criteria.received(null); - criteria.referred(null); - } else if (RECEIVED.equals(status)) { - criteria.shipped(null); - criteria.received(true); - criteria.referred(null); - } else if (REFERRED.equals(status)) { - criteria.shipped(null); - criteria.received(null); - criteria.referred(true); - } else { - criteria.shipped(null); - criteria.received(null); - criteria.referred(null); - } - - navigateTo(criteria); - } - - private void createAndAddStatusButton(String captionKey, String status, HorizontalLayout filterLayout) { - Button button = ButtonHelper.createButton( - captionKey, - e -> processStatusChange(status), - ValoTheme.BUTTON_BORDERLESS, - CssStyles.BUTTON_FILTER, - CssStyles.BUTTON_FILTER_LIGHT); - - button.setData(status); - button.setCaptionAsHtml(true); - - filterLayout.addComponent(button); - - statusButtons.put(button, button.getCaption()); - } - - private void updateStatusButtons() { - statusButtons.keySet().forEach(b -> { - CssStyles.style(b, CssStyles.BUTTON_FILTER_LIGHT); - b.setCaption(statusButtons.get(b)); - if ((NOT_SHIPPED.equals(b.getData()) && criteria.getShipped() == Boolean.FALSE) - || (SHIPPED.equals(b.getData()) && criteria.getShipped() == Boolean.TRUE) - || (RECEIVED.equals(b.getData()) && criteria.getReceived() == Boolean.TRUE) - || (REFERRED.equals(b.getData()) && criteria.getReferred() == Boolean.TRUE)) { - activeStatusButton = b; - } - }); - CssStyles.removeStyles(activeStatusButton, CssStyles.BUTTON_FILTER_LIGHT); - if (activeStatusButton != null) { - activeStatusButton - .setCaption(statusButtons.get(activeStatusButton) + LayoutUtil.spanCss(CssStyles.BADGE, String.valueOf(grid.getItemCount()))); - } - } - - public void updateFilterComponents() { - - applyingCriteria = true; - - updateStatusButtons(); - - if (sampleTypeFilter != null) { - sampleTypeFilter.setValue(criteria.getSampleAssociationType()); - } - - if (relevanceStatusFilter != null) { - relevanceStatusFilter.setValue(criteria.getRelevanceStatus()); - } - - applyingCriteria = false; - } -} \ No newline at end of file diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/AbstractContactView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/AbstractContactView.java index f0c17a06b75..ce3634affc2 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/AbstractContactView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/AbstractContactView.java @@ -91,10 +91,6 @@ public void refreshMenu(SubMenu menu, String params) { menu.addView(ContactVisitsView.VIEW_NAME, I18nProperties.getPrefixCaption(ContactDto.I18N_PREFIX, ContactDto.VISITS), params); } - if (UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW)) { - menu.addView(ContactSamplesView.VIEW_NAME, I18nProperties.getCaption(Captions.Contact_samples), params); - } - setMainHeaderComponent(ControllerProvider.getContactController().getContactViewTitleLayout(contact)); if (UserProvider.getCurrent().hasUserRight(UserRight.MANAGE_EXTERNAL_SYMPTOM_JOURNAL)) { diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactController.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactController.java index bd54210b88b..87e4aaac5c5 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactController.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactController.java @@ -112,7 +112,6 @@ public void registerViews(Navigator navigator) { navigator.addView(ContactPersonView.VIEW_NAME, ContactPersonView.class); navigator.addView(ContactVisitsView.VIEW_NAME, ContactVisitsView.class); navigator.addView(ContactEpiDataView.VIEW_NAME, ContactEpiDataView.class); - navigator.addView(ContactSamplesView.VIEW_NAME, ContactSamplesView.class); } public void openLineListingWindow() { diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java index 0f731a33b76..16ffbaa92f7 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataView.java @@ -113,6 +113,7 @@ protected void initView(String params) { CASE_BUTTONS_LOC, EVENTS_LOC, TASKS_LOC, + SAMPLES_LOC, IMMUNIZATION_LOC, VACCINATIONS_LOC, SORMAS_TO_SORMAS_LOC, @@ -211,6 +212,15 @@ protected void initView(String params) { layout.addSidePanelComponent(taskList, TASKS_LOC); } + if (UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW)) { + SampleListComponent sampleList = new SampleListComponent( + new SampleCriteria().contact(getContactRef()).disease(contactDto.getDisease()).sampleAssociationType(SampleAssociationType.CONTACT), + this::showUnsavedChangesPopup); + SampleListComponentLayout sampleListComponentLayout = + new SampleListComponentLayout(sampleList, I18nProperties.getString(Strings.infoCreateNewSampleDiscardsChangesContact)); + layout.addSidePanelComponent(sampleListComponentLayout, SAMPLES_LOC); + } + if (FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.EVENT_SURVEILLANCE) && UserProvider.getCurrent().hasUserRight(UserRight.EVENT_VIEW)) { VerticalLayout eventsLayout = new VerticalLayout(); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactSamplesView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactSamplesView.java deleted file mode 100644 index a23554a2fdd..00000000000 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactSamplesView.java +++ /dev/null @@ -1,275 +0,0 @@ -package de.symeda.sormas.ui.contact; - -import com.vaadin.icons.VaadinIcons; -import com.vaadin.ui.Alignment; -import com.vaadin.ui.Button; -import com.vaadin.ui.HorizontalLayout; -import com.vaadin.ui.MenuBar; -import com.vaadin.ui.themes.ValoTheme; -import com.vaadin.v7.ui.ComboBox; -import de.symeda.sormas.api.EntityRelevanceStatus; -import de.symeda.sormas.api.i18n.Captions; -import de.symeda.sormas.api.i18n.I18nProperties; -import de.symeda.sormas.api.sample.SampleAssociationType; -import de.symeda.sormas.api.sample.SampleCriteria; -import de.symeda.sormas.api.sample.SampleDto; -import de.symeda.sormas.api.user.UserRight; -import de.symeda.sormas.ui.ControllerProvider; -import de.symeda.sormas.ui.SormasUI; -import de.symeda.sormas.ui.UserProvider; -import de.symeda.sormas.ui.ViewModelProviders; -import de.symeda.sormas.ui.caze.CaseSampleView; -import de.symeda.sormas.ui.samples.CCESamplesGrid; -import de.symeda.sormas.ui.samples.SampleCreateForm; -import de.symeda.sormas.ui.utils.*; - -import java.util.HashMap; - -public class ContactSamplesView extends AbstractContactView { - - public static final String VIEW_NAME = ROOT_VIEW_NAME + "/samples"; - private SampleCriteria criteria; - private final ViewConfiguration viewConfiguration; - private HashMap statusButtons; - private Button activeStatusButton; - private ComboBox relevanceStatusFilter; - private ComboBox sampleTypeFilter; - private static final String NOT_SHIPPED = "notShipped"; - private static final String SHIPPED = "shipped"; - private static final String RECEIVED = "received"; - private static final String REFERRED = "referred"; - private CCESamplesGrid grid; - private DetailSubComponentWrapper gridLayout; - - public ContactSamplesView() { - super(VIEW_NAME); - - setSizeFull(); - - viewConfiguration = ViewModelProviders.of(getClass()).get(ViewConfiguration.class); - viewConfiguration.setInEagerMode(true); - criteria = ViewModelProviders.of(CaseSampleView.class).get(SampleCriteria.class); - } - - @Override - protected void initView(String params) { - criteria.contact(getContactRef()); - - if (grid == null) { - grid = new CCESamplesGrid(criteria); - gridLayout = new DetailSubComponentWrapper(() -> null); - gridLayout.addComponent(createFilterBar()); - gridLayout.addComponent(createShipmentFilterBar()); - gridLayout.addComponent(grid); - gridLayout.setMargin(true); - gridLayout.setSpacing(false); - gridLayout.setSizeFull(); - gridLayout.setExpandRatio(grid, 1); - - if (viewConfiguration.isInEagerMode()) { - grid.setEagerDataProvider(); - } - - grid.getDataProvider().addDataProviderListener(e -> updateStatusButtons()); - - setSubComponent(gridLayout); - } - - if (params.startsWith("?")) { - params = params.substring(1); - criteria.fromUrlParams(params); - } - - updateFilterComponents(); - - grid.reload(); - setContactEditPermission(gridLayout); - } - - public HorizontalLayout createFilterBar() { - HorizontalLayout topLayout = new HorizontalLayout(); - topLayout.setSpacing(true); - topLayout.setSizeUndefined(); - - return topLayout; - } - - public HorizontalLayout createShipmentFilterBar() { - HorizontalLayout shipmentFilterLayout = new HorizontalLayout(); - shipmentFilterLayout.setMargin(false); - shipmentFilterLayout.setSpacing(true); - shipmentFilterLayout.setWidth(100, Unit.PERCENTAGE); - shipmentFilterLayout.addStyleName(CssStyles.VSPACE_3); - - statusButtons = new HashMap<>(); - - HorizontalLayout buttonFilterLayout = new HorizontalLayout(); - buttonFilterLayout.setSpacing(true); - { - Button statusAll = - ButtonHelper.createButton(Captions.all, e -> processStatusChange(null), ValoTheme.BUTTON_BORDERLESS, CssStyles.BUTTON_FILTER); - statusAll.setCaptionAsHtml(true); - - buttonFilterLayout.addComponent(statusAll); - - statusButtons.put(statusAll, I18nProperties.getCaption(Captions.all)); - activeStatusButton = statusAll; - - createAndAddStatusButton(Captions.sampleNotShipped, NOT_SHIPPED, buttonFilterLayout); - createAndAddStatusButton(Captions.sampleShipped, SHIPPED, buttonFilterLayout); - createAndAddStatusButton(Captions.sampleReceived, RECEIVED, buttonFilterLayout); - createAndAddStatusButton(Captions.sampleReferred, REFERRED, buttonFilterLayout); - } - - shipmentFilterLayout.addComponent(buttonFilterLayout); - - HorizontalLayout actionButtonsLayout = new HorizontalLayout(); - actionButtonsLayout.setSpacing(true); - { - // Show active/archived/all dropdown - if (UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW)) { - relevanceStatusFilter = ComboBoxHelper.createComboBoxV7(); - relevanceStatusFilter.setId("relevanceStatusFilter"); - relevanceStatusFilter.setWidth(140, Unit.PERCENTAGE); - relevanceStatusFilter.setNullSelectionAllowed(false); - relevanceStatusFilter.addItems((Object[]) EntityRelevanceStatus.values()); - relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ACTIVE, I18nProperties.getCaption(Captions.sampleActiveSamples)); - relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ARCHIVED, I18nProperties.getCaption(Captions.sampleArchivedSamples)); - relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ALL, I18nProperties.getCaption(Captions.sampleAllSamples)); - relevanceStatusFilter.addValueChangeListener(e -> { - criteria.relevanceStatus((EntityRelevanceStatus) e.getProperty().getValue()); - navigateTo(criteria); - }); - actionButtonsLayout.addComponent(relevanceStatusFilter); - } - - // Bulk operation dropdown - if (UserProvider.getCurrent().hasUserRight(UserRight.PERFORM_BULK_OPERATIONS_CASE_SAMPLES)) { - shipmentFilterLayout.setWidth(100, Unit.PERCENTAGE); - - MenuBar bulkOperationsDropdown = MenuBarHelper.createDropDown( - Captions.bulkActions, - new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.bulkDelete), VaadinIcons.TRASH, selectedItem -> { - ControllerProvider.getSampleController().deleteAllSelectedItems(grid.asMultiSelect().getSelectedItems(), new Runnable() { - - public void run() { - navigateTo(criteria); - } - }); - })); - - bulkOperationsDropdown.setVisible(viewConfiguration.isInEagerMode()); - - actionButtonsLayout.addComponent(bulkOperationsDropdown); - } - - sampleTypeFilter = ComboBoxHelper.createComboBoxV7(); - sampleTypeFilter.setWidth(140, Unit.PERCENTAGE); - sampleTypeFilter.setId("sampleTypeFilter"); - sampleTypeFilter.setNullSelectionAllowed(false); - sampleTypeFilter.addItems((Object[]) SampleAssociationType.values()); - sampleTypeFilter.setItemCaption(SampleAssociationType.ALL, I18nProperties.getEnumCaption(SampleAssociationType.ALL)); - sampleTypeFilter.setItemCaption(SampleAssociationType.CASE, I18nProperties.getEnumCaption(SampleAssociationType.CASE)); - sampleTypeFilter.setItemCaption(SampleAssociationType.CONTACT, I18nProperties.getEnumCaption(SampleAssociationType.CONTACT)); - sampleTypeFilter - .setItemCaption(SampleAssociationType.EVENT_PARTICIPANT, I18nProperties.getEnumCaption(SampleAssociationType.EVENT_PARTICIPANT)); - sampleTypeFilter.addValueChangeListener(e -> { - criteria.sampleAssociationType(((SampleAssociationType) e.getProperty().getValue())); - navigateTo(criteria); - }); - actionButtonsLayout.addComponent(sampleTypeFilter); - } - - final Button newButton = ButtonHelper.createIconButtonWithCaption( - Captions.sampleNewSample, - I18nProperties.getPrefixCaption(SampleDto.I18N_PREFIX, Captions.sampleNewSample), - VaadinIcons.PLUS_CIRCLE, - e -> ControllerProvider.getSampleController().create(criteria.getContact(), criteria.getDisease(), SormasUI::refreshView), - ValoTheme.BUTTON_PRIMARY); - - actionButtonsLayout.addComponent(newButton); - - shipmentFilterLayout.addComponent(actionButtonsLayout); - shipmentFilterLayout.setComponentAlignment(actionButtonsLayout, Alignment.TOP_RIGHT); - shipmentFilterLayout.setExpandRatio(actionButtonsLayout, 1); - - return shipmentFilterLayout; - } - - private void processStatusChange(String status) { - if (NOT_SHIPPED.equals(status)) { - criteria.shipped(false); - criteria.received(null); - criteria.referred(null); - } else if (SHIPPED.equals(status)) { - criteria.shipped(true); - criteria.received(null); - criteria.referred(null); - } else if (RECEIVED.equals(status)) { - criteria.shipped(null); - criteria.received(true); - criteria.referred(null); - } else if (REFERRED.equals(status)) { - criteria.shipped(null); - criteria.received(null); - criteria.referred(true); - } else { - criteria.shipped(null); - criteria.received(null); - criteria.referred(null); - } - - navigateTo(criteria); - } - - private void createAndAddStatusButton(String captionKey, String status, HorizontalLayout filterLayout) { - Button button = ButtonHelper.createButton( - captionKey, - e -> processStatusChange(status), - ValoTheme.BUTTON_BORDERLESS, - CssStyles.BUTTON_FILTER, - CssStyles.BUTTON_FILTER_LIGHT); - - button.setData(status); - button.setCaptionAsHtml(true); - - filterLayout.addComponent(button); - - statusButtons.put(button, button.getCaption()); - } - - private void updateStatusButtons() { - statusButtons.keySet().forEach(b -> { - CssStyles.style(b, CssStyles.BUTTON_FILTER_LIGHT); - b.setCaption(statusButtons.get(b)); - if ((NOT_SHIPPED.equals(b.getData()) && criteria.getShipped() == Boolean.FALSE) - || (SHIPPED.equals(b.getData()) && criteria.getShipped() == Boolean.TRUE) - || (RECEIVED.equals(b.getData()) && criteria.getReceived() == Boolean.TRUE) - || (REFERRED.equals(b.getData()) && criteria.getReferred() == Boolean.TRUE)) { - activeStatusButton = b; - } - }); - CssStyles.removeStyles(activeStatusButton, CssStyles.BUTTON_FILTER_LIGHT); - if (activeStatusButton != null) { - activeStatusButton - .setCaption(statusButtons.get(activeStatusButton) + LayoutUtil.spanCss(CssStyles.BADGE, String.valueOf(grid.getItemCount()))); - } - } - - public void updateFilterComponents() { - - applyingCriteria = true; - - updateStatusButtons(); - - if (sampleTypeFilter != null) { - sampleTypeFilter.setValue(criteria.getSampleAssociationType()); - } - - if (relevanceStatusFilter != null) { - relevanceStatusFilter.setValue(criteria.getRelevanceStatus()); - } - - applyingCriteria = false; - } -} \ No newline at end of file diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantDataView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantDataView.java index 27cd67690f4..a9bdda3d886 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantDataView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantDataView.java @@ -134,6 +134,16 @@ protected void initView(String params) { EventDto event = FacadeProvider.getEventFacade().getEventByUuid(eventParticipant.getEvent().getUuid(), false); SampleCriteria sampleCriteria = new SampleCriteria().eventParticipant(eventParticipantRef); + if (UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW)) { + SampleListComponent sampleList = new SampleListComponent( + sampleCriteria.eventParticipant(eventParticipantRef) + .disease(event.getDisease()) + .sampleAssociationType(SampleAssociationType.EVENT_PARTICIPANT), + this::showUnsavedChangesPopup); + SampleListComponentLayout sampleListComponentLayout = + new SampleListComponentLayout(sampleList, I18nProperties.getString(Strings.infoCreateNewSampleDiscardsChangesEventParticipant)); + layout.addSidePanelComponent(sampleListComponentLayout, SAMPLES_LOC); + } if (UserProvider.getCurrent().hasUserRight(UserRight.CONTACT_VIEW)) { VerticalLayout contactsLayout = new VerticalLayout(); @@ -223,9 +233,7 @@ public void refreshMenu(SubMenu menu, String params) { } menu.addView(EventParticipantDataView.VIEW_NAME, I18nProperties.getCaption(EventParticipantDto.I18N_PREFIX), params); - if (UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW)) { - menu.addView(EventSamplesView.VIEW_NAME, I18nProperties.getCaption(Captions.eventEventParticipantsSamples), params); - } + setMainHeaderComponent(ControllerProvider.getEventParticipantController().getEventParticipantViewTitleLayout(eventParticipantDto)); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventSamplesView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventSamplesView.java deleted file mode 100644 index b0dc0abedb3..00000000000 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventSamplesView.java +++ /dev/null @@ -1,349 +0,0 @@ -/* - * SORMAS® - Surveillance Outbreak Response Management & Analysis System - * Copyright © 2016-2021 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package de.symeda.sormas.ui.events; -import com.vaadin.icons.VaadinIcons; -import com.vaadin.navigator.ViewChangeListener; -import com.vaadin.ui.*; - -import com.vaadin.ui.themes.ValoTheme; -import com.vaadin.v7.ui.ComboBox; -import de.symeda.sormas.api.EntityRelevanceStatus; -import de.symeda.sormas.api.FacadeProvider; -import de.symeda.sormas.api.event.EventParticipantDto; -import de.symeda.sormas.api.event.EventParticipantReferenceDto; -import de.symeda.sormas.api.feature.FeatureType; -import de.symeda.sormas.api.i18n.Captions; -import de.symeda.sormas.api.i18n.I18nProperties; -import de.symeda.sormas.api.sample.SampleAssociationType; -import de.symeda.sormas.api.sample.SampleCriteria; -import de.symeda.sormas.api.sample.SampleDto; -import de.symeda.sormas.api.user.UserRight; -import de.symeda.sormas.ui.*; -import de.symeda.sormas.ui.externalmessage.ExternalMessagesView; -import de.symeda.sormas.ui.samples.CCESamplesGrid; -import de.symeda.sormas.ui.samples.SampleCreateForm; -import de.symeda.sormas.ui.utils.*; -import java.util.HashMap; - -public class EventSamplesView extends AbstractDetailView { - - private static final long serialVersionUID = -1L; - - public static final String VIEW_NAME = EventParticipantsView.VIEW_NAME + "/samples"; - - private CommitDiscardWrapperComponent editComponent; - private SampleCriteria criteria; - private final ViewConfiguration viewConfiguration; - private HashMap statusButtons; - private Button activeStatusButton; - private ComboBox relevanceStatusFilter; - private ComboBox sampleTypeFilter; - private static final String NOT_SHIPPED = "notShipped"; - private static final String SHIPPED = "shipped"; - private static final String RECEIVED = "received"; - private static final String REFERRED = "referred"; - private CCESamplesGrid grid; - private DetailSubComponentWrapper gridLayout; - - - public EventSamplesView() { - - super(VIEW_NAME); - - setSizeFull(); - - viewConfiguration = ViewModelProviders.of(getClass()).get(ViewConfiguration.class); - viewConfiguration.setInEagerMode(true); - criteria = ViewModelProviders.of(EventSamplesView.class).get(SampleCriteria.class); - } - - @Override - protected EventParticipantReferenceDto getReferenceByUuid(String uuid) { - final EventParticipantReferenceDto reference; - if (FacadeProvider.getEventParticipantFacade().exists(uuid)) { - reference = FacadeProvider.getEventParticipantFacade().getReferenceByUuid(uuid); - } else { - reference = null; - } - return reference; - } - - @Override - protected String getRootViewName() { - return EventParticipantsView.VIEW_NAME; - } - - @Override - public void enter(ViewChangeListener.ViewChangeEvent event) { - super.enter(event); - initOrRedirect(event); - } - - @Override - protected void initView(String params) { - criteria.eventParticipant(getReference()); - if (grid == null) { - grid = new CCESamplesGrid(criteria); - gridLayout = new DetailSubComponentWrapper(() -> null); - gridLayout.addComponent(createFilterBar()); - gridLayout.addComponent(createShipmentFilterBar()); - gridLayout.addComponent(grid); - gridLayout.setMargin(true); - gridLayout.setSpacing(false); - gridLayout.setSizeFull(); - gridLayout.setExpandRatio(grid, 1); - if (viewConfiguration.isInEagerMode()) { - grid.setEagerDataProvider(); - } - grid.getDataProvider().addDataProviderListener(e -> updateStatusButtons()); - setSubComponent(gridLayout); - } - - if (params.startsWith("?")) { - params = params.substring(1); - criteria.fromUrlParams(params); - } - updateFilterComponents(); - grid.reload(); - } - - @Override - public void refreshMenu(SubMenu menu, String params) { - - if (!findReferenceByParams(params)) { - return; - } - - EventParticipantDto eventParticipantDto = FacadeProvider.getEventParticipantFacade().getEventParticipantByUuid(getReference().getUuid()); - - menu.removeAllViews(); - menu.addView( - EventParticipantsView.VIEW_NAME, - I18nProperties.getCaption(Captions.eventEventParticipants), - eventParticipantDto.getEvent().getUuid(), - true); - - - if (FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.EXTERNAL_MESSAGES) - && UserProvider.getCurrent().hasUserRight(UserRight.EXTERNAL_MESSAGE_VIEW) - && FacadeProvider.getExternalMessageFacade().existsExternalMessageForEntity(getReference())) { - menu.addView(ExternalMessagesView.VIEW_NAME, I18nProperties.getCaption(Captions.externalMessagesList)); - } - - menu.addView(EventParticipantDataView.VIEW_NAME, I18nProperties.getCaption(EventParticipantDto.I18N_PREFIX), params); - - if (UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW)) { - menu.addView(EventSamplesView.VIEW_NAME, I18nProperties.getCaption(Captions.eventEventParticipantsSamples), params); - } - setMainHeaderComponent(ControllerProvider.getEventParticipantController().getEventParticipantViewTitleLayout(eventParticipantDto)); - } - - @Override - protected void setSubComponent(DirtyStateComponent newComponent) { - super.setSubComponent(newComponent); - - EventParticipantDto eventParticipant = FacadeProvider.getEventParticipantFacade().getEventParticipantByUuid(getReference().getUuid()); - if (eventParticipant.isDeleted()) { - newComponent.setEnabled(false); - } - - } - - public HorizontalLayout createFilterBar() { - HorizontalLayout topLayout = new HorizontalLayout(); - topLayout.setSpacing(true); - topLayout.setSizeUndefined(); - - return topLayout; - } - - public HorizontalLayout createShipmentFilterBar() { - HorizontalLayout shipmentFilterLayout = new HorizontalLayout(); - shipmentFilterLayout.setMargin(false); - shipmentFilterLayout.setSpacing(true); - shipmentFilterLayout.setWidth(100, Unit.PERCENTAGE); - shipmentFilterLayout.addStyleName(CssStyles.VSPACE_3); - - statusButtons = new HashMap<>(); - - HorizontalLayout buttonFilterLayout = new HorizontalLayout(); - buttonFilterLayout.setSpacing(true); - { - Button statusAll = - ButtonHelper.createButton(Captions.all, e -> processStatusChange(null), ValoTheme.BUTTON_BORDERLESS, CssStyles.BUTTON_FILTER); - statusAll.setCaptionAsHtml(true); - - buttonFilterLayout.addComponent(statusAll); - - statusButtons.put(statusAll, I18nProperties.getCaption(Captions.all)); - activeStatusButton = statusAll; - - createAndAddStatusButton(Captions.sampleNotShipped, NOT_SHIPPED, buttonFilterLayout); - createAndAddStatusButton(Captions.sampleShipped, SHIPPED, buttonFilterLayout); - createAndAddStatusButton(Captions.sampleReceived, RECEIVED, buttonFilterLayout); - createAndAddStatusButton(Captions.sampleReferred, REFERRED, buttonFilterLayout); - } - - shipmentFilterLayout.addComponent(buttonFilterLayout); - - HorizontalLayout actionButtonsLayout = new HorizontalLayout(); - actionButtonsLayout.setSpacing(true); - { - // Show active/archived/all dropdown - if (UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_VIEW)) { - relevanceStatusFilter = ComboBoxHelper.createComboBoxV7(); - relevanceStatusFilter.setId("relevanceStatusFilter"); - relevanceStatusFilter.setWidth(140, Unit.PERCENTAGE); - relevanceStatusFilter.setNullSelectionAllowed(false); - relevanceStatusFilter.addItems((Object[]) EntityRelevanceStatus.values()); - relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ACTIVE, I18nProperties.getCaption(Captions.sampleActiveSamples)); - relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ARCHIVED, I18nProperties.getCaption(Captions.sampleArchivedSamples)); - relevanceStatusFilter.setItemCaption(EntityRelevanceStatus.ALL, I18nProperties.getCaption(Captions.sampleAllSamples)); - relevanceStatusFilter.addValueChangeListener(e -> { - criteria.relevanceStatus((EntityRelevanceStatus) e.getProperty().getValue()); - navigateTo(criteria); - }); - actionButtonsLayout.addComponent(relevanceStatusFilter); - } - - // Bulk operation dropdown - if (UserProvider.getCurrent().hasUserRight(UserRight.PERFORM_BULK_OPERATIONS_CASE_SAMPLES)) { - shipmentFilterLayout.setWidth(100, Unit.PERCENTAGE); - - MenuBar bulkOperationsDropdown = MenuBarHelper.createDropDown( - Captions.bulkActions, - new MenuBarHelper.MenuBarItem(I18nProperties.getCaption(Captions.bulkDelete), VaadinIcons.TRASH, selectedItem -> { - ControllerProvider.getSampleController().deleteAllSelectedItems(grid.asMultiSelect().getSelectedItems(), new Runnable() { - - public void run() { - navigateTo(criteria); - } - }); - })); - - bulkOperationsDropdown.setVisible(viewConfiguration.isInEagerMode()); - - actionButtonsLayout.addComponent(bulkOperationsDropdown); - } - - sampleTypeFilter = ComboBoxHelper.createComboBoxV7(); - sampleTypeFilter.setWidth(140, Unit.PERCENTAGE); - sampleTypeFilter.setId("sampleTypeFilter"); - sampleTypeFilter.setNullSelectionAllowed(false); - sampleTypeFilter.addItems((Object[]) SampleAssociationType.values()); - sampleTypeFilter.setItemCaption(SampleAssociationType.ALL, I18nProperties.getEnumCaption(SampleAssociationType.ALL)); - sampleTypeFilter.setItemCaption(SampleAssociationType.CASE, I18nProperties.getEnumCaption(SampleAssociationType.CASE)); - sampleTypeFilter.setItemCaption(SampleAssociationType.CONTACT, I18nProperties.getEnumCaption(SampleAssociationType.CONTACT)); - sampleTypeFilter - .setItemCaption(SampleAssociationType.EVENT_PARTICIPANT, I18nProperties.getEnumCaption(SampleAssociationType.EVENT_PARTICIPANT)); - sampleTypeFilter.addValueChangeListener(e -> { - criteria.sampleAssociationType(((SampleAssociationType) e.getProperty().getValue())); - navigateTo(criteria); - }); - actionButtonsLayout.addComponent(sampleTypeFilter); - } - - final Button newButton = ButtonHelper.createIconButtonWithCaption( - Captions.sampleNewSample, - I18nProperties.getPrefixCaption(SampleDto.I18N_PREFIX, Captions.sampleNewSample), - VaadinIcons.PLUS_CIRCLE, - e -> ControllerProvider.getSampleController().create(criteria.getContact(), criteria.getDisease(), SormasUI::refreshView), - ValoTheme.BUTTON_PRIMARY); - - actionButtonsLayout.addComponent(newButton); - - shipmentFilterLayout.addComponent(actionButtonsLayout); - shipmentFilterLayout.setComponentAlignment(actionButtonsLayout, Alignment.TOP_RIGHT); - shipmentFilterLayout.setExpandRatio(actionButtonsLayout, 1); - - return shipmentFilterLayout; - } - - private void processStatusChange(String status) { - if (NOT_SHIPPED.equals(status)) { - criteria.shipped(false); - criteria.received(null); - criteria.referred(null); - } else if (SHIPPED.equals(status)) { - criteria.shipped(true); - criteria.received(null); - criteria.referred(null); - } else if (RECEIVED.equals(status)) { - criteria.shipped(null); - criteria.received(true); - criteria.referred(null); - } else if (REFERRED.equals(status)) { - criteria.shipped(null); - criteria.received(null); - criteria.referred(true); - } else { - criteria.shipped(null); - criteria.received(null); - criteria.referred(null); - } - - navigateTo(criteria); - } - - private void createAndAddStatusButton(String captionKey, String status, HorizontalLayout filterLayout) { - Button button = ButtonHelper.createButton( - captionKey, - e -> processStatusChange(status), - ValoTheme.BUTTON_BORDERLESS, - CssStyles.BUTTON_FILTER, - CssStyles.BUTTON_FILTER_LIGHT); - - button.setData(status); - button.setCaptionAsHtml(true); - - filterLayout.addComponent(button); - - statusButtons.put(button, button.getCaption()); - } - - private void updateStatusButtons() { - statusButtons.keySet().forEach(b -> { - CssStyles.style(b, CssStyles.BUTTON_FILTER_LIGHT); - b.setCaption(statusButtons.get(b)); - if ((NOT_SHIPPED.equals(b.getData()) && criteria.getShipped() == Boolean.FALSE) - || (SHIPPED.equals(b.getData()) && criteria.getShipped() == Boolean.TRUE) - || (RECEIVED.equals(b.getData()) && criteria.getReceived() == Boolean.TRUE) - || (REFERRED.equals(b.getData()) && criteria.getReferred() == Boolean.TRUE)) { - activeStatusButton = b; - } - }); - CssStyles.removeStyles(activeStatusButton, CssStyles.BUTTON_FILTER_LIGHT); - if (activeStatusButton != null) { - activeStatusButton - .setCaption(statusButtons.get(activeStatusButton) + LayoutUtil.spanCss(CssStyles.BADGE, String.valueOf(grid.getItemCount()))); - } - } - - public void updateFilterComponents() { - - applyingCriteria = true; - updateStatusButtons(); - - if (sampleTypeFilter != null) { - sampleTypeFilter.setValue(criteria.getSampleAssociationType()); - } - - if (relevanceStatusFilter != null) { - relevanceStatusFilter.setValue(criteria.getRelevanceStatus()); - } - - applyingCriteria = false; - } -} \ No newline at end of file diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/CCESamplesGrid.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/CCESamplesGrid.java deleted file mode 100644 index 9b2156a8cbc..00000000000 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/CCESamplesGrid.java +++ /dev/null @@ -1,250 +0,0 @@ -/******************************************************************************* - * SORMAS® - Surveillance Outbreak Response Management & Analysis System - * Copyright © 2016-2018 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI) - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - *******************************************************************************/ -package de.symeda.sormas.ui.samples; - -import static java.util.Objects.nonNull; - -import java.util.Date; -import java.util.stream.Collectors; - -import com.vaadin.data.provider.DataProvider; -import com.vaadin.data.provider.DataProviderListener; -import com.vaadin.data.provider.ListDataProvider; -import com.vaadin.shared.data.sort.SortDirection; -import com.vaadin.ui.renderers.DateRenderer; - -import de.symeda.sormas.api.ConfigFacade; -import de.symeda.sormas.api.CountryHelper; -import de.symeda.sormas.api.DiseaseHelper; -import de.symeda.sormas.api.FacadeProvider; -import de.symeda.sormas.api.feature.FeatureType; -import de.symeda.sormas.api.i18n.Captions; -import de.symeda.sormas.api.i18n.I18nProperties; -import de.symeda.sormas.api.sample.PathogenTestType; -import de.symeda.sormas.api.sample.SampleAssociationType; -import de.symeda.sormas.api.sample.SampleCriteria; -import de.symeda.sormas.api.sample.SampleIndexDto; -import de.symeda.sormas.api.sample.SpecimenCondition; -import de.symeda.sormas.api.user.UserRight; -import de.symeda.sormas.api.utils.SortProperty; -import de.symeda.sormas.ui.ControllerProvider; -import de.symeda.sormas.ui.UserProvider; -import de.symeda.sormas.ui.ViewModelProviders; -import de.symeda.sormas.ui.utils.BooleanRenderer; -import de.symeda.sormas.ui.utils.DateFormatHelper; -import de.symeda.sormas.ui.utils.FieldAccessColumnStyleGenerator; -import de.symeda.sormas.ui.utils.FilteredGrid; -import de.symeda.sormas.ui.utils.ShowDetailsListener; -import de.symeda.sormas.ui.utils.UuidRenderer; -import de.symeda.sormas.ui.utils.ViewConfiguration; - -@SuppressWarnings("serial") -public class CCESamplesGrid extends FilteredGrid { - - private static final String PATHOGEN_TEST_RESULT = Captions.Sample_pathogenTestResult; - private static final String DISEASE_SHORT = Captions.columnDiseaseShort; - private static final String LAST_PATHOGEN_TEST = Captions.columnLastPathogenTest; - - private DataProviderListener dataProviderListener; - - @SuppressWarnings("unchecked") - public CCESamplesGrid(SampleCriteria criteria) { - super(SampleIndexDto.class); - setSizeFull(); - - ViewConfiguration viewConfiguration = ViewModelProviders.of(SamplesView.class).get(ViewConfiguration.class); - setInEagerMode(viewConfiguration.isInEagerMode()); - - if (isInEagerMode() && UserProvider.getCurrent().hasUserRight(UserRight.PERFORM_BULK_OPERATIONS_CASE_SAMPLES)) { - setCriteria(criteria); - setEagerDataProvider(); - } else { - setLazyDataProvider(); - setCriteria(criteria); - } - - addEditColumn(e -> ControllerProvider.getSampleController().navigateToData(e.getUuid())); - - Column diseaseShortColumn = - addColumn(sample -> DiseaseHelper.toString(sample.getDisease(), sample.getDiseaseDetails())); - diseaseShortColumn.setId(DISEASE_SHORT); - diseaseShortColumn.setSortProperty(SampleIndexDto.DISEASE); - - Column pathogenTestResultColumn = addColumn(sample -> { - if (sample.getPathogenTestResult() != null) { - return sample.getPathogenTestResult().toString(); - } else if (sample.getSpecimenCondition() == SpecimenCondition.NOT_ADEQUATE) { - return I18nProperties.getCaption(Captions.sampleSpecimenNotAdequate); - } else { - return ""; - } - }); - pathogenTestResultColumn.setId(PATHOGEN_TEST_RESULT); - pathogenTestResultColumn.setSortProperty(SampleIndexDto.PATHOGEN_TEST_RESULT); - - Column lastPathogenTestColumn = addColumn(sample -> { - PathogenTestType type = sample.getTypeOfLastTest(); - Float cqValue = sample.getLastTestCqValue(); - String text = null; - if (type != null) { - text = type.toString(); - if (cqValue != null) { - text += " (" + cqValue + ")"; - } - } - return text; - }); - lastPathogenTestColumn.setId(LAST_PATHOGEN_TEST); - lastPathogenTestColumn.setSortable(false); - - setColumns( - SampleIndexDto.UUID, - SampleIndexDto.SAMPLE_MATERIAL, - PATHOGEN_TEST_RESULT, - SampleIndexDto.RECEIVED, - SampleIndexDto.RECEIVED_DATE, - SampleIndexDto.LAB, - SampleIndexDto.SAMPLE_PURPOSE, - SampleIndexDto.PATHOGEN_TEST_COUNT); - - //((Column) getColumn(SampleIndexDto.SHIPMENT_DATE)).setRenderer(new DateRenderer(DateFormatHelper.getDateFormat())); - ((Column) getColumn(SampleIndexDto.RECEIVED_DATE)).setRenderer(new DateRenderer(DateFormatHelper.getDateFormat())); - //((Column) getColumn(SampleIndexDto.SHIPPED)).setRenderer(new BooleanRenderer()); - ((Column) getColumn(SampleIndexDto.RECEIVED)).setRenderer(new BooleanRenderer()); - ((Column) getColumn(SampleIndexDto.LAB)).setMaximumWidth(200); - //((Column) getColumn(SampleIndexDto.ADDITIONAL_TESTING_STATUS)).setSortable(false); - ((Column) getColumn(SampleIndexDto.PATHOGEN_TEST_COUNT)).setSortable(false); - - ((Column) getColumn(SampleIndexDto.UUID)).setRenderer(new UuidRenderer()); - addItemClickListener( - new ShowDetailsListener<>(SampleIndexDto.UUID, e -> ControllerProvider.getSampleController().navigateToData(e.getUuid()))); - - if (nonNull(UserProvider.getCurrent()) && UserProvider.getCurrent().hasLaboratoryOrExternalLaboratoryJurisdictionLevel()) { - removeColumn(SampleIndexDto.SHIPMENT_DATE); - } else { - removeColumn(SampleIndexDto.RECEIVED_DATE); - } - - if (!UserProvider.getCurrent().hasUserRight(UserRight.CASE_VIEW)) { - removeColumn(SampleIndexDto.ASSOCIATED_CASE); - } - - if (!UserProvider.getCurrent().hasUserRight(UserRight.CONTACT_VIEW)) { - removeColumn(SampleIndexDto.ASSOCIATED_CONTACT); - } - - if (!UserProvider.getCurrent().hasUserRight(UserRight.EVENT_VIEW)) { - removeColumn(SampleIndexDto.ASSOCIATED_EVENT_PARTICIPANT); - } - -// if (!UserProvider.getCurrent().hasUserRight(UserRight.ADDITIONAL_TEST_VIEW) -// || !FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.ADDITIONAL_TESTS)) { -// removeColumn(SampleIndexDto.ADDITIONAL_TESTING_STATUS); -// } - -// if (criteria.getSampleAssociationType() == SampleAssociationType.CASE) { -// if (getColumn(SampleIndexDto.ASSOCIATED_CONTACT) != null) { -// removeColumn(SampleIndexDto.ASSOCIATED_CONTACT); -// } -// if (getColumn(SampleIndexDto.ASSOCIATED_EVENT_PARTICIPANT) != null) { -// removeColumn(SampleIndexDto.ASSOCIATED_EVENT_PARTICIPANT); -// } -// } - -// if (!shouldShowEpidNumber()) { -// removeColumn(SampleIndexDto.EPID_NUMBER); -// } -// -// if (criteria.getSampleAssociationType() == SampleAssociationType.CONTACT) { -// removeColumnIfExists(SampleIndexDto.EPID_NUMBER); -// -// if (getColumn(SampleIndexDto.ASSOCIATED_CASE) != null) { -// removeColumn(SampleIndexDto.ASSOCIATED_CASE); -// } -// if (getColumn(SampleIndexDto.ASSOCIATED_EVENT_PARTICIPANT) != null) { -// removeColumn(SampleIndexDto.ASSOCIATED_EVENT_PARTICIPANT); -// } -// } -// if (criteria.getSampleAssociationType() == SampleAssociationType.EVENT_PARTICIPANT) { -// removeColumnIfExists(SampleIndexDto.EPID_NUMBER); -// if (getColumn(SampleIndexDto.ASSOCIATED_CASE) != null) { -// removeColumn(SampleIndexDto.ASSOCIATED_CASE); -// } -// if (getColumn(SampleIndexDto.ASSOCIATED_CONTACT) != null) { -// removeColumn(SampleIndexDto.ASSOCIATED_CONTACT); -// } -// } - - for (Column column : getColumns()) { - column.setCaption(I18nProperties.getPrefixCaption(SampleIndexDto.I18N_PREFIX, column.getId(), column.getCaption())); - - column.setStyleGenerator(FieldAccessColumnStyleGenerator.getDefault(getBeanType(), column.getId())); - - } - } - - private boolean shouldShowEpidNumber() { - ConfigFacade configFacade = FacadeProvider.getConfigFacade(); - return !configFacade.isConfiguredCountry(CountryHelper.COUNTRY_CODE_GERMANY) - && !configFacade.isConfiguredCountry(CountryHelper.COUNTRY_CODE_SWITZERLAND); - } - - public void reload() { - if (getSelectionModel().isUserSelectionAllowed()) { - deselectAll(); - } - - if (ViewModelProviders.of(SamplesView.class).get(ViewConfiguration.class).isInEagerMode()) { - setEagerDataProvider(); - } - - getDataProvider().refreshAll(); - } - - public void setLazyDataProvider() { - DataProvider dataProvider = DataProvider.fromFilteringCallbacks( - query -> FacadeProvider.getSampleFacade() - .getIndexList( - query.getFilter().orElse(null), - query.getOffset(), - query.getLimit(), - query.getSortOrders() - .stream() - .map(sortOrder -> new SortProperty(sortOrder.getSorted(), sortOrder.getDirection() == SortDirection.ASCENDING)) - .collect(Collectors.toList())) - .stream(), - query -> (int) FacadeProvider.getSampleFacade().count(query.getFilter().orElse(null))); - setDataProvider(dataProvider); - setSelectionMode(SelectionMode.NONE); - } - - public void setEagerDataProvider() { - ListDataProvider dataProvider = - DataProvider.fromStream(FacadeProvider.getSampleFacade().getIndexList(getCriteria(), null, null, null).stream()); - setDataProvider(dataProvider); - setSelectionMode(SelectionMode.MULTI); - - if (dataProviderListener != null) { - dataProvider.addDataProviderListener(dataProviderListener); - } - } - - public void setDataProviderListener(DataProviderListener dataProviderListener) { - this.dataProviderListener = dataProviderListener; - } -} \ No newline at end of file From 931de96f6931b7aa6f3ca6e5e4890bd6a5e65ab2 Mon Sep 17 00:00:00 2001 From: North Date: Tue, 5 Jan 2021 17:53:58 +0000 Subject: [PATCH 02/25] Created the thier transmission classification and their properties --- .../symeda/sormas/api/caze/CaseDataDto.java | 8 +++ .../symeda/sormas/api/contact/ContactDto.java | 13 +++++ .../de/symeda/sormas/backend/caze/Case.java | 53 +++++-------------- .../sormas/backend/contact/Contact.java | 17 ++++++ 4 files changed, 50 insertions(+), 41 deletions(-) diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java index 5d1881b39a6..050ca7e4757 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java @@ -224,6 +224,7 @@ public class CaseDataDto extends SormasToSormasShareableDto { public static final String EXTERNAL_DATA = "externalData"; public static final String DELETION_REASON = "deletionReason"; public static final String OTHER_DELETION_REASON = "otherDeletionReason"; + public static final String CASE_TRANSMISSION_CLASSIFICATION = "caseTransmissionClassification"; // Fields are declared in the order they should appear in the import template @@ -593,6 +594,7 @@ public class CaseDataDto extends SormasToSormasShareableDto { private DeletionReason deletionReason; @Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong) private String otherDeletionReason; + private TransmissionClassification caseTransmissionClassification; public static CaseDataDto build(PersonReferenceDto person, Disease disease) { return build(person, disease, HealthConditionsDto.build()); @@ -1732,5 +1734,11 @@ public String i18nPrefix() { @Override public String toString() { return super.toString() + (StringUtils.isNotBlank(this.getExternalID()) ? " - " + this.getExternalID() : StringUtils.EMPTY); + public TransmissionClassification getCaseTransmissionClassification() { + return caseTransmissionClassification; + } + + public void setCaseTransmissionClassification(TransmissionClassification caseTransmissionClassification) { + this.caseTransmissionClassification = caseTransmissionClassification; } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactDto.java index 80bf33400b4..e5f2c1c29d2 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactDto.java @@ -32,6 +32,7 @@ import de.symeda.sormas.api.clinicalcourse.HealthConditionsDto; import de.symeda.sormas.api.common.DeletionReason; import de.symeda.sormas.api.disease.DiseaseVariant; +import de.symeda.sormas.api.caze.TransmissionClassification; import de.symeda.sormas.api.epidata.EpiDataDto; import de.symeda.sormas.api.event.EventParticipantDto; import de.symeda.sormas.api.feature.FeatureType; @@ -146,6 +147,9 @@ public class ContactDto extends SormasToSormasShareableDto { public static final String QUARANTINE_CHANGE_COMMENT = "quarantineChangeComment"; public static final String DELETION_REASON = "deletionReason"; public static final String OTHER_DELETION_REASON = "otherDeletionReason"; + public static final String ADDITIONAL_DETAILS = "additionalDetails"; + public static final String EPI_DATA = "epiData"; + public static final String CONTACT_TRANSMISSION_CLASSIFICATION = "contactTransmissionClassification"; private CaseReferenceDto caze; @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) @@ -352,6 +356,7 @@ public class ContactDto extends SormasToSormasShareableDto { private DeletionReason deletionReason; @Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong) private String otherDeletionReason; + private TransmissionClassification contactTransmissionClassification; public static ContactDto build() { final ContactDto contact = new ContactDto(); @@ -1041,4 +1046,12 @@ public String getOtherDeletionReason() { public void setOtherDeletionReason(String otherDeletionReason) { this.otherDeletionReason = otherDeletionReason; } +} + public TransmissionClassification getContactTransmissionClassification() { + return contactTransmissionClassification; + } + + public void setContactTransmissionClassification(TransmissionClassification contactTransmissionClassification) { + this.contactTransmissionClassification = contactTransmissionClassification; + } } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java index e406a90b112..587b4302f86 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java @@ -65,6 +65,8 @@ import de.symeda.sormas.api.caze.ReinfectionDetail; import de.symeda.sormas.api.caze.ReinfectionStatus; import de.symeda.sormas.api.caze.ScreeningType; +import de.symeda.sormas.api.caze.ReportingType; +import de.symeda.sormas.api.caze.TransmissionClassification; import de.symeda.sormas.api.caze.Trimester; import de.symeda.sormas.api.caze.VaccinationStatus; import de.symeda.sormas.api.contact.FollowUpStatus; @@ -202,47 +204,7 @@ public class Case extends CoreAdo implements SormasToSormasShareable, HasExterna public static final String POSTPARTUM = "postpartum"; public static final String TRIMESTER = "trimester"; public static final String SAMPLES = "samples"; - public static final String FOLLOW_UP_STATUS = "followUpStatus"; - public static final String FOLLOW_UP_COMMENT = "followUpComment"; - public static final String FOLLOW_UP_UNTIL = "followUpUntil"; - public static final String OVERWRITE_FOLLOW_UP_UNTIL = "overwriteFollowUpUntil"; - public static final String VISITS = "visits"; - public static final String SURVEILLANCE_REPORTS = "surveillanceReports"; - public static final String FACILITY_TYPE = "facilityType"; - public static final String CONTACTS = "contacts"; - public static final String CONVERTED_FROM_CONTACT = "convertedContact"; - public static final String EVENT_PARTICIPANTS = "eventParticipants"; - public static final String SORMAS_TO_SORMAS_ORIGIN_INFO = "sormasToSormasOriginInfo"; - public static final String SORMAS_TO_SORMAS_SHARES = "sormasToSormasShares"; - public static final String EXTERNAL_SHARES = "externalShares"; - - public static final String CASE_ID_ISM = "caseIdIsm"; - public static final String CONTACT_TRACING_FIRST_CONTACT_DATE = "contactTracingFirstContactDate"; - public static final String WAS_IN_QUARANTINE_BEFORE_ISOLATION = "wasInQuarantineBeforeIsolation"; - public static final String QUARANTINE_REASON_BEFORE_ISOLATION = "quarantineReasonBeforeIsolation"; - public static final String QUARANTINE_REASON_BEFORE_ISOLATION_DETAILS = "quarantineReasonBeforeIsolationDetails"; - public static final String END_OF_ISOLATION_REASON = "endOfIsolationReason"; - public static final String END_OF_ISOLATION_REASON_DETAILS = "endOfIsolationReasonDetails"; - - public static final String RE_INFECTION = "reInfection"; - public static final String REINFECTION_STATUS = "reinfectionStatus"; - public static final String REINFECTION_DETAILS = "reinfectionDetails"; - public static final String PREVIOUS_INFECTION_DATE = "previousInfectionDate"; - - public static final String BLOOD_ORGAN_OR_TISSUE_DONATED = "bloodOrganOrTissueDonated"; - public static final String NOT_A_CASE_REASON_NEGATIVE_TEST = "notACaseReasonNegativeTest"; - public static final String NOT_A_CASE_REASON_PHYSICIAN_INFORMATION = "notACaseReasonPhysicianInformation"; - public static final String NOT_A_CASE_REASON_DIFFERENT_PATHOGEN = "notACaseReasonDifferentPathogen"; - public static final String NOT_A_CASE_REASON_OTHER = "notACaseReasonOther"; - public static final String NOT_A_CASE_REASON_DETAILS = "notACaseReasonDetails"; - public static final String FOLLOW_UP_STATUS_CHANGE_DATE = "followUpStatusChangeDate"; - public static final String FOLLOW_UP_STATUS_CHANGE_USER = "followUpStatusChangeUser"; - public static final String DONT_SHARE_WITH_REPORTING_TOOL = "dontShareWithReportingTool"; - public static final String CASE_REFERENCE_DEFINITION = "caseReferenceDefinition"; - public static final String PREVIOUS_QUARANTINE_TO = "previousQuarantineTo"; - public static final String QUARANTINE_CHANGE_COMMENT = "quarantineChangeComment"; - public static final String DUPLICATE_OF = "duplicateOf"; - public static final String CREATION_VERSION = "creationVersion"; + public static final String CASE_TRANSMISSION_CLASSIFICATION = "caseTransmissionClassification"; private Person person; private String description; @@ -430,6 +392,8 @@ public void setPersonId(Long personId) { this.personId = personId; } + private TransmissionClassification caseTransmissionClassification; + @ManyToOne(cascade = {}) @JoinColumn(nullable = false) public Person getPerson() { @@ -1743,5 +1707,12 @@ public Map getExternalData() { public void setExternalData(Map externalData) { this.externalData = externalData; + @Enumerated(EnumType.STRING) + public TransmissionClassification getCaseTransmissionClassification() { + return caseTransmissionClassification; + } + + public void setCaseTransmissionClassification(TransmissionClassification caseTransmissionClassification) { + this.caseTransmissionClassification = caseTransmissionClassification; } } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/Contact.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/Contact.java index 2a63225663a..0c04261b854 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/Contact.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/Contact.java @@ -45,6 +45,7 @@ import de.symeda.auditlog.api.AuditedIgnore; import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.caze.VaccinationStatus; +import de.symeda.sormas.api.caze.TransmissionClassification; import de.symeda.sormas.api.contact.ContactCategory; import de.symeda.sormas.api.contact.ContactClassification; import de.symeda.sormas.api.contact.ContactIdentificationSource; @@ -167,6 +168,9 @@ public class Contact extends CoreAdo implements SormasToSormasShareable, HasExte public static final String VACCINATION_STATUS = "vaccinationStatus"; public static final String VISITS = "visits"; public static final String DUPLICATE_OF = "duplicateOf"; + public static final String ADDITIONAL_DETAILS = "additionalDetails"; + public static final String EPI_DATA = "epiData"; + public static final String CONTACT_TRANSMISSION_CLASSIFICATION = "contactTransmissionClassification"; private Date reportDateTime; private User reportingUser; @@ -291,6 +295,9 @@ public Long getPersonId() { public void setPersonId(Long personId) { this.personId = personId; } + + private TransmissionClassification contactTransmissionClassification; + @ManyToOne(cascade = {}) @JoinColumn(nullable = false) @@ -1081,4 +1088,14 @@ public String getQuarantineChangeComment() { public void setQuarantineChangeComment(String quarantineChangeComment) { this.quarantineChangeComment = quarantineChangeComment; } + @Enumerated(EnumType.STRING) + public TransmissionClassification getContactTransmissionClassification() { + return contactTransmissionClassification; + } + + + public void setContactTransmissionClassification(TransmissionClassification contactTransmissionClassification) { + this.contactTransmissionClassification = contactTransmissionClassification; + } + } From f7f5d98306d5cecc8d42e78b69ff5ec47caafadf Mon Sep 17 00:00:00 2001 From: North Date: Tue, 5 Jan 2021 17:54:31 +0000 Subject: [PATCH 03/25] Created an enum value of transmission classification --- .../api/caze/TransmissionClassification.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/caze/TransmissionClassification.java diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/TransmissionClassification.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/TransmissionClassification.java new file mode 100644 index 00000000000..ca6323553c5 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/TransmissionClassification.java @@ -0,0 +1,14 @@ +package de.symeda.sormas.api.caze; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum TransmissionClassification { + + KNOWN_CLUSTER, + COMMUNITY_TRANSMISSION, + UNKNOWN; + + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} From 66a74e436c64dc1979e7320e69b38d2296a7f612 Mon Sep 17 00:00:00 2001 From: North Date: Tue, 5 Jan 2021 17:55:07 +0000 Subject: [PATCH 04/25] Addded the respective enum values to the enum property file --- sormas-api/src/main/resources/enum.properties | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sormas-api/src/main/resources/enum.properties b/sormas-api/src/main/resources/enum.properties index 3e9b7218d22..fc1ba1ea1b1 100644 --- a/sormas-api/src/main/resources/enum.properties +++ b/sormas-api/src/main/resources/enum.properties @@ -1316,6 +1316,10 @@ TypeOfAnimal.FLEA=Flea TypeOfAnimal.TICK=Tick TypeOfAnimal.OTHER=Other +# Transmission Classification +TransmissionClassification.KNOWN_CLUSTER=Known Cluster +TransmissionClassification.COMMUNITY_TRANSMISSION=Community Transmission +TransmissionClassification.UNKNOWN=Unknown # TypeOfDrug TypeOfDrug.ANTIMICROBIAL = Antimicrobial TypeOfDrug.ANTIVIRAL = Antiviral From 0ac09b1c32a38e2c5f3a62b446e4420631779fdf Mon Sep 17 00:00:00 2001 From: Danie Adjei Date: Thu, 19 Oct 2023 17:16:49 +0000 Subject: [PATCH 05/25] act.java --- sormas-api/src/main/resources/captions.properties | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sormas-api/src/main/resources/captions.properties b/sormas-api/src/main/resources/captions.properties index a534df816cf..7fd0aa45f3c 100644 --- a/sormas-api/src/main/resources/captions.properties +++ b/sormas-api/src/main/resources/captions.properties @@ -453,6 +453,7 @@ CaseData.surveillanceOfficer=Responsible surveillance officer CaseData.symptoms=Symptoms CaseData.therapy=Therapy CaseData.trimester=Trimester +CaseData.caseTransmissionClassification=Transmission Classification CaseData.uuid=Case ID CaseData.visits=Follow-up CaseData.completeness=Completeness @@ -802,6 +803,8 @@ Contact.expectedFollowUpUntil=Expected follow-up until Contact.vaccinationStatus=Vaccination status Contact.changeDate=Date of last change Contact.creationDate=Creation date +Contact.contactTransmissionClassification=Transmission Classification + # ContactExport ContactExport.address=Address ContactExport.addressDistrict=Address District From f227ea0108817ee2b5a90834a811a008d5201cd0 Mon Sep 17 00:00:00 2001 From: North Date: Tue, 5 Jan 2021 17:57:24 +0000 Subject: [PATCH 06/25] Set their properties to be used in the application on each facade --- .../main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java | 2 ++ .../de/symeda/sormas/backend/contact/ContactFacadeEjb.java | 3 +++ 2 files changed, 5 insertions(+) diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java index d8162b6ad51..d5d60103063 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java @@ -2910,6 +2910,8 @@ public static CaseDataDto toCaseDto(Case source) { target.setDeletionReason(source.getDeletionReason()); target.setOtherDeletionReason(source.getOtherDeletionReason()); + target.setCaseTransmissionClassification(source.getCaseTransmissionClassification()); + return target; } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactFacadeEjb.java index d002ea652c8..50958702c6d 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactFacadeEjb.java @@ -63,6 +63,7 @@ import javax.validation.constraints.NotNull; import org.apache.commons.collections.CollectionUtils; +import org.hibernate.annotations.SourceType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -1426,6 +1427,7 @@ public Contact fillOrBuildEntity(@NotNull ContactDto source, Contact target, boo target.setDeleted(source.isDeleted()); target.setDeletionReason(source.getDeletionReason()); target.setOtherDeletionReason(source.getOtherDeletionReason()); + target.setContactTransmissionClassification(source.getContactTransmissionClassification()); return target; } @@ -1725,6 +1727,7 @@ public static ContactDto toContactDto(Contact source) { target.setDeleted(source.isDeleted()); target.setDeletionReason(source.getDeletionReason()); target.setOtherDeletionReason(source.getOtherDeletionReason()); + target.setContactTransmissionClassification(source.getContactTransmissionClassification()); return target; } From 4203bc7ea6b2962936624a7ca57e4a0bed929f63 Mon Sep 17 00:00:00 2001 From: North Date: Tue, 5 Jan 2021 17:59:13 +0000 Subject: [PATCH 07/25] Added the transmission classification on the case and contact form --- .../main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java | 6 +++++- .../java/de/symeda/sormas/ui/contact/ContactDataForm.java | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java index d2c26403db0..c51dd262a3d 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java @@ -117,7 +117,7 @@ public class CaseCreateForm extends AbstractEditForm { private final TravelEntryDto convertedTravelEntry; //@formatter:off - private static final String HTML_LAYOUT = fluidRowLocs(CaseDataDto.CASE_ORIGIN, "") + private static final String HTML_LAYOUT = fluidRowLocs(4, CaseDataDto.CASE_ORIGIN, 8, CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION) + fluidRowLocs(CaseDataDto.REPORT_DATE, CaseDataDto.EPID_NUMBER, CaseDataDto.EXTERNAL_ID) + fluidRow( fluidColumnLoc(6, 0, CaseDataDto.DISEASE), @@ -389,6 +389,10 @@ protected void addFields() { } if (!UserProvider.getCurrent().isPortHealthUser()) { + OptionGroup caseTransmissionClassification = addField(CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION, OptionGroup.class); + caseTransmissionClassification.setRequired(true); + + if (!UserRole.isPortHealthUser(UserProvider.getCurrent().getUserRoles())) { ogCaseOrigin.addValueChangeListener(ev -> { if (ev.getProperty().getValue() == CaseOrigin.IN_COUNTRY) { setVisible(false, CaseDataDto.POINT_OF_ENTRY, CaseDataDto.POINT_OF_ENTRY_DETAILS); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataForm.java index 6aa7072473d..a8334e49d31 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataForm.java @@ -116,6 +116,7 @@ public class ContactDataForm extends AbstractEditForm { //@formatter:off private static final String HTML_LAYOUT = loc(CONTACT_DATA_HEADING_LOC) + + fluidRowLocs(ContactDto.CONTACT_TRANSMISSION_CLASSIFICATION) + fluidRowLocs(ContactDto.CONTACT_CLASSIFICATION, ContactDto.CONTACT_STATUS) + locCss(VSPACE_3, TO_CASE_BTN_LOC) + fluidRowLocs(ContactDto.MULTI_DAY_CONTACT) + @@ -226,6 +227,7 @@ protected void addFields() { followUpStausHeadingLabel.addStyleName(H3); getContent().addComponent(followUpStausHeadingLabel, FOLLOW_UP_STATUS_HEADING_LOC); + addField(ContactDto.CONTACT_TRANSMISSION_CLASSIFICATION, OptionGroup.class); addField(ContactDto.CONTACT_CLASSIFICATION, NullableOptionGroup.class); addField(ContactDto.CONTACT_STATUS, NullableOptionGroup.class); addField(ContactDto.UUID, TextField.class); From 0cb4d7063a4962a35dbefa4803be4e8b498ba12f Mon Sep 17 00:00:00 2001 From: North Date: Tue, 5 Jan 2021 18:00:58 +0000 Subject: [PATCH 08/25] Added the position of the option group which hold the transmission classification to the form --- .../main/java/de/symeda/sormas/ui/caze/CaseDataForm.java | 6 +++++- .../java/de/symeda/sormas/ui/contact/ContactCreateForm.java | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java index c01da75d4e5..0551ea6a352 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java @@ -220,7 +220,10 @@ public class CaseDataForm extends AbstractEditForm { fluidRowLocs(9, CaseDataDto.OUTCOME, 3, CaseDataDto.OUTCOME_DATE) + fluidRowLocs(3, CaseDataDto.SEQUELAE, 9, CaseDataDto.SEQUELAE_DETAILS) + fluidRowLocs(CaseDataDto.CASE_IDENTIFICATION_SOURCE, CaseDataDto.SCREENING_TYPE) + - fluidRowLocs(CaseDataDto.CASE_ORIGIN, "") + + fluidRowLocs(CaseDataDto.REPORTING_TYPE, + "") + + + fluidRowLocs(4, CaseDataDto.CASE_ORIGIN, 8, CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION) + fluidRowLocs(RESPONSIBLE_JURISDICTION_HEADING_LOC) + fluidRowLocs(CaseDataDto.RESPONSIBLE_REGION, CaseDataDto.RESPONSIBLE_DISTRICT, CaseDataDto.RESPONSIBLE_COMMUNITY) + fluidRowLocs(CaseDataDto.DONT_SHARE_WITH_REPORTING_TOOL) + @@ -453,6 +456,7 @@ protected void addFields() { addField(CaseDataDto.RABIES_TYPE, NullableOptionGroup.class); addField(CaseDataDto.CASE_ORIGIN, TextField.class); + addField(CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION, OptionGroup.class); quarantine = addField(CaseDataDto.QUARANTINE); quarantine.addValueChangeListener(e -> onValueChange()); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactCreateForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactCreateForm.java index ca6d6de1ba4..5acbf51e18c 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactCreateForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactCreateForm.java @@ -72,6 +72,7 @@ public class ContactCreateForm extends AbstractEditForm { //@formatter:off private static final String HTML_LAYOUT = LayoutUtil.loc(PERSON_NAME_LOC) + + LayoutUtil.fluidRowLocs(ContactDto.CONTACT_TRANSMISSION_CLASSIFICATION) + LayoutUtil.fluidRowLocs(ContactDto.PERSON) + LayoutUtil.fluidRowLocs(ContactDto.RETURNING_TRAVELER) + LayoutUtil.fluidRowLocs(ContactDto.REPORT_DATE_TIME, ContactDto.DISEASE) + @@ -136,6 +137,7 @@ protected void addFields() { reportDate = addField(ContactDto.REPORT_DATE_TIME, DateField.class); ComboBox cbDisease = addDiseaseField(ContactDto.DISEASE, false, true); addField(ContactDto.DISEASE_DETAILS, TextField.class); + addField(ContactDto.CONTACT_TRANSMISSION_CLASSIFICATION, OptionGroup.class); personCreateForm = new PersonCreateForm(false, false, false, showPersonSearchButton); personCreateForm.setWidth(100, Unit.PERCENTAGE); @@ -192,7 +194,7 @@ protected void addFields() { districtDto != null ? FacadeProvider.getCommunityFacade().getAllActiveByDistrict(districtDto.getUuid()) : null); }); - setRequired(true, ContactDto.REPORT_DATE_TIME); + setRequired(true, PersonDto.FIRST_NAME, PersonDto.LAST_NAME, ContactDto.REPORT_DATE_TIME, ContactDto.CONTACT_TRANSMISSION_CLASSIFICATION); FieldHelper.setVisibleWhen( getFieldGroup(), ContactDto.RELATION_DESCRIPTION, From ded77597aae4fcb9fa8c502b1d7565cebe909643 Mon Sep 17 00:00:00 2001 From: Danie Adjei Date: Thu, 19 Oct 2023 17:40:49 +0000 Subject: [PATCH 09/25] Set their properties to be used in the application on each facade # Conflicts: # sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java # sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactFacadeEjb.java --- .../de/symeda/sormas/app/backend/caze/Case.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/Case.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/Case.java index cf6e2c463f6..2cfe45219b4 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/Case.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/Case.java @@ -47,6 +47,8 @@ import de.symeda.sormas.api.caze.QuarantineReason; import de.symeda.sormas.api.caze.RabiesType; import de.symeda.sormas.api.caze.ScreeningType; +import de.symeda.sormas.api.caze.ReportingType; +import de.symeda.sormas.api.caze.TransmissionClassification; import de.symeda.sormas.api.caze.Trimester; import de.symeda.sormas.api.caze.VaccinationStatus; import de.symeda.sormas.api.contact.QuarantineType; @@ -103,6 +105,7 @@ public class Case extends PseudonymizableAdo { public static final String COMPLETENESS = "completeness"; public static final String VACCINATION_STATUS = "vaccinationStatus"; public static final String HEALTH_CONDITIONS = "healthConditions"; + public static final String CONTACT_TRANSMISSION_CLASSIFICATION = "caseTransmissionClassification"; @DatabaseField(foreign = true, foreignAutoRefresh = true, canBeNull = false, maxForeignAutoRefreshLevel = 3) private Person person; @@ -396,6 +399,9 @@ public class Case extends PseudonymizableAdo { private Date followUpStatusChangeDate; @DatabaseField(foreign = true, foreignAutoRefresh = true) private User followUpStatusChangeUser; + @Enumerated(EnumType.STRING) + private TransmissionClassification caseTransmissionClassification; + public boolean isUnreferredPortHealthCase() { return caseOrigin == CaseOrigin.POINT_OF_ENTRY && healthFacility == null; @@ -1346,4 +1352,11 @@ public User getFollowUpStatusChangeUser() { public void setFollowUpStatusChangeUser(User followUpStatusChangeUser) { this.followUpStatusChangeUser = followUpStatusChangeUser; } + public TransmissionClassification getCaseTransmissionClassification() { + return caseTransmissionClassification; + } + + public void setCaseTransmissionClassification(TransmissionClassification caseTransmissionClassification) { + this.caseTransmissionClassification = caseTransmissionClassification; + } } From 79652578a615d189430c4ed293031a910c2ec254 Mon Sep 17 00:00:00 2001 From: North Date: Mon, 11 Jan 2021 09:20:23 +0000 Subject: [PATCH 10/25] Set the transmission classification value on the case --- .../app/src/main/res/layout/fragment_case_read_layout.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sormas-app/app/src/main/res/layout/fragment_case_read_layout.xml b/sormas-app/app/src/main/res/layout/fragment_case_read_layout.xml index ee41f881160..e02626aef31 100644 --- a/sormas-app/app/src/main/res/layout/fragment_case_read_layout.xml +++ b/sormas-app/app/src/main/res/layout/fragment_case_read_layout.xml @@ -42,6 +42,7 @@ + + Date: Mon, 11 Jan 2021 09:21:08 +0000 Subject: [PATCH 11/25] Added the field for the transmission classification on the new case form --- .../app/src/main/res/layout/fragment_case_edit_layout.xml | 7 +++++++ .../app/src/main/res/layout/fragment_case_new_layout.xml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/sormas-app/app/src/main/res/layout/fragment_case_edit_layout.xml b/sormas-app/app/src/main/res/layout/fragment_case_edit_layout.xml index 2941ecb8f8d..31393fcbd3a 100644 --- a/sormas-app/app/src/main/res/layout/fragment_case_edit_layout.xml +++ b/sormas-app/app/src/main/res/layout/fragment_case_edit_layout.xml @@ -52,6 +52,7 @@ + + + + @@ -58,6 +59,12 @@ app:required="true" app:value="@={data.caseOrigin}" /> + + Date: Mon, 11 Jan 2021 09:22:05 +0000 Subject: [PATCH 12/25] Added the transmission classification to the content --- .../java/de/symeda/sormas/app/caze/read/CaseReadFragment.java | 1 + 1 file changed, 1 insertion(+) diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadFragment.java index b03f138f27d..d90a147fd9b 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadFragment.java @@ -194,6 +194,7 @@ public void onLayoutBinding(FragmentCaseReadLayoutBinding contentBinding) { } else if (record.getLaboratoryDiagnosticConfirmation() == YesNoUnknown.YES) { contentBinding.setSingleClassification(CaseConfirmationBasis.LABORATORY_DIAGNOSTIC_CONFIRMATION); } +// contentBinding.setCaseTransmissionClassificationClass(record.getCaseTransmissionClassification().toString()); } @Override From 665b608c535e43702f3e4eb48c27342bcc1f5b05 Mon Sep 17 00:00:00 2001 From: North Date: Mon, 11 Jan 2021 09:22:54 +0000 Subject: [PATCH 13/25] Created list variable to be used on the edit and new case being created --- .../de/symeda/sormas/app/caze/edit/CaseEditFragment.java | 6 ++++++ .../de/symeda/sormas/app/caze/edit/CaseNewFragment.java | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditFragment.java index fdb14b43681..79dff87ae0a 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditFragment.java @@ -45,6 +45,8 @@ import de.symeda.sormas.api.caze.QuarantineReason; import de.symeda.sormas.api.caze.RabiesType; import de.symeda.sormas.api.caze.ScreeningType; +import de.symeda.sormas.api.caze.ReportingType; +import de.symeda.sormas.api.caze.TransmissionClassification; import de.symeda.sormas.api.caze.Trimester; import de.symeda.sormas.api.caze.VaccinationStatus; import de.symeda.sormas.api.contact.QuarantineType; @@ -117,6 +119,8 @@ public class CaseEditFragment extends BaseEditFragment caseConfirmationBasisList; private boolean differentPlaceOfStayJurisdiction; + private List reportingTypeList; + private List caseTransmissionClassificationsList; // Static methods @@ -365,6 +369,7 @@ record = getActivityRootData(); initialDistricts = InfrastructureDaoHelper.loadDistricts(record.getRegion()); initialCommunities = InfrastructureDaoHelper.loadCommunities(record.getDistrict()); initialFacilities = InfrastructureDaoHelper.loadFacilities(record.getDistrict(), record.getCommunity(), record.getFacilityType()); + caseTransmissionClassificationsList = DataUtils.getEnumItems(TransmissionClassification.class, true); facilityOrHomeList = DataUtils.toItems(TypeOfPlace.FOR_CASES, true); facilityTypeGroupList = DataUtils.toItems(FacilityTypeGroup.getAccomodationGroups(), true); @@ -415,6 +420,7 @@ public void onLayoutBinding(FragmentCaseEditLayoutBinding contentBinding) { } FragmentActivity thisActivity = this.getActivity(); + contentBinding.caseDataCaseTransmissionClassification.initializeSpinner(caseTransmissionClassificationsList); contentBinding.caseDataDisease.addValueChangedListener(new ValueChangeListener() { Disease currentDisease = record.getDisease(); diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseNewFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseNewFragment.java index 98769942a49..c181d557bfa 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseNewFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseNewFragment.java @@ -33,6 +33,7 @@ import de.symeda.sormas.api.event.TypeOfPlace; import de.symeda.sormas.api.infrastructure.facility.FacilityType; import de.symeda.sormas.api.infrastructure.facility.FacilityTypeGroup; +import de.symeda.sormas.api.caze.TransmissionClassification; import de.symeda.sormas.api.person.PresentCondition; import de.symeda.sormas.api.person.Sex; import de.symeda.sormas.api.user.JurisdictionLevel; @@ -79,6 +80,7 @@ public class CaseNewFragment extends BaseEditFragment initialPointsOfEntry; private List facilityOrHomeList; private List facilityTypeGroupList; + private List caseTransmissionClassificationsList; public static CaseNewFragment newInstance(Case activityRootData) { return newInstance(CaseNewFragment.class, CaseNewActivity.buildBundle().get(), activityRootData); @@ -123,6 +125,7 @@ record = getActivityRootData(); sexList = DataUtils.getEnumItems(Sex.class, true); presentConditionList = DataUtils.getEnumItems(PresentCondition.class, true); + caseTransmissionClassificationsList = DataUtils.getEnumItems(TransmissionClassification.class, true); initialResponsibleDistricts = InfrastructureDaoHelper.loadDistricts(record.getResponsibleRegion()); initialResponsibleCommunities = InfrastructureDaoHelper.loadCommunities(record.getResponsibleDistrict()); @@ -174,6 +177,7 @@ public void onLayoutBinding(FragmentCaseNewLayoutBinding contentBinding) { null, () -> Boolean.TRUE.equals(contentBinding.caseDataDifferentPlaceOfStayJurisdiction.getValue())); + contentBinding.caseDataCaseTransmissionClassification.initializeSpinner(caseTransmissionClassificationsList); InfrastructureFieldsDependencyHandler.instance.initializeFacilityFields( record, contentBinding.caseDataRegion, From 85ff8542cbafdf526c8e4b15f88abbd20d5bd86c Mon Sep 17 00:00:00 2001 From: North Date: Mon, 11 Jan 2021 09:23:40 +0000 Subject: [PATCH 14/25] Added the transmission classification properties to be populated to the user --- .../java/de/symeda/sormas/app/backend/caze/CaseDtoHelper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/CaseDtoHelper.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/CaseDtoHelper.java index a80737c6420..3e22ed3a8db 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/CaseDtoHelper.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/CaseDtoHelper.java @@ -234,6 +234,7 @@ public void fillInnerFromDto(Case target, CaseDataDto source) { target.setNotACaseReasonDetails(source.getNotACaseReasonDetails()); target.setFollowUpStatusChangeDate(source.getFollowUpStatusChangeDate()); target.setFollowUpStatusChangeUser(DatabaseHelper.getUserDao().getByReferenceDto(source.getFollowUpStatusChangeUser())); + target.setCaseTransmissionClassification(source.getCaseTransmissionClassification()); } @Override @@ -495,6 +496,7 @@ public void fillInnerFromAdo(CaseDataDto target, Case source) { @Override protected long getApproximateJsonSizeInBytes() { return CaseDataDto.APPROXIMATE_JSON_SIZE_IN_BYTES; + target.setCaseTransmissionClassification(source.getCaseTransmissionClassification()); } public static CaseReferenceDto toReferenceDto(Case ado) { From 108de588dec6c252820f43f46e8aa568a59ab33a Mon Sep 17 00:00:00 2001 From: NORTH Date: Fri, 19 Mar 2021 10:56:58 +0000 Subject: [PATCH 15/25] Updated the database helper to alter the case and contact table for the transmission classification --- .../sormas/app/backend/common/DatabaseHelper.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/common/DatabaseHelper.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/common/DatabaseHelper.java index c8b5c9a4291..086f7b8c9c3 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/common/DatabaseHelper.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/common/DatabaseHelper.java @@ -2993,7 +2993,15 @@ public void onUpgrade(SQLiteDatabase db, ConnectionSource connectionSource, int getDao(DiseaseConfiguration.class).executeRaw("ALTER TABLE diseaseConfiguration ADD COLUMN ageGroupsString text;"); getDao(DiseaseConfiguration.class).executeRaw("UPDATE diseaseConfiguration SET changeDate = 0;"); - // ATTENTION: break should only be done after last version + case 216: + currentVersion = 216; + getDao(Case.class).executeRaw("ALTER TABLE cases ADD COLUMN caseTransmissionClassification varchar(512);"); + + case 217: + currentVersion = 217; + getDao(Contact.class).executeRaw("ALTER TABLE contacts ADD COLUMN contactTransmissionClassification varchar(512);"); + + // ATTENTION: break should only be done after last version break; default: From cd7ff347c9b843b25b1e6bf85222cd01992563b3 Mon Sep 17 00:00:00 2001 From: NORTH Date: Fri, 19 Mar 2021 10:57:40 +0000 Subject: [PATCH 16/25] Rename the conatct to case, since we in the case file --- .../src/main/java/de/symeda/sormas/app/backend/caze/Case.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/Case.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/Case.java index 2cfe45219b4..218460e7133 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/Case.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/Case.java @@ -105,7 +105,8 @@ public class Case extends PseudonymizableAdo { public static final String COMPLETENESS = "completeness"; public static final String VACCINATION_STATUS = "vaccinationStatus"; public static final String HEALTH_CONDITIONS = "healthConditions"; - public static final String CONTACT_TRANSMISSION_CLASSIFICATION = "caseTransmissionClassification"; + // public static final String CONTACT_TRANSMISSION_CLASSIFICATION = "caseTransmissionClassification"; + public static final String CASE_TRANSMISSION_CLASSIFICATION = "caseTransmissionClassification"; @DatabaseField(foreign = true, foreignAutoRefresh = true, canBeNull = false, maxForeignAutoRefreshLevel = 3) private Person person; From 210441b81ed62da72ab1bcb45a20ba0248faeabc Mon Sep 17 00:00:00 2001 From: NORTH Date: Fri, 19 Mar 2021 10:58:52 +0000 Subject: [PATCH 17/25] Created the appropraite variable and it properties for the contact transmission classification --- .../symeda/sormas/app/backend/contact/Contact.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/contact/Contact.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/contact/Contact.java index 60f121b0e30..53e2cfa487f 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/contact/Contact.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/contact/Contact.java @@ -31,6 +31,7 @@ import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.caze.VaccinationStatus; +import de.symeda.sormas.api.caze.TransmissionClassification; import de.symeda.sormas.api.contact.ContactCategory; import de.symeda.sormas.api.contact.ContactClassification; import de.symeda.sormas.api.contact.ContactIdentificationSource; @@ -91,6 +92,7 @@ public class Contact extends PseudonymizableAdo { public static final String EPI_DATA = "epiData"; public static final String HEALTH_CONDITIONS = "healthConditions"; public static final String VACCINATION_STATUS = "vaccinationStatus"; + public static final String CONTACT_TRANSMISSION_CLASSIFICATION = "contactTransmissionClassification"; @DatabaseField(dataType = DataType.DATE_LONG, canBeNull = true) private Date reportDateTime; @@ -224,6 +226,10 @@ public class Contact extends PseudonymizableAdo { private Date quarantineOfficialOrderSentDate; @Column(length = CHARACTER_LIMIT_BIG) private String additionalDetails; + @Column(length = COLUMN_LENGTH_DEFAULT) + @Enumerated(EnumType.STRING) + private TransmissionClassification contactTransmissionClassification; + @DatabaseField(foreign = true, foreignAutoRefresh = true) private EpiData epiData; @@ -882,5 +888,11 @@ public VaccinationStatus getVaccinationStatus() { public void setVaccinationStatus(VaccinationStatus vaccinationStatus) { this.vaccinationStatus = vaccinationStatus; + public TransmissionClassification getContactTransmissionClassification() { + return contactTransmissionClassification; + } + + public void setContactTransmissionClassification(TransmissionClassification contactTransmissionClassification) { + this.contactTransmissionClassification = contactTransmissionClassification; } } From 32931a775de362556a1fc4a4a2fdd24604e09a30 Mon Sep 17 00:00:00 2001 From: NORTH Date: Fri, 19 Mar 2021 11:00:20 +0000 Subject: [PATCH 18/25] Set the transmission classification values on the contact properties --- .../de/symeda/sormas/app/backend/contact/ContactDtoHelper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/contact/ContactDtoHelper.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/contact/ContactDtoHelper.java index b26d630e823..bb1732c4e4e 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/contact/ContactDtoHelper.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/contact/ContactDtoHelper.java @@ -171,6 +171,7 @@ public void fillInnerFromDto(Contact target, ContactDto source) { target.setFollowUpStatusChangeDate(source.getFollowUpStatusChangeDate()); target.setFollowUpStatusChangeUser(DatabaseHelper.getUserDao().getByReferenceDto(source.getFollowUpStatusChangeUser())); target.setVaccinationStatus(source.getVaccinationStatus()); + target.setContactTransmissionClassification(source.getContactTransmissionClassification()); } @Override @@ -325,6 +326,7 @@ public void fillInnerFromAdo(ContactDto target, Contact source) { @Override protected long getApproximateJsonSizeInBytes() { return ContactDto.APPROXIMATE_JSON_SIZE_IN_BYTES; + target.setContactTransmissionClassification(source.getContactTransmissionClassification()); } public static ContactReferenceDto toReferenceDto(Contact ado) { From ba3462491f9e752d9cc8df1ff49e9525eeb4e174 Mon Sep 17 00:00:00 2001 From: NORTH Date: Fri, 19 Mar 2021 11:01:27 +0000 Subject: [PATCH 19/25] Added the contact items and properties to be bound and used from the XML --- .../symeda/sormas/app/contact/edit/ContactEditFragment.java | 5 +++++ .../symeda/sormas/app/contact/edit/ContactNewFragment.java | 4 ++++ .../symeda/sormas/app/contact/read/ContactReadFragment.java | 2 ++ 3 files changed, 11 insertions(+) diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/contact/edit/ContactEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/contact/edit/ContactEditFragment.java index 946c8081f7a..bd0ebf1aed4 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/contact/edit/ContactEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/contact/edit/ContactEditFragment.java @@ -25,6 +25,7 @@ import de.symeda.sormas.api.CountryHelper; import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.caze.VaccinationStatus; +import de.symeda.sormas.api.caze.TransmissionClassification; import de.symeda.sormas.api.contact.ContactCategory; import de.symeda.sormas.api.contact.ContactClassification; import de.symeda.sormas.api.contact.ContactDto; @@ -75,6 +76,7 @@ public class ContactEditFragment extends BaseEditFragment contactIdentificationSources; private List tracingApps; private List endOfQuarantineReasons; + private List contactTransmissionClassificationsList; // Instance methods @@ -180,6 +182,8 @@ record = getActivityRootData(); if (record.getQuarantineTo() == null) { record.setQuarantineTo(record.getFollowUpUntil()); } + contactTransmissionClassificationsList = DataUtils.getEnumItems(TransmissionClassification.class, true); + } @Override @@ -351,6 +355,7 @@ private void reduceQuarantine() { contentBinding.contactRegion.setRequired(true); contentBinding.contactDistrict.setRequired(true); } + contentBinding.contactContactTransmissionClassification.initializeSpinner(contactTransmissionClassificationsList); ContactValidator.initializeLastContactDateValidation(record, contentBinding); ContactValidator.initializeProhibitionToWorkIntervalValidator(contentBinding); diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/contact/edit/ContactNewFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/contact/edit/ContactNewFragment.java index 333343e256e..a11b514bda6 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/contact/edit/ContactNewFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/contact/edit/ContactNewFragment.java @@ -25,6 +25,7 @@ import de.symeda.sormas.api.CountryHelper; import de.symeda.sormas.api.Disease; +import de.symeda.sormas.api.caze.TransmissionClassification; import de.symeda.sormas.api.contact.ContactCategory; import de.symeda.sormas.api.contact.ContactProximity; import de.symeda.sormas.api.contact.ContactRelation; @@ -60,6 +61,7 @@ public class ContactNewFragment extends BaseEditFragment diseaseList; private List sexList; private List categoryList; + private List contactTransmissionClassificationsList; public static ContactNewFragment newInstance(Contact activityRootData) { return newInstance(ContactNewFragment.class, null, activityRootData); @@ -88,6 +90,7 @@ record = getActivityRootData(); diseaseList = DataUtils.toItems(DiseaseConfigurationCache.getInstance().getAllDiseases(true, true, true)); sexList = DataUtils.getEnumItems(Sex.class, true); categoryList = DataUtils.getEnumItems(ContactCategory.class, true); + contactTransmissionClassificationsList = DataUtils.getEnumItems(TransmissionClassification.class, true); } @Override @@ -150,6 +153,7 @@ public void onLayoutBinding(FragmentContactNewLayoutBinding contentBinding) { contentBinding.contactContactProximityDetails.setVisibility(GONE); contentBinding.contactContactCategory.setVisibility(GONE); } + contentBinding.contactContactTransmissionClassification.initializeSpinner(contactTransmissionClassificationsList); ContactValidator.initializeLastContactDateValidation(record, contentBinding); } diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/contact/read/ContactReadFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/contact/read/ContactReadFragment.java index 06f8a90471f..25dce424ba1 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/contact/read/ContactReadFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/contact/read/ContactReadFragment.java @@ -104,6 +104,8 @@ public void onLayoutBinding(FragmentContactReadLayoutBinding contentBinding) { contentBinding.setData(record); contentBinding.setCaze(sourceCase); + contentBinding.setContactTransmissionClassificationClass(record.getContactTransmissionClassification()); + } @Override From 4f34406a9ed4ef9fe46f595a06217d3866dc715d Mon Sep 17 00:00:00 2001 From: NORTH Date: Fri, 19 Mar 2021 11:02:07 +0000 Subject: [PATCH 20/25] Removed the toString() --- .../java/de/symeda/sormas/app/caze/read/CaseReadFragment.java | 1 + 1 file changed, 1 insertion(+) diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadFragment.java index d90a147fd9b..0224d571b3a 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadFragment.java @@ -195,6 +195,7 @@ public void onLayoutBinding(FragmentCaseReadLayoutBinding contentBinding) { contentBinding.setSingleClassification(CaseConfirmationBasis.LABORATORY_DIAGNOSTIC_CONFIRMATION); } // contentBinding.setCaseTransmissionClassificationClass(record.getCaseTransmissionClassification().toString()); + contentBinding.setCaseTransmissionClassificationClass(record.getCaseTransmissionClassification()); } @Override From 3e129d00fea6f36af4beee83725be0a4ddd4f400 Mon Sep 17 00:00:00 2001 From: NORTH Date: Fri, 19 Mar 2021 11:02:46 +0000 Subject: [PATCH 21/25] Added the layout properties to the contact file, create, read and edit --- .../layout/fragment_contact_edit_layout.xml | 7 +++++++ .../layout/fragment_contact_new_layout.xml | 7 +++++++ .../layout/fragment_contact_read_layout.xml | 20 +++++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/sormas-app/app/src/main/res/layout/fragment_contact_edit_layout.xml b/sormas-app/app/src/main/res/layout/fragment_contact_edit_layout.xml index 8bbeef7bede..ea3bdd8aa01 100644 --- a/sormas-app/app/src/main/res/layout/fragment_contact_edit_layout.xml +++ b/sormas-app/app/src/main/res/layout/fragment_contact_edit_layout.xml @@ -39,6 +39,8 @@ + + + + + + + + + + + + + + + Date: Mon, 23 Oct 2023 10:26:07 +0000 Subject: [PATCH 22/25] cherrypicked the case_transmission_files and resolved conflicts --- .../symeda/sormas/api/caze/CaseDataDto.java | 5 +- .../symeda/sormas/api/contact/ContactDto.java | 4 +- .../de/symeda/sormas/backend/caze/Case.java | 114 +++++++++-- .../sormas/backend/contact/Contact.java | 4 +- .../src/main/resources/sql/sormas_schema.sql | 6 + .../symeda/sormas/ui/caze/CaseCreateForm.java | 179 +++++++++--------- .../symeda/sormas/ui/caze/CaseDataForm.java | 3 - .../sormas/ui/contact/ContactCreateForm.java | 7 +- .../sormas/ui/contact/ContactDataForm.java | 8 +- 9 files changed, 206 insertions(+), 124 deletions(-) diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java index 050ca7e4757..87ad6891ba2 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java @@ -623,7 +623,7 @@ public static CaseDataDto build(PersonReferenceDto person, Disease disease, Heal } /** - * + * * @param contact * leads to the returned case * @return dto that contains the contacts information. If the contact has one exposure, this marked as the probable infection @@ -1734,7 +1734,8 @@ public String i18nPrefix() { @Override public String toString() { return super.toString() + (StringUtils.isNotBlank(this.getExternalID()) ? " - " + this.getExternalID() : StringUtils.EMPTY); - public TransmissionClassification getCaseTransmissionClassification() { + } + public TransmissionClassification getCaseTransmissionClassification() { return caseTransmissionClassification; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactDto.java index e5f2c1c29d2..aad7ba25636 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactDto.java @@ -147,8 +147,6 @@ public class ContactDto extends SormasToSormasShareableDto { public static final String QUARANTINE_CHANGE_COMMENT = "quarantineChangeComment"; public static final String DELETION_REASON = "deletionReason"; public static final String OTHER_DELETION_REASON = "otherDeletionReason"; - public static final String ADDITIONAL_DETAILS = "additionalDetails"; - public static final String EPI_DATA = "epiData"; public static final String CONTACT_TRANSMISSION_CLASSIFICATION = "contactTransmissionClassification"; private CaseReferenceDto caze; @@ -1046,7 +1044,7 @@ public String getOtherDeletionReason() { public void setOtherDeletionReason(String otherDeletionReason) { this.otherDeletionReason = otherDeletionReason; } -} + public TransmissionClassification getContactTransmissionClassification() { return contactTransmissionClassification; } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java index 587b4302f86..e5cfa15794c 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java @@ -65,7 +65,6 @@ import de.symeda.sormas.api.caze.ReinfectionDetail; import de.symeda.sormas.api.caze.ReinfectionStatus; import de.symeda.sormas.api.caze.ScreeningType; -import de.symeda.sormas.api.caze.ReportingType; import de.symeda.sormas.api.caze.TransmissionClassification; import de.symeda.sormas.api.caze.Trimester; import de.symeda.sormas.api.caze.VaccinationStatus; @@ -73,6 +72,8 @@ import de.symeda.sormas.api.contact.QuarantineType; import de.symeda.sormas.api.disease.DiseaseVariant; import de.symeda.sormas.api.externaldata.HasExternalData; +import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.i18n.Strings; import de.symeda.sormas.api.infrastructure.facility.FacilityType; import de.symeda.sormas.api.utils.PersonalData; import de.symeda.sormas.api.utils.YesNoUnknown; @@ -107,7 +108,7 @@ @Entity(name = "cases") @Audited -public class Case extends CoreAdo implements SormasToSormasShareable, HasExternalData { +public class Case extends CoreAdo implements SormasToSormasShareable, HasExternalData, Comparable { private static final long serialVersionUID = -2697795184663562129L; @@ -204,7 +205,49 @@ public class Case extends CoreAdo implements SormasToSormasShareable, HasExterna public static final String POSTPARTUM = "postpartum"; public static final String TRIMESTER = "trimester"; public static final String SAMPLES = "samples"; + public static final String FOLLOW_UP_STATUS = "followUpStatus"; + public static final String FOLLOW_UP_COMMENT = "followUpComment"; + public static final String FOLLOW_UP_UNTIL = "followUpUntil"; + public static final String OVERWRITE_FOLLOW_UP_UNTIL = "overwriteFollowUpUntil"; + public static final String VISITS = "visits"; + public static final String SURVEILLANCE_REPORTS = "surveillanceReports"; + public static final String FACILITY_TYPE = "facilityType"; + public static final String CONTACTS = "contacts"; + public static final String CONVERTED_FROM_CONTACT = "convertedContact"; + public static final String EVENT_PARTICIPANTS = "eventParticipants"; + public static final String SORMAS_TO_SORMAS_ORIGIN_INFO = "sormasToSormasOriginInfo"; + public static final String SORMAS_TO_SORMAS_SHARES = "sormasToSormasShares"; + public static final String EXTERNAL_SHARES = "externalShares"; + + public static final String CASE_ID_ISM = "caseIdIsm"; + public static final String CONTACT_TRACING_FIRST_CONTACT_DATE = "contactTracingFirstContactDate"; + public static final String WAS_IN_QUARANTINE_BEFORE_ISOLATION = "wasInQuarantineBeforeIsolation"; + public static final String QUARANTINE_REASON_BEFORE_ISOLATION = "quarantineReasonBeforeIsolation"; + public static final String QUARANTINE_REASON_BEFORE_ISOLATION_DETAILS = "quarantineReasonBeforeIsolationDetails"; + public static final String END_OF_ISOLATION_REASON = "endOfIsolationReason"; + public static final String END_OF_ISOLATION_REASON_DETAILS = "endOfIsolationReasonDetails"; public static final String CASE_TRANSMISSION_CLASSIFICATION = "caseTransmissionClassification"; + public static final String OTHERCASEOUTCOMEDETAILS = "specifyOtherOutcome"; + + public static final String RE_INFECTION = "reInfection"; + public static final String REINFECTION_STATUS = "reinfectionStatus"; + public static final String REINFECTION_DETAILS = "reinfectionDetails"; + public static final String PREVIOUS_INFECTION_DATE = "previousInfectionDate"; + + public static final String BLOOD_ORGAN_OR_TISSUE_DONATED = "bloodOrganOrTissueDonated"; + public static final String NOT_A_CASE_REASON_NEGATIVE_TEST = "notACaseReasonNegativeTest"; + public static final String NOT_A_CASE_REASON_PHYSICIAN_INFORMATION = "notACaseReasonPhysicianInformation"; + public static final String NOT_A_CASE_REASON_DIFFERENT_PATHOGEN = "notACaseReasonDifferentPathogen"; + public static final String NOT_A_CASE_REASON_OTHER = "notACaseReasonOther"; + public static final String NOT_A_CASE_REASON_DETAILS = "notACaseReasonDetails"; + public static final String FOLLOW_UP_STATUS_CHANGE_DATE = "followUpStatusChangeDate"; + public static final String FOLLOW_UP_STATUS_CHANGE_USER = "followUpStatusChangeUser"; + public static final String DONT_SHARE_WITH_REPORTING_TOOL = "dontShareWithReportingTool"; + public static final String CASE_REFERENCE_DEFINITION = "caseReferenceDefinition"; + public static final String PREVIOUS_QUARANTINE_TO = "previousQuarantineTo"; + public static final String QUARANTINE_CHANGE_COMMENT = "quarantineChangeComment"; + public static final String DUPLICATE_OF = "duplicateOf"; + public static final String CREATION_VERSION = "creationVersion"; private Person person; private String description; @@ -375,6 +418,8 @@ public class Case extends CoreAdo implements SormasToSormasShareable, HasExterna private List sormasToSormasShares = new ArrayList<>(0); private List externalShares = new ArrayList<>(0); + private TransmissionClassification caseTransmissionClassification; + private String specifyOtherOutcome; private CaseReferenceDefinition caseReferenceDefinition; private Date previousQuarantineTo; private String quarantineChangeComment; @@ -392,8 +437,6 @@ public void setPersonId(Long personId) { this.personId = personId; } - private TransmissionClassification caseTransmissionClassification; - @ManyToOne(cascade = {}) @JoinColumn(nullable = false) public Person getPerson() { @@ -1152,7 +1195,7 @@ public String getExternalId() { /** * Extra setter for externalID needed to comply with the HasExternalData interface - * + * * @param externalId * the value to be set for externalID */ @@ -1408,6 +1451,14 @@ public Integer getCaseIdIsm() { return caseIdIsm; } + public String getSpecifyOtherOutcome() { + return specifyOtherOutcome; + } + + public void setSpecifyOtherOutcome(String specifyOtherOutcome) { + this.specifyOtherOutcome = specifyOtherOutcome; + } + public void setCaseIdIsm(Integer caseIdIsm) { this.caseIdIsm = caseIdIsm; } @@ -1613,10 +1664,10 @@ public void setBloodOrganOrTissueDonated(YesNoUnknown bloodOrganOrTissueDonated) @Override @ManyToOne(cascade = { - CascadeType.PERSIST, - CascadeType.MERGE, - CascadeType.DETACH, - CascadeType.REFRESH }) + CascadeType.PERSIST, + CascadeType.MERGE, + CascadeType.DETACH, + CascadeType.REFRESH }) @AuditedIgnore public SormasToSormasOriginInfo getSormasToSormasOriginInfo() { return sormasToSormasOriginInfo; @@ -1637,6 +1688,15 @@ public void setSormasToSormasShares(List sormasToSormas this.sormasToSormasShares = sormasToSormasShares; } + @Enumerated(EnumType.STRING) + public TransmissionClassification getCaseTransmissionClassification() { + return caseTransmissionClassification; + } + + public void setCaseTransmissionClassification(TransmissionClassification caseTransmissionClassification) { + this.caseTransmissionClassification = caseTransmissionClassification; + } + @OneToMany(mappedBy = ExternalShareInfo.CAZE, fetch = FetchType.LAZY) public List getExternalShares() { return externalShares; @@ -1662,6 +1722,7 @@ public User getFollowUpStatusChangeUser() { public void setFollowUpStatusChangeUser(User followUpStatusChangeUser) { this.followUpStatusChangeUser = followUpStatusChangeUser; + } public boolean isDontShareWithReportingTool() { @@ -1707,12 +1768,37 @@ public Map getExternalData() { public void setExternalData(Map externalData) { this.externalData = externalData; - @Enumerated(EnumType.STRING) - public TransmissionClassification getCaseTransmissionClassification() { - return caseTransmissionClassification; } - public void setCaseTransmissionClassification(TransmissionClassification caseTransmissionClassification) { - this.caseTransmissionClassification = caseTransmissionClassification; + public String buildCaseGpsCoordinationCaption() { + if (reportLat == null || reportLon == null) { + return I18nProperties.getString(Strings.messageIncompleteGpsCoordinates); + } else if (reportLatLonAccuracy == null) { + return reportLat + ", " + reportLon; + } else { + return reportLat + ", " + reportLon + " +-" + Math.round(reportLatLonAccuracy) + "m"; + } + } + + public Double buildCaseLatitudeCoordination() { + return reportLat; + } + + public Double buildCaseLongitudeCoordination() { + return reportLon; + } + + public Float buildCaseLatLonCoordination() { + + return reportLatLonAccuracy; + } + + + @Override + public int compareTo(Case otherCase) { + // Implement comparison logic based on your requirements + // Return a negative value if this case is smaller, positive if larger, or 0 if equal + // For example, if you have a caseId field, you can compare based on that: + return this.getUuid().compareTo(otherCase.getUuid()); } } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/Contact.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/Contact.java index 0c04261b854..c68ea19d76a 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/Contact.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/Contact.java @@ -168,8 +168,8 @@ public class Contact extends CoreAdo implements SormasToSormasShareable, HasExte public static final String VACCINATION_STATUS = "vaccinationStatus"; public static final String VISITS = "visits"; public static final String DUPLICATE_OF = "duplicateOf"; - public static final String ADDITIONAL_DETAILS = "additionalDetails"; - public static final String EPI_DATA = "epiData"; + //public static final String ADDITIONAL_DETAILS = "additionalDetails"; + //public static final String EPI_DATA = "epiData"; public static final String CONTACT_TRANSMISSION_CLASSIFICATION = "contactTransmissionClassification"; private Date reportDateTime; diff --git a/sormas-backend/src/main/resources/sql/sormas_schema.sql b/sormas-backend/src/main/resources/sql/sormas_schema.sql index efb96635e39..7db0b8ad8b6 100644 --- a/sormas-backend/src/main/resources/sql/sormas_schema.sql +++ b/sormas-backend/src/main/resources/sql/sormas_schema.sql @@ -5922,6 +5922,9 @@ UPDATE epidata SET contactwithsourcecaseknown = 'YES' FROM cases WHERE cases.epi INSERT INTO schema_version (version_number, comment) VALUES (281, 'Set contact with source case known for all existing cases #2946'); +ALTER TABLE cases ADD COLUMN casetransmissionclassification varchar(255); +ALTER TABLE contact ADD COLUMN contacttransmissionclassification varchar(225); + -- 2020-11-18 Add date of first contact #3408 ALTER TABLE contact ADD column multidaycontact boolean default false; ALTER TABLE contact ADD column firstcontactdate timestamp; @@ -11654,5 +11657,8 @@ INSERT INTO schema_version (version_number, comment, upgradeNeeded) VALUES (471, UPDATE users SET password = LPAD(password, 64, '0') WHERE LENGTH(password) < 64; INSERT INTO schema_version (version_number, comment) VALUES (472, 'Adjust password hashes with leading zeros #9726'); +ALTER TABLE cases ADD COLUMN specifyotheroutcome varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (473, 'Added a column name specifyotheroutcome to the cases'); + -- *** Insert new sql commands BEFORE this line. Remember to always consider _history tables. *** diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java index c51dd262a3d..641f17991d3 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java @@ -41,6 +41,7 @@ import com.vaadin.v7.ui.CheckBox; import com.vaadin.v7.ui.ComboBox; import com.vaadin.v7.ui.DateField; +import com.vaadin.v7.ui.OptionGroup; import com.vaadin.v7.ui.TextField; import de.symeda.sormas.api.Disease; @@ -117,29 +118,30 @@ public class CaseCreateForm extends AbstractEditForm { private final TravelEntryDto convertedTravelEntry; //@formatter:off - private static final String HTML_LAYOUT = fluidRowLocs(4, CaseDataDto.CASE_ORIGIN, 8, CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION) - + fluidRowLocs(CaseDataDto.REPORT_DATE, CaseDataDto.EPID_NUMBER, CaseDataDto.EXTERNAL_ID) - + fluidRow( - fluidColumnLoc(6, 0, CaseDataDto.DISEASE), - fluidColumn(6, 0, - locs(CaseDataDto.DISEASE_DETAILS, CaseDataDto.PLAGUE_TYPE, CaseDataDto.DENGUE_FEVER_TYPE, - CaseDataDto.RABIES_TYPE))) - + fluidRowLocs(CaseDataDto.DISEASE_VARIANT, CaseDataDto.DISEASE_VARIANT_DETAILS) - + fluidRowLocs(RESPONSIBLE_JURISDICTION_HEADING_LOC) - + fluidRowLocs(CaseDataDto.RESPONSIBLE_REGION, CaseDataDto.RESPONSIBLE_DISTRICT, CaseDataDto.RESPONSIBLE_COMMUNITY) - + fluidRowLocs(CaseDataDto.DONT_SHARE_WITH_REPORTING_TOOL) - + fluidRowLocs(DONT_SHARE_WARNING_LOC) - + fluidRowLocs(DIFFERENT_PLACE_OF_STAY_JURISDICTION) - + fluidRowLocs(PLACE_OF_STAY_HEADING_LOC) - + fluidRowLocs(FACILITY_OR_HOME_LOC) - + fluidRowLocs(CaseDataDto.REGION, CaseDataDto.DISTRICT, CaseDataDto.COMMUNITY) - + fluidRowLocs(FACILITY_TYPE_GROUP_LOC, CaseDataDto.FACILITY_TYPE) - + fluidRowLocs(CaseDataDto.HEALTH_FACILITY, CaseDataDto.HEALTH_FACILITY_DETAILS) - + fluidRowLocs(DIFFERENT_POINT_OF_ENTRY_JURISDICTION) - + fluidRowLocs(POINT_OF_ENTRY_REGION, POINT_OF_ENTRY_DISTRICT) - + fluidRowLocs(CaseDataDto.POINT_OF_ENTRY, CaseDataDto.POINT_OF_ENTRY_DETAILS) - + fluidRowLocs(CaseDataDto.PERSON); - //@formatter:on + private static final String HTML_LAYOUT = fluidRowLocs(4, CaseDataDto.CASE_ORIGIN, 8, CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION) + // private static final String HTML_LAYOUT = fluidRowLocs(CaseDataDto.CASE_ORIGIN, "") + + fluidRowLocs(CaseDataDto.REPORT_DATE, CaseDataDto.EPID_NUMBER, CaseDataDto.EXTERNAL_ID) + + fluidRow( + fluidColumnLoc(6, 0, CaseDataDto.DISEASE), + fluidColumn(6, 0, + locs(CaseDataDto.DISEASE_DETAILS, CaseDataDto.PLAGUE_TYPE, CaseDataDto.DENGUE_FEVER_TYPE, + CaseDataDto.RABIES_TYPE))) + + fluidRowLocs(CaseDataDto.DISEASE_VARIANT, CaseDataDto.DISEASE_VARIANT_DETAILS) + + fluidRowLocs(RESPONSIBLE_JURISDICTION_HEADING_LOC) + + fluidRowLocs(CaseDataDto.RESPONSIBLE_REGION, CaseDataDto.RESPONSIBLE_DISTRICT, CaseDataDto.RESPONSIBLE_COMMUNITY) + + fluidRowLocs(CaseDataDto.DONT_SHARE_WITH_REPORTING_TOOL) + + fluidRowLocs(DONT_SHARE_WARNING_LOC) + + fluidRowLocs(DIFFERENT_PLACE_OF_STAY_JURISDICTION) + + fluidRowLocs(PLACE_OF_STAY_HEADING_LOC) + + fluidRowLocs(FACILITY_OR_HOME_LOC) + + fluidRowLocs(CaseDataDto.REGION, CaseDataDto.DISTRICT, CaseDataDto.COMMUNITY) + + fluidRowLocs(FACILITY_TYPE_GROUP_LOC, CaseDataDto.FACILITY_TYPE) + + fluidRowLocs(CaseDataDto.HEALTH_FACILITY, CaseDataDto.HEALTH_FACILITY_DETAILS) + + fluidRowLocs(DIFFERENT_POINT_OF_ENTRY_JURISDICTION) + + fluidRowLocs(POINT_OF_ENTRY_REGION, POINT_OF_ENTRY_DISTRICT) + + fluidRowLocs(CaseDataDto.POINT_OF_ENTRY, CaseDataDto.POINT_OF_ENTRY_DETAILS) + + fluidRowLocs(CaseDataDto.PERSON); + //@formatter:on public CaseCreateForm() { this(true, true, null); @@ -151,11 +153,11 @@ public CaseCreateForm(TravelEntryDto convertedTravelEntry) { public CaseCreateForm(Boolean showHomeAddressForm, Boolean showPersonSearchButton, TravelEntryDto convertedTravelEntry) { super( - CaseDataDto.class, - CaseDataDto.I18N_PREFIX, - false, - FieldVisibilityCheckers.withCountry(FacadeProvider.getConfigFacade().getCountryLocale()), - UiFieldAccessCheckers.getNoop()); + CaseDataDto.class, + CaseDataDto.I18N_PREFIX, + false, + FieldVisibilityCheckers.withCountry(FacadeProvider.getConfigFacade().getCountryLocale()), + UiFieldAccessCheckers.getNoop()); this.convertedTravelEntry = convertedTravelEntry; this.showHomeAddressForm = showHomeAddressForm; this.showPersonSearchButton = showPersonSearchButton; @@ -235,33 +237,33 @@ protected void addFields() { pointOfEntryDistrictCombo.addValueChangeListener(e -> updatePOEs()); FieldHelper.setVisibleWhen( - differentPlaceOfStayJurisdiction, - Arrays.asList(region, districtCombo, communityCombo), - Collections.singletonList(Boolean.TRUE), - true); + differentPlaceOfStayJurisdiction, + Arrays.asList(region, districtCombo, communityCombo), + Collections.singletonList(Boolean.TRUE), + true); FieldHelper.setVisibleWhen( - differentPointOfEntryJurisdiction, - Arrays.asList(pointOfEntryRegionCombo, pointOfEntryDistrictCombo), - Collections.singletonList(Boolean.TRUE), - true); + differentPointOfEntryJurisdiction, + Arrays.asList(pointOfEntryRegionCombo, pointOfEntryDistrictCombo), + Collections.singletonList(Boolean.TRUE), + true); FieldHelper.setRequiredWhen( - differentPlaceOfStayJurisdiction, - Arrays.asList(region, districtCombo), - Collections.singletonList(Boolean.TRUE), - false, - null); + differentPlaceOfStayJurisdiction, + Arrays.asList(region, districtCombo), + Collections.singletonList(Boolean.TRUE), + false, + null); ogCaseOrigin.addValueChangeListener(e -> { boolean pointOfEntryRegionDistrictVisible = - CaseOrigin.POINT_OF_ENTRY.equals(ogCaseOrigin.getValue()) && Boolean.TRUE.equals(differentPointOfEntryJurisdiction.getValue()); + CaseOrigin.POINT_OF_ENTRY.equals(ogCaseOrigin.getValue()) && Boolean.TRUE.equals(differentPointOfEntryJurisdiction.getValue()); pointOfEntryRegionCombo.setVisible(pointOfEntryRegionDistrictVisible); pointOfEntryDistrictCombo.setVisible(pointOfEntryRegionDistrictVisible); }); facilityOrHome = - addCustomField(FACILITY_OR_HOME_LOC, TypeOfPlace.class, NullableOptionGroup.class, I18nProperties.getCaption(Captions.casePlaceOfStay)); + addCustomField(FACILITY_OR_HOME_LOC, TypeOfPlace.class, NullableOptionGroup.class, I18nProperties.getCaption(Captions.casePlaceOfStay)); facilityOrHome.removeAllItems(); for (TypeOfPlace place : TypeOfPlace.FOR_CASES) { facilityOrHome.addItem(place); @@ -294,12 +296,12 @@ protected void addFields() { if (convertedTravelEntry != null) { differentPointOfEntryJurisdiction.setValue(true); RegionReferenceDto regionReferenceDto = convertedTravelEntry.getPointOfEntryRegion() != null - ? convertedTravelEntry.getPointOfEntryRegion() - : convertedTravelEntry.getResponsibleRegion(); + ? convertedTravelEntry.getPointOfEntryRegion() + : convertedTravelEntry.getResponsibleRegion(); pointOfEntryRegionCombo.setValue(regionReferenceDto); DistrictReferenceDto districtReferenceDto = convertedTravelEntry.getPointOfEntryDistrict() != null - ? convertedTravelEntry.getPointOfEntryDistrict() - : convertedTravelEntry.getResponsibleDistrict(); + ? convertedTravelEntry.getPointOfEntryDistrict() + : convertedTravelEntry.getResponsibleDistrict(); pointOfEntryDistrictCombo.setValue(districtReferenceDto); differentPointOfEntryJurisdiction.setReadOnly(true); @@ -314,14 +316,14 @@ protected void addFields() { region.addValueChangeListener(e -> { RegionReferenceDto regionDto = (RegionReferenceDto) e.getProperty().getValue(); FieldHelper - .updateItems(districtCombo, regionDto != null ? FacadeProvider.getDistrictFacade().getAllActiveByRegion(regionDto.getUuid()) : null); + .updateItems(districtCombo, regionDto != null ? FacadeProvider.getDistrictFacade().getAllActiveByRegion(regionDto.getUuid()) : null); }); districtCombo.addValueChangeListener(e -> { FieldHelper.removeItems(communityCombo); DistrictReferenceDto districtDto = (DistrictReferenceDto) e.getProperty().getValue(); FieldHelper.updateItems( - communityCombo, - districtDto != null ? FacadeProvider.getCommunityFacade().getAllActiveByDistrict(districtDto.getUuid()) : null); + communityCombo, + districtDto != null ? FacadeProvider.getCommunityFacade().getAllActiveByDistrict(districtDto.getUuid()) : null); updateFacility(); if (!Boolean.TRUE.equals(differentPointOfEntryJurisdiction.getValue())) { @@ -334,7 +336,7 @@ protected void addFields() { facilityOrHome.addValueChangeListener(e -> { FieldHelper.removeItems(facilityCombo); if (TypeOfPlace.FACILITY.equals(facilityOrHome.getValue()) - || ((facilityOrHome.getValue() instanceof java.util.Set) && TypeOfPlace.FACILITY.equals(facilityOrHome.getNullableValue()))) { + || ((facilityOrHome.getValue() instanceof java.util.Set) && TypeOfPlace.FACILITY.equals(facilityOrHome.getNullableValue()))) { if (facilityTypeGroup.getValue() == null) { facilityTypeGroup.setValue(FacilityTypeGroup.MEDICAL_FACILITY); } @@ -351,7 +353,7 @@ protected void addFields() { } updateFacilityFields(facilityCombo, facilityDetails); } else if (TypeOfPlace.HOME.equals(facilityOrHome.getValue()) - || ((facilityOrHome.getValue() instanceof java.util.Set) && TypeOfPlace.HOME.equals(facilityOrHome.getNullableValue()))) { + || ((facilityOrHome.getValue() instanceof java.util.Set) && TypeOfPlace.HOME.equals(facilityOrHome.getNullableValue()))) { setNoneFacility(); } else { facilityCombo.removeAllItems(); @@ -366,6 +368,13 @@ protected void addFields() { facilityType.addValueChangeListener(e -> updateFacility()); region.addItems(FacadeProvider.getRegionFacade().getAllActiveByServerCountry()); + OptionGroup caseTransmissionClassification = addField(CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION, OptionGroup.class); + caseTransmissionClassification.setRequired(true); +// if (userJurisdictionLevel == JurisdictionLevel.COMMUNITY) { +// region.setReadOnly(true); +// district.setReadOnly(true); +// } +// JurisdictionLevel userJurisdictionLevel = UserRole.getJurisdictionLevel(UserProvider.getCurrent().getUserRoles()); JurisdictionLevel userJurisdictionLevel = UserProvider.getCurrent().getJurisdictionLevel(); if (userJurisdictionLevel == JurisdictionLevel.HEALTH_FACILITY) { region.setReadOnly(true); @@ -389,10 +398,6 @@ protected void addFields() { } if (!UserProvider.getCurrent().isPortHealthUser()) { - OptionGroup caseTransmissionClassification = addField(CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION, OptionGroup.class); - caseTransmissionClassification.setRequired(true); - - if (!UserRole.isPortHealthUser(UserProvider.getCurrent().getUserRoles())) { ogCaseOrigin.addValueChangeListener(ev -> { if (ev.getProperty().getValue() == CaseOrigin.IN_COUNTRY) { setVisible(false, CaseDataDto.POINT_OF_ENTRY, CaseDataDto.POINT_OF_ENTRY_DETAILS); @@ -446,33 +451,33 @@ protected void addFields() { FieldHelper.addSoftRequiredStyle(plagueType, communityCombo, facilityDetails); FieldHelper - .setVisibleWhen(getFieldGroup(), Arrays.asList(CaseDataDto.DISEASE_DETAILS), CaseDataDto.DISEASE, Arrays.asList(Disease.OTHER), true); + .setVisibleWhen(getFieldGroup(), Arrays.asList(CaseDataDto.DISEASE_DETAILS), CaseDataDto.DISEASE, Arrays.asList(Disease.OTHER), true); FieldHelper.setRequiredWhen(getFieldGroup(), CaseDataDto.DISEASE, Arrays.asList(CaseDataDto.DISEASE_DETAILS), Arrays.asList(Disease.OTHER)); FieldHelper.setRequiredWhen( - getFieldGroup(), - CaseDataDto.CASE_ORIGIN, - Arrays.asList(CaseDataDto.HEALTH_FACILITY), - Arrays.asList(CaseOrigin.IN_COUNTRY)); + getFieldGroup(), + CaseDataDto.CASE_ORIGIN, + Arrays.asList(CaseDataDto.HEALTH_FACILITY), + Arrays.asList(CaseOrigin.IN_COUNTRY)); FieldHelper.setRequiredWhen( - getFieldGroup(), - CaseDataDto.CASE_ORIGIN, - Arrays.asList(CaseDataDto.POINT_OF_ENTRY), - Arrays.asList(CaseOrigin.POINT_OF_ENTRY)); + getFieldGroup(), + CaseDataDto.CASE_ORIGIN, + Arrays.asList(CaseDataDto.POINT_OF_ENTRY), + Arrays.asList(CaseOrigin.POINT_OF_ENTRY)); FieldHelper.setVisibleWhen(getFieldGroup(), Arrays.asList(CaseDataDto.PLAGUE_TYPE), CaseDataDto.DISEASE, Arrays.asList(Disease.PLAGUE), true); FieldHelper - .setVisibleWhen(getFieldGroup(), Arrays.asList(CaseDataDto.DENGUE_FEVER_TYPE), CaseDataDto.DISEASE, Arrays.asList(Disease.DENGUE), true); + .setVisibleWhen(getFieldGroup(), Arrays.asList(CaseDataDto.DENGUE_FEVER_TYPE), CaseDataDto.DISEASE, Arrays.asList(Disease.DENGUE), true); FieldHelper.setVisibleWhen(getFieldGroup(), Arrays.asList(CaseDataDto.RABIES_TYPE), CaseDataDto.DISEASE, Arrays.asList(Disease.RABIES), true); FieldHelper.setVisibleWhen( - facilityOrHome, - Arrays.asList(facilityTypeGroup, facilityType, facilityCombo), - Collections.singletonList(TypeOfPlace.FACILITY), - false); + facilityOrHome, + Arrays.asList(facilityTypeGroup, facilityType, facilityCombo), + Collections.singletonList(TypeOfPlace.FACILITY), + false); FieldHelper.setRequiredWhen( - facilityOrHome, - Arrays.asList(facilityTypeGroup, facilityType, facilityCombo), - Collections.singletonList(TypeOfPlace.FACILITY), - false, - null); + facilityOrHome, + Arrays.asList(facilityTypeGroup, facilityType, facilityCombo), + Collections.singletonList(TypeOfPlace.FACILITY), + false, + null); facilityCombo.addValueChangeListener(e -> { updateFacilityFields(facilityCombo, facilityDetails); @@ -508,10 +513,10 @@ protected void addFields() { private void updateDiseaseVariant(Disease disease) { List diseaseVariants = - FacadeProvider.getCustomizableEnumFacade().getEnumValues(CustomizableEnumType.DISEASE_VARIANT, disease); + FacadeProvider.getCustomizableEnumFacade().getEnumValues(CustomizableEnumType.DISEASE_VARIANT, disease); FieldHelper.updateItems(diseaseVariantField, diseaseVariants); diseaseVariantField - .setVisible(disease != null && isVisibleAllowed(CaseDataDto.DISEASE_VARIANT) && CollectionUtils.isNotEmpty(diseaseVariants)); + .setVisible(disease != null && isVisibleAllowed(CaseDataDto.DISEASE_VARIANT) && CollectionUtils.isNotEmpty(diseaseVariants)); } private void setNoneFacility() { @@ -548,14 +553,14 @@ private void updateFacility() { if (facilityType.getValue() != null && district != null) { if (community != null) { FieldHelper.updateItems( - facilityCombo, - FacadeProvider.getFacilityFacade() - .getActiveFacilitiesByCommunityAndType(community, (FacilityType) facilityType.getValue(), true, false)); + facilityCombo, + FacadeProvider.getFacilityFacade() + .getActiveFacilitiesByCommunityAndType(community, (FacilityType) facilityType.getValue(), true, false)); } else { FieldHelper.updateItems( - facilityCombo, - FacadeProvider.getFacilityFacade() - .getActiveFacilitiesByDistrictAndType(district, (FacilityType) facilityType.getValue(), true, false)); + facilityCombo, + FacadeProvider.getFacilityFacade() + .getActiveFacilitiesByDistrictAndType(district, (FacilityType) facilityType.getValue(), true, false)); } } } @@ -575,8 +580,8 @@ private void updatePOEs() { } List POEs = districtDto == null - ? Collections.emptyList() - : FacadeProvider.getPointOfEntryFacade().getAllActiveByDistrict(districtDto.getUuid(), true); + ? Collections.emptyList() + : FacadeProvider.getPointOfEntryFacade().getAllActiveByDistrict(districtDto.getUuid(), true); FieldHelper.updateItems(comboBoxPOE, POEs); } } @@ -601,8 +606,8 @@ private void updateFacilityFields(ComboBox cbFacility, TextField tfFacilityDetai tfFacilityDetails.clear(); } } else if (((facilityOrHome.getValue() instanceof java.util.Set) - && (facilityOrHome.getNullableValue() == null || TypeOfPlace.FACILITY.equals(facilityOrHome.getNullableValue()))) - || TypeOfPlace.FACILITY.equals(facilityOrHome.getValue())) { + && (facilityOrHome.getNullableValue() == null || TypeOfPlace.FACILITY.equals(facilityOrHome.getNullableValue()))) + || TypeOfPlace.FACILITY.equals(facilityOrHome.getValue())) { tfFacilityDetails.setVisible(false); tfFacilityDetails.setRequired(false); tfFacilityDetails.clear(); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java index 0551ea6a352..b36b392ade2 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java @@ -220,9 +220,6 @@ public class CaseDataForm extends AbstractEditForm { fluidRowLocs(9, CaseDataDto.OUTCOME, 3, CaseDataDto.OUTCOME_DATE) + fluidRowLocs(3, CaseDataDto.SEQUELAE, 9, CaseDataDto.SEQUELAE_DETAILS) + fluidRowLocs(CaseDataDto.CASE_IDENTIFICATION_SOURCE, CaseDataDto.SCREENING_TYPE) + - fluidRowLocs(CaseDataDto.REPORTING_TYPE, - "") - + fluidRowLocs(4, CaseDataDto.CASE_ORIGIN, 8, CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION) + fluidRowLocs(RESPONSIBLE_JURISDICTION_HEADING_LOC) + fluidRowLocs(CaseDataDto.RESPONSIBLE_REGION, CaseDataDto.RESPONSIBLE_DISTRICT, CaseDataDto.RESPONSIBLE_COMMUNITY) + diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactCreateForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactCreateForm.java index 5acbf51e18c..baa447d5ba2 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactCreateForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactCreateForm.java @@ -28,12 +28,7 @@ import com.vaadin.ui.Button; import com.vaadin.ui.Label; import com.vaadin.ui.themes.ValoTheme; -import com.vaadin.v7.ui.AbstractField; -import com.vaadin.v7.ui.CheckBox; -import com.vaadin.v7.ui.ComboBox; -import com.vaadin.v7.ui.DateField; -import com.vaadin.v7.ui.TextArea; -import com.vaadin.v7.ui.TextField; +import com.vaadin.v7.ui.*; import de.symeda.sormas.api.CountryHelper; import de.symeda.sormas.api.Disease; diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataForm.java index a8334e49d31..a66aa291708 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactDataForm.java @@ -43,13 +43,7 @@ import com.vaadin.v7.data.util.converter.Converter; import com.vaadin.v7.data.validator.DateRangeValidator; import com.vaadin.v7.shared.ui.datefield.Resolution; -import com.vaadin.v7.ui.AbstractField; -import com.vaadin.v7.ui.CheckBox; -import com.vaadin.v7.ui.ComboBox; -import com.vaadin.v7.ui.DateField; -import com.vaadin.v7.ui.Field; -import com.vaadin.v7.ui.TextArea; -import com.vaadin.v7.ui.TextField; +import com.vaadin.v7.ui.*; import de.symeda.sormas.api.CountryHelper; import de.symeda.sormas.api.Disease; From b4a014384b7b9d5dc1ebe1e5ae6ac4d94a499b16 Mon Sep 17 00:00:00 2001 From: Danie Adjei Date: Mon, 27 Nov 2023 17:22:11 +0000 Subject: [PATCH 23/25] case-based-form-implementation --- .../java/de/symeda/sormas/api/Disease.java | 5 +- .../de/symeda/sormas/api/ReferenceDto.java | 5 + .../symeda/sormas/api/caze/CaseCriteria.java | 20 ++ .../symeda/sormas/api/caze/CaseDataDto.java | 67 +++- .../symeda/sormas/api/caze/CaseExportDto.java | 58 ++-- .../sormas/api/caze/CaseIndexDetailedDto.java | 9 +- .../symeda/sormas/api/caze/CaseIndexDto.java | 53 ++- .../symeda/sormas/api/caze/CaseOutcome.java | 3 +- .../sormas/api/caze/CaseReferenceDto.java | 13 +- .../sormas/api/caze/CaseSelectionDto.java | 18 +- .../de/symeda/sormas/api/caze/MapCaseDto.java | 5 +- .../ClinicalVisitExportDto.java | 3 +- .../symeda/sormas/api/contact/ContactDto.java | 30 +- .../api/contact/ContactIndexDetailedDto.java | 17 +- .../sormas/api/contact/ContactIndexDto.java | 71 +++- .../api/contact/ContactReferenceDto.java | 38 ++- .../api/contact/MergeContactIndexDto.java | 15 +- .../sormas/api/contact/SimilarContactDto.java | 8 +- .../de/symeda/sormas/api/event/EventDto.java | 8 + .../sormas/api/event/EventParticipantDto.java | 2 +- .../api/event/EventParticipantIndexDto.java | 14 +- .../event/EventParticipantReferenceDto.java | 13 +- .../sormas/api/exposure/ExposureDto.java | 6 +- .../externalmessage/ExternalMessageDto.java | 10 + .../ExternalMessageIndexDto.java | 1 + .../de/symeda/sormas/api/i18n/Captions.java | 13 + .../symeda/sormas/api/i18n/Descriptions.java | 2 + .../de/symeda/sormas/api/i18n/Strings.java | 2 + .../api/immunization/ImmunizationDto.java | 10 +- .../infrastructure/facility/FacilityDto.java | 5 + .../sormas/api/location/LocationDto.java | 19 ++ .../sormas/api/person/JournalPersonDto.java | 14 +- .../symeda/sormas/api/person/PersonDto.java | 65 +++- .../sormas/api/person/PersonExportDto.java | 29 +- .../sormas/api/person/PersonIndexDto.java | 18 +- .../sormas/api/person/PersonReferenceDto.java | 11 +- .../api/person/PersonSimilarityCriteria.java | 10 + .../sormas/api/person/SimilarPersonDto.java | 24 +- .../symeda/sormas/api/sample/SampleDto.java | 23 ++ .../sormas/api/sample/SampleExportDto.java | 10 +- .../sormas/api/sample/SampleIndexDto.java | 13 +- .../sormas/api/symptoms/SymptomsDto.java | 163 ++++----- .../symeda/sormas/api/task/TaskIndexDto.java | 12 +- .../api/therapy/PrescriptionExportDto.java | 3 +- .../api/therapy/TreatmentExportDto.java | 3 +- .../api/travelentry/TravelEntryDto.java | 12 +- .../travelentry/TravelEntryReferenceDto.java | 4 +- .../sormas/api/utils/AFPFacilityOptions.java | 15 + .../sormas/api/utils/CardOrHistory.java | 24 ++ .../src/main/resources/captions.properties | 43 ++- sormas-api/src/main/resources/enum.properties | 4 +- .../src/main/resources/enum_ar-SA.properties | 4 +- .../src/main/resources/enum_en-GH.properties | 4 +- .../src/main/resources/strings.properties | 2 + sormas-backend/doc/UserDataAccess.md | 2 +- .../de/symeda/sormas/backend/caze/Case.java | 57 +++- .../sormas/backend/caze/CaseFacadeEjb.java | 17 +- .../backend/caze/CaseListCriteriaBuilder.java | 7 + .../sormas/backend/caze/CaseService.java | 12 +- .../caze/caseimport/CaseImportFacadeEjb.java | 13 + .../CaseSelectionDtoResultTransformer.java | 1 + .../sormas/backend/contact/Contact.java | 6 +- .../backend/contact/ContactFacadeEjb.java | 66 +++- .../contact/ContactListCriteriaBuilder.java | 3 + .../event/EventParticipantFacadeEjb.java | 6 +- .../externalmessage/ExternalMessage.java | 11 + .../ExternalMessageFacadeEjb.java | 4 + .../ExternalMessageService.java | 1 + .../sormas/backend/location/Location.java | 10 + .../symeda/sormas/backend/person/Person.java | 23 +- .../backend/person/PersonFacadeEjb.java | 14 +- .../sormas/backend/person/PersonService.java | 9 + .../symeda/sormas/backend/sample/Sample.java | 43 +++ .../backend/sample/SampleFacadeEjb.java | 18 +- .../sormas/backend/task/TaskFacadeEjb.java | 4 + .../travelentry/TravelEntryFacadeEjb.java | 7 +- .../services/TravelEntryService.java | 4 +- .../de/symeda/sormas/backend/user/User.java | 1 + .../src/main/resources/sql/sormas_schema.sql | 37 +++ .../ExternalMessageFacadeEjbMappingTest.java | 3 + .../sormas/ui/caze/AbstractCaseGrid.java | 2 + .../sormas/ui/caze/AbstractTableField.java | 2 + .../symeda/sormas/ui/caze/CaseCreateForm.java | 50 ++- .../symeda/sormas/ui/caze/CaseDataForm.java | 222 ++++++++----- .../symeda/sormas/ui/caze/CaseDataView.java | 50 +-- .../symeda/sormas/ui/caze/CasePersonView.java | 10 + .../sormas/ui/configuration/DevModeView.java | 25 ++ .../ui/contact/AbstractContactGrid.java | 2 +- .../sormas/ui/contact/ContactController.java | 2 +- .../sormas/ui/contact/ContactPersonView.java | 2 +- .../sormas/ui/contact/SourceContactList.java | 4 +- .../symeda/sormas/ui/epidata/EpiDataForm.java | 17 +- .../ui/events/EventParticipantEditForm.java | 4 +- .../externalmessage/ExternalMessageGrid.java | 1 + .../PhysiciansReportCaseEditComponent.java | 1 + .../hospitalization/HospitalizationForm.java | 6 + .../immunization/ImmunizationPersonView.java | 2 +- .../sormas/ui/location/LocationEditForm.java | 35 +- .../sormas/ui/person/PersonController.java | 4 +- .../sormas/ui/person/PersonCreateForm.java | 67 +++- .../sormas/ui/person/PersonEditForm.java | 114 ++++--- .../sormas/ui/samples/AbstractSampleForm.java | 314 +++++++++++++----- .../sormas/ui/samples/SampleCreateForm.java | 8 + .../sormas/ui/samples/SampleEditForm.java | 7 + .../sormas/ui/symptoms/SymptomsForm.java | 170 +++++++++- .../ui/travelentry/TravelEntryPersonView.java | 1 + .../sormas/ui/utils/AbstractEditForm.java | 4 + .../de/symeda/sormas/ui/utils/CssStyles.java | 2 +- .../symeda/sormas/ui/utils/DownloadUtil.java | 10 +- .../page/title/TitleLayoutHelper.java | 2 +- 110 files changed, 1996 insertions(+), 576 deletions(-) create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/AFPFacilityOptions.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/CardOrHistory.java diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/Disease.java b/sormas-api/src/main/java/de/symeda/sormas/api/Disease.java index 55518241eb7..7f705054b18 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/Disease.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/Disease.java @@ -40,7 +40,7 @@ public enum Disease NEW_INFLUENZA(true, true, true, true, 17, true, false, false), PLAGUE(true, true, true, true, 7, true, false, false), POLIO(true, true, true, false, 0, true, false, false), - UNSPECIFIED_VHF(true, true, true, true, 21, true, false, false), + //AHF(true, true, true, true, 21, true, false, false), WEST_NILE_FEVER(true, false, true, false, 0, true, false, false), YELLOW_FEVER(true, true, true, false, 6, true, false, false), RABIES(true, true, true, true, 6, true, false, false), @@ -86,6 +86,7 @@ public enum Disease POST_IMMUNIZATION_ADVERSE_EVENTS_MILD(true, false, false, false, 0, true, false, false), POST_IMMUNIZATION_ADVERSE_EVENTS_SEVERE(true, false, false, false, 0, true, false, false), FHA(true, false, false, false, 0, true, false, false), + AHF(true, true, true, true, 21, true, false, false), OTHER(true, true, true, true, 21, false, false, false), UNDEFINED(true, true, true, true, 0, false, false, false); @@ -163,7 +164,7 @@ public int getDefaultFollowUpDuration() { } public boolean isDiseaseGroup() { - return this == UNSPECIFIED_VHF; + return this == AHF; } public boolean isVariantAllowed() { diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/ReferenceDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/ReferenceDto.java index f35f2c262a0..a967ef8fb7e 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/ReferenceDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/ReferenceDto.java @@ -59,6 +59,11 @@ public void setUuid(String uuid) { this.uuid = uuid; } + public boolean getCaption(String caption) { + this.caption = caption; + return Boolean.parseBoolean(caption); + } + public String getCaption() { return caption; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseCriteria.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseCriteria.java index 202a1aa88b6..893dd6ce517 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseCriteria.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseCriteria.java @@ -37,6 +37,8 @@ import de.symeda.sormas.api.share.ExternalShareCriteria; import de.symeda.sormas.api.user.UserReferenceDto; import de.symeda.sormas.api.user.UserRoleReferenceDto; +import de.symeda.sormas.api.utils.AFPFacilityOptions; +import de.symeda.sormas.api.utils.CardOrHistory; import de.symeda.sormas.api.utils.DateFilterOption; import de.symeda.sormas.api.utils.IgnoreForUrl; import de.symeda.sormas.api.utils.criteria.CriteriaDateType; @@ -74,6 +76,7 @@ public class CaseCriteria extends CriteriaWithDateType implements ExternalShareC public static final String REINFECTION_STATUS = "reinfectionStatus"; public static final String FACILITY_TYPE_GROUP = "facilityTypeGroup"; public static final String FACILITY_TYPE = "facilityType"; + public static final String AFP_FACILITY_OPTIONS = "afpFacilityOptions"; public static final String INCLUDE_CASES_FROM_OTHER_JURISDICTIONS = "includeCasesFromOtherJurisdictions"; public static final String ONLY_CONTACTS_FROM_OTHER_INSTANCES = "onlyContactsFromOtherInstances"; public static final String ONLY_CASES_WITH_REINFECTION = "onlyCasesWithReinfection"; @@ -134,10 +137,13 @@ public class CaseCriteria extends CriteriaWithDateType implements ExternalShareC private Integer followUpVisitsInterval; private SymptomJournalStatus symptomJournalStatus; private VaccinationStatus vaccinationStatus; + private CardOrHistory vaccinationType; + private Date vaccinationDate; private ReinfectionStatus reinfectionStatus; private Date reportDateTo; private FacilityTypeGroup facilityTypeGroup; private FacilityType facilityType; + private AFPFacilityOptions afpFacilityOptions; private Boolean includeCasesFromOtherJurisdictions = Boolean.FALSE; private Boolean onlyContactsFromOtherInstances; private Boolean onlyCasesWithReinfection; @@ -621,10 +627,18 @@ public void setSymptomJournalStatus(SymptomJournalStatus symptomJournalStatus) { public VaccinationStatus getVaccinationStatus() { return vaccinationStatus; } + public CardOrHistory getVaccinationType() { + return vaccinationType; + } + public Date getVaccinationDate() { + return vaccinationDate; + } public void setVaccinationStatus(VaccinationStatus vaccinationStatus) { this.vaccinationStatus = vaccinationStatus; } + public void setVaccinationType(CardOrHistory vaccinationType) {this.vaccinationType = vaccinationType;} + public void setVaccinationDate(Date vaccinationDate) {this.vaccinationDate = vaccinationDate;} public ReinfectionStatus getReinfectionStatus() { return reinfectionStatus; @@ -658,6 +672,12 @@ public void setFacilityType(FacilityType type) { this.facilityType = type; } + public AFPFacilityOptions getAfpFacilityOptions() { + return afpFacilityOptions; + } + + public void setAfpFacilityOptions(AFPFacilityOptions afpFacilityOptions) {this.afpFacilityOptions = afpFacilityOptions;} + public Boolean getIncludeCasesFromOtherJurisdictions() { return includeCasesFromOtherJurisdictions; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java index 87ad6891ba2..19d3adbf71c 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java @@ -29,6 +29,7 @@ import javax.validation.constraints.Min; import javax.validation.constraints.Size; +import de.symeda.sormas.api.utils.*; import org.apache.commons.lang3.StringUtils; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -66,19 +67,6 @@ import de.symeda.sormas.api.travelentry.TravelEntryDto; import de.symeda.sormas.api.user.UserReferenceDto; import de.symeda.sormas.api.user.UserRight; -import de.symeda.sormas.api.utils.DataHelper; -import de.symeda.sormas.api.utils.DependingOnFeatureType; -import de.symeda.sormas.api.utils.DependingOnUserRight; -import de.symeda.sormas.api.utils.Diseases; -import de.symeda.sormas.api.utils.EmbeddedPersonalData; -import de.symeda.sormas.api.utils.FieldConstraints; -import de.symeda.sormas.api.utils.HideForCountries; -import de.symeda.sormas.api.utils.HideForCountriesExcept; -import de.symeda.sormas.api.utils.Outbreaks; -import de.symeda.sormas.api.utils.PersonalData; -import de.symeda.sormas.api.utils.Required; -import de.symeda.sormas.api.utils.SensitiveData; -import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.api.utils.pseudonymization.Pseudonymizer; import de.symeda.sormas.api.utils.pseudonymization.valuepseudonymizers.LatitudePseudonymizer; import de.symeda.sormas.api.utils.pseudonymization.valuepseudonymizers.LongitudePseudonymizer; @@ -136,7 +124,11 @@ public class CaseDataDto extends SormasToSormasShareableDto { public static final String PORT_HEALTH_INFO = "portHealthInfo"; public static final String HEALTH_CONDITIONS = "healthConditions"; public static final String PREGNANT = "pregnant"; + public static final String IPSAMPLESENT = "ipSampleSent"; + public static final String IPSAMPLERESULTS = "ipSampleResults"; public static final String VACCINATION_STATUS = "vaccinationStatus"; + public static final String VACCINATION_TYPE = "vaccinationType"; + public static final String VACCINATION_DATE = "vaccinationDate"; public static final String SMALLPOX_VACCINATION_SCAR = "smallpoxVaccinationScar"; public static final String SMALLPOX_VACCINATION_RECEIVED = "smallpoxVaccinationReceived"; public static final String SMALLPOX_LAST_VACCINATION_DATE = "smallpoxLastVaccinationDate"; @@ -188,7 +180,7 @@ public class CaseDataDto extends SormasToSormasShareableDto { public static final String FOLLOW_UP_UNTIL = "followUpUntil"; public static final String VISITS = "visits"; public static final String FACILITY_TYPE = "facilityType"; - + public static final String AFP_FACILITY_OPTIONS = "afpFacilityOptions"; public static final String CASE_ID_ISM = "caseIdIsm"; public static final String CONTACT_TRACING_FIRST_CONTACT_TYPE = "contactTracingFirstContactType"; public static final String CONTACT_TRACING_FIRST_CONTACT_DATE = "contactTracingFirstContactDate"; @@ -337,6 +329,8 @@ public class CaseDataDto extends SormasToSormasShareableDto { @PersonalData(mandatoryField = true) @SensitiveData(mandatoryField = true) private FacilityType facilityType; + private AFPFacilityOptions afpFacilityOptions; + @Outbreaks @Required @PersonalData(mandatoryField = true) @@ -352,6 +346,8 @@ public class CaseDataDto extends SormasToSormasShareableDto { private HealthConditionsDto healthConditions; private YesNoUnknown pregnant; + private YesNoUnknown ipSampleSent; + private Disease ipSampleResults; @Diseases({ Disease.AFP, Disease.GUINEA_WORM, @@ -360,7 +356,7 @@ public class CaseDataDto extends SormasToSormasShareableDto { Disease.YELLOW_FEVER, Disease.CSM, Disease.RABIES, - Disease.UNSPECIFIED_VHF, + Disease.AHF, Disease.ANTHRAX, Disease.CORONAVIRUS, Disease.OTHER }) @@ -596,6 +592,10 @@ public class CaseDataDto extends SormasToSormasShareableDto { private String otherDeletionReason; private TransmissionClassification caseTransmissionClassification; + @Outbreaks + private CardOrHistory vaccinationType; + private Date vaccinationDate; + public static CaseDataDto build(PersonReferenceDto person, Disease disease) { return build(person, disease, HealthConditionsDto.build()); } @@ -696,7 +696,7 @@ public static CaseDataDto buildFromTravelEntry(TravelEntryDto travelEntry, Perso } public CaseReferenceDto toReference() { - return new CaseReferenceDto(getUuid(), getPerson().getFirstName(), getPerson().getLastName()); + return new CaseReferenceDto(getUuid(), getPerson().getFirstName(), getPerson().getLastName(), getPerson().getOtherName()); } /** @@ -1071,6 +1071,22 @@ public void setPregnant(YesNoUnknown pregnant) { this.pregnant = pregnant; } + public YesNoUnknown getIpSampleSent() { + return ipSampleSent; + } + + public void setIpSampleSent(YesNoUnknown ipSampleSent) { + this.ipSampleSent = ipSampleSent; + } + + public Disease getIpSampleResults(){ + return ipSampleResults; + } + + public void setIpSampleResults(Disease ipSampleResults) { + this.ipSampleResults = ipSampleResults; + } + public VaccinationStatus getVaccinationStatus() { return vaccinationStatus; } @@ -1079,6 +1095,22 @@ public void setVaccinationStatus(VaccinationStatus vaccinationStatus) { this.vaccinationStatus = vaccinationStatus; } + public CardOrHistory getVaccinationType() { + return vaccinationType; + } + + public void setVaccinationType(CardOrHistory vaccinationType) { + this.vaccinationType = vaccinationType; + } + + public Date getVaccinationDate() { + return vaccinationDate; + } + + public void setVaccinationDate(Date vaccinationDate) { + this.vaccinationDate = vaccinationDate; + } + public YesNoUnknown getSmallpoxVaccinationScar() { return smallpoxVaccinationScar; } @@ -1464,6 +1496,9 @@ public void setFacilityType(FacilityType facilityType) { this.facilityType = facilityType; } + public AFPFacilityOptions getAfpFacilityOptions(){return afpFacilityOptions;} + public void setAfpFacilityOptions(AFPFacilityOptions afpFacilityOptions){this.afpFacilityOptions = afpFacilityOptions;} + public Integer getCaseIdIsm() { return caseIdIsm; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseExportDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseExportDto.java index 88a4fd9b934..d25c58ec291 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseExportDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseExportDto.java @@ -24,6 +24,7 @@ import java.util.Map; import java.util.Set; +import de.symeda.sormas.api.utils.*; import org.apache.commons.lang3.StringUtils; import de.symeda.sormas.api.CountryHelper; @@ -60,15 +61,6 @@ import de.symeda.sormas.api.symptoms.SymptomsDto; import de.symeda.sormas.api.user.UserRight; import de.symeda.sormas.api.user.UserRoleReferenceDto; -import de.symeda.sormas.api.utils.DataHelper; -import de.symeda.sormas.api.utils.DependingOnUserRight; -import de.symeda.sormas.api.utils.HideForCountries; -import de.symeda.sormas.api.utils.HideForCountriesExcept; -import de.symeda.sormas.api.utils.LocationHelper; -import de.symeda.sormas.api.utils.Order; -import de.symeda.sormas.api.utils.PersonalData; -import de.symeda.sormas.api.utils.SensitiveData; -import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.api.utils.pseudonymization.Pseudonymizer; import de.symeda.sormas.api.utils.pseudonymization.valuepseudonymizers.PostalCodePseudonymizer; import de.symeda.sormas.api.vaccination.VaccinationDto; @@ -136,6 +128,9 @@ public class CaseExportDto implements Serializable { @PersonalData @SensitiveData private String lastName; + @PersonalData + @SensitiveData + private String otherName; private Salutation salutation; @SensitiveData private String otherSalutation; @@ -151,6 +146,7 @@ public class CaseExportDto implements Serializable { @SensitiveData private String community; private FacilityType facilityType; + private AFPFacilityOptions afpFacilityOptions; @PersonalData @SensitiveData private String healthFacility; @@ -351,10 +347,10 @@ public class CaseExportDto implements Serializable { public CaseExportDto(long id, long personId, Double personAddressLatitude, Double personAddressLongitude, Float personAddressLatLonAcc, long epiDataId, long symptomsId, long hospitalizationId, long healthConditionsId, String uuid, String epidNumber, Disease disease, DiseaseVariant diseaseVariant, String diseaseDetails, String diseaseVariantDetails, - String personUuid, String firstName, String lastName, Salutation salutation, String otherSalutation, Sex sex, YesNoUnknown pregnant, + String personUuid, String firstName, String lastName, String otherName, Salutation salutation, String otherSalutation, Sex sex, YesNoUnknown pregnant, Integer approximateAge, ApproximateAgeType approximateAgeType, Integer birthdateDD, Integer birthdateMM, Integer birthdateYYYY, Date reportDate, String region, String district, String community, - FacilityType facilityType, String healthFacility, String healthFacilityUuid, String healthFacilityDetails, String pointOfEntry, + FacilityType facilityType, AFPFacilityOptions afpFacilityOptions, String healthFacility, String healthFacilityUuid, String healthFacilityDetails, String pointOfEntry, String pointOfEntryUuid, String pointOfEntryDetails, CaseClassification caseClassification, YesNoUnknown clinicalConfirmation, YesNoUnknown epidemiologicalConfirmation, YesNoUnknown laboratoryDiagnosticConfirmation, Boolean notACaseReasonNegativeTest, Boolean notACaseReasonPhysicianInformation, Boolean notACaseReasonDifferentPathogen, Boolean notACaseReasonOther, @@ -412,6 +408,7 @@ public CaseExportDto(long id, long personId, Double personAddressLatitude, Doubl this.personUuid = personUuid; this.firstName = firstName; this.lastName = lastName; + this.otherName = otherName; this.salutation = salutation; this.otherSalutation = otherSalutation; this.sex = sex; @@ -462,6 +459,7 @@ public CaseExportDto(long id, long personId, Double personAddressLatitude, Doubl this.quarantineOfficialOrderSent = quarantineOfficialOrderSent; this.quarantineOfficialOrderSentDate = quarantineOfficialOrderSentDate; this.facilityType = facilityType; + this.afpFacilityOptions = afpFacilityOptions; this.healthFacility = FacilityHelper.buildFacilityString(healthFacilityUuid, healthFacility); this.healthFacilityDetails = healthFacilityDetails; this.pointOfEntry = InfrastructureHelper.buildPointOfEntryString(pointOfEntryUuid, pointOfEntry); @@ -533,8 +531,7 @@ public CaseExportDto(long id, long personId, Double personAddressLatitude, Doubl } public CaseReferenceDto toReference() { - return new CaseReferenceDto(uuid, firstName, lastName); - } + return new CaseReferenceDto(uuid, firstName, lastName, otherName);} public Boolean getInJurisdiction() { return isInJurisdiction; @@ -2358,6 +2355,29 @@ public String getFollowUpStatusChangeUserRoles() { return followUpStatusChangeUserRoles; } + @Order(179) + @ExportTarget(caseExportTypes = { + CaseExportType.CASE_SURVEILLANCE, + CaseExportType.CASE_MANAGEMENT }) + @ExportEntity(PersonDto.class) + @ExportProperty({ + CaseDataDto.PERSON, + PersonDto.OTHER_NAME }) + @ExportGroup(ExportGroupType.SENSITIVE) + public String getOtherName() { + return otherName; + } + + @Order(180) + @ExportTarget(caseExportTypes = { + CaseExportType.CASE_SURVEILLANCE, + CaseExportType.CASE_MANAGEMENT }) + @ExportProperty(CaseDataDto.AFP_FACILITY_OPTIONS) + @ExportGroup(ExportGroupType.CORE) + public AFPFacilityOptions getAfpFacilityOptions() { + return afpFacilityOptions; + } + public void setFollowUpStatusChangeUserRoles(Set roles) { this.followUpStatusChangeUserRoles = StringUtils.join(roles, ", "); } @@ -2426,6 +2446,8 @@ public void setLastName(String lastName) { this.lastName = lastName; } + public void setOtherName(String otherName) {this.otherName = otherName;} + public void setSalutation(Salutation salutation) { this.salutation = salutation; } @@ -2438,13 +2460,11 @@ public void setBirthdate(BirthDateDto birthdate) { this.birthdate = birthdate; } - public void setFacilityType(FacilityType facilityType) { - this.facilityType = facilityType; - } + public void setFacilityType(FacilityType facilityType) {this.facilityType = facilityType;} - public void setHealthFacilityDetails(String healthFacilityDetails) { - this.healthFacilityDetails = healthFacilityDetails; - } + public void setAfpFacilityOptions(AFPFacilityOptions afpFacilityOptions) {this.afpFacilityOptions = afpFacilityOptions;} + + public void setHealthFacilityDetails(String healthFacilityDetails) {this.healthFacilityDetails = healthFacilityDetails;} public void setPointOfEntryDetails(String pointOfEntryDetails) { this.pointOfEntryDetails = pointOfEntryDetails; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseIndexDetailedDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseIndexDetailedDto.java index 3132019e9bc..fc11671306b 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseIndexDetailedDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseIndexDetailedDto.java @@ -11,6 +11,7 @@ import de.symeda.sormas.api.person.Sex; import de.symeda.sormas.api.person.SymptomJournalStatus; import de.symeda.sormas.api.user.UserReferenceDto; +import de.symeda.sormas.api.utils.CardOrHistory; import de.symeda.sormas.api.utils.PersonalData; import de.symeda.sormas.api.utils.SensitiveData; import de.symeda.sormas.api.utils.YesNoUnknown; @@ -73,27 +74,27 @@ public class CaseIndexDetailedDto extends CaseIndexDto { private UserReferenceDto reportingUser; //@formatter:off - public CaseIndexDetailedDto(long id, String uuid, String epidNumber, String externalID, String externalToken, String internalToken, String personUuid, String personFirstName, String personLastName, + public CaseIndexDetailedDto(long id, String uuid, String epidNumber, String externalID, String externalToken, String internalToken, String personUuid, String personFirstName, String personLastName, String personOtherName, Disease disease, DiseaseVariant diseaseVariant, String diseaseDetails, CaseClassification caseClassification, InvestigationStatus investigationStatus, PresentCondition presentCondition, Date reportDate, Date creationDate, String regionUuid, String districtUuid, String healthFacilityUuid, String healthFacilityName, String healthFacilityDetails, String pointOfEntryUuid, String pointOfEntryName, String pointOfEntryDetails, String surveillanceOfficerUuid, CaseOutcome outcome, Integer age, ApproximateAgeType ageType, Integer birthdateDD, Integer birthdateMM, Integer birthdateYYYY, Sex sex, - Date quarantineTo, Float completeness, FollowUpStatus followUpStatus, Date followUpUntil, SymptomJournalStatus symptomJournalStatus, VaccinationStatus vaccinationStatus, Date changeDate, Long facilityId, + Date quarantineTo, Float completeness, FollowUpStatus followUpStatus, Date followUpUntil, SymptomJournalStatus symptomJournalStatus, VaccinationStatus vaccinationStatus, CardOrHistory vaccinationType, Date vaccinationDate, Date changeDate, Long facilityId, String responsibleRegionUuid, String responsibleDistrictUuid, String responsibleDistrictName, boolean isInJurisdiction, //detailed fields YesNoUnknown reInfection, String city, String street, String houseNumber, String additionalInformation, String postalCode, String phone, String reportingUserUuid, String reportingUserFirstName, String reportingUserLastName, Date symptomOnsetDate, String responsibleRegion, String responsibleCommunity, int visitCount, long eventCount, Date latestSampleDateTime, long sampleCount, Date latestChangedDate) { - super(id, uuid, epidNumber, externalID, externalToken, internalToken, personUuid, personFirstName, personLastName, + super(id, uuid, epidNumber, externalID, externalToken, internalToken, personUuid, personFirstName, personLastName, personOtherName, disease, diseaseVariant, diseaseDetails, caseClassification, investigationStatus, presentCondition, reportDate, creationDate, regionUuid, districtUuid, healthFacilityUuid, healthFacilityName, healthFacilityDetails, pointOfEntryUuid, pointOfEntryName, pointOfEntryDetails, surveillanceOfficerUuid, outcome, age, ageType, birthdateDD, birthdateMM, birthdateYYYY, sex, - quarantineTo, completeness, followUpStatus, followUpUntil, symptomJournalStatus, vaccinationStatus, changeDate, facilityId, + quarantineTo, completeness, followUpStatus, followUpUntil, symptomJournalStatus, vaccinationStatus, vaccinationType, vaccinationDate,changeDate, facilityId, responsibleRegionUuid, responsibleDistrictUuid, responsibleDistrictName, isInJurisdiction, visitCount, latestChangedDate); //@formatter:on diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseIndexDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseIndexDto.java index e81156be922..9d6071bbccd 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseIndexDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseIndexDto.java @@ -31,6 +31,7 @@ import de.symeda.sormas.api.person.Sex; import de.symeda.sormas.api.person.SymptomJournalStatus; import de.symeda.sormas.api.share.ExternalShareStatus; +import de.symeda.sormas.api.utils.CardOrHistory; import de.symeda.sormas.api.utils.PersonalData; import de.symeda.sormas.api.utils.SensitiveData; import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableIndexDto; @@ -52,6 +53,7 @@ public class CaseIndexDto extends PseudonymizableIndexDto implements MergeableIn public static final String PERSON_UUID = "personUuid"; public static final String PERSON_FIRST_NAME = "personFirstName"; public static final String PERSON_LAST_NAME = "personLastName"; + public static final String PERSON_OTHER_NAME = "personOtherName"; public static final String DISEASE = "disease"; public static final String DISEASE_VARIANT = "diseaseVariant"; public static final String DISEASE_DETAILS = "diseaseDetails"; @@ -76,6 +78,8 @@ public class CaseIndexDto extends PseudonymizableIndexDto implements MergeableIn public static final String FOLLOW_UP_UNTIL = "followUpUntil"; public static final String SYMPTOM_JOURNAL_STATUS = "symptomJournalStatus"; public static final String VACCINATION_STATUS = "vaccinationStatus"; + public static final String VACCINATION_TYPE = "vaccinationType"; + public static final String VACCINATION_DATE = "vaccinationDate"; public static final String SURVEILLANCE_TOOL_LAST_SHARE_DATE = "surveillanceToolLastShareDate"; public static final String SURVEILLANCE_TOOL_SHARE_COUNT = "surveillanceToolShareCount"; public static final String SURVEILLANCE_TOOL_STATUS = "surveillanceToolStatus"; @@ -92,6 +96,9 @@ public class CaseIndexDto extends PseudonymizableIndexDto implements MergeableIn @PersonalData @SensitiveData private String personLastName; + @PersonalData + @SensitiveData + private String personOtherName; private Disease disease; private DiseaseVariant diseaseVariant; private String diseaseDetails; @@ -116,6 +123,8 @@ public class CaseIndexDto extends PseudonymizableIndexDto implements MergeableIn private Date followUpUntil; private SymptomJournalStatus symptomJournalStatus; private VaccinationStatus vaccinationStatus; + private CardOrHistory vaccinationType; + private Date vaccinationDate; private Integer visitCount; private Date surveillanceToolLastShareDate; @@ -131,22 +140,22 @@ public class CaseIndexDto extends PseudonymizableIndexDto implements MergeableIn private Boolean isInJurisdiction; //@formatter:off - public CaseIndexDto(long id, String uuid, String epidNumber, String externalID, String externalToken, String internalToken, String personUuid, String personFirstName, String personLastName, Disease disease, + public CaseIndexDto(long id, String uuid, String epidNumber, String externalID, String externalToken, String internalToken, String personUuid, String personFirstName, String personLastName, String personOtherName, Disease disease, DiseaseVariant diseaseVariant, String diseaseDetails, CaseClassification caseClassification, InvestigationStatus investigationStatus, PresentCondition presentCondition, Date reportDate, Date creationDate, String regionUuid, String districtUuid, String healthFacilityUuid, String healthFacilityName, String healthFacilityDetails, String pointOfEntryUuid, String pointOfEntryName, String pointOfEntryDetails, String surveillanceOfficerUuid, CaseOutcome outcome, Integer age, ApproximateAgeType ageType, Integer birthdateDD, Integer birthdateMM, Integer birthdateYYYY, Sex sex, Date quarantineTo, - Float completeness, FollowUpStatus followUpStatus, Date followUpUntil, SymptomJournalStatus symptomJournalStatus, VaccinationStatus vaccinationStatus, Date changeDate, Long facilityId, + Float completeness, FollowUpStatus followUpStatus, Date followUpUntil, SymptomJournalStatus symptomJournalStatus, VaccinationStatus vaccinationStatus, CardOrHistory vaccinationType, Date vaccinationDate, Date changeDate, Long facilityId, // responsible jurisdiction String responsibleRegionUuid, String responsibleDistrictUuid, String responsibleDistrictName, boolean isInJurisdiction) { - this(id, uuid, epidNumber, externalID, externalToken, internalToken, personUuid, personFirstName, personLastName, disease, + this(id, uuid, epidNumber, externalID, externalToken, internalToken, personUuid, personFirstName, personLastName, personOtherName, disease, diseaseVariant, diseaseDetails, caseClassification, investigationStatus, presentCondition, reportDate, creationDate, regionUuid, districtUuid, healthFacilityUuid, healthFacilityName, healthFacilityDetails, pointOfEntryUuid, pointOfEntryName, pointOfEntryDetails, surveillanceOfficerUuid, outcome, age, ageType, birthdateDD, birthdateMM, birthdateYYYY, sex, quarantineTo, - completeness, followUpStatus, followUpUntil, symptomJournalStatus, vaccinationStatus, changeDate, facilityId, + completeness, followUpStatus, followUpUntil, symptomJournalStatus, vaccinationStatus, vaccinationType, vaccinationDate, changeDate, facilityId, responsibleRegionUuid, responsibleDistrictUuid, responsibleDistrictName, isInJurisdiction, null, null ); @@ -154,13 +163,13 @@ public CaseIndexDto(long id, String uuid, String epidNumber, String externalID, //@formatter:on //@formatter:off - public CaseIndexDto(long id, String uuid, String epidNumber, String externalID, String externalToken, String internalToken, String personUuid, String personFirstName, String personLastName, Disease disease, + public CaseIndexDto(long id, String uuid, String epidNumber, String externalID, String externalToken, String internalToken, String personUuid, String personFirstName, String personLastName, String personOtherName ,Disease disease, DiseaseVariant diseaseVariant, String diseaseDetails, CaseClassification caseClassification, InvestigationStatus investigationStatus, PresentCondition presentCondition, Date reportDate, Date creationDate, String regionUuid, String districtUuid, String healthFacilityUuid, String healthFacilityName, String healthFacilityDetails, String pointOfEntryUuid, String pointOfEntryName, String pointOfEntryDetails, String surveillanceOfficerUuid, CaseOutcome outcome, Integer age, ApproximateAgeType ageType, Integer birthdateDD, Integer birthdateMM, Integer birthdateYYYY, Sex sex, Date quarantineTo, - Float completeness, FollowUpStatus followUpStatus, Date followUpUntil, SymptomJournalStatus symptomJournalStatus, VaccinationStatus vaccinationStatus, + Float completeness, FollowUpStatus followUpStatus, Date followUpUntil, SymptomJournalStatus symptomJournalStatus, VaccinationStatus vaccinationStatus, CardOrHistory vaccinationType, Date vaccinationDate, Date changeDate, Long facilityId, // XXX: unused, only here for TypedQuery mapping // responsible jurisdiction String responsibleRegionUuid, String responsibleDistrictUuid, String responsibleDistrictName, boolean isInJurisdiction, @@ -179,6 +188,7 @@ public CaseIndexDto(long id, String uuid, String epidNumber, String externalID, this.personUuid = personUuid; this.personFirstName = personFirstName; this.personLastName = personLastName; + this.personOtherName = personOtherName; this.disease = disease; this.diseaseVariant = diseaseVariant; this.diseaseDetails = diseaseDetails; @@ -200,7 +210,8 @@ public CaseIndexDto(long id, String uuid, String epidNumber, String externalID, this.followUpUntil = followUpUntil; this.symptomJournalStatus = symptomJournalStatus; this.vaccinationStatus = vaccinationStatus; - + this.vaccinationType = vaccinationType; + this.vaccinationDate = vaccinationDate; this.responsibleDistrictName = responsibleDistrictName; this.responsibleRegionUuid = responsibleRegionUuid; @@ -251,6 +262,14 @@ public void setPersonLastName(String personLastName) { this.personLastName = personLastName; } + public String getPersonOtherName() { + return personOtherName; + } + + public void setPersonOtherName(String personOtherName) { + this.personOtherName = personOtherName; + } + public Disease getDisease() { return disease; } @@ -388,12 +407,12 @@ public void setCompleteness(Float completeness) { } public CaseReferenceDto toReference() { - return new CaseReferenceDto(getUuid(), personFirstName, personLastName); + return new CaseReferenceDto(getUuid(), personFirstName, personLastName, personOtherName); } @Override public String getCaption() { - return CaseReferenceDto.buildCaption(getUuid(), getPersonFirstName(), getPersonLastName()); + return CaseReferenceDto.buildCaption(getUuid(), getPersonFirstName(), getPersonLastName(), getPersonOtherName()); } @Override @@ -469,6 +488,22 @@ public void setVaccinationStatus(VaccinationStatus vaccinationStatus) { this.vaccinationStatus = vaccinationStatus; } + public CardOrHistory getVaccinationType() { + return vaccinationType; + } + + public void setVaccinationType(CardOrHistory vaccinationType) { + this.vaccinationType = vaccinationType; + } + + public Date getVaccinationDate() { + return vaccinationDate; + } + + public void setVaccinationDate(Date vaccinationDate) { + this.vaccinationDate = vaccinationDate; + } + public Integer getVisitCount() { return visitCount; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseOutcome.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseOutcome.java index e1f70e5bd34..86bfbd0b4af 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseOutcome.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseOutcome.java @@ -27,7 +27,8 @@ public enum CaseOutcome NO_OUTCOME, DECEASED, RECOVERED, - UNKNOWN; + UNKNOWN, + ALIVE; public String getName() { return this.name(); diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseReferenceDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseReferenceDto.java index 49911d0bc5e..2cdc0d6a9a2 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseReferenceDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseReferenceDto.java @@ -33,6 +33,8 @@ public class CaseReferenceDto extends ReferenceDto { private String firstName; @PersonalData private String lastName; + @PersonalData + private String otherName; public CaseReferenceDto() { @@ -42,17 +44,18 @@ public CaseReferenceDto(String uuid) { setUuid(uuid); } - public CaseReferenceDto(String uuid, String firstName, String lastName) { + public CaseReferenceDto(String uuid, String firstName, String lastName, String otherName) { setUuid(uuid); this.firstName = firstName; this.lastName = lastName; + this.otherName = otherName; } @Override public String getCaption() { - return buildCaption(getUuid(), firstName, lastName); + return buildCaption(getUuid(), firstName, lastName, otherName); } public String getFirstName() { @@ -62,6 +65,7 @@ public String getFirstName() { public String getLastName() { return lastName; } + public String getOtherName() {return otherName;} public void setFirstName(String firstName) { this.firstName = firstName; @@ -70,10 +74,11 @@ public void setFirstName(String firstName) { public void setLastName(String lastName) { this.lastName = lastName; } + public void setOtherName(String otherName) {this.otherName = otherName;} - public static String buildCaption(String uuid, String firstName, String lastName) { + public static String buildCaption(String uuid, String firstName, String lastName, String otherName) { - String personName = PersonDto.buildCaption(firstName, lastName); + String personName = PersonDto.buildCaption(firstName, lastName, otherName); String shortUuid = DataHelper.getShortUuid(uuid); if (personName.trim().length() > 0) { diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseSelectionDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseSelectionDto.java index 2aec58d423d..e6021936c20 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseSelectionDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseSelectionDto.java @@ -36,6 +36,10 @@ public class CaseSelectionDto extends PseudonymizableIndexDto implements Seriali @PersonalData @SensitiveData private String personLastName; + + @PersonalData + @SensitiveData + private String personOtherName; private AgeAndBirthDateDto ageAndBirthDate; private String responsibleDistrictName; @PersonalData @@ -55,6 +59,7 @@ public CaseSelectionDto( Disease disease, String personFirstName, String personLastName, + String personOtherName, AgeAndBirthDateDto ageAndBirthDate, String responsibleDistrictName, String healthFacilityName, @@ -70,6 +75,7 @@ public CaseSelectionDto( this.disease = disease; this.personFirstName = personFirstName; this.personLastName = personLastName; + this.personOtherName = personOtherName; this.ageAndBirthDate = ageAndBirthDate; this.responsibleDistrictName = responsibleDistrictName; this.healthFacilityName = healthFacilityName; @@ -120,6 +126,14 @@ public void setPersonLastName(String personLastName) { this.personLastName = personLastName; } + public String getPersonOtherName() { + return personOtherName; + } + + public void setPersonOtherName(String personOtherName) { + this.personOtherName = personOtherName; + } + public AgeAndBirthDateDto getAgeAndBirthDate() { return ageAndBirthDate; } @@ -185,12 +199,12 @@ public void setInJurisdiction(boolean inJurisdiction) { } public CaseReferenceDto toReference() { - return new CaseReferenceDto(getUuid(), personFirstName, personLastName); + return new CaseReferenceDto(getUuid(), personFirstName, personLastName, personOtherName); } @Override public String getCaption() { - return CaseReferenceDto.buildCaption(getUuid(), getPersonFirstName(), getPersonLastName()); + return CaseReferenceDto.buildCaption(getUuid(), getPersonFirstName(), getPersonLastName(), getPersonOtherName()); } @Override diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/MapCaseDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/MapCaseDto.java index 02db6cd7eb2..a4f9b0e8dcd 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/MapCaseDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/MapCaseDto.java @@ -75,6 +75,7 @@ public MapCaseDto( String personUuid, String personFirstName, String personLastName, + String personOtherName, String healthFacilityUuid, Double healthFacilityLat, Double healthFacilityLon, @@ -88,14 +89,14 @@ public MapCaseDto( this.reportDate = reportDate; this.caseClassification = caseClassification; this.disease = disease; - this.person = new PersonReferenceDto(personUuid, personFirstName, personLastName); + this.person = new PersonReferenceDto(personUuid, personFirstName, personLastName, personOtherName); + this.healthFacilityUuid = healthFacilityUuid; this.setHealthFacilityLat(healthFacilityLat); this.setHealthFacilityLon(healthFacilityLon); this.reportLat = reportLat; this.reportLon = reportLon; this.addressLat = addressLat; this.addressLon = addressLon; - this.healthFacilityUuid = healthFacilityUuid; this.isInJurisdiction = isInJurisdiction; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/clinicalcourse/ClinicalVisitExportDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/clinicalcourse/ClinicalVisitExportDto.java index d9acdc4e655..6e8e654cc8a 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/clinicalcourse/ClinicalVisitExportDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/clinicalcourse/ClinicalVisitExportDto.java @@ -34,6 +34,7 @@ public ClinicalVisitExportDto( String caseUuid, String caseFirstName, String caseLastName, + String caseOtherName, Disease disease, Date visitDateTime, String visitRemarks, @@ -42,7 +43,7 @@ public ClinicalVisitExportDto( boolean isInJurisdiction) { this.caseUuid = caseUuid; - this.caseName = PersonDto.buildCaption(caseFirstName, caseLastName); + this.caseName = PersonDto.buildCaption(caseFirstName, caseLastName, caseOtherName); this.disease = disease; this.visitDateTime = visitDateTime; this.visitRemarks = visitRemarks; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactDto.java index aad7ba25636..0a7dedf6dd5 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactDto.java @@ -26,13 +26,10 @@ import javax.validation.constraints.Size; import de.symeda.sormas.api.Disease; -import de.symeda.sormas.api.caze.CaseDataDto; -import de.symeda.sormas.api.caze.CaseReferenceDto; -import de.symeda.sormas.api.caze.VaccinationStatus; +import de.symeda.sormas.api.caze.*; import de.symeda.sormas.api.clinicalcourse.HealthConditionsDto; import de.symeda.sormas.api.common.DeletionReason; import de.symeda.sormas.api.disease.DiseaseVariant; -import de.symeda.sormas.api.caze.TransmissionClassification; import de.symeda.sormas.api.epidata.EpiDataDto; import de.symeda.sormas.api.event.EventParticipantDto; import de.symeda.sormas.api.feature.FeatureType; @@ -157,6 +154,8 @@ public class ContactDto extends SormasToSormasShareableDto { private String caseOrEventInformation; @Required private Disease disease; + @Required + private CaseOrigin caseOrigin; @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String diseaseDetails; private DiseaseVariant diseaseVariant; @@ -339,7 +338,7 @@ public class ContactDto extends SormasToSormasShareableDto { Disease.YELLOW_FEVER, Disease.CSM, Disease.RABIES, - Disease.UNSPECIFIED_VHF, + Disease.AHF, Disease.ANTHRAX, Disease.CORONAVIRUS, Disease.OTHER }) @@ -606,13 +605,17 @@ public void setReportLatLonAccuracy(Float reportLatLonAccuracy) { public ContactReferenceDto toReference() { return new ContactReferenceDto( - getUuid(), - getPerson().getFirstName(), - getPerson().getLastName(), - getCaze() != null ? getCaze().getFirstName() : null, - getCaze() != null ? getCaze().getLastName() : null); + getUuid(), + getPerson().getFirstName(), + getPerson().getLastName(), + getPerson().getOtherName(), + getCaze() != null ? getCaze().getFirstName() : null, + getCaze() != null ? getCaze().getLastName() : null, + getCaze() != null ? getCaze().getOtherName() : null + ); } + public UserReferenceDto getResultingCaseUser() { return resultingCaseUser; } @@ -621,6 +624,13 @@ public void setResultingCaseUser(UserReferenceDto resultingCaseUser) { this.resultingCaseUser = resultingCaseUser; } + public CaseOrigin getCaseOrigin() { + return caseOrigin; + } + public void setCaseOrigin(CaseOrigin caseOrigin) { + this.caseOrigin = caseOrigin; + } + public Disease getDisease() { return disease; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactIndexDetailedDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactIndexDetailedDto.java index 79b0715d8c0..b01ec61b2c5 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactIndexDetailedDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactIndexDetailedDto.java @@ -59,9 +59,9 @@ public class ContactIndexDetailedDto extends ContactIndexDto { private ContactRelation relationToCase; //@formatter:off - public ContactIndexDetailedDto(String uuid, String personUuid, String personFirstName, String personLastName, + public ContactIndexDetailedDto(String uuid, String personUuid, String personFirstName, String personLastName, String personOtherName, String cazeUuid, - Disease disease, String diseaseDetails, String caseFirstName, String caseLastName, String regionName, + Disease disease, String diseaseDetails, String caseFirstName, String caseLastName, String caseOtherName,String regionName, String districtName, Date lastContactDate, ContactCategory contactCategory, ContactProximity contactProximity, ContactClassification contactClassification, ContactStatus contactStatus, Float completeness, FollowUpStatus followUpStatus, Date followUpUntil, SymptomJournalStatus symptomJournalStatus, VaccinationStatus vaccinationStatus, String contactOfficerUuid, String reportingUserUuid, Date reportDateTime, @@ -73,15 +73,16 @@ public ContactIndexDetailedDto(String uuid, String personUuid, String personFirs Sex sex, Integer approximateAge, ApproximateAgeType approximateAgeType, String city, String street, String houseNumber, String additionalInformation, String postalCode, String phone, String reportingUserFirstName, String reportingUserLastName, ContactRelation relationToCase, int visitCount, - Date latestChangedDate // unused, only here for TypedQuery mapping - ) { - //@formatter:on + Date latestChangedDate // unused, only here for TypedQuery mapping, + ) + { + //@formatter:on //@formatter:off - super(uuid, personUuid, personFirstName, personLastName, cazeUuid, disease, diseaseDetails, caseFirstName, caseLastName, - regionName, districtName, lastContactDate, contactCategory, contactProximity, contactClassification, contactStatus, + super(uuid, personUuid, personFirstName, personLastName, personOtherName, cazeUuid, disease, diseaseDetails, caseFirstName, caseLastName, caseOtherName, + regionName, districtName, lastContactDate, contactCategory, contactProximity, contactClassification, contactStatus, completeness, followUpStatus, followUpUntil, symptomJournalStatus, vaccinationStatus, contactOfficerUuid, reportingUserUuid, reportDateTime, caseClassification, - caseRegionName, caseDistrictName, changeDate, externalID, externalToken, internalToken, isInJurisdiction, isCaseInJurisdiction , visitCount, latestChangedDate); + caseRegionName, caseDistrictName, changeDate, externalID, externalToken, internalToken, isInJurisdiction, isCaseInJurisdiction , visitCount, latestChangedDate); //@formatter:on diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactIndexDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactIndexDto.java index 4ec60458def..b6c09e0175b 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactIndexDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactIndexDto.java @@ -39,6 +39,7 @@ public class ContactIndexDto extends PseudonymizableIndexDto implements Serializ public static final String PERSON_UUID = "personUuid"; public static final String PERSON_FIRST_NAME = "firstName"; public static final String PERSON_LAST_NAME = "lastName"; + public static final String PERSON_OTHER_NAME = "otherName"; public static final String CAZE = "caze"; public static final String DISEASE = "disease"; public static final String LAST_CONTACT_DATE = "lastContactDate"; @@ -59,12 +60,13 @@ public class ContactIndexDto extends PseudonymizableIndexDto implements Serializ public static final String REGION_UUID = "regionUuid"; public static final String DISTRICT_UUID = "districtUuid"; public static final String COMMUNITY_UUID = "communityUuid"; - private String personUuid; @PersonalData private String firstName; @PersonalData private String lastName; + @PersonalData + private String otherName; private CaseReferenceDto caze; private Disease disease; private String diseaseDetails; @@ -90,12 +92,51 @@ public class ContactIndexDto extends PseudonymizableIndexDto implements Serializ private String districtName; private String caseRegionName; private String caseDistrictName; - private ContactJurisdictionFlagsDto contactJurisdictionFlagsDto; - //@formatter:off - public ContactIndexDto(String uuid, String personUuid, String personFirstName, String personLastName, String cazeUuid, - Disease disease, String diseaseDetails, String caseFirstName, String caseLastName, String regionName, + public ContactIndexDto(String uuid, String personUuid, String personFirstName, String personLastName, String personOtherName, String cazeUuid, + Disease disease, String diseaseDetails, String caseFirstName, String caseLastName, String caseOtherName, String regionName, + String districtName, Date lastContactDate, ContactCategory contactCategory, + ContactProximity contactProximity, ContactClassification contactClassification, ContactStatus contactStatus, Float completeness, + FollowUpStatus followUpStatus, Date followUpUntil, SymptomJournalStatus symptomJournalStatus, VaccinationStatus vaccinationStatus, Date reportDateTime, String externalID, String externalToken, String internalToken, + CaseClassification caseClassification, String caseRegionName, String caseDistrictName) + + { + super(uuid); + this.personUuid = personUuid; + this.firstName = personFirstName; + this.lastName = personLastName; + this.otherName = personOtherName; + this.disease = disease; + this.diseaseDetails = diseaseDetails; + + if (cazeUuid != null) { + this.caze = new CaseReferenceDto(cazeUuid, caseFirstName, caseLastName, caseOtherName); + } + this.lastContactDate = lastContactDate; + this.contactCategory = contactCategory; + this.contactProximity = contactProximity; + this.contactClassification = contactClassification; + this.contactStatus = contactStatus; + this.completeness = completeness; + this.followUpStatus = followUpStatus; + this.followUpUntil = followUpUntil; + this.symptomJournalStatus = symptomJournalStatus; + this.vaccinationStatus = vaccinationStatus; + this.reportDateTime = reportDateTime; + this.caseClassification = caseClassification; + this.externalID = externalID; + this.externalToken = externalToken; + this.internalToken = internalToken; + this.regionName = regionName; + this.districtName = districtName; + this.caseRegionName = caseRegionName; + this.caseDistrictName = caseDistrictName; + + } + + public ContactIndexDto(String uuid, String personUuid, String personFirstName,String personLastName, String personOtherName, String cazeUuid, + Disease disease, String diseaseDetails, String caseFirstName, String caseLastName, String caseOtherName, String regionName, String districtName, Date lastContactDate, ContactCategory contactCategory, ContactProximity contactProximity, ContactClassification contactClassification, ContactStatus contactStatus, Float completeness, FollowUpStatus followUpStatus, Date followUpUntil, SymptomJournalStatus symptomJournalStatus, VaccinationStatus vaccinationStatus, String contactOfficerUuid, @@ -104,17 +145,20 @@ public ContactIndexDto(String uuid, String personUuid, String personFirstName, S Date changeDate, // XXX: unused, only here for TypedQuery mapping String externalID, String externalToken, String internalToken, boolean isInJurisdiction, boolean isCaseInJurisdiction, int visitCount, - Date latestChangedDate // unused, only here for TypedQuery mapping - ) { - //@formatter:on + Date latestChangedDate // unused, only here for TypedQuery mapping, + + ) + { + //@formatter:on super(uuid); this.personUuid = personUuid; this.firstName = personFirstName; this.lastName = personLastName; + this.otherName = personOtherName; if (cazeUuid != null) { - this.caze = new CaseReferenceDto(cazeUuid, caseFirstName, caseLastName); + this.caze = new CaseReferenceDto(cazeUuid, caseFirstName, caseLastName, caseOtherName); } this.disease = disease; @@ -144,6 +188,7 @@ public ContactIndexDto(String uuid, String personUuid, String personFirstName, S this.contactJurisdictionFlagsDto = new ContactJurisdictionFlagsDto(isInJurisdiction, isCaseInJurisdiction); } + public String getPersonUuid() { return personUuid; } @@ -168,6 +213,14 @@ public void setLastName(String lastName) { this.lastName = lastName; } + public String getOtherName() { + return otherName; + } + + public void setOtherName(String otherName) { + this.otherName = otherName; + } + public CaseReferenceDto getCaze() { return caze; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactReferenceDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactReferenceDto.java index f6883c1b0f0..7bc0cd4c858 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactReferenceDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/contact/ContactReferenceDto.java @@ -52,13 +52,13 @@ public ContactReferenceDto(String uuid) { setUuid(uuid); } - public ContactReferenceDto(String uuid, String contactFirstName, String contactLastName, String caseFirstName, String caseLastName) { + public ContactReferenceDto(String uuid, String contactFirstName, String contactLastName, String contactOtherName, String caseFirstName, String caseLastName, String caseOtherName) { setUuid(uuid); - this.contactName = new PersonName(contactFirstName, contactLastName); + this.contactName = new PersonName(contactFirstName, contactLastName, contactOtherName); if (caseFirstName != null && caseLastName != null) { - this.caseName = new PersonName(caseFirstName, caseLastName); + this.caseName = new PersonName(caseFirstName, caseLastName, caseOtherName); } } @@ -67,8 +67,10 @@ public String getCaption() { return buildCaption( contactName.firstName, contactName.lastName, + contactName.otherName, caseName != null ? caseName.firstName : null, caseName != null ? caseName.lastName : null, + caseName != null ? caseName.otherName : null, getUuid(), true); } @@ -78,8 +80,10 @@ public String getCaptionAlwaysWithUuid() { return buildCaption( contactName.firstName, contactName.lastName, + contactName.otherName, caseName != null ? caseName.firstName : null, caseName != null ? caseName.lastName : null, + caseName != null ? caseName.otherName : null, getUuid(), true); } @@ -95,32 +99,40 @@ public PersonName getCaseName() { public static String buildCaption( String contactFirstName, String contactLastName, + String contactOtherName, String caseFirstName, String caseLastName, + String caseOtherName, String contactUuid) { - return buildCaption(contactFirstName, contactLastName, caseFirstName, caseLastName, contactUuid, false); + return buildCaption(contactFirstName, contactLastName, contactOtherName, caseFirstName, caseLastName, caseOtherName, contactUuid, false); } public static String buildCaption( String contactFirstName, String contactLastName, + String contactOtherName, String caseFirstName, String caseLastName, + String caseOtherName, String contactUuid, boolean alwaysShowUuid) { StringBuilder builder = new StringBuilder(); - if (!DataHelper.isNullOrEmpty(contactFirstName) || !DataHelper.isNullOrEmpty(contactLastName)) { + if (!DataHelper.isNullOrEmpty(contactFirstName) || !DataHelper.isNullOrEmpty(contactLastName) || !DataHelper.isNullOrEmpty(contactOtherName)) { builder.append(DataHelper.toStringNullable(contactFirstName)) .append(" ") - .append(DataHelper.toStringNullable(contactLastName).toUpperCase()); + .append(DataHelper.toStringNullable(contactLastName).toUpperCase()) + .append(" ") + .append(DataHelper.toStringNullable(contactOtherName)); } - if (!DataHelper.isNullOrEmpty(caseFirstName) || !DataHelper.isNullOrEmpty(caseLastName)) { + if (!DataHelper.isNullOrEmpty(caseFirstName) || !DataHelper.isNullOrEmpty(caseLastName) || !DataHelper.isNullOrEmpty(caseOtherName)) { builder.append(StringUtils.wrap(I18nProperties.getString(Strings.toCase), " ")) .append(DataHelper.toStringNullable(caseFirstName)) .append(" ") - .append(DataHelper.toStringNullable(caseLastName)); + .append(DataHelper.toStringNullable(caseLastName)) + .append(" ") + .append(DataHelper.toStringNullable(caseOtherName)); } if (alwaysShowUuid || builder.length() == 0) { @@ -141,12 +153,17 @@ public static class PersonName implements Serializable { @SensitiveData private String lastName; + @PersonalData + @SensitiveData + private String otherName; + public PersonName() { } - public PersonName(String firstName, String lastName) { + public PersonName(String firstName, String lastName, String otherName) { this.firstName = firstName; this.lastName = lastName; + this.otherName = otherName; } public String getFirstName() { @@ -156,9 +173,10 @@ public String getFirstName() { public String getLastName() { return lastName; } + public String getOtherName() {return otherName;} public String toString() { - return firstName + " " + lastName; + return firstName + " " + lastName + " " + otherName ; } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/contact/MergeContactIndexDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/contact/MergeContactIndexDto.java index df511286df1..99c43a206d0 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/contact/MergeContactIndexDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/contact/MergeContactIndexDto.java @@ -58,6 +58,8 @@ public class MergeContactIndexDto extends PseudonymizableIndexDto implements Mer private String firstName; @PersonalData private String lastName; + @PersonalData + private String otherName; private AgeAndBirthDateDto ageAndBirthDate; private Sex sex; private CaseReferenceDto caze; @@ -76,6 +78,7 @@ public MergeContactIndexDto( String uuid, String firstName, String lastName, + String otherName, Integer age, ApproximateAgeType ageType, Integer birthdateDD, @@ -85,6 +88,7 @@ public MergeContactIndexDto( String cazeUuid, String caseFirstName, String caseLastName, + String caseOtherName, Disease disease, String diseaseDetails, String regionName, @@ -99,10 +103,11 @@ public MergeContactIndexDto( this.id = id; this.firstName = firstName; this.lastName = lastName; + this.otherName = otherName; this.ageAndBirthDate = new AgeAndBirthDateDto(age, ageType, birthdateDD, birthdateMM, birthdateYYYY); this.sex = sex; if (cazeUuid != null) { - this.caze = new CaseReferenceDto(cazeUuid, caseFirstName, caseLastName); + this.caze = new CaseReferenceDto(cazeUuid, caseFirstName, caseLastName, caseOtherName); } this.disease = disease; this.diseaseDetails = diseaseDetails; @@ -139,6 +144,14 @@ public void setLastName(String lastName) { this.lastName = lastName; } + public String getOtherName() { + return otherName; + } + + public void setOtherName(String otherName) { + this.otherName = otherName; + } + public Sex getSex() { return sex; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/contact/SimilarContactDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/contact/SimilarContactDto.java index 282aad32b42..02c2cc4d1e5 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/contact/SimilarContactDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/contact/SimilarContactDto.java @@ -28,6 +28,8 @@ public class SimilarContactDto extends PseudonymizableIndexDto implements Serial private String firstName; @PersonalData private String lastName; + @PersonalData + private String otherName; private CaseReferenceDto caze; private String caseIdExternalSystem; private Date lastContactDate; @@ -38,8 +40,8 @@ public class SimilarContactDto extends PseudonymizableIndexDto implements Serial private ContactJurisdictionFlagsDto contactJurisdictionFlagsDto; //@formatter:off - public SimilarContactDto(String firstName, String lastName, String uuid, - String cazeUuid, String caseFirstName, String caseLastName, String caseIdExternalSystem, + public SimilarContactDto(String firstName, String lastName, String otherName, String uuid, + String cazeUuid, String caseFirstName, String caseLastName, String caseOtherName ,String caseIdExternalSystem, Date lastContactDate, ContactProximity contactProximity, ContactClassification contactClassification, ContactStatus contactStatus, FollowUpStatus followUpStatus, boolean isInJurisdiction, boolean isCaseInJurisdiction) { //@formatter:on @@ -48,7 +50,7 @@ public SimilarContactDto(String firstName, String lastName, String uuid, this.lastName = lastName; if (cazeUuid != null) { - this.caze = new CaseReferenceDto(cazeUuid, caseFirstName, caseLastName); + this.caze = new CaseReferenceDto(cazeUuid, caseFirstName, caseLastName, caseOtherName); } this.caseIdExternalSystem = caseIdExternalSystem; this.lastContactDate = lastContactDate; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/event/EventDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/event/EventDto.java index 3701e2c2101..5a8d59a7fd9 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/event/EventDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/event/EventDto.java @@ -15,6 +15,7 @@ package de.symeda.sormas.api.event; +import de.symeda.sormas.api.caze.CaseOrigin; import de.symeda.sormas.api.common.DeletionReason; import de.symeda.sormas.api.infrastructure.country.CountryReferenceDto; import de.symeda.sormas.api.user.UserDto; @@ -182,6 +183,8 @@ public class EventDto extends SormasToSormasShareableDto { @Size(max = FieldConstraints.CHARACTER_LIMIT_BIG, message = Validations.textTooLong) private String srcMediaDetails; private Disease disease; + + private CaseOrigin caseOrigin; @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String diseaseDetails; private DiseaseVariant diseaseVariant; @@ -545,6 +548,11 @@ public void setDisease(Disease disease) { this.disease = disease; } + public CaseOrigin getCaseOrigin() { + return caseOrigin; + } + public void setCaseOrigin(CaseOrigin caseOrigin) {this.caseOrigin = caseOrigin;} + public String getDiseaseDetails() { return diseaseDetails; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/event/EventParticipantDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/event/EventParticipantDto.java index 3aa55f8b5a9..e363a2a3955 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/event/EventParticipantDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/event/EventParticipantDto.java @@ -80,7 +80,7 @@ public class EventParticipantDto extends SormasToSormasShareableDto { Disease.YELLOW_FEVER, Disease.CSM, Disease.RABIES, - Disease.UNSPECIFIED_VHF, + Disease.AHF, Disease.ANTHRAX, Disease.CORONAVIRUS, Disease.OTHER }) diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/event/EventParticipantIndexDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/event/EventParticipantIndexDto.java index 6bb55d23465..bfb77242638 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/event/EventParticipantIndexDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/event/EventParticipantIndexDto.java @@ -23,6 +23,7 @@ public class EventParticipantIndexDto extends PseudonymizableIndexDto implements public static final String EVENT_UUID = "eventUuid"; public static final String FIRST_NAME = "firstName"; public static final String LAST_NAME = "lastName"; + public static final String OTHER_NAME = "otherName"; public static final String SEX = "sex"; public static final String APPROXIMATE_AGE = "approximateAge"; public static final String INVOLVEMENT_DESCRIPTION = "involvementDescription"; @@ -37,6 +38,9 @@ public class EventParticipantIndexDto extends PseudonymizableIndexDto implements private String firstName; @SensitiveData private String lastName; + + @SensitiveData + private String otherName; private Sex sex; private Integer approximateAge; @SensitiveData @@ -125,6 +129,14 @@ public void setLastName(String lastName) { this.lastName = lastName; } + public String getOtherName() { + return otherName; + } + + public void setOtherName(String otherName) { + this.otherName = otherName; + } + public Sex getSex() { return sex; } @@ -190,6 +202,6 @@ public boolean getInJurisdictionOrOwned() { } public EventParticipantReferenceDto toReference() { - return new EventParticipantReferenceDto(getUuid(), firstName, lastName); + return new EventParticipantReferenceDto(getUuid(), firstName, lastName, otherName); } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/event/EventParticipantReferenceDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/event/EventParticipantReferenceDto.java index 8dc1857af61..653edb17ec3 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/event/EventParticipantReferenceDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/event/EventParticipantReferenceDto.java @@ -33,29 +33,31 @@ public class EventParticipantReferenceDto extends ReferenceDto { private String firstName; @PersonalData private String lastName; + @PersonalData + private String otherName; public EventParticipantReferenceDto() { - } public EventParticipantReferenceDto(String uuid) { setUuid(uuid); } - public EventParticipantReferenceDto(String uuid, String firstName, String lastName) { + public EventParticipantReferenceDto(String uuid, String firstName, String lastName, String otherName) { super(uuid); this.firstName = firstName; this.lastName = lastName; + this.otherName = lastName; } @Override public String getCaption() { - return buildCaption(getUuid(), firstName, lastName); + return buildCaption(getUuid(), firstName, lastName, otherName); } - public static String buildCaption(String uuid, String firstName, String lastName) { + public static String buildCaption(String uuid, String firstName, String lastName, String otherName) { - String personName = PersonDto.buildCaption(firstName, lastName); + String personName = PersonDto.buildCaption(firstName, lastName, otherName); String shortUuid = DataHelper.getShortUuid(uuid); if (personName.trim().length() > 0) { @@ -72,4 +74,5 @@ public String getFirstName() { public String getLastName() { return lastName; } + public String getOtherName() {return otherName;} } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java index 272e70aae61..713e77dad60 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java @@ -161,7 +161,7 @@ public class ExposureDto extends PseudonymizableDto { Disease.GUINEA_WORM, Disease.POLIO, Disease.CORONAVIRUS, - Disease.UNSPECIFIED_VHF, + Disease.AHF, Disease.UNDEFINED, Disease.OTHER }) private YesNoUnknown percutaneous; @@ -171,7 +171,7 @@ public class ExposureDto extends PseudonymizableDto { Disease.GUINEA_WORM, Disease.POLIO, Disease.CORONAVIRUS, - Disease.UNSPECIFIED_VHF, + Disease.AHF, Disease.UNDEFINED, Disease.OTHER }) private YesNoUnknown contactToBodyFluids; @@ -203,7 +203,7 @@ public class ExposureDto extends PseudonymizableDto { Disease.PLAGUE, Disease.ANTHRAX, Disease.POLIO, - Disease.UNSPECIFIED_VHF, + Disease.AHF, Disease.UNDEFINED, Disease.OTHER }) private YesNoUnknown handlingAnimals; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/externalmessage/ExternalMessageDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/externalmessage/ExternalMessageDto.java index d16d617f0d2..ffa7150e492 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/externalmessage/ExternalMessageDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/externalmessage/ExternalMessageDto.java @@ -85,6 +85,8 @@ public class ExternalMessageDto extends SormasToSormasShareableDto { private String personFirstName; @Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong) private String personLastName; + @Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong) + private String personOtherName; private Sex personSex; private PresentCondition personPresentCondition; private Integer personBirthDateDD; @@ -243,6 +245,14 @@ public void setPersonLastName(String personLastName) { this.personLastName = personLastName; } + public String getPersonOtherName() { + return personOtherName; + } + + public void setPersonOtherName(String personOtherName) { + this.personOtherName = personOtherName; + } + public Sex getPersonSex() { return personSex; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/externalmessage/ExternalMessageIndexDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/externalmessage/ExternalMessageIndexDto.java index a1e7058ea26..c66fb88ae4d 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/externalmessage/ExternalMessageIndexDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/externalmessage/ExternalMessageIndexDto.java @@ -21,6 +21,7 @@ public class ExternalMessageIndexDto implements Serializable { public static final String SAMPLE_OVERALL_TEST_RESULT = "sampleOverallTestResult"; public static final String PERSON_FIRST_NAME = "personFirstName"; public static final String PERSON_LAST_NAME = "personLastName"; + public static final String PERSON_OTHER_NAME = "personOtherName"; public static final String PERSON_BIRTH_DATE = "personBirthDate"; public static final String PERSON_POSTAL_CODE = "personPostalCode"; public static final String STATUS = "status"; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java index 7568a61057f..8534748e3c9 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java @@ -353,11 +353,13 @@ public interface Captions { String CaseData_numberOfVisits = "CaseData.numberOfVisits"; String CaseData_otherDeletionReason = "CaseData.otherDeletionReason"; String CaseData_outcome = "CaseData.outcome"; + String CaseData_clinialOutcome = "CaseData.clinicalOutcome"; String CaseData_outcomeDate = "CaseData.outcomeDate"; String CaseData_overwriteFollowUpUntil = "CaseData.overwriteFollowUpUntil"; String CaseData_person = "CaseData.person"; String CaseData_personFirstName = "CaseData.personFirstName"; String CaseData_personLastName = "CaseData.personLastName"; + String CaseData_personOtherName = "CaseData.personOtherName"; String CaseData_personUuid = "CaseData.personUuid"; String CaseData_plagueType = "CaseData.plagueType"; String CaseData_pointOfEntry = "CaseData.pointOfEntry"; @@ -368,6 +370,8 @@ public interface Captions { String CaseData_portHealthInfo = "CaseData.portHealthInfo"; String CaseData_postpartum = "CaseData.postpartum"; String CaseData_pregnant = "CaseData.pregnant"; + String CaseData_ipSampleSent = "CaseData.ipSampleSent"; + String CaseData_ipSampleResults = "CaseData.ipSampleResults"; String CaseData_previousInfectionDate = "CaseData.previousInfectionDate"; String CaseData_previousQuarantineTo = "CaseData.previousQuarantineTo"; String CaseData_prohibitionToWork = "CaseData.prohibitionToWork"; @@ -426,6 +430,8 @@ public interface Captions { String CaseData_trimester = "CaseData.trimester"; String CaseData_uuid = "CaseData.uuid"; String CaseData_vaccinationStatus = "CaseData.vaccinationStatus"; + String CaseData_vaccinationType = "CaseData.vaccinationType"; + String CaseData_vaccinationDate = "CaseData.vaccinationDate"; String CaseData_visits = "CaseData.visits"; String CaseData_wasInQuarantineBeforeIsolation = "CaseData.wasInQuarantineBeforeIsolation"; String caseDataEnterHomeAddressNow = "caseDataEnterHomeAddressNow"; @@ -458,6 +464,7 @@ public interface Captions { String CaseExport_lastCooperativeVisitSymptomatic = "CaseExport.lastCooperativeVisitSymptomatic"; String CaseExport_lastCooperativeVisitSymptoms = "CaseExport.lastCooperativeVisitSymptoms"; String CaseExport_lastName = "CaseExport.lastName"; + String CaseExport_otherName = "CaseExport.otherName"; String CaseExport_maxSourceCaseClassification = "CaseExport.maxSourceCaseClassification"; String CaseExport_numberOfClinicalVisits = "CaseExport.numberOfClinicalVisits"; String CaseExport_numberOfPrescriptions = "CaseExport.numberOfPrescriptions"; @@ -962,6 +969,7 @@ public interface Captions { String devModeSampleLaboratory = "devModeSampleLaboratory"; String devModeSampleMaterial = "devModeSampleMaterial"; String devModeSamplePathogenTestsToBePerformed = "devModeSamplePathogenTestsToBePerformed"; + String devModeSampleMaterialsToBeAdded = "devModeSampleMaterialsToBeAdded"; String devModeSampleReceived = "devModeSampleReceived"; String devModeSampleRegion = "devModeSampleRegion"; String devModeSampleSendDispatch = "devModeSampleSendDispatch"; @@ -1205,6 +1213,7 @@ public interface Captions { String EventParticipantExport_eventTitle = "EventParticipantExport.eventTitle"; String EventParticipantExport_eventTypeOfPlace = "EventParticipantExport.eventTypeOfPlace"; String EventParticipantExport_personNationalHealthId = "EventParticipantExport.personNationalHealthId"; + String EventParticipantExport_personGhanaCard = "EventParticipantExport.personGhanaCard"; String EventParticipantExport_sampleInformation = "EventParticipantExport.sampleInformation"; String eventParticipantSelect = "eventParticipantSelect"; String eventSearchEvent = "eventSearchEvent"; @@ -1370,6 +1379,7 @@ public interface Captions { String facilityAllFacilities = "facilityAllFacilities"; String facilityArchivedFacilities = "facilityArchivedFacilities"; String facilityType = "facilityType"; + String afpFacilityOptions = "afpFacilityOptions"; String facilityTypeGroup = "facilityTypeGroup"; String FeatureConfiguration_districtName = "FeatureConfiguration.districtName"; String FeatureConfiguration_enabled = "FeatureConfiguration.enabled"; @@ -1521,6 +1531,7 @@ public interface Captions { String Location_postalCode = "Location.postalCode"; String Location_region = "Location.region"; String Location_street = "Location.street"; + String Location_landmark = "Location.landmark"; String Location_subcontinent = "Location.subcontinent"; String Login_doLogIn = "Login.doLogIn"; String Login_login = "Login.login"; @@ -1589,6 +1600,7 @@ public interface Captions { String moreActions = "moreActions"; String name = "name"; String nationalHealthId = "nationalHealthId"; + String ghanaCard = "ghanaCard"; String notAvailableShort = "notAvailableShort"; String notSpecified = "notSpecified"; String notTestedYet = "notTestedYet"; @@ -1686,6 +1698,7 @@ public interface Captions { String Person_mothersName = "Person.mothersName"; String Person_namesOfGuardians = "Person.namesOfGuardians"; String Person_nationalHealthId = "Person.nationalHealthId"; + String Person_ghanaCard = "Person.ghanaCard"; String Person_nickname = "Person.nickname"; String Person_occupationCommunity = "Person.occupationCommunity"; String Person_occupationDetails = "Person.occupationDetails"; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Descriptions.java b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Descriptions.java index 5b134973b3a..32446782c6d 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Descriptions.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Descriptions.java @@ -18,6 +18,8 @@ public interface Descriptions { String CaseData_healthFacility = "CaseData.healthFacility"; String CaseData_measlesVaccination = "CaseData.measlesVaccination"; String CaseData_pregnant = "CaseData.pregnant"; + String CaseData_ipSampleSent = "CaseData.ipSampleSent"; + String CaseData_ipSampleResults = "CaseData.ipSampleResults"; String CaseData_reportLat = "CaseData.reportLat"; String CaseData_reportLatLonAccuracy = "CaseData.reportLatLonAccuracy"; String CaseData_reportLon = "CaseData.reportLon"; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java index 7ab9a047423..447d023d29b 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java @@ -575,6 +575,7 @@ public interface Strings { String headingLoginFailed = "headingLoginFailed"; String headingMaternalHistory = "headingMaternalHistory"; String headingMedicalInformation = "headingMedicalInformation"; + String clinicalOutCome = "clinicalOutcome"; String headingMergeGuide = "headingMergeGuide"; String headingMissingDateFilter = "headingMissingDateFilter"; String headingMissingEpiWeekFilter = "headingMissingEpiWeekFilter"; @@ -838,6 +839,7 @@ public interface Strings { String infoSampleAdditionalTesting = "infoSampleAdditionalTesting"; String infoSampleExport = "infoSampleExport"; String infoSamplePathogenTesting = "infoSamplePathogenTesting"; + String infoSampleMaterialSelection = "infoSampleMaterialSelection"; String infoSaveOfTask = "infoSaveOfTask"; String infoSearchCaseForContact = "infoSearchCaseForContact"; String infoSearchPerson = "infoSearchPerson"; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/immunization/ImmunizationDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/immunization/ImmunizationDto.java index 39643931806..a17a017230e 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/immunization/ImmunizationDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/immunization/ImmunizationDto.java @@ -15,6 +15,7 @@ package de.symeda.sormas.api.immunization; +import de.symeda.sormas.api.caze.CaseOrigin; import de.symeda.sormas.api.common.DeletionReason; import de.symeda.sormas.api.feature.FeatureType; import de.symeda.sormas.api.utils.DependingOnFeatureType; @@ -95,6 +96,8 @@ public class ImmunizationDto extends SormasToSormasShareableDto { @Outbreaks @Required private Disease disease; + @Required + private CaseOrigin caseOrigin; @Outbreaks @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String diseaseDetails; @@ -182,7 +185,12 @@ public static ImmunizationDto build(PersonReferenceDto person) { public ImmunizationReferenceDto toReference() { return new ImmunizationReferenceDto(getUuid(), getPerson().getCaption(), getExternalId()); } - + public CaseOrigin getCaseOrigin() { + return caseOrigin; + } + public void setCaseOrigin(CaseOrigin caseOrigin) { + this.caseOrigin = caseOrigin; + } public Disease getDisease() { return disease; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityDto.java index 89130f608ad..30776893fcc 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityDto.java @@ -31,6 +31,7 @@ import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto; +import de.symeda.sormas.api.utils.AFPFacilityOptions; import de.symeda.sormas.api.utils.DataHelper; import de.symeda.sormas.api.utils.DependingOnFeatureType; import de.symeda.sormas.api.utils.FieldConstraints; @@ -68,6 +69,7 @@ public class FacilityDto extends InfrastructureDto { public static final String LONGITUDE = "longitude"; public static final String TYPE_GROUP = "typeGroup"; public static final String TYPE = "type"; + public static final String AFP_TYPE = "afp_type"; public static final String EXTERNAL_ID = "externalID"; @Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong) @@ -101,6 +103,7 @@ public class FacilityDto extends InfrastructureDto { @Max(value = 180, message = Validations.numberTooBig) private Double longitude; private FacilityType type; + private AFPFacilityOptions afp_type; private boolean publicOwnership; private boolean archived; @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) @@ -134,6 +137,7 @@ public FacilityDto( Double latitude, Double longitude, FacilityType type, + AFPFacilityOptions afp_type, boolean publicOwnership, String externalID) { @@ -162,6 +166,7 @@ public FacilityDto( this.latitude = latitude; this.longitude = longitude; this.type = type; + this.afp_type = afp_type; this.publicOwnership = publicOwnership; this.externalID = externalID; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/location/LocationDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/location/LocationDto.java index 5e02ee23ff2..035d618ed26 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/location/LocationDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/location/LocationDto.java @@ -21,6 +21,7 @@ import javax.validation.constraints.Min; import javax.validation.constraints.Size; +import de.symeda.sormas.api.Disease; import org.apache.commons.lang3.StringUtils; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -73,6 +74,7 @@ public class LocationDto extends PseudonymizableDto { public static final String LONGITUDE = "longitude"; public static final String LAT_LON_ACCURACY = "latLonAccuracy"; public static final String POSTAL_CODE = "postalCode"; + public static final String LAND_MARK = "landMark"; public static final String STREET = "street"; public static final String HOUSE_NUMBER = "houseNumber"; public static final String ADDITIONAL_INFORMATION = "additionalInformation"; @@ -91,6 +93,7 @@ public class LocationDto extends PseudonymizableDto { private CountryReferenceDto country; private RegionReferenceDto region; private DistrictReferenceDto district; + private Disease disease; @PersonalData @SensitiveData private CommunityReferenceDto community; @@ -126,6 +129,10 @@ public class LocationDto extends PseudonymizableDto { @Pseudonymizer(PostalCodePseudonymizer.class) @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String postalCode; + @PersonalData() + @SensitiveData() + @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) + private String landMark; @PersonalData @SensitiveData @Size(max = FieldConstraints.CHARACTER_LIMIT_BIG, message = Validations.textTooLong) @@ -175,6 +182,14 @@ public void setDetails(String details) { this.details = details; } + public Disease getDisease() { + return disease; + } + + public void setDisease(Disease disease) { + this.disease = disease; + } + public String getCity() { return city; } @@ -271,6 +286,10 @@ public void setPostalCode(String postalCode) { this.postalCode = postalCode; } + public String getLandMark(){return landMark;} + + public void setLandMark(String landMark){this.landMark = landMark;} + public String getStreet() { return street; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/person/JournalPersonDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/person/JournalPersonDto.java index 50ec8e4baef..fc9409a1383 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/person/JournalPersonDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/person/JournalPersonDto.java @@ -18,6 +18,8 @@ public class JournalPersonDto implements Serializable { private String firstName; @PersonalData private String lastName; + @PersonalData + private String otherName; @SensitiveData private String emailAddress; @SensitiveData @@ -65,6 +67,14 @@ public void setLastName(String lastName) { this.lastName = lastName; } + public String getOtherName() { + return otherName; + } + + public void setOtherName(String otherName) { + this.otherName = otherName; + } + public String getEmailAddress() { return emailAddress; } @@ -131,7 +141,7 @@ public void setFollowUpStatus(FollowUpStatus followUpStatus) { @Override public String toString() { - return uuid + ' ' + firstName + ' ' + lastName; + return uuid + ' ' + firstName + ' ' + lastName + ' ' + otherName; } @Override @@ -145,6 +155,7 @@ public boolean equals(Object o) { && Objects.equals(uuid, that.uuid) && Objects.equals(firstName, that.firstName) && Objects.equals(lastName, that.lastName) + && Objects.equals(otherName, that.otherName) && Objects.equals(emailAddress, that.emailAddress) && Objects.equals(phone, that.phone) && Objects.equals(birthdateDD, that.birthdateDD) @@ -162,6 +173,7 @@ public int hashCode() { pseudonymized, firstName, lastName, + otherName, emailAddress, phone, birthdateDD, diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonDto.java index 237c621678c..c13f8024125 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonDto.java @@ -22,6 +22,7 @@ import javax.validation.Valid; import javax.validation.constraints.Size; +import de.symeda.sormas.api.caze.CaseOrigin; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -69,9 +70,11 @@ public class PersonDto extends PseudonymizableDto { public static final String SEX = "sex"; public static final String FIRST_NAME = "firstName"; public static final String LAST_NAME = "lastName"; + public static final String OTHER_NAME = "otherName"; public static final String SALUTATION = "salutation"; public static final String OTHER_SALUTATION = "otherSalutation"; public static final String PRESENT_CONDITION = "presentCondition"; + public static final String CASE_ORIGIN = "caseOrigin"; public static final String BIRTH_DATE = "birthdate"; public static final String BIRTH_DATE_DD = "birthdateDD"; public static final String BIRTH_DATE_MM = "birthdateMM"; @@ -113,6 +116,7 @@ public class PersonDto extends PseudonymizableDto { public static final String BIRTH_WEIGHT = "birthWeight"; public static final String PASSPORT_NUMBER = "passportNumber"; public static final String NATIONAL_HEALTH_ID = "nationalHealthId"; + public static final String GHANA_CARD = "ghanaCard"; public static final String EMAIL_ADDRESS = "emailAddress"; public static final String OTHER_CONTACT_DETAILS = "otherContactDetails"; public static final String PLACE_OF_BIRTH_FACILITY_TYPE = "placeOfBirthFacilityType"; @@ -142,6 +146,11 @@ public class PersonDto extends PseudonymizableDto { @SensitiveData(mandatoryField = true) @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String lastName; + @Outbreaks + @PersonalData(mandatoryField = false) + @SensitiveData(mandatoryField = false) + @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) + private String otherName; @HideForCountriesExcept @PersonalData @SensitiveData @@ -242,6 +251,9 @@ public class PersonDto extends PseudonymizableDto { @Outbreaks private PresentCondition presentCondition; + + @Outbreaks + private CaseOrigin caseOrigin; private Date deathDate; private CauseOfDeath causeOfDeath; private Disease causeOfDeathDisease; @@ -253,7 +265,7 @@ public class PersonDto extends PseudonymizableDto { Disease.EVD, Disease.GUINEA_WORM, Disease.POLIO, - Disease.UNSPECIFIED_VHF, + Disease.AHF, Disease.CORONAVIRUS, Disease.UNDEFINED, Disease.OTHER }) @@ -263,7 +275,7 @@ public class PersonDto extends PseudonymizableDto { Disease.EVD, Disease.GUINEA_WORM, Disease.POLIO, - Disease.UNSPECIFIED_VHF, + Disease.AHF, Disease.CORONAVIRUS, Disease.UNDEFINED, Disease.OTHER }) @@ -276,7 +288,7 @@ public class PersonDto extends PseudonymizableDto { Disease.GUINEA_WORM, Disease.LASSA, Disease.POLIO, - Disease.UNSPECIFIED_VHF, + Disease.AHF, Disease.UNDEFINED, Disease.OTHER }) @HideForCountries @@ -287,7 +299,7 @@ public class PersonDto extends PseudonymizableDto { Disease.GUINEA_WORM, Disease.LASSA, Disease.POLIO, - Disease.UNSPECIFIED_VHF, + Disease.AHF, Disease.UNDEFINED, Disease.OTHER }) @SensitiveData @@ -300,7 +312,7 @@ public class PersonDto extends PseudonymizableDto { Disease.GUINEA_WORM, Disease.LASSA, Disease.POLIO, - Disease.UNSPECIFIED_VHF, + Disease.AHF, Disease.UNDEFINED, Disease.OTHER }) @HideForCountries @@ -338,6 +350,11 @@ public class PersonDto extends PseudonymizableDto { @Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong) @HideForCountries private String nationalHealthId; + + @SensitiveData + @Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong) + @HideForCountries + private String ghanaCard; @Valid private List addresses = new ArrayList<>(); @Valid @@ -375,6 +392,10 @@ public class PersonDto extends PseudonymizableDto { @Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong) private String additionalDetails; + @Outbreaks + @Required + private Disease disease; + @SuppressWarnings("serial") public static class SeveralNonPrimaryContactDetailsException extends RuntimeException { @@ -383,8 +404,8 @@ public SeveralNonPrimaryContactDetailsException(String message) { } } - public static String buildCaption(String firstName, String lastName) { - return DataHelper.toStringNullable(firstName) + " " + DataHelper.toStringNullable(replaceGermanChars(lastName)).toUpperCase(); + public static String buildCaption(String firstName, String lastName, String otherName) { + return DataHelper.toStringNullable(firstName) + " " + DataHelper.toStringNullable(replaceGermanChars(lastName)).toUpperCase() + " " + DataHelper.toStringNullable(otherName); } /* @@ -415,6 +436,7 @@ public static PersonDto buildImportEntity() { return person; } + public Integer getBirthdateDD() { return birthdateDD; } @@ -519,6 +541,9 @@ public void setPresentCondition(PresentCondition presentCondition) { this.presentCondition = presentCondition; } + public CaseOrigin getCaseOrigin() {return caseOrigin;} + public void setCaseOrigin(CaseOrigin caseOrigin) {this.caseOrigin = caseOrigin;} + public CauseOfDeath getCauseOfDeath() { return causeOfDeath; } @@ -750,6 +775,12 @@ public void setLastName(String lastName) { this.lastName = lastName; } + public String getOtherName() { + return otherName; + } + public void setOtherName(String otherName) { + this.otherName = otherName; + } public Salutation getSalutation() { return salutation; } @@ -902,6 +933,14 @@ public void setNationalHealthId(String nationalHealthId) { this.nationalHealthId = nationalHealthId; } + public String getGhanaCard() { + return ghanaCard; + } + + public void setGhanaCard(String ghanaCard) { + this.ghanaCard = ghanaCard; + } + public FacilityType getPlaceOfBirthFacilityType() { return placeOfBirthFacilityType; } @@ -1009,9 +1048,17 @@ public void setAdditionalDetails(String additionalDetails) { this.additionalDetails = additionalDetails; } + public Disease getDisease() { + return disease; + } + + public void setDisease(Disease disease) { + this.disease = disease; + } + @Override public String buildCaption() { - return buildCaption(firstName, lastName); + return buildCaption(firstName, lastName, otherName); } @JsonIgnore @@ -1020,7 +1067,7 @@ public String i18nPrefix() { } public PersonReferenceDto toReference() { - return new PersonReferenceDto(getUuid(), firstName, lastName); + return new PersonReferenceDto(getUuid(), firstName, lastName, otherName); } @Override diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonExportDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonExportDto.java index 2e49f9aea55..79d1a83d30d 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonExportDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonExportDto.java @@ -50,6 +50,10 @@ public class PersonExportDto implements Serializable { @PersonalData @SensitiveData private String lastName; + @PersonalData + @SensitiveData + private String otherName; + @PersonalData @SensitiveData private Salutation salutation; @@ -137,7 +141,8 @@ public class PersonExportDto implements Serializable { private String passportNumber; @SensitiveData private String nationalHealthId; - + @SensitiveData + private String ghanaCard; private boolean hasCovidApp; private boolean covidCodeDelivered; @@ -160,6 +165,7 @@ public PersonExportDto( String uuid, String firstName, String lastName, + String otherName, Salutation salutation, String otherSalutation, Sex sex, @@ -214,6 +220,7 @@ public PersonExportDto( this.uuid = uuid; this.firstName = firstName; this.lastName = lastName; + this.otherName = otherName; this.salutation = salutation; this.otherSalutation = otherSalutation; this.sex = sex; @@ -268,6 +275,7 @@ public PersonExportDto( String uuid, String firstName, String lastName, + String otherName, Sex sex, String district, String street, @@ -281,6 +289,7 @@ public PersonExportDto( this.uuid = uuid; this.firstName = firstName; this.lastName = lastName; + this.otherName = otherName; this.sex = sex; this.district = district; this.street = street; @@ -313,6 +322,13 @@ public String getLastName() { return lastName; } + @Order(2) + @ExportProperty(PersonDto.OTHER_NAME) + @ExportGroup(ExportGroupType.CORE) + public String getOtherName() { + return otherName; + } + @Order(3) @ExportProperty(PersonDto.SALUTATION) @ExportGroup(ExportGroupType.CORE) @@ -608,9 +624,7 @@ public String getPassportNumber() { @ExportProperty(PersonDto.NATIONAL_HEALTH_ID) @ExportGroup(ExportGroupType.CORE) @HideForCountries - public String getNationalHealthId() { - return nationalHealthId; - } + public String getNationalHealthId() {return nationalHealthId;} @Order(62) @ExportProperty(PersonDto.HAS_COVID_APP) @@ -681,6 +695,13 @@ public String getAdditionalDetails() { return additionalDetails; } + @Order(76) + @ExportProperty(PersonDto.GHANA_CARD) + @ExportGroup(ExportGroupType.CORE) + @HideForCountries + public String getGhanaCard() { + return ghanaCard; + } public Boolean getInJurisdiction() { return isInJurisdiction; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonIndexDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonIndexDto.java index 2adea1dff04..42af38e9404 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonIndexDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonIndexDto.java @@ -19,6 +19,7 @@ public class PersonIndexDto extends PseudonymizableIndexDto implements Serializa public static final String UUID = "uuid"; public static final String FIRST_NAME = "firstName"; public static final String LAST_NAME = "lastName"; + public static final String OTHER_NAME = "otherName"; public static final String AGE_AND_BIRTH_DATE = "ageAndBirthDate"; public static final String SEX = "sex"; public static final String DISTRICT = "district"; @@ -35,6 +36,9 @@ public class PersonIndexDto extends PseudonymizableIndexDto implements Serializa @PersonalData @SensitiveData private String lastName; + @PersonalData + @SensitiveData + private String otherName; private AgeAndBirthDateDto ageAndBirthDate; private Sex sex; private String district; @@ -62,6 +66,7 @@ public PersonIndexDto( String uuid, String firstName, String lastName, + String otherName, Integer age, ApproximateAgeType ageType, Integer birthdateDD, @@ -81,6 +86,7 @@ public PersonIndexDto( super(uuid); this.firstName = firstName; this.lastName = lastName; + this.otherName = otherName; this.ageAndBirthDate = new AgeAndBirthDateDto(age, ageType, birthdateDD, birthdateMM, birthdateYYYY); this.sex = sex; this.district = district; @@ -102,14 +108,18 @@ public void setFirstName(String firstName) { this.firstName = firstName; } - public String getLastName() { - return lastName; - } + public String getLastName() {return lastName;} public void setLastName(String lastName) { this.lastName = lastName; } + public String getOtherName() {return otherName;} + + public void setOtherName(String otherName) { + this.otherName = otherName; + } + public AgeAndBirthDateDto getAgeAndBirthDate() { return ageAndBirthDate; } @@ -200,7 +210,7 @@ public void setInJurisdiction(Boolean inJurisdiction) { @Override public String getCaption() { - return PersonDto.buildCaption(getFirstName(), getLastName()); + return PersonDto.buildCaption(getFirstName(), getLastName(), getOtherName()); } @Override diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonReferenceDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonReferenceDto.java index a65d84006b9..5bf59bc28a3 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonReferenceDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonReferenceDto.java @@ -36,6 +36,9 @@ public class PersonReferenceDto extends ReferenceDto { @PersonalData private String lastName; + @PersonalData + private String otherName; + public PersonReferenceDto() { } @@ -44,17 +47,18 @@ public PersonReferenceDto(String uuid) { setUuid(uuid); } - public PersonReferenceDto(String uuid, String firstName, String lastName) { + public PersonReferenceDto(String uuid, String firstName, String lastName, String otherName) { setUuid(uuid); this.firstName = firstName; this.lastName = lastName; + this.otherName = otherName; } @Override public String getCaption() { - return PersonDto.buildCaption(firstName, lastName); + return PersonDto.buildCaption(firstName, lastName, otherName); } public String getFirstName() { @@ -64,12 +68,13 @@ public String getFirstName() { public String getLastName() { return lastName; } + public String getOtherName() {return otherName;} public void setFirstName(String firstName) { this.firstName = firstName; } - public void setLastName(String lastName) { this.lastName = lastName; } + public void setOtherName(String otherName) {this.otherName = otherName;} } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonSimilarityCriteria.java b/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonSimilarityCriteria.java index fe9befc60ca..a5953417a0a 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonSimilarityCriteria.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonSimilarityCriteria.java @@ -18,6 +18,7 @@ public class PersonSimilarityCriteria extends BaseCriteria implements Cloneable private Integer birthdateDD; private String passportNumber; private String nationalHealthId; + private String ghanaCard; private String uuidExternalIdExternalTokenLike; @IgnoreForUrl @@ -108,6 +109,15 @@ public PersonSimilarityCriteria nationalHealthId(String nationalHealthId) { return this; } + @IgnoreForUrl + public String getGhanaCard() { + return ghanaCard; + } + + public PersonSimilarityCriteria ghanaCard(String ghanaCard) { + this.ghanaCard = ghanaCard; + return this; + } public String getUuidExternalIdExternalTokenLike() { return uuidExternalIdExternalTokenLike; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/person/SimilarPersonDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/person/SimilarPersonDto.java index 7555211e151..85f511e0792 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/person/SimilarPersonDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/person/SimilarPersonDto.java @@ -33,6 +33,7 @@ public class SimilarPersonDto implements Serializable { private String uuid; private String firstName; private String lastName; + private String otherName; @HideForCountries private String nickname; private String ageAndBirthDate; @@ -50,6 +51,9 @@ public class SimilarPersonDto implements Serializable { @HideForCountries(countries = {CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_FRANCE}) private String passportNumber; + @HideForCountries + private String ghanaCard; + public String getUuid() { return uuid; } @@ -74,6 +78,14 @@ public void setLastName(String lastName) { this.lastName = lastName; } + public String getOtherName() { + return otherName; + } + + public void setOtherName(String otherName) { + this.otherName = otherName; + } + public String getNickname() { return nickname; } @@ -178,13 +190,21 @@ public void setPassportNumber(String passportNumber) { this.passportNumber = passportNumber; } + public String getGhanaCard() { + return ghanaCard; + } + + public void setGhanaCard(String ghanaCard) { + this.ghanaCard = ghanaCard; + } + public PersonReferenceDto toReference() { - return new PersonReferenceDto(getUuid(), firstName, lastName); + return new PersonReferenceDto(getUuid(), firstName, lastName, otherName); } @Override public String toString() { - return PersonDto.buildCaption(firstName, lastName); + return PersonDto.buildCaption(firstName, lastName, otherName); } public static String getI18nPrefix(String propertyId) { diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleDto.java index 387d9251449..656194c3b4e 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleDto.java @@ -68,8 +68,10 @@ public class SampleDto extends SormasToSormasShareableDto { public static final String SHIPPED = "shipped"; public static final String RECEIVED = "received"; public static final String PATHOGEN_TESTING_REQUESTED = "pathogenTestingRequested"; + public static final String SAMPLE_MATERIAL_REQUESTED = "sampleMaterialRequested"; public static final String ADDITIONAL_TESTING_REQUESTED = "additionalTestingRequested"; public static final String REQUESTED_PATHOGEN_TESTS = "requestedPathogenTests"; + public static final String REQUESTED_SAMPLE_MATERIALS = "requestedSampleMaterials"; public static final String REQUESTED_ADDITIONAL_TESTS = "requestedAdditionalTests"; public static final String PATHOGEN_TEST_RESULT = "pathogenTestResult"; public static final String REQUESTED_OTHER_PATHOGEN_TESTS = "requestedOtherPathogenTests"; @@ -135,8 +137,10 @@ public class SampleDto extends SormasToSormasShareableDto { private PathogenTestResultType pathogenTestResult; private Boolean pathogenTestingRequested; + private Boolean sampleMaterialRequested; private Boolean additionalTestingRequested; private Set requestedPathogenTests; + private Set requestedSampleMaterials; private Set requestedAdditionalTests; @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String requestedOtherPathogenTests; @@ -360,6 +364,15 @@ public void setPathogenTestingRequested(Boolean pathogenTestingRequested) { this.pathogenTestingRequested = pathogenTestingRequested; } + @ImportIgnore + public Boolean getSampleMaterialRequested() { + return sampleMaterialRequested; + } + + public void setSampleMaterialRequested(Boolean sampleMaterialRequested) { + this.sampleMaterialRequested = sampleMaterialRequested; + } + @ImportIgnore public Boolean getAdditionalTestingRequested() { return additionalTestingRequested; @@ -378,6 +391,14 @@ public void setRequestedPathogenTests(Set requestedPathogenTes this.requestedPathogenTests = requestedPathogenTests; } + public Set getRequestedSampleMaterials() { + return requestedSampleMaterials; + } + + public void setRequestedSampleMaterials(Set requestedSampleMaterials) { + this.requestedSampleMaterials = requestedSampleMaterials; + } + @ImportIgnore public Set getRequestedAdditionalTests() { return requestedAdditionalTests; @@ -489,8 +510,10 @@ private static void migrateAttributesOfPhysicalSample(SampleDto source, SampleDt target.setSampleMaterialText(source.getSampleMaterialText()); target.setSampleSource(source.getSampleSource()); target.setPathogenTestingRequested(source.getPathogenTestingRequested()); + target.setSampleMaterialRequested(source.getSampleMaterialRequested()); target.setAdditionalTestingRequested(source.getAdditionalTestingRequested()); target.setRequestedPathogenTests(source.getRequestedPathogenTests()); + target.setRequestedSampleMaterials(source.getRequestedSampleMaterials()); target.setRequestedAdditionalTests(source.getRequestedAdditionalTests()); target.setFieldSampleID(source.getFieldSampleID()); target.setSamplingReason(source.getSamplingReason()); diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleExportDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleExportDto.java index ef8c22c94eb..b52fc3286dd 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleExportDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleExportDto.java @@ -116,7 +116,7 @@ public class SampleExportDto implements Serializable { private SampleJurisdictionFlagsDto sampleJurisdictionFlagsDto; //@formatter:off - public SampleExportDto(long id, String uuid, String labSampleId, Date sampleReportDate,String epidNumber, String casePersonFirstName, String casePersonLastName, String contactPersonFirstName, String contactPersonLastName,String eventParticipantFirstName, String eventParticipantLastName, + public SampleExportDto(long id, String uuid, String labSampleId, Date sampleReportDate,String epidNumber, String casePersonFirstName, String casePersonLastName, String casePersonOtherName, String contactPersonFirstName, String contactPersonLastName, String contactPersonOtherName,String eventParticipantFirstName, String eventParticipantLastName, String eventParticipantOtherName, Disease caseDisease, String caseDiseaseDetails, Disease contactDisease, String contactDiseaseDetails, Disease eventDisease, String eventDiseaseDetails, Date sampleDateTime, SampleMaterial sampleMaterial, String sampleMaterialDetails, SamplePurpose samplePurpose, SamplingReason samplingReason, String samplingReasonDetails, @@ -148,6 +148,7 @@ public SampleExportDto(long id, String uuid, String labSampleId, Date sampleRepo caseUuid, casePersonFirstName, casePersonLastName, + casePersonOtherName, caseRegion, caseDistrict, caseCommunity, @@ -156,14 +157,14 @@ public SampleExportDto(long id, String uuid, String labSampleId, Date sampleRepo caseFacilityDetails); } if (contactUuid != null) { - this.associatedContact = new ContactReferenceDto(contactUuid, contactPersonFirstName, contactPersonLastName, null, null); + this.associatedContact = new ContactReferenceDto(contactUuid, contactPersonFirstName, contactPersonLastName, contactPersonOtherName, null, null, null); this.contactRegion = contactRegion; this.contactDistrict = contactDistrict; this.contactCommunity = contactCommunity; } if (eventParticipantUuid != null) { this.associatedEventParticipant = - new EventParticipantReferenceDto(eventParticipantUuid, eventParticipantFirstName, eventParticipantLastName); + new EventParticipantReferenceDto(eventParticipantUuid, eventParticipantFirstName, eventParticipantLastName, eventParticipantOtherName); } this.disease = caseUuid != null @@ -851,13 +852,14 @@ public SampleExportAssociatedCase( String uuid, String firstName, String lastName, + String otherName, String region, String district, String community, String facilityUuid, String facility, String facilityDetails) { - super(uuid, firstName, lastName); + super(uuid, firstName, lastName, otherName); this.region = region; this.district = district; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleIndexDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleIndexDto.java index 9ef92bd6a55..5a9635a8723 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleIndexDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleIndexDto.java @@ -106,9 +106,9 @@ public SampleIndexDto(String uuid, String epidNumber, String labSampleId, Date s SampleMaterial sampleMaterial, SamplePurpose samplePurpose, SpecimenCondition specimenCondition, String labName, String referredSampleUuid, SamplingReason samplingReason, String samplingReasonDetails, - String associatedCaseUuid, String associatedCaseFirstName, String associatedCaseLastName, - String associatedContactUuid, String associatedContactFirstName, String associatedContactLastName, - String associatedEventParticipantUuid, String associatedEventParticipantFirstName, String associatedEventParticipantLastName, + String associatedCaseUuid, String associatedCaseFirstName, String associatedCaseLastName, String associatedCaseOtherName, + String associatedContactUuid, String associatedContactFirstName, String associatedContactLastName, String associatedContactOtherName, + String associatedEventParticipantUuid, String associatedEventParticipantFirstName, String associatedEventParticipantLastName, String associatedEventParticipantOtherName, Disease disease, String diseaseDetails, PathogenTestResultType pathogenTestResult, Boolean additionalTestingRequested, Boolean additionalTestPerformed, String districtName, String labUuid, Long pathogenTestCount, boolean isInJurisdiction, boolean isCaseInJurisdiction, boolean isContactInJurisdiction, boolean isContactCaseInJurisdiction, boolean isEventParticipantInJurisdiction) { @@ -116,17 +116,18 @@ public SampleIndexDto(String uuid, String epidNumber, String labSampleId, Date s super(uuid); if (associatedCaseUuid != null) { - this.associatedCase = new CaseReferenceDto(associatedCaseUuid, associatedCaseFirstName, associatedCaseLastName); + this.associatedCase = new CaseReferenceDto(associatedCaseUuid, associatedCaseFirstName, associatedCaseLastName, associatedCaseOtherName); } if (associatedContactUuid != null) { this.associatedContact = - new ContactReferenceDto(associatedContactUuid, associatedContactFirstName, associatedContactLastName, null, null); + new ContactReferenceDto(associatedContactUuid, associatedContactFirstName, associatedContactLastName, associatedContactOtherName, null, null, null); } if (associatedEventParticipantUuid != null) { this.associatedEventParticipant = new EventParticipantReferenceDto( associatedEventParticipantUuid, associatedEventParticipantFirstName, - associatedEventParticipantLastName); + associatedEventParticipantLastName, + associatedEventParticipantOtherName); } this.epidNumber = epidNumber; this.labSampleID = labSampleId; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java index b827bedd2c6..ca66b24f012 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java @@ -19,26 +19,7 @@ import static de.symeda.sormas.api.CountryHelper.COUNTRY_CODE_GERMANY; import static de.symeda.sormas.api.CountryHelper.COUNTRY_CODE_SWITZERLAND; -import static de.symeda.sormas.api.Disease.AFP; -import static de.symeda.sormas.api.Disease.ANTHRAX; -import static de.symeda.sormas.api.Disease.CHOLERA; -import static de.symeda.sormas.api.Disease.CONGENITAL_RUBELLA; -import static de.symeda.sormas.api.Disease.CORONAVIRUS; -import static de.symeda.sormas.api.Disease.CSM; -import static de.symeda.sormas.api.Disease.DENGUE; -import static de.symeda.sormas.api.Disease.EVD; -import static de.symeda.sormas.api.Disease.GUINEA_WORM; -import static de.symeda.sormas.api.Disease.LASSA; -import static de.symeda.sormas.api.Disease.MEASLES; -import static de.symeda.sormas.api.Disease.MONKEYPOX; -import static de.symeda.sormas.api.Disease.NEW_INFLUENZA; -import static de.symeda.sormas.api.Disease.OTHER; -import static de.symeda.sormas.api.Disease.PLAGUE; -import static de.symeda.sormas.api.Disease.POLIO; -import static de.symeda.sormas.api.Disease.RABIES; -import static de.symeda.sormas.api.Disease.UNDEFINED; -import static de.symeda.sormas.api.Disease.UNSPECIFIED_VHF; -import static de.symeda.sormas.api.Disease.YELLOW_FEVER; +import static de.symeda.sormas.api.Disease.*; import java.util.Date; @@ -280,7 +261,7 @@ public static SymptomsDto build() { POLIO, ANTHRAX, CORONAVIRUS, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -296,7 +277,7 @@ public static SymptomsDto build() { CHOLERA, POLIO, YELLOW_FEVER, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @Outbreaks @@ -309,7 +290,7 @@ public static SymptomsDto build() { GUINEA_WORM, POLIO, YELLOW_FEVER, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -344,7 +325,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @@ -359,7 +340,7 @@ public static SymptomsDto build() { POLIO, YELLOW_FEVER, ANTHRAX, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -376,7 +357,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @@ -390,7 +371,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @@ -431,7 +412,7 @@ public static SymptomsDto build() { POLIO, ANTHRAX, CORONAVIRUS, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @Outbreaks @@ -461,7 +442,7 @@ public static SymptomsDto build() { MEASLES, MONKEYPOX, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries(countries = { @@ -481,7 +462,7 @@ public static SymptomsDto build() { PLAGUE, POLIO, ANTHRAX, - UNSPECIFIED_VHF, + AHF, CORONAVIRUS, UNDEFINED, OTHER }) @@ -510,7 +491,7 @@ public static SymptomsDto build() { LASSA, PLAGUE, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @Outbreaks @@ -524,7 +505,7 @@ public static SymptomsDto build() { GUINEA_WORM, POLIO, YELLOW_FEVER, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -538,7 +519,7 @@ public static SymptomsDto build() { LASSA, CHOLERA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -558,7 +539,7 @@ public static SymptomsDto build() { POLIO, ANTHRAX, CORONAVIRUS, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @Outbreaks @@ -574,7 +555,7 @@ public static SymptomsDto build() { MEASLES, PLAGUE, POLIO, - UNSPECIFIED_VHF, + AHF, RABIES, ANTHRAX, CORONAVIRUS, @@ -589,7 +570,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @@ -608,7 +589,7 @@ public static SymptomsDto build() { DENGUE, MONKEYPOX, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @Outbreaks @@ -621,7 +602,7 @@ public static SymptomsDto build() { GUINEA_WORM, POLIO, YELLOW_FEVER, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @@ -643,7 +624,7 @@ public static SymptomsDto build() { MONKEYPOX, PLAGUE, POLIO, - UNSPECIFIED_VHF, + AHF, RABIES, ANTHRAX, CORONAVIRUS, @@ -670,7 +651,7 @@ public static SymptomsDto build() { MONKEYPOX, PLAGUE, POLIO, - UNSPECIFIED_VHF, + AHF, RABIES, ANTHRAX, CORONAVIRUS, @@ -685,7 +666,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries(countries = { @@ -705,7 +686,7 @@ public static SymptomsDto build() { POLIO, YELLOW_FEVER, DENGUE, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @@ -725,7 +706,7 @@ public static SymptomsDto build() { MONKEYPOX, PLAGUE, POLIO, - UNSPECIFIED_VHF, + AHF, RABIES, ANTHRAX, CORONAVIRUS, @@ -741,7 +722,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, CONGENITAL_RUBELLA, UNDEFINED, OTHER }) @@ -758,7 +739,7 @@ public static SymptomsDto build() { EVD, GUINEA_WORM, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -771,7 +752,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @@ -785,7 +766,7 @@ public static SymptomsDto build() { YELLOW_FEVER, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, CONGENITAL_RUBELLA, UNDEFINED, OTHER }) @@ -810,7 +791,7 @@ public static SymptomsDto build() { MEASLES, DENGUE, CORONAVIRUS, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @Outbreaks @@ -1030,7 +1011,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -1085,7 +1066,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -1109,7 +1090,7 @@ public static SymptomsDto build() { PLAGUE, POLIO, CORONAVIRUS, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @Outbreaks @@ -1128,7 +1109,7 @@ public static SymptomsDto build() { DENGUE, MONKEYPOX, PLAGUE, - UNSPECIFIED_VHF, + AHF, POLIO, RABIES, ANTHRAX, @@ -1158,7 +1139,7 @@ public static SymptomsDto build() { LASSA, POLIO, YELLOW_FEVER, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @@ -1171,7 +1152,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -1183,7 +1164,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -1214,7 +1195,7 @@ public static SymptomsDto build() { LASSA, PLAGUE, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @@ -1231,7 +1212,7 @@ public static SymptomsDto build() { LASSA, PLAGUE, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @DependantOn(OTHER_HEMORRHAGIC_SYMPTOMS) @@ -1255,7 +1236,7 @@ public static SymptomsDto build() { DENGUE, MONKEYPOX, PLAGUE, - UNSPECIFIED_VHF, + AHF, CONGENITAL_RUBELLA, POLIO, RABIES, @@ -1279,7 +1260,7 @@ public static SymptomsDto build() { MONKEYPOX, PLAGUE, POLIO, - UNSPECIFIED_VHF, + AHF, CONGENITAL_RUBELLA, CORONAVIRUS, UNDEFINED, @@ -1320,7 +1301,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -1332,7 +1313,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -1355,7 +1336,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -1367,7 +1348,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -1380,7 +1361,7 @@ public static SymptomsDto build() { DENGUE, GUINEA_WORM, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @SymptomGrouping(SymptomGroup.RESPIRATORY) @@ -1393,7 +1374,7 @@ public static SymptomsDto build() { LASSA, DENGUE, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @@ -1409,7 +1390,7 @@ public static SymptomsDto build() { CSM, CHOLERA, POLIO, - UNSPECIFIED_VHF, + AHF, RABIES, UNDEFINED, OTHER }) @@ -1436,7 +1417,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -1449,7 +1430,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @@ -1468,7 +1449,7 @@ public static SymptomsDto build() { MEASLES, DENGUE, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER, CORONAVIRUS }) @@ -1489,7 +1470,7 @@ public static SymptomsDto build() { ANTHRAX, POLIO, CORONAVIRUS, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @SymptomGrouping(SymptomGroup.RESPIRATORY) @@ -1500,7 +1481,7 @@ public static SymptomsDto build() { GUINEA_WORM, POLIO, YELLOW_FEVER, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @@ -1513,7 +1494,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -1525,7 +1506,7 @@ public static SymptomsDto build() { DENGUE, GUINEA_WORM, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -1547,7 +1528,7 @@ public static SymptomsDto build() { MONKEYPOX, PLAGUE, POLIO, - UNSPECIFIED_VHF, + AHF, CONGENITAL_RUBELLA, CORONAVIRUS, UNDEFINED, @@ -1569,7 +1550,7 @@ public static SymptomsDto build() { DENGUE, MONKEYPOX, PLAGUE, - UNSPECIFIED_VHF, + AHF, CONGENITAL_RUBELLA, POLIO, RABIES, @@ -1592,7 +1573,7 @@ public static SymptomsDto build() { DENGUE, MONKEYPOX, PLAGUE, - UNSPECIFIED_VHF, + AHF, CONGENITAL_RUBELLA, POLIO, CORONAVIRUS, @@ -1607,7 +1588,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -1619,7 +1600,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @HideForCountries @@ -1712,7 +1693,7 @@ public static SymptomsDto build() { YELLOW_FEVER, DENGUE, PLAGUE, - UNSPECIFIED_VHF, + AHF, UNDEFINED, POLIO, OTHER, @@ -1737,7 +1718,7 @@ public static SymptomsDto build() { MONKEYPOX, PLAGUE, ANTHRAX, - UNSPECIFIED_VHF, + AHF, UNDEFINED, POLIO, CORONAVIRUS, @@ -2020,7 +2001,7 @@ public static SymptomsDto build() { CHOLERA, MEASLES, POLIO, - UNSPECIFIED_VHF, + AHF, RABIES, UNDEFINED, OTHER }) @@ -2040,7 +2021,7 @@ public static SymptomsDto build() { MEASLES, PLAGUE, POLIO, - UNSPECIFIED_VHF, + AHF, RABIES, CORONAVIRUS, UNDEFINED, @@ -2059,7 +2040,7 @@ public static SymptomsDto build() { YELLOW_FEVER, DENGUE, PLAGUE, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @Outbreaks @@ -2073,7 +2054,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @Outbreaks @@ -2087,7 +2068,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @Outbreaks @@ -2101,7 +2082,7 @@ public static SymptomsDto build() { GUINEA_WORM, LASSA, POLIO, - UNSPECIFIED_VHF, + AHF, RABIES, UNDEFINED, OTHER }) @@ -2120,7 +2101,7 @@ public static SymptomsDto build() { CHOLERA, MEASLES, POLIO, - UNSPECIFIED_VHF, + AHF, GUINEA_WORM, RABIES, YELLOW_FEVER, @@ -2144,7 +2125,7 @@ public static SymptomsDto build() { CHOLERA, MEASLES, POLIO, - UNSPECIFIED_VHF, + AHF, GUINEA_WORM, RABIES, YELLOW_FEVER, @@ -2171,7 +2152,7 @@ public static SymptomsDto build() { CHOLERA, MEASLES, POLIO, - UNSPECIFIED_VHF, + AHF, RABIES, CORONAVIRUS, UNDEFINED, @@ -2191,7 +2172,7 @@ public static SymptomsDto build() { CHOLERA, MEASLES, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @Outbreaks @@ -2211,7 +2192,7 @@ public static SymptomsDto build() { PLAGUE, ANTHRAX, POLIO, - UNSPECIFIED_VHF, + AHF, UNDEFINED, OTHER }) @Outbreaks diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/task/TaskIndexDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/task/TaskIndexDto.java index af84bd8276c..f4e529b1c74 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/task/TaskIndexDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/task/TaskIndexDto.java @@ -109,10 +109,10 @@ public class TaskIndexDto extends PseudonymizableIndexDto implements Serializabl private TaskJurisdictionFlagsDto taskJurisdictionFlagsDto; //@formatter:off - public TaskIndexDto(String uuid, TaskContext taskContext, String caseUuid, String caseFirstName, String caseLastName, + public TaskIndexDto(String uuid, TaskContext taskContext, String caseUuid, String caseFirstName, String caseLastName, String caseOtherName, String eventUuid, String eventTitle, Disease eventDisease, String eventDiseaseDetails, EventStatus eventStatus, EventInvestigationStatus eventInvestigationStatus, Date eventDate, - String contactUuid, String contactFirstName, String contactLastName, String contactCaseFirstName, String contactCaseLastName, - String travelEntryUuid, String travelEntryExternalId, String travelEntryFirstName, String travelEntryLastName, + String contactUuid, String contactFirstName, String contactLastName, String contactOtherName, String contactCaseFirstName, String contactCaseLastName, String contactCaseOtherName, + String travelEntryUuid, String travelEntryExternalId, String travelEntryFirstName, String travelEntryLastName, String travelEntryOtherName, TaskType taskType, TaskPriority priority, Date dueDate, Date suggestedStart, TaskStatus taskStatus, Disease disease, String creatorUserUuid, String creatorUserFirstName, String creatorUserLastName, String creatorComment, String assigneeUserUuid, String assigneeUserFirstName, String assigneeUserLastName, String assigneeReply, @@ -125,7 +125,7 @@ public TaskIndexDto(String uuid, TaskContext taskContext, String caseUuid, Strin this.taskContext = taskContext; if (caseUuid != null) { - this.caze = new CaseReferenceDto(caseUuid, caseFirstName, caseLastName); + this.caze = new CaseReferenceDto(caseUuid, caseFirstName, caseLastName, caseOtherName); } if (eventUuid != null) { @@ -137,11 +137,11 @@ public TaskIndexDto(String uuid, TaskContext taskContext, String caseUuid, Strin } if (contactUuid != null) { - this.contact = new ContactReferenceDto(contactUuid, contactFirstName, contactLastName, contactCaseFirstName, contactCaseLastName); + this.contact = new ContactReferenceDto(contactUuid, contactFirstName, contactLastName, contactOtherName,contactCaseFirstName, contactCaseLastName, contactCaseOtherName); } if (travelEntryUuid != null) { - this.travelEntry = new TravelEntryReferenceDto(travelEntryUuid, travelEntryExternalId, travelEntryFirstName, travelEntryLastName); + this.travelEntry = new TravelEntryReferenceDto(travelEntryUuid, travelEntryExternalId, travelEntryFirstName, travelEntryLastName, travelEntryOtherName); } this.taskType = taskType; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/therapy/PrescriptionExportDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/therapy/PrescriptionExportDto.java index d3a45ddb322..e67b5051312 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/therapy/PrescriptionExportDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/therapy/PrescriptionExportDto.java @@ -56,6 +56,7 @@ public PrescriptionExportDto( String caseUuid, String caseFirstName, String caseLastName, + String caseOtherName, Date prescriptionDate, Date prescriptionStart, Date prescriptionEnd, @@ -71,7 +72,7 @@ public PrescriptionExportDto( boolean isInJurisdiction) { this.caseUuid = caseUuid; - this.caseName = PersonDto.buildCaption(caseFirstName, caseLastName); + this.caseName = PersonDto.buildCaption(caseFirstName, caseLastName, caseOtherName); this.prescriptionDate = prescriptionDate; this.prescriptionStart = prescriptionStart; this.prescriptionEnd = prescriptionEnd; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/therapy/TreatmentExportDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/therapy/TreatmentExportDto.java index 0de1c51bb60..81f8ce1b54c 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/therapy/TreatmentExportDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/therapy/TreatmentExportDto.java @@ -53,6 +53,7 @@ public TreatmentExportDto( String caseUuid, String caseFirstName, String caseLastName, + String caseOtherName, Date treatmentDateTime, String executingClinician, TreatmentType treatmentType, @@ -65,7 +66,7 @@ public TreatmentExportDto( boolean isInJurisdiction) { this.caseUuid = caseUuid; - this.caseName = PersonDto.buildCaption(caseFirstName, caseLastName); + this.caseName = PersonDto.buildCaption(caseFirstName, caseLastName, caseOtherName); this.treatmentDateTime = treatmentDateTime; this.executingClinician = executingClinician; this.treatmentType = treatmentType; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/travelentry/TravelEntryDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/travelentry/TravelEntryDto.java index d1dba5f0190..3b540b63e21 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/travelentry/TravelEntryDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/travelentry/TravelEntryDto.java @@ -1,5 +1,6 @@ package de.symeda.sormas.api.travelentry; +import de.symeda.sormas.api.caze.CaseOrigin; import de.symeda.sormas.api.common.DeletionReason; import de.symeda.sormas.api.feature.FeatureType; import de.symeda.sormas.api.utils.DependingOnFeatureType; @@ -89,6 +90,7 @@ public class TravelEntryDto extends PseudonymizableDto { private boolean archived; private boolean deleted; private Disease disease; + private CaseOrigin caseOrigin; @SensitiveData @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String diseaseDetails; @@ -156,7 +158,7 @@ public static TravelEntryDto build(PersonReferenceDto person) { } public TravelEntryReferenceDto toReference() { - return new TravelEntryReferenceDto(getUuid(), getExternalId(), getPerson().getFirstName(), getPerson().getLastName()); + return new TravelEntryReferenceDto(getUuid(), getExternalId(), getPerson().getFirstName(), getPerson().getLastName(), getPerson().getOtherName()); } public PersonReferenceDto getPerson() { @@ -207,6 +209,14 @@ public void setDisease(Disease disease) { this.disease = disease; } + public CaseOrigin getCaseOrigin() { + return caseOrigin; + } + + public void setCaseOrigin(CaseOrigin caseOrigin) { + this.caseOrigin = caseOrigin; + } + public String getDiseaseDetails() { return diseaseDetails; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/travelentry/TravelEntryReferenceDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/travelentry/TravelEntryReferenceDto.java index 49ca0580aaa..d93435b8370 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/travelentry/TravelEntryReferenceDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/travelentry/TravelEntryReferenceDto.java @@ -10,8 +10,8 @@ public class TravelEntryReferenceDto extends ReferenceDto { private String externalId; - public TravelEntryReferenceDto(String uuid, String externalId, String firstName, String lastName) { - super(uuid, PersonDto.buildCaption(firstName, lastName)); + public TravelEntryReferenceDto(String uuid, String externalId, String firstName, String lastName, String otherName) { + super(uuid, PersonDto.buildCaption(firstName, lastName, otherName)); this.externalId = externalId; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/AFPFacilityOptions.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/AFPFacilityOptions.java new file mode 100644 index 00000000000..e19dec9c009 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/AFPFacilityOptions.java @@ -0,0 +1,15 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum AFPFacilityOptions { + Hospital, + CHPS, + Polyclinic, + HC_CR; + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } + + } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/CardOrHistory.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/CardOrHistory.java new file mode 100644 index 00000000000..438a10a65e1 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/CardOrHistory.java @@ -0,0 +1,24 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum CardOrHistory { + CARD, + HISTORY; + + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } + + public static CardOrHistory valueOf(Boolean value) { + + if (value == null) { + return null; + } else if (Boolean.TRUE.equals(value)) { + return CARD; + } else { + return HISTORY; + } + } +} diff --git a/sormas-api/src/main/resources/captions.properties b/sormas-api/src/main/resources/captions.properties index 7fd0aa45f3c..10630e29c8e 100644 --- a/sormas-api/src/main/resources/captions.properties +++ b/sormas-api/src/main/resources/captions.properties @@ -29,14 +29,17 @@ edit=Edit epiWeekFrom=From Epi Week epiWeekTo=To Epi Week facilityType=Facility type +afpFacilityOptions=Facility Option facilityTypeGroup=Facility category firstName=First name sex=Sex nationalHealthId=National health ID +ghanaCard=Ghana Card passportNumber=Passport number from=From info=Info lastName=Last name +otherName=Other name(s) menu=Menu moreActions=More name=Name @@ -344,7 +347,7 @@ caseFilterOnlyCasesChangedSinceLastSharedWithExternalSurvTool=Only cases changed caseFilterOnlyCasesWithDontShareWithExternalSurvTool=Only cases marked with 'Don't share with reporting tool' caseFacilityDetailsShort=Facility name caseNewCase=New case -casePlaceOfStay=Place of stay +casePlaceOfStay=Place of detection caseActiveCases=Active cases caseArchivedCases=Archived cases caseAllCases=All cases @@ -421,12 +424,15 @@ CaseData.noneHealthFacilityDetails=Place description CaseData.notifyingClinic=Notifying clinic CaseData.notifyingClinicDetails=Notifying clinic details CaseData.numberOfVisits=Number of visits -CaseData.outcome=Outcome of case +#CaseData.outcome=Outcome of case +CaseData.outcome=Clinical Outcome +CaseData.clinicalOutcome = Clinical Outcome CaseData.outcomeDate=Date of outcome CaseData.person=Case person CaseData.personUuid=Person ID CaseData.personFirstName=First name CaseData.personLastName=Last name +CaseData.personOtherName=Other name(s) CaseData.plagueType=Plague type CaseData.pointOfEntry=Point of entry CaseData.pointOfEntryDetails=Point of entry name & description @@ -434,6 +440,8 @@ CaseData.pointOfEntryName=Point of entry CaseData.portHealthInfo=Port health CaseData.postpartum=Postpartum CaseData.pregnant=Pregnancy +CaseData.ipSampleSent=Was a sample sent to the IP? +CaseData.ipSampleResults=Results from IP CaseData.previousQuarantineTo=Previous quarantine end CaseData.quarantineChangeComment=Quarantine change comment CaseData.region=Region @@ -449,6 +457,8 @@ CaseData.smallpoxVaccinationReceived=Was a Smallpox vaccination received in the CaseData.smallpoxVaccinationScar=Is a Smallpox vaccination scar present? CaseData.smallpoxLastVaccinationDate=Date of last Smallpox vaccination CaseData.vaccinationStatus=Vaccination status +CaseData.vaccinationType=Vaccination Type +CaseData.vaccinationDate=Vaccination Date CaseData.surveillanceOfficer=Responsible surveillance officer CaseData.symptoms=Symptoms CaseData.therapy=Therapy @@ -521,9 +531,9 @@ CaseData.surveillanceToolShareCount=Reporting tool share count CaseData.surveillanceToolStatus=Reporting tool status CaseData.differentPlaceOfStayJurisdiction=Place of stay of this case differs from its responsible jurisdiction CaseData.differentPointOfEntryJurisdiction=Point of entry of this case differs from its responsible / place of stay jurisdiction -CaseData.responsibleRegion=Responsible region -CaseData.responsibleDistrict=Responsible district -CaseData.responsibleCommunity=Responsible community +CaseData.responsibleRegion=Reporting region +CaseData.responsibleDistrict=Reporting district +CaseData.responsibleCommunity=Reporting sub district CaseData.dontShareWithReportingTool=Don't share this case with the external reporting tool CaseData.responsibleDistrictName=Responsible district CaseData.caseReferenceDefinition=Reference definition @@ -551,6 +561,7 @@ CaseExport.id=Case SN CaseExport.initialDetectionPlace=Place of initial detection CaseExport.labResults=Lab results CaseExport.lastName=Last name +CaseExport.otherName=Other name(s) CaseExport.sampleDates=Dates of sample collection CaseExport.sampleTaken=Sample taken? CaseExport.travelHistory=Travel history @@ -753,7 +764,7 @@ Contact.quarantineTypeDetails=Quarantine details Contact.quarantineFrom=Quarantine start Contact.quarantineHelpNeeded=Help needed in quarantine? Contact.quarantineTo=Quarantine end -Contact.region=Responsible region +Contact.region=Reporting region Contact.relationDescription=Relationship description Contact.relationToCase=Relationship with case Contact.reportDateTime=Report date @@ -988,6 +999,7 @@ devModeSampleCount=Number of generated Samples devModeSampleStartDate=Sample collected start date devModeSampleEndDate=Sample collected end date devModeSamplePathogenTestsToBePerformed=Request pathogen tests to be performed +devModeSampleMaterialsToBeAdded=Request sample materials to be added devModeSampleAdditionalTestsToBePerformed=Request additional tests to be performed devModeSampleExternalLabTesting=External Lab Testing devModeSampleSendDispatch=Send/Dispatch @@ -1222,13 +1234,13 @@ EventParticipant.caseUuid=Case ID EventParticipant.approximateAge=Age EventParticipant.name=Name EventParticipant.sex=Sex -EventParticipant.responsibleRegion=Responsible Region +EventParticipant.responsibleRegion=Reporting Region EventParticipant.responsibleDistrict=Responsible District EventParticipant.personUuid=Person ID EventParticipant.involvementDescription=Involvement description EventParticipant.person=Person EventParticipant.uuid=Event participant ID -EventParticipant.region=Responsible region +EventParticipant.region=Reporting region EventParticipant.district=Responsible district EventParticipant.vaccinationStatus=Vaccination status EventParticipant.changeDate=Date of last change @@ -1255,6 +1267,7 @@ EventParticipantExport.addressGpsCoordinates=GPS coordinates of the address EventParticipantExport.burialInfo=Burial of person EventParticipantExport.sampleInformation=Sample information EventParticipantExport.personNationalHealthId=Person National Health Id +EventParticipantExport.personGhanaCard=Person Ghana Card EventParticipantExport.eventParticipantInvolvmentDescription=Involvment description EventParticipantExport.eventParticipantUuid=Event participant ID # Event Group @@ -1356,7 +1369,7 @@ Facility.externalID=External ID Facility.houseNumber=House number Facility.latitude=Latitude Facility.longitude=Longitude -Facility.postalCode=Postal code +Facility.postalCode=Ghana Post Office Facility.street=Street Facility.name=Name Facility.publicOwnership=Public ownership @@ -1500,7 +1513,7 @@ Location.latitude=GPS latitude Location.latLon=GPS lat and lon Location.latLonAccuracy=GPS accuracy in m Location.longitude=GPS longitude -Location.postalCode=Postal code +Location.postalCode=Ghana Post Office Location.continent=Continent Location.subcontinent=Subcontinent Location.country=Country @@ -1508,6 +1521,7 @@ Location.region=Region Location.district=District Location.community=Community Location.street=Street +Location.landmark=Landmark Location.contactPersonFirstName=Contact person first name Location.contactPersonLastName=Contact person last name Location.contactPersonPhone=Contact person phone number @@ -1695,6 +1709,7 @@ Person.emailAddress=Primary email address Person.otherContactDetails=Other contact details Person.passportNumber=Passport number Person.nationalHealthId=National health ID +Person.ghanaCard=Ghana Card Person.uuid=Person ID Person.hasCovidApp=Has COVID app Person.covidCodeDelivered=COVID code was generated and delivered @@ -2016,7 +2031,7 @@ Immunization.lastVaccineType=Type of last vaccine Immunization.firstVaccinationDate=Date of first vaccination Immunization.lastVaccinationDate=Date of last vaccination Immunization.additionalDetails=Additional details -Immunization.responsibleRegion=Responsible region +Immunization.responsibleRegion=Reporting region Immunization.responsibleDistrict=Responsible district Immunization.responsibleCommunity=Responsible community Immunization.immunizationPeriod=Immunization period @@ -2315,9 +2330,9 @@ TravelEntry.testedNegative=Tested Negative travelEntryNewTravelEntry=New travel entry travelEntryPointOfEntry=Point of entry TravelEntry.diseaseVariant=Disease variant -TravelEntry.responsibleRegion=Responsible region -TravelEntry.responsibleDistrict=Responsible district -TravelEntry.responsibleCommunity=Responsible community +TravelEntry.responsibleRegion=Reporting region +TravelEntry.responsibleDistrict=Reporting district +TravelEntry.responsibleCommunity=Reporting community TravelEntry.differentPointOfEntryJurisdiction=Point of entry jurisdiction differs from responsible jurisdiction TravelEntry.pointOfEntry=Point of entry TravelEntry.pointOfEntryRegion=Region diff --git a/sormas-api/src/main/resources/enum.properties b/sormas-api/src/main/resources/enum.properties index fc1ba1ea1b1..86140ea0f92 100644 --- a/sormas-api/src/main/resources/enum.properties +++ b/sormas-api/src/main/resources/enum.properties @@ -451,7 +451,7 @@ Disease.UNDEFINED = Not Yet Defined Disease.OTHER = Other Epidemic Disease Disease.PLAGUE = Plague Disease.POLIO = Poliomyelitis -Disease.UNSPECIFIED_VHF = Unspecified VHF +Disease.AHF = AHF Disease.WEST_NILE_FEVER = West Nile Fever Disease.YELLOW_FEVER = Yellow Fever Disease.RABIES = Human Rabies @@ -512,7 +512,7 @@ Disease.Short.UNDEFINED = Undefined Disease.Short.OTHER = Other Disease.Short.PLAGUE = Plague Disease.Short.POLIO = Polio -Disease.Short.UNSPECIFIED_VHF = VHF +Disease.Short.AHF = VHF Disease.Short.WEST_NILE_FEVER = West Nile Fever Disease.Short.YELLOW_FEVER = Yellow Fever Disease.Short.RABIES = Rabies diff --git a/sormas-api/src/main/resources/enum_ar-SA.properties b/sormas-api/src/main/resources/enum_ar-SA.properties index 139201b7bd6..cadbec14cc0 100644 --- a/sormas-api/src/main/resources/enum_ar-SA.properties +++ b/sormas-api/src/main/resources/enum_ar-SA.properties @@ -451,7 +451,7 @@ Disease.UNDEFINED = Not Yet Defined Disease.OTHER = Other Epidemic Disease Disease.PLAGUE = Plague Disease.POLIO = Poliomyelitis -Disease.UNSPECIFIED_VHF = Unspecified VHF +Disease.AHF = AHF Disease.WEST_NILE_FEVER = West Nile Fever Disease.YELLOW_FEVER = Yellow Fever Disease.RABIES = Human Rabies @@ -507,7 +507,7 @@ Disease.Short.UNDEFINED = Undefined Disease.Short.OTHER = Other Disease.Short.PLAGUE = Plague Disease.Short.POLIO = Polio -Disease.Short.UNSPECIFIED_VHF = VHF +Disease.Short.AHF = VHF Disease.Short.WEST_NILE_FEVER = West Nile Fever Disease.Short.YELLOW_FEVER = Yellow Fever Disease.Short.RABIES = Rabies diff --git a/sormas-api/src/main/resources/enum_en-GH.properties b/sormas-api/src/main/resources/enum_en-GH.properties index e5fbf4fc1e1..7240b1159d1 100644 --- a/sormas-api/src/main/resources/enum_en-GH.properties +++ b/sormas-api/src/main/resources/enum_en-GH.properties @@ -451,7 +451,7 @@ Disease.UNDEFINED = Not Yet Defined Disease.OTHER = Other Epidemic Disease Disease.PLAGUE = Plague Disease.POLIO = Poliomyelitis -Disease.UNSPECIFIED_VHF = Unspecified VHF +Disease.AHF = AHF Disease.WEST_NILE_FEVER = West Nile Fever Disease.YELLOW_FEVER = Yellow Fever Disease.RABIES = Human Rabies @@ -507,7 +507,7 @@ Disease.Short.UNDEFINED = Undefined Disease.Short.OTHER = Other Disease.Short.PLAGUE = Plague Disease.Short.POLIO = Polio -Disease.Short.UNSPECIFIED_VHF = VHF +Disease.Short.AHF = VHF Disease.Short.WEST_NILE_FEVER = West Nile Fever Disease.Short.YELLOW_FEVER = Yellow Fever Disease.Short.RABIES = Rabies diff --git a/sormas-api/src/main/resources/strings.properties b/sormas-api/src/main/resources/strings.properties index 7be5af2b722..74fa6884251 100644 --- a/sormas-api/src/main/resources/strings.properties +++ b/sormas-api/src/main/resources/strings.properties @@ -543,6 +543,7 @@ headingLocation = Location headingLoginFailed = Login failed headingMaternalHistory = Maternal history headingMedicalInformation = Additional medical information +clinicalOutcome = Clinical Outcome headingMissingDateFilter = Missing date filter headingMyTasks = My Tasks headingNewAccount = New account @@ -802,6 +803,7 @@ infoPickOrCreateSample = Please choose one of the options below.

The li infoSampleAdditionalTesting = Please tick every type of additional test you would like to be performed on this sample. infoSampleExport = Export the samples of all cases displayed in the table rows with an extended set of columns. This may take a while. infoSamplePathogenTesting = Please tick every type of pathogen test you would like to be performed on this sample. +infoSampleMaterialSelection = Please tick every type of sample material you would like to associate on this sample. infoSimilarImmunization = The system already contains at least one immunization for %s for this person and means of immunization that overlaps with the specified immunization period. Do you still want to update the start and end date or go back and adjust your changes? infoStatisticsDisclaimer = All statistics on this page are aggregated data of the whole country. This includes cases you might not have read and write access to and therefore are not visible in the case directory. infoStatisticsFilter = Add filters to restrict the aggregated data.
If you use multiple filters, only cases that pass all restrictions will be aggregated. diff --git a/sormas-backend/doc/UserDataAccess.md b/sormas-backend/doc/UserDataAccess.md index 74199b01695..fcc63bf42d0 100644 --- a/sormas-backend/doc/UserDataAccess.md +++ b/sormas-backend/doc/UserDataAccess.md @@ -92,7 +92,7 @@ In general data access & synchronisation is based on the following rules: ### Case changed notification * Types: email, sms * To: all responsible supervisors within the case region -* When: case classification changed or disease of unspecified VHF changed +* When: case classification changed or disease of AHF changed ### Case investigation status done notification * Types: email, sms diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java index e5cfa15794c..50785438858 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java @@ -42,6 +42,8 @@ import javax.persistence.TemporalType; import javax.persistence.Transient; +import de.symeda.sormas.api.utils.AFPFacilityOptions; +import de.symeda.sormas.api.utils.CardOrHistory; import org.hibernate.annotations.Type; import de.symeda.auditlog.api.Audited; @@ -160,6 +162,8 @@ public class Case extends CoreAdo implements SormasToSormasShareable, HasExterna public static final String PREGNANT = "pregnant"; public static final String VACCINATION_STATUS = "vaccinationStatus"; + public static final String VACCINATION_TYPE = "vaccinationType"; + public static final String VACCINATION_DATE = "vaccinationDate"; public static final String EPID_NUMBER = "epidNumber"; public static final String REPORT_LAT = "reportLat"; public static final String REPORT_LON = "reportLon"; @@ -212,6 +216,7 @@ public class Case extends CoreAdo implements SormasToSormasShareable, HasExterna public static final String VISITS = "visits"; public static final String SURVEILLANCE_REPORTS = "surveillanceReports"; public static final String FACILITY_TYPE = "facilityType"; + public static final String AFP_FACILITY_OPTIONS = "afpFacilityOptions"; public static final String CONTACTS = "contacts"; public static final String CONVERTED_FROM_CONTACT = "convertedContact"; public static final String EVENT_PARTICIPANTS = "eventParticipants"; @@ -287,6 +292,7 @@ public class Case extends CoreAdo implements SormasToSormasShareable, HasExterna private District district; private Community community; private FacilityType facilityType; + private AFPFacilityOptions afpFacilityOptions; private Facility healthFacility; private String healthFacilityDetails; @@ -315,8 +321,11 @@ public class Case extends CoreAdo implements SormasToSormasShareable, HasExterna private HealthConditions healthConditions; private YesNoUnknown pregnant; - + private YesNoUnknown ipSampleSent; + private Disease ipSampleResults; private VaccinationStatus vaccinationStatus; + private CardOrHistory vaccinationType; + private Date vaccinationDate; private YesNoUnknown smallpoxVaccinationScar; private YesNoUnknown smallpoxVaccinationReceived; private Date smallpoxLastVaccinationDate; @@ -909,6 +918,24 @@ public void setPregnant(YesNoUnknown pregnant) { this.pregnant = pregnant; } + @Enumerated(EnumType.STRING) + public YesNoUnknown getIpSampleSent() { + return ipSampleSent; + } + + public void setIpSampleSent(YesNoUnknown ipSampleSent) { + this.ipSampleSent = ipSampleSent; + } + + @Enumerated(EnumType.STRING) + public Disease getIpSampleResults(){ + return ipSampleResults; + } + + public void setIpSampleResults(Disease ipSampleResults) { + this.ipSampleResults = ipSampleResults; + } + @Enumerated(EnumType.STRING) public VaccinationStatus getVaccinationStatus() { return vaccinationStatus; @@ -918,6 +945,24 @@ public void setVaccinationStatus(VaccinationStatus vaccination) { this.vaccinationStatus = vaccination; } + @Enumerated(EnumType.STRING) + public CardOrHistory getVaccinationType() { + return vaccinationType; + } + + public void setVaccinationType(CardOrHistory vaccinationType) { + this.vaccinationType = vaccinationType; + } + + @Temporal(TemporalType.TIMESTAMP) + public Date getVaccinationDate() { + return vaccinationDate; + } + + public void setVaccinationDate(Date vaccinationDate) { + this.vaccinationDate = vaccinationDate; + } + @Enumerated(EnumType.STRING) public YesNoUnknown getSmallpoxVaccinationScar() { return smallpoxVaccinationScar; @@ -955,7 +1000,7 @@ public void setEpidNumber(String epidNumber) { } public CaseReferenceDto toReference() { - return new CaseReferenceDto(getUuid(), person.getFirstName(), person.getLastName()); + return new CaseReferenceDto(getUuid(), person.getFirstName(), person.getLastName(), person.getOtherName()); } @OneToMany(cascade = {}, mappedBy = Task.CAZE, fetch = FetchType.LAZY) @@ -1445,6 +1490,14 @@ public FacilityType getFacilityType() { public void setFacilityType(FacilityType facilityType) { this.facilityType = facilityType; } + @Enumerated(EnumType.STRING) + public AFPFacilityOptions getAfpFacilityOptions() { + return afpFacilityOptions; + } + + public void setAfpFacilityOptions(AFPFacilityOptions afpFacilityOptions) { + this.afpFacilityOptions = afpFacilityOptions; + } @Column public Integer getCaseIdIsm() { diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java index d5d60103063..cf1ed6e383f 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java @@ -832,6 +832,7 @@ public List getExportList( joins.getPerson().get(Person.EDUCATION_DETAILS), joins.getPerson().get(Person.OCCUPATION_TYPE), joins.getPerson().get(Person.OCCUPATION_DETAILS), joins.getPerson().get(Person.ARMED_FORCES_RELATION_TYPE), joins.getEpiData().get(EpiData.CONTACT_WITH_SOURCE_CASE_KNOWN), caseRoot.get(Case.VACCINATION_STATUS), caseRoot.get(Case.POSTPARTUM), caseRoot.get(Case.TRIMESTER), + caseRoot.get(Case.VACCINATION_TYPE), caseRoot.get(Case.VACCINATION_DATE), eventCountSq, exportPrescriptionNumber ? prescriptionCountSq : cb.nullLiteral(Long.class), exportTreatmentNumber ? treatmentCountSq : cb.nullLiteral(Long.class), @@ -1753,7 +1754,7 @@ public void validate(CaseDataDto caze) throws ValidationRuntimeException { && !communityFacade.getByUuid(caze.getResponsibleCommunity().getUuid()).getDistrict().equals(caze.getResponsibleDistrict())) { throw new ValidationRuntimeException(I18nProperties.getValidationError(Validations.noResponsibleCommunityInResponsibleDistrict)); } - if ((caze.getCaseOrigin() == null || caze.getCaseOrigin() == CaseOrigin.IN_COUNTRY) && caze.getHealthFacility() == null) { + if ((caze.getCaseOrigin() == null || caze.getCaseOrigin() == CaseOrigin.IN_COUNTRY) && caze.getHealthFacility() == null && caze.getAfpFacilityOptions() == null) { throw new ValidationRuntimeException(I18nProperties.getValidationError(Validations.validFacility)); } if (CaseOrigin.POINT_OF_ENTRY.equals(caze.getCaseOrigin()) && caze.getPointOfEntry() == null) { @@ -2146,8 +2147,8 @@ public void onCaseChanged(CaseDataDto existingCase, Case newCase, boolean syncSh } // Send an email to all responsible supervisors when the disease of an - // Unspecified VHF case has changed - if (existingCase != null && existingCase.getDisease() == Disease.UNSPECIFIED_VHF && existingCase.getDisease() != newCase.getDisease()) { + // AHF case has changed + if (existingCase != null && existingCase.getDisease() == Disease.AHF && existingCase.getDisease() != newCase.getDisease()) { try { String message = String.format( @@ -2809,7 +2810,11 @@ public static CaseDataDto toCaseDto(Case source) { target.setSymptoms(SymptomsFacadeEjb.toDto(source.getSymptoms())); target.setPregnant(source.getPregnant()); + target.setIpSampleSent(source.getIpSampleSent()); + target.setIpSampleResults(source.getIpSampleResults()); target.setVaccinationStatus(source.getVaccinationStatus()); + target.setVaccinationType(source.getVaccinationType()); + target.setVaccinationDate(source.getVaccinationDate()); target.setSmallpoxVaccinationScar(source.getSmallpoxVaccinationScar()); target.setSmallpoxVaccinationReceived(source.getSmallpoxVaccinationReceived()); target.setSmallpoxLastVaccinationDate(source.getSmallpoxLastVaccinationDate()); @@ -2860,6 +2865,7 @@ public static CaseDataDto toCaseDto(Case source) { target.setFollowUpUntil(source.getFollowUpUntil()); target.setOverwriteFollowUpUntil(source.isOverwriteFollowUpUntil()); target.setFacilityType(source.getFacilityType()); + target.setAfpFacilityOptions(source.getAfpFacilityOptions()); target.setCaseIdIsm(source.getCaseIdIsm()); target.setContactTracingFirstContactType(source.getContactTracingFirstContactType()); @@ -2999,7 +3005,11 @@ public Case fillOrBuildEntity(@NotNull CaseDataDto source, Case target, boolean target.setSymptoms(symptomsFacade.fromDto(source.getSymptoms(), checkChangeDate)); target.setPregnant(source.getPregnant()); + target.setIpSampleSent(source.getIpSampleSent()); + target.setIpSampleResults(source.getIpSampleResults()); target.setVaccinationStatus(source.getVaccinationStatus()); + target.setVaccinationType(source.getVaccinationType()); + target.setVaccinationDate(source.getVaccinationDate()); target.setSmallpoxVaccinationScar(source.getSmallpoxVaccinationScar()); target.setSmallpoxVaccinationReceived(source.getSmallpoxVaccinationReceived()); target.setSmallpoxLastVaccinationDate(source.getSmallpoxLastVaccinationDate()); @@ -3046,6 +3056,7 @@ public Case fillOrBuildEntity(@NotNull CaseDataDto source, Case target, boolean target.setPostpartum(source.getPostpartum()); target.setTrimester(source.getTrimester()); target.setFacilityType(source.getFacilityType()); + target.setAfpFacilityOptions(source.getAfpFacilityOptions()); if (source.getSormasToSormasOriginInfo() != null) { target.setSormasToSormasOriginInfo(originInfoFacade.fromDto(source.getSormasToSormasOriginInfo(), checkChangeDate)); } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseListCriteriaBuilder.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseListCriteriaBuilder.java index dc9f1d5cabe..286d58fd032 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseListCriteriaBuilder.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseListCriteriaBuilder.java @@ -187,6 +187,7 @@ public List> getCaseIndexSelections(From root, CaseQueryCo joins.getPerson().get(Person.UUID), joins.getPerson().get(Person.FIRST_NAME), joins.getPerson().get(Person.LAST_NAME), + joins.getPerson().get(Person.OTHER_NAME), root.get(Case.DISEASE), root.get(Case.DISEASE_VARIANT), root.get(Case.DISEASE_DETAILS), @@ -217,6 +218,8 @@ public List> getCaseIndexSelections(From root, CaseQueryCo root.get(Case.FOLLOW_UP_UNTIL), joins.getPerson().get(Person.SYMPTOM_JOURNAL_STATUS), root.get(Case.VACCINATION_STATUS), + root.get(Case.VACCINATION_TYPE), + root.get(Case.VACCINATION_DATE), root.get(Case.CHANGE_DATE), joins.getFacility().get(Facility.ID), joins.getResponsibleRegion().get(Region.UUID), @@ -247,6 +250,8 @@ private List> getIndexOrders(SortProperty sortProperty, Root case CaseIndexDto.FOLLOW_UP_STATUS: case CaseIndexDto.FOLLOW_UP_UNTIL: case CaseIndexDto.VACCINATION_STATUS: + case CaseIndexDto.VACCINATION_TYPE: + case CaseIndexDto.VACCINATION_DATE: case CaseIndexDto.DISEASE_VARIANT: return Collections.singletonList(caze.get(sortProperty.propertyName)); case CaseIndexDto.PERSON_UUID: @@ -255,6 +260,8 @@ private List> getIndexOrders(SortProperty sortProperty, Root return Collections.singletonList(joins.getPerson().get(Person.FIRST_NAME)); case CaseIndexDto.PERSON_LAST_NAME: return Collections.singletonList(joins.getPerson().get(Person.LAST_NAME)); + case CaseIndexDto.PERSON_OTHER_NAME: + return Collections.singletonList(joins.getPerson().get(Person.OTHER_NAME)); case CaseIndexDto.PRESENT_CONDITION: case CaseIndexDto.SEX: case ContactIndexDto.SYMPTOM_JOURNAL_STATUS: diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseService.java index c930bd9c6eb..aa0fc6a4b0f 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseService.java @@ -340,6 +340,7 @@ public List getCasesForMap(Region region, District district, Disease joins.getPerson().get(Person.UUID), joins.getPerson().get(Person.FIRST_NAME), joins.getPerson().get(Person.LAST_NAME), + joins.getPerson().get(Person.OTHER_NAME), joins.getFacility().get(Facility.UUID), joins.getFacility().get(Facility.LATITUDE), joins.getFacility().get(Facility.LONGITUDE), @@ -679,6 +680,12 @@ public Predicate createCriteriaFilter(CaseCrite if (caseCriteria.getVaccinationStatus() != null) { filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(Case.VACCINATION_STATUS), caseCriteria.getVaccinationStatus())); } + if (caseCriteria.getVaccinationType() != null) { + filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(Case.VACCINATION_TYPE), caseCriteria.getVaccinationType())); + } + if (caseCriteria.getVaccinationDate() != null) { + filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(Case.VACCINATION_DATE), caseCriteria.getVaccinationDate())); + } if (caseCriteria.getReinfectionStatus() != null) { filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(Case.REINFECTION_STATUS), caseCriteria.getReinfectionStatus())); } @@ -699,6 +706,9 @@ public Predicate createCriteriaFilter(CaseCrite if (caseCriteria.getFacilityType() != null) { filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(Case.FACILITY_TYPE), caseCriteria.getFacilityType())); } + if (caseCriteria.getAfpFacilityOptions() != null) { + filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(Case.AFP_FACILITY_OPTIONS), caseCriteria.getAfpFacilityOptions())); + } if (caseCriteria.getPointOfEntry() != null) { filter = CriteriaBuilderHelper .and(cb, filter, cb.equal(joins.getPointOfEntry().get(PointOfEntry.UUID), caseCriteria.getPointOfEntry().getUuid())); @@ -1848,7 +1858,7 @@ public List getCasesForDuplicateMerging(CaseCriteria criteria, b // Sex filter: only when sex is filled in for both cases Predicate sexFilter = cb.or( cb.or(cb.isNull(person.get(Person.SEX)), cb.isNull(person2.get(Person.SEX))), - cb.or(cb.equal(person.get(Person.SEX), Sex.UNKNOWN), cb.equal(person2.get(Person.SEX), Sex.UNKNOWN)), + //cb.or(cb.equal(person.get(Person.SEX), Sex.UNKNOWN), cb.equal(person2.get(Person.SEX), Sex.UNKNOWN)), cb.equal(person.get(Person.SEX), person2.get(Person.SEX))); // Birth date filter: only when birth date is filled in for both cases Predicate birthDateFilter = cb.or( diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/caseimport/CaseImportFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/caseimport/CaseImportFacadeEjb.java index f9a2b7ecf77..9a0bafdff2b 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/caseimport/CaseImportFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/caseimport/CaseImportFacadeEjb.java @@ -31,6 +31,7 @@ import javax.transaction.Transactional; import javax.validation.Valid; +import de.symeda.sormas.api.utils.AFPFacilityOptions; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -610,6 +611,18 @@ protected FacilityType getTypeOfFacility(String propertyName, Object currentElem return (FacilityType) pd.getReadMethod().invoke(currentElement); } + protected AFPFacilityOptions getTypeOfFacilityForAFP(String propertyName, Object currentElement) + throws IntrospectionException, InvocationTargetException, IllegalAccessException { + String typeProperty; + if (CaseDataDto.class.equals(currentElement.getClass()) && CaseDataDto.HEALTH_FACILITY.equals(propertyName)) { + typeProperty = CaseDataDto.AFP_FACILITY_OPTIONS; + } else { + typeProperty = propertyName + "Type"; + } + PropertyDescriptor pd = new PropertyDescriptor(typeProperty, currentElement.getClass()); + return (AFPFacilityOptions) pd.getReadMethod().invoke(currentElement); + } + protected String buildEntityProperty(String[] entityPropertyPath) { return String.join(".", entityPropertyPath); } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/transformers/CaseSelectionDtoResultTransformer.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/transformers/CaseSelectionDtoResultTransformer.java index 7f4bd1ad6ef..9013bb0452d 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/transformers/CaseSelectionDtoResultTransformer.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/transformers/CaseSelectionDtoResultTransformer.java @@ -31,6 +31,7 @@ public Object transformTuple(Object[] objects, String[] strings) { (Disease) objects[3], (String) objects[4], (String) objects[5], + (String) objects[6], new AgeAndBirthDateDto(age, approximateAgeType, birthdateDD, birthdateMM, birthdateYYYY), (String) objects[11], healthFacilityName, diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/Contact.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/Contact.java index c68ea19d76a..80557a10099 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/Contact.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/Contact.java @@ -278,7 +278,7 @@ public class Contact extends CoreAdo implements SormasToSormasShareable, HasExte Disease.YELLOW_FEVER, Disease.CSM, Disease.RABIES, - Disease.UNSPECIFIED_VHF, + Disease.AHF, Disease.ANTHRAX, Disease.CORONAVIRUS, Disease.OTHER }) @@ -518,8 +518,10 @@ public ContactReferenceDto toReference() { getUuid(), contactPerson.getFirstName(), contactPerson.getLastName(), + contactPerson.getOtherName(), getCaze() != null ? getCaze().getPerson().getFirstName() : null, - getCaze() != null ? getCaze().getPerson().getLastName() : null); + getCaze() != null ? getCaze().getPerson().getLastName() : null, + getCaze() != null ? getCaze().getPerson().getOtherName() : null); } @OneToMany(cascade = {}, mappedBy = Task.CONTACT) diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactFacadeEjb.java index 50958702c6d..70d62cbe677 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactFacadeEjb.java @@ -615,6 +615,7 @@ public List getExportList( joins.getPerson().get(Person.UUID), joins.getPerson().get(Person.FIRST_NAME), joins.getPerson().get(Person.LAST_NAME), + joins.getPerson().get(Person.OTHER_NAME), joins.getPerson().get(Person.SALUTATION), joins.getPerson().get(Person.OTHER_SALUTATION), joins.getPerson().get(Person.SEX), @@ -950,6 +951,7 @@ public List getVisitSummaryExportList( contactRoot.get(Contact.ID), contactPerson.get(Person.FIRST_NAME), contactPerson.get(Person.LAST_NAME), + contactPerson.get(Person.OTHER_NAME), cb. selectCase() .when(cb.isNotNull(contactRoot.get(Contact.LAST_CONTACT_DATE)), contactRoot.get(Contact.LAST_CONTACT_DATE)) .otherwise(contactRoot.get(Contact.REPORT_DATE_TIME)), @@ -1080,6 +1082,7 @@ public List getContactFollowUpList( contact.get(Contact.CHANGE_DATE), joins.getPerson().get(Person.FIRST_NAME), joins.getPerson().get(Person.LAST_NAME), + joins.getPerson().get(Person.OTHER_NAME), joins.getContactOfficer().get(User.UUID), joins.getContactOfficer().get(User.FIRST_NAME), joins.getContactOfficer().get(User.LAST_NAME), @@ -1203,16 +1206,63 @@ public FollowUpPeriodDto getCalculatedFollowUpUntilDate(ContactDto contactDto, b @Override public List getIndexList(ContactCriteria contactCriteria, Integer first, Integer max, List sortProperties) { - CriteriaQuery query = listCriteriaBuilder.buildIndexCriteria(contactCriteria, sortProperties); - List dtos = QueryHelper.getResultList(em, query, first, max); +// CriteriaQuery query = listCriteriaBuilder.buildIndexCriteria(contactCriteria, sortProperties); +// List dtos = QueryHelper.getResultList(em, query, first, max); +// +// Pseudonymizer pseudonymizer = Pseudonymizer.getDefault(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue)); +// pseudonymizer.pseudonymizeDtoCollection(ContactIndexDto.class, dtos, ContactIndexDto::getInJurisdiction, (c, isInJurisdiction) -> { +// if (c.getCaze() != null) { +// pseudonymizer.pseudonymizeDto(CaseReferenceDto.class, c.getCaze(), c.getCaseInJurisdiction(), null); +// } +// }); - Pseudonymizer pseudonymizer = Pseudonymizer.getDefault(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue)); - pseudonymizer.pseudonymizeDtoCollection(ContactIndexDto.class, dtos, ContactIndexDto::getInJurisdiction, (c, isInJurisdiction) -> { - if (c.getCaze() != null) { - pseudonymizer.pseudonymizeDto(CaseReferenceDto.class, c.getCaze(), c.getCaseInJurisdiction(), null); - } - }); + CriteriaBuilder cb = em.getCriteriaBuilder(); + CriteriaQuery cq = cb.createQuery(ContactIndexDto.class); + Root contact = cq.from(Contact.class); + + final ContactQueryContext contactQueryContext = new ContactQueryContext(cb, cq, contact); + final ContactJoins joins = contactQueryContext.getJoins(); + cq.multiselect( + contact.get(Contact.UUID), + joins.getPerson().get(Person.UUID), + joins.getPerson().get(Person.FIRST_NAME), + joins.getPerson().get(Person.LAST_NAME), + joins.getPerson().get(Person.OTHER_NAME), + joins.getCaze().get(Case.UUID), + contact.get(Contact.DISEASE), + contact.get(Contact.DISEASE_DETAILS), + joins.getCasePerson().get(Person.FIRST_NAME), + joins.getCasePerson().get(Person.LAST_NAME), + joins.getCasePerson().get(Person.OTHER_NAME), + joins.getAddressRegion().get(Region.NAME), + joins.getAddressDistrict().get(District.NAME), + contact.get(Contact.LAST_CONTACT_DATE), + contact.get(Contact.CONTACT_CATEGORY), + contact.get(Contact.CONTACT_PROXIMITY), + contact.get(Contact.CONTACT_CLASSIFICATION), + contact.get(Contact.CONTACT_STATUS), + contact.get(Contact.COMPLETENESS), + contact.get(Contact.FOLLOW_UP_STATUS), + contact.get(Contact.FOLLOW_UP_UNTIL), + joins.getPerson().get(Person.SYMPTOM_JOURNAL_STATUS), + contact.get(Contact.VACCINATION_STATUS), + contact.get(Contact.REPORT_DATE_TIME), + contact.get(Contact.EXTERNAL_ID), + contact.get(Contact.EXTERNAL_TOKEN), + contact.get(Contact.INTERNAL_TOKEN), + joins.getCaze().get(Case.CASE_CLASSIFICATION), + joins.getRegion().get(Region.NAME), + joins.getDistrict().get(District.NAME)); + + List dtos = QueryHelper.getResultList(em, cq, first, max); + + Pseudonymizer pseudonymizer = Pseudonymizer.getDefault(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue)); +// pseudonymizer.pseudonymizeDtoCollection(ContactIndexDto.class, dtos, ContactIndexDto::getInJurisdiction, (c, isInJurisdiction) -> { +// if (c.getCaze() != null) { +// pseudonymizer.pseudonymizeDto(CaseReferenceDto.class, c.getCaze(), c.getCaseInJurisdiction(), null); +// } +// }); return dtos; } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactListCriteriaBuilder.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactListCriteriaBuilder.java index 922029ebcf9..af32ff8cfff 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactListCriteriaBuilder.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/contact/ContactListCriteriaBuilder.java @@ -101,6 +101,8 @@ public List> getContactIndexSelections(Root contact, Conta joins.getCaseRegion().get(Region.NAME), joins.getCaseDistrict().get(District.NAME), contact.get(Contact.CHANGE_DATE), + joins.getPerson().get(Person.OTHER_NAME), + joins.getCasePerson().get(Person.OTHER_NAME), contact.get(Contact.EXTERNAL_ID), contact.get(Contact.EXTERNAL_TOKEN), contact.get(Contact.INTERNAL_TOKEN), @@ -169,6 +171,7 @@ private List> getIndexOrders(SortProperty sortProperty, Root getIndexList( event.get(Event.UUID), person.get(Person.FIRST_NAME), person.get(Person.LAST_NAME), + person.get(Person.OTHER_NAME), person.get(Person.SEX), person.get(Person.APPROXIMATE_AGE), person.get(Person.APPROXIMATE_AGE_TYPE), @@ -506,6 +507,7 @@ public List getIndexList( event.get(Event.UUID), person.get(Person.FIRST_NAME), person.get(Person.LAST_NAME), + person.get(Person.OTHER_NAME), person.get(Person.SEX), person.get(Person.APPROXIMATE_AGE), person.get(Person.APPROXIMATE_AGE_TYPE), @@ -544,6 +546,7 @@ public List getIndexList( case EventParticipantIndexDto.SEX: case EventParticipantIndexDto.LAST_NAME: case EventParticipantIndexDto.FIRST_NAME: + case EventParticipantIndexDto.OTHER_NAME: expression = person.get(sortProperty.propertyName); break; case EventParticipantIndexDto.CASE_UUID: @@ -667,6 +670,7 @@ public List getExportList( person.get(Person.FIRST_NAME), person.get(Person.LAST_NAME), + person.get(Person.OTHER_NAME), person.get(Person.SALUTATION), person.get(Person.OTHER_SALUTATION), person.get(Person.SEX), diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/externalmessage/ExternalMessage.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/externalmessage/ExternalMessage.java index 40e7a6f8f95..a3f24983514 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/externalmessage/ExternalMessage.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/externalmessage/ExternalMessage.java @@ -59,6 +59,7 @@ public class ExternalMessage extends AbstractDomainObject { public static final String REPORTER_CITY = "reporterCity"; public static final String PERSON_FIRST_NAME = "personFirstName"; public static final String PERSON_LAST_NAME = "personLastName"; + public static final String PERSON_OTHER_NAME = "personOtherName"; public static final String PERSON_SEX = "personSex"; public static final String PERSON_BIRTH_DATE_DD = "personBirthDateDD"; public static final String PERSON_BIRTH_DATE_MM = "personBirthDateMM"; @@ -93,6 +94,7 @@ public class ExternalMessage extends AbstractDomainObject { private String personFirstName; private String personLastName; + private String personOtherName; private Sex personSex; private PresentCondition personPresentCondition; private Integer personBirthDateDD; @@ -254,6 +256,15 @@ public void setPersonLastName(String personLastName) { this.personLastName = personLastName; } + @Column(length = CHARACTER_LIMIT_DEFAULT) + public String getPersonOtherName() { + return personOtherName; + } + + public void setPersonOtherName(String personOtherName) { + this.personOtherName = personOtherName; + } + @Enumerated(EnumType.STRING) public Sex getPersonSex() { return personSex; diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/externalmessage/ExternalMessageFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/externalmessage/ExternalMessageFacadeEjb.java index 91b4c829574..3bb0d9a15fe 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/externalmessage/ExternalMessageFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/externalmessage/ExternalMessageFacadeEjb.java @@ -82,6 +82,7 @@ public class ExternalMessageFacadeEjb implements ExternalMessageFacade { ExternalMessageIndexDto.TYPE, ExternalMessageIndexDto.PERSON_FIRST_NAME, ExternalMessageIndexDto.PERSON_LAST_NAME, + ExternalMessageIndexDto.PERSON_OTHER_NAME, ExternalMessageIndexDto.PERSON_POSTAL_CODE, ExternalMessageIndexDto.REPORTER_NAME, ExternalMessageIndexDto.REPORTER_POSTAL_CODE, @@ -126,6 +127,7 @@ ExternalMessage fromDto(@NotNull ExternalMessageDto source, ExternalMessage targ target.setPersonFirstName(source.getPersonFirstName()); target.setPersonHouseNumber(source.getPersonHouseNumber()); target.setPersonLastName(source.getPersonLastName()); + target.setPersonOtherName(source.getPersonOtherName()); target.setPersonPostalCode(source.getPersonPostalCode()); target.setPersonSex(source.getPersonSex()); target.setPersonPresentCondition(source.getPersonPresentCondition()); @@ -225,6 +227,7 @@ public ExternalMessageDto toDto(ExternalMessage source) { target.setPersonFirstName(source.getPersonFirstName()); target.setPersonHouseNumber(source.getPersonHouseNumber()); target.setPersonLastName(source.getPersonLastName()); + target.setPersonOtherName(source.getPersonOtherName()); target.setPersonPostalCode(source.getPersonPostalCode()); target.setPersonSex(source.getPersonSex()); target.setPersonPresentCondition(source.getPersonPresentCondition()); @@ -355,6 +358,7 @@ public List getIndexList( labMessage.get(ExternalMessage.SAMPLE_OVERALL_TEST_RESULT), labMessage.get(ExternalMessage.PERSON_FIRST_NAME), labMessage.get(ExternalMessage.PERSON_LAST_NAME), + labMessage.get(ExternalMessage.PERSON_OTHER_NAME), labMessage.get(ExternalMessage.PERSON_BIRTH_DATE_YYYY), labMessage.get(ExternalMessage.PERSON_BIRTH_DATE_MM), labMessage.get(ExternalMessage.PERSON_BIRTH_DATE_DD), diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/externalmessage/ExternalMessageService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/externalmessage/ExternalMessageService.java index cff541b82cc..7810dc246d8 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/externalmessage/ExternalMessageService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/externalmessage/ExternalMessageService.java @@ -86,6 +86,7 @@ public Predicate buildCriteriaFilter(CriteriaBuilder cb, Root l CriteriaBuilderHelper.ilike(cb, labMessage.get(ExternalMessage.UUID), textFilter), CriteriaBuilderHelper.unaccentedIlike(cb, labMessage.get(ExternalMessage.PERSON_FIRST_NAME), textFilter), CriteriaBuilderHelper.unaccentedIlike(cb, labMessage.get(ExternalMessage.PERSON_LAST_NAME), textFilter), + CriteriaBuilderHelper.unaccentedIlike(cb, labMessage.get(ExternalMessage.PERSON_OTHER_NAME), textFilter), CriteriaBuilderHelper.ilike(cb, labMessage.get(ExternalMessage.PERSON_POSTAL_CODE), textFilter), CriteriaBuilderHelper.unaccentedIlike(cb, labMessage.get(ExternalMessage.REPORTER_NAME), textFilter), CriteriaBuilderHelper.ilike(cb, labMessage.get(ExternalMessage.REPORTER_POSTAL_CODE), textFilter)); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/location/Location.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/location/Location.java index 05aaf9b3594..abaa74363cc 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/location/Location.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/location/Location.java @@ -97,6 +97,7 @@ public class Location extends AbstractDomainObject { private String postalCode; private String street; + private String landMark; private String houseNumber; private String additionalInformation; private PersonAddressType addressType; @@ -235,6 +236,15 @@ public void setStreet(String street) { this.street = street; } + @Column(length = CHARACTER_LIMIT_BIG) + public String getLandMark() { + return landMark; + } + + public void setLandMark(String landMark) { + this.landMark = landMark; + } + @Column(length = CHARACTER_LIMIT_DEFAULT) public String getHouseNumber() { return houseNumber; diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/person/Person.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/person/Person.java index 1cf129068b9..4df434a7fe7 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/person/Person.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/person/Person.java @@ -83,6 +83,7 @@ public class Person extends AbstractDomainObject implements HasExternalData { public static final String FIRST_NAME = "firstName"; public static final String LAST_NAME = "lastName"; + public static final String OTHER_NAME = "otherName"; public static final String SALUTATION = "salutation"; public static final String OTHER_SALUTATION = "otherSalutation"; public static final String NICKNAME = "nickname"; @@ -123,6 +124,7 @@ public class Person extends AbstractDomainObject implements HasExternalData { public static final String BIRTH_WEIGHT = "birthWeight"; public static final String PASSPORT_NUMBER = "passportNumber"; public static final String NATIONAL_HEALTH_ID = "nationalHealthId"; + public static final String GHANA_CARD = "ghanacard"; public static final String PLACE_OF_BIRTH_FACILITY_TYPE = "placeOfBirthFacilityType"; public static final String ADDRESSES = "addresses"; public static final String PERSON_CONTACT_DETAILS = "personContactDetails"; @@ -145,6 +147,7 @@ public class Person extends AbstractDomainObject implements HasExternalData { private String firstName; private String lastName; + private String otherName; private Salutation salutation; private String otherSalutation; private String birthName; @@ -193,6 +196,7 @@ public class Person extends AbstractDomainObject implements HasExternalData { private ArmedForcesRelationType armedForcesRelationType; private String passportNumber; private String nationalHealthId; + private String ghanaCard; private FacilityType placeOfBirthFacilityType; private Set addresses = new HashSet<>(); private Set personContactDetails = new HashSet<>(); @@ -234,6 +238,15 @@ public void setLastName(String lastName) { this.lastName = lastName; } + @Column(nullable = true, length = CHARACTER_LIMIT_DEFAULT) + public String getOtherName() { + return otherName; + } + + public void setOtherName(String otherName) { + this.otherName = otherName; + } + @Enumerated(EnumType.STRING) public Salutation getSalutation() { return salutation; @@ -587,6 +600,14 @@ public void setNationalHealthId(String nationalHealthId) { this.nationalHealthId = nationalHealthId; } + @Column + public String getGhanaCard() { + return ghanaCard; + } + + public void setGhanaCard(String ghanaCard) { + this.ghanaCard = ghanaCard; + } @Enumerated(EnumType.STRING) public FacilityType getPlaceOfBirthFacilityType() { return placeOfBirthFacilityType; @@ -801,7 +822,7 @@ private String getPersonContactInformation(PersonContactDetailType personContact } public PersonReferenceDto toReference() { - return new PersonReferenceDto(getUuid(), getFirstName(), getLastName()); + return new PersonReferenceDto(getUuid(), getFirstName(), getLastName(), getOtherName()); } @Transient diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/person/PersonFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/person/PersonFacadeEjb.java index ade029c7a7e..ed7f7aecf6a 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/person/PersonFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/person/PersonFacadeEjb.java @@ -350,6 +350,7 @@ public JournalPersonDto getPersonForJournal(PersonDto detailedPerson) { exportPerson.setPseudonymized(detailedPerson.isPseudonymized()); exportPerson.setFirstName(detailedPerson.getFirstName()); exportPerson.setLastName(detailedPerson.getLastName()); + exportPerson.setOtherName(detailedPerson.getOtherName()); exportPerson.setBirthdateYYYY(detailedPerson.getBirthdateYYYY()); exportPerson.setBirthdateMM(detailedPerson.getBirthdateMM()); exportPerson.setBirthdateDD(detailedPerson.getBirthdateDD()); @@ -896,6 +897,7 @@ public static PersonDto toDto(Person source) { target.setFirstName(source.getFirstName()); target.setLastName(source.getLastName()); + target.setOtherName(source.getOtherName()); target.setSalutation(source.getSalutation()); target.setOtherSalutation(source.getOtherSalutation()); target.setSex(source.getSex()); @@ -982,6 +984,7 @@ public static PersonDto toDto(Person source) { target.setPassportNumber(source.getPassportNumber()); target.setNationalHealthId(source.getNationalHealthId()); + target.setGhanaCard(source.getGhanaCard()); target.setPlaceOfBirthFacilityType(source.getPlaceOfBirthFacilityType()); target.setSymptomJournalStatus(source.getSymptomJournalStatus()); @@ -1322,6 +1325,7 @@ public List getIndexList(PersonCriteria criteria, Integer first, person.get(Person.UUID), person.get(Person.FIRST_NAME), person.get(Person.LAST_NAME), + person.get(Person.OTHER_NAME), person.get(Person.APPROXIMATE_AGE), person.get(Person.APPROXIMATE_AGE_TYPE), person.get(Person.BIRTHDATE_DD), @@ -1352,6 +1356,7 @@ public List getIndexList(PersonCriteria criteria, Integer first, case PersonIndexDto.UUID: case PersonIndexDto.FIRST_NAME: case PersonIndexDto.LAST_NAME: + case PersonIndexDto.OTHER_NAME: case PersonIndexDto.SEX: expression = person.get(sortProperty.propertyName); break; @@ -1416,6 +1421,7 @@ public List getExportList(PersonCriteria criteria, int first, i person.get(Person.UUID), person.get(Person.FIRST_NAME), person.get(Person.LAST_NAME), + person.get(Person.OTHER_NAME), person.get(Person.SALUTATION), person.get(Person.OTHER_SALUTATION), person.get(Person.SEX), @@ -1462,6 +1468,7 @@ public List getExportList(PersonCriteria criteria, int first, i person.get(Person.PASSPORT_NUMBER), person.get(Person.NATIONAL_HEALTH_ID), + person.get(Person.GHANA_CARD), person.get(Person.HAS_COVID_APP), person.get(Person.COVID_CODE_DELIVERED), @@ -1576,7 +1583,7 @@ public static PersonReferenceDto toReferenceDto(Person entity) { if (entity == null) { return null; } - return new PersonReferenceDto(entity.getUuid(), entity.getFirstName(), entity.getLastName()); + return new PersonReferenceDto(entity.getUuid(), entity.getFirstName(), entity.getLastName(), entity.getOtherName()); } public Person fillOrBuildEntity(@NotNull PersonDto source, Person target, boolean checkChangeDate) { @@ -1585,6 +1592,7 @@ public Person fillOrBuildEntity(@NotNull PersonDto source, Person target, boolea target.setFirstName(source.getFirstName()); target.setLastName(source.getLastName()); + target.setOtherName(source.getOtherName()); target.setSalutation(source.getSalutation()); target.setOtherSalutation(source.getOtherSalutation()); target.setSex(source.getSex()); @@ -1664,6 +1672,7 @@ public Person fillOrBuildEntity(@NotNull PersonDto source, Person target, boolea target.setPassportNumber(source.getPassportNumber()); target.setNationalHealthId(source.getNationalHealthId()); + target.setGhanaCard(source.getGhanaCard()); target.setPlaceOfBirthFacilityType(source.getPlaceOfBirthFacilityType()); target.setSymptomJournalStatus(source.getSymptomJournalStatus()); @@ -1694,7 +1703,8 @@ public boolean isPersonSimilarToExisting(PersonDto referencePerson) { .birthdateMM(referencePerson.getBirthdateMM()) .birthdateYYYY(referencePerson.getBirthdateYYYY()) .passportNumber(referencePerson.getPassportNumber()) - .nationalHealthId(referencePerson.getNationalHealthId()); + .nationalHealthId(referencePerson.getNationalHealthId()) + .ghanaCard(referencePerson.getGhanaCard()); return checkMatchingNameInDatabase(userFacade.getCurrentUser().toReference(), criteria); } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/person/PersonService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/person/PersonService.java index 8b1e8eca42f..dbecda11872 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/person/PersonService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/person/PersonService.java @@ -708,6 +708,7 @@ private SimilarPersonDto toSimilarPersonDto(Person entity) { similarPersonDto.setHouseNumber(entity.getAddress().getHouseNumber()); similarPersonDto.setNationalHealthId(entity.getNationalHealthId()); similarPersonDto.setPassportNumber(entity.getPassportNumber()); + similarPersonDto.setGhanaCard(entity.getGhanaCard()); return similarPersonDto; } @@ -839,6 +840,14 @@ public Predicate buildSimilarityCriteriaFilter(PersonSimilarityCriteria criteria if (!StringUtils.isBlank(criteria.getPassportNumber())) { filter = CriteriaBuilderHelper.or(cb, filter, cb.equal(personFrom.get(Person.PASSPORT_NUMBER), criteria.getPassportNumber())); } + if (!StringUtils.isBlank(criteria.getGhanaCard())) { + filter = and( + cb, + filter, + cb.or( + cb.isNull(personFrom.get(Person.GHANA_CARD)), + cb.equal(personFrom.get(Person.GHANA_CARD), criteria.getGhanaCard()))); + } String uuidExternalIdExternalTokenLike = criteria.getUuidExternalIdExternalTokenLike(); if (!StringUtils.isBlank(uuidExternalIdExternalTokenLike)) { diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/Sample.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/Sample.java index 474297e6744..348d92bfd62 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/Sample.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/Sample.java @@ -143,12 +143,15 @@ public class Sample extends DeletableAdo implements SormasToSormasShareable { private Date pathogenTestResultChangeDate; private Boolean pathogenTestingRequested; + private Boolean sampleMaterialRequested; private Boolean additionalTestingRequested; private Set requestedPathogenTests; + private Set requestedSampleMaterials; private Set requestedAdditionalTests; private String requestedOtherPathogenTests; private String requestedOtherAdditionalTests; private String requestedPathogenTestsString; + private String requestedSampleMaterialsString; private String requestedAdditionalTestsString; private SamplingReason samplingReason; private String samplingReasonDetails; @@ -421,6 +424,15 @@ public void setPathogenTestingRequested(Boolean pathogenTestingRequested) { this.pathogenTestingRequested = pathogenTestingRequested; } + @Column + public Boolean getSampleMaterialRequested() { + return sampleMaterialRequested; + } + + public void setSampleMaterialRequested(Boolean sampleMaterialRequested) { + this.sampleMaterialRequested = sampleMaterialRequested; + } + @Column public Boolean getAdditionalTestingRequested() { return additionalTestingRequested; @@ -461,6 +473,37 @@ public void setRequestedPathogenTests(Set requestedPathogenTes requestedPathogenTestsString = sb.toString(); } + @Transient + public Set getRequestedSampleMaterials() { + if (requestedSampleMaterials == null) { + if (StringUtils.isEmpty(requestedSampleMaterialsString)) { + requestedSampleMaterials = new HashSet<>(); + } else { + requestedSampleMaterials = + Arrays.stream(requestedSampleMaterialsString.split(",")).map(SampleMaterial::valueOf).collect(Collectors.toSet()); + } + } + return requestedSampleMaterials; + } + + public void setRequestedSampleMaterials(Set requestedSampleMaterials) { + this.requestedSampleMaterials = requestedSampleMaterials; + + if (this.requestedSampleMaterials == null) { + return; + } + + StringBuilder sb = new StringBuilder(); + requestedSampleMaterials.stream().forEach(t -> { + sb.append(t.name()); + sb.append(","); + }); + if (sb.length() > 0) { + sb.substring(0, sb.lastIndexOf(",")); + } + requestedSampleMaterialsString = sb.toString(); + } + @Transient public Set getRequestedAdditionalTests() { if (requestedAdditionalTests == null) { diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleFacadeEjb.java index cfbf91624d9..2e6ce4f0b6d 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleFacadeEjb.java @@ -35,6 +35,7 @@ import javax.validation.Valid; import javax.validation.constraints.NotNull; +import de.symeda.sormas.api.Disease; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -375,6 +376,9 @@ public SampleDto saveSample(@Valid SampleDto dto, boolean handleChanges, boolean if (sample.getAdditionalTestingRequested() == null) { sample.setAdditionalTestingRequested(false); } + if (sample.getSampleMaterialRequested() == null) { + sample.setSampleMaterialRequested(false); + } sampleService.ensurePersisted(sample); @@ -449,16 +453,16 @@ public void validate(SampleDto sample, boolean checkAssociatedEntities) throws V I18nProperties .getValidationError(Validations.required, I18nProperties.getPrefixCaption(SampleDto.I18N_PREFIX, SampleDto.REPORT_DATE_TIME))); } - if (sample.getSampleMaterial() == null) { + /*if (sample.getRequestedSampleMaterials() == null) { throw new ValidationRuntimeException( I18nProperties - .getValidationError(Validations.required, I18nProperties.getPrefixCaption(SampleDto.I18N_PREFIX, SampleDto.SAMPLE_MATERIAL))); - } - if (sample.getSamplePurpose() == null) { + .getValidationError(Validations.required, I18nProperties.getPrefixCaption(SampleDto.I18N_PREFIX, SampleDto.REQUESTED_SAMPLE_MATERIALS))); + }*/ + /*if (sample.getSamplePurpose() == null && (!DISEASE.equals(Disease.YELLOW_FEVER.toString()))) { throw new ValidationRuntimeException( I18nProperties .getValidationError(Validations.required, I18nProperties.getPrefixCaption(SampleDto.I18N_PREFIX, SampleDto.SAMPLE_PURPOSE))); - } + }*/ if (sample.getSamplePurpose() == SamplePurpose.EXTERNAL && sample.getLab() == null) { throw new ValidationRuntimeException( I18nProperties.getValidationError(Validations.required, I18nProperties.getPrefixCaption(SampleDto.I18N_PREFIX, SampleDto.LAB))); @@ -791,8 +795,10 @@ public Sample fromDto(@NotNull SampleDto source, boolean checkChangeDate) { target.setShipped(source.isShipped()); target.setReceived(source.isReceived()); target.setPathogenTestingRequested(source.getPathogenTestingRequested()); + target.setSampleMaterialRequested(source.getSampleMaterialRequested()); target.setAdditionalTestingRequested(source.getAdditionalTestingRequested()); target.setRequestedPathogenTests(source.getRequestedPathogenTests()); + target.setRequestedSampleMaterials(source.getRequestedSampleMaterials()); target.setRequestedAdditionalTests(source.getRequestedAdditionalTests()); target.setPathogenTestResult(source.getPathogenTestResult()); target.setRequestedOtherPathogenTests(source.getRequestedOtherPathogenTests()); @@ -921,8 +927,10 @@ public static SampleDto toDto(Sample source) { target.setShipped(source.isShipped()); target.setReceived(source.isReceived()); target.setPathogenTestingRequested(source.getPathogenTestingRequested()); + target.setSampleMaterialRequested(source.getSampleMaterialRequested()); target.setAdditionalTestingRequested(source.getAdditionalTestingRequested()); target.setRequestedPathogenTests(source.getRequestedPathogenTests()); + target.setRequestedSampleMaterials(source.getRequestedSampleMaterials()); target.setRequestedAdditionalTests(source.getRequestedAdditionalTests()); target.setPathogenTestResult(source.getPathogenTestResult()); target.setRequestedOtherPathogenTests(source.getRequestedOtherPathogenTests()); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/task/TaskFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/task/TaskFacadeEjb.java index befe5847cfe..4a17dc48fdb 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/task/TaskFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/task/TaskFacadeEjb.java @@ -515,6 +515,7 @@ public List getIndexList(TaskCriteria taskCriteria, Integer first, joins.getCaze().get(Case.UUID), joins.getCasePerson().get(Person.FIRST_NAME), joins.getCasePerson().get(Person.LAST_NAME), + joins.getCasePerson().get(Person.OTHER_NAME), joins.getEvent().get(Event.UUID), joins.getEvent().get(Event.EVENT_TITLE), joins.getEvent().get(Event.DISEASE), @@ -525,12 +526,15 @@ public List getIndexList(TaskCriteria taskCriteria, Integer first, joins.getContact().get(Contact.UUID), joins.getContactPerson().get(Person.FIRST_NAME), joins.getContactPerson().get(Person.LAST_NAME), + joins.getContactPerson().get(Person.OTHER_NAME), joins.getContactCasePerson().get(Person.FIRST_NAME), joins.getContactCasePerson().get(Person.LAST_NAME), + joins.getContactCasePerson().get(Person.OTHER_NAME), joins.getTravelEntry().get(TravelEntry.UUID), joins.getTravelEntry().get(TravelEntry.EXTERNAL_ID), joins.getTravelEntryPerson().get(Person.FIRST_NAME), joins.getTravelEntryPerson().get(Person.LAST_NAME), + joins.getTravelEntryPerson().get(Person.OTHER_NAME), task.get(Task.TASK_TYPE), task.get(Task.PRIORITY), task.get(Task.DUE_DATE), diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/travelentry/TravelEntryFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/travelentry/TravelEntryFacadeEjb.java index e88ac88195b..085267101a9 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/travelentry/TravelEntryFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/travelentry/TravelEntryFacadeEjb.java @@ -92,7 +92,9 @@ public static TravelEntryReferenceDto toReferenceDto(TravelEntry entity) { entity.getUuid(), entity.getExternalId(), entity.getPerson().getFirstName(), - entity.getPerson().getLastName()); + entity.getPerson().getLastName(), + entity.getPerson().getOtherName() + ); } @Inject @@ -320,7 +322,8 @@ public TravelEntryReferenceDto toRefDto(TravelEntry entity) { entity.getUuid(), entity.getExternalId(), entity.getPerson().getFirstName(), - entity.getPerson().getLastName()); + entity.getPerson().getLastName(), + entity.getPerson().getOtherName()); } @Override diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/travelentry/services/TravelEntryService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/travelentry/services/TravelEntryService.java index 66ba6973668..2f28a056085 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/travelentry/services/TravelEntryService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/travelentry/services/TravelEntryService.java @@ -214,7 +214,9 @@ public void deletePermanent(TravelEntry travelEntry) { travelEntry.getUuid(), travelEntry.getExternalId(), travelEntry.getPerson().getFirstName(), - travelEntry.getPerson().getLastName())), + travelEntry.getPerson().getLastName(), + travelEntry.getPerson().getOtherName() + )), true); for (Task task : tasks) { taskService.deletePermanent(task); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/user/User.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/user/User.java index 8e52205d3fd..3ccf42d6e02 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/user/User.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/user/User.java @@ -77,6 +77,7 @@ public class User extends AbstractDomainObject { public static final String ACTIVE = "active"; public static final String FIRST_NAME = "firstName"; public static final String LAST_NAME = "lastName"; + public static final String OTHER_NAME = "otherName"; public static final String USER_EMAIL = "userEmail"; public static final String PHONE = "phone"; public static final String ADDRESS = "address"; diff --git a/sormas-backend/src/main/resources/sql/sormas_schema.sql b/sormas-backend/src/main/resources/sql/sormas_schema.sql index 7db0b8ad8b6..4e48f3b2661 100644 --- a/sormas-backend/src/main/resources/sql/sormas_schema.sql +++ b/sormas-backend/src/main/resources/sql/sormas_schema.sql @@ -11660,5 +11660,42 @@ INSERT INTO schema_version (version_number, comment) VALUES (472, 'Adjust passwo ALTER TABLE cases ADD COLUMN specifyotheroutcome varchar(255); INSERT INTO schema_version (version_number, comment) VALUES (473, 'Added a column name specifyotheroutcome to the cases'); +ALTER TABLE person ADD COLUMN othername varchar(512) NULL; +ALTER TABLE location ADD COLUMN contactPersonOtherName text; +ALTER TABLE person_history ADD COLUMN othername varchar(512); + +INSERT INTO schema_version (version_number, comment) VALUES (474, 'Added a column name othername to person'); + +ALTER TABLE person ADD COLUMN ghanacard varchar(255) NULL; +INSERT INTO schema_version (version_number, comment) VALUES (475, 'Added a column name ghanacard to person'); + +ALTER TABLE location ADD COLUMN landmark varchar(255) NULL; +INSERT INTO schema_version (version_number, comment) VALUES (477, 'Added a column name landmark to location'); + +ALTER TABLE externalmessage ADD COLUMN personothername varchar(255) NULL; +ALTER TABLE externalmessage_history ADD COLUMN personothername varchar(255) NULL; +INSERT INTO schema_version (version_number, comment) VALUES (478, 'Added a column name landmark to location'); + +ALTER TABLE cases ADD COLUMN ipsamplesent varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (479, 'Added a column name ipsamplesent to cases'); + +ALTER TABLE cases ADD COLUMN ipsampleresults varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (480, 'Added a column name ipsampleresults to cases'); + +ALTER TABLE cases ADD COLUMN vaccinationtype varchar(255); +ALTER TABLE cases ADD COLUMN vaccinationdate timestamp; +INSERT INTO schema_version (version_number, comment) VALUES (481, 'Added columns vaccinationtype and vaccinationdate to cases'); + +ALTER TABLE samples ADD COLUMN samplematerialrequested boolean; +ALTER TABLE samples_history ADD COLUMN samplematerialrequested boolean; +ALTER TABLE samples ALTER COLUMN samplematerial DROP NOT NULL; +ALTER TABLE cases ADD COLUMN afpfacilityoptions varchar(255) NULL; +ALTER TABLE location ADD COLUMN afpfacilityoptions varchar(255) NULL; +ALTER TABLE facility ADD COLUMN landmark varchar(255) NULL; + +INSERT INTO schema_version (version_number, comment) VALUES (482, 'Added a column name samplematerialrequested to samples and samples_history, altered column samplematerial in samples to not null, Added columns afpfacilityoptions to cases and location, Added a column name landmark to facility'); + +ALTER TABLE samples ALTER COLUMN samplepurpose DROP NOT NULL; +INSERT INTO schema_version (version_number, comment) VALUES (483, 'altered column samplepurpose in samples to not null'); -- *** Insert new sql commands BEFORE this line. Remember to always consider _history tables. *** diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/externalmessage/ExternalMessageFacadeEjbMappingTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/externalmessage/ExternalMessageFacadeEjbMappingTest.java index d944d640df2..0c4a297686d 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/externalmessage/ExternalMessageFacadeEjbMappingTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/externalmessage/ExternalMessageFacadeEjbMappingTest.java @@ -83,6 +83,7 @@ public void testFromDto() { source.setTestedDisease(Disease.CORONAVIRUS); source.setPersonFirstName("Person First Name"); source.setPersonLastName("Person Last Name"); + source.setPersonOtherName("Person Other Name"); source.setPersonSex(Sex.OTHER); source.setPersonPresentCondition(PresentCondition.ALIVE); source.setPersonBirthDateDD(1); @@ -172,6 +173,7 @@ public void testToDto() { source.setTestedDisease(Disease.CORONAVIRUS); source.setPersonFirstName("Person First Name"); source.setPersonLastName("Person Last Name"); + source.setPersonOtherName("Person Other Name"); source.setPersonSex(Sex.OTHER); source.setPersonPresentCondition(PresentCondition.DEAD); source.setPersonBirthDateDD(1); @@ -210,6 +212,7 @@ public void testToDto() { assertEquals(source.getTestedDisease(), result.getTestedDisease()); assertEquals(source.getPersonFirstName(), result.getPersonFirstName()); assertEquals(source.getPersonLastName(), result.getPersonLastName()); + assertEquals(source.getPersonOtherName(), result.getPersonOtherName()); assertEquals(source.getPersonSex(), result.getPersonSex()); assertEquals(source.getPersonPresentCondition(), result.getPersonPresentCondition()); assertEquals(source.getPersonBirthDateDD(), result.getPersonBirthDateDD()); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractCaseGrid.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractCaseGrid.java index 38c21c7b80f..b2f15a743fa 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractCaseGrid.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractCaseGrid.java @@ -230,6 +230,8 @@ protected Stream getGridColumns() { Stream.of(CaseIndexDto.QUARANTINE_TO, CaseIndexDto.CREATION_DATE), getFollowUpColumns(), Stream.of(CaseIndexDto.VACCINATION_STATUS), + Stream.of(CaseIndexDto.VACCINATION_TYPE), + Stream.of(CaseIndexDto.VACCINATION_DATE), Stream.of(COLUMN_COMPLETENESS)) .flatMap(Function.identity()); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractTableField.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractTableField.java index a79bce43e31..9e509ef2d6e 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractTableField.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractTableField.java @@ -99,6 +99,8 @@ public void setMaxTablePageLength(int maxTablePageLength) { protected UiFieldAccessCheckers fieldAccessCheckers; + protected CaseDataForm caseDataForm; + public AbstractTableField(UiFieldAccessCheckers fieldAccessCheckers) { this.fieldAccessCheckers = fieldAccessCheckers; diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java index 641f17991d3..7b68d5d4471 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java @@ -77,9 +77,7 @@ import de.symeda.sormas.ui.utils.CssStyles; import de.symeda.sormas.ui.utils.FieldHelper; import de.symeda.sormas.ui.utils.InfrastructureFieldsHelper; -import de.symeda.sormas.ui.utils.NullableOptionGroup; - -public class CaseCreateForm extends AbstractEditForm { +import de.symeda.sormas.ui.utils.NullableOptionGroup;public class CaseCreateForm extends AbstractEditForm { private static final long serialVersionUID = 1L; @@ -118,14 +116,15 @@ public class CaseCreateForm extends AbstractEditForm { private final TravelEntryDto convertedTravelEntry; //@formatter:off - private static final String HTML_LAYOUT = fluidRowLocs(4, CaseDataDto.CASE_ORIGIN, 8, CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION) - // private static final String HTML_LAYOUT = fluidRowLocs(CaseDataDto.CASE_ORIGIN, "") - + fluidRowLocs(CaseDataDto.REPORT_DATE, CaseDataDto.EPID_NUMBER, CaseDataDto.EXTERNAL_ID) - + fluidRow( + private static final String HTML_LAYOUT = fluidRow( fluidColumnLoc(6, 0, CaseDataDto.DISEASE), fluidColumn(6, 0, locs(CaseDataDto.DISEASE_DETAILS, CaseDataDto.PLAGUE_TYPE, CaseDataDto.DENGUE_FEVER_TYPE, CaseDataDto.RABIES_TYPE))) + + fluidRowLocs(6, CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION) + + fluidRowLocs(4, CaseDataDto.CASE_ORIGIN) + // private static final String HTML_LAYOUT = fluidRowLocs(CaseDataDto.CASE_ORIGIN, "") + + fluidRowLocs(CaseDataDto.REPORT_DATE, CaseDataDto.EPID_NUMBER, CaseDataDto.EXTERNAL_ID) + fluidRowLocs(CaseDataDto.DISEASE_VARIANT, CaseDataDto.DISEASE_VARIANT_DETAILS) + fluidRowLocs(RESPONSIBLE_JURISDICTION_HEADING_LOC) + fluidRowLocs(CaseDataDto.RESPONSIBLE_REGION, CaseDataDto.RESPONSIBLE_DISTRICT, CaseDataDto.RESPONSIBLE_COMMUNITY) @@ -137,6 +136,7 @@ public class CaseCreateForm extends AbstractEditForm { + fluidRowLocs(CaseDataDto.REGION, CaseDataDto.DISTRICT, CaseDataDto.COMMUNITY) + fluidRowLocs(FACILITY_TYPE_GROUP_LOC, CaseDataDto.FACILITY_TYPE) + fluidRowLocs(CaseDataDto.HEALTH_FACILITY, CaseDataDto.HEALTH_FACILITY_DETAILS) + + fluidRowLocs(CaseDataDto.AFP_FACILITY_OPTIONS) + fluidRowLocs(DIFFERENT_POINT_OF_ENTRY_JURISDICTION) + fluidRowLocs(POINT_OF_ENTRY_REGION, POINT_OF_ENTRY_DISTRICT) + fluidRowLocs(CaseDataDto.POINT_OF_ENTRY, CaseDataDto.POINT_OF_ENTRY_DETAILS) @@ -256,11 +256,20 @@ protected void addFields() { null); ogCaseOrigin.addValueChangeListener(e -> { + CaseOrigin caseOrigin = (CaseOrigin) e.getProperty().getValue(); + boolean pointOfEntryRegionDistrictVisible = CaseOrigin.POINT_OF_ENTRY.equals(ogCaseOrigin.getValue()) && Boolean.TRUE.equals(differentPointOfEntryJurisdiction.getValue()); pointOfEntryRegionCombo.setVisible(pointOfEntryRegionDistrictVisible); pointOfEntryDistrictCombo.setVisible(pointOfEntryRegionDistrictVisible); - }); + + if (caseOrigin == CaseOrigin.IN_COUNTRY) { + personCreateForm.hidePassportNumber(); + } else{ + personCreateForm.showPassportNumber(); + } + + }); facilityOrHome = addCustomField(FACILITY_OR_HOME_LOC, TypeOfPlace.class, NullableOptionGroup.class, I18nProperties.getCaption(Captions.casePlaceOfStay)); @@ -286,6 +295,7 @@ protected void addFields() { getContent().addComponent(facilityType, CaseDataDto.FACILITY_TYPE); facilityCombo = addInfrastructureField(CaseDataDto.HEALTH_FACILITY); facilityCombo.setImmediate(true); + NullableOptionGroup afpFacilityOptions = addField(CaseDataDto.AFP_FACILITY_OPTIONS, NullableOptionGroup.class); TextField facilityDetails = addField(CaseDataDto.HEALTH_FACILITY_DETAILS, TextField.class); facilityDetails.setVisible(false); ComboBox cbPointOfEntry = addInfrastructureField(CaseDataDto.POINT_OF_ENTRY); @@ -333,6 +343,7 @@ protected void addFields() { communityCombo.addValueChangeListener(e -> { updateFacility(); }); + facilityOrHome.addValueChangeListener(e -> { FieldHelper.removeItems(facilityCombo); if (TypeOfPlace.FACILITY.equals(facilityOrHome.getValue()) @@ -369,7 +380,8 @@ protected void addFields() { region.addItems(FacadeProvider.getRegionFacade().getAllActiveByServerCountry()); OptionGroup caseTransmissionClassification = addField(CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION, OptionGroup.class); - caseTransmissionClassification.setRequired(true); + caseTransmissionClassification.setRequired(false); + caseTransmissionClassification.setVisible(true); // if (userJurisdictionLevel == JurisdictionLevel.COMMUNITY) { // region.setReadOnly(true); // district.setReadOnly(true); @@ -495,7 +507,24 @@ protected void addFields() { } }); diseaseField.addValueChangeListener((ValueChangeListener) valueChangeEvent -> { - updateDiseaseVariant((Disease) valueChangeEvent.getProperty().getValue()); + Disease disease = (Disease) valueChangeEvent.getProperty().getValue(); + updateDiseaseVariant(disease); + + caseTransmissionClassification.setVisible(disease != Disease.YELLOW_FEVER && disease != Disease.CSM && disease != Disease.AHF); + ogCaseOrigin.setVisible(disease != Disease.CSM); + + facilityOrHome.setVisible(disease != Disease.AFP); + if(disease == Disease.AFP){ + setRequired(false,FACILITY_OR_HOME_LOC); + setRequired(false,FACILITY_TYPE_GROUP_LOC); + setRequired(false,CaseDataDto.FACILITY_TYPE); + setRequired(false,CaseDataDto.HEALTH_FACILITY); + setRequired(false,CaseDataDto.HEALTH_FACILITY_DETAILS); + + } + if(disease != Disease.AFP){ + setVisible(false, CaseDataDto.AFP_FACILITY_OPTIONS); + } personCreateForm.updatePresentConditionEnum((Disease) valueChangeEvent.getProperty().getValue()); }); @@ -684,3 +713,4 @@ public void setSearchedPerson(PersonDto searchedPerson) { personCreateForm.setSearchedPerson(searchedPerson); } } + diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java index b36b392ade2..24f092380b4 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java @@ -14,6 +14,7 @@ */ package de.symeda.sormas.ui.caze; +import static de.symeda.sormas.api.clinicalcourse.HealthConditionsDto.OTHER_CONDITIONS; import static de.symeda.sormas.ui.utils.CssStyles.ERROR_COLOR_PRIMARY; import static de.symeda.sormas.ui.utils.CssStyles.FORCE_CAPTION; import static de.symeda.sormas.ui.utils.CssStyles.H3; @@ -33,14 +34,14 @@ import static de.symeda.sormas.ui.utils.LayoutUtil.locCss; import static de.symeda.sormas.ui.utils.LayoutUtil.locs; -import java.util.Arrays; -import java.util.Collections; -import java.util.Date; -import java.util.EnumMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; +import de.symeda.sormas.api.caze.*; +import de.symeda.sormas.api.hospitalization.HospitalizationDto; +import de.symeda.sormas.api.person.PresentCondition; +import de.symeda.sormas.api.person.Sex; +import de.symeda.sormas.api.utils.*; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -75,21 +76,6 @@ import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.EntityDto; import de.symeda.sormas.api.FacadeProvider; -import de.symeda.sormas.api.caze.CaseClassification; -import de.symeda.sormas.api.caze.CaseConfirmationBasis; -import de.symeda.sormas.api.caze.CaseDataDto; -import de.symeda.sormas.api.caze.CaseIdentificationSource; -import de.symeda.sormas.api.caze.CaseLogic; -import de.symeda.sormas.api.caze.CaseOrigin; -import de.symeda.sormas.api.caze.CaseOutcome; -import de.symeda.sormas.api.caze.CaseReferenceDto; -import de.symeda.sormas.api.caze.EndOfIsolationReason; -import de.symeda.sormas.api.caze.HospitalWardType; -import de.symeda.sormas.api.caze.InvestigationStatus; -import de.symeda.sormas.api.caze.PreviousCaseDto; -import de.symeda.sormas.api.caze.QuarantineReason; -import de.symeda.sormas.api.caze.ReinfectionDetail; -import de.symeda.sormas.api.caze.ReinfectionDetailGroup; import de.symeda.sormas.api.caze.classification.DiseaseClassificationCriteriaDto; import de.symeda.sormas.api.contact.ContactDto; import de.symeda.sormas.api.contact.FollowUpStatus; @@ -118,10 +104,6 @@ import de.symeda.sormas.api.symptoms.SymptomsDto; import de.symeda.sormas.api.user.JurisdictionLevel; import de.symeda.sormas.api.user.UserRight; -import de.symeda.sormas.api.utils.DataHelper; -import de.symeda.sormas.api.utils.DateHelper; -import de.symeda.sormas.api.utils.ExtendedReduced; -import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers; import de.symeda.sormas.api.utils.fieldvisibility.FieldVisibilityCheckers; import de.symeda.sormas.api.utils.fieldvisibility.checkers.CountryFieldVisibilityChecker; @@ -254,7 +236,8 @@ public class CaseDataForm extends AbstractEditForm { loc(MEDICAL_INFORMATION_LOC) + fluidRowLocs(CaseDataDto.BLOOD_ORGAN_OR_TISSUE_DONATED) + fluidRowLocs(CaseDataDto.PREGNANT, CaseDataDto.POSTPARTUM) + fluidRowLocs(CaseDataDto.TRIMESTER, "") + - fluidRowLocs(CaseDataDto.VACCINATION_STATUS, "") + + fluidRowLocs(CaseDataDto.IPSAMPLESENT) + fluidRowLocs(CaseDataDto.IPSAMPLERESULTS, "") + + fluidRowLocs(CaseDataDto.VACCINATION_STATUS, CaseDataDto.VACCINATION_TYPE, CaseDataDto.VACCINATION_DATE) + fluidRowLocs(CaseDataDto.SMALLPOX_VACCINATION_RECEIVED, CaseDataDto.SMALLPOX_VACCINATION_SCAR) + fluidRowLocs(CaseDataDto.SMALLPOX_LAST_VACCINATION_DATE, "") + fluidRowLocs(SMALLPOX_VACCINATION_SCAR_IMG) + @@ -298,6 +281,7 @@ public class CaseDataForm extends AbstractEditForm { private CheckBox quarantineOrderedOfficialDocument; private CheckBox differentPlaceOfStayJurisdiction; private ComboBox responsibleDistrict; + private NullableOptionGroup vaccinationStatus; private ComboBox responsibleCommunity; private ComboBox districtCombo; private ComboBox communityCombo; @@ -334,6 +318,9 @@ public CaseDataForm(String caseUuid, PersonDto person, Disease disease, Symptoms addFields(); } + public Disease getDisease() { + return disease; + } public static void updateFacilityDetails(ComboBox cbFacility, TextField tfFacilityDetails) { if (cbFacility.getValue() != null) { boolean otherHealthFacility = ((FacilityReferenceDto) cbFacility.getValue()).getUuid().equals(FacilityDto.OTHER_FACILITY_UUID); @@ -382,9 +369,6 @@ protected void addFields() { addFields( CaseDataDto.UUID, CaseDataDto.REPORTING_USER, - CaseDataDto.DISTRICT_LEVEL_DATE, - CaseDataDto.REGION_LEVEL_DATE, - CaseDataDto.NATIONAL_LEVEL_DATE, CaseDataDto.CLASSIFICATION_DATE, CaseDataDto.CLASSIFICATION_USER, CaseDataDto.CLASSIFICATION_COMMENT, @@ -394,6 +378,16 @@ protected void addFields() { CaseDataDto.CLINICIAN_PHONE, CaseDataDto.CLINICIAN_EMAIL); + DateField districtLevelDate = addField(CaseDataDto.DISTRICT_LEVEL_DATE, DateField.class); + DateField regionLevelDate = addField(CaseDataDto.REGION_LEVEL_DATE, DateField.class); + DateField nationalLevelDate = addField(CaseDataDto.NATIONAL_LEVEL_DATE, DateField.class); + + if(disease == Disease.YELLOW_FEVER || disease == Disease.AHF || disease == Disease.CSM){ + districtLevelDate.setVisible(false); + regionLevelDate.setVisible(false); + nationalLevelDate.setVisible(false); + } + TextField epidField = addField(CaseDataDto.EPID_NUMBER, TextField.class); epidField.setInvalidCommitted(true); epidField.setMaxLength(24); @@ -419,14 +413,28 @@ protected void addFields() { } TextField externalTokenField = addField(CaseDataDto.EXTERNAL_TOKEN, TextField.class); + externalTokenField.setVisible(true); Label externalTokenWarningLabel = new Label(I18nProperties.getString(Strings.messageCaseExternalTokenWarning)); externalTokenWarningLabel.addStyleNames(VSPACE_3, LABEL_WHITE_SPACE_NORMAL); getContent().addComponent(externalTokenWarningLabel, EXTERNAL_TOKEN_WARNING_LOC); - addField(CaseDataDto.INTERNAL_TOKEN, TextField.class); + TextField internaltoken = addField(CaseDataDto.INTERNAL_TOKEN, TextField.class); + internaltoken.setVisible(true); + + NullableOptionGroup investigationstatus = addField(CaseDataDto.INVESTIGATION_STATUS, NullableOptionGroup.class); + investigationstatus.setVisible(true); + + NullableOptionGroup outcome = new NullableOptionGroup("Outcome"); - addField(CaseDataDto.INVESTIGATION_STATUS, NullableOptionGroup.class); - addField(CaseDataDto.OUTCOME, NullableOptionGroup.class); + if(disease == Disease.YELLOW_FEVER || disease == Disease.AHF){ + + for(CaseOutcome caseOutcome : CaseOutcome.values()){ + if(caseOutcome == CaseOutcome.DECEASED || caseOutcome == CaseOutcome.ALIVE){ + outcome.addItem(caseOutcome); + } + } + } + addField(CaseDataDto.OUTCOME, outcome); addField(CaseDataDto.BLOOD_ORGAN_OR_TISSUE_DONATED, NullableOptionGroup.class); addField(CaseDataDto.SEQUELAE, NullableOptionGroup.class); @@ -451,9 +459,9 @@ protected void addFields() { addField(CaseDataDto.PLAGUE_TYPE, NullableOptionGroup.class); addField(CaseDataDto.DENGUE_FEVER_TYPE, NullableOptionGroup.class); addField(CaseDataDto.RABIES_TYPE, NullableOptionGroup.class); - addField(CaseDataDto.CASE_ORIGIN, TextField.class); - addField(CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION, OptionGroup.class); + OptionGroup caseTransmissionClassification = addField(CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION, OptionGroup.class); + caseTransmissionClassification.setVisible(true); quarantine = addField(CaseDataDto.QUARANTINE); quarantine.addValueChangeListener(e -> onValueChange()); @@ -480,50 +488,54 @@ protected void addFields() { setReadOnly(true, CaseDataDto.PREVIOUS_QUARANTINE_TO); setVisible(false, CaseDataDto.QUARANTINE_CHANGE_COMMENT, CaseDataDto.PREVIOUS_QUARANTINE_TO); - if (isConfiguredServer(CountryHelper.COUNTRY_CODE_GERMANY)) { - final ComboBox cbCaseClassification = addField(CaseDataDto.CASE_CLASSIFICATION, ComboBox.class); - cbCaseClassification.addValidator( - new GermanCaseClassificationValidator(caseUuid, I18nProperties.getValidationError(Validations.caseClassificationInvalid))); + if(disease != Disease.CSM && disease != Disease.YELLOW_FEVER){ + if (isConfiguredServer(CountryHelper.COUNTRY_CODE_GERMANY)) { - ComboBox caseReferenceDefinition = addField(CaseDataDto.CASE_REFERENCE_DEFINITION, ComboBox.class); - caseReferenceDefinition.setReadOnly(true); + final ComboBox cbCaseClassification = addField(CaseDataDto.CASE_CLASSIFICATION, ComboBox.class); + cbCaseClassification.addValidator( + new GermanCaseClassificationValidator(caseUuid, I18nProperties.getValidationError(Validations.caseClassificationInvalid))); - if (diseaseClassificationExists()) { - Button caseClassificationCalculationButton = ButtonHelper.createButton(Captions.caseClassificationCalculationButton, e -> { - CaseClassification classification = FacadeProvider.getCaseClassificationFacade().getClassification(getValue()); - ((Field) getField(CaseDataDto.CASE_CLASSIFICATION)).setValue(classification); - }, ValoTheme.BUTTON_PRIMARY, FORCE_CAPTION); + ComboBox caseReferenceDefinition = addField(CaseDataDto.CASE_REFERENCE_DEFINITION, ComboBox.class); + caseReferenceDefinition.setReadOnly(true); - getContent().addComponent(caseClassificationCalculationButton, CASE_CLASSIFICATION_CALCULATE_BTN_LOC); + if (diseaseClassificationExists()) { + Button caseClassificationCalculationButton = ButtonHelper.createButton(Captions.caseClassificationCalculationButton, e -> { + CaseClassification classification = FacadeProvider.getCaseClassificationFacade().getClassification(getValue()); + ((Field) getField(CaseDataDto.CASE_CLASSIFICATION)).setValue(classification); + }, ValoTheme.BUTTON_PRIMARY, FORCE_CAPTION); - if (!UserProvider.getCurrent().hasUserRight(UserRight.CASE_CLASSIFY)) { - caseClassificationCalculationButton.setEnabled(false); - } - } + getContent().addComponent(caseClassificationCalculationButton, CASE_CLASSIFICATION_CALCULATE_BTN_LOC); - //if(cbCaseClassification.getCaption()) - addField(CaseDataDto.NOT_A_CASE_REASON_NEGATIVE_TEST, CheckBox.class); - addField(CaseDataDto.NOT_A_CASE_REASON_PHYSICIAN_INFORMATION, CheckBox.class); - addField(CaseDataDto.NOT_A_CASE_REASON_DIFFERENT_PATHOGEN, CheckBox.class); - addField(CaseDataDto.NOT_A_CASE_REASON_OTHER, CheckBox.class); - addField(CaseDataDto.NOT_A_CASE_REASON_DETAILS, TextField.class); + if (!UserProvider.getCurrent().hasUserRight(UserRight.CASE_CLASSIFY)) { + caseClassificationCalculationButton.setEnabled(false); + } - FieldHelper.setVisibleWhen( - getFieldGroup(), - Arrays.asList( - CaseDataDto.NOT_A_CASE_REASON_NEGATIVE_TEST, - CaseDataDto.NOT_A_CASE_REASON_PHYSICIAN_INFORMATION, - CaseDataDto.NOT_A_CASE_REASON_DIFFERENT_PATHOGEN, - CaseDataDto.NOT_A_CASE_REASON_OTHER), - CaseDataDto.CASE_CLASSIFICATION, - CaseClassification.NO_CASE, - true); + } - FieldHelper.setVisibleWhen(getFieldGroup(), CaseDataDto.NOT_A_CASE_REASON_DETAILS, CaseDataDto.NOT_A_CASE_REASON_OTHER, true, true); - } else { - final NullableOptionGroup caseClassificationGroup = addField(CaseDataDto.CASE_CLASSIFICATION, NullableOptionGroup.class); - caseClassificationGroup.removeItem(CaseClassification.CONFIRMED_NO_SYMPTOMS); - caseClassificationGroup.removeItem(CaseClassification.CONFIRMED_UNKNOWN_SYMPTOMS); + //if(cbCaseClassification.getCaption()) + addField(CaseDataDto.NOT_A_CASE_REASON_NEGATIVE_TEST, CheckBox.class); + addField(CaseDataDto.NOT_A_CASE_REASON_PHYSICIAN_INFORMATION, CheckBox.class); + addField(CaseDataDto.NOT_A_CASE_REASON_DIFFERENT_PATHOGEN, CheckBox.class); + addField(CaseDataDto.NOT_A_CASE_REASON_OTHER, CheckBox.class); + addField(CaseDataDto.NOT_A_CASE_REASON_DETAILS, TextField.class); + + FieldHelper.setVisibleWhen( + getFieldGroup(), + Arrays.asList( + CaseDataDto.NOT_A_CASE_REASON_NEGATIVE_TEST, + CaseDataDto.NOT_A_CASE_REASON_PHYSICIAN_INFORMATION, + CaseDataDto.NOT_A_CASE_REASON_DIFFERENT_PATHOGEN, + CaseDataDto.NOT_A_CASE_REASON_OTHER), + CaseDataDto.CASE_CLASSIFICATION, + CaseClassification.NO_CASE, + true); + + FieldHelper.setVisibleWhen(getFieldGroup(), CaseDataDto.NOT_A_CASE_REASON_DETAILS, CaseDataDto.NOT_A_CASE_REASON_OTHER, true, true); + } else { + final NullableOptionGroup caseClassificationGroup = addField(CaseDataDto.CASE_CLASSIFICATION, NullableOptionGroup.class); + caseClassificationGroup.removeItem(CaseClassification.CONFIRMED_NO_SYMPTOMS); + caseClassificationGroup.removeItem(CaseClassification.CONFIRMED_UNKNOWN_SYMPTOMS); + } } boolean extendedClassification = FacadeProvider.getDiseaseConfigurationFacade().usesExtendedClassification(disease); @@ -607,8 +619,9 @@ protected void addFields() { FieldHelper.setVisibleWhen(getFieldGroup(), CaseDataDto.INFECTION_SETTING, CaseDataDto.NOSOCOMIAL_OUTBREAK, true, true); // Reinfection - { +// { NullableOptionGroup ogReinfection = addField(CaseDataDto.RE_INFECTION, NullableOptionGroup.class); + ogReinfection.setVisible(true); addField(CaseDataDto.PREVIOUS_INFECTION_DATE); ComboBox tfReinfectionStatus = addField(CaseDataDto.REINFECTION_STATUS, ComboBox.class); @@ -698,7 +711,7 @@ protected void addFields() { reinfectionDetailsRightLayout.setVisible(false); } }); - } +// } addField(CaseDataDto.QUARANTINE_HOME_POSSIBLE, NullableOptionGroup.class); addField(CaseDataDto.QUARANTINE_HOME_POSSIBLE_COMMENT, TextField.class); @@ -970,7 +983,27 @@ protected void addFields() { addField(CaseDataDto.POSTPARTUM, NullableOptionGroup.class); addField(CaseDataDto.TRIMESTER, NullableOptionGroup.class); - addField(CaseDataDto.VACCINATION_STATUS); + addField(CaseDataDto.IPSAMPLESENT, NullableOptionGroup.class); + addField(CaseDataDto.IPSAMPLERESULTS); + + vaccinationStatus = addField(CaseDataDto.VACCINATION_STATUS, NullableOptionGroup.class); + + NullableOptionGroup vaccinatedByCardOrHistory = addField(CaseDataDto.VACCINATION_TYPE, NullableOptionGroup.class); + + FieldHelper.setEnabledWhen(vaccinationStatus, Arrays.asList(VaccinationStatus.VACCINATED, VaccinationStatus.UNVACCINATED, VaccinationStatus.UNKNOWN), Collections.singletonList( + vaccinatedByCardOrHistory + ), false); + + DateField cardDateField = addField(CaseDataDto.VACCINATION_DATE, DateField.class); + + FieldHelper.setEnabledWhen( + vaccinatedByCardOrHistory, + Arrays.asList(CardOrHistory.CARD, CardOrHistory.HISTORY), + Collections.singletonList( + cardDateField + ), + false); + addFields(CaseDataDto.SMALLPOX_VACCINATION_SCAR, CaseDataDto.SMALLPOX_VACCINATION_RECEIVED); addDateField(CaseDataDto.SMALLPOX_LAST_VACCINATION_DATE, DateField.class, 0); @@ -1102,10 +1135,18 @@ protected void addFields() { setEnabled(false, CaseDataDto.RESPONSIBLE_REGION, CaseDataDto.RESPONSIBLE_DISTRICT); } - FieldHelper.setVisibleWhen(getFieldGroup(), CaseDataDto.TRIMESTER, CaseDataDto.PREGNANT, Arrays.asList(YesNoUnknown.YES), true); + FieldHelper.setVisibleWhen(getFieldGroup(), CaseDataDto.TRIMESTER, CaseDataDto.PREGNANT, Collections.singletonList(YesNoUnknown.YES), true); + FieldHelper.setVisibleWhen(getFieldGroup(), CaseDataDto.IPSAMPLERESULTS, CaseDataDto.IPSAMPLESENT, Collections.singletonList(YesNoUnknown.YES), true); diseaseField.addValueChangeListener((ValueChangeListener) valueChangeEvent -> { Disease disease = (Disease) valueChangeEvent.getProperty().getValue(); + + caseTransmissionClassification.setVisible(disease != Disease.YELLOW_FEVER && disease != Disease.CSM && disease != Disease.AHF); + investigationstatus.setVisible(disease != Disease.YELLOW_FEVER && disease != Disease.CSM); + investigationstatus.setVisible(disease != Disease.YELLOW_FEVER && disease != Disease.CSM); + ogReinfection.setVisible(disease != Disease.YELLOW_FEVER && disease != Disease.CSM && disease != Disease.AHF); + generalCommentLabel.setVisible(false); + List diseaseVariants = FacadeProvider.getCustomizableEnumFacade().getEnumValues(CustomizableEnumType.DISEASE_VARIANT, disease); FieldHelper.updateItems(diseaseVariantField, diseaseVariants); @@ -1224,9 +1265,28 @@ protected void addFields() { } List medicalInformationFields = - Arrays.asList(CaseDataDto.PREGNANT, CaseDataDto.VACCINATION_STATUS, CaseDataDto.SMALLPOX_VACCINATION_RECEIVED); + Arrays.asList(CaseDataDto.PREGNANT, CaseDataDto.VACCINATION_STATUS, CaseDataDto.SMALLPOX_VACCINATION_RECEIVED); + + HealthConditionsForm healthConditionsField = addField(CaseDataDto.HEALTH_CONDITIONS, HealthConditionsForm.class); - addField(CaseDataDto.HEALTH_CONDITIONS, HealthConditionsForm.class).setCaption(null); + if(disease == Disease.YELLOW_FEVER || disease == Disease.CSM){ + externalTokenField.setVisible(false); + internaltoken.setVisible(false); + quarantine.setVisible(false); + additionalDetails.setVisible(false); + healthConditionsField.setVisible(false); + getFieldGroup().getField(CaseDataDto.PREGNANT).setVisible(false); + getFieldGroup().getField(CaseDataDto.POSTPARTUM).setVisible(false); + + } + + if(disease == Disease.CSM){ + setVisible(false, CaseDataDto.REPORT_LAT, CaseDataDto.REPORT_LON, CaseDataDto.REPORT_LAT_LON_ACCURACY); + } + + if(disease == Disease.AHF){ + setVisible(false, CaseDataDto.VACCINATION_STATUS, CaseDataDto.VACCINATION_TYPE, CaseDataDto.VACCINATION_DATE); + } for (String medicalInformationField : medicalInformationFields) { if (getFieldGroup().getField(medicalInformationField).isVisible()) { @@ -1240,7 +1300,13 @@ protected void addFields() { if (!shouldHidePaperFormDates()) { Label paperFormDatesLabel = new Label(I18nProperties.getString(Strings.headingPaperFormDates)); paperFormDatesLabel.addStyleName(H3); - getContent().addComponent(paperFormDatesLabel, PAPER_FORM_DATES_LOC); + + Set excludedDiseases = new HashSet<>(Arrays.asList(Disease.YELLOW_FEVER, Disease.AHF, Disease.CSM)); + + if (!excludedDiseases.contains(disease)) { + getContent().addComponent(paperFormDatesLabel, PAPER_FORM_DATES_LOC); + } + } // Automatic case classification rules button - invisible for other diseases diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataView.java index bd21430a0c2..d40489f2346 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataView.java @@ -16,6 +16,7 @@ import com.vaadin.ui.VerticalLayout; +import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.EditPermissionType; import de.symeda.sormas.api.FacadeProvider; import de.symeda.sormas.api.caze.CaseDataDto; @@ -44,12 +45,7 @@ import de.symeda.sormas.ui.samples.sampleLink.SampleListComponentLayout; import de.symeda.sormas.ui.sormastosormas.SormasToSormasListComponent; import de.symeda.sormas.ui.task.TaskListComponent; -import de.symeda.sormas.ui.utils.ArchivingController; -import de.symeda.sormas.ui.utils.CommitDiscardWrapperComponent; -import de.symeda.sormas.ui.utils.CssStyles; -import de.symeda.sormas.ui.utils.DetailSubComponentWrapper; -import de.symeda.sormas.ui.utils.LayoutWithSidePanel; -import de.symeda.sormas.ui.utils.ViewMode; +import de.symeda.sormas.ui.utils.*; import de.symeda.sormas.ui.utils.components.sidecomponent.SideComponentLayout; import de.symeda.sormas.ui.vaccination.list.VaccinationListComponent; @@ -74,6 +70,7 @@ public class CaseDataView extends AbstractCaseView { private static final long serialVersionUID = -1L; private CommitDiscardWrapperComponent editComponent; + private Disease disease; public CaseDataView() { super(VIEW_NAME, false); } @@ -84,6 +81,7 @@ protected void initView(String params) { setHeightUndefined(); CaseDataDto caze = FacadeProvider.getCaseFacade().getCaseDataByUuid(getCaseRef().getUuid()); + disease = caze.getDisease(); DetailSubComponentWrapper container = new DetailSubComponentWrapper(() -> editComponent); container.setWidth(100, Unit.PERCENTAGE); @@ -145,25 +143,27 @@ protected void initView(String params) { layout.addSidePanelComponent(eventLayout, EVENTS_LOC); } - if (UserProvider.getCurrent().hasUserRight(UserRight.IMMUNIZATION_VIEW) - && FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.IMMUNIZATION_MANAGEMENT)) { - if (!FacadeProvider.getFeatureConfigurationFacade() - .isPropertyValueTrue(FeatureType.IMMUNIZATION_MANAGEMENT, FeatureTypeProperty.REDUCED)) { - final ImmunizationListCriteria immunizationListCriteria = - new ImmunizationListCriteria.Builder(caze.getPerson()).wihDisease(caze.getDisease()).build(); - layout.addSidePanelComponent( - new SideComponentLayout(new ImmunizationListComponent(immunizationListCriteria, this::showUnsavedChangesPopup)), - IMMUNIZATION_LOC); - } else { - VaccinationListCriteria criteria = new VaccinationListCriteria.Builder(caze.getPerson()).withDisease(caze.getDisease()) - .build() - .vaccinationAssociationType(VaccinationAssociationType.CASE) - .caseReference(getCaseRef()) - .region(caze.getResponsibleRegion()) - .district(caze.getResponsibleDistrict()); - layout.addSidePanelComponent( - new SideComponentLayout(new VaccinationListComponent(criteria, this::showUnsavedChangesPopup)), - VACCINATIONS_LOC); + if (disease != Disease.CSM) { + if (UserProvider.getCurrent().hasUserRight(UserRight.IMMUNIZATION_VIEW) + && FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.IMMUNIZATION_MANAGEMENT)) { + if (!FacadeProvider.getFeatureConfigurationFacade() + .isPropertyValueTrue(FeatureType.IMMUNIZATION_MANAGEMENT, FeatureTypeProperty.REDUCED)) { + final ImmunizationListCriteria immunizationListCriteria = + new ImmunizationListCriteria.Builder(caze.getPerson()).wihDisease(caze.getDisease()).build(); + layout.addSidePanelComponent( + new SideComponentLayout(new ImmunizationListComponent(immunizationListCriteria, this::showUnsavedChangesPopup)), + IMMUNIZATION_LOC); + } else { + VaccinationListCriteria criteria = new VaccinationListCriteria.Builder(caze.getPerson()).withDisease(caze.getDisease()) + .build() + .vaccinationAssociationType(VaccinationAssociationType.CASE) + .caseReference(getCaseRef()) + .region(caze.getResponsibleRegion()) + .district(caze.getResponsibleDistrict()); + layout.addSidePanelComponent( + new SideComponentLayout(new VaccinationListComponent(criteria, this::showUnsavedChangesPopup)), + VACCINATIONS_LOC); + } } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CasePersonView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CasePersonView.java index 36c0d4ac73a..cbc82bd486b 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CasePersonView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CasePersonView.java @@ -17,6 +17,7 @@ *******************************************************************************/ package de.symeda.sormas.ui.caze; +import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.FacadeProvider; import de.symeda.sormas.api.caze.CaseDataDto; import de.symeda.sormas.api.person.PersonContext; @@ -30,6 +31,8 @@ public class CasePersonView extends AbstractCaseView { public static final String VIEW_NAME = ROOT_VIEW_NAME + "/person"; + private Disease disease; + public CasePersonView() { super(VIEW_NAME, true); } @@ -38,16 +41,23 @@ public CasePersonView() { protected void initView(String params) { CaseDataDto caseData = FacadeProvider.getCaseFacade().getCaseDataByUuid(getCaseRef().getUuid()); + disease = caseData.getDisease(); CommitDiscardWrapperComponent personEditComponent = ControllerProvider.getPersonController() .getPersonEditComponent( PersonContext.CASE, caseData.getPerson().getUuid(), caseData.getDisease(), caseData.getDiseaseDetails(), + caseData.getCaseOrigin(), UserRight.CASE_EDIT, getViewMode()); setSubComponent(personEditComponent); setCaseEditPermission(personEditComponent); } + + public Disease getDiseaseFromCaseData() { + CaseDataDto caseData = FacadeProvider.getCaseFacade().getCaseDataByUuid(getCaseRef().getUuid()); + return caseData.getDisease(); + } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/DevModeView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/DevModeView.java index 461fbaf3481..b9d4b29df21 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/DevModeView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/DevModeView.java @@ -640,6 +640,13 @@ private VerticalLayout createSamplesGeneratorLayout() { SampleGenerationConfig::setRequestPathogenTestsToBePerformed); sampleOptionsThirdLineLayout.addComponent(requestPathogenTestsToBePerformed); + CheckBox requestSampleMaterialsToBeAdded = new CheckBox(I18nProperties.getCaption(Captions.devModeSampleMaterialsToBeAdded)); + sampleGeneratorConfigBinder.bind( + requestSampleMaterialsToBeAdded, + SampleGenerationConfig::isRequestSampleMaterialsToAdded, + SampleGenerationConfig::setRequestSampleMaterialsToBeAdded); + sampleOptionsThirdLineLayout.addComponent(requestSampleMaterialsToBeAdded); + CheckBox requestAdditionalTestsToBePerformed = new CheckBox(I18nProperties.getCaption(Captions.devModeSampleAdditionalTestsToBePerformed)); sampleGeneratorConfigBinder.bind( requestAdditionalTestsToBePerformed, @@ -1054,6 +1061,15 @@ private void generateSamples() { sample.setAdditionalTestingRequested(true); sample.setRequestedAdditionalTests(additionalTestTypes); } + if (config.isRequestSampleMaterialsToAdded()) { + Set sampleMaterialTypes = new HashSet(); + int until = randomInt(1, SampleMaterial.values().length); + for (int j = 0; j < until; j++) { + sampleMaterialTypes.add(SampleMaterial.values()[j]); + } + sample.setSampleMaterialRequested(true); + sample.setRequestedSampleMaterials(sampleMaterialTypes); + } if (config.isSendDispatch()) { sample.setShipped(true); @@ -1787,6 +1803,7 @@ private static class SampleGenerationConfig { private boolean externalLabOrInternalInHouseTesting = false; private boolean requestPathogenTestsToBePerformed = false; + private boolean requestSampleMaterialsToBeSelected = false; private boolean requestAdditionalTestsToBePerformed = false; private boolean sendDispatch = false; private boolean received = false; @@ -1890,6 +1907,14 @@ public void setRequestPathogenTestsToBePerformed(boolean requestPathogenTestsToB this.requestPathogenTestsToBePerformed = requestPathogenTestsToBePerformed; } + public boolean isRequestSampleMaterialsToAdded(){ + return requestSampleMaterialsToBeSelected; + } + + public void setRequestSampleMaterialsToBeAdded(boolean requestSampleMaterialsToBeAdded){ + this.requestSampleMaterialsToBeSelected = requestSampleMaterialsToBeAdded; + } + public boolean isExternalLabOrInternalInHouseTesting() { return externalLabOrInternalInHouseTesting; } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/AbstractContactGrid.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/AbstractContactGrid.java index bcbe4f3e257..f02549e4cae 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/AbstractContactGrid.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/AbstractContactGrid.java @@ -222,7 +222,7 @@ protected Stream getColumnList() { } protected Stream getPersonColumns() { - return Stream.of(ContactIndexDto.PERSON_UUID, ContactIndexDto.PERSON_FIRST_NAME, ContactIndexDto.PERSON_LAST_NAME); + return Stream.of(ContactIndexDto.PERSON_UUID, ContactIndexDto.PERSON_FIRST_NAME, ContactIndexDto.PERSON_LAST_NAME, ContactIndexDto.PERSON_OTHER_NAME); } protected Stream getEventColumns() { diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactController.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactController.java index 87e4aaac5c5..db59492fa44 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactController.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactController.java @@ -868,7 +868,7 @@ public TitleLayout getContactViewTitleLayout(ContactDto contact) { mainRowText.append(" ") .append(I18nProperties.getString(Strings.toCase)) .append(" ") - .append(PersonDto.buildCaption(contact.getCaze().getFirstName(), contact.getCaze().getLastName())); + .append(PersonDto.buildCaption(contact.getCaze().getFirstName(), contact.getCaze().getLastName(), contact.getCaze().getOtherName())); } } mainRowText.append(mainRowText.length() > 0 ? " (" + shortUuid + ")" : shortUuid); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactPersonView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactPersonView.java index 4c00de23cdd..d963e52cf31 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactPersonView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactPersonView.java @@ -41,7 +41,7 @@ protected void initView(String params) { ContactDto dto = FacadeProvider.getContactFacade().getByUuid(getContactRef().getUuid()); CommitDiscardWrapperComponent contactPersonComponent = ControllerProvider.getPersonController() - .getPersonEditComponent(PersonContext.CONTACT,dto.getPerson().getUuid(), dto.getDisease(), dto.getDiseaseDetails(), UserRight.CONTACT_EDIT, null); + .getPersonEditComponent(PersonContext.CONTACT,dto.getPerson().getUuid(), dto.getDisease(), dto.getDiseaseDetails(), dto.getCaseOrigin(), UserRight.CONTACT_EDIT, null); setSubComponent(contactPersonComponent); setContactEditPermission(contactPersonComponent); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/SourceContactList.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/SourceContactList.java index b83ccad3cd2..855b07777ae 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/SourceContactList.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/SourceContactList.java @@ -86,8 +86,10 @@ public List getSourceContacts() { c.getUuid(), c.getFirstName(), c.getLastName(), + c.getOtherName(), c.getCaze() != null ? c.getCaze().getFirstName() : null, - c.getCaze() != null ? c.getCaze().getLastName() : null)) + c.getCaze() != null ? c.getCaze().getLastName() : null, + c.getCaze() != null ? c.getCaze().getOtherName() : null)) .collect(Collectors.toList()); } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java index b4ed0b980cd..6642586b64a 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java @@ -69,7 +69,7 @@ public class EpiDataForm extends AbstractEditForm { loc(EpiDataDto.EXPOSURES) + loc(LOC_ACTIVITY_AS_CASE_INVESTIGATION_HEADING) + loc(EpiDataDto.ACTIVITY_AS_CASE_DETAILS_KNOWN)+ - loc(EpiDataDto.ACTIVITIES_AS_CASE) + + loc(EpiDataDto.ACTIVITIES_AS_CASE) + locCss(VSPACE_TOP_3, LOC_EPI_DATA_FIELDS_HINT) + loc(EpiDataDto.HIGH_TRANSMISSION_RISK_AREA) + loc(EpiDataDto.LARGE_OUTBREAKS_AREA) + @@ -105,11 +105,10 @@ public EpiDataForm( @Override protected void addFields() { - if (disease == null) { - return; - } - addHeadingsAndInfoTexts(); + if (disease != null && !diseaseCheck()) { + addHeadingsAndInfoTexts(); + } NullableOptionGroup ogExposureDetailsKnown = addField(EpiDataDto.EXPOSURE_DETAILS_KNOWN, NullableOptionGroup.class); ExposuresField exposuresField = addField(EpiDataDto.EXPOSURES, ExposuresField.class); @@ -146,6 +145,10 @@ protected void addFields() { exposuresField.addValueChangeListener(e -> { ogExposureDetailsKnown.setEnabled(CollectionUtils.isEmpty(exposuresField.getValue())); }); + + if (diseaseCheck()) { + setVisible(false, EpiDataDto.EXPOSURES, EpiDataDto.EXPOSURE_DETAILS_KNOWN, EpiDataDto.CONTACT_WITH_SOURCE_CASE_KNOWN); + } } private void addActivityAsCaseFields() { @@ -209,4 +212,8 @@ public void setGetSourceContactsCallback(Supplier> cal protected String createHtmlLayout() { return parentClass == CaseDataDto.class ? MAIN_HTML_LAYOUT + SOURCE_CONTACTS_HTML_LAYOUT : MAIN_HTML_LAYOUT; } + + private boolean diseaseCheck(){ + return disease == Disease.YELLOW_FEVER; + } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantEditForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantEditForm.java index f87a10bde2c..453741499a4 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantEditForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/events/EventParticipantEditForm.java @@ -96,7 +96,7 @@ protected void addFields() { getContent().addComponent(searchPersonButton, PERSON_SEARCH_LOC); } - pef = new PersonEditForm(PersonContext.EVENT_PARTICIPANT, event.getDisease(), event.getDiseaseDetails(), null, isPersonPseudonymized); + pef = new PersonEditForm(PersonContext.EVENT_PARTICIPANT, event.getDisease(), event.getDiseaseDetails(), null, isPersonPseudonymized, event.getCaseOrigin()); pef.setWidth(100, Unit.PERCENTAGE); pef.setImmediate(true); getFieldGroup().bind(pef, EventParticipantDto.PERSON); @@ -169,7 +169,7 @@ public void setPerson(PersonDto person) { event.getDisease(), event.getDiseaseDetails(), null, - person != null ? person.isPseudonymized() : isPersonPseudonymized); + person != null ? person.isPseudonymized() : isPersonPseudonymized, event.getCaseOrigin()); pef.setWidth(100, Unit.PERCENTAGE); pef.setImmediate(true); getFieldGroup().bind(pef, EventParticipantDto.PERSON); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/externalmessage/ExternalMessageGrid.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/externalmessage/ExternalMessageGrid.java index 69654d4c9aa..efade725429 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/externalmessage/ExternalMessageGrid.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/externalmessage/ExternalMessageGrid.java @@ -111,6 +111,7 @@ public ExternalMessageGrid(ExternalMessageCriteria criteria) { ExternalMessageIndexDto.SAMPLE_OVERALL_TEST_RESULT, ExternalMessageIndexDto.PERSON_FIRST_NAME, ExternalMessageIndexDto.PERSON_LAST_NAME, + ExternalMessageIndexDto.PERSON_OTHER_NAME, ExternalMessageIndexDto.PERSON_BIRTH_DATE, ExternalMessageIndexDto.PERSON_POSTAL_CODE, ExternalMessageIndexDto.STATUS, diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/externalmessage/physiciansreport/PhysiciansReportCaseEditComponent.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/externalmessage/physiciansreport/PhysiciansReportCaseEditComponent.java index 6b9a429e732..0e3f7d1a123 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/externalmessage/physiciansreport/PhysiciansReportCaseEditComponent.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/externalmessage/physiciansreport/PhysiciansReportCaseEditComponent.java @@ -173,6 +173,7 @@ private List createTabConfigs() { caze.getPerson().getUuid(), caze.getDisease(), caze.getDiseaseDetails(), + caze.getCaseOrigin(), UserRight.CASE_EDIT, viewMode))); configs.add( diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/hospitalization/HospitalizationForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/hospitalization/HospitalizationForm.java index 2fb68cdbc3f..c8d147f1b4d 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/hospitalization/HospitalizationForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/hospitalization/HospitalizationForm.java @@ -24,6 +24,7 @@ import java.util.Collections; import java.util.Objects; +import de.symeda.sormas.api.Disease; import org.joda.time.DateTimeComparator; import com.vaadin.server.ErrorMessage; @@ -151,6 +152,11 @@ protected void addFields() { PreviousHospitalizationsField previousHospitalizationsField = addField(HospitalizationDto.PREVIOUS_HOSPITALIZATIONS, PreviousHospitalizationsField.class); + if(caze.getDisease() == Disease.AFP){ + admittedToHealthFacilityField.removeItem(YesNoUnknown.UNKNOWN); + setVisible(false, HospitalizationDto.LEFT_AGAINST_ADVICE, HospitalizationDto.INTENSIVE_CARE_UNIT, HospitalizationDto.ISOLATED); + } + FieldHelper.setEnabledWhen( admittedToHealthFacilityField, Arrays.asList(YesNoUnknown.YES, YesNoUnknown.NO, YesNoUnknown.UNKNOWN), diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/immunization/ImmunizationPersonView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/immunization/ImmunizationPersonView.java index 8e9709af2ca..2c6e70c59a0 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/immunization/ImmunizationPersonView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/immunization/ImmunizationPersonView.java @@ -22,7 +22,7 @@ protected void initView(String params) { ImmunizationDto dto = FacadeProvider.getImmunizationFacade().getByUuid(getReference().getUuid()); CommitDiscardWrapperComponent immunizationPersonComponent = ControllerProvider.getPersonController() - .getPersonEditComponent(PersonContext.IMMUNIZATION, dto.getPerson().getUuid(), dto.getDisease(), null, UserRight.IMMUNIZATION_EDIT, null); + .getPersonEditComponent(PersonContext.IMMUNIZATION, dto.getPerson().getUuid(), dto.getDisease(), null, dto.getCaseOrigin(), UserRight.IMMUNIZATION_EDIT, null); setSubComponent(immunizationPersonComponent); setImmunizationEditPermission(immunizationPersonComponent); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/location/LocationEditForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/location/LocationEditForm.java index 8cef197045b..f88208df512 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/location/LocationEditForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/location/LocationEditForm.java @@ -28,6 +28,13 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import de.symeda.sormas.api.Disease; +import de.symeda.sormas.api.InfrastructureDataReferenceDto; +import de.symeda.sormas.api.caze.CaseDataDto; +import de.symeda.sormas.api.infrastructure.area.AreaType; +import de.symeda.sormas.ui.caze.CaseDataForm; +import de.symeda.sormas.ui.caze.CasePersonView; +import de.symeda.sormas.ui.person.PersonEditForm; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; @@ -95,17 +102,19 @@ public class LocationEditForm extends AbstractEditForm { private static final String GEO_BUTTONS_LOC = "geoButtons"; private static final String COUNTRY_HINT_LOC = "countryHintLoc"; + private Disease newDisease; private static final String HTML_LAYOUT = //XXX #1620 are the divs needed? divs( + fluidRowLocs(LocationDto.COUNTRY, COUNTRY_HINT_LOC, ""), fluidRowLocs(LocationDto.ADDRESS_TYPE, LocationDto.ADDRESS_TYPE_DETAILS, ""), fluidRowLocs(LocationDto.CONTINENT, LocationDto.SUB_CONTINENT, ""), - fluidRowLocs(LocationDto.COUNTRY, COUNTRY_HINT_LOC, ""), fluidRowLocs(LocationDto.REGION, LocationDto.DISTRICT, LocationDto.COMMUNITY), fluidRowLocs(FACILITY_TYPE_GROUP_LOC, LocationDto.FACILITY_TYPE), fluidRowLocs(LocationDto.FACILITY, LocationDto.FACILITY_DETAILS), fluidRowLocs(LocationDto.STREET, LocationDto.HOUSE_NUMBER, LocationDto.ADDITIONAL_INFORMATION), fluidRowLocs(LocationDto.POSTAL_CODE, LocationDto.CITY, LocationDto.AREA_TYPE), +// fluidRowLocs(LocationDto.LAND_MARK), fluidRowLocs(LocationDto.CONTACT_PERSON_FIRST_NAME, LocationDto.CONTACT_PERSON_LAST_NAME), fluidRowLocs(LocationDto.CONTACT_PERSON_PHONE, LocationDto.CONTACT_PERSON_EMAIL), fluidRow( @@ -124,11 +133,12 @@ public class LocationEditForm extends AbstractEditForm { private ComboBox continent; private ComboBox subcontinent; private ComboBox country; + private ComboBox areaType; private TextField contactPersonFirstName; private TextField contactPersonLastName; private TextField contactPersonPhone; private TextField contactPersonEmail; - + private TextField additionalInformationField; private boolean districtRequiredOnDefaultCountry; private boolean skipCountryValueChange; private boolean skipFacilityTypeUpdate; @@ -223,11 +233,12 @@ protected void addFields() { TextField streetField = addField(LocationDto.STREET, TextField.class); TextField houseNumberField = addField(LocationDto.HOUSE_NUMBER, TextField.class); - TextField additionalInformationField = addField(LocationDto.ADDITIONAL_INFORMATION, TextField.class); + additionalInformationField = addField(LocationDto.ADDITIONAL_INFORMATION, TextField.class); addField(LocationDto.DETAILS, TextField.class); TextField cityField = addField(LocationDto.CITY, TextField.class); TextField postalCodeField = addField(LocationDto.POSTAL_CODE, TextField.class); - ComboBox areaType = addField(LocationDto.AREA_TYPE, ComboBox.class); + + areaType = addField(LocationDto.AREA_TYPE, ComboBox.class); areaType.setDescription(I18nProperties.getDescription(getPropertyI18nPrefix() + "." + LocationDto.AREA_TYPE)); contactPersonFirstName = addField(LocationDto.CONTACT_PERSON_FIRST_NAME, TextField.class); @@ -316,6 +327,10 @@ protected void addFields() { if (countryDto != null) { final ContinentReferenceDto countryContinent = FacadeProvider.getContinentFacade().getByCountry(countryDto); final SubcontinentReferenceDto countrySubcontinent = FacadeProvider.getSubcontinentFacade().getByCountry(countryDto); + + setVisible("Ghana".equals(countryDto.getCaption()), LocationDto.REGION, LocationDto.DISTRICT, LocationDto.COMMUNITY, LocationDto.STREET, LocationDto.HOUSE_NUMBER, LocationDto.ADDITIONAL_INFORMATION, + LocationDto.POSTAL_CODE, LocationDto.CITY, LocationDto.AREA_TYPE, LocationDto.DETAILS); + if (countryContinent != null) { continent.removeValueChangeListener(continentValueListener); if (continent.isVisible()) { @@ -849,4 +864,16 @@ public void setCoordinates(GeoLatLon coordinates) { } } + public void setOnlyUnknownForCSM(Disease incomingDisease) { + newDisease = incomingDisease; + if (newDisease != null && newDisease.equals(Disease.CSM)) { + additionalInformationField.setCaption("Landmark"); + for (AreaType areatype : AreaType.values()) { + if (areatype != AreaType.UNKNOWN) { + areaType.removeItem(areatype); + } + } + } + } + } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonController.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonController.java index f4bab30501a..4fc778e0500 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonController.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonController.java @@ -22,6 +22,7 @@ import java.util.Date; import java.util.function.Consumer; +import de.symeda.sormas.api.caze.CaseOrigin; import org.apache.commons.lang3.StringUtils; import com.vaadin.navigator.Navigator; @@ -185,11 +186,12 @@ public CommitDiscardWrapperComponent getPersonEditComponent( String personUuid, Disease disease, String diseaseDetails, + CaseOrigin caseOrigin, UserRight editUserRight, final ViewMode viewMode) { PersonDto personDto = personFacade.getPersonByUuid(personUuid); - PersonEditForm editForm = new PersonEditForm(personContext, disease, diseaseDetails, viewMode, personDto.isPseudonymized()); + PersonEditForm editForm = new PersonEditForm(personContext, disease, diseaseDetails, viewMode, personDto.isPseudonymized(), caseOrigin); editForm.setValue(personDto); final CommitDiscardWrapperComponent editView = diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonCreateForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonCreateForm.java index defada3b3d1..c4c93f27579 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonCreateForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonCreateForm.java @@ -64,6 +64,7 @@ import de.symeda.sormas.ui.utils.FieldHelper; import de.symeda.sormas.ui.utils.PhoneNumberValidator; import de.symeda.sormas.ui.utils.VaadinUiUtil; +import de.symeda.sormas.api.person.Sex; public class PersonCreateForm extends AbstractEditForm { @@ -88,12 +89,12 @@ public class PersonCreateForm extends AbstractEditForm { private static final String HTML_LAYOUT = "%s" + fluidRow(fluidRowLocs(PersonDto.BIRTH_DATE_YYYY, PersonDto.BIRTH_DATE_MM, PersonDto.BIRTH_DATE_DD), fluidRowLocs(PersonDto.SEX)) - + fluidRowLocs(PersonDto.NATIONAL_HEALTH_ID, PersonDto.PASSPORT_NUMBER) + + fluidRowLocs(PersonDto.GHANA_CARD, PersonDto.NATIONAL_HEALTH_ID, PersonDto.PASSPORT_NUMBER) + fluidRowLocs(PersonDto.PRESENT_CONDITION, SymptomsDto.ONSET_DATE) + fluidRowLocs(PersonDto.PHONE, PersonDto.EMAIL_ADDRESS) + fluidRowLocs(ENTER_HOME_ADDRESS_NOW) + loc(HOME_ADDRESS_HEADER) + divsCss(VSPACE_3, fluidRowLocs(HOME_ADDRESS_LOC)); - private static final String NAME_ROW_WITH_PERSON_SEARCH = fluidRowLocs(6, PersonDto.FIRST_NAME, 4, PersonDto.LAST_NAME, 2, PERSON_SEARCH_LOC); - private static final String NAME_ROW_WITHOUT_PERSON_SEARCH = fluidRowLocs(PersonDto.FIRST_NAME, PersonDto.LAST_NAME); + private static final String NAME_ROW_WITH_PERSON_SEARCH = fluidRowLocs(PersonDto.FIRST_NAME, PersonDto.LAST_NAME, PersonDto.OTHER_NAME, PERSON_SEARCH_LOC); + private static final String NAME_ROW_WITHOUT_PERSON_SEARCH = fluidRowLocs(PersonDto.FIRST_NAME, PersonDto.LAST_NAME, PersonDto.OTHER_NAME); public PersonCreateForm(boolean showHomeAddressForm, boolean showPresentCondition, boolean showSymptomsOnsetDate) { this(showHomeAddressForm, showPresentCondition, showSymptomsOnsetDate, true); @@ -126,6 +127,7 @@ protected String createHtmlLayout() { protected void addFields() { addField(PersonDto.FIRST_NAME, TextField.class); addField(PersonDto.LAST_NAME, TextField.class); + addField(PersonDto.OTHER_NAME, TextField.class); if (showPersonSearchButton) { searchPersonButton = createPersonSearchButton(PERSON_SEARCH_LOC); @@ -178,14 +180,22 @@ protected void addFields() { birthDateMonth.markAsDirty(); }); - ComboBox sex = addField(PersonDto.SEX, ComboBox.class); + ComboBox sexComboBox = new ComboBox("Sex"); + for (Sex sex : Sex.values()) { + if (sex == Sex.MALE || sex == Sex.FEMALE) { + sexComboBox.addItem(sex); + } + } + addField(PersonDto.SEX, sexComboBox); + + addField(PersonDto.GHANA_CARD, TextField.class); addField(PersonDto.PASSPORT_NUMBER, TextField.class); addField(PersonDto.NATIONAL_HEALTH_ID, TextField.class); ComboBox presentCondition = addField(PersonDto.PRESENT_CONDITION, ComboBox.class); presentCondition.setVisible(showPresentCondition); - FieldHelper.addSoftRequiredStyle(presentCondition, sex); + FieldHelper.addSoftRequiredStyle(presentCondition, sexComboBox); if (showSymptomsOnsetDate) { addCustomField( @@ -348,6 +358,7 @@ public void transferDataToPerson(PersonDto person) { person.setBirthdateYYYY(personCreated.getBirthdateYYYY()); person.setSex(personCreated.getSex()); person.setPresentCondition(personCreated.getPresentCondition()); + person.setGhanaCard(personCreated.getGhanaCard()); person.setNationalHealthId(personCreated.getNationalHealthId()); person.setPassportNumber(personCreated.getPassportNumber()); @@ -360,11 +371,15 @@ public void transferDataToPerson(PersonDto person) { if (getHomeAddressForm() != null && getHomeAddressForm().getValue() != null) { person.setAddress(getHomeAddressForm().getValue()); } + if(StringUtils.isNotEmpty(getOtherName())) { + person.setOtherName(getOtherName()); + } } public void enablePersonFields(Boolean enable) { getField(PersonDto.FIRST_NAME).setEnabled(enable); getField(PersonDto.LAST_NAME).setEnabled(enable); + getField(PersonDto.OTHER_NAME).setEnabled(enable); getField(PersonDto.BIRTH_DATE_DD).setEnabled(enable); getField(PersonDto.BIRTH_DATE_MM).setEnabled(enable); getField(PersonDto.BIRTH_DATE_YYYY).setEnabled(enable); @@ -374,6 +389,7 @@ public void enablePersonFields(Boolean enable) { getField(PersonDto.EMAIL_ADDRESS).setEnabled(enable); getField(PersonDto.PASSPORT_NUMBER).setEnabled(enable); getField(PersonDto.NATIONAL_HEALTH_ID).setEnabled(enable); + getField(PersonDto.GHANA_CARD).setEnabled(enable); if (homeAddressForm != null) { homeAddressForm.setEnabled(enable); } @@ -384,6 +400,7 @@ public void setPersonalDetailsReadOnlyIfNotEmpty(boolean readOnly) { getField(PersonDto.FIRST_NAME).setEnabled(!readOnly); getField(PersonDto.LAST_NAME).setEnabled(!readOnly); + getField(PersonDto.OTHER_NAME).setEnabled(!readOnly); searchPersonButton.setEnabled(!readOnly); if (getField(PersonDto.SEX).getValue() != null) { getField(PersonDto.SEX).setEnabled(!readOnly); @@ -406,10 +423,12 @@ public void setPersonDetailsReadOnly() { false, PersonDto.FIRST_NAME, PersonDto.LAST_NAME, + PersonDto.OTHER_NAME, PersonDto.SEX, PersonDto.BIRTH_DATE_YYYY, PersonDto.BIRTH_DATE_MM, PersonDto.BIRTH_DATE_DD, + PersonDto.GHANA_CARD, PersonDto.NATIONAL_HEALTH_ID, PersonDto.PASSPORT_NUMBER, PersonDto.PHONE, @@ -433,21 +452,38 @@ public void setSymptoms(SymptomsDto symptoms) { } } + public void showPersonalEmail(){ + setVisible(false, PersonDto.EMAIL_ADDRESS); + } + + public void showPassportNumber(){ + setVisible(true, PersonDto.PASSPORT_NUMBER); + } + public void hidePassportNumber(){ + setVisible(false, PersonDto.PASSPORT_NUMBER); + } + public void updatePresentConditionEnum(Disease disease) { ComboBox presentConditionField = getField(PersonDto.PRESENT_CONDITION); PresentCondition currentValue = (PresentCondition) presentConditionField.getValue(); List validValues; - if (disease == null) { - validValues = Arrays.asList(PresentCondition.values()); + + if (disease == Disease.YELLOW_FEVER || disease == Disease.AHF) { + validValues = Arrays.asList(PresentCondition.ALIVE, PresentCondition.UNKNOWN); + showPersonalEmail(); + } else if (disease == Disease.CSM) { + validValues = Arrays.asList(PresentCondition.ALIVE, PresentCondition.DEAD); + showPersonalEmail(); + }else if (disease == Disease.AFP) { + validValues = Arrays.asList(PresentCondition.ALIVE, PresentCondition.DEAD, PresentCondition.BURIED); + showPersonalEmail(); } else { - FieldVisibilityCheckers fieldVisibilityCheckers = FieldVisibilityCheckers.withDisease(disease); - validValues = Arrays.stream(PresentCondition.values()) - .filter(c -> fieldVisibilityCheckers.isVisible(PresentCondition.class, c.name())) - .collect(Collectors.toList()); - if (currentValue != null && !validValues.contains(currentValue)) { - validValues.add(currentValue); - } + validValues = Arrays.asList(PresentCondition.values()); + } + if (currentValue != null && !validValues.contains(currentValue)) { + validValues.add(currentValue); } + FieldHelper.updateEnumData(presentConditionField, validValues); } @@ -455,6 +491,9 @@ public String getPhone() { return (String) getField(PersonDto.PHONE).getValue(); } + public String getOtherName() { + return (String) getField(PersonDto.OTHER_NAME).getValue(); + } public String getEmailAddress() { return (String) getField(PersonDto.EMAIL_ADDRESS).getValue(); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonEditForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonEditForm.java index a5986b296b5..7d9a5cae3eb 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonEditForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonEditForm.java @@ -27,14 +27,13 @@ import static de.symeda.sormas.ui.utils.LayoutUtil.oneOfTwoCol; import java.time.Month; -import java.util.Arrays; -import java.util.Calendar; -import java.util.Collections; -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.List; +import java.util.*; import java.util.stream.Collectors; +import de.symeda.sormas.api.caze.CaseOrigin; +import de.symeda.sormas.api.location.LocationDto; +import de.symeda.sormas.api.person.*; +import de.symeda.sormas.ui.utils.*; import org.apache.commons.lang3.StringUtils; import com.vaadin.ui.CustomLayout; @@ -64,15 +63,7 @@ import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; import de.symeda.sormas.api.infrastructure.facility.FacilityType; import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto; -import de.symeda.sormas.api.person.ApproximateAgeType; import de.symeda.sormas.api.person.ApproximateAgeType.ApproximateAgeHelper; -import de.symeda.sormas.api.person.CauseOfDeath; -import de.symeda.sormas.api.person.EducationType; -import de.symeda.sormas.api.person.OccupationType; -import de.symeda.sormas.api.person.PersonContext; -import de.symeda.sormas.api.person.PersonDto; -import de.symeda.sormas.api.person.PresentCondition; -import de.symeda.sormas.api.person.Salutation; import de.symeda.sormas.api.utils.DataHelper.Pair; import de.symeda.sormas.api.utils.DateHelper; import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers; @@ -80,16 +71,6 @@ import de.symeda.sormas.api.utils.fieldvisibility.checkers.CountryFieldVisibilityChecker; import de.symeda.sormas.ui.ControllerProvider; import de.symeda.sormas.ui.location.LocationEditForm; -import de.symeda.sormas.ui.utils.AbstractEditForm; -import de.symeda.sormas.ui.utils.ApproximateAgeValidator; -import de.symeda.sormas.ui.utils.CssStyles; -import de.symeda.sormas.ui.utils.DateComparisonValidator; -import de.symeda.sormas.ui.utils.FieldHelper; -import de.symeda.sormas.ui.utils.OutbreakFieldVisibilityChecker; -import de.symeda.sormas.ui.utils.ResizableTextAreaWrapper; -import de.symeda.sormas.ui.utils.SormasFieldGroupFieldFactory; -import de.symeda.sormas.ui.utils.ValidationUtils; -import de.symeda.sormas.ui.utils.ViewMode; public class PersonEditForm extends AbstractEditForm { @@ -106,7 +87,7 @@ public class PersonEditForm extends AbstractEditForm { private static final String HTML_LAYOUT = loc(PERSON_INFORMATION_HEADING_LOC) + fluidRowLocs(PersonDto.UUID, "")+ - fluidRowLocs(PersonDto.FIRST_NAME, PersonDto.LAST_NAME) + + fluidRowLocs(PersonDto.FIRST_NAME, PersonDto.LAST_NAME, PersonDto.OTHER_NAME) + fluidRowLocs(PersonDto.SALUTATION, PersonDto.OTHER_SALUTATION) + fluidRow( fluidRowLocs(PersonDto.BIRTH_DATE_YYYY, PersonDto.BIRTH_DATE_MM, PersonDto.BIRTH_DATE_DD), @@ -131,7 +112,7 @@ public class PersonEditForm extends AbstractEditForm { oneOfFourCol(PersonDto.BURIAL_CONDUCTOR), oneOfTwoCol(PersonDto.BURIAL_PLACE_DESCRIPTION) ) + - fluidRowLocs(PersonDto.PASSPORT_NUMBER, PersonDto.NATIONAL_HEALTH_ID) + + fluidRowLocs(PersonDto.PASSPORT_NUMBER, PersonDto.NATIONAL_HEALTH_ID, PersonDto.GHANA_CARD) + fluidRowLocs(PersonDto.EXTERNAL_ID, PersonDto.EXTERNAL_TOKEN) + fluidRowLocs(PersonDto.INTERNAL_TOKEN, EXTERNAL_TOKEN_WARNING_LOC) + @@ -167,7 +148,9 @@ public class PersonEditForm extends AbstractEditForm { private Label personInformationHeadingLabel; private TextField firstNameField; private TextField lastNameField; + private TextField otherNameField; private Disease disease; + private CaseOrigin caseOrigin; private String diseaseDetails; private ComboBox causeOfDeathField; private ComboBox causeOfDeathDiseaseField; @@ -178,9 +161,10 @@ public class PersonEditForm extends AbstractEditForm { private boolean isPseudonymized; private LocationEditForm addressForm; private PresentConditionChangeListener presentConditionChangeListener; + //@formatter:on - public PersonEditForm(PersonContext personContext, Disease disease, String diseaseDetails, ViewMode viewMode, boolean isPseudonymized) { + public PersonEditForm(PersonContext personContext, Disease disease, String diseaseDetails, ViewMode viewMode, boolean isPseudonymized, CaseOrigin caseOrigin) { super( PersonDto.class, PersonDto.I18N_PREFIX, @@ -194,6 +178,7 @@ public PersonEditForm(PersonContext personContext, Disease disease, String disea this.disease = disease; this.diseaseDetails = diseaseDetails; this.isPseudonymized = isPseudonymized; + this.caseOrigin = caseOrigin; CssStyles.style(CssStyles.H3, occupationHeader, addressHeader, addressesHeader, contactInformationHeader); getContent().addComponent(occupationHeader, OCCUPATION_HEADER); @@ -232,11 +217,19 @@ protected void addFields() { addField(PersonDto.UUID).setReadOnly(true); firstNameField = addField(PersonDto.FIRST_NAME, TextField.class); lastNameField = addField(PersonDto.LAST_NAME, TextField.class); + otherNameField = addField(PersonDto.OTHER_NAME, TextField.class); addFields(PersonDto.SALUTATION, PersonDto.OTHER_SALUTATION); FieldHelper.setVisibleWhen(getFieldGroup(), PersonDto.OTHER_SALUTATION, PersonDto.SALUTATION, Salutation.OTHER, true); - ComboBox sex = addField(PersonDto.SEX, ComboBox.class); + ComboBox sexComboBox = new ComboBox("Sex"); + + for (Sex sex : Sex.values()) { + if (sex == Sex.MALE || sex == Sex.FEMALE) { + sexComboBox.addItem(sex); + } + } + addField(PersonDto.SEX, sexComboBox); addField(PersonDto.BIRTH_NAME, TextField.class); addField(PersonDto.NICKNAME, TextField.class); addField(PersonDto.MOTHERS_MAIDEN_NAME, TextField.class); @@ -298,7 +291,10 @@ protected void addFields() { DateField burialDate = addField(PersonDto.BURIAL_DATE, DateField.class); TextField burialPlaceDesc = addField(PersonDto.BURIAL_PLACE_DESCRIPTION, TextField.class); ComboBox burialConductor = addField(PersonDto.BURIAL_CONDUCTOR, ComboBox.class); + addressForm = addField(PersonDto.ADDRESS, LocationEditForm.class); + addressForm.setOnlyUnknownForCSM(disease); + addressForm.setCaption(null); addField(PersonDto.ADDRESSES, LocationsField.class).setCaption(null); @@ -311,14 +307,20 @@ protected void addFields() { PersonDto.OCCUPATION_TYPE, PersonDto.OCCUPATION_DETAILS, PersonDto.ARMED_FORCES_RELATION_TYPE, - PersonDto.EDUCATION_TYPE, + PersonDto.EDUCATION_TYPE, PersonDto.EDUCATION_DETAILS); List countries = FacadeProvider.getCountryFacade().getAllActiveAsReference(); addInfrastructureField(PersonDto.BIRTH_COUNTRY).addItems(countries); addInfrastructureField(PersonDto.CITIZENSHIP).addItems(countries); - addFields(PersonDto.PASSPORT_NUMBER, PersonDto.NATIONAL_HEALTH_ID); + addField(PersonDto.PASSPORT_NUMBER); + + if (caseOrigin == CaseOrigin.IN_COUNTRY) { + setVisible(false, PersonDto.PASSPORT_NUMBER); + } + + addFields(PersonDto.NATIONAL_HEALTH_ID, PersonDto.GHANA_CARD); Field externalId = addField(PersonDto.EXTERNAL_ID); if (FacadeProvider.getExternalSurveillanceToolFacade().isFeatureEnabled()) { externalId.setEnabled(false); @@ -372,7 +374,7 @@ protected void addFields() { FieldHelper.addSoftRequiredStyle( presentCondition, - sex, + sexComboBox, deathDate, deathPlaceDesc, deathPlaceType, @@ -544,6 +546,16 @@ protected void addFields() { I18nProperties.getPrefixDescription(PersonDto.I18N_PREFIX, PersonDto.ADDITIONAL_DETAILS, "") + "\n" + I18nProperties.getDescription(Descriptions.descGdpr)); CssStyles.style(additionalDetails, CssStyles.CAPTION_HIDDEN); + + if (disease == Disease.CSM) { + generalCommentLabel.setVisible(false); + setVisible(false, PersonDto.NICKNAME, PersonDto.MOTHERS_MAIDEN_NAME, PersonDto.ADDITIONAL_DETAILS); + } + + if(disease == Disease.AFP){ + setVisible(false, PersonDto.OCCUPATION_TYPE,PersonDto.EDUCATION_TYPE, PersonDto.NICKNAME, PersonDto.MOTHERS_MAIDEN_NAME, PersonDto.ADDITIONAL_DETAILS, PersonDto.MOTHERS_NAME, PersonDto.FATHERS_NAME ); + } + } @Override @@ -647,22 +659,32 @@ private void initializePresentConditionField() { if (this.disease != null || FacadeProvider.getDiseaseConfigurationFacade().getDefaultDisease() != null) { Disease disease = this.disease != null ? this.disease : FacadeProvider.getDiseaseConfigurationFacade().getDefaultDisease(); - FieldVisibilityCheckers fieldVisibilityCheckers = FieldVisibilityCheckers.withDisease(disease); - List validValues = Arrays.stream(PresentCondition.values()) - .filter(c -> fieldVisibilityCheckers.isVisible(PresentCondition.class, c.name())) - .collect(Collectors.toList()); - PresentCondition currentValue = (PresentCondition) presentConditionField.getValue(); - if (currentValue != null && !validValues.contains(currentValue)) { - validValues.add(currentValue); + + if (disease == Disease.AHF) { + // If the disease is AHF, restrict valid values to ALIVE and UNKNOWN + List validValues = Arrays.asList(PresentCondition.ALIVE, PresentCondition.UNKNOWN); + FieldHelper.updateEnumData(presentConditionField, validValues); + } else if (disease == Disease.AFP) { + List validValues = Arrays.asList(PresentCondition.ALIVE, PresentCondition.DEAD, PresentCondition.BURIED); + FieldHelper.updateEnumData(presentConditionField, validValues); + } else { + FieldVisibilityCheckers fieldVisibilityCheckers = FieldVisibilityCheckers.withDisease(disease); + List validValues = Arrays.stream(PresentCondition.values()) + .filter(c -> fieldVisibilityCheckers.isVisible(PresentCondition.class, c.name())) + .collect(Collectors.toList()); + PresentCondition currentValue = (PresentCondition) presentConditionField.getValue(); + if (currentValue != null && !validValues.contains(currentValue)) { + validValues.add(currentValue); + } + presentConditionField.removeValueChangeListener(presentConditionChangeListener); + FieldHelper.updateEnumData(presentConditionField, validValues); + presentConditionField.addValueChangeListener(presentConditionChangeListener); } - presentConditionField.removeValueChangeListener(presentConditionChangeListener); - FieldHelper.updateEnumData(presentConditionField, validValues); - presentConditionField.addValueChangeListener(presentConditionChangeListener); } /* - * It may happen that the person currently has a present condition that usually shall not be shows for the form's disease. - * In that case, the present condition is added as selectable item here. + * It may happen that the person currently has a present condition that usually shall not be shown for the form's disease. + * In that case, the present condition is added as a selectable item here. */ if (presentCondition != null && presentConditionField.getItem(presentCondition) == null) { Item currentItem = presentConditionField.addItem(presentCondition); @@ -876,9 +898,9 @@ public Field getFirstNameField() { return firstNameField; } - public Field getLastNameField() { - return lastNameField; - } + public Field getLastNameField() {return lastNameField;} + + public Field getOtherNameField() {return otherNameField;} @Override protected F addFieldToLayout(CustomLayout layout, String propertyId, F field) { diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/AbstractSampleForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/AbstractSampleForm.java index 750e5723c98..11fdf742283 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/AbstractSampleForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/AbstractSampleForm.java @@ -8,10 +8,7 @@ import static de.symeda.sormas.ui.utils.LayoutUtil.loc; import static de.symeda.sormas.ui.utils.LayoutUtil.locCss; -import java.util.Arrays; -import java.util.Collections; -import java.util.Date; -import java.util.List; +import java.util.*; import java.util.stream.Collectors; import com.vaadin.ui.CssLayout; @@ -64,13 +61,20 @@ public abstract class AbstractSampleForm extends AbstractEditForm { private static final long serialVersionUID = -2323128076462668517L; protected static final String PATHOGEN_TESTING_INFO_LOC = "pathogenTestingInfoLoc"; + protected static final String SAMPLE_MATERIAL_INFO_LOC = "sampleMaterialInfoLoc"; protected static final String ADDITIONAL_TESTING_INFO_LOC = "additionalTestingInfoLoc"; protected static final String PATHOGEN_TESTING_READ_HEADLINE_LOC = "pathogenTestingReadHeadlineLoc"; + protected static final String SAMPLE_MATERIAL_READ_HEADLINE_LOC = "sampleMaterialReadHeadlineLoc"; protected static final String ADDITIONAL_TESTING_READ_HEADLINE_LOC = "additionalTestingReadHeadlineLoc"; protected static final String REQUESTED_PATHOGEN_TESTS_READ_LOC = "requestedPathogenTestsReadLoc"; protected static final String REQUESTED_ADDITIONAL_TESTS_READ_LOC = "requestedAdditionalTestsReadLoc"; protected static final String REPORT_INFO_LABEL_LOC = "reportInfoLabelLoc"; protected static final String REFERRED_FROM_BUTTON_LOC = "referredFromButtonLoc"; + private Disease disease; + public ComboBox sampleMaterialComboBox; + private ComboBox lab; + + private TextField labDetails; //@formatter:off protected static final String SAMPLE_COMMON_HTML_LAYOUT = @@ -83,6 +87,11 @@ public abstract class AbstractSampleForm extends AbstractEditForm { fluidRowLocs(SampleDto.FIELD_SAMPLE_ID, REFERRED_FROM_BUTTON_LOC) + fluidRowLocs(SampleDto.LAB, SampleDto.LAB_DETAILS) + + locCss(VSPACE_TOP_3, SampleDto.SAMPLE_MATERIAL_REQUESTED) + + loc(SAMPLE_MATERIAL_READ_HEADLINE_LOC) + + loc(SampleDto.REQUESTED_SAMPLE_MATERIALS) + + + locCss(VSPACE_TOP_3, SampleDto.PATHOGEN_TESTING_REQUESTED) + loc(PATHOGEN_TESTING_READ_HEADLINE_LOC) + loc(PATHOGEN_TESTING_INFO_LOC) + @@ -99,10 +108,10 @@ public abstract class AbstractSampleForm extends AbstractEditForm { locCss(VSPACE_TOP_3, SampleDto.SHIPPED) + fluidRowLocs(SampleDto.SHIPMENT_DATE, SampleDto.SHIPMENT_DETAILS) + - +// locCss(VSPACE_TOP_3, SampleDto.RECEIVED) + fluidRowLocs(SampleDto.RECEIVED_DATE, SampleDto.LAB_SAMPLE_ID) + - +// fluidRowLocs(SampleDto.SPECIMEN_CONDITION, SampleDto.NO_TEST_POSSIBLE_REASON) + fluidRowLocs(SampleDto.COMMENT) + fluidRowLocs(SampleDto.PATHOGEN_TEST_RESULT) + @@ -128,16 +137,18 @@ protected void addCommonFields() { addField(SampleDto.LAB_SAMPLE_ID, TextField.class); final DateTimeField sampleDateField = addField(SampleDto.SAMPLE_DATE_TIME, DateTimeField.class); sampleDateField.setInvalidCommitted(false); - addField(SampleDto.SAMPLE_MATERIAL, ComboBox.class); + //sampleMaterialComboBox = addField(SampleDto.SAMPLE_MATERIAL); + addField(SampleDto.SAMPLE_MATERIAL_TEXT, TextField.class); addField(SampleDto.SAMPLE_SOURCE, ComboBox.class); addField(SampleDto.FIELD_SAMPLE_ID, TextField.class); addDateField(SampleDto.SHIPMENT_DATE, DateField.class, 7); addField(SampleDto.SHIPMENT_DETAILS, TextField.class); addField(SampleDto.RECEIVED_DATE, DateField.class); - final ComboBox lab = addInfrastructureField(SampleDto.LAB); + + lab = addInfrastructureField(SampleDto.LAB); lab.addItems(FacadeProvider.getFacilityFacade().getAllActiveLaboratories(true)); - final TextField labDetails = addField(SampleDto.LAB_DETAILS, TextField.class); + labDetails = addField(SampleDto.LAB_DETAILS, TextField.class); labDetails.setVisible(false); lab.addValueChangeListener(event -> updateLabDetailsVisibility(labDetails, event)); @@ -153,6 +164,7 @@ protected void addCommonFields() { ComboBox testResultField = addField(SampleDto.PATHOGEN_TEST_RESULT, ComboBox.class); testResultField.removeItem(PathogenTestResultType.NOT_DONE); + testResultField.removeItem(PathogenTestResultType.INDETERMINATE); addFields(SampleDto.SAMPLING_REASON, SampleDto.SAMPLING_REASON_DETAILS); FieldHelper.setVisibleWhen( @@ -170,83 +182,105 @@ protected void addCommonFields() { protected void defaultValueChangeListener() { - final NullableOptionGroup samplePurposeField = (NullableOptionGroup) getField(SampleDto.SAMPLE_PURPOSE); - final Field receivedField = getField(SampleDto.RECEIVED); - final Field shippedField = getField(SampleDto.SHIPPED); - - samplePurposeField.setRequired(true); - - Disease disease = null; - final CaseReferenceDto associatedCase = getValue().getAssociatedCase(); - if (associatedCase != null && UserProvider.getCurrent().hasAllUserRights(UserRight.CASE_VIEW)) { - disease = FacadeProvider.getCaseFacade().getCaseDataByUuid(associatedCase.getUuid()).getDisease(); - } else { - final ContactReferenceDto associatedContact = getValue().getAssociatedContact(); - if (associatedContact != null && UserProvider.getCurrent().hasAllUserRights(UserRight.CONTACT_VIEW)) { - disease = FacadeProvider.getContactFacade().getByUuid(associatedContact.getUuid()).getDisease(); + final NullableOptionGroup samplePurposeField = (NullableOptionGroup) getField(SampleDto.SAMPLE_PURPOSE); + final Field receivedField = getField(SampleDto.RECEIVED); + final Field shippedField = getField(SampleDto.SHIPPED); + + samplePurposeField.setRequired(true); + + final CaseReferenceDto associatedCase = getValue().getAssociatedCase(); + if (associatedCase != null && UserProvider.getCurrent().hasAllUserRights(UserRight.CASE_VIEW)) { + disease = FacadeProvider.getCaseFacade().getCaseDataByUuid(associatedCase.getUuid()).getDisease(); + } else { + final ContactReferenceDto associatedContact = getValue().getAssociatedContact(); + if (associatedContact != null && UserProvider.getCurrent().hasAllUserRights(UserRight.CONTACT_VIEW)) { + disease = FacadeProvider.getContactFacade().getByUuid(associatedContact.getUuid()).getDisease(); + } + } + getDisease(); + + FieldHelper.setVisibleWhen( + getFieldGroup(), + Arrays.asList(SampleDto.RECEIVED_DATE, SampleDto.LAB_SAMPLE_ID, SampleDto.SPECIMEN_CONDITION), + SampleDto.RECEIVED, + Arrays.asList(true), + true); + FieldHelper.setEnabledWhen( + getFieldGroup(), + receivedField, + Arrays.asList(true), + Arrays.asList(SampleDto.RECEIVED_DATE, SampleDto.LAB_SAMPLE_ID, SampleDto.SPECIMEN_CONDITION), + true); + + sampleMaterialComboBox = addField(SampleDto.SAMPLE_MATERIAL); + + UserReferenceDto reportingUser = getValue().getReportingUser(); + if (UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_EDIT_NOT_OWNED) + || (reportingUser != null && UserProvider.getCurrent().getUuid().equals(reportingUser.getUuid()))) { + FieldHelper.setVisibleWhen( + getFieldGroup(), + Arrays.asList(SampleDto.SHIPMENT_DATE, SampleDto.SHIPMENT_DETAILS), + SampleDto.SHIPPED, + Arrays.asList(true), + true); + FieldHelper.setEnabledWhen( + getFieldGroup(), + shippedField, + Arrays.asList(true), + Arrays.asList(SampleDto.SHIPMENT_DATE, SampleDto.SHIPMENT_DETAILS), + true); + FieldHelper.setRequiredWhen( + getFieldGroup(), + SampleDto.SAMPLE_PURPOSE, + Arrays.asList(SampleDto.LAB), + Arrays.asList(SamplePurpose.EXTERNAL, null)); + + + Disease disease = getDisease(); + + switch (disease) { + case CSM: + handleCSM(); + break; + case AFP: + handleAFP(); + break; + case NEW_INFLUENZA: + handleNewInfluenza(); + break; + case YELLOW_FEVER: + handleYellowFever(); + + default: + // Handle default case, maybe log an error or set default visibility + break; } - } - FieldHelper.setVisibleWhen( - getFieldGroup(), - Arrays.asList(SampleDto.RECEIVED_DATE, SampleDto.LAB_SAMPLE_ID, SampleDto.SPECIMEN_CONDITION), - SampleDto.RECEIVED, - Arrays.asList(true), - true); - FieldHelper.setEnabledWhen( - getFieldGroup(), - receivedField, - Arrays.asList(true), - Arrays.asList(SampleDto.RECEIVED_DATE, SampleDto.LAB_SAMPLE_ID, SampleDto.SPECIMEN_CONDITION), - true); - if (disease != Disease.NEW_INFLUENZA) { - getField(SampleDto.SAMPLE_SOURCE).setVisible(false); - } + } else { + getField(SampleDto.SAMPLE_DATE_TIME).setEnabled(false); + getField(SampleDto.SAMPLE_MATERIAL).setEnabled(false); + getField(SampleDto.SAMPLE_MATERIAL_TEXT).setEnabled(false); + getField(SampleDto.LAB).setEnabled(false); + shippedField.setEnabled(false); + getField(SampleDto.SHIPMENT_DATE).setEnabled(false); + getField(SampleDto.SHIPMENT_DETAILS).setEnabled(false); + getField(SampleDto.SAMPLE_SOURCE).setEnabled(false); + } - UserReferenceDto reportingUser = getValue().getReportingUser(); - if (UserProvider.getCurrent().hasUserRight(UserRight.SAMPLE_EDIT_NOT_OWNED) - || (reportingUser != null && UserProvider.getCurrent().getUuid().equals(reportingUser.getUuid()))) { - FieldHelper.setVisibleWhen( - getFieldGroup(), - Arrays.asList(SampleDto.SHIPMENT_DATE, SampleDto.SHIPMENT_DETAILS), - SampleDto.SHIPPED, - Arrays.asList(true), - true); - FieldHelper.setEnabledWhen( - getFieldGroup(), - shippedField, - Arrays.asList(true), - Arrays.asList(SampleDto.SHIPMENT_DATE, SampleDto.SHIPMENT_DETAILS), - true); - FieldHelper.setRequiredWhen( - getFieldGroup(), - SampleDto.SAMPLE_PURPOSE, - Arrays.asList(SampleDto.LAB), - Arrays.asList(SamplePurpose.EXTERNAL, null)); - setRequired(true, SampleDto.SAMPLE_DATE_TIME, SampleDto.SAMPLE_MATERIAL); - } else { - getField(SampleDto.SAMPLE_DATE_TIME).setEnabled(false); - getField(SampleDto.SAMPLE_MATERIAL).setEnabled(false); - getField(SampleDto.SAMPLE_MATERIAL_TEXT).setEnabled(false); - getField(SampleDto.LAB).setEnabled(false); - shippedField.setEnabled(false); - getField(SampleDto.SHIPMENT_DATE).setEnabled(false); - getField(SampleDto.SHIPMENT_DETAILS).setEnabled(false); - getField(SampleDto.SAMPLE_SOURCE).setEnabled(false); - } + StringBuilder reportInfoText = new StringBuilder().append(I18nProperties.getString(Strings.reportedOn)) + .append(" ") + .append(DateFormatHelper.formatLocalDateTime(getValue().getReportDateTime())); + if (reportingUser != null) { + reportInfoText.append(" ").append(I18nProperties.getString(Strings.by)).append(" ").append(reportingUser.toString()); + } + Label reportInfoLabel = new Label(reportInfoText.toString()); + reportInfoLabel.setEnabled(false); + getContent().addComponent(reportInfoLabel, REPORT_INFO_LABEL_LOC); - StringBuilder reportInfoText = new StringBuilder().append(I18nProperties.getString(Strings.reportedOn)) - .append(" ") - .append(DateFormatHelper.formatLocalDateTime(getValue().getReportDateTime())); - if (reportingUser != null) { - reportInfoText.append(" ").append(I18nProperties.getString(Strings.by)).append(" ").append(reportingUser.toString()); - } - Label reportInfoLabel = new Label(reportInfoText.toString()); - reportInfoLabel.setEnabled(false); - getContent().addComponent(reportInfoLabel, REPORT_INFO_LABEL_LOC); + } - } + protected abstract Disease getDisease(); protected void updateLabDetailsVisibility(TextField labDetails, Property.ValueChangeEvent event) { if (event.getProperty().getValue() != null @@ -386,7 +420,7 @@ protected void initializeRequestedTestFields() { // header for read view Label pathogenTestsHeading = new Label(I18nProperties.getString(Strings.headingRequestedPathogenTests)); CssStyles.style(pathogenTestsHeading, CssStyles.LABEL_BOLD, CssStyles.LABEL_SECONDARY, VSPACE_4); - getContent().addComponent(pathogenTestsHeading, PATHOGEN_TESTING_READ_HEADLINE_LOC); + getContent().addComponent(pathogenTestsHeading, PATHOGEN_TESTING_READ_HEADLINE_LOC); Label additionalTestsHeading = new Label(I18nProperties.getString(Strings.headingRequestedAdditionalTests)); CssStyles.style(additionalTestsHeading, CssStyles.LABEL_BOLD, CssStyles.LABEL_SECONDARY, VSPACE_4); @@ -395,6 +429,59 @@ protected void initializeRequestedTestFields() { updateRequestedTestFields(); } + protected void initializeMaterialsMultiSelect( ){ + + Label materialMultiSelectInfoLabel = new Label(I18nProperties.getString(Strings.infoSampleMaterialSelection)); + getContent().addComponent(materialMultiSelectInfoLabel, SAMPLE_MATERIAL_INFO_LOC); + + // Yes/No fields for sample materials + CheckBox sampleMaterialRequestedField = addField(SampleDto.SAMPLE_MATERIAL_REQUESTED, CheckBox.class); + sampleMaterialRequestedField.setWidthUndefined(); + sampleMaterialRequestedField.addValueChangeListener(e -> updateSampleMaterialFields()); + + // CheckBox groups to select sample Materials + OptionGroup requestedSampleMaterialsField = addField(SampleDto.REQUESTED_SAMPLE_MATERIALS, OptionGroup.class); + CssStyles.style(requestedSampleMaterialsField, CssStyles.OPTIONGROUP_CHECKBOXES_HORIZONTAL); + requestedSampleMaterialsField.setMultiSelect(true); + requestedSampleMaterialsField.addItems( + Arrays.stream(SampleMaterial.values()) + .filter( c -> fieldVisibilityCheckers.isVisible(SampleMaterial.class, c.name())) + .collect(Collectors.toList())); + requestedSampleMaterialsField.removeItem(SampleMaterial.OTHER); + requestedSampleMaterialsField.setCaption(null); + + updateSampleMaterialFields(); + + } + + private void updateSampleMaterialFields() { + + Field sampleMaterialTestingField = getField(SampleDto.SAMPLE_MATERIAL_REQUESTED); + + boolean sampleMaterialsRequested = Boolean.TRUE.equals(sampleMaterialTestingField.getValue()); + setVisible(sampleMaterialsRequested, SampleDto.REQUESTED_SAMPLE_MATERIALS); + + getContent().getComponent(SAMPLE_MATERIAL_INFO_LOC).setVisible(sampleMaterialsRequested); + + + + if (getValue() != null ) { + CssLayout requestedSampleMaterialsLayout = new CssLayout(); + CssStyles.style(requestedSampleMaterialsLayout, VSPACE_3); + for (SampleMaterial sampleType : SampleMaterial.values()) { + Label testLabel = new Label(sampleType.toString()); + testLabel.setWidthUndefined(); + CssStyles.style(testLabel, CssStyles.LABEL_ROUNDED_CORNERS, CssStyles.LABEL_BACKGROUND_FOCUS_LIGHT, VSPACE_4, HSPACE_RIGHT_4); + requestedSampleMaterialsLayout.addComponent(testLabel); + } + getContent().addComponent(requestedSampleMaterialsLayout, SAMPLE_MATERIAL_INFO_LOC); + } +// else { +// getContent().removeComponent(REQUESTED_PATHOGEN_TESTS_READ_LOC); +// } + + } + private void updateRequestedTestFields() { boolean showRequestFields = getField(SampleDto.SAMPLE_PURPOSE).getValue() != SamplePurpose.INTERNAL; @@ -420,6 +507,7 @@ private void updateRequestedTestFields() { boolean pathogenTestsRequested = Boolean.TRUE.equals(pathogenTestingField.getValue()); setVisible(pathogenTestsRequested, SampleDto.REQUESTED_PATHOGEN_TESTS, SampleDto.REQUESTED_OTHER_PATHOGEN_TESTS); + getContent().getComponent(PATHOGEN_TESTING_INFO_LOC).setVisible(pathogenTestsRequested); boolean additionalTestsRequested = Boolean.TRUE.equals(additionalTestingField.getValue()); @@ -429,6 +517,10 @@ private void updateRequestedTestFields() { getContent().getComponent(PATHOGEN_TESTING_READ_HEADLINE_LOC).setVisible(canOnlyReadRequests); getContent().getComponent(ADDITIONAL_TESTING_READ_HEADLINE_LOC).setVisible(canOnlyReadRequests && canUseAdditionalTests); + handleDisease(Disease.YELLOW_FEVER, "National Public Health Reference Laboratory"); + handleDisease(Disease.AHF, "Noguchi Memorial Institute for Medical Research"); + handleDisease(Disease.AFP, "Noguchi Memorial Institute for Medical Research"); + if (getValue() != null && canOnlyReadRequests) { CssLayout requestedPathogenTestsLayout = new CssLayout(); CssStyles.style(requestedPathogenTestsLayout, VSPACE_3); @@ -457,4 +549,64 @@ private void updateRequestedTestFields() { getContent().removeComponent(REQUESTED_ADDITIONAL_TESTS_READ_LOC); } } + + private void handleDisease(Disease targetDisease, String labName) { + if (disease == targetDisease) { + setVisibleAndCheckLab(labName, SampleDto.SAMPLING_REASON, SampleDto.PATHOGEN_TESTING_REQUESTED); + } + } + + private void handleCSM() { + setVisible(false, SampleDto.SAMPLE_PURPOSE, + SampleDto.SAMPLING_REASON, + SampleDto.REQUESTED_PATHOGEN_TESTS, + SampleDto.REQUESTED_OTHER_PATHOGEN_TESTS); + + sampleMaterialComboBox.setValue(SampleMaterial.CEREBROSPINAL_FLUID); + } + + private void handleAFP() { + setVisible(false, SampleDto.SAMPLE_PURPOSE); + setRequired(false, SampleDto.SAMPLE_PURPOSE); + } + + private void handleNewInfluenza(){ + setVisible(false,SampleDto.SAMPLE_SOURCE ); + } + + private void handleYellowFever(){ + setRequired(false, SampleDto.SAMPLE_DATE_TIME, SampleDto.SAMPLE_MATERIAL); + sampleMaterialComboBox.setVisible(false); + + initializeMaterialsMultiSelect(); + } + + private FacilityReferenceDto findLabByName(List labs, String labName) { + for (FacilityReferenceDto labItem : labs) { + if (labName.equals(labItem.getCaption())) { + return labItem; + } + } + return null; + } + + private void setVisibleAndCheckLab(String labName, String...fieldsToHide) { + setVisible(false, fieldsToHide); + + if (lab != null) { + List allActiveLaboratories = FacadeProvider.getFacilityFacade().getAllActiveLaboratories(false); + FacilityReferenceDto facilityLab = findLabByName(allActiveLaboratories, labName); + + if (facilityLab != null) { + lab.addItems(allActiveLaboratories); + lab.setValue(facilityLab); + labDetails.setVisible(false); + labDetails.setRequired(false); + } else { + System.out.println("Please add " + labName + " to Facility Configuration"); + } + } else { + System.out.println("Lab dropdown is null. Please check your code."); + } + } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/SampleCreateForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/SampleCreateForm.java index bb5251bccdb..95a9f865f55 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/SampleCreateForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/SampleCreateForm.java @@ -8,9 +8,11 @@ public class SampleCreateForm extends AbstractSampleForm { private static final long serialVersionUID = 1L; + private Disease disease; public SampleCreateForm(Disease disease) { super(SampleDto.class, SampleDto.I18N_PREFIX, disease, null); + this.disease = disease; } @SuppressWarnings("deprecation") @@ -28,8 +30,14 @@ protected void addFields() { }); } + @Override protected String createHtmlLayout() { return SAMPLE_COMMON_HTML_LAYOUT; } + + @Override + protected Disease getDisease() { + return this.disease; + } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/SampleEditForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/SampleEditForm.java index 010f2c55bb3..a79179e8f88 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/SampleEditForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/SampleEditForm.java @@ -55,6 +55,8 @@ public class SampleEditForm extends AbstractSampleForm { private List testsToBeRemovedOnCommit; private Label laboratorySampleHeadingLabel; + //private Disease disease; + public SampleEditForm(boolean isPseudonymized, Disease disease) { super(SampleDto.class, SampleDto.I18N_PREFIX, disease, UiFieldAccessCheckers.forSensitiveData(isPseudonymized)); @@ -133,4 +135,9 @@ public List getTestsToBeRemovedOnCommit() { public void setHeading(String heading) { laboratorySampleHeadingLabel.setValue(heading); } + + @Override + protected Disease getDisease() { + return null; + } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/symptoms/SymptomsForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/symptoms/SymptomsForm.java index c8c6dece1b2..796164deea7 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/symptoms/SymptomsForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/symptoms/SymptomsForm.java @@ -132,7 +132,7 @@ public class SymptomsForm extends AbstractEditForm { createSymptomGroupLayout(SymptomGroup.GENERAL, GENERAL_SIGNS_AND_SYMPTOMS_HEADING_LOC) + createSymptomGroupLayout(SymptomGroup.RESPIRATORY, RESPIRATORY_SIGNS_AND_SYMPTOMS_HEADING_LOC) + createSymptomGroupLayout(SymptomGroup.CARDIOVASCULAR, CARDIOVASCULAR_SIGNS_AND_SYMPTOMS_HEADING_LOC) + - createSymptomGroupLayout(SymptomGroup.GASTROINTESTINAL, GASTROINTESTINAL_SIGNS_AND_SYMPTOMS_HEADING_LOC) + + //createSymptomGroupLayout(SymptomGroup.GASTROINTESTINAL, GASTROINTESTINAL_SIGNS_AND_SYMPTOMS_HEADING_LOC) + createSymptomGroupLayout(SymptomGroup.URINARY, URINARY_SIGNS_AND_SYMPTOMS_HEADING_LOC) + createSymptomGroupLayout(SymptomGroup.NERVOUS_SYSTEM, NERVOUS_SYSTEM_SIGNS_AND_SYMPTOMS_HEADING_LOC) + createSymptomGroupLayout(SymptomGroup.SKIN, SKIN_SIGNS_AND_SYMPTOMS_HEADING_LOC) + @@ -739,6 +739,171 @@ public String getFormattedHtmlMessage() { if (disease == Disease.MONKEYPOX) { setUpMonkeypoxVisibilities(); } + if (disease == Disease.AFP) { + setVisible(false, TEMPERATURE, TEMPERATURE_SOURCE); + } + + if(disease == Disease.CSM){ + setVisible(false, VOMITING, + DIARRHEA, + BLOOD_IN_STOOL, + NAUSEA, + ABDOMINAL_PAIN, + MUSCLE_PAIN, + FATIGUE_WEAKNESS, + SKIN_RASH, + SORE_THROAT, + COUGH, + COUGH_WITH_SPUTUM, + COUGH_WITH_HEAMOPTYSIS, + RUNNY_NOSE, + DIFFICULTY_BREATHING, + CHEST_PAIN, + CONJUNCTIVITIS, + EYE_PAIN_LIGHT_SENSITIVE, + KOPLIKS_SPOTS, + THROBOCYTOPENIA, + OTITIS_MEDIA, + HEARINGLOSS, + DEHYDRATION, + ANOREXIA_APPETITE_LOSS, + REFUSAL_FEEDOR_DRINK, + JOINT_PAIN, + HICCUPS, + BACKACHE, + EYES_BLEEDING, + JAUNDICE, + DARK_URINE, + STOMACH_BLEEDING, + RAPID_BREATHING, + SWOLLEN_GLANDS, + UNEXPLAINED_BLEEDING, + GUMS_BLEEDING, + INJECTION_SITE_BLEEDING, + NOSE_BLEEDING, + BLOODY_BLACK_STOOL, + RED_BLOOD_VOMIT, + DIGESTED_BLOOD_VOMIT, + COUGHING_BLOOD, + BLEEDING_VAGINA, + SKIN_BRUISING, + BLOOD_URINE, + OTHER_HEMORRHAGIC_SYMPTOMS, + OTHER_HEMORRHAGIC_SYMPTOMS_TEXT, + OTHER_NON_HEMORRHAGIC_SYMPTOMS, + OTHER_NON_HEMORRHAGIC_SYMPTOMS_TEXT, + LESIONS, + LESIONS_THAT_ITCH, + LESIONS_SAME_STATE, + LESIONS_SAME_SIZE, + LESIONS_DEEP_PROFOUND, + LESIONS_FACE, + LESIONS_LEGS, + LESIONS_SOLES_FEET, + LESIONS_PALMS_HANDS, + LESIONS_THORAX, + LESIONS_ARMS, + LESIONS_GENITALS, + LESIONS_ALL_OVER_BODY, + LYMPHADENOPATHY, + LYMPHADENOPATHY_AXILLARY, + LYMPHADENOPATHY_CERVICAL, + LYMPHADENOPATHY_INGUINAL, + CHILLS_SWEATS, + BEDRIDDEN, + ORAL_ULCERS, + PAINFUL_LYMPHADENITIS, + BLACKENING_DEATH_OF_TISSUE, + BUBOES_GROIN_ARMPIT_NECK, + PHARYNGEAL_ERYTHEMA, + PHARYNGEAL_EXUDATE, + OEDEMA_FACE_NECK, + OEDEMA_LOWER_EXTREMITY, + LOSS_SKIN_TURGOR, + PALPABLE_LIVER, + PALPABLE_SPLEEN, + MALAISE, + SUNKEN_EYES_FONTANELLE, + SIDE_PAIN, + FLUID_IN_LUNG_CAVITY, + TREMOR, + BILATERAL_CATARACTS, + UNILATERAL_CATARACTS, + CONGENITAL_GLAUCOMA, + CONGENITAL_HEART_DISEASE, + PIGMENTARY_RETINOPATHY, + RADIOLUCENT_BONE_DISEASE, + SPLENOMEGALY, + MICROCEPHALY, + MENINGOENCEPHALITIS, + PURPURIC_RASH, + DEVELOPMENTAL_DELAY, + CONGENITAL_HEART_DISEASE_TYPE, + CONGENITAL_HEART_DISEASE_DETAILS, + JAUNDICE_WITHIN_24_HOURS_OF_BIRTH, + PATIENT_ILL_LOCATION, + HYDROPHOBIA, + OPISTHOTONUS, + ANXIETY_STATES, + DELIRIUM, + UPROARIOUSNESS, + PARASTHESIA_AROUND_WOUND, + EXCESS_SALIVATION, + INSOMNIA, + PARALYSIS, + EXCITATION, + DYSPHAGIA, + AEROPHOBIA, + HYPERACTIVITY, + PARESIS, + AGITATION, + ASCENDING_FLACCID_PARALYSIS, + ERRATIC_BEHAVIOUR, + COMA, + CONVULSION, + FLUID_IN_LUNG_CAVITY_AUSCULTATION, + FLUID_IN_LUNG_CAVITY_XRAY, + ABNORMAL_LUNG_XRAY_FINDINGS, + CONJUNCTIVAL_INJECTION, + ACUTE_RESPIRATORY_DISTRESS_SYNDROME, + PNEUMONIA_CLINICAL_OR_RADIOLOGIC, + LOSS_OF_TASTE, + LOSS_OF_SMELL, + WHEEZING, + SKIN_ULCERS, + INABILITY_TO_WALK, + IN_DRAWING_OF_CHEST_WALL, + FEELING_ILL, + SHIVERING, + RESPIRATORY_DISEASE_VENTILATION, + FAST_HEART_RATE, + OXYGEN_SATURATION_LOWER_94, + FEVERISHFEELING, + WEAKNESS, + FATIGUE, + COUGH_WITHOUT_SPUTUM, + BREATHLESSNESS, + CHEST_PRESSURE, + BLUE_LIPS, + BLOOD_CIRCULATION_PROBLEMS, + PALPITATIONS, + DIZZINESS_STANDING_UP, + HIGH_OR_LOW_BLOOD_PRESSURE, + URINARY_RETENTION, + + //ALTERED_CONSCIOUSNESS, + CONFUSED_DISORIENTED, + //OTHER_COMPLICATIONS, + //OTHER_COMPLICATIONS_TEXT, + HEMORRHAGIC_SYNDROME, + HYPERGLYCEMIA, + HYPOGLYCEMIA, + MENINGEAL_SIGNS, + //SEIZURES, + SEPSIS, + SHOCK); + + } if (symptomsContext != SymptomsContext.CASE) { getFieldGroup().getField(PATIENT_ILL_LOCATION).setVisible(false); @@ -1000,7 +1165,7 @@ public void valueChange(com.vaadin.v7.data.Property.ValueChangeEvent event) { } /** - * Returns true if if the value of any field associated with the sourcePropertyIds + * Returns true if the value of any field associated with the sourcePropertyIds * is set to one of the values contained in sourceValues. * * @param fieldGroup @@ -1051,6 +1216,7 @@ private void addListenerForOnsetFields(ComboBox onsetSymptom, DateField onsetDat onsetDateField.setEnabled(false); // will be updated by listener if needed } + private void setUpMonkeypoxVisibilities() { // Monkeypox picture resemblance fields FieldHelper.setVisibleWhen(getFieldGroup(), monkeypoxImageFieldIds, LESIONS, Arrays.asList(SymptomState.YES), true); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/travelentry/TravelEntryPersonView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/travelentry/TravelEntryPersonView.java index 4d7f7026162..0a0f9c66181 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/travelentry/TravelEntryPersonView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/travelentry/TravelEntryPersonView.java @@ -27,6 +27,7 @@ protected void initView(String params) { dto.getPerson().getUuid(), dto.getDisease(), dto.getDiseaseDetails(), + dto.getCaseOrigin(), UserRight.TRAVEL_ENTRY_EDIT, null); setSubComponent(travelEntryPersonComponent); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/AbstractEditForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/AbstractEditForm.java index dfea660671f..d90d653ab7f 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/AbstractEditForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/AbstractEditForm.java @@ -58,6 +58,8 @@ public abstract class AbstractEditForm extends AbstractForm implements private ComboBox diseaseField; private boolean setServerDiseaseAsDefault; + protected String disease; + protected AbstractEditForm(Class type, String propertyI18nPrefix) { this(type, propertyI18nPrefix, true, null, null); } @@ -203,9 +205,11 @@ protected ComboBox addDiseaseField(String fieldId, boolean showNonPrimaryDisease diseaseField.addValueChangeListener(e -> { Object value = e.getProperty().getValue(); if (value != null && !diseaseField.containsId(value)) { + Item newItem = diseaseField.addItem(value); newItem.getItemProperty(SormasFieldGroupFieldFactory.CAPTION_PROPERTY_ID).setValue(value.toString()); } + this.disease=value.toString(); }); return diseaseField; } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/CssStyles.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/CssStyles.java index 2e4e2d524de..06de4e46cd3 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/CssStyles.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/CssStyles.java @@ -396,7 +396,7 @@ public static String getDiseaseColor(Disease disease) { return "background-disease-plague"; case POLIO: return "background-disease-polio"; - case UNSPECIFIED_VHF: + case AHF: return "background-disease-unspecified-vhf"; case WEST_NILE_FEVER: return "background-disease-west-nile-fever"; diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/DownloadUtil.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/DownloadUtil.java index 4813cd5fd6c..7773154d95f 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/DownloadUtil.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/DownloadUtil.java @@ -205,7 +205,7 @@ public InputStream getStream() { columnNames.add(DataHelper.getSexAndAgeGroupString(ageGroup, null)); columnNames.add(DataHelper.getSexAndAgeGroupString(ageGroup, Sex.MALE)); columnNames.add(DataHelper.getSexAndAgeGroupString(ageGroup, Sex.FEMALE)); - columnNames.add(DataHelper.getSexAndAgeGroupString(ageGroup, Sex.OTHER)); + //columnNames.add(DataHelper.getSexAndAgeGroupString(ageGroup, Sex.OTHER)); ageGroupPositions.put(ageGroup, ageGroupIndex); ageGroupIndex += 4; } @@ -254,8 +254,8 @@ public InputStream getStream() { exportLine[4] = String.valueOf((int) populationExportData[5]); } else if (Sex.FEMALE.getName().equals(sexString)) { exportLine[5] = String.valueOf((int) populationExportData[5]); - } else if (Sex.OTHER.getName().equals(sexString)) { - exportLine[6] = String.valueOf((int) populationExportData[5]); +// } else if (Sex.OTHER.getName().equals(sexString)) { +// exportLine[6] = String.valueOf((int) populationExportData[5]); } else { exportLine[3] = String.valueOf((int) populationExportData[5]); } @@ -267,8 +267,8 @@ public InputStream getStream() { ageGroupPosition += 1; } else if (Sex.FEMALE.getName().equals(sexString)) { ageGroupPosition += 2; - } else if (Sex.OTHER.getName().equals(sexString)) { - ageGroupPosition += 3; +// } else if (Sex.OTHER.getName().equals(sexString)) { +// ageGroupPosition += 3; } exportLine[ageGroupPosition] = String.valueOf((int) populationExportData[5]); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/page/title/TitleLayoutHelper.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/page/title/TitleLayoutHelper.java index b1e505dcf6c..31f879500bb 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/page/title/TitleLayoutHelper.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/utils/components/page/title/TitleLayoutHelper.java @@ -12,7 +12,7 @@ private TitleLayoutHelper() { public static StringBuilder buildPersonString(PersonDto person) { StringBuilder personString = new StringBuilder(); - String personFullName = PersonDto.buildCaption(person.getFirstName(), person.getLastName()); + String personFullName = PersonDto.buildCaption(person.getFirstName(), person.getLastName(), person.getOtherName() ); if (StringUtils.isNotBlank(personFullName)) { personString.append(personFullName); From 385d881bd3cb9de1490073589ee995e021356bc9 Mon Sep 17 00:00:00 2001 From: Danie Adjei Date: Tue, 28 Nov 2023 15:10:02 +0000 Subject: [PATCH 24/25] Updated sampleresults to sample menu --- .../symeda/sormas/api/sample/SampleDto.java | 29 +++++++++++++++---- .../symeda/sormas/backend/sample/Sample.java | 20 +++++++++++++ .../backend/sample/SampleFacadeEjb.java | 6 ++++ .../src/main/resources/sql/sormas_schema.sql | 4 +++ .../sormas/ui/samples/AbstractSampleForm.java | 7 +++++ 5 files changed, 61 insertions(+), 5 deletions(-) diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleDto.java index 656194c3b4e..f8dbd180818 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleDto.java @@ -14,8 +14,10 @@ */ package de.symeda.sormas.api.sample; +import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.feature.FeatureType; -import de.symeda.sormas.api.utils.DependingOnFeatureType; +import de.symeda.sormas.api.utils.*; + import java.util.Date; import java.util.Set; @@ -32,10 +34,6 @@ import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; import de.symeda.sormas.api.sormastosormas.SormasToSormasShareableDto; import de.symeda.sormas.api.user.UserReferenceDto; -import de.symeda.sormas.api.utils.DataHelper; -import de.symeda.sormas.api.utils.FieldConstraints; -import de.symeda.sormas.api.utils.Required; -import de.symeda.sormas.api.utils.SensitiveData; @DependingOnFeatureType(featureType = FeatureType.SAMPLES_LAB) public class SampleDto extends SormasToSormasShareableDto { @@ -80,6 +78,8 @@ public class SampleDto extends SormasToSormasShareableDto { public static final String SAMPLING_REASON_DETAILS = "samplingReasonDetails"; public static final String DELETION_REASON = "deletionReason"; public static final String OTHER_DELETION_REASON = "otherDeletionReason"; + public static final String IPSAMPLESENT = "ipSampleSent"; + public static final String IPSAMPLERESULTS = "ipSampleResults"; private CaseReferenceDto associatedCase; private ContactReferenceDto associatedContact; @@ -157,6 +157,25 @@ public class SampleDto extends SormasToSormasShareableDto { @Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong) private String otherDeletionReason; + private YesNoUnknown ipSampleSent; + private Disease ipSampleResults; + + public YesNoUnknown getIpSampleSent() { + return ipSampleSent; + } + + public void setIpSampleSent(YesNoUnknown ipSampleSent) { + this.ipSampleSent = ipSampleSent; + } + + public Disease getIpSampleResults(){ + return ipSampleResults; + } + + public void setIpSampleResults(Disease ipSampleResults) { + this.ipSampleResults = ipSampleResults; + } + @ImportIgnore public CaseReferenceDto getAssociatedCase() { return associatedCase; diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/Sample.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/Sample.java index 348d92bfd62..398dbff33c0 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/Sample.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/Sample.java @@ -42,6 +42,8 @@ import javax.persistence.TemporalType; import javax.persistence.Transient; +import de.symeda.sormas.api.Disease; +import de.symeda.sormas.api.utils.YesNoUnknown; import org.apache.commons.lang3.StringUtils; import de.symeda.auditlog.api.Audited; @@ -161,6 +163,8 @@ public class Sample extends DeletableAdo implements SormasToSormasShareable { private SormasToSormasOriginInfo sormasToSormasOriginInfo; private List sormasToSormasShares = new ArrayList<>(0); + private YesNoUnknown ipSampleSent; + private Disease ipSampleResults; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn @@ -588,6 +592,22 @@ public String getSamplingReasonDetails() { public void setSamplingReasonDetails(String samplingReasonDetails) { this.samplingReasonDetails = samplingReasonDetails; } + public void setIpSampleSent(YesNoUnknown ipSampleSent) { + this.ipSampleSent = ipSampleSent; + } + + @Enumerated(EnumType.STRING) + public YesNoUnknown getIpSampleSent() { + return ipSampleSent; + } + + public void setIpSampleResults(Disease ipSampleResults) { + this.ipSampleResults = ipSampleResults; + } + @Enumerated(EnumType.STRING) + public Disease getIpSampleResults(){ + return ipSampleResults; + } public SampleReferenceDto toReference() { return new SampleReferenceDto( diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleFacadeEjb.java index 2e6ce4f0b6d..5d924ff1702 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleFacadeEjb.java @@ -806,6 +806,9 @@ public Sample fromDto(@NotNull SampleDto source, boolean checkChangeDate) { target.setSamplingReason(source.getSamplingReason()); target.setSamplingReasonDetails(source.getSamplingReasonDetails()); + target.setIpSampleSent(source.getIpSampleSent()); + target.setIpSampleResults(source.getIpSampleResults()); + target.setReportLat(source.getReportLat()); target.setReportLon(source.getReportLon()); target.setReportLatLonAccuracy(source.getReportLatLonAccuracy()); @@ -949,6 +952,9 @@ public static SampleDto toDto(Sample source) { target.setDeletionReason(source.getDeletionReason()); target.setOtherDeletionReason(source.getOtherDeletionReason()); + target.setIpSampleSent(source.getIpSampleSent()); + target.setIpSampleResults(source.getIpSampleResults()); + return target; } diff --git a/sormas-backend/src/main/resources/sql/sormas_schema.sql b/sormas-backend/src/main/resources/sql/sormas_schema.sql index 4e48f3b2661..f15fe2b0ccf 100644 --- a/sormas-backend/src/main/resources/sql/sormas_schema.sql +++ b/sormas-backend/src/main/resources/sql/sormas_schema.sql @@ -11698,4 +11698,8 @@ INSERT INTO schema_version (version_number, comment) VALUES (482, 'Added a colum ALTER TABLE samples ALTER COLUMN samplepurpose DROP NOT NULL; INSERT INTO schema_version (version_number, comment) VALUES (483, 'altered column samplepurpose in samples to not null'); +ALTER TABLE samples ADD COLUMN ipsamplesent varchar(255); +ALTER TABLE samples ADD COLUMN ipsampleresults varchar(512); +INSERT INTO schema_version (version_number, comment) VALUES (484, 'Added a column name ipsampleresults to samples'); + -- *** Insert new sql commands BEFORE this line. Remember to always consider _history tables. *** diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/AbstractSampleForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/AbstractSampleForm.java index 11fdf742283..56dff8f9c8d 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/AbstractSampleForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/AbstractSampleForm.java @@ -45,6 +45,7 @@ import de.symeda.sormas.api.sample.SpecimenCondition; import de.symeda.sormas.api.user.UserReferenceDto; import de.symeda.sormas.api.user.UserRight; +import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers; import de.symeda.sormas.api.utils.fieldvisibility.FieldVisibilityCheckers; import de.symeda.sormas.ui.UserProvider; @@ -87,6 +88,7 @@ public abstract class AbstractSampleForm extends AbstractEditForm { fluidRowLocs(SampleDto.FIELD_SAMPLE_ID, REFERRED_FROM_BUTTON_LOC) + fluidRowLocs(SampleDto.LAB, SampleDto.LAB_DETAILS) + + fluidRowLocs(SampleDto.IPSAMPLESENT) + fluidRowLocs(SampleDto.IPSAMPLERESULTS, "") + locCss(VSPACE_TOP_3, SampleDto.SAMPLE_MATERIAL_REQUESTED) + loc(SAMPLE_MATERIAL_READ_HEADLINE_LOC) + loc(SampleDto.REQUESTED_SAMPLE_MATERIALS) + @@ -162,6 +164,9 @@ protected void addCommonFields() { addField(SampleDto.SHIPPED, CheckBox.class); addField(SampleDto.RECEIVED, CheckBox.class); + addField(SampleDto.IPSAMPLESENT, NullableOptionGroup.class); + addField(SampleDto.IPSAMPLERESULTS); + ComboBox testResultField = addField(SampleDto.PATHOGEN_TEST_RESULT, ComboBox.class); testResultField.removeItem(PathogenTestResultType.NOT_DONE); testResultField.removeItem(PathogenTestResultType.INDETERMINATE); @@ -174,6 +179,8 @@ protected void addCommonFields() { Collections.singletonList(SamplingReason.OTHER_REASON), true); + FieldHelper.setVisibleWhen(getFieldGroup(), SampleDto.IPSAMPLERESULTS, SampleDto.IPSAMPLESENT, Collections.singletonList(YesNoUnknown.YES), true); + addField(SampleDto.DELETION_REASON); addField(SampleDto.OTHER_DELETION_REASON, TextArea.class).setRows(3); setVisible(false, SampleDto.DELETION_REASON, SampleDto.OTHER_DELETION_REASON); From 5a05124bad32e346560812c6010715c987d6fa93 Mon Sep 17 00:00:00 2001 From: Flava177 Date: Mon, 5 Feb 2024 16:39:58 +0000 Subject: [PATCH 25/25] Second Phase --- .../java/de/symeda/sormas/api/Disease.java | 17 +- .../de/symeda/sormas/api/FacadeProvider.java | 5 + .../sormas/api/caze/CaseBulkEditData.java | 11 + .../sormas/api/caze/CaseClassification.java | 8 +- .../symeda/sormas/api/caze/CaseCriteria.java | 11 + .../symeda/sormas/api/caze/CaseDataDto.java | 115 ++- .../symeda/sormas/api/caze/CaseExportDto.java | 95 ++- .../de/symeda/sormas/api/caze/CaseLogic.java | 3 +- .../symeda/sormas/api/caze/CaseOutcome.java | 4 +- .../SurveillanceReportDto.java | 10 + .../symeda/sormas/api/epidata/EpiDataDto.java | 82 +- .../sormas/api/event/EventCriteria.java | 17 + .../sormas/api/exposure/ExposureDto.java | 136 ++- .../hospitalization/HospitalizationDto.java | 208 ++++- .../PreviousHospitalizationDto.java | 25 +- .../de/symeda/sormas/api/i18n/Captions.java | 133 +++ .../symeda/sormas/api/i18n/Descriptions.java | 1 + .../de/symeda/sormas/api/i18n/Strings.java | 9 + .../immunization/ImmunizationCriteria.java | 10 + .../api/immunization/ImmunizationDto.java | 1 + .../facility/DhimsFacility.java | 23 + .../facility/FacilityCriteria.java | 10 + .../infrastructure/facility/FacilityDto.java | 16 + .../facility/FacilityFacade.java | 36 +- .../facility/FacilityIndexDto.java | 21 + .../facility/FacilityTypeGroup.java | 4 + .../sormas/api/location/LocationDto.java | 13 + .../symeda/sormas/api/person/PersonDto.java | 25 + .../sormas/api/sample/AdditionalTestType.java | 24 +- .../sormas/api/sample/PathogenTestType.java | 11 + .../symeda/sormas/api/sample/SampleDto.java | 796 +++++++++++++++++- .../sormas/api/sample/SampleIndexDto.java | 76 +- .../sormas/api/sample/SampleMaterial.java | 18 +- .../sormas/api/sixtyday/SixtyDayDto.java | 246 ++++++ .../sormas/api/sixtyday/SixtyDayFacade.java | 7 + .../SormasToSormasCasePreview.java | 8 + .../sormas/api/symptoms/SymptomState.java | 3 +- .../sormas/api/symptoms/SymptomsDto.java | 341 +++++--- .../sormas/api/symptoms/SymptomsHelper.java | 2 +- .../sormas/api/utils/AFPClassification.java | 19 + .../symeda/sormas/api/utils/Antibiogram.java | 16 + .../symeda/sormas/api/utils/CSMVaccines.java | 21 + .../sormas/api/utils/CsfAppearance.java | 16 + .../de/symeda/sormas/api/utils/CsfReason.java | 32 + .../java/de/symeda/sormas/api/utils/Gram.java | 15 + .../de/symeda/sormas/api/utils/HospOut.java | 13 + .../de/symeda/sormas/api/utils/IpResult.java | 13 + .../de/symeda/sormas/api/utils/LabTest.java | 16 + .../de/symeda/sormas/api/utils/LabType.java | 14 + .../symeda/sormas/api/utils/LatexCulture.java | 60 ++ .../symeda/sormas/api/utils/NormalWasted.java | 12 + .../sormas/api/utils/ParalysisSite.java | 15 + .../de/symeda/sormas/api/utils/PosNeg.java | 13 + .../sormas/api/utils/SampleContainerUsed.java | 15 + .../symeda/sormas/api/utils/SymptomLevel.java | 14 + .../symeda/sormas/api/utils/TypeOfAbode.java | 17 + .../sormas/api/utils/YellowFeverSample.java | 26 + .../de/symeda/sormas/api/utils/YesNo.java | 24 + .../pseudonymization/SampleDispatchMode.java | 14 + .../src/main/resources/captions.properties | 157 +++- .../main/resources/descriptions.properties | 1 + sormas-api/src/main/resources/enum.properties | 116 ++- .../src/main/resources/strings.properties | 15 +- .../sormas/api/EntityDtoAccessHelperTest.java | 3 +- sormas-app/app/local.properties | 8 + .../symeda/sormas/app/BaseEditActivity.java | 2 +- .../symeda/sormas/app/backend/caze/Case.java | 29 +- .../app/backend/caze/CaseDtoHelper.java | 6 +- .../app/backend/common/DatabaseHelper.java | 47 +- .../sormas/app/backend/contact/Contact.java | 4 +- .../app/backend/contact/ContactDtoHelper.java | 2 +- .../sormas/app/backend/epidata/EpiData.java | 10 + .../app/backend/epidata/EpiDataDtoHelper.java | 2 + .../sormas/app/backend/location/Location.java | 19 + .../backend/location/LocationDtoHelper.java | 2 + .../sormas/app/backend/person/Person.java | 33 +- .../app/backend/person/PersonDtoHelper.java | 6 + .../sormas/app/backend/sample/Sample.java | 81 ++ .../app/backend/sample/SampleDtoHelper.java | 11 + .../app/caze/edit/CaseEditFragment.java | 188 +++-- .../edit/CaseEditHospitalizationFragment.java | 9 + .../sormas/app/caze/edit/CaseNewFragment.java | 55 +- .../app/caze/read/CaseReadFragment.java | 39 +- .../de/symeda/sormas/app/component/Item.java | 2 + .../controls/ControlPropertyField.java | 1 + .../app/component/dialog/LocationDialog.java | 54 ++ .../app/epidata/EpiDataFragmentHelper.java | 9 + .../EpidemiologicalDataEditFragment.java | 14 + .../app/person/PersonContactDetailDialog.java | 18 +- .../app/person/edit/PersonEditFragment.java | 62 +- .../app/sample/edit/SampleEditFragment.java | 125 ++- .../app/symptoms/SymptomsEditFragment.java | 19 + .../res/layout/dialog_location_layout.xml | 6 + .../dialog_select_or_create_person_layout.xml | 5 + .../res/layout/fragment_case_edit_layout.xml | 24 +- .../res/layout/fragment_case_new_layout.xml | 28 +- .../res/layout/fragment_case_read_layout.xml | 13 + .../layout/fragment_contact_new_layout.xml | 8 + .../layout/fragment_contact_read_layout.xml | 12 +- .../layout/fragment_person_edit_layout.xml | 20 + .../layout/fragment_person_read_layout.xml | 10 + .../layout/fragment_sample_edit_layout.xml | 52 ++ .../src/main/res/values-en-rGH/strings.xml | 4 +- .../app/src/main/res/values/strings.xml | 2 + sormas-app/gradle/wrapper/gradle-wrapper.jar | Bin 53636 -> 59536 bytes .../gradle/wrapper/gradle-wrapper.properties | 3 +- sormas-app/gradlew | 291 ++++--- sormas-app/gradlew.bat | 53 +- .../de/symeda/sormas/backend/caze/Case.java | 138 ++- .../sormas/backend/caze/CaseFacadeEjb.java | 62 +- .../symeda/sormas/backend/caze/CaseJoins.java | 10 + .../sormas/backend/caze/CaseService.java | 7 + .../caze/caseimport/CaseImportFacadeEjb.java | 15 + .../CaseClassificationFacadeEjb.java | 2 +- .../SurveillanceReport.java | 11 + .../SurveillanceReportFacadeEjb.java | 2 + .../common/StartupShutdownService.java | 3 +- .../sormas/backend/epidata/EpiData.java | 71 +- .../backend/epidata/EpiDataFacadeEjb.java | 8 + .../sormas/backend/event/EventService.java | 4 + .../sormas/backend/exposure/Exposure.java | 128 +-- .../hospitalization/Hospitalization.java | 190 ++++- .../HospitalizationFacadeEjb.java | 33 + .../PreviousHospitalization.java | 19 +- .../backend/importexport/ImportFacadeEjb.java | 3 + .../infrastructure/facility/Facility.java | 19 + .../facility/FacilityFacadeEjb.java | 91 +- .../facility/FacilityService.java | 80 ++ .../sormas/backend/location/Location.java | 12 + .../backend/location/LocationFacadeEjb.java | 1 + .../symeda/sormas/backend/person/Person.java | 22 +- .../backend/person/PersonFacadeEjb.java | 4 + .../symeda/sormas/backend/sample/Sample.java | 751 ++++++++++++++++- .../backend/sample/SampleFacadeEjb.java | 186 +++- .../sormas/backend/sample/SampleService.java | 4 + .../sormas/backend/sixtyday/SixtyDay.java | 238 ++++++ .../backend/sixtyday/SixtyDayFacadeEjb.java | 112 +++ .../backend/sixtyday/SixtyDayService.java | 23 + .../entities/caze/CaseShareDataBuilder.java | 1 + .../sormas/backend/symptoms/Symptoms.java | 84 +- .../backend/symptoms/SymptomsFacadeEjb.java | 16 + .../main/resources/META-INF/persistence.xml | 1 + .../src/main/resources/sql/sormas_schema.sql | 263 ++++++ .../sormas/backend/AbstractBeanTest.java | 5 + .../sormas/backend/TestDataCreator.java | 10 +- .../bagexport/BAGExportFacadeEjbTest.java | 2 +- .../caze/CaseClassificationLogicTest.java | 105 +-- .../CaseFacadeEjbPseudonymizationTest.java | 4 +- .../backend/caze/CaseFacadeEjbTest.java | 29 +- .../backend/contact/ContactFacadeEjbTest.java | 15 +- .../epidata/EpiDataPseudonymizationTest.java | 3 +- .../ExternalMessageServiceTest.java | 4 +- .../facility/FacilityFacadeEjbTest.java | 5 +- .../facility/FacilityServiceTest.java | 13 +- .../sample/PathogenTestFacadeEjbTest.java | 4 +- .../SampleFacadeEjbPseudonymizationTest.java | 2 +- .../backend/sample/SampleFacadeEjbTest.java | 46 +- .../sormastosormas/SormasToSormasTest.java | 2 +- .../SormasToSormasCaseFacadeEjbTest.java | 7 +- .../SormasToSormasContactFacadeEjbTest.java | 3 +- .../SormasToSormasEventFacadeEjbTest.java | 6 +- .../sormas/backend/util/DtoHelperTest.java | 4 +- .../ui/ActivityAsCase/ActivityAsCaseForm.java | 2 + .../sormas/ui/caze/AbstractCaseView.java | 20 +- .../sormas/ui/caze/AbstractTableField.java | 2 + .../sormas/ui/caze/BulkCaseDataForm.java | 12 +- .../symeda/sormas/ui/caze/CaseController.java | 70 +- .../symeda/sormas/ui/caze/CaseCreateForm.java | 203 ++++- .../symeda/sormas/ui/caze/CaseDataForm.java | 258 ++++-- .../symeda/sormas/ui/caze/CaseFilterForm.java | 49 +- .../linelisting/LineListingLayout.java | 31 +- .../sormas/ui/configuration/DevModeView.java | 18 +- .../infrastructure/FacilitiesView.java | 18 +- .../sormas/ui/contact/ContactController.java | 7 +- .../dashboard/map/DashboardMapComponent.java | 6 +- .../symeda/sormas/ui/epidata/EpiDataForm.java | 50 +- .../sormas/ui/exposure/ExposuresField.java | 7 +- .../hospitalization/HospitalizationForm.java | 197 ++++- .../filter/ImmunizationFilterForm.java | 13 +- .../form/ImmunizationCreationForm.java | 5 +- .../components/form/ImmunizationDataForm.java | 6 +- .../sormas/ui/importer/DataImporter.java | 13 + .../sormas/ui/location/LocationEditForm.java | 75 +- .../person/PersonContactDetailEditForm.java | 9 +- .../ui/person/PersonContactDetailsField.java | 2 +- .../sormas/ui/person/PersonCreateForm.java | 3 +- .../sormas/ui/person/PersonEditForm.java | 72 +- .../sormas/ui/samples/AbstractSampleForm.java | 506 +++++++++-- .../sormas/ui/samples/PathogenTestForm.java | 22 +- .../sormas/ui/samples/SampleController.java | 5 +- .../SixtyDayFollowupView.java | 25 + .../ui/sixtydayfollowup/SixtyDayForm.java | 153 ++++ .../StatisticsFilterJurisdictionElement.java | 9 +- .../StatisticsFilterValuesElement.java | 8 +- .../sormas/ui/symptoms/SymptomsForm.java | 278 ++++-- .../symeda/sormas/ui/FacadeProviderMock.java | 4 + .../de/symeda/sormas/ui/TestDataCreator.java | 4 +- ...GermanCaseClassificationValidatorTest.java | 2 +- .../ui/caze/importer/CaseImporterTest.java | 4 +- .../AbstractLabMessageProcessingFlowTest.java | 14 +- .../RelatedLabMessageHandlerTest.java | 6 +- .../ui/importexport/ImportExportTest.java | 5 +- .../ui/samples/SampleControllerTest.java | 2 +- 203 files changed, 8413 insertions(+), 1311 deletions(-) create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/DhimsFacility.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/sixtyday/SixtyDayDto.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/sixtyday/SixtyDayFacade.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/AFPClassification.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/Antibiogram.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/CSMVaccines.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/CsfAppearance.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/CsfReason.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/Gram.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/HospOut.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/IpResult.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/LabTest.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/LabType.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/LatexCulture.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/NormalWasted.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/ParalysisSite.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/PosNeg.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/SampleContainerUsed.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/SymptomLevel.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/TypeOfAbode.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/YellowFeverSample.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/YesNo.java create mode 100644 sormas-api/src/main/java/de/symeda/sormas/api/utils/pseudonymization/SampleDispatchMode.java create mode 100644 sormas-app/app/local.properties create mode 100644 sormas-backend/src/main/java/de/symeda/sormas/backend/sixtyday/SixtyDay.java create mode 100644 sormas-backend/src/main/java/de/symeda/sormas/backend/sixtyday/SixtyDayFacadeEjb.java create mode 100644 sormas-backend/src/main/java/de/symeda/sormas/backend/sixtyday/SixtyDayService.java create mode 100644 sormas-ui/src/main/java/de/symeda/sormas/ui/sixtydayfollowup/SixtyDayFollowupView.java create mode 100644 sormas-ui/src/main/java/de/symeda/sormas/ui/sixtydayfollowup/SixtyDayForm.java diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/Disease.java b/sormas-api/src/main/java/de/symeda/sormas/api/Disease.java index 7f705054b18..bcc00ae08f5 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/Disease.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/Disease.java @@ -21,13 +21,14 @@ import java.util.List; import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.sample.PathogenTestType; import de.symeda.sormas.api.statistics.StatisticsGroupingKey; public enum Disease implements StatisticsGroupingKey { - AFP(true, true, true, false, 0, true, false, false), + AFP(true, true, true, false, 60, true, false, false), CHOLERA(true, true, true, true, 5, true, false, false), CONGENITAL_RUBELLA(true, true, true, true, 21, true, false, false), CSM(true, true, true, false, 10, true, false, false), @@ -82,12 +83,14 @@ public enum Disease M_PNEUMONIAE(true, false, true, false, 0, true, false, false), C_PNEUMONIAE(true, false, true, false, 0, true, false, false), ARI(true, false, false, false, 0, true, false, false), - CHIKUNGUNYA(true, false, false, false, 0, true, false, false), + CHIKUNGUNYA(true, true, true, false, 0, true, false, false), POST_IMMUNIZATION_ADVERSE_EVENTS_MILD(true, false, false, false, 0, true, false, false), POST_IMMUNIZATION_ADVERSE_EVENTS_SEVERE(true, false, false, false, 0, true, false, false), FHA(true, false, false, false, 0, true, false, false), AHF(true, true, true, true, 21, true, false, false), OTHER(true, true, true, true, 21, false, false, false), + ZIKA(true, true, true, false, 6, true, false, false), + MARBURG(true, true, true, false, 0, true, false, false), UNDEFINED(true, true, true, true, 0, false, false, false); private final boolean defaultActive; @@ -194,4 +197,14 @@ public int keyCompareTo(StatisticsGroupingKey o) { } public static List DISEASE_LIST = Arrays.asList(Disease.values()); + public static final List AHF_DISEASES = Arrays.asList( + EVD, + MARBURG, + LASSA, + DENGUE, + CHIKUNGUNYA, + ZIKA, + YELLOW_FEVER + ); + } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/FacadeProvider.java b/sormas-api/src/main/java/de/symeda/sormas/api/FacadeProvider.java index f1f28cee814..e913e6a72ca 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/FacadeProvider.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/FacadeProvider.java @@ -80,6 +80,7 @@ import de.symeda.sormas.api.sample.PathogenTestFacade; import de.symeda.sormas.api.sample.SampleFacade; import de.symeda.sormas.api.share.ExternalShareInfoFacade; +import de.symeda.sormas.api.sixtyday.SixtyDayFacade; import de.symeda.sormas.api.sormastosormas.SormasToSormasEncryptionFacade; import de.symeda.sormas.api.sormastosormas.SormasToSormasFacade; import de.symeda.sormas.api.sormastosormas.caze.SormasToSormasCaseFacade; @@ -248,6 +249,10 @@ public static HospitalizationFacade getHospitalizationFacade() { return get().lookupEjbRemote(HospitalizationFacade.class); } + public static SixtyDayFacade getSixtyDayFacade() { + return get().lookupEjbRemote(SixtyDayFacade.class); + } + public static EpiDataFacade getEpiDataFacade() { return get().lookupEjbRemote(EpiDataFacade.class); } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseBulkEditData.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseBulkEditData.java index db5a48322aa..e260d35f821 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseBulkEditData.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseBulkEditData.java @@ -28,6 +28,7 @@ import de.symeda.sormas.api.i18n.Validations; import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; import de.symeda.sormas.api.infrastructure.facility.FacilityType; import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto; @@ -57,6 +58,7 @@ public class CaseBulkEditData extends EntityDto { public static final String HEALTH_FACILITY = "healthFacility"; public static final String HEALTH_FACILITY_DETAILS = "healthFacilityDetails"; public static final String FACILITY_TYPE = "facilityType"; + public static final String DHIMS_FACILITY_TYPE = "dhimsFacilityType"; public static final String DONT_SHARE_WITH_REPORTING_TOOL = "dontShareWithReportingTool"; private Disease disease; @@ -74,6 +76,7 @@ public class CaseBulkEditData extends EntityDto { private DistrictReferenceDto district; private CommunityReferenceDto community; private FacilityType facilityType; + private DhimsFacility dhimsFacilityType; private FacilityReferenceDto healthFacility; @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String healthFacilityDetails; @@ -191,6 +194,14 @@ public void setFacilityType(FacilityType facilityType) { this.facilityType = facilityType; } + public DhimsFacility getDhimsFacilityType() { + return dhimsFacilityType; + } + + public void setDhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + } + public FacilityReferenceDto getHealthFacility() { return healthFacility; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseClassification.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseClassification.java index 4e07522ead7..2c11631d2c6 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseClassification.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseClassification.java @@ -17,12 +17,11 @@ *******************************************************************************/ package de.symeda.sormas.api.caze; -import java.util.Collections; -import java.util.EnumSet; -import java.util.Set; +import java.util.*; import de.symeda.sormas.api.i18n.I18nProperties; import de.symeda.sormas.api.statistics.StatisticsGroupingKey; +import de.symeda.sormas.api.utils.LatexCulture; public enum CaseClassification implements @@ -81,4 +80,7 @@ public static Set getConfirmedClassifications() { return Collections.unmodifiableSet( EnumSet.of(CaseClassification.CONFIRMED, CaseClassification.CONFIRMED_NO_SYMPTOMS, CaseClassification.CONFIRMED_UNKNOWN_SYMPTOMS)); } + + public static final List CASE_CLASSIFY = Arrays.asList( + CONFIRMED, PROBABLE, SUSPECT); } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseCriteria.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseCriteria.java index 893dd6ce517..4894b518c59 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseCriteria.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseCriteria.java @@ -26,6 +26,7 @@ import de.symeda.sormas.api.disease.DiseaseVariant; import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; import de.symeda.sormas.api.infrastructure.facility.FacilityType; import de.symeda.sormas.api.infrastructure.facility.FacilityTypeGroup; @@ -76,6 +77,7 @@ public class CaseCriteria extends CriteriaWithDateType implements ExternalShareC public static final String REINFECTION_STATUS = "reinfectionStatus"; public static final String FACILITY_TYPE_GROUP = "facilityTypeGroup"; public static final String FACILITY_TYPE = "facilityType"; + public static final String DHIMS_FACILITY_TYPE = "dhimsFacilityType"; public static final String AFP_FACILITY_OPTIONS = "afpFacilityOptions"; public static final String INCLUDE_CASES_FROM_OTHER_JURISDICTIONS = "includeCasesFromOtherJurisdictions"; public static final String ONLY_CONTACTS_FROM_OTHER_INSTANCES = "onlyContactsFromOtherInstances"; @@ -143,6 +145,7 @@ public class CaseCriteria extends CriteriaWithDateType implements ExternalShareC private Date reportDateTo; private FacilityTypeGroup facilityTypeGroup; private FacilityType facilityType; + private DhimsFacility dhimsFacilityType; private AFPFacilityOptions afpFacilityOptions; private Boolean includeCasesFromOtherJurisdictions = Boolean.FALSE; private Boolean onlyContactsFromOtherInstances; @@ -672,6 +675,14 @@ public void setFacilityType(FacilityType type) { this.facilityType = type; } + public DhimsFacility getDhimsFacilityType() { + return dhimsFacilityType; + } + + public void setDhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + } + public AFPFacilityOptions getAfpFacilityOptions() { return afpFacilityOptions; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java index 19d3adbf71c..03bb0032165 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseDataDto.java @@ -29,6 +29,8 @@ import javax.validation.constraints.Min; import javax.validation.constraints.Size; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; +import de.symeda.sormas.api.sixtyday.SixtyDayDto; import de.symeda.sormas.api.utils.*; import org.apache.commons.lang3.StringUtils; @@ -107,6 +109,7 @@ public class CaseDataDto extends SormasToSormasShareableDto { public static final String DISTRICT = "district"; public static final String COMMUNITY = "community"; public static final String HEALTH_FACILITY = "healthFacility"; + public static final String HOME_ADDRESS_RECREATIONAL = "homeAddressRecreational"; public static final String HEALTH_FACILITY_DETAILS = "healthFacilityDetails"; public static final String REPORTING_USER = "reportingUser"; public static final String REPORT_DATE = "reportDate"; @@ -117,6 +120,7 @@ public class CaseDataDto extends SormasToSormasShareableDto { public static final String SURVEILLANCE_OFFICER = "surveillanceOfficer"; public static final String SYMPTOMS = "symptoms"; public static final String HOSPITALIZATION = "hospitalization"; + public static final String SIXTY_DAY = "sixtyDay"; public static final String EPI_DATA = "epiData"; public static final String THERAPY = "therapy"; public static final String CLINICAL_COURSE = "clinicalCourse"; @@ -128,6 +132,8 @@ public class CaseDataDto extends SormasToSormasShareableDto { public static final String IPSAMPLERESULTS = "ipSampleResults"; public static final String VACCINATION_STATUS = "vaccinationStatus"; public static final String VACCINATION_TYPE = "vaccinationType"; + public static final String VACCINE_TYPE = "vaccineType"; + public static final String NUMBER_OF_DOSES = "numberOfDoses"; public static final String VACCINATION_DATE = "vaccinationDate"; public static final String SMALLPOX_VACCINATION_SCAR = "smallpoxVaccinationScar"; public static final String SMALLPOX_VACCINATION_RECEIVED = "smallpoxVaccinationReceived"; @@ -136,6 +142,11 @@ public class CaseDataDto extends SormasToSormasShareableDto { public static final String REPORT_LAT = "reportLat"; public static final String REPORT_LON = "reportLon"; public static final String REPORT_LAT_LON_ACCURACY = "reportLatLonAccuracy"; + public static final String REPORTING_OFFICER_NAME = "reportingOfficerName"; + public static final String REPORTING_OFFICER_TITLE = "reportingOfficerTitle"; + public static final String FUNCTION_OF_REPORTING_OFFICER = "functionOfReportingOfficer"; + public static final String REPORTING_OFFICER_CONTACT_PHONE = "reportingOfficerContactPhone"; + public static final String REPORTING_OFFICER_EMAIL = "reportingOfficerEmail"; public static final String OUTCOME = "outcome"; public static final String OUTCOME_DATE = "outcomeDate"; public static final String SEQUELAE = "sequelae"; @@ -148,6 +159,7 @@ public class CaseDataDto extends SormasToSormasShareableDto { public static final String CASE_ORIGIN = "caseOrigin"; public static final String POINT_OF_ENTRY = "pointOfEntry"; public static final String POINT_OF_ENTRY_DETAILS = "pointOfEntryDetails"; + public static final String HOSPITAL_NAME = "hospitalName"; public static final String ADDITIONAL_DETAILS = "additionalDetails"; public static final String EXTERNAL_ID = "externalID"; public static final String EXTERNAL_TOKEN = "externalToken"; @@ -180,6 +192,7 @@ public class CaseDataDto extends SormasToSormasShareableDto { public static final String FOLLOW_UP_UNTIL = "followUpUntil"; public static final String VISITS = "visits"; public static final String FACILITY_TYPE = "facilityType"; + public static final String DHIMS_FACILITY_TYPE = "dhimsFacilityType"; public static final String AFP_FACILITY_OPTIONS = "afpFacilityOptions"; public static final String CASE_ID_ISM = "caseIdIsm"; public static final String CONTACT_TRACING_FIRST_CONTACT_TYPE = "contactTracingFirstContactType"; @@ -329,6 +342,7 @@ public class CaseDataDto extends SormasToSormasShareableDto { @PersonalData(mandatoryField = true) @SensitiveData(mandatoryField = true) private FacilityType facilityType; + private DhimsFacility dhimsFacilityType; private AFPFacilityOptions afpFacilityOptions; @Outbreaks @@ -345,7 +359,7 @@ public class CaseDataDto extends SormasToSormasShareableDto { @Valid private HealthConditionsDto healthConditions; - private YesNoUnknown pregnant; + private YesNo pregnant; private YesNoUnknown ipSampleSent; private Disease ipSampleResults; @Diseases({ @@ -386,6 +400,14 @@ public class CaseDataDto extends SormasToSormasShareableDto { @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) @DependingOnUserRight(UserRight.CASE_CLINICIAN_VIEW) private String clinicianEmail; + + private String reportingOfficerName; + private String reportingOfficerTitle; + private String functionOfReportingOfficer; + private String reportingOfficerContactPhone; + private String reportingOfficerEmail; + private String homeAddressRecreational; + private String hospitalName; @Diseases({ Disease.CONGENITAL_RUBELLA }) private HospitalWardType notifyingClinic; @@ -411,6 +433,8 @@ public class CaseDataDto extends SormasToSormasShareableDto { @Valid private HospitalizationDto hospitalization; @Valid + private SixtyDayDto sixtyDay; + @Valid private SymptomsDto symptoms; @Valid private EpiDataDto epiData; @@ -501,13 +525,15 @@ public class CaseDataDto extends SormasToSormasShareableDto { COUNTRY_CODE_GERMANY, COUNTRY_CODE_SWITZERLAND }) private Date quarantineOfficialOrderSentDate; - private YesNoUnknown postpartum; + private YesNo postpartum; private Trimester trimester; private FollowUpStatus followUpStatus; @Size(max = CHARACTER_LIMIT_BIG, message = Validations.textTooLong) private String followUpComment; private Date followUpUntil; private boolean overwriteFollowUpUntil; + private CSMVaccines vaccineType; + private String numberOfDoses; @HideForCountriesExcept(countries = COUNTRY_CODE_SWITZERLAND) private Integer caseIdIsm; @@ -605,6 +631,7 @@ public static CaseDataDto build(PersonReferenceDto person, Disease disease, Heal caze.setUuid(DataHelper.createUuid()); caze.setPerson(person); caze.setHospitalization(HospitalizationDto.build()); + caze.setSixtyDay(SixtyDayDto.build()); caze.setEpiData(EpiDataDto.build()); caze.setSymptoms(SymptomsDto.build()); caze.setTherapy(TherapyDto.build()); @@ -614,7 +641,7 @@ public static CaseDataDto build(PersonReferenceDto person, Disease disease, Heal caze.setPortHealthInfo(PortHealthInfoDto.build()); caze.setDisease(disease); caze.setInvestigationStatus(InvestigationStatus.PENDING); - caze.setCaseClassification(CaseClassification.NOT_CLASSIFIED); + caze.setCaseClassification(CaseClassification.SUSPECT); caze.setOutcome(CaseOutcome.NO_OUTCOME); caze.setCaseOrigin(CaseOrigin.IN_COUNTRY); // TODO This is a workaround for transferring the followup comment while converting a contact to a case. This can be removed if the followup for cases is implemented in the mobile app @@ -941,6 +968,33 @@ public void setClinicianEmail(String clinicianEmail) { this.clinicianEmail = clinicianEmail; } + public String getReportingOfficerTitle() {return reportingOfficerTitle;} + + public void setReportingOfficerTitle(String reportingOfficerTitle) { + this.reportingOfficerTitle = reportingOfficerTitle; + } + + public String getReportingOfficerName() {return reportingOfficerName;} + + public void setReportingOfficerName(String reportingOfficerName) { + this.reportingOfficerName = reportingOfficerName; + } + public String getFunctionOfReportingOfficer() {return functionOfReportingOfficer;} + + public void setFunctionOfReportingOfficer(String functionOfReportingOfficer) { + this.functionOfReportingOfficer = functionOfReportingOfficer; + } + public String getReportingOfficerContactPhone() {return reportingOfficerContactPhone;} + + public void setReportingOfficerContactPhone(String reportingOfficerContactPhone) { + this.reportingOfficerContactPhone = reportingOfficerContactPhone; + } + public String getReportingOfficerEmail() {return reportingOfficerEmail;} + + public void setReportingOfficerEmail(String reportingOfficerEmail) { + this.reportingOfficerEmail = reportingOfficerEmail; + } + @Deprecated public UserReferenceDto getCaseOfficer() { return caseOfficer; @@ -1023,6 +1077,14 @@ public void setHospitalization(HospitalizationDto hospitalization) { this.hospitalization = hospitalization; } + public SixtyDayDto getSixtyDay() { + return sixtyDay; + } + + public void setSixtyDay(SixtyDayDto sixtyDay) { + this.sixtyDay = sixtyDay; + } + public EpiDataDto getEpiData() { return epiData; } @@ -1063,11 +1125,11 @@ public void setPortHealthInfo(PortHealthInfoDto portHealthInfo) { this.portHealthInfo = portHealthInfo; } - public YesNoUnknown getPregnant() { + public YesNo getPregnant() { return pregnant; } - public void setPregnant(YesNoUnknown pregnant) { + public void setPregnant(YesNo pregnant) { this.pregnant = pregnant; } @@ -1440,11 +1502,11 @@ public void setQuarantineOfficialOrderSentDate(Date quarantineOfficialOrderSentD this.quarantineOfficialOrderSentDate = quarantineOfficialOrderSentDate; } - public YesNoUnknown getPostpartum() { + public YesNo getPostpartum() { return postpartum; } - public void setPostpartum(YesNoUnknown postpartum) { + public void setPostpartum(YesNo postpartum) { this.postpartum = postpartum; } @@ -1456,6 +1518,22 @@ public void setTrimester(Trimester trimester) { this.trimester = trimester; } + public CSMVaccines getVaccineType() { + return vaccineType; + } + + public void setVaccineType(CSMVaccines vaccineType) { + this.vaccineType = vaccineType; + } + + public String getNumberOfDoses() { + return numberOfDoses; + } + + public void setNumberOfDoses(String numberOfDoses) { + this.numberOfDoses = numberOfDoses; + } + public FollowUpStatus getFollowUpStatus() { return followUpStatus; } @@ -1496,6 +1574,13 @@ public void setFacilityType(FacilityType facilityType) { this.facilityType = facilityType; } + public DhimsFacility getDhimsFacilityType() { + return dhimsFacilityType; + } + public void setDhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + } + public AFPFacilityOptions getAfpFacilityOptions(){return afpFacilityOptions;} public void setAfpFacilityOptions(AFPFacilityOptions afpFacilityOptions){this.afpFacilityOptions = afpFacilityOptions;} @@ -1777,4 +1862,20 @@ public TransmissionClassification getCaseTransmissionClassification() { public void setCaseTransmissionClassification(TransmissionClassification caseTransmissionClassification) { this.caseTransmissionClassification = caseTransmissionClassification; } + + public String getHomeAddressRecreational() { + return homeAddressRecreational; + } + + public void setHomeAddressRecreational(String homeAddressRecreational) { + this.homeAddressRecreational = homeAddressRecreational; + } + + public String getHospitalName() { + return hospitalName; + } + + public void setHospitalName(String hospitalName) { + this.hospitalName = hospitalName; + } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseExportDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseExportDto.java index d25c58ec291..566c2ffc0b6 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseExportDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseExportDto.java @@ -24,6 +24,7 @@ import java.util.Map; import java.util.Set; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import de.symeda.sormas.api.utils.*; import org.apache.commons.lang3.StringUtils; @@ -113,6 +114,7 @@ public class CaseExportDto implements Serializable { private long personId; private long epiDataId; private long hospitalizationId; + private long sixtyDayId; private long symptomsId; private long healthConditionsId; private String uuid; @@ -146,6 +148,7 @@ public class CaseExportDto implements Serializable { @SensitiveData private String community; private FacilityType facilityType; + private DhimsFacility dhimsFacilityType; private AFPFacilityOptions afpFacilityOptions; @PersonalData @SensitiveData @@ -329,6 +332,11 @@ public class CaseExportDto implements Serializable { @DependingOnUserRight(UserRight.CASE_CLINICIAN_VIEW) private String clinicianEmail; + private String reportingOfficerTitle; + private String functionOfReportingOfficer; + private String reportingOfficerContactPhone; + private String reportingOfficerEmail; + private Long reportingUserId; private Long followUpStatusChangeUserId; @@ -345,12 +353,12 @@ public class CaseExportDto implements Serializable { //@formatter:off @SuppressWarnings("unchecked") public CaseExportDto(long id, long personId, Double personAddressLatitude, Double personAddressLongitude, Float personAddressLatLonAcc, long epiDataId, long symptomsId, - long hospitalizationId, long healthConditionsId, String uuid, String epidNumber, + long hospitalizationId, long sixtyDayId, long healthConditionsId, String uuid, String epidNumber, Disease disease, DiseaseVariant diseaseVariant, String diseaseDetails, String diseaseVariantDetails, String personUuid, String firstName, String lastName, String otherName, Salutation salutation, String otherSalutation, Sex sex, YesNoUnknown pregnant, Integer approximateAge, ApproximateAgeType approximateAgeType, Integer birthdateDD, Integer birthdateMM, Integer birthdateYYYY, Date reportDate, String region, String district, String community, - FacilityType facilityType, AFPFacilityOptions afpFacilityOptions, String healthFacility, String healthFacilityUuid, String healthFacilityDetails, String pointOfEntry, + FacilityType facilityType, DhimsFacility dhimsFacilityType, AFPFacilityOptions afpFacilityOptions, String healthFacility, String healthFacilityUuid, String healthFacilityDetails, String pointOfEntry, String pointOfEntryUuid, String pointOfEntryDetails, CaseClassification caseClassification, YesNoUnknown clinicalConfirmation, YesNoUnknown epidemiologicalConfirmation, YesNoUnknown laboratoryDiagnosticConfirmation, Boolean notACaseReasonNegativeTest, Boolean notACaseReasonPhysicianInformation, Boolean notACaseReasonDifferentPathogen, Boolean notACaseReasonOther, @@ -384,6 +392,8 @@ public CaseExportDto(long id, long personId, Double personAddressLatitude, Doubl String responsibleRegion, String responsibleDistrict, String responsibleCommunity, // clinician String clinicianName, String clinicianPhone, String clinicianEmail, + // reporting officer + String reportingOfficerTitle, String functionOfReportingOfficer, String reportingOfficerContactPhone, String reportingOfficerEmail, // users Long reportingUserId, Long followUpStatusChangeUserId, Date previousQuarantineTo, String quarantineChangeComment, @@ -397,6 +407,7 @@ public CaseExportDto(long id, long personId, Double personAddressLatitude, Doubl this.epiDataId = epiDataId; this.symptomsId = symptomsId; this.hospitalizationId = hospitalizationId; + this.sixtyDayId = sixtyDayId; this.healthConditionsId = healthConditionsId; this.uuid = uuid; this.epidNumber = epidNumber; @@ -459,6 +470,7 @@ public CaseExportDto(long id, long personId, Double personAddressLatitude, Doubl this.quarantineOfficialOrderSent = quarantineOfficialOrderSent; this.quarantineOfficialOrderSentDate = quarantineOfficialOrderSentDate; this.facilityType = facilityType; + this.dhimsFacilityType = dhimsFacilityType; this.afpFacilityOptions = afpFacilityOptions; this.healthFacility = FacilityHelper.buildFacilityString(healthFacilityUuid, healthFacility); this.healthFacilityDetails = healthFacilityDetails; @@ -520,6 +532,11 @@ public CaseExportDto(long id, long personId, Double personAddressLatitude, Doubl this.clinicianPhone = clinicianPhone; this.clinicianEmail = clinicianEmail; + this.reportingOfficerTitle = reportingOfficerTitle; + this.functionOfReportingOfficer = functionOfReportingOfficer; + this.reportingOfficerContactPhone = reportingOfficerContactPhone; + this.reportingOfficerEmail = reportingOfficerEmail; + this.reportingUserId = reportingUserId; this.followUpStatusChangeUserId = followUpStatusChangeUserId; @@ -576,6 +593,9 @@ public void setSymptomsId(long symptomsId) { public long getHospitalizationId() { return hospitalizationId; } + public long getSixtyDayId() { + return sixtyDayId; + } @Order(2) @ExportTarget(caseExportTypes = { @@ -2378,6 +2398,56 @@ public AFPFacilityOptions getAfpFacilityOptions() { return afpFacilityOptions; } + @Order(181) + @ExportTarget(caseExportTypes = { + CaseExportType.CASE_SURVEILLANCE, + CaseExportType.CASE_MANAGEMENT }) + @ExportProperty(CaseDataDto.DHIMS_FACILITY_TYPE) + @ExportGroup(ExportGroupType.CORE) + public DhimsFacility getDhimsFacilityType() { + return dhimsFacilityType; + } + + @Order(182) + @ExportTarget(caseExportTypes = { + CaseExportType.CASE_SURVEILLANCE, + CaseExportType.CASE_MANAGEMENT }) + @ExportProperty(CaseDataDto.REPORTING_OFFICER_TITLE) + @ExportGroup(ExportGroupType.ADDITIONAL) + public String getReportingOfficerTitle() { + return reportingOfficerTitle; + } + + @Order(183) + @ExportTarget(caseExportTypes = { + CaseExportType.CASE_SURVEILLANCE, + CaseExportType.CASE_MANAGEMENT }) + @ExportProperty(CaseDataDto.REPORTING_OFFICER_TITLE) + @ExportGroup(ExportGroupType.ADDITIONAL) + public String getFunctionOfReportingOfficer() { + return functionOfReportingOfficer; + } + + @Order(184) + @ExportTarget(caseExportTypes = { + CaseExportType.CASE_SURVEILLANCE, + CaseExportType.CASE_MANAGEMENT }) + @ExportProperty(CaseDataDto.REPORTING_OFFICER_TITLE) + @ExportGroup(ExportGroupType.ADDITIONAL) + public String getReportingOfficerContactPhone() { + return reportingOfficerContactPhone; + } + + @Order(185) + @ExportTarget(caseExportTypes = { + CaseExportType.CASE_SURVEILLANCE, + CaseExportType.CASE_MANAGEMENT }) + @ExportProperty(CaseDataDto.REPORTING_OFFICER_TITLE) + @ExportGroup(ExportGroupType.ADDITIONAL) + public String getReportingOfficerEmail() { + return reportingOfficerEmail; + } + public void setFollowUpStatusChangeUserRoles(Set roles) { this.followUpStatusChangeUserRoles = StringUtils.join(roles, ", "); } @@ -2426,6 +2496,8 @@ public void setHospitalizationId(long hospitalizationId) { this.hospitalizationId = hospitalizationId; } + public void setSixtyDayId(long sixtyDayId) {this.sixtyDayId = sixtyDayId;} + public void setUuid(String uuid) { this.uuid = uuid; } @@ -2461,6 +2533,7 @@ public void setBirthdate(BirthDateDto birthdate) { } public void setFacilityType(FacilityType facilityType) {this.facilityType = facilityType;} + public void setDhimsFacilityType(DhimsFacility dhimsFacilityType) {this.dhimsFacilityType = dhimsFacilityType;} public void setAfpFacilityOptions(AFPFacilityOptions afpFacilityOptions) {this.afpFacilityOptions = afpFacilityOptions;} @@ -2678,6 +2751,24 @@ public void setClinicianEmail(String clinicianEmail) { this.clinicianEmail = clinicianEmail; } + public void setReportingOfficerTitle(String reportingOfficerTitle) { + this.reportingOfficerTitle = reportingOfficerTitle; + } + + public void setFunctionOfReportingOfficer(String functionOfReportingOfficer) { + this.functionOfReportingOfficer = functionOfReportingOfficer; + } + + public void setReportingOfficerContactPhone(String reportingOfficerContactPhone) { + this.reportingOfficerContactPhone = reportingOfficerContactPhone; + } + + public void setReportingOfficerEmail(String reportingOfficerEmail) { + this.reportingOfficerEmail = reportingOfficerEmail; + } + + + public void setReportingUserId(Long reportingUserId) { this.reportingUserId = reportingUserId; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseLogic.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseLogic.java index a6b67530550..d29260ac007 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseLogic.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseLogic.java @@ -26,6 +26,7 @@ import java.util.Map; import java.util.regex.Pattern; +import de.symeda.sormas.api.utils.YesNo; import org.apache.commons.lang3.StringUtils; import de.symeda.sormas.api.EntityDto; @@ -126,7 +127,7 @@ public static void handleHospitalization(CaseDataDto caze, CaseDataDto oldCase, // therefore add the old hospitalization to the list of previous ones PreviousHospitalizationDto prevHosp = PreviousHospitalizationDto.build(oldCase); caze.getHospitalization().getPreviousHospitalizations().add(prevHosp); - caze.getHospitalization().setHospitalizedPreviously(YesNoUnknown.YES); + caze.getHospitalization().setHospitalizedPreviously(YesNo.YES); } // clear everything if a case is transferred or discharged from a hospital diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseOutcome.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseOutcome.java index 86bfbd0b4af..82b0f56405e 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseOutcome.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseOutcome.java @@ -28,7 +28,9 @@ public enum CaseOutcome DECEASED, RECOVERED, UNKNOWN, - ALIVE; + ALIVE, + REFERRED, + ON_TREATMENT; public String getName() { return this.name(); diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/caze/surveillancereport/SurveillanceReportDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/caze/surveillancereport/SurveillanceReportDto.java index 22b65dc855b..75c9fcee248 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/caze/surveillancereport/SurveillanceReportDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/caze/surveillancereport/SurveillanceReportDto.java @@ -16,6 +16,7 @@ package de.symeda.sormas.api.caze.surveillancereport; import de.symeda.sormas.api.feature.FeatureType; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import de.symeda.sormas.api.utils.DependingOnFeatureType; import java.util.Date; @@ -47,6 +48,7 @@ public class SurveillanceReportDto extends PseudonymizableDto { public static final String FACILITY_REGION = "facilityRegion"; public static final String FACILITY_DISTRICT = "facilityDistrict"; public static final String FACILITY_TYPE = "facilityType"; + public static final String DHIMS_FACILITY_TYPE = "dhimsFacilityType"; public static final String FACILITY = "facility"; public static final String FACILITY_DETAILS = "facilityDetails"; public static final String NOTIFICATION_DETAILS = "notificationDetails"; @@ -74,6 +76,7 @@ public static SurveillanceReportDto build(CaseReferenceDto caze, UserReferenceDt private DistrictReferenceDto facilityDistrict; private FacilityType facilityType; + private DhimsFacility dhimsFacilityType; private FacilityReferenceDto facility; @@ -143,6 +146,13 @@ public void setFacilityType(FacilityType facilityType) { this.facilityType = facilityType; } + public DhimsFacility getDhimsFacilityType() { + return dhimsFacilityType; + } + public void setDhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + } + public FacilityReferenceDto getFacility() { return facility; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/epidata/EpiDataDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/epidata/EpiDataDto.java index 0f65eee9774..ea9454a0cf3 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/epidata/EpiDataDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/epidata/EpiDataDto.java @@ -20,6 +20,8 @@ import java.util.ArrayList; import java.util.List; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; import javax.validation.Valid; import de.symeda.sormas.api.Disease; @@ -27,10 +29,7 @@ import de.symeda.sormas.api.activityascase.ActivityAsCaseDto; import de.symeda.sormas.api.exposure.ExposureDto; import de.symeda.sormas.api.feature.FeatureType; -import de.symeda.sormas.api.utils.DataHelper; -import de.symeda.sormas.api.utils.DependingOnFeatureType; -import de.symeda.sormas.api.utils.Diseases; -import de.symeda.sormas.api.utils.YesNoUnknown; +import de.symeda.sormas.api.utils.*; import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto; @DependingOnFeatureType(featureType = { @@ -44,6 +43,9 @@ public class EpiDataDto extends PseudonymizableDto { public static final String EXPOSURE_DETAILS_KNOWN = "exposureDetailsKnown"; public static final String ACTIVITY_AS_CASE_DETAILS_KNOWN = "activityAsCaseDetailsKnown"; + public static final String RECENT_TRAVEL_OUTBREAK = "recentTravelOutbreak"; + public static final String CONTACT_SIMILAR_SYMPTOMS = "contactSimilarOutbreak"; + public static final String CONTACT_SICK_ANIMALS = "contactSickAnimals"; public static final String CONTACT_WITH_SOURCE_CASE_KNOWN = "contactWithSourceCaseKnown"; public static final String EXPOSURES = "exposures"; public static final String ACTIVITIES_AS_CASE = "activitiesAsCase"; @@ -51,11 +53,16 @@ public class EpiDataDto extends PseudonymizableDto { public static final String HIGH_TRANSMISSION_RISK_AREA = "highTransmissionRiskArea"; public static final String LARGE_OUTBREAKS_AREA = "largeOutbreaksArea"; - private YesNoUnknown exposureDetailsKnown; - private YesNoUnknown activityAsCaseDetailsKnown; - private YesNoUnknown contactWithSourceCaseKnown; - private YesNoUnknown highTransmissionRiskArea; - private YesNoUnknown largeOutbreaksArea; + @Enumerated(EnumType.STRING) + private Disease disease; + private YesNo exposureDetailsKnown; + private YesNo activityAsCaseDetailsKnown; + private YesNo recentTravelOutbreak; + private YesNo contactSimilarOutbreak; + private YesNo contactSickAnimals; + private YesNo contactWithSourceCaseKnown; + private YesNo highTransmissionRiskArea; + private YesNo largeOutbreaksArea; @Diseases({ Disease.AFP, Disease.GUINEA_WORM, @@ -64,7 +71,7 @@ public class EpiDataDto extends PseudonymizableDto { Disease.POLIO, Disease.UNDEFINED, Disease.OTHER }) - private YesNoUnknown areaInfectedAnimals; + private YesNo areaInfectedAnimals; @Valid private List exposures = new ArrayList<>(); @@ -72,22 +79,46 @@ public class EpiDataDto extends PseudonymizableDto { @Valid private List activitiesAsCase = new ArrayList<>(); - public YesNoUnknown getExposureDetailsKnown() { + public YesNo getExposureDetailsKnown() { return exposureDetailsKnown; } - public void setExposureDetailsKnown(YesNoUnknown exposureDetailsKnown) { + public void setExposureDetailsKnown(YesNo exposureDetailsKnown) { this.exposureDetailsKnown = exposureDetailsKnown; } - public YesNoUnknown getActivityAsCaseDetailsKnown() { + public YesNo getActivityAsCaseDetailsKnown() { return activityAsCaseDetailsKnown; } - public void setActivityAsCaseDetailsKnown(YesNoUnknown activityAsCaseDetailsKnown) { + public void setActivityAsCaseDetailsKnown(YesNo activityAsCaseDetailsKnown) { this.activityAsCaseDetailsKnown = activityAsCaseDetailsKnown; } + public YesNo getRecentTravelOutbreak() { + return recentTravelOutbreak; + } + + public void setRecentTravelOutbreak(YesNo recentTravelOutbreak) { + this.recentTravelOutbreak = recentTravelOutbreak; + } + + public YesNo getContactSimilarOutbreak() { + return contactSimilarOutbreak; + } + + public void setContactSimilarOutbreak(YesNo contactSimilarOutbreak) { + this.contactSimilarOutbreak = contactSimilarOutbreak; + } + + public YesNo getContactSickAnimals() { + return contactSickAnimals; + } + + public void setContactSickAnimals(YesNo contactSickAnimals) { + this.contactSickAnimals = contactSickAnimals; + } + @ImportIgnore public List getExposures() { return exposures; @@ -106,38 +137,45 @@ public void setActivitiesAsCase(List activitiesAsCase) { this.activitiesAsCase = activitiesAsCase; } - public YesNoUnknown getContactWithSourceCaseKnown() { + public YesNo getContactWithSourceCaseKnown() { return contactWithSourceCaseKnown; } - public void setContactWithSourceCaseKnown(YesNoUnknown contactWithSourceCaseKnown) { + public void setContactWithSourceCaseKnown(YesNo contactWithSourceCaseKnown) { this.contactWithSourceCaseKnown = contactWithSourceCaseKnown; } - public YesNoUnknown getHighTransmissionRiskArea() { + public YesNo getHighTransmissionRiskArea() { return highTransmissionRiskArea; } - public void setHighTransmissionRiskArea(YesNoUnknown highTransmissionRiskArea) { + public void setHighTransmissionRiskArea(YesNo highTransmissionRiskArea) { this.highTransmissionRiskArea = highTransmissionRiskArea; } - public YesNoUnknown getLargeOutbreaksArea() { + public YesNo getLargeOutbreaksArea() { return largeOutbreaksArea; } - public void setLargeOutbreaksArea(YesNoUnknown largeOutbreaksArea) { + public void setLargeOutbreaksArea(YesNo largeOutbreaksArea) { this.largeOutbreaksArea = largeOutbreaksArea; } - public YesNoUnknown getAreaInfectedAnimals() { + public YesNo getAreaInfectedAnimals() { return areaInfectedAnimals; } - public void setAreaInfectedAnimals(YesNoUnknown areaInfectedAnimals) { + public void setAreaInfectedAnimals(YesNo areaInfectedAnimals) { this.areaInfectedAnimals = areaInfectedAnimals; } + public Disease getDisease() { + return disease; + } + public void setDisease(Disease disease) { + this.disease = disease; + } + public static EpiDataDto build() { EpiDataDto epiData = new EpiDataDto(); diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/event/EventCriteria.java b/sormas-api/src/main/java/de/symeda/sormas/api/event/EventCriteria.java index 3bfb417870b..eff9dc4597b 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/event/EventCriteria.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/event/EventCriteria.java @@ -28,6 +28,7 @@ import de.symeda.sormas.api.disease.DiseaseVariant; import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; import de.symeda.sormas.api.infrastructure.facility.FacilityType; import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto; @@ -40,6 +41,9 @@ import de.symeda.sormas.api.utils.criteria.CriteriaDateType; import de.symeda.sormas.api.utils.criteria.CriteriaWithDateType; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; + public class EventCriteria extends CriteriaWithDateType implements ExternalShareCriteria, Serializable { private static final long serialVersionUID = 2194071020732246594L; @@ -91,6 +95,7 @@ public class EventCriteria extends CriteriaWithDateType implements ExternalShare private TypeOfPlace typeOfPlace; private PersonReferenceDto person; private FacilityType facilityType; + private DhimsFacility dhimsFacilityType; private FacilityReferenceDto facility; private EventReferenceDto superordinateEvent; private EventGroupReferenceDto eventGroup; @@ -599,6 +604,18 @@ public EventCriteria facilityType(FacilityType facilityType) { this.facilityType = facilityType; return this; } + public DhimsFacility getDhimsFacilityType() { + return dhimsFacilityType; + } + + public void setDhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + } + + public EventCriteria dhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + return this; + } public FacilityReferenceDto getFacility() { return facility; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java index 713e77dad60..12e59717ae5 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java @@ -30,15 +30,7 @@ import de.symeda.sormas.api.i18n.Validations; import de.symeda.sormas.api.location.LocationDto; import de.symeda.sormas.api.user.UserReferenceDto; -import de.symeda.sormas.api.utils.DataHelper; -import de.symeda.sormas.api.utils.DependingOnFeatureType; -import de.symeda.sormas.api.utils.Diseases; -import de.symeda.sormas.api.utils.FieldConstraints; -import de.symeda.sormas.api.utils.HideForCountriesExcept; -import de.symeda.sormas.api.utils.PersonalData; -import de.symeda.sormas.api.utils.Required; -import de.symeda.sormas.api.utils.SensitiveData; -import de.symeda.sormas.api.utils.YesNoUnknown; +import de.symeda.sormas.api.utils.*; import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto; @DependingOnFeatureType(featureType = { @@ -141,20 +133,20 @@ public class ExposureDto extends PseudonymizableDto { private WorkEnvironment workEnvironment; // Details - private YesNoUnknown indoors; - private YesNoUnknown outdoors; - private YesNoUnknown wearingMask; - private YesNoUnknown wearingPpe; - private YesNoUnknown otherProtectiveMeasures; + private YesNo indoors; + private YesNo outdoors; + private YesNo wearingMask; + private YesNo wearingPpe; + private YesNo otherProtectiveMeasures; @SensitiveData @Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong) private String protectiveMeasuresDetails; - private YesNoUnknown shortDistance; - private YesNoUnknown longFaceToFaceContact; + private YesNo shortDistance; + private YesNo longFaceToFaceContact; @Diseases({ Disease.UNDEFINED, Disease.OTHER }) - private YesNoUnknown animalMarket; + private YesNo animalMarket; @Diseases({ Disease.AFP, Disease.EVD, @@ -164,7 +156,7 @@ public class ExposureDto extends PseudonymizableDto { Disease.AHF, Disease.UNDEFINED, Disease.OTHER }) - private YesNoUnknown percutaneous; + private YesNo percutaneous; @Diseases({ Disease.AFP, Disease.EVD, @@ -174,7 +166,7 @@ public class ExposureDto extends PseudonymizableDto { Disease.AHF, Disease.UNDEFINED, Disease.OTHER }) - private YesNoUnknown contactToBodyFluids; + private YesNo contactToBodyFluids; @Diseases({ Disease.AFP, Disease.GUINEA_WORM, @@ -184,7 +176,7 @@ public class ExposureDto extends PseudonymizableDto { Disease.CORONAVIRUS, Disease.UNDEFINED, Disease.OTHER }) - private YesNoUnknown handlingSamples; + private YesNo handlingSamples; @Diseases({ Disease.AFP, Disease.GUINEA_WORM, @@ -193,7 +185,7 @@ public class ExposureDto extends PseudonymizableDto { Disease.POLIO, Disease.UNDEFINED, Disease.OTHER }) - private YesNoUnknown eatingRawAnimalProducts; + private YesNo eatingRawAnimalProducts; @Diseases({ Disease.AFP, Disease.EVD, @@ -206,9 +198,9 @@ public class ExposureDto extends PseudonymizableDto { Disease.AHF, Disease.UNDEFINED, Disease.OTHER }) - private YesNoUnknown handlingAnimals; + private YesNo handlingAnimals; private AnimalCondition animalCondition; - private YesNoUnknown animalVaccinated; + private YesNo animalVaccinated; private AnimalContactType animalContactType; @SensitiveData @Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong) @@ -220,7 +212,7 @@ public class ExposureDto extends PseudonymizableDto { Disease.POLIO, Disease.UNDEFINED, Disease.OTHER }) - private YesNoUnknown bodyOfWater; + private YesNo bodyOfWater; @Diseases({ Disease.AFP, Disease.CHOLERA, @@ -241,9 +233,9 @@ public class ExposureDto extends PseudonymizableDto { private String waterSourceDetails; @PersonalData private ContactReferenceDto contactToCase; - private YesNoUnknown prophylaxis; + private YesNo prophylaxis; private Date prophylaxisDate; - private YesNoUnknown riskArea; + private YesNo riskArea; // Exposure sub-types private GatheringType gatheringType; @@ -260,16 +252,16 @@ public class ExposureDto extends PseudonymizableDto { private String typeOfAnimalDetails; // Fields specific to ExposureType.BURIAL - private YesNoUnknown physicalContactDuringPreparation; - private YesNoUnknown physicalContactWithBody; - private YesNoUnknown deceasedPersonIll; + private YesNo physicalContactDuringPreparation; + private YesNo physicalContactWithBody; + private YesNo deceasedPersonIll; @PersonalData @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String deceasedPersonName; @SensitiveData @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String deceasedPersonRelation; - private YesNoUnknown largeAttendanceNumber; + private YesNo largeAttendanceNumber; public static ExposureDto build(ExposureType exposureType) { @@ -353,43 +345,43 @@ public void setExposureRole(ExposureRole exposureRole) { this.exposureRole = exposureRole; } - public YesNoUnknown getIndoors() { + public YesNo getIndoors() { return indoors; } - public void setIndoors(YesNoUnknown indoors) { + public void setIndoors(YesNo indoors) { this.indoors = indoors; } - public YesNoUnknown getOutdoors() { + public YesNo getOutdoors() { return outdoors; } - public void setOutdoors(YesNoUnknown outdoors) { + public void setOutdoors(YesNo outdoors) { this.outdoors = outdoors; } - public YesNoUnknown getWearingMask() { + public YesNo getWearingMask() { return wearingMask; } - public void setWearingMask(YesNoUnknown wearingMask) { + public void setWearingMask(YesNo wearingMask) { this.wearingMask = wearingMask; } - public YesNoUnknown getWearingPpe() { + public YesNo getWearingPpe() { return wearingPpe; } - public void setWearingPpe(YesNoUnknown wearingPpe) { + public void setWearingPpe(YesNo wearingPpe) { this.wearingPpe = wearingPpe; } - public YesNoUnknown getOtherProtectiveMeasures() { + public YesNo getOtherProtectiveMeasures() { return otherProtectiveMeasures; } - public void setOtherProtectiveMeasures(YesNoUnknown otherProtectiveMeasures) { + public void setOtherProtectiveMeasures(YesNo otherProtectiveMeasures) { this.otherProtectiveMeasures = otherProtectiveMeasures; } @@ -401,67 +393,67 @@ public void setProtectiveMeasuresDetails(String protectiveMeasuresDetails) { this.protectiveMeasuresDetails = protectiveMeasuresDetails; } - public YesNoUnknown getShortDistance() { + public YesNo getShortDistance() { return shortDistance; } - public void setShortDistance(YesNoUnknown shortDistance) { + public void setShortDistance(YesNo shortDistance) { this.shortDistance = shortDistance; } - public YesNoUnknown getLongFaceToFaceContact() { + public YesNo getLongFaceToFaceContact() { return longFaceToFaceContact; } - public void setLongFaceToFaceContact(YesNoUnknown longFaceToFaceContact) { + public void setLongFaceToFaceContact(YesNo longFaceToFaceContact) { this.longFaceToFaceContact = longFaceToFaceContact; } - public YesNoUnknown getAnimalMarket() { + public YesNo getAnimalMarket() { return animalMarket; } - public void setAnimalMarket(YesNoUnknown animalMarket) { + public void setAnimalMarket(YesNo animalMarket) { this.animalMarket = animalMarket; } - public YesNoUnknown getPercutaneous() { + public YesNo getPercutaneous() { return percutaneous; } - public void setPercutaneous(YesNoUnknown percutaneous) { + public void setPercutaneous(YesNo percutaneous) { this.percutaneous = percutaneous; } - public YesNoUnknown getContactToBodyFluids() { + public YesNo getContactToBodyFluids() { return contactToBodyFluids; } - public void setContactToBodyFluids(YesNoUnknown contactToBodyFluids) { + public void setContactToBodyFluids(YesNo contactToBodyFluids) { this.contactToBodyFluids = contactToBodyFluids; } - public YesNoUnknown getHandlingSamples() { + public YesNo getHandlingSamples() { return handlingSamples; } - public void setHandlingSamples(YesNoUnknown handlingSamples) { + public void setHandlingSamples(YesNo handlingSamples) { this.handlingSamples = handlingSamples; } - public YesNoUnknown getEatingRawAnimalProducts() { + public YesNo getEatingRawAnimalProducts() { return eatingRawAnimalProducts; } - public void setEatingRawAnimalProducts(YesNoUnknown eatingRawAnimalProducts) { + public void setEatingRawAnimalProducts(YesNo eatingRawAnimalProducts) { this.eatingRawAnimalProducts = eatingRawAnimalProducts; } - public YesNoUnknown getHandlingAnimals() { + public YesNo getHandlingAnimals() { return handlingAnimals; } - public void setHandlingAnimals(YesNoUnknown handlingAnimals) { + public void setHandlingAnimals(YesNo handlingAnimals) { this.handlingAnimals = handlingAnimals; } @@ -473,11 +465,11 @@ public void setAnimalCondition(AnimalCondition animalCondition) { this.animalCondition = animalCondition; } - public YesNoUnknown getAnimalVaccinated() { + public YesNo getAnimalVaccinated() { return animalVaccinated; } - public void setAnimalVaccinated(YesNoUnknown animalVaccinated) { + public void setAnimalVaccinated(YesNo animalVaccinated) { this.animalVaccinated = animalVaccinated; } @@ -497,11 +489,11 @@ public void setAnimalContactTypeDetails(String animalContactTypeDetails) { this.animalContactTypeDetails = animalContactTypeDetails; } - public YesNoUnknown getBodyOfWater() { + public YesNo getBodyOfWater() { return bodyOfWater; } - public void setBodyOfWater(YesNoUnknown bodyOfWater) { + public void setBodyOfWater(YesNo bodyOfWater) { this.bodyOfWater = bodyOfWater; } @@ -577,27 +569,27 @@ public void setTypeOfAnimalDetails(String typeOfAnimalDetails) { this.typeOfAnimalDetails = typeOfAnimalDetails; } - public YesNoUnknown getPhysicalContactDuringPreparation() { + public YesNo getPhysicalContactDuringPreparation() { return physicalContactDuringPreparation; } - public void setPhysicalContactDuringPreparation(YesNoUnknown physicalContactDuringPreparation) { + public void setPhysicalContactDuringPreparation(YesNo physicalContactDuringPreparation) { this.physicalContactDuringPreparation = physicalContactDuringPreparation; } - public YesNoUnknown getPhysicalContactWithBody() { + public YesNo getPhysicalContactWithBody() { return physicalContactWithBody; } - public void setPhysicalContactWithBody(YesNoUnknown physicalContactWithBody) { + public void setPhysicalContactWithBody(YesNo physicalContactWithBody) { this.physicalContactWithBody = physicalContactWithBody; } - public YesNoUnknown getDeceasedPersonIll() { + public YesNo getDeceasedPersonIll() { return deceasedPersonIll; } - public void setDeceasedPersonIll(YesNoUnknown deceasedPersonIll) { + public void setDeceasedPersonIll(YesNo deceasedPersonIll) { this.deceasedPersonIll = deceasedPersonIll; } @@ -673,11 +665,11 @@ public void setWorkEnvironment(WorkEnvironment workEnvironment) { this.workEnvironment = workEnvironment; } - public YesNoUnknown getProphylaxis() { + public YesNo getProphylaxis() { return prophylaxis; } - public void setProphylaxis(YesNoUnknown prophylaxis) { + public void setProphylaxis(YesNo prophylaxis) { this.prophylaxis = prophylaxis; } @@ -689,19 +681,19 @@ public void setProphylaxisDate(Date prophylaxisDate) { this.prophylaxisDate = prophylaxisDate; } - public YesNoUnknown getRiskArea() { + public YesNo getRiskArea() { return riskArea; } - public void setRiskArea(YesNoUnknown riskArea) { + public void setRiskArea(YesNo riskArea) { this.riskArea = riskArea; } - public YesNoUnknown getLargeAttendanceNumber() { + public YesNo getLargeAttendanceNumber() { return largeAttendanceNumber; } - public void setLargeAttendanceNumber(YesNoUnknown largeAttendanceNumber) { + public void setLargeAttendanceNumber(YesNo largeAttendanceNumber) { this.largeAttendanceNumber = largeAttendanceNumber; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/hospitalization/HospitalizationDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/hospitalization/HospitalizationDto.java index cf15d804b7f..5dc7b1f2c28 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/hospitalization/HospitalizationDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/hospitalization/HospitalizationDto.java @@ -18,7 +18,8 @@ package de.symeda.sormas.api.hospitalization; import de.symeda.sormas.api.feature.FeatureType; -import de.symeda.sormas.api.utils.DependingOnFeatureType; +import de.symeda.sormas.api.utils.*; + import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -29,10 +30,6 @@ import de.symeda.sormas.api.EntityDto; import de.symeda.sormas.api.ImportIgnore; import de.symeda.sormas.api.i18n.Validations; -import de.symeda.sormas.api.utils.DataHelper; -import de.symeda.sormas.api.utils.FieldConstraints; -import de.symeda.sormas.api.utils.Outbreaks; -import de.symeda.sormas.api.utils.YesNoUnknown; @DependingOnFeatureType(featureType = FeatureType.CASE_SURVEILANCE) public class HospitalizationDto extends EntityDto { @@ -42,7 +39,24 @@ public class HospitalizationDto extends EntityDto { public static final String I18N_PREFIX = "CaseHospitalization"; public static final String ADMITTED_TO_HEALTH_FACILITY = "admittedToHealthFacility"; + public static final String ADMITTED_TO_HEALTH_FACILITY_NEW = "admittedToHealthFacilityNew"; public static final String ADMISSION_DATE = "admissionDate"; + public static final String NOTIFY_DISTRICT_DATE = "notifyDistrictDate"; + public static final String DATE_FIRST_SEEN_HOSPITAL_FOR_DISEASE = "dateFirstSeen"; + public static final String TERMINATION_DATE_HOSPITAL_STAY = "terminationDateHospitalStay"; + public static final String DISEASE_ONSET_DATE = "diseaseOnsetDate"; + public static final String PATIENT_HOSPITALIZED_DETAINED = "patientHospitalizedOrDetained"; + public static final String PLACE = "place"; + public static final String DURATION_MONTHS = "durationMonths"; + public static final String DURATION_DAYS = "durationDays"; + public static final String PLACE2 = "place2"; + public static final String DURATION_MONTHS2 = "durationMonths2"; + public static final String DURATION_DAYS2 = "durationDays2"; + public static final String INVESTIGATOR_NAME = "investigatorName"; + public static final String INVESTIGATOR_TITLE = "investigatorTitle"; + public static final String INVESTIGATOR_UNIT = "investigatorUnit"; + public static final String INVESTIGATOR_ADDRESS = "investigatorAddress"; + public static final String INVESTIGATOR_TEL = "investigatorTel"; public static final String DISCHARGE_DATE = "dischargeDate"; public static final String ISOLATED = "isolated"; public static final String ISOLATION_DATE = "isolationDate"; @@ -59,17 +73,23 @@ public class HospitalizationDto extends EntityDto { // Fields are declared in the order they should appear in the import template @Outbreaks - private YesNoUnknown admittedToHealthFacility; + private YesNo admittedToHealthFacility; + private YesNo admittedToHealthFacilityNew; private Date admissionDate; + private Date notifyDistrictDate; + private Date dateFirstSeen; + private Date terminationDateHospitalStay; + private Date diseaseOnsetDate; + private HospOut patientHospitalizedOrDetained; private Date dischargeDate; - private YesNoUnknown isolated; + private YesNo isolated; private Date isolationDate; - private YesNoUnknown leftAgainstAdvice; + private YesNo leftAgainstAdvice; - private YesNoUnknown hospitalizedPreviously; + private YesNo hospitalizedPreviously; @Valid private List previousHospitalizations = new ArrayList<>(); - private YesNoUnknown intensiveCareUnit; + private YesNo intensiveCareUnit; private Date intensiveCareUnitStart; private Date intensiveCareUnitEnd; private HospitalizationReasonType hospitalizationReason; @@ -77,6 +97,19 @@ public class HospitalizationDto extends EntityDto { private String otherHospitalizationReason; @Size(max = FieldConstraints.CHARACTER_LIMIT_BIG, message = Validations.textTooLong) private String description; + private String place; + @Size(max = FieldConstraints.CHARACTER_LIMIT_UUID_MAX, message = Validations.onlyNumbersAllowed) + private String durationMonths; + @Size(max = FieldConstraints.CHARACTER_LIMIT_UUID_MAX, message = Validations.onlyNumbersAllowed) + private String durationDays; + private String place2; + private String durationMonths2; + private String durationDays2; + private String investigatorName; + private String investigatorTitle; + private String investigatorUnit; + private String investigatorAddress; + private String investigatorTel; public static HospitalizationDto build() { HospitalizationDto hospitalization = new HospitalizationDto(); @@ -100,11 +133,11 @@ public void setDischargeDate(Date dischargeDate) { this.dischargeDate = dischargeDate; } - public YesNoUnknown getIsolated() { + public YesNo getIsolated() { return isolated; } - public void setIsolated(YesNoUnknown isolated) { + public void setIsolated(YesNo isolated) { this.isolated = isolated; } @@ -117,11 +150,11 @@ public void setIsolationDate(Date isolationDate) { } @ImportIgnore - public YesNoUnknown getHospitalizedPreviously() { + public YesNo getHospitalizedPreviously() { return hospitalizedPreviously; } - public void setHospitalizedPreviously(YesNoUnknown hospitalizedPreviously) { + public void setHospitalizedPreviously(YesNo hospitalizedPreviously) { this.hospitalizedPreviously = hospitalizedPreviously; } @@ -134,19 +167,27 @@ public void setPreviousHospitalizations(List previou this.previousHospitalizations = previousHospitalizations; } - public YesNoUnknown getAdmittedToHealthFacility() { + public YesNo getAdmittedToHealthFacility() { return admittedToHealthFacility; } - public void setAdmittedToHealthFacility(YesNoUnknown admittedToHealthFacility) { + public void setAdmittedToHealthFacility(YesNo admittedToHealthFacility) { this.admittedToHealthFacility = admittedToHealthFacility; } - public YesNoUnknown getIntensiveCareUnit() { + public YesNo getAdmittedToHealthFacilityNew() { + return admittedToHealthFacilityNew; + } + + public void setAdmittedToHealthFacilityNew(YesNo admittedToHealthFacilityNew) { + this.admittedToHealthFacilityNew = admittedToHealthFacilityNew; + } + + public YesNo getIntensiveCareUnit() { return intensiveCareUnit; } - public void setIntensiveCareUnit(YesNoUnknown intensiveCareUnit) { + public void setIntensiveCareUnit(YesNo intensiveCareUnit) { this.intensiveCareUnit = intensiveCareUnit; } @@ -166,11 +207,11 @@ public void setIntensiveCareUnitEnd(Date intensiveCareUnitEnd) { this.intensiveCareUnitEnd = intensiveCareUnitEnd; } - public YesNoUnknown getLeftAgainstAdvice() { + public YesNo getLeftAgainstAdvice() { return leftAgainstAdvice; } - public void setLeftAgainstAdvice(YesNoUnknown leftAgainstAdvice) { + public void setLeftAgainstAdvice(YesNo leftAgainstAdvice) { this.leftAgainstAdvice = leftAgainstAdvice; } @@ -197,4 +238,131 @@ public String getDescription() { public void setDescription(String description) { this.description = description; } + + public Date getDiseaseOnsetDate() { + return diseaseOnsetDate; + } + + public void setDiseaseOnsetDate(Date diseaseOnsetDate) { + this.diseaseOnsetDate = diseaseOnsetDate; + } + + public HospOut getPatientHospitalizedOrDetained() { + return patientHospitalizedOrDetained; + } + + public void setPatientHospitalizedOrDetained(HospOut patientHospitalizedOrDetained) { + this.patientHospitalizedOrDetained = patientHospitalizedOrDetained; + } + + public String getPlace() { + return place; + } + + public void setPlace(String place) { + this.place = place; + } + + public String getDurationMonths() { + return durationMonths; + } + + public void setDurationMonths(String durationMonths) { + this.durationMonths = durationMonths; + } + + public String getDurationDays() { + return durationDays; + } + + public void setDurationDays(String durationDays) { + this.durationDays = durationDays; + } + + public String getInvestigatorName() { + return investigatorName; + } + + public void setInvestigatorName(String investigatorName) { + this.investigatorName = investigatorName; + } + + public String getInvestigatorTitle() { + return investigatorTitle; + } + + public void setInvestigatorTitle(String investigatorTitle) { + this.investigatorTitle = investigatorTitle; + } + + public String getInvestigatorUnit() { + return investigatorUnit; + } + + public void setInvestigatorUnit(String investigatorUnit) { + this.investigatorUnit = investigatorUnit; + } + + public String getInvestigatorAddress() { + return investigatorAddress; + } + + public void setInvestigatorAddress(String investigatorAddress) { + this.investigatorAddress = investigatorAddress; + } + + public String getInvestigatorTel() { + return investigatorTel; + } + + public void setInvestigatorTel(String investigatorTel) { + this.investigatorTel = investigatorTel; + } + + public String getPlace2() { + return place2; + } + + public void setPlace2(String place2) { + this.place2 = place2; + } + + public String getDurationMonths2() { + return durationMonths2; + } + + public void setDurationMonths2(String durationMonths2) { + this.durationMonths2 = durationMonths2; + } + + public String getDurationDays2() { + return durationDays2; + } + + public void setDurationDays2(String durationDays2) { + this.durationDays2 = durationDays2; + } + + public Date getNotifyDistrictDate() { + return notifyDistrictDate; + } + + public void setNotifyDistrictDate(Date notifyDistrictDate) { + this.notifyDistrictDate = notifyDistrictDate; + } + + public Date getDateFirstSeen() { + return dateFirstSeen; + } + + public void setDateFirstSeen(Date dateFirstSeen) { + this.dateFirstSeen = dateFirstSeen; + } + + public Date getTerminationDateHospitalStay() { + return terminationDateHospitalStay; + } + public void setTerminationDateHospitalStay(Date terminationDateHospitalStay) { + this.terminationDateHospitalStay = terminationDateHospitalStay; + } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/hospitalization/PreviousHospitalizationDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/hospitalization/PreviousHospitalizationDto.java index c15e7cb0249..8d43c2901a8 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/hospitalization/PreviousHospitalizationDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/hospitalization/PreviousHospitalizationDto.java @@ -18,7 +18,8 @@ package de.symeda.sormas.api.hospitalization; import de.symeda.sormas.api.feature.FeatureType; -import de.symeda.sormas.api.utils.DependingOnFeatureType; +import de.symeda.sormas.api.utils.*; + import java.util.Date; import javax.validation.constraints.Size; @@ -30,10 +31,6 @@ import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto; -import de.symeda.sormas.api.utils.DataHelper; -import de.symeda.sormas.api.utils.FieldConstraints; -import de.symeda.sormas.api.utils.SensitiveData; -import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto; @DependingOnFeatureType(featureType = FeatureType.CASE_SURVEILANCE) @@ -60,7 +57,7 @@ public class PreviousHospitalizationDto extends PseudonymizableDto { public static final String INTENSIVE_CARE_UNIT_START = "intensiveCareUnitStart"; public static final String INTENSIVE_CARE_UNIT_END = "intensiveCareUnitEnd"; - private YesNoUnknown admittedToHealthFacility; + private YesNo admittedToHealthFacility; private Date admissionDate; private Date dischargeDate; private RegionReferenceDto region; @@ -72,7 +69,7 @@ public class PreviousHospitalizationDto extends PseudonymizableDto { @SensitiveData @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String healthFacilityDetails; - private YesNoUnknown isolated; + private YesNo isolated; private Date isolationDate; @SensitiveData @Size(max = FieldConstraints.CHARACTER_LIMIT_BIG, message = Validations.textTooLong) @@ -82,7 +79,7 @@ public class PreviousHospitalizationDto extends PseudonymizableDto { @Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong) private String otherHospitalizationReason; - private YesNoUnknown intensiveCareUnit; + private YesNo intensiveCareUnit; private Date intensiveCareUnitStart; private Date intensiveCareUnitEnd; @@ -122,11 +119,11 @@ public static PreviousHospitalizationDto build(CaseDataDto caze) { return previousHospitalization; } - public YesNoUnknown getAdmittedToHealthFacility() { + public YesNo getAdmittedToHealthFacility() { return admittedToHealthFacility; } - public void setAdmittedToHealthFacility(YesNoUnknown admittedToHealthFacility) { + public void setAdmittedToHealthFacility(YesNo admittedToHealthFacility) { this.admittedToHealthFacility = admittedToHealthFacility; } @@ -178,11 +175,11 @@ public void setHealthFacility(FacilityReferenceDto healthFacility) { this.healthFacility = healthFacility; } - public YesNoUnknown getIsolated() { + public YesNo getIsolated() { return isolated; } - public void setIsolated(YesNoUnknown isolated) { + public void setIsolated(YesNo isolated) { this.isolated = isolated; } @@ -226,11 +223,11 @@ public void setOtherHospitalizationReason(String otherHospitalizationReason) { this.otherHospitalizationReason = otherHospitalizationReason; } - public YesNoUnknown getIntensiveCareUnit() { + public YesNo getIntensiveCareUnit() { return intensiveCareUnit; } - public void setIntensiveCareUnit(YesNoUnknown intensiveCareUnit) { + public void setIntensiveCareUnit(YesNo intensiveCareUnit) { this.intensiveCareUnit = intensiveCareUnit; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java index 8534748e3c9..5cede3d983f 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java @@ -329,6 +329,7 @@ public interface Captions { String CaseData_healthFacility = "CaseData.healthFacility"; String CaseData_healthFacilityDetails = "CaseData.healthFacilityDetails"; String CaseData_healthFacilityName = "CaseData.healthFacilityName"; + String CaseData_homeAddressRecreational = "CaseData.homeAddressRecreational"; String CaseData_hospitalization = "CaseData.hospitalization"; String CaseData_infectionSetting = "CaseData.infectionSetting"; String CaseData_internalToken = "CaseData.internalToken"; @@ -357,6 +358,7 @@ public interface Captions { String CaseData_outcomeDate = "CaseData.outcomeDate"; String CaseData_overwriteFollowUpUntil = "CaseData.overwriteFollowUpUntil"; String CaseData_person = "CaseData.person"; + String CaseData_sixtyDay = "CaseData.sixtyDay"; String CaseData_personFirstName = "CaseData.personFirstName"; String CaseData_personLastName = "CaseData.personLastName"; String CaseData_personOtherName = "CaseData.personOtherName"; @@ -403,6 +405,7 @@ public interface Captions { String CaseData_reInfection = "CaseData.reInfection"; String CaseData_reinfectionStatus = "CaseData.reinfectionStatus"; String CaseData_reportDate = "CaseData.reportDate"; + String CaseData_dhimsFacilityType = "CaseData.dhimsFacilityType"; String CaseData_reportingDistrict = "CaseData.reportingDistrict"; String CaseData_reportingUser = "CaseData.reportingUser"; String CaseData_reportLat = "CaseData.reportLat"; @@ -421,6 +424,11 @@ public interface Captions { String CaseData_smallpoxVaccinationScar = "CaseData.smallpoxVaccinationScar"; String CaseData_sormasToSormasOriginInfo = "CaseData.sormasToSormasOriginInfo"; String CaseData_surveillanceOfficer = "CaseData.surveillanceOfficer"; + String CaseData_reportingOfficerName = "CaseData.reportingOfficerName"; + String CaseData_reportingOfficerTitle = "CaseData.reportingOfficerTitle"; + String CaseData_functionOfReportingOfficer = "CaseData.functionOfReportingOfficer"; + String CaseData_reportingOfficerContactPhone = "CaseData.reportingOfficerContactPhone"; + String CaseData_reportingOfficerEmail = "CaseData.reportingOfficerEmail"; String CaseData_surveillanceToolLastShareDate = "CaseData.surveillanceToolLastShareDate"; String CaseData_surveillanceToolShareCount = "CaseData.surveillanceToolShareCount"; String CaseData_surveillanceToolStatus = "CaseData.surveillanceToolStatus"; @@ -513,8 +521,12 @@ public interface Captions { String CaseHospitalization = "CaseHospitalization"; String CaseHospitalization_admissionDate = "CaseHospitalization.admissionDate"; String CaseHospitalization_admittedToHealthFacility = "CaseHospitalization.admittedToHealthFacility"; + String CaseHospitalization_terminationDateHospitalStay = "CaseHospitalization.terminationDateHospitalStay"; + String CaseHospitalization_notifyDistrictDate = "CaseHospitalization.notifyDistrictDate"; String CaseHospitalization_dischargeDate = "CaseHospitalization.dischargeDate"; String CaseHospitalization_healthFacility = "CaseHospitalization.healthFacility"; + String CaseHospitalization_fillSectionBeforeSigningLoc = "CaseHospitalization.fillSectionBeforeSigning"; + String CaseHospitalization_seekHelpChildLoc = "CaseHospitalization.seekHelpChild"; String CaseHospitalization_hospitalizationReason = "CaseHospitalization.hospitalizationReason"; String CaseHospitalization_hospitalizedPreviously = "CaseHospitalization.hospitalizedPreviously"; String CaseHospitalization_intensiveCareUnit = "CaseHospitalization.intensiveCareUnit"; @@ -524,6 +536,21 @@ public interface Captions { String CaseHospitalization_isolationDate = "CaseHospitalization.isolationDate"; String CaseHospitalization_leftAgainstAdvice = "CaseHospitalization.leftAgainstAdvice"; String CaseHospitalization_otherHospitalizationReason = "CaseHospitalization.otherHospitalizationReason"; + String CaseHospitalization_diseaseOnsetDate = "CaseHospitalization.diseaseOnsetDate"; + String CaseHospitalization_patientHospitalizedOrDetained = "CaseHospitalization.patientHospitalizedOrDetained"; + String CaseHospitalization_dateFirstSeen = "CaseHospitalization.dateFirstSeen"; + String CaseHospitalization_durationMonths = "CaseHospitalization.durationMonths"; + String CaseHospitalization_durationDays = "CaseHospitalization.durationDays"; + String CaseHospitalization_investigatorName = "CaseHospitalization.investigatorName"; + String CaseHospitalization_place2 = "CaseHospitalization.place2"; + String CaseHospitalization_durationMonths2 = "CaseHospitalization.durationMonths2"; + String CaseHospitalization_durationDays2 = "CaseHospitalization.durationDays2"; + String CaseHospitalization_investigatorName2 = "CaseHospitalization.investigatorName"; + String CaseHospitalization_investigatorTitle = "CaseHospitalization.investigatorTitle"; + String CaseHospitalization_investigatorUnit = "CaseHospitalization.investigatorUnit"; + String CaseHospitalization_investigatorAddress = "CaseHospitalization.investigatorAddress"; + String CaseHospitalization_investigatorTel = "CaseHospitalization.investigatorTel"; + String CaseHospitalization_previousHospitalizations = "CaseHospitalization.previousHospitalizations"; String caseImportErrorDescription = "caseImportErrorDescription"; String caseImportMergeCase = "caseImportMergeCase"; @@ -826,6 +853,7 @@ public interface Captions { String dashboardFollowUpUntilChart = "dashboardFollowUpUntilChart"; String dashboardFollowUpUntilShort = "dashboardFollowUpUntilShort"; String dashboardGrouping = "dashboardGrouping"; + String sampleDispatchMode = "sampleDispatchMode"; String dashboardGt1ConfirmedCases = "dashboardGt1ConfirmedCases"; String dashboardGt1ProbableCases = "dashboardGt1ProbableCases"; String dashboardGt1SuspectCases = "dashboardGt1SuspectCases"; @@ -1379,6 +1407,7 @@ public interface Captions { String facilityAllFacilities = "facilityAllFacilities"; String facilityArchivedFacilities = "facilityArchivedFacilities"; String facilityType = "facilityType"; + String dhimsFacilityType = "dhimsFacilityType"; String afpFacilityOptions = "afpFacilityOptions"; String facilityTypeGroup = "facilityTypeGroup"; String FeatureConfiguration_districtName = "FeatureConfiguration.districtName"; @@ -1585,6 +1614,31 @@ public interface Captions { String MaternalHistory_swollenLymphs = "MaternalHistory.swollenLymphs"; String MaternalHistory_swollenLymphsMonth = "MaternalHistory.swollenLymphsMonth"; String MaternalHistory_swollenLymphsOnset = "MaternalHistory.swollenLymphsOnset"; + + String SixtyDay_personExamineCase = "SixtyDay.personExamineCase"; + String SixtyDay_dateOfFollowup = "SixtyDay.dateOfFollowup"; + String SixtyDay_dateBirth = "SixtyDay.dateBirth"; + String SixtyDay_residentialLocation = "SixtyDay.residentialLocation"; + String SixtyDay_patientFound = "SixtyDay.patientFound"; + String SixtyDay_patientFoundReason = "SixtyDay.patientFoundReason"; + String SixtyDay_locateChildAttempt = "SixtyDay.locateChildAttempt"; + String SixtyDay_paralysisWeaknessPresent = "SixtyDay.paralysisWeaknessPresent"; + String SixtyDay_paralysisWeaknessPresentSite = "SixtyDay.paralysisWeaknessPresentSite"; + String SixtyDay_paralyzedPartOther = "SixtyDay.paralyzedPartOther"; + String SixtyDay_paralysisWeaknessFloppy = "SixtyDay.paralysisWeaknessFloppy"; + String SixtyDay_muscleToneParalyzedPart = "SixtyDay.muscleToneParalyzedPart"; + String SixtyDay_muscleToneOtherPartBody = "SixtyDay.muscleToneOtherPartBody"; + String SixtyDay_deepTendon = "SixtyDay.deepTendon"; + String SixtyDay_muscleVolume = "SixtyDay.muscleVolume"; + String SixtyDay_sensoryLoss = "SixtyDay.sensoryLoss"; + String SixtyDay_provisionalDiagnosis = "SixtyDay.provisionalDiagnosis"; + String SixtyDay_comments = "SixtyDay.comments"; + String SixtyDay_contactDetailsNumber = "SixtyDay.contactDetailsNumber"; + String SixtyDay_contactDetailsEmail = "SixtyDay.contactDetailsEmail"; + String SixtyDay_signature = "SixtyDay.signature"; + String SixtyDay_dateSubmissionForms = "SixtyDay.dateSubmissionForms"; + + String menu = "menu"; String messagesCharacters = "messagesCharacters"; String messagesEmail = "messagesEmail"; @@ -1653,6 +1707,7 @@ public interface Captions { String patientDiaryRegistrationError = "patientDiaryRegistrationError"; String Person = "Person"; String Person_additionalDetails = "Person.additionalDetails"; + String Person_additionalPlacesStayed = "Person.additionalPlacesStayed"; String Person_address = "Person.address"; String Person_addresses = "Person.addresses"; String Person_ageAndBirthDate = "Person.ageAndBirthDate"; @@ -1708,6 +1763,7 @@ public interface Captions { String Person_occupationFacilityType = "Person.occupationFacilityType"; String Person_occupationRegion = "Person.occupationRegion"; String Person_occupationType = "Person.occupationType"; + String Person_homeAddressRecreational = "Person.homeAddressRecreational"; String Person_other_occupationDetails = "Person.other.occupationDetails"; String Person_otherContactDetails = "Person.otherContactDetails"; String Person_otherSalutation = "Person.otherSalutation"; @@ -1889,6 +1945,76 @@ public interface Captions { String Sample_specimenCondition = "Sample.specimenCondition"; String Sample_suggestedTypeOfTest = "Sample.suggestedTypeOfTest"; String Sample_testResult = "Sample.testResult"; + String Sample_csfSampleCollected = "Sample.csfSampleCollected"; + String Sample_rdtPerformed = "Sample.rdtPerformed"; + String Sample_sampleSentToLab = "Sample.sampleSentToLab"; + + String Sample_csfReason = "Sample.csfReason"; + String Sample_appearanceOfCsf = "Sample.appearanceOfCsf"; + String Sample_sampleContainerUsed = "Sample.sampleContainerUsed"; + + String Sample_rdtResults = "Sample.rdtResults"; + String Sample_reasonNotSentToLab = "Sample.reasonNotSentToLab"; + String Sample_nameOfPerson = "Sample.nameOfPerson"; + String Sample_telNumber = "Sample.telNumber"; + + String Sample_inoculationTimeTransportMedia = "Sample.inoculationTimeTransportMedia"; + String Sample_districtNotificationDate = "Sample.districtNotificationDate"; + String Sample_dateSampleSentToLab = "Sample.dateSampleSentToLab"; + String Sample_dateFormSentToDistrict = "Sample.dateFormSentToDistrict"; + String Sample_dateFormReceivedAtDistrict = "Sample.dateFormReceivedAtDistrict"; + String Sample_dateFormSentToRegion = "Sample.dateFormSentToRegion"; + String Sample_dateFormReceivedAtRegion = "Sample.dateFormReceivedAtRegion"; + String Sample_dateFormSentToNational = "Sample.dateFormSentToNational"; + String Sample_dateFormReceivedAtNational = "Sample.dateFormReceivedAtNational"; + String Sample_sampleTests = "Sample.sampleTests"; + + + String Sample_laboratoryName = "Sample.laboratoryName"; + String Sample_laboratorySampleDateReceived = "Sample.laboratorySampleDateReceived"; + String Sample_laboratoryNumber = "Sample.laboratoryNumber"; + String Sample_laboratorySampleContainerReceived = "Sample.laboratorySampleContainerReceived"; + String Sample_laboratorySampleContainerOther = "Sample.laboratorySampleContainerOther"; + String Sample_laboratorySampleCondition = "Sample.laboratorySampleCondition"; + String Sample_laboratoryAppearanceOfCSF = "Sample.laboratoryAppearanceOfCSF"; + String Sample_laboratoryTestPerformed = "Sample.laboratoryTestPerformed"; + String Sample_laboratoryTestPerformedOther = "Sample.laboratoryTestPerformedOther"; + String Sample_laboratoryCytology = "Sample.laboratoryCytology"; + String Sample_laboratoryGram = "Sample.laboratoryGram"; + String Sample_laboratoryGramOther = "Sample.laboratoryGramOther"; + String Sample_laboratoryRdtPerformed = "Sample.laboratoryRdtPerformed"; + String Sample_laboratoryRdtResults = "Sample.laboratoryRdtResults"; + String Sample_laboratoryLatex = "Sample.laboratoryLatex"; + String Sample_laboratoryCulture = "Sample.laboratoryCulture"; + String Sample_laboratoryCultureOther = "Sample.laboratoryCultureOther"; + String Sample_laboratoryOtherTests = "Sample.laboratoryOtherTests"; + String Sample_laboratoryOtherTestsResults = "Sample.laboratoryOtherTestsResults"; + String Sample_laboratoryCeftriaxone = "Sample.laboratoryCeftriaxone"; + String Sample_laboratoryPenicillinG = "Sample.laboratoryPenicillinG"; + String Sample_laboratoryAmoxycillin = "Sample.laboratoryAmoxycillin"; + String Sample_laboratoryOxacillin = "Sample.laboratoryOxacillin"; + String Sample_laboratoryAntibiogramOther = "Sample.laboratoryAntibiogramOther"; + String Sample_laboratoryDatePcrPerformed = "Sample.laboratoryDatePcrPerformed"; + String Sample_laboratoryPcrType = "Sample.laboratoryPcrType"; + String Sample_laboratoryPcrOptions = "Sample.laboratoryPcrOptions"; + String Sample_laboratorySerotype = "Sample.laboratorySerotype"; + String Sample_laboratorySerotypeType = "Sample.laboratorySerotypeType"; + String Sample_laboratorySerotypeResults = "Sample.laboratorySerotypeResults"; + String Sample_laboratoryFinalResults = "Sample.laboratoryFinalResults"; + String Sample_laboratoryObservations = "Sample.laboratoryObservations"; + String Sample_laboratoryDateResultsSentHealthFacility = "Sample.laboratoryDateResultsSentHealthFacility"; + String Sample_laboratoryDateResultsSentDSD = "Sample.laboratoryDateResultsSentDSD"; + String Sample_laboratoryFinalClassification = "Sample.laboratoryFinalClassification"; + String Sample_laboratoryType = "Sample.laboratoryType"; + + String Sample_dateSentToNationalRegLabString = "Sample.dateSentToNationalRegLab"; + String Sample_dateDifferentiationSentToEpiString = "Sample.dateDifferentiationSentToEpi"; + String Sample_dateDifferentiationReceivedFromEpiString = "Sample.dateDifferentiationReceivedFromEpi"; + String Sample_dateIsolateSentForSequencingString = "Sample.dateIsolateSentForSequencing"; + String Sample_dateSeqResultsSentToProgramString = "Sample.dateSeqResultsSentToProgram"; + String Sample_finalLabResultsString = "Sample.finalLabResults"; + String Sample_immunocompromisedStatusSuspectedString = "Sample.immunocompromisedStatusSuspected"; + String Sample_afpFinalClassificationString = "Sample.afpFinalClassification"; String Sample_testStatusGen = "Sample.testStatusGen"; String Sample_testType = "Sample.testType"; String Sample_typeOfTest = "Sample.typeOfTest"; @@ -2142,12 +2268,17 @@ public interface Captions { String Symptoms_fever = "Symptoms.fever"; String Symptoms_feverishFeeling = "Symptoms.feverishFeeling"; String Symptoms_firstSymptom = "Symptoms.firstSymptom"; + String Symptoms_provisionalDiagnosis = "Symptoms.provisionalDiagnosis"; String Symptoms_fluidInLungCavity = "Symptoms.fluidInLungCavity"; String Symptoms_fluidInLungCavityAuscultation = "Symptoms.fluidInLungCavityAuscultation"; String Symptoms_fluidInLungCavityXray = "Symptoms.fluidInLungCavityXray"; String Symptoms_glasgowComaScale = "Symptoms.glasgowComaScale"; String Symptoms_gumsBleeding = "Symptoms.gumsBleeding"; String Symptoms_headache = "Symptoms.headache"; + String Symptoms_muscleTone = "Symptoms.muscleTone"; + String Symptoms_deepTendonReflex = "Symptoms.deepTendonReflex"; + String Symptoms_muscleVolume = "Symptoms.muscleVolume"; + String Symptoms_sensoryLoss = "Symptoms.sensoryLoss"; String Symptoms_hearingloss = "Symptoms.hearingloss"; String Symptoms_heartRate = "Symptoms.heartRate"; String Symptoms_height = "Symptoms.height"; @@ -2256,6 +2387,8 @@ public interface Captions { String Symptoms_symptomsUnknownOccurred = "Symptoms.symptomsUnknownOccurred"; String Symptoms_temperature = "Symptoms.temperature"; String Symptoms_temperatureSource = "Symptoms.temperatureSource"; + String Symptoms_dateOfOnset = "Symptoms.dateOfOnset"; + String Symptoms_feverBodyTempGreater = "Symptoms.feverBodyTempGreater"; String Symptoms_throbocytopenia = "Symptoms.throbocytopenia"; String Symptoms_tremor = "Symptoms.tremor"; String Symptoms_unexplainedBleeding = "Symptoms.unexplainedBleeding"; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Descriptions.java b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Descriptions.java index 32446782c6d..3227c3486d7 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Descriptions.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Descriptions.java @@ -60,6 +60,7 @@ public interface Descriptions { String descFacilityFilter = "descFacilityFilter"; String descFollowUpExportButton = "descFollowUpExportButton"; String descGdpr = "descGdpr"; + String observation = "observation"; String descPointOfEntryFilter = "descPointOfEntryFilter"; String discardDescription = "discardDescription"; String EpiData_bats = "EpiData.bats"; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java index 447d023d29b..b2f4958d2e4 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java @@ -393,6 +393,7 @@ public interface Strings { String headingChangeCaseDisease = "headingChangeCaseDisease"; String headingChangePathogenTestResult = "headingChangePathogenTestResult"; String headingClinicalMeasurements = "headingClinicalMeasurements"; + String headingClinicalHistory = "headingClinicalHistory"; String headingClinicalVisitsDeleted = "headingClinicalVisitsDeleted"; String headingComparisonCase = "headingComparisonCase"; String headingCompleteness = "headingCompleteness"; @@ -535,6 +536,9 @@ public interface Strings { String headingGenerateContacts = "headingGenerateContacts"; String headingHealthConditions = "headingHealthConditions"; String headingHospitalization = "headingHospitalization"; + String headingSixtyDay = "headingSixtyDay"; + String headingFillThis = "headingFillThis"; + String headingChildSeek = "headingChildSeek"; String headingHowToMergeCases = "headingHowToMergeCases"; String headingHowToMergeContacts = "headingHowToMergeContacts"; String headingImportAllContinents = "headingImportAllContinents"; @@ -638,6 +642,11 @@ public interface Strings { String headingRejectSormasToSormasShareRequest = "headingRejectSormasToSormasShareRequest"; String headingRemoveCaseFromContact = "headingRemoveCaseFromContact"; String headingRequestedAdditionalTests = "headingRequestedAdditionalTests"; + String headingDistrictLaboratory = "headingDistrictLaboratory"; + String headingRegionalLaboratory = "headingRegionalLaboratory"; + String headingReferenceLaboratory = "headingReferenceLaboratory"; + String laboratoryAntibiogramHeadlineloc = "headingLaboratoryAntibiogramHeadlineloc"; + String laboratoryPcrHeadlineloc = "headingLaboratoryPcrHeadlineloc"; String headingRequestedPathogenTests = "headingRequestedPathogenTests"; String headingResponsibleJurisdiction = "headingResponsibleJurisdiction"; String headingResults = "headingResults"; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/immunization/ImmunizationCriteria.java b/sormas-api/src/main/java/de/symeda/sormas/api/immunization/ImmunizationCriteria.java index b71a9085e85..376d2d692da 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/immunization/ImmunizationCriteria.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/immunization/ImmunizationCriteria.java @@ -22,6 +22,7 @@ import de.symeda.sormas.api.caze.CaseReferenceDto; import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; import de.symeda.sormas.api.infrastructure.facility.FacilityType; import de.symeda.sormas.api.infrastructure.facility.FacilityTypeGroup; @@ -47,6 +48,7 @@ public class ImmunizationCriteria extends BaseCriteria implements Serializable, public static final String COMMUNITY = "community"; public static final String FACILITY_TYPE_GROUP = "facilityTypeGroup"; public static final String FACILITY_TYPE = "facilityType"; + public static final String DHIMS_FACILITY_TYPE = "dhimsFacilityType"; public static final String HEALTH_FACILITY = "healthFacility"; public static final String ONLY_PERSONS_WITH_OVERDUE_IMMUNIZATION = "onlyPersonsWithOverdueImmunization"; @@ -63,6 +65,7 @@ public class ImmunizationCriteria extends BaseCriteria implements Serializable, private CommunityReferenceDto community; private FacilityTypeGroup facilityTypeGroup; private FacilityType facilityType; + private DhimsFacility dhimsFacilityType; private FacilityReferenceDto healthFacility; private Boolean onlyPersonsWithOverdueImmunization = Boolean.FALSE; @@ -177,6 +180,13 @@ public void setFacilityType(FacilityType facilityType) { this.facilityType = facilityType; } + public DhimsFacility getDhimsFacilityType() { + return dhimsFacilityType; + } + public void setDhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + } + public FacilityReferenceDto getHealthFacility() { return healthFacility; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/immunization/ImmunizationDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/immunization/ImmunizationDto.java index a17a017230e..e573c1804cb 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/immunization/ImmunizationDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/immunization/ImmunizationDto.java @@ -66,6 +66,7 @@ public class ImmunizationDto extends SormasToSormasShareableDto { public static final String END_DATE = "endDate"; public static final String EXTERNAL_ID = "externalId"; public static final String FACILITY_TYPE = "facilityType"; + public static final String DHIMS_FACILITY_TYPE = "dhimsFacilityType"; public static final String FIRST_VACCINATION_DATE = "firstVaccinationDate"; public static final String HEALTH_FACILITY = "healthFacility"; public static final String HEALTH_FACILITY_DETAILS = "healthFacilityDetails"; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/DhimsFacility.java b/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/DhimsFacility.java new file mode 100644 index 00000000000..152e24a1cf8 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/DhimsFacility.java @@ -0,0 +1,23 @@ +package de.symeda.sormas.api.infrastructure.facility; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum DhimsFacility { + + CHPS_COMPOUND, + MATERNITY_HOME, + CLINIC, + HEALTH_CENTRE, + POLYCLINIC, + HOSPITAL; + + + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } + + public String getUuid() { + return null; + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityCriteria.java b/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityCriteria.java index 5a550660f22..83157cc3343 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityCriteria.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityCriteria.java @@ -38,6 +38,7 @@ public class FacilityCriteria extends BaseCriteria implements Serializable, Clon private String nameCityLike; private FacilityTypeGroup typeGroup; private FacilityType type; + private DhimsFacility dhimsFacilityType; private EntityRelevanceStatus relevanceStatus; public CountryReferenceDto getCountry() { @@ -96,6 +97,15 @@ public FacilityCriteria type(FacilityType type) { public FacilityType getType() { return type; } + public FacilityCriteria dhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + return this; + } + + @IgnoreForUrl + public DhimsFacility getDhimsFacilityType() { + return dhimsFacilityType; + } public FacilityCriteria relevanceStatus(EntityRelevanceStatus relevanceStatus) { this.relevanceStatus = relevanceStatus; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityDto.java index 30776893fcc..0ffc97b0fbc 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityDto.java @@ -18,6 +18,8 @@ import java.util.Date; import java.util.List; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; import javax.validation.constraints.Max; import javax.validation.constraints.Min; import javax.validation.constraints.Size; @@ -69,6 +71,7 @@ public class FacilityDto extends InfrastructureDto { public static final String LONGITUDE = "longitude"; public static final String TYPE_GROUP = "typeGroup"; public static final String TYPE = "type"; + public static final String DHIMS_FACILITY_TYPE = "dhimsFacilityType"; public static final String AFP_TYPE = "afp_type"; public static final String EXTERNAL_ID = "externalID"; @@ -103,6 +106,7 @@ public class FacilityDto extends InfrastructureDto { @Max(value = 180, message = Validations.numberTooBig) private Double longitude; private FacilityType type; + private DhimsFacility dhimsFacilityType; private AFPFacilityOptions afp_type; private boolean publicOwnership; private boolean archived; @@ -311,6 +315,18 @@ public void setType(FacilityType type) { this.type = type; } + public DhimsFacility getDhimsFacilityType() { + return dhimsFacilityType; + } + + public void setDhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + } + + public AFPFacilityOptions getAfpType(){return afp_type;} + + public void setAfpType(AFPFacilityOptions afp_type){this.afp_type = afp_type;} + public boolean isPublicOwnership() { return publicOwnership; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityFacade.java b/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityFacade.java index 71167a79741..2dcf5fbd2e1 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityFacade.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityFacade.java @@ -28,6 +28,7 @@ import de.symeda.sormas.api.infrastructure.InfrastructureFacade; import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; +import de.symeda.sormas.api.utils.AFPFacilityOptions; import de.symeda.sormas.api.utils.SortProperty; @Remote @@ -39,12 +40,24 @@ List getActiveFacilitiesByCommunityAndType( boolean includeOtherFacility, boolean includeNoneFacility); + List getActiveFacilitiesByCommunityAndType( + CommunityReferenceDto community, + DhimsFacility dhimsFacilityType, + boolean includeOtherFacility, + boolean includeNoneFacility); + List getActiveFacilitiesByDistrictAndType( DistrictReferenceDto district, FacilityType type, boolean includeOtherFacility, boolean includeNoneFacility); + List getActiveFacilitiesByDistrictAndType( + DistrictReferenceDto district, + DhimsFacility dhimsFacilityType, + boolean includeOtherFacility, + boolean includeNoneFacility); + List getActiveHospitalsByCommunity(CommunityReferenceDto community, boolean includeOtherFacility); List getActiveHospitalsByDistrict(DistrictReferenceDto district, boolean includeOtherFacility); @@ -64,7 +77,27 @@ List getByNameAndType( FacilityType type, boolean includeArchivedEntities); - List getLaboratoriesByName(String name, boolean includeArchivedEntities); + List getByNameAndType( + String name, + DistrictReferenceDto districtRef, + CommunityReferenceDto communityRef, + FacilityType type, + AFPFacilityOptions afpType, + boolean includeArchivedEntities); + + + List getByNameAndType( + String name, + DistrictReferenceDto districtRef, + CommunityReferenceDto communityRef, + FacilityType type, + DhimsFacility dhimsFacilityType, + AFPFacilityOptions afpType, + boolean includeArchivedEntities); + + List getByNameAndType(String name, DistrictReferenceDto districtRef, CommunityReferenceDto communityRef, FacilityType type, DhimsFacility dhimsFacilityType, boolean includeArchivedEntities); + + List getLaboratoriesByName(String name, boolean includeArchivedEntities); boolean hasArchivedParentInfrastructure(Collection facilityUuids); @@ -73,6 +106,7 @@ List getByNameAndType( Map getCommunityUuidsForFacilities(List facilities); List getByExternalIdAndType(String id, FacilityType type, boolean includeArchivedEntities); + List getByExternalIdAndType(String id, FacilityType type, AFPFacilityOptions afpType,boolean includeArchivedEntities); Page getIndexPage(FacilityCriteria criteria, Integer offset, Integer size, List sortProperties); diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityIndexDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityIndexDto.java index 40d1a91f24f..50feb62ddff 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityIndexDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityIndexDto.java @@ -23,6 +23,7 @@ import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto; +import de.symeda.sormas.api.utils.AFPFacilityOptions; import org.apache.commons.lang3.StringUtils; public class FacilityIndexDto implements Serializable, HasUuid { @@ -43,6 +44,8 @@ public class FacilityIndexDto implements Serializable, HasUuid { private String uuid; private String name; private FacilityType type; + private DhimsFacility dhimsFacilityType; + private AFPFacilityOptions afpFacilityOptions; private RegionReferenceDto region; private DistrictReferenceDto district; private CommunityReferenceDto community; @@ -55,6 +58,8 @@ public FacilityIndexDto( String uuid, String name, FacilityType type, + DhimsFacility dhimsFacilityType, + AFPFacilityOptions afpFacilityOptions, String regionUuid, String regionName, String districtUuid, @@ -69,6 +74,8 @@ public FacilityIndexDto( this.uuid = uuid; this.name = name; this.type = type; + this.dhimsFacilityType = dhimsFacilityType; + this.afpFacilityOptions = afpFacilityOptions; if (regionUuid != null) { this.region = new RegionReferenceDto(regionUuid, regionName, null); } @@ -108,6 +115,20 @@ public FacilityType getType() { public void setType(FacilityType type) { this.type = type; } + public DhimsFacility getDhimsFacilityType() { + return dhimsFacilityType; + } + + public void setDhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + } + public AFPFacilityOptions getAfpFacilityOptions() { + return afpFacilityOptions; + } + + public void setAfpFacilityOptions(AFPFacilityOptions afpFacilityOptions) { + this.afpFacilityOptions = afpFacilityOptions; + } public RegionReferenceDto getRegion() { return region; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityTypeGroup.java b/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityTypeGroup.java index 53ebde5e5bc..30b955a65e1 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityTypeGroup.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/infrastructure/facility/FacilityTypeGroup.java @@ -16,8 +16,10 @@ package de.symeda.sormas.api.infrastructure.facility; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import de.symeda.sormas.api.event.TypeOfPlace; import de.symeda.sormas.api.i18n.I18nProperties; public enum FacilityTypeGroup { @@ -46,6 +48,8 @@ public static List getAccomodationGroups() { return accomodationGroups; } + //public static final List FOR_DHIMS = Arrays.asList(CHPS_COMPOUND, MATERNITY_HOME, CLINIC, HEALTH_CENTRE, POLYCLINIC, HOSPITAL); + @Override public String toString() { return I18nProperties.getEnumCaption(this); diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/location/LocationDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/location/LocationDto.java index 035d618ed26..2a49193ee32 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/location/LocationDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/location/LocationDto.java @@ -22,6 +22,7 @@ import javax.validation.constraints.Size; import de.symeda.sormas.api.Disease; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import org.apache.commons.lang3.StringUtils; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -81,6 +82,7 @@ public class LocationDto extends PseudonymizableDto { public static final String ADDRESS_TYPE = "addressType"; public static final String ADDRESS_TYPE_DETAILS = "addressTypeDetails"; public static final String FACILITY_TYPE = "facilityType"; + public static final String DHIMS_FACILITY_TYPE = "dhimsFacilityType"; public static final String FACILITY = "facility"; public static final String FACILITY_DETAILS = "facilityDetails"; public static final String CONTACT_PERSON_FIRST_NAME = "contactPersonFirstName"; @@ -150,6 +152,9 @@ public class LocationDto extends PseudonymizableDto { private String addressTypeDetails; @PersonalData private FacilityType facilityType; + + @PersonalData + private DhimsFacility dhimsFacilityType; @PersonalData @SensitiveData private FacilityReferenceDto facility; @@ -338,6 +343,14 @@ public void setFacilityType(FacilityType facilityType) { this.facilityType = facilityType; } + public DhimsFacility getDhimsFacilityType() { + return dhimsFacilityType; + } + + public void setDhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + } + public FacilityReferenceDto getFacility() { return facility; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonDto.java index c13f8024125..0d065d2d024 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/person/PersonDto.java @@ -74,6 +74,7 @@ public class PersonDto extends PseudonymizableDto { public static final String SALUTATION = "salutation"; public static final String OTHER_SALUTATION = "otherSalutation"; public static final String PRESENT_CONDITION = "presentCondition"; + public static final String HOME_ADDRESS_RECREATIONAL = "homeAddressRecreational"; public static final String CASE_ORIGIN = "caseOrigin"; public static final String BIRTH_DATE = "birthdate"; public static final String BIRTH_DATE_DD = "birthdateDD"; @@ -132,8 +133,11 @@ public class PersonDto extends PseudonymizableDto { public static final String CITIZENSHIP = "citizenship"; public static final String ADDITIONAL_DETAILS = "additionalDetails"; private static final long serialVersionUID = -8558187171374254398L; + public static final String DISEASE = "disease"; + public static final String ADDITIONAL_PLACES_STAYED = "additionalPlacesStayed"; // Fields are declared in the order they should appear in the import template + @Outbreaks @Required @PersonalData(mandatoryField = true) @@ -396,6 +400,11 @@ public class PersonDto extends PseudonymizableDto { @Required private Disease disease; + @Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong) + private String additionalPlacesStayed; + + private String homeAddressRecreational; + @SuppressWarnings("serial") public static class SeveralNonPrimaryContactDetailsException extends RuntimeException { @@ -1089,4 +1098,20 @@ public PersonDto clone() throws CloneNotSupportedException { return clone; } + + public String getAdditionalPlacesStayed() { + return additionalPlacesStayed; + } + + public void setAdditionalPlacesStayed(String additionalPlacesStayed) { + this.additionalPlacesStayed = additionalPlacesStayed; + } + + public String getHomeAddressRecreational() { + return homeAddressRecreational; + } + + public void setHomeAddressRecreational(String homeAddressRecreational) { + this.homeAddressRecreational = homeAddressRecreational; + } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/AdditionalTestType.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/AdditionalTestType.java index b2053e72680..4fa98b59f4b 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/AdditionalTestType.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/AdditionalTestType.java @@ -24,18 +24,18 @@ public enum AdditionalTestType { HAEMOGLOBINURIA(SampleMaterial.URINE), PROTEINURIA(SampleMaterial.URINE), HEMATURIA(SampleMaterial.URINE), - ARTERIAL_VENOUS_BLOOD_GAS(SampleMaterial.BLOOD), - ALT_SGPT(SampleMaterial.BLOOD), - AST_SGOT(SampleMaterial.BLOOD), - CREATININE(SampleMaterial.BLOOD), - POTASSIUM(SampleMaterial.BLOOD), - UREA(SampleMaterial.BLOOD), - HAEMOGLOBIN(SampleMaterial.BLOOD), - TOTAL_BILIRUBIN(SampleMaterial.BLOOD), - CONJ_BILIRUBIN(SampleMaterial.BLOOD), - WBC_COUNT(SampleMaterial.BLOOD), - PLATELETS(SampleMaterial.BLOOD), - PROTHROMBIN_TIME(SampleMaterial.BLOOD); + ARTERIAL_VENOUS_BLOOD_GAS(SampleMaterial.WHOLE_BLOOD), + ALT_SGPT(SampleMaterial.WHOLE_BLOOD), + AST_SGOT(SampleMaterial.WHOLE_BLOOD), + CREATININE(SampleMaterial.WHOLE_BLOOD), + POTASSIUM(SampleMaterial.WHOLE_BLOOD), + UREA(SampleMaterial.WHOLE_BLOOD), + HAEMOGLOBIN(SampleMaterial.WHOLE_BLOOD), + TOTAL_BILIRUBIN(SampleMaterial.WHOLE_BLOOD), + CONJ_BILIRUBIN(SampleMaterial.WHOLE_BLOOD), + WBC_COUNT(SampleMaterial.WHOLE_BLOOD), + PLATELETS(SampleMaterial.WHOLE_BLOOD), + PROTHROMBIN_TIME(SampleMaterial.WHOLE_BLOOD); private SampleMaterial sampleMaterial; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.java index 6110daca413..98cf3344073 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/PathogenTestType.java @@ -19,9 +19,14 @@ import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.infrastructure.facility.FacilityType; import de.symeda.sormas.api.utils.DataHelper; import de.symeda.sormas.api.utils.Diseases; +import java.nio.file.Path; +import java.util.Arrays; +import java.util.List; + public enum PathogenTestType { ANTIBODY_DETECTION, @@ -58,6 +63,12 @@ public enum PathogenTestType { DNA_MICROARRAY, OTHER; + public static final List DISEASE_TESTS = Arrays.asList( + IGM_SERUM_ANTIBODY, + IGG_SERUM_ANTIBODY, + PCR_RT_PCR + ); + @Override public String toString() { return I18nProperties.getEnumCaption(this); diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleDto.java index f8dbd180818..7e6ed7cfee0 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleDto.java @@ -15,9 +15,11 @@ package de.symeda.sormas.api.sample; import de.symeda.sormas.api.Disease; +import de.symeda.sormas.api.caze.CaseClassification; import de.symeda.sormas.api.feature.FeatureType; import de.symeda.sormas.api.utils.*; +import java.security.Timestamp; import java.util.Date; import java.util.Set; @@ -34,6 +36,9 @@ import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; import de.symeda.sormas.api.sormastosormas.SormasToSormasShareableDto; import de.symeda.sormas.api.user.UserReferenceDto; +import de.symeda.sormas.api.utils.pseudonymization.SampleDispatchMode; +import org.bouncycastle.asn1.x509.Time; +import org.joda.time.DateTime; @DependingOnFeatureType(featureType = FeatureType.SAMPLES_LAB) public class SampleDto extends SormasToSormasShareableDto { @@ -55,6 +60,27 @@ public class SampleDto extends SormasToSormasShareableDto { public static final String LAB = "lab"; public static final String LAB_DETAILS = "labDetails"; public static final String SAMPLE_PURPOSE = "samplePurpose"; + public static final String CSF_SAMPLE_COLLECTED = "csfSampleCollected"; + public static final String CSF_REASON = "csfReason"; + public static final String APPEARANCE_OF_CSF = "appearanceOfCsf"; + public static final String INOCULATION_TIME_TRANSPORT_MEDIA = "inoculationTimeTransportMedia"; + public static final String SAMPLE_SENT_TO_LAB = "sampleSentToLab"; + public static final String DATE_SAMPLE_SENT_TO_LAB = "dateSampleSentToLab"; + public static final String SAMPLE_CONTAINER_USED = "sampleContainerUsed"; + public static final String RDT_PERFORMED = "rdtPerformed"; + public static final String RDT_RESULTS = "rdtResults"; + public static final String DISTRICT_NOTIFICATION_DATE = "districtNotificationDate"; + public static final String NAME_OF_PERSON = "nameOfPerson"; + public static final String TEL_NUMBER = "telNumber"; + public static final String DATE_FORM_SENT_TO_DISTRICT = "dateFormSentToDistrict"; + public static final String DATE_FORM_RECEIVED_AT_DISTRICT = "dateFormReceivedAtDistrict"; + public static final String DATE_FORM_SENT_TO_REGION = "dateFormSentToRegion"; + public static final String DATE_FORM_RECEIVED_AT_REGION = "dateFormReceivedAtRegion"; + public static final String DATE_FORM_SENT_TO_NATIONAL = "dateFormSentToNational"; + public static final String DATE_FORM_RECEIVED_AT_NATIONAL = "dateFormReceivedAtNational"; + public static final String REASON_NOT_SENT_TO_LAB = "reasonNotSentToLab"; + + public static final String SHIPMENT_DATE = "shipmentDate"; public static final String SHIPMENT_DETAILS = "shipmentDetails"; public static final String RECEIVED_DATE = "receivedDate"; @@ -66,10 +92,13 @@ public class SampleDto extends SormasToSormasShareableDto { public static final String SHIPPED = "shipped"; public static final String RECEIVED = "received"; public static final String PATHOGEN_TESTING_REQUESTED = "pathogenTestingRequested"; - public static final String SAMPLE_MATERIAL_REQUESTED = "sampleMaterialRequested"; + public static final String SAMPLE_MATERIAL_REQUESTED = "sampleMaterialTestingRequested"; public static final String ADDITIONAL_TESTING_REQUESTED = "additionalTestingRequested"; public static final String REQUESTED_PATHOGEN_TESTS = "requestedPathogenTests"; public static final String REQUESTED_SAMPLE_MATERIALS = "requestedSampleMaterials"; + public static final String SAMPLE_TESTS = "sampleTests"; + public static final String SAMPLE_DISPATCH_MODE = "sampleDispatchMode"; + public static final String SAMPLE_DISPATCH_DATE = "sampleDispatchDate"; public static final String REQUESTED_ADDITIONAL_TESTS = "requestedAdditionalTests"; public static final String PATHOGEN_TEST_RESULT = "pathogenTestResult"; public static final String REQUESTED_OTHER_PATHOGEN_TESTS = "requestedOtherPathogenTests"; @@ -80,6 +109,57 @@ public class SampleDto extends SormasToSormasShareableDto { public static final String OTHER_DELETION_REASON = "otherDeletionReason"; public static final String IPSAMPLESENT = "ipSampleSent"; public static final String IPSAMPLERESULTS = "ipSampleResults"; + public static final String DISEASE = "disease"; + + + + public static final String LABORATORY_NAME = "laboratoryName"; + public static final String LABORATORY_SAMPLE_DATE_RECEIVED = "laboratorySampleDateReceived"; + public static final String LABORATORY_NUMBER = "laboratoryNumber"; + public static final String LABORATORY_SAMPLE_CONTAINER_RECEIVED = "laboratorySampleContainerReceived"; + public static final String LABORATORY_TYPE = "laboratoryType"; + public static final String LABORATORY_SAMPLE_CONTAINER_OTHER = "laboratorySampleContainerOther"; + public static final String LABORATORY_SAMPLE_CONDITION = "laboratorySampleCondition"; + public static final String LABORATORY_APPEARANCE_OF_CSF = "laboratoryAppearanceOfCSF"; + public static final String LABORATORY_TEST_PERFORMED = "laboratoryTestPerformed"; + public static final String LABORATORY_TEST_PERFORMED_OTHER = "laboratoryTestPerformedOther"; + public static final String LABORATORY_CYTOLOGY = "laboratoryCytology"; + public static final String LABORATORY_GRAM = "laboratoryGram"; + public static final String LABORATORY_GRAM_OTHER = "laboratoryGramOther"; + public static final String LABORATORY_RDT_PERFORMED = "laboratoryRdtPerformed"; + public static final String LABORATORY_RDT_RESULTS = "laboratoryRdtResults"; + public static final String LABORATORY_LATEX = "laboratoryLatex"; + public static final String LABORATORY_CULTURE = "laboratoryCulture"; + public static final String LABORATORY_CULTURE_OTHER = "laboratoryCultureOther"; + public static final String LABORATORY_OTHER_TESTS = "laboratoryOtherTests"; + public static final String LABORATORY_OTHER_TESTS_RESULTS = "laboratoryOtherTestsResults"; + public static final String LABORATORY_CEFTRIAXONE = "laboratoryCeftriaxone"; + public static final String LABORATORY_PENICILLIN_G = "laboratoryPenicillinG"; + public static final String LABORATORY_AMOXYCILLIN = "laboratoryAmoxycillin"; + public static final String LABORATORY_OXACILLIN = "laboratoryOxacillin"; + public static final String LABORATORY_ANTIBIOGRAM_OTHER = "laboratoryAntibiogramOther"; + public static final String LABORATORY_DATE_PCR_PERFORMED = "laboratoryDatePcrPerformed"; + public static final String LABORATORY_PCR_TYPE = "laboratoryPcrType"; + public static final String LABORATORY_PCR_OPTIONS = "laboratoryPcrOptions"; + public static final String LABORATORY_SEROTYPE = "laboratorySerotype"; + public static final String LABORATORY_SEROTYPE_TYPE = "laboratorySerotypeType"; + public static final String LABORATORY_SEROTYPE_RESULTS = "laboratorySerotypeResults"; + public static final String LABORATORY_FINAL_RESULTS = "laboratoryFinalResults"; + public static final String LABORATORY_OBSERVATIONS = "laboratoryObservations"; + public static final String LABORATORY_DATE_RESULTS_SENT_HEALTH_FACILITY = "laboratoryDateResultsSentHealthFacility"; + public static final String LABORATORY_DATE_RESULTS_SENT_DSD = "laboratoryDateResultsSentDSD"; + public static final String LABORATORY_FINAL_CLASSIFICATION = "laboratoryFinalClassification"; + + //AFP + public static final String DATE_SENT_NATIONAL_REG_LAB = "dateSentToNationalRegLab"; + public static final String DATE_DIFFERENTIATION_SENT_EPI = "dateDifferentiationSentToEpi"; + public static final String DATE_DIFFERENTIATION_RECEIVED_EPI = "dateDifferentiationReceivedFromEpi"; + public static final String DATE_ISOLATE_SENT_SEQUENCING = "dateIsolateSentForSequencing"; + public static final String DATE_SEQ_RESULTS_SENT_PROGRAM = "dateSeqResultsSentToProgram"; + public static final String FINAL_LAB_RESULTS = "finalLabResults"; + public static final String IMMUNOCOMPROMISED_STATUS_SUSPECTED = "immunocompromisedStatusSuspected"; + public static final String AFP_FINAL_CLASSIFICATION = "afpFinalClassification"; + private CaseReferenceDto associatedCase; private ContactReferenceDto associatedContact; @@ -108,6 +188,7 @@ public class SampleDto extends SormasToSormasShareableDto { @Required private SampleMaterial sampleMaterial; + private Disease disease; @SensitiveData @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String sampleMaterialText; @@ -133,14 +214,17 @@ public class SampleDto extends SormasToSormasShareableDto { private SampleSource sampleSource; private SampleReferenceDto referredTo; private boolean shipped; + private boolean sampleMaterialTypeForYF; + private boolean sampleDiseaseTests; private boolean received; private PathogenTestResultType pathogenTestResult; private Boolean pathogenTestingRequested; - private Boolean sampleMaterialRequested; + private Boolean sampleMaterialTestingRequested; private Boolean additionalTestingRequested; private Set requestedPathogenTests; - private Set requestedSampleMaterials; + private Set requestedSampleMaterials; + private Set sampleTests; private Set requestedAdditionalTests; @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String requestedOtherPathogenTests; @@ -158,7 +242,231 @@ public class SampleDto extends SormasToSormasShareableDto { private String otherDeletionReason; private YesNoUnknown ipSampleSent; - private Disease ipSampleResults; + private IpResult ipSampleResults; + private SampleDispatchMode sampleDispatchMode; + private Date sampleDispatchDate; + + private YesNo csfSampleCollected; + private YesNo rdtPerformed; + private YesNo sampleSentToLab; + + private CsfReason csfReason; + private CsfAppearance appearanceOfCsf; + private SampleContainerUsed sampleContainerUsed; + + private String rdtResults; + private String reasonNotSentToLab; + private String nameOfPerson; + private String telNumber; + + private Date inoculationTimeTransportMedia; + private Date districtNotificationDate; + private Date dateSampleSentToLab; + private Date dateFormSentToDistrict; + private Date dateFormReceivedAtDistrict; + private Date dateFormSentToRegion; + private Date dateFormReceivedAtRegion; + private Date dateFormSentToNational; + private Date dateFormReceivedAtNational; + + + private String laboratoryName; + private String laboratoryNumber; + private String laboratorySerotype; + private String laboratorySerotypeType; + private String laboratorySerotypeResults; + private String laboratoryFinalResults; + private String laboratoryObservations; + private String laboratorySampleContainerOther; + private String laboratoryTestPerformedOther; + private String laboratoryCytology; + private String laboratoryGramOther; + private String laboratoryCultureOther; + private String laboratoryOtherTests; + private String laboratoryOtherTestsResults; + private String laboratoryRdtResults; + private CaseClassification laboratoryFinalClassification; + private String laboratoryPcrType; + + private SampleContainerUsed laboratorySampleContainerReceived; + private SpecimenCondition laboratorySampleCondition; + private CsfAppearance laboratoryAppearanceOfCSF; + private LabTest laboratoryTestPerformed; + private Gram laboratoryGram; + private YesNo laboratoryRdtPerformed; + private LatexCulture laboratoryLatex; + private LatexCulture laboratoryCulture; + private LatexCulture laboratoryPcrOptions; + private Antibiogram laboratoryCeftriaxone; + private Antibiogram laboratoryPenicillinG; + private Antibiogram laboratoryAmoxycillin; + private Antibiogram laboratoryOxacillin; + private Antibiogram laboratoryAntibiogramOther; + private LabType laboratoryType; + + private Date laboratoryDateResultsSentHealthFacility; + private Date laboratoryDateResultsSentDSD; + private Date laboratorySampleDateReceived; + private Date laboratoryDatePcrPerformed; + + //AFP + private Date dateSentToNationalRegLab; + private Date dateDifferentiationSentToEpi; + private Date dateDifferentiationReceivedFromEpi; + private Date dateIsolateSentForSequencing; + private Date dateSeqResultsSentToProgram; + + private PosNeg finalLabResults; + private YesNoUnknown immunocompromisedStatusSuspected; + private AFPClassification afpFinalClassification; + + + + public YesNo getCsfSampleCollected() { + return csfSampleCollected; + } + public void setCsfSampleCollected(YesNo csfSampleCollected) { + this.csfSampleCollected = csfSampleCollected; + } + public YesNo getRdtPerformed() { + return rdtPerformed; + } + public void setRdtPerformed(YesNo rdtPerformed) { + this.rdtPerformed = rdtPerformed; + } + public YesNo getSampleSentToLab() { + return sampleSentToLab; + } + public void setSampleSentToLab(YesNo sampleSentToLab) { + this.sampleSentToLab = sampleSentToLab; + } + + public CsfReason getCsfReason() { + return csfReason; + } + public void setCsfReason(CsfReason csfReason) { + this.csfReason = csfReason; + } + public CsfAppearance getAppearanceOfCsf() {return appearanceOfCsf; } + public void setAppearanceOfCsf(CsfAppearance appearanceOfCsf) { + this.appearanceOfCsf = appearanceOfCsf; + } + public SampleContainerUsed getSampleContainerUsed() { + return sampleContainerUsed; + } + public void setSampleContainerUsed(SampleContainerUsed sampleContainerUsed) { + this.sampleContainerUsed = sampleContainerUsed; + } + + public String getRdtResults() { + return rdtResults; + } + + public void setRdtResults(String rdtResults) { + this.rdtResults = rdtResults; + } + + public String getReasonNotSentToLab() { + return reasonNotSentToLab; + } + + public void setReasonNotSentToLab(String reasonNotSentToLab) { + this.reasonNotSentToLab = reasonNotSentToLab; + } + public String getNameOfPerson() { + return nameOfPerson; + } + + public void setNameOfPerson(String nameOfPerson) { + this.nameOfPerson = nameOfPerson; + } + public String getTelNumber() { + return telNumber; + } + + public void setTelNumber(String telNumber) { + this.telNumber = telNumber; + } + + public Date getInoculationTimeTransportMedia() { + return inoculationTimeTransportMedia; + } + + public void setInoculationTimeTransportMedia(Date inoculationTimeTransportMedia) { + this.inoculationTimeTransportMedia = inoculationTimeTransportMedia; + } + + public Date getDistrictNotificationDate() { + return districtNotificationDate; + } + + public void setDistrictNotificationDate(Date districtNotificationDate) { + this.districtNotificationDate = districtNotificationDate; + } + + public Date getDateSampleSentToLab() { + return dateSampleSentToLab; + } + + public void setDateSampleSentToLab(Date dateSampleSentToLab) { + this.dateSampleSentToLab = dateSampleSentToLab; + } + + public Date getDateFormSentToDistrict() { + return dateFormSentToDistrict; + } + + public void setDateFormSentToDistrict(Date dateFormSentToDistrict) { + this.dateFormSentToDistrict = dateFormSentToDistrict; + } + + public Date getDateFormReceivedAtDistrict() { + return dateFormReceivedAtDistrict; + } + + public void setDateFormReceivedAtDistrict(Date dateFormReceivedAtDistrict) { + this.dateFormReceivedAtDistrict = dateFormReceivedAtDistrict; + } + + public Date getDateFormSentToRegion() { + return dateFormSentToRegion; + } + + public void setDateFormSentToRegion(Date dateFormSentToRegion) { + this.dateFormSentToRegion = dateFormSentToRegion; + } + + public Date getDateFormReceivedAtRegion() { + return dateFormReceivedAtRegion; + } + + public void setDateFormReceivedAtRegion(Date dateFormReceivedAtRegion) { + this.dateFormReceivedAtRegion = dateFormReceivedAtRegion; + } + + public Date getDateFormSentToNational() { + return dateFormSentToNational; + } + + public void setDateFormSentToNational(Date dateFormSentToNational) { + this.dateFormSentToNational = dateFormSentToNational; + } + + public Date getDateFormReceivedAtNational() { + return dateFormReceivedAtNational; + } + + public void setDateFormReceivedAtNational(Date dateFormReceivedAtNational) { + this.dateFormReceivedAtNational = dateFormReceivedAtNational; + } + + public Date getSampleDispatchDate() { + return sampleDispatchDate; + } + + public void setSampleDispatchDate(Date sampleDispatchDate) { + this.sampleDispatchDate = sampleDispatchDate; + } public YesNoUnknown getIpSampleSent() { return ipSampleSent; @@ -168,14 +476,27 @@ public void setIpSampleSent(YesNoUnknown ipSampleSent) { this.ipSampleSent = ipSampleSent; } - public Disease getIpSampleResults(){ + public SampleDispatchMode getSampleDispatchMode() { + return sampleDispatchMode; + } + public void setSampleDispatchMode(SampleDispatchMode sampleDispatchMode) { + this.sampleDispatchMode = sampleDispatchMode; + } + public IpResult getIpSampleResults(){ return ipSampleResults; } - public void setIpSampleResults(Disease ipSampleResults) { + public void setIpSampleResults(IpResult ipSampleResults) { this.ipSampleResults = ipSampleResults; } + public Disease getDisease(){ + return disease; + } + public void setDisease(Disease disease) { + this.disease = disease; + } + @ImportIgnore public CaseReferenceDto getAssociatedCase() { return associatedCase; @@ -384,12 +705,29 @@ public void setPathogenTestingRequested(Boolean pathogenTestingRequested) { } @ImportIgnore - public Boolean getSampleMaterialRequested() { - return sampleMaterialRequested; + public Boolean getSampleMaterialTestingRequested() { + return sampleMaterialTestingRequested; } - public void setSampleMaterialRequested(Boolean sampleMaterialRequested) { - this.sampleMaterialRequested = sampleMaterialRequested; + public void setSampleMaterialTestingRequested(Boolean sampleMaterialTestingRequested) { + this.sampleMaterialTestingRequested = sampleMaterialTestingRequested; + } + @ImportIgnore + public boolean isYellowFeverSampleType() { + return sampleMaterialTypeForYF; + } + + public void setYellowFeverSampleType(boolean sampleMaterialTypeForYF) { + this.sampleMaterialTypeForYF = sampleMaterialTypeForYF; + } + + @ImportIgnore + public boolean isDiseaseSampleTests() { + return sampleDiseaseTests; + } + + public void setDiseaseSampleTests(boolean sampleDiseaseTests) { + this.sampleDiseaseTests = sampleDiseaseTests; } @ImportIgnore @@ -409,15 +747,23 @@ public Set getRequestedPathogenTests() { public void setRequestedPathogenTests(Set requestedPathogenTests) { this.requestedPathogenTests = requestedPathogenTests; } - - public Set getRequestedSampleMaterials() { + @ImportIgnore + public Set getRequestedSampleMaterials() { return requestedSampleMaterials; } - public void setRequestedSampleMaterials(Set requestedSampleMaterials) { + public void setRequestedSampleMaterials(Set requestedSampleMaterials) { this.requestedSampleMaterials = requestedSampleMaterials; } + public Set getSampleTests() { + return sampleTests; + } + + public void setSampleTests(Set sampleTests) { + this.sampleTests = sampleTests; + } + @ImportIgnore public Set getRequestedAdditionalTests() { return requestedAdditionalTests; @@ -529,15 +875,86 @@ private static void migrateAttributesOfPhysicalSample(SampleDto source, SampleDt target.setSampleMaterialText(source.getSampleMaterialText()); target.setSampleSource(source.getSampleSource()); target.setPathogenTestingRequested(source.getPathogenTestingRequested()); - target.setSampleMaterialRequested(source.getSampleMaterialRequested()); + target.setSampleMaterialTestingRequested(source.getSampleMaterialTestingRequested()); + target.setYellowFeverSampleType(source.isYellowFeverSampleType()); + target.setDiseaseSampleTests(source.isDiseaseSampleTests()); target.setAdditionalTestingRequested(source.getAdditionalTestingRequested()); target.setRequestedPathogenTests(source.getRequestedPathogenTests()); target.setRequestedSampleMaterials(source.getRequestedSampleMaterials()); + target.setSampleTests(source.getSampleTests()); target.setRequestedAdditionalTests(source.getRequestedAdditionalTests()); target.setFieldSampleID(source.getFieldSampleID()); target.setSamplingReason(source.getSamplingReason()); target.setSamplingReasonDetails(source.getSamplingReasonDetails()); target.setSamplePurpose(source.getSamplePurpose()); + + target.setCsfSampleCollected(source.getCsfSampleCollected()); + target.setRdtPerformed(source.getRdtPerformed()); + target.setSampleSentToLab(source.getSampleSentToLab()); + target.setCsfReason(source.getCsfReason()); + target.setAppearanceOfCsf(source.getAppearanceOfCsf()); + target.setSampleContainerUsed(source.getSampleContainerUsed()); + target.setRdtResults(source.getRdtResults()); + target.setReasonNotSentToLab(source.getReasonNotSentToLab()); + target.setNameOfPerson(source.getNameOfPerson()); + target.setTelNumber(source.getTelNumber()); + target.setInoculationTimeTransportMedia(source.getInoculationTimeTransportMedia()); + target.setDistrictNotificationDate(source.getDistrictNotificationDate()); + target.setDateSampleSentToLab(source.getDateSampleSentToLab()); + target.setDateFormSentToDistrict(source.getDateFormSentToDistrict()); + target.setDateFormReceivedAtDistrict(source.getDateFormReceivedAtDistrict()); + target.setDateFormSentToRegion(source.getDateFormSentToRegion()); + target.setDateFormReceivedAtRegion(source.getDateFormReceivedAtRegion()); + target.setDateFormSentToNational(source.getDateFormSentToNational()); + target.setDateFormReceivedAtNational(source.getDateFormReceivedAtNational()); + + target.setLaboratoryName(source.getLaboratoryName()); + target.setLaboratoryNumber(source.getLaboratoryNumber()); + target.setLaboratorySerotype(source.getLaboratorySerotype()); + target.setLaboratorySerotypeType(source.getLaboratorySerotypeType()); + target.setLaboratorySerotypeResults(source.getLaboratorySerotypeResults()); + target.setLaboratoryFinalResults(source.getLaboratoryFinalResults()); + target.setLaboratoryObservations(source.getLaboratoryObservations()); + target.setLaboratorySampleContainerOther(source.getLaboratorySampleContainerOther()); + target.setLaboratoryTestPerformedOther(source.getLaboratoryTestPerformedOther()); + target.setLaboratoryCytology(source.getLaboratoryCytology()); + target.setLaboratoryGramOther(source.getLaboratoryGramOther()); + target.setLaboratoryCultureOther(source.getLaboratoryCultureOther()); + target.setLaboratoryOtherTests(source.getLaboratoryOtherTests()); + target.setLaboratoryOtherTestsResults(source.getLaboratoryOtherTestsResults()); + target.setLaboratoryRdtResults(source.getLaboratoryRdtResults()); + target.setLaboratoryFinalClassification(source.getLaboratoryFinalClassification()); + target.setLaboratoryPcrType(source.getLaboratoryPcrType()); + target.setLaboratorySampleContainerReceived(source.getLaboratorySampleContainerReceived()); + target.setLaboratorySampleCondition(source.getLaboratorySampleCondition()); + target.setLaboratoryAppearanceOfCSF(source.getLaboratoryAppearanceOfCSF()); + target.setLaboratoryTestPerformed(source.getLaboratoryTestPerformed()); + target.setLaboratoryGram(source.getLaboratoryGram()); + target.setLaboratoryRdtPerformed(source.getLaboratoryRdtPerformed()); + target.setLaboratoryLatex(source.getLaboratoryLatex()); + target.setLaboratoryCulture(source.getLaboratoryCulture()); + target.setLaboratoryPcrOptions(source.getLaboratoryPcrOptions()); + target.setLaboratoryCeftriaxone(source.getLaboratoryCeftriaxone()); + target.setLaboratoryPenicillinG(source.getLaboratoryPenicillinG()); + target.setLaboratoryAmoxycillin(source.getLaboratoryAmoxycillin()); + target.setLaboratoryOxacillin(source.getLaboratoryOxacillin()); + target.setLaboratoryAntibiogramOther(source.getLaboratoryAntibiogramOther()); + target.setLaboratoryType(source.getLaboratoryType()); + target.setLaboratoryDateResultsSentHealthFacility(source.getLaboratoryDateResultsSentHealthFacility()); + target.setLaboratoryDateResultsSentDSD(source.getLaboratoryDateResultsSentDSD()); + target.setLaboratorySampleDateReceived(source.getLaboratorySampleDateReceived()); + target.setLaboratoryDatePcrPerformed(source.getLaboratoryDatePcrPerformed()); + target.setDateSentToNationalRegLab(source.getDateSentToNationalRegLab()); + target.setDateDifferentiationSentToEpi(source.getDateDifferentiationSentToEpi()); + target.setDateDifferentiationReceivedFromEpi(source.getDateDifferentiationReceivedFromEpi()); + target.setDateIsolateSentForSequencing(source.getDateIsolateSentForSequencing()); + target.setDateSeqResultsSentToProgram(source.getDateSeqResultsSentToProgram()); + target.setFinalLabResults(source.getFinalLabResults()); + target.setImmunocompromisedStatusSuspected(source.getImmunocompromisedStatusSuspected()); + target.setAfpFinalClassification(source.getAfpFinalClassification()); + + + } @ImportIgnore @@ -599,4 +1016,355 @@ public String getOtherDeletionReason() { public void setOtherDeletionReason(String otherDeletionReason) { this.otherDeletionReason = otherDeletionReason; } + + public String getLaboratoryName() { + return laboratoryName; + } + + public void setLaboratoryName(String laboratoryName) { + this.laboratoryName = laboratoryName; + } + + public String getLaboratoryNumber() { + return laboratoryNumber; + } + + public void setLaboratoryNumber(String laboratoryNumber) { + this.laboratoryNumber = laboratoryNumber; + } + + public String getLaboratorySerotype() { + return laboratorySerotype; + } + + public void setLaboratorySerotype(String laboratorySerotype) { + this.laboratorySerotype = laboratorySerotype; + } + + public String getLaboratorySerotypeType() { + return laboratorySerotypeType; + } + + public void setLaboratorySerotypeType(String laboratorySerotypeType) { + this.laboratorySerotypeType = laboratorySerotypeType; + } + + public String getLaboratorySerotypeResults() { + return laboratorySerotypeResults; + } + + public void setLaboratorySerotypeResults(String laboratorySerotypeResults) { + this.laboratorySerotypeResults = laboratorySerotypeResults; + } + + public String getLaboratoryFinalResults() { + return laboratoryFinalResults; + } + + public void setLaboratoryFinalResults(String laboratoryFinalResults) { + this.laboratoryFinalResults = laboratoryFinalResults; + } + + public String getLaboratoryObservations() { + return laboratoryObservations; + } + + public void setLaboratoryObservations(String laboratoryObservations) { + this.laboratoryObservations = laboratoryObservations; + } + + public String getLaboratorySampleContainerOther() { + return laboratorySampleContainerOther; + } + + public void setLaboratorySampleContainerOther(String laboratorySampleContainerOther) { + this.laboratorySampleContainerOther = laboratorySampleContainerOther; + } + + public String getLaboratoryTestPerformedOther() { + return laboratoryTestPerformedOther; + } + + public void setLaboratoryTestPerformedOther(String laboratoryTestPerformedOther) { + this.laboratoryTestPerformedOther = laboratoryTestPerformedOther; + } + + public String getLaboratoryCytology() { + return laboratoryCytology; + } + + public void setLaboratoryCytology(String laboratoryCytology) { + this.laboratoryCytology = laboratoryCytology; + } + + public String getLaboratoryGramOther() { + return laboratoryGramOther; + } + + public void setLaboratoryGramOther(String laboratoryGramOther) { + this.laboratoryGramOther = laboratoryGramOther; + } + + public String getLaboratoryCultureOther() { + return laboratoryCultureOther; + } + + public void setLaboratoryCultureOther(String laboratoryCultureOther) { + this.laboratoryCultureOther = laboratoryCultureOther; + } + + public String getLaboratoryOtherTests() { + return laboratoryOtherTests; + } + + public void setLaboratoryOtherTests(String laboratoryOtherTests) { + this.laboratoryOtherTests = laboratoryOtherTests; + } + + public String getLaboratoryOtherTestsResults() { + return laboratoryOtherTestsResults; + } + + public void setLaboratoryOtherTestsResults(String laboratoryOtherTestsResults) { + this.laboratoryOtherTestsResults = laboratoryOtherTestsResults; + } + + public String getLaboratoryRdtResults() { + return laboratoryRdtResults; + } + + public void setLaboratoryRdtResults(String laboratoryRdtResults) { + this.laboratoryRdtResults = laboratoryRdtResults; + } + + public CaseClassification getLaboratoryFinalClassification() { + return laboratoryFinalClassification; + } + + public void setLaboratoryFinalClassification(CaseClassification laboratoryFinalClassification) { + this.laboratoryFinalClassification = laboratoryFinalClassification; + } + + public String getLaboratoryPcrType() { + return laboratoryPcrType; + } + + public void setLaboratoryPcrType(String laboratoryPcrType) { + this.laboratoryPcrType = laboratoryPcrType; + } + + public SampleContainerUsed getLaboratorySampleContainerReceived() { + return laboratorySampleContainerReceived; + } + + public void setLaboratorySampleContainerReceived(SampleContainerUsed laboratorySampleContainerReceived) { + this.laboratorySampleContainerReceived = laboratorySampleContainerReceived; + } + + public SpecimenCondition getLaboratorySampleCondition() { + return laboratorySampleCondition; + } + + public void setLaboratorySampleCondition(SpecimenCondition laboratorySampleCondition) { + this.laboratorySampleCondition = laboratorySampleCondition; + } + + public CsfAppearance getLaboratoryAppearanceOfCSF() { + return laboratoryAppearanceOfCSF; + } + + public void setLaboratoryAppearanceOfCSF(CsfAppearance laboratoryAppearanceOfCSF) { + this.laboratoryAppearanceOfCSF = laboratoryAppearanceOfCSF; + } + + public LabTest getLaboratoryTestPerformed() { + return laboratoryTestPerformed; + } + + public void setLaboratoryTestPerformed(LabTest laboratoryTestPerformed) { + this.laboratoryTestPerformed = laboratoryTestPerformed; + } + + public Gram getLaboratoryGram() { + return laboratoryGram; + } + + public void setLaboratoryGram(Gram laboratoryGram) { + this.laboratoryGram = laboratoryGram; + } + + public YesNo getLaboratoryRdtPerformed() { + return laboratoryRdtPerformed; + } + + public void setLaboratoryRdtPerformed(YesNo laboratoryRdtPerformed) { + this.laboratoryRdtPerformed = laboratoryRdtPerformed; + } + + public LatexCulture getLaboratoryLatex() { + return laboratoryLatex; + } + + public void setLaboratoryLatex(LatexCulture laboratoryLatex) { + this.laboratoryLatex = laboratoryLatex; + } + + public LatexCulture getLaboratoryCulture() { + return laboratoryCulture; + } + + public void setLaboratoryCulture(LatexCulture laboratoryCulture) { + this.laboratoryCulture = laboratoryCulture; + } + + public LatexCulture getLaboratoryPcrOptions() { + return laboratoryPcrOptions; + } + + public void setLaboratoryPcrOptions(LatexCulture laboratoryPcrOptions) { + this.laboratoryPcrOptions = laboratoryPcrOptions; + } + + public Antibiogram getLaboratoryCeftriaxone() { + return laboratoryCeftriaxone; + } + + public void setLaboratoryCeftriaxone(Antibiogram laboratoryCeftriaxone) { + this.laboratoryCeftriaxone = laboratoryCeftriaxone; + } + + public Antibiogram getLaboratoryPenicillinG() { + return laboratoryPenicillinG; + } + + public void setLaboratoryPenicillinG(Antibiogram laboratoryPenicillinG) { + this.laboratoryPenicillinG = laboratoryPenicillinG; + } + + public Antibiogram getLaboratoryAmoxycillin() { + return laboratoryAmoxycillin; + } + + public void setLaboratoryAmoxycillin(Antibiogram laboratoryAmoxycillin) { + this.laboratoryAmoxycillin = laboratoryAmoxycillin; + } + + public Antibiogram getLaboratoryOxacillin() { + return laboratoryOxacillin; + } + + public void setLaboratoryOxacillin(Antibiogram laboratoryOxacillin) { + this.laboratoryOxacillin = laboratoryOxacillin; + } + + public Antibiogram getLaboratoryAntibiogramOther() { + return laboratoryAntibiogramOther; + } + + public void setLaboratoryAntibiogramOther(Antibiogram laboratoryAntibiogramOther) { + this.laboratoryAntibiogramOther = laboratoryAntibiogramOther; + } + + public LabType getLaboratoryType() { + return laboratoryType; + } + + public void setLaboratoryType(LabType laboratoryType) { + this.laboratoryType = laboratoryType; + } + public Date getLaboratoryDateResultsSentHealthFacility() { + return laboratoryDateResultsSentHealthFacility; + } + + public void setLaboratoryDateResultsSentHealthFacility(Date laboratoryDateResultsSentHealthFacility) { + this.laboratoryDateResultsSentHealthFacility = laboratoryDateResultsSentHealthFacility; + } + + public Date getLaboratoryDateResultsSentDSD() { + return laboratoryDateResultsSentDSD; + } + + public void setLaboratoryDateResultsSentDSD(Date laboratoryDateResultsSentDSD) { + this.laboratoryDateResultsSentDSD = laboratoryDateResultsSentDSD; + } + + public Date getLaboratorySampleDateReceived() { + return laboratorySampleDateReceived; + } + + public void setLaboratorySampleDateReceived(Date laboratorySampleDateReceived) { + this.laboratorySampleDateReceived = laboratorySampleDateReceived; + } + + public Date getLaboratoryDatePcrPerformed() { + return laboratoryDatePcrPerformed; + } + + public void setLaboratoryDatePcrPerformed(Date laboratoryDatePcrPerformed) { + this.laboratoryDatePcrPerformed = laboratoryDatePcrPerformed; + } + + public Date getDateSentToNationalRegLab() { + return dateSentToNationalRegLab; + } + + public void setDateSentToNationalRegLab(Date dateSentToNationalRegLab) { + this.dateSentToNationalRegLab = dateSentToNationalRegLab; + } + + public Date getDateDifferentiationSentToEpi() { + return dateDifferentiationSentToEpi; + } + + public void setDateDifferentiationSentToEpi(Date dateDifferentiationSentToEpi) { + this.dateDifferentiationSentToEpi = dateDifferentiationSentToEpi; + } + + public Date getDateDifferentiationReceivedFromEpi() { + return dateDifferentiationReceivedFromEpi; + } + + public void setDateDifferentiationReceivedFromEpi(Date dateDifferentiationReceivedFromEpi) { + this.dateDifferentiationReceivedFromEpi = dateDifferentiationReceivedFromEpi; + } + + public Date getDateIsolateSentForSequencing() { + return dateIsolateSentForSequencing; + } + + public void setDateIsolateSentForSequencing(Date dateIsolateSentForSequencing) { + this.dateIsolateSentForSequencing = dateIsolateSentForSequencing; + } + + public Date getDateSeqResultsSentToProgram() { + return dateSeqResultsSentToProgram; + } + + public void setDateSeqResultsSentToProgram(Date dateSeqResultsSentToProgram) { + this.dateSeqResultsSentToProgram = dateSeqResultsSentToProgram; + } + + public PosNeg getFinalLabResults() { + return finalLabResults; + } + + public void setFinalLabResults(PosNeg finalLabResults) { + this.finalLabResults = finalLabResults; + } + + public YesNoUnknown getImmunocompromisedStatusSuspected() { + return immunocompromisedStatusSuspected; + } + + public void setImmunocompromisedStatusSuspected(YesNoUnknown immunocompromisedStatusSuspected) { + this.immunocompromisedStatusSuspected = immunocompromisedStatusSuspected; + } + + public AFPClassification getAfpFinalClassification() { + return afpFinalClassification; + } + + public void setAfpFinalClassification(AFPClassification afpFinalClassification) { + this.afpFinalClassification = afpFinalClassification; + } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleIndexDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleIndexDto.java index 5a9635a8723..23d6dbe6df5 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleIndexDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleIndexDto.java @@ -30,8 +30,10 @@ import de.symeda.sormas.api.utils.DateFormatHelper; import de.symeda.sormas.api.utils.EmbeddedPersonalData; import de.symeda.sormas.api.utils.EmbeddedSensitiveData; +import de.symeda.sormas.api.utils.IpResult; import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableIndexDto; import de.symeda.sormas.api.utils.pseudonymization.Pseudonymizer; +import de.symeda.sormas.api.utils.pseudonymization.SampleDispatchMode; import de.symeda.sormas.api.utils.pseudonymization.valuepseudonymizers.EmptyValuePseudonymizer; import org.apache.commons.lang3.StringUtils; @@ -97,8 +99,14 @@ public class SampleIndexDto extends PseudonymizableIndexDto implements Serializa private Long pathogenTestCount; private PathogenTestType typeOfLastTest; private Float lastTestCqValue; - private SampleJurisdictionFlagsDto sampleJurisdictionFlagsDto; + private PathogenTestType sampleTests; + private String diseaseSampleTests; + private SampleDispatchMode sampleDispatchMode; + private Date sampleDispatchDate; + private String sampleTestsString; + private String ipSampleSent; + private IpResult ipSampleResults; //@formatter:off public SampleIndexDto(String uuid, String epidNumber, String labSampleId, Date sampleDateTime, @@ -111,7 +119,8 @@ public SampleIndexDto(String uuid, String epidNumber, String labSampleId, Date s String associatedEventParticipantUuid, String associatedEventParticipantFirstName, String associatedEventParticipantLastName, String associatedEventParticipantOtherName, Disease disease, String diseaseDetails, PathogenTestResultType pathogenTestResult, Boolean additionalTestingRequested, Boolean additionalTestPerformed, String districtName, String labUuid, Long pathogenTestCount, - boolean isInJurisdiction, boolean isCaseInJurisdiction, boolean isContactInJurisdiction, boolean isContactCaseInJurisdiction, boolean isEventParticipantInJurisdiction) { + boolean isInJurisdiction, boolean isCaseInJurisdiction, boolean isContactInJurisdiction, boolean isContactCaseInJurisdiction, boolean isEventParticipantInJurisdiction, PathogenTestType sampleTests, + String diseaseSampleTests, SampleDispatchMode sampleDispatchMode, Date sampleDispatchDate, String sampleTestsString, String ipSampleSent, IpResult ipSampleResults) { //@formatter:on super(uuid); @@ -162,6 +171,13 @@ public SampleIndexDto(String uuid, String epidNumber, String labSampleId, Date s isContactInJurisdiction, isContactCaseInJurisdiction, isEventParticipantInJurisdiction); + this.sampleTests = sampleTests; + this.diseaseSampleTests = diseaseSampleTests; + this.sampleDispatchMode = sampleDispatchMode; + this.sampleDispatchDate = sampleDispatchDate; + this.sampleTestsString = sampleTestsString; + this.ipSampleSent = ipSampleSent; + this.ipSampleResults = ipSampleResults; } public CaseReferenceDto getAssociatedCase() { @@ -268,6 +284,14 @@ public void setSamplePurpose(SamplePurpose samplePurpose) { this.samplePurpose = samplePurpose; } + public SampleDispatchMode getSampleDispatchMode() { + return sampleDispatchMode; + } + + public void setSampleDispatchMode(SampleDispatchMode sampleDispatchMode) { + this.sampleDispatchMode = sampleDispatchMode; + } + public boolean isShipped() { return shipped; } @@ -318,6 +342,22 @@ public void setPathogenTestResult(PathogenTestResultType pathogenTestResult) { this.pathogenTestResult = pathogenTestResult; } + public PathogenTestType getSampleTests() { + return sampleTests; + } + + public void setSampleTests(PathogenTestType sampleTests) { + this.sampleTests = sampleTests; + } + + public IpResult getIpSampleResults() { + return ipSampleResults; + } + + public void setIpSampleResults(IpResult ipSampleResults) { + this.ipSampleResults = ipSampleResults; + } + public Date getSampleDateTime() { return sampleDateTime; } @@ -326,6 +366,14 @@ public void setSampleDateTime(Date sampleDateTime) { this.sampleDateTime = sampleDateTime; } + public Date getSampleDispatchDate() { + return sampleDispatchDate; + } + + public void setSampleDispatchDate(Date sampleDispatchDate) { + this.sampleDispatchDate = sampleDispatchDate; + } + public AdditionalTestingStatus getAdditionalTestingStatus() { return additionalTestingStatus; } @@ -350,6 +398,30 @@ public void setSamplingReasonDetails(String samplingReasonDetails) { this.samplingReasonDetails = samplingReasonDetails; } + public String getDiseaseSampleTests() { + return diseaseSampleTests; + } + + public void setDiseaseSampleTests(String diseaseSampleTests) { + this.diseaseSampleTests = diseaseSampleTests; + } + + public String getSampleTestsString() { + return sampleTestsString; + } + + public void setSampleTestsString(String sampleTestsString) { + this.sampleTestsString = sampleTestsString; + } + + public String getIpSampleSent() { + return ipSampleSent; + } + + public void setIpSampleSent(String ipSampleSent) { + this.ipSampleSent = ipSampleSent; + } + public SampleJurisdictionFlagsDto getSampleJurisdictionFlagsDto() { return sampleJurisdictionFlagsDto; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleMaterial.java b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleMaterial.java index 7369d33bf82..df6c4f98cba 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleMaterial.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sample/SampleMaterial.java @@ -21,10 +21,14 @@ import de.symeda.sormas.api.i18n.I18nProperties; import de.symeda.sormas.api.utils.DataHelper; import de.symeda.sormas.api.utils.Diseases; +import de.symeda.sormas.api.utils.LatexCulture; + +import java.util.Arrays; +import java.util.List; public enum SampleMaterial { - BLOOD, + WHOLE_BLOOD, SERA, @Diseases(value = { Disease.CORONAVIRUS }, hide = true) @@ -63,12 +67,24 @@ public enum SampleMaterial { OP_ASPIRATE, NP_ASPIRATE, PLEURAL_FLUID, + PLASMA, + SERUM, + POST_MORTEM_LIVER_SPECIMEN, + PLASMA_SERUM, OTHER; + public static SampleMaterial[] YF_TYPES() { + return new SampleMaterial[] { SampleMaterial.WHOLE_BLOOD, SampleMaterial.SERUM, SampleMaterial.POST_MORTEM_LIVER_SPECIMEN }; + } + + @Override public String toString() { return I18nProperties.getEnumCaption(this); } + public static final List YF_TYPES = Arrays.asList( + WHOLE_BLOOD, SERUM, POST_MORTEM_LIVER_SPECIMEN); + public static String toString(SampleMaterial value, String details) { diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sixtyday/SixtyDayDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/sixtyday/SixtyDayDto.java new file mode 100644 index 00000000000..c714c774525 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sixtyday/SixtyDayDto.java @@ -0,0 +1,246 @@ +package de.symeda.sormas.api.sixtyday; + +import de.symeda.sormas.api.EntityDto; +import de.symeda.sormas.api.feature.FeatureType; +import de.symeda.sormas.api.hospitalization.HospitalizationDto; +import de.symeda.sormas.api.symptoms.SymptomState; +import de.symeda.sormas.api.utils.*; +import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto; + +import java.util.Date; + +@DependingOnFeatureType(featureType = FeatureType.CASE_SURVEILANCE) +public class SixtyDayDto extends PseudonymizableDto { + + private static final long serialVersionUID = 4846215199480684367L; + + public static final String I18N_PREFIX = "CaseSixtyDayFollowup"; + public static final String PERSON_EXAMINE_CASE = "personExamineCase"; + public static final String DATE_OF_FOLLOWUP = "dateOfFollowup"; + public static final String DATE_BIRTH = "dateBirth"; + public static final String RESIDENTIAL_LOCATION = "residentialLocation"; + public static final String PATIENT_FOUND = "patientFound"; + public static final String PATIENT_FOUND_REASON = "patientFoundReason"; + public static final String LOCATE_CHILD_ATTEMPT = "locateChildAttempt"; + public static final String PARALYSIS_WEAKNESS_PRESENT = "paralysisWeaknessPresent"; + public static final String PARALYSIS_WEAKNESS_PRESENT_SITE = "paralysisWeaknessPresentSite"; + public static final String PARALYZED_PART_OTHER = "paralyzedPartOther"; + public static final String PARALYSIS_WEAKNESS_FLOPPY = "paralysisWeaknessFloppy"; + public static final String PARALYZED_PART = "muscleToneParalyzedPart"; + public static final String OTHER_PART_BODY = "muscleToneOtherPartBody"; + public static final String DEEP_TENDON_REFLEX_SELECTION = "deepTendon"; + public static final String MUSCLE_VOLUME_SELECTION = "muscleVolume"; + public static final String SENSORY_LOSS_SELECTION = "sensoryLoss"; + public static final String PROVISIONAL_DIAGNOSIS = "provisionalDiagnosis"; + public static final String COMMENTS = "comments"; + public static final String CONTACT_DETAILS_NUMBER = "contactDetailsNumber"; + public static final String CONTACT_DETAILS_EMAIL = "contactDetailsEmail"; + public static final String SIGNATURE = "signature"; + public static final String DATE_SUBMISSION_FORMS = "dateSubmissionForms"; + + private String personExamineCase; + private Date dateOfFollowup; + private Date dateBirth; + private String residentialLocation; + private YesNo patientFound; + private String patientFoundReason; + private String locateChildAttempt; + private YesNo paralysisWeaknessPresent; + private ParalysisSite paralysisWeaknessPresentSite; + private String paralyzedPartOther; + private YesNo paralysisWeaknessFloppy; + private SymptomLevel muscleToneParalyzedPart; + private SymptomLevel muscleToneOtherPartBody; + private SymptomLevel deepTendon; + private NormalWasted muscleVolume; + private YesNo sensoryLoss; + private String provisionalDiagnosis; + private String comments; + private String contactDetailsNumber; + private String contactDetailsEmail; + private String signature; + private Date dateSubmissionForms; + + public static SixtyDayDto build() { + SixtyDayDto sixtyDayDto = new SixtyDayDto(); + sixtyDayDto.setUuid(DataHelper.createUuid()); + return sixtyDayDto; + } + + public String getPersonExamineCase() { + return personExamineCase; + } + + public void setPersonExamineCase(String personExamineCase) { + this.personExamineCase = personExamineCase; + } + + public Date getDateOfFollowup() { + return dateOfFollowup; + } + + public void setDateOfFollowup(Date dateOfFollowup) { + this.dateOfFollowup = dateOfFollowup; + } + + public Date getDateBirth() { + return dateBirth; + } + + public void setDateBirth(Date dateBirth) { + this.dateBirth = dateBirth; + } + + public String getResidentialLocation() { + return residentialLocation; + } + + public void setResidentialLocation(String residentialLocation) { + this.residentialLocation = residentialLocation; + } + + public YesNo getPatientFound() { + return patientFound; + } + + public void setPatientFound(YesNo patientFound) { + this.patientFound = patientFound; + } + + public String getPatientFoundReason() { + return patientFoundReason; + } + + public void setPatientFoundReason(String patientFoundReason) { + this.patientFoundReason = patientFoundReason; + } + + public String getLocateChildAttempt() { + return locateChildAttempt; + } + + public void setLocateChildAttempt(String locateChildAttempt) { + this.locateChildAttempt = locateChildAttempt; + } + + public YesNo getParalysisWeaknessPresent() { + return paralysisWeaknessPresent; + } + + public void setParalysisWeaknessPresent(YesNo paralysisWeaknessPresent) { + this.paralysisWeaknessPresent = paralysisWeaknessPresent; + } + public ParalysisSite getParalysisWeaknessPresentSite() { + return paralysisWeaknessPresentSite; + } + + public void setParalysisWeaknessPresentSite(ParalysisSite paralysisWeaknessPresentSite) { + this.paralysisWeaknessPresentSite = paralysisWeaknessPresentSite; + } + + public String getParalyzedPartOther() { + return paralyzedPartOther; + } + + public void setParalyzedPartOther(String paralyzedPartOther) { + this.paralyzedPartOther = paralyzedPartOther; + } + + public YesNo getParalysisWeaknessFloppy() { + return paralysisWeaknessFloppy; + } + + public void setParalysisWeaknessFloppy(YesNo paralysisWeaknessFloppy) { + this.paralysisWeaknessFloppy = paralysisWeaknessFloppy; + } + + public SymptomLevel getMuscleToneParalyzedPart() { + return muscleToneParalyzedPart; + } + + public void setMuscleToneParalyzedPart(SymptomLevel muscleToneParalyzedPart) { + this.muscleToneParalyzedPart = muscleToneParalyzedPart; + } + + public SymptomLevel getMuscleToneOtherPartBody() { + return muscleToneOtherPartBody; + } + + public void setMuscleToneOtherPartBody(SymptomLevel muscleToneOtherPartBody) { + this.muscleToneOtherPartBody = muscleToneOtherPartBody; + } + + public SymptomLevel getDeepTendon() { + return deepTendon; + } + + public void setDeepTendon(SymptomLevel deepTendon) { + this.deepTendon = deepTendon; + } + + public NormalWasted getMuscleVolume() { + return muscleVolume; + } + + public void setMuscleVolume(NormalWasted muscleVolume) { + this.muscleVolume = muscleVolume; + } + + public YesNo getSensoryLoss() { + return sensoryLoss; + } + + public void setSensoryLoss(YesNo sensoryLoss) { + this.sensoryLoss = sensoryLoss; + } + + public String getProvisionalDiagnosis() { + return provisionalDiagnosis; + } + + public void setProvisionalDiagnosis(String provisionalDiagnosis) { + this.provisionalDiagnosis = provisionalDiagnosis; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public String getContactDetailsNumber() { + return contactDetailsNumber; + } + + public void setContactDetailsNumber(String contactDetailsNumber) { + this.contactDetailsNumber = contactDetailsNumber; + } + + public String getContactDetailsEmail() { + return contactDetailsEmail; + } + + public void setContactDetailsEmail(String contactDetailsEmail) { + this.contactDetailsEmail = contactDetailsEmail; + } + + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + public Date getDateSubmissionForms() { + return dateSubmissionForms; + } + + public void setDateSubmissionForms(Date dateSubmissionForms) { + this.dateSubmissionForms = dateSubmissionForms; + } + + +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sixtyday/SixtyDayFacade.java b/sormas-api/src/main/java/de/symeda/sormas/api/sixtyday/SixtyDayFacade.java new file mode 100644 index 00000000000..68bd77eca9e --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sixtyday/SixtyDayFacade.java @@ -0,0 +1,7 @@ +package de.symeda.sormas.api.sixtyday; + +import javax.ejb.Remote; + +@Remote +public interface SixtyDayFacade { +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/sormastosormas/sharerequest/SormasToSormasCasePreview.java b/sormas-api/src/main/java/de/symeda/sormas/api/sormastosormas/sharerequest/SormasToSormasCasePreview.java index 3cabe0975e9..2383f57f524 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/sormastosormas/sharerequest/SormasToSormasCasePreview.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/sormastosormas/sharerequest/SormasToSormasCasePreview.java @@ -30,6 +30,7 @@ import de.symeda.sormas.api.i18n.Validations; import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; import de.symeda.sormas.api.infrastructure.facility.FacilityType; import de.symeda.sormas.api.infrastructure.pointofentry.PointOfEntryReferenceDto; @@ -60,6 +61,7 @@ public class SormasToSormasCasePreview extends PseudonymizableDto implements Has public static final String DISTRICT = "district"; public static final String COMMUNITY = "community"; public static final String FACILITY_TYPE = "facilityType"; + public static final String DHIMS_FACILITY_TYPE = "dhimsFacilityType"; public static final String HEALTH_FACILITY = "healthFacility"; public static final String HEALTH_FACILITY_DETAILS = "healthFacilityDetails"; public static final String POINT_OF_ENTRY = "pointOfEntry"; @@ -82,6 +84,7 @@ public class SormasToSormasCasePreview extends PseudonymizableDto implements Has @SensitiveData private CommunityReferenceDto community; private FacilityType facilityType; + private DhimsFacility dhimsFacilityType; @PersonalData @SensitiveData private FacilityReferenceDto healthFacility; @@ -197,6 +200,11 @@ public FacilityType getFacilityType() { public void setFacilityType(FacilityType facilityType) { this.facilityType = facilityType; } + public DhimsFacility getDhimsFacilityType() {return dhimsFacilityType;} + + public void setDhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + } public FacilityReferenceDto getHealthFacility() { return healthFacility; diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomState.java b/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomState.java index 8b0c7020c3b..4487ab15263 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomState.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomState.java @@ -22,8 +22,7 @@ public enum SymptomState { YES, - NO, - UNKNOWN; + NO; @Override public String toString() { diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java b/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java index ca66b24f012..6b263999dd3 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsDto.java @@ -27,6 +27,7 @@ import de.symeda.sormas.api.CountryHelper; import de.symeda.sormas.api.ImportIgnore; +import de.symeda.sormas.api.caze.CaseOutcome; import de.symeda.sormas.api.feature.FeatureType; import de.symeda.sormas.api.i18n.Validations; import de.symeda.sormas.api.utils.Complication; @@ -160,6 +161,7 @@ public class SymptomsDto extends PseudonymizableDto { public static final String OEDEMA_FACE_NECK = "oedemaFaceNeck"; public static final String OEDEMA_LOWER_EXTREMITY = "oedemaLowerExtremity"; public static final String ONSET_DATE = "onsetDate"; + public static final String DATE_OF_ONSET = "dateOfOnset"; public static final String ONSET_SYMPTOM = "onsetSymptom"; public static final String OPISTHOTONUS = "opisthotonus"; public static final String ORAL_ULCERS = "oralUlcers"; @@ -191,6 +193,10 @@ public class SymptomsDto extends PseudonymizableDto { public static final String SKIN_RASH = "skinRash"; public static final String SKIN_ULCERS = "skinUlcers"; public static final String SORE_THROAT = "soreThroat"; + public static final String MUSCLE_TONE = "muscleTone"; + public static final String DEEP_TENDON_REFLEX = "deepTendonReflex"; + public static final String MUSCLE_VOLUME = "muscleVolume"; + public static final String SENSORY_LOSS = "sensoryLoss"; public static final String SPLENOMEGALY = "splenomegaly"; public static final String STOMACH_BLEEDING = "stomachBleeding"; public static final String SUNKEN_EYES_FONTANELLE = "sunkenEyesFontanelle"; @@ -235,10 +241,13 @@ public class SymptomsDto extends PseudonymizableDto { public static final String HYPOGLYCEMIA = "hypoglycemia"; public static final String MENINGEAL_SIGNS = "meningealSigns"; public static final String OTHER_COMPLICATIONS = "otherComplications"; + public static final String FEVER_BODY_TEMP_GREATER = "feverBodyTempGreater"; public static final String OTHER_COMPLICATIONS_TEXT = "otherComplicationsText"; public static final String SEIZURES = "seizures"; public static final String SEPSIS = "sepsis"; public static final String SHOCK = "shock"; + public static final String OUTCOME = "outcome"; + public static final String PROVISONAL_DIAGNOSIS = "provisionalDiagnosis"; // Fields are declared in the order they should appear in the import template @@ -265,7 +274,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState abdominalPain; @Diseases({ @@ -282,7 +291,7 @@ public static SymptomsDto build() { OTHER }) @Outbreaks @HideForCountries - @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState anorexiaAppetiteLoss; @Diseases({ @@ -316,7 +325,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState blackeningDeathOfTissue; @Diseases({ @@ -330,7 +339,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState bleedingVagina; @Diseases({ @@ -344,7 +353,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState bloodInStool; private Integer bloodPressureDiastolic; @@ -362,7 +371,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @HideForCountries - @SymptomGrouping(SymptomGroup.URINARY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState bloodUrine; @Diseases({ @@ -376,7 +385,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @HideForCountries - @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState bloodyBlackStool; @Diseases({ @@ -387,7 +396,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState buboesGroinArmpitNeck; @Diseases({ @@ -399,7 +408,7 @@ public static SymptomsDto build() { OTHER }) @Outbreaks @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState bulgingFontanelle; @Diseases({ @@ -448,7 +457,7 @@ public static SymptomsDto build() { @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState conjunctivitis; @Diseases({ @@ -469,19 +478,19 @@ public static SymptomsDto build() { @Outbreaks @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_SWITZERLAND }) - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState cough; @Diseases({ CORONAVIRUS }) @HideForCountries - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState coughWithSputum; @Diseases({ CORONAVIRUS }) @HideForCountries - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState coughWithHeamoptysis; @Diseases({ @@ -497,7 +506,7 @@ public static SymptomsDto build() { @Outbreaks @DependantOn(UNEXPLAINED_BLEEDING) @HideForCountries - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState coughingBlood; @Diseases({ @@ -509,7 +518,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.URINARY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState darkUrine; @Diseases({ @@ -523,7 +532,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState dehydration; @Diseases({ @@ -543,7 +552,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @Outbreaks - @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState diarrhea; @Diseases({ @@ -561,7 +570,7 @@ public static SymptomsDto build() { CORONAVIRUS, UNDEFINED, OTHER }) - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState difficultyBreathing; @Diseases({ @@ -575,7 +584,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @HideForCountries - @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState digestedBloodVomit; @Diseases({ @@ -594,7 +603,7 @@ public static SymptomsDto build() { OTHER }) @Outbreaks @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState eyePainLightSensitive; @Diseases({ @@ -607,7 +616,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState eyesBleeding; @Diseases({ @@ -672,10 +681,10 @@ public static SymptomsDto build() { @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState fluidInLungCavity; - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private Integer glasgowComaScale; @Diseases({ @@ -691,7 +700,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState gumsBleeding; @Diseases({ @@ -727,7 +736,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState hearingloss; private Integer heartRate; @@ -743,7 +752,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState hiccups; @Diseases({ @@ -757,7 +766,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState injectionSiteBleeding; @Diseases({ @@ -771,13 +780,13 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState jaundice; @Diseases({ CONGENITAL_RUBELLA }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private YesNoUnknown jaundiceWithin24HoursOfBirth; @Diseases({ @@ -809,7 +818,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState kopliksSpots; @Diseases({ @@ -821,7 +830,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) /** Vesiculopustular rash */ private SymptomState lesions; @@ -834,7 +843,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private Boolean lesionsAllOverBody; @Diseases({ @@ -847,7 +856,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private Boolean lesionsArms; @Diseases({ @@ -860,7 +869,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState lesionsDeepProfound; @Diseases({ @@ -872,7 +881,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private Boolean lesionsFace; @Diseases({ @@ -884,7 +893,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private Boolean lesionsGenitals; @Diseases({ @@ -896,7 +905,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private Boolean lesionsLegs; @Diseases({ @@ -904,7 +913,7 @@ public static SymptomsDto build() { ANTHRAX }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private Date lesionsOnsetDate; @Diseases({ @@ -916,34 +925,34 @@ public static SymptomsDto build() { OTHER }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private Boolean lesionsPalmsHands; @Diseases({ MONKEYPOX }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState lesionsResembleImg1; @Diseases({ MONKEYPOX }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState lesionsResembleImg2; @Diseases({ MONKEYPOX }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState lesionsResembleImg3; @Diseases({ MONKEYPOX }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState lesionsResembleImg4; @Diseases({ @@ -955,7 +964,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState lesionsSameSize; @Diseases({ @@ -967,7 +976,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState lesionsSameState; @Diseases({ @@ -979,7 +988,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private Boolean lesionsSolesFeet; @Diseases({ @@ -991,7 +1000,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState lesionsThatItch; @Diseases({ @@ -1003,7 +1012,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(LESIONS) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private Boolean lesionsThorax; @Diseases({ @@ -1015,7 +1024,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState lossSkinTurgor; @Diseases({ @@ -1025,7 +1034,7 @@ public static SymptomsDto build() { @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState lymphadenopathy; @Diseases({ @@ -1036,7 +1045,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState lymphadenopathyAxillary; @Diseases({ @@ -1047,7 +1056,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState lymphadenopathyCervical; @Diseases({ @@ -1058,7 +1067,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState lymphadenopathyInguinal; @Diseases({ @@ -1117,7 +1126,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @Outbreaks - @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState nausea; @Diseases({ @@ -1129,7 +1138,7 @@ public static SymptomsDto build() { OTHER }) @Outbreaks @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState neckStiffness; @Diseases({ @@ -1144,7 +1153,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState noseBleeding; @Diseases({ @@ -1156,7 +1165,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.CARDIOVASCULAR) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState oedemaFaceNeck; @Diseases({ @@ -1168,12 +1177,15 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.CARDIOVASCULAR) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState oedemaLowerExtremity; @Outbreaks private Date onsetDate; + @Outbreaks + private Date dateOfOnset; + @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String onsetSymptom; @@ -1185,7 +1197,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState oralUlcers; @Diseases({ @@ -1202,7 +1214,7 @@ public static SymptomsDto build() { @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState otherHemorrhagicSymptoms; @Diseases({ @@ -1220,7 +1232,7 @@ public static SymptomsDto build() { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) @SensitiveData - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String otherHemorrhagicSymptomsText; @@ -1244,7 +1256,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @Outbreaks - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState otherNonHemorrhagicSymptoms; @Diseases({ @@ -1268,7 +1280,7 @@ public static SymptomsDto build() { @Outbreaks @DependantOn(OTHER_NON_HEMORRHAGIC_SYMPTOMS) @SensitiveData - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String otherNonHemorrhagicSymptomsText; @@ -1281,7 +1293,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState otitisMedia; @Diseases({ @@ -1293,7 +1305,7 @@ public static SymptomsDto build() { OTHER }) @Outbreaks @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState painfulLymphadenitis; @Diseases({ @@ -1305,7 +1317,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState palpableLiver; @Diseases({ @@ -1317,7 +1329,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState palpableSpleen; @Diseases({ @@ -1340,7 +1352,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState pharyngealErythema; @Diseases({ @@ -1352,7 +1364,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState pharyngealExudate; @Diseases({ @@ -1364,7 +1376,7 @@ public static SymptomsDto build() { AHF, UNDEFINED, OTHER }) - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState rapidBreathing; @Diseases({ @@ -1379,7 +1391,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @HideForCountries - @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState redBloodVomit; @Diseases({ @@ -1395,7 +1407,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState refusalFeedorDrink; private Integer respiratoryRate; @@ -1409,7 +1421,7 @@ public static SymptomsDto build() { CORONAVIRUS, UNDEFINED, OTHER }) - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState runnyNose; @Diseases({ @@ -1421,7 +1433,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState sidePain; @Diseases({ @@ -1455,7 +1467,7 @@ public static SymptomsDto build() { CORONAVIRUS }) @Outbreaks @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) /** Maculopapular rash */ private SymptomState skinRash; @@ -1473,9 +1485,38 @@ public static SymptomsDto build() { AHF, UNDEFINED, OTHER }) - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState soreThroat; + @Diseases({ + AFP, + UNDEFINED, + OTHER }) + @SymptomGrouping(SymptomGroup.GENERAL) + private SymptomState muscleTone; + + @Diseases({ + AFP, + UNDEFINED, + OTHER }) + @SymptomGrouping(SymptomGroup.GENERAL) + private SymptomState deepTendonReflex; + + @Diseases({ + AFP, + UNDEFINED, + OTHER }) + @SymptomGrouping(SymptomGroup.GENERAL) + private SymptomState muscleVolume; + + @Diseases({ + AFP, + UNDEFINED, + OTHER }) + @SymptomGrouping(SymptomGroup.GENERAL) + private SymptomState sensoryLoss; + + @Diseases({ AFP, GUINEA_WORM, @@ -1486,7 +1527,7 @@ public static SymptomsDto build() { OTHER }) @DependantOn(UNEXPLAINED_BLEEDING) @HideForCountries - @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState stomachBleeding; @Diseases({ @@ -1498,7 +1539,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState sunkenEyesFontanelle; @Diseases({ @@ -1510,7 +1551,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState swollenGlands; private Boolean symptomatic; @@ -1592,7 +1633,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState throbocytopenia; @Diseases({ @@ -1609,31 +1650,31 @@ public static SymptomsDto build() { @Diseases({ CONGENITAL_RUBELLA }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState bilateralCataracts; @Diseases({ CONGENITAL_RUBELLA }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState unilateralCataracts; @Diseases({ CONGENITAL_RUBELLA }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState congenitalGlaucoma; @Diseases({ CONGENITAL_RUBELLA }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState pigmentaryRetinopathy; @Diseases({ CONGENITAL_RUBELLA }) @HideForCountries - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState purpuricRash; @Diseases({ @@ -1644,13 +1685,13 @@ public static SymptomsDto build() { @Diseases({ CONGENITAL_RUBELLA }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState developmentalDelay; @Diseases({ CONGENITAL_RUBELLA }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState splenomegaly; @Diseases({ @@ -1662,26 +1703,26 @@ public static SymptomsDto build() { @Diseases({ CONGENITAL_RUBELLA }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState radiolucentBoneDisease; @Diseases({ CONGENITAL_RUBELLA }) @HideForCountries - @SymptomGrouping(SymptomGroup.CARDIOVASCULAR) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState congenitalHeartDisease; @Diseases({ CONGENITAL_RUBELLA }) @HideForCountries - @SymptomGrouping(SymptomGroup.CARDIOVASCULAR) + @SymptomGrouping(SymptomGroup.GENERAL) private CongenitalHeartDiseaseType congenitalHeartDiseaseType; @Diseases({ CONGENITAL_RUBELLA }) @HideForCountries @SensitiveData - @SymptomGrouping(SymptomGroup.CARDIOVASCULAR) + @SymptomGrouping(SymptomGroup.GENERAL) @Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong) private String congenitalHeartDiseaseDetails; @@ -1701,7 +1742,7 @@ public static SymptomsDto build() { @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState unexplainedBleeding; @Diseases({ @@ -1725,7 +1766,7 @@ public static SymptomsDto build() { OTHER }) @Outbreaks @HideForCountries - @SymptomGrouping(SymptomGroup.GASTROINTESTINAL) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState vomiting; @Diseases({ @@ -1761,19 +1802,19 @@ public static SymptomsDto build() { @Diseases({ RABIES }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState paresthesiaAroundWound; @Diseases({ RABIES }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState excessSalivation; @Diseases({ RABIES }) @HideForCountries - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState insomnia; @Diseases({ @@ -1834,7 +1875,7 @@ public static SymptomsDto build() { @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState coma; @Diseases({ @@ -1850,7 +1891,7 @@ public static SymptomsDto build() { @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState fluidInLungCavityAuscultation; @Diseases({ @@ -1860,7 +1901,7 @@ public static SymptomsDto build() { @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState fluidInLungCavityXray; @Diseases({ @@ -1870,7 +1911,7 @@ public static SymptomsDto build() { @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState abnormalLungXrayFindings; @Diseases({ @@ -1887,7 +1928,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries(countries = CountryHelper.COUNTRY_CODE_SWITZERLAND) - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState acuteRespiratoryDistressSyndrome; @Diseases({ @@ -1895,21 +1936,21 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountries(countries = CountryHelper.COUNTRY_CODE_SWITZERLAND) - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState pneumoniaClinicalOrRadiologic; @Diseases({ CORONAVIRUS, UNDEFINED, OTHER }) - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState lossOfTaste; @Diseases({ CORONAVIRUS, UNDEFINED, OTHER }) - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState lossOfSmell; @Diseases({ @@ -1928,7 +1969,7 @@ public static SymptomsDto build() { @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) - @SymptomGrouping(SymptomGroup.SKIN) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState skinUlcers; @Diseases({ @@ -1938,7 +1979,7 @@ public static SymptomsDto build() { @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) - @SymptomGrouping(SymptomGroup.OTHER) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState inabilityToWalk; @Diseases({ @@ -1948,7 +1989,7 @@ public static SymptomsDto build() { @HideForCountries(countries = { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState inDrawingOfChestWall; @Diseases({ @@ -1956,7 +1997,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountriesExcept - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState respiratoryDiseaseVentilation; @Diseases({ @@ -1976,7 +2017,7 @@ public static SymptomsDto build() { @HideForCountriesExcept(countries = { CountryHelper.COUNTRY_CODE_GERMANY, CountryHelper.COUNTRY_CODE_SWITZERLAND }) - @SymptomGrouping(SymptomGroup.CARDIOVASCULAR) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState fastHeartRate; @Diseases({ @@ -1984,7 +2025,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountriesExcept - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState oxygenSaturationLower94; private Integer weight; @@ -2226,49 +2267,49 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountriesExcept(countries = CountryHelper.COUNTRY_CODE_SWITZERLAND) - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState coughWithoutSputum; @Diseases({ CORONAVIRUS, UNDEFINED, OTHER }) @HideForCountriesExcept(countries = CountryHelper.COUNTRY_CODE_SWITZERLAND) - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState breathlessness; @Diseases({ CORONAVIRUS, UNDEFINED, OTHER }) @HideForCountriesExcept(countries = CountryHelper.COUNTRY_CODE_SWITZERLAND) - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState chestPressure; @Diseases({ CORONAVIRUS, UNDEFINED, OTHER }) @HideForCountriesExcept(countries = CountryHelper.COUNTRY_CODE_SWITZERLAND) - @SymptomGrouping(SymptomGroup.RESPIRATORY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState blueLips; @Diseases({ CORONAVIRUS, UNDEFINED, OTHER }) @HideForCountriesExcept(countries = CountryHelper.COUNTRY_CODE_SWITZERLAND) - @SymptomGrouping(SymptomGroup.CARDIOVASCULAR) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState bloodCirculationProblems; @Diseases({ CORONAVIRUS, UNDEFINED, OTHER }) @HideForCountriesExcept(countries = CountryHelper.COUNTRY_CODE_SWITZERLAND) - @SymptomGrouping(SymptomGroup.CARDIOVASCULAR) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState palpitations; @Diseases({ CORONAVIRUS, UNDEFINED, OTHER }) @HideForCountriesExcept(countries = CountryHelper.COUNTRY_CODE_SWITZERLAND) - @SymptomGrouping(SymptomGroup.CARDIOVASCULAR) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState dizzinessStandingUp; @Diseases({ @@ -2276,7 +2317,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountriesExcept(countries = CountryHelper.COUNTRY_CODE_SWITZERLAND) - @SymptomGrouping(SymptomGroup.CARDIOVASCULAR) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState highOrLowBloodPressure; @Diseases({ @@ -2284,7 +2325,7 @@ public static SymptomsDto build() { UNDEFINED, OTHER }) @HideForCountriesExcept(countries = CountryHelper.COUNTRY_CODE_SWITZERLAND) - @SymptomGrouping(SymptomGroup.URINARY) + @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState urinaryRetention; @Diseases({ @@ -2297,6 +2338,11 @@ public static SymptomsDto build() { @SymptomGrouping(SymptomGroup.GENERAL) private SymptomState shivering; + private YesNoUnknown feverBodyTempGreater; + @Outbreaks + private CaseOutcome outcome; + private String provisionalDiagnosis; + @Order(0) public Float getTemperature() { return temperature; @@ -3087,10 +3133,44 @@ public SymptomState getUrinaryRetention() { public Integer getWeight() { return weight; } + @Order(331) + public CaseOutcome getOutcome() { return outcome;} + + @Order(332) + public SymptomState getMuscleTone() { + return muscleTone; + } + + @Order(333) + public SymptomState getDeepTendonReflex() { + return deepTendonReflex; + } + @Order(334) + public SymptomState getMuscleVolume() { + return muscleVolume; + } + + @Order(335) + public SymptomState getSensoryLoss() { + return sensoryLoss; + } + @Order(336) + public String getProvisionalDiagnosis() { + return provisionalDiagnosis; + } + @Order(337) + public Date getDateOfOnset() { + return dateOfOnset; + } + @Order(338) + public YesNoUnknown getFeverBodyTempGreater(){return feverBodyTempGreater;} public void setAbdominalPain(SymptomState abdominalPain) { this.abdominalPain = abdominalPain; } + public void setOutcome(CaseOutcome outcome) { + this.outcome = outcome; + } public void setAlteredConsciousness(SymptomState alteredConsciousness) { this.alteredConsciousness = alteredConsciousness; @@ -3391,6 +3471,12 @@ public void setOedemaLowerExtremity(SymptomState oedemaLowerExtremity) { public void setOnsetDate(Date onsetDate) { this.onsetDate = onsetDate; } + public void setDateOfOnset(Date dateOfOnset) { + this.dateOfOnset = dateOfOnset; + } + public void setFeverBodyTempGreater(YesNoUnknown feverBodyTempGreater) { + this.feverBodyTempGreater = feverBodyTempGreater; + } public void setOnsetSymptom(String onsetSymptom) { this.onsetSymptom = onsetSymptom; @@ -3492,6 +3578,19 @@ public void setSoreThroat(SymptomState soreThroat) { this.soreThroat = soreThroat; } + public void setMuscleTone(SymptomState muscleTone) { + this.muscleTone = muscleTone; + } + public void setDeepTendonReflex(SymptomState deepTendonReflex) { + this.deepTendonReflex = deepTendonReflex; + } + public void setMuscleVolume(SymptomState muscleVolume) { + this.muscleVolume = muscleVolume; + } + public void setSensoryLoss(SymptomState sensoryLoss) { + this.sensoryLoss = sensoryLoss; + } + public void setStomachBleeding(SymptomState stomachBleeding) { this.stomachBleeding = stomachBleeding; } @@ -3835,6 +3934,10 @@ public void setOtherComplicationsText(String otherComplicationsText) { this.otherComplicationsText = otherComplicationsText; } + public void setProvisionalDiagnosis(String provisionalDiagnosis) { + this.provisionalDiagnosis = provisionalDiagnosis; + } + public void setRespiratoryDiseaseVentilation(SymptomState respiratoryDiseaseVentilation) { this.respiratoryDiseaseVentilation = respiratoryDiseaseVentilation; } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsHelper.java b/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsHelper.java index f2cac818899..2cec1198be1 100644 --- a/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsHelper.java +++ b/sormas-api/src/main/java/de/symeda/sormas/api/symptoms/SymptomsHelper.java @@ -315,7 +315,7 @@ public static Boolean allSymptomsFalse(SymptomsDto dto) { for (Method method : SymptomsDto.class.getDeclaredMethods()) { if (method.getReturnType() == SymptomState.class) { Object symptomState = method.invoke(dto); - if (symptomState == SymptomState.YES || symptomState == SymptomState.UNKNOWN || symptomState == null) { + if (symptomState == SymptomState.YES || symptomState == null) { return false; } } diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/AFPClassification.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/AFPClassification.java new file mode 100644 index 00000000000..f8bf43f6876 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/AFPClassification.java @@ -0,0 +1,19 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum AFPClassification { + CONFIRMED_POLIO, + COMPATIBLE, + DISCARDED, + NOT_AN_AFP_CASE, + cVDPV, + aVDPV, + iVDPV, + SERO_TYPE; + + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/Antibiogram.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/Antibiogram.java new file mode 100644 index 00000000000..a8d511239b1 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/Antibiogram.java @@ -0,0 +1,16 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum Antibiogram { + + SENSITIVE, + RESISTANT, + INTERMEDIATE, + NOT_DONE; + + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/CSMVaccines.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/CSMVaccines.java new file mode 100644 index 00000000000..11aaed5805f --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/CSMVaccines.java @@ -0,0 +1,21 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum CSMVaccines { + MenAC, + MenACW, + MenACWY, + MenA_CONJUNATE, + PCV13_1, + PCV13_2, + PCV13_3, + HIB_1, + HIB_2, + HIB_3; + + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/CsfAppearance.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/CsfAppearance.java new file mode 100644 index 00000000000..984f35b9026 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/CsfAppearance.java @@ -0,0 +1,16 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum CsfAppearance { + CLEAR, + CLOUDY, + BLOODY, + XANTHOCHROMIC, + TURBID, + PURULENT; + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/CsfReason.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/CsfReason.java new file mode 100644 index 00000000000..e844048a330 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/CsfReason.java @@ -0,0 +1,32 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.sample.PathogenTestType; + +import java.util.Arrays; +import java.util.List; + +public enum CsfReason { + LACK_OF_LP_KIT, + LACK_OF_SKILL, + LP_CONTRAINDICATED, + OTHER; + + + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } + + public static String toString(CsfReason value, String details) { + if (value == null) { + return ""; + } + + if (value == CsfReason.OTHER) { + return DataHelper.toStringNullable(details); + } + + return value.toString(); + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/Gram.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/Gram.java new file mode 100644 index 00000000000..e0bb4a44c16 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/Gram.java @@ -0,0 +1,15 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum Gram { + GPD, + GND, + GPB, + OTHER_PATHOGENS, + NO_ORGANISM_SEEN; + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/HospOut.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/HospOut.java new file mode 100644 index 00000000000..92eb56166a8 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/HospOut.java @@ -0,0 +1,13 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum HospOut { + HOSPITALIZED_DETAINED, + OUTPATIENT; + + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/IpResult.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/IpResult.java new file mode 100644 index 00000000000..aad7e6315c6 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/IpResult.java @@ -0,0 +1,13 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum IpResult { + IgM, + PRNT, + PCR; + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/LabTest.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/LabTest.java new file mode 100644 index 00000000000..1f070fda430 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/LabTest.java @@ -0,0 +1,16 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum LabTest { + + CYTOLOGY, + GRAM_STAIN, + LATEX, + RDT, + OTHER; + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/LabType.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/LabType.java new file mode 100644 index 00000000000..a401e0e8b26 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/LabType.java @@ -0,0 +1,14 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum LabType { + DISTRICT_LAB, + REGIONAL_LAB, + REFERENCE_LAB; + + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/LatexCulture.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/LatexCulture.java new file mode 100644 index 00000000000..0209692f1fb --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/LatexCulture.java @@ -0,0 +1,60 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.event.TypeOfPlace; +import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.sample.PathogenTestType; + +import java.util.Arrays; +import java.util.List; + +public enum LatexCulture { + + NMA, + NMC, + NMW, + NMW_Y, + NMB, + NMB_ECOLIK1, + S_PNEUMONIAE, + HIB, + STREPB, + NEGATIVE, + NMY, + NMX, + NM_INDETERMINATE, + H_INFLUENZAE_INDETERMINATE, + OTHER_GERMS, + CONTAMINATED, + OTHER_TEST; + + public static final List LATEX = Arrays.asList( + NMA, + NMC, + NMW_Y, + NMB_ECOLIK1, + S_PNEUMONIAE, + HIB, + STREPB, + NEGATIVE); + public static final List LAB_CULTURE = Arrays.asList( + NMA, + NMC, + NMW, + NMY, + NMB, + NMX, + NM_INDETERMINATE, + S_PNEUMONIAE, + HIB, + H_INFLUENZAE_INDETERMINATE, + STREPB, + OTHER_GERMS, + CONTAMINATED, + NEGATIVE); + + + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/NormalWasted.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/NormalWasted.java new file mode 100644 index 00000000000..e29911c418f --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/NormalWasted.java @@ -0,0 +1,12 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum NormalWasted { + NORMAL, + WASTED; + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/ParalysisSite.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/ParalysisSite.java new file mode 100644 index 00000000000..2382abd84e2 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/ParalysisSite.java @@ -0,0 +1,15 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum ParalysisSite { + LEFT_ARM, + RIGHT_ARM, + LEFT_LEG, + RIGHT_LEG, + OTHER; + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/PosNeg.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/PosNeg.java new file mode 100644 index 00000000000..00bc39b1b96 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/PosNeg.java @@ -0,0 +1,13 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum PosNeg { + POSITIVE, + NEGATIVE; + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } + +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/SampleContainerUsed.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/SampleContainerUsed.java new file mode 100644 index 00000000000..6d071f830f8 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/SampleContainerUsed.java @@ -0,0 +1,15 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum SampleContainerUsed { + + DRY_TUBE, + TRANS_ISOLATE, + CRYOTUBE, + OTHER; + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/SymptomLevel.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/SymptomLevel.java new file mode 100644 index 00000000000..7a55021a50a --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/SymptomLevel.java @@ -0,0 +1,14 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum SymptomLevel { + INCREASED, + NORMAL, + DECREASED; + + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/TypeOfAbode.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/TypeOfAbode.java new file mode 100644 index 00000000000..98cbd81be64 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/TypeOfAbode.java @@ -0,0 +1,17 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +import java.util.Arrays; +import java.util.List; + +public enum TypeOfAbode { + DHIMS_FACILITY, + HOME; + + public static final List FOR_DHIMS_CASES = Arrays.asList(DHIMS_FACILITY, HOME); + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/YellowFeverSample.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/YellowFeverSample.java new file mode 100644 index 00000000000..12a6e751e30 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/YellowFeverSample.java @@ -0,0 +1,26 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum YellowFeverSample { + + WHOLE_BLOOD, + SERUM, + POST_MORTEM_LIVER_SPECIMEN; + + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } + + public static String toString(YellowFeverSample value, String details) { + + if (value == null) { + return ""; + } + + return value.toString(); + } + +} + diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/YesNo.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/YesNo.java new file mode 100644 index 00000000000..1962f5f349b --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/YesNo.java @@ -0,0 +1,24 @@ +package de.symeda.sormas.api.utils; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum YesNo { + YES, + NO; + + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } + + public static YesNo valueOf(Boolean value) { + + if (value == null) { + return null; + } else if (Boolean.TRUE.equals(value)) { + return YES; + } else { + return NO; + } + } +} diff --git a/sormas-api/src/main/java/de/symeda/sormas/api/utils/pseudonymization/SampleDispatchMode.java b/sormas-api/src/main/java/de/symeda/sormas/api/utils/pseudonymization/SampleDispatchMode.java new file mode 100644 index 00000000000..fcb4e180211 --- /dev/null +++ b/sormas-api/src/main/java/de/symeda/sormas/api/utils/pseudonymization/SampleDispatchMode.java @@ -0,0 +1,14 @@ +package de.symeda.sormas.api.utils.pseudonymization; + +import de.symeda.sormas.api.i18n.I18nProperties; + +public enum SampleDispatchMode { + REGIONAL_COLDROOM, + NATIONAL_LAB, + NATIONAL_BY_DISTRICT; + + @Override + public String toString() { + return I18nProperties.getEnumCaption(this); + } +} diff --git a/sormas-api/src/main/resources/captions.properties b/sormas-api/src/main/resources/captions.properties index 10630e29c8e..53a28665235 100644 --- a/sormas-api/src/main/resources/captions.properties +++ b/sormas-api/src/main/resources/captions.properties @@ -29,7 +29,8 @@ edit=Edit epiWeekFrom=From Epi Week epiWeekTo=To Epi Week facilityType=Facility type -afpFacilityOptions=Facility Option +dhimsFacilityType= Facility type +afpFacilityOptions=Facility Type facilityTypeGroup=Facility category firstName=First name sex=Sex @@ -427,8 +428,9 @@ CaseData.numberOfVisits=Number of visits #CaseData.outcome=Outcome of case CaseData.outcome=Clinical Outcome CaseData.clinicalOutcome = Clinical Outcome -CaseData.outcomeDate=Date of outcome +CaseData.outcomeDate=Date of death CaseData.person=Case person +CaseData.sixtyDay=60 Day CaseData.personUuid=Person ID CaseData.personFirstName=First name CaseData.personLastName=Last name @@ -447,6 +449,7 @@ CaseData.quarantineChangeComment=Quarantine change comment CaseData.region=Region CaseData.regionLevelDate=Date received at region level CaseData.reportDate=Date of report +CaseData.dhimsFacilityType=Facility Type CaseData.reportingUser=Reporting user CaseData.reportLat=Report GPS latitude CaseData.reportLon=Report GPS longitude @@ -459,8 +462,13 @@ CaseData.smallpoxLastVaccinationDate=Date of last Smallpox vaccination CaseData.vaccinationStatus=Vaccination status CaseData.vaccinationType=Vaccination Type CaseData.vaccinationDate=Vaccination Date -CaseData.surveillanceOfficer=Responsible surveillance officer -CaseData.symptoms=Symptoms +CaseData.surveillanceOfficer=Name of Reporting officer +CaseData.reportingOfficerName=Name of Reporting Officer +CaseData.reportingOfficerTitle=Reporting Officer Title +CaseData.functionOfReportingOfficer=Function of Reporting Officer +CaseData.reportingOfficerContactPhone=Reporting Officer Contact Phone +CaseData.reportingOfficerEmail=Reporting Officer Email +CaseData.symptoms=Clinical History CaseData.therapy=Therapy CaseData.trimester=Trimester CaseData.caseTransmissionClassification=Transmission Classification @@ -488,6 +496,7 @@ CaseData.quarantineReduced=Quarantine period reduced? CaseData.quarantineOfficialOrderSent=Official quarantine order sent? CaseData.quarantineOfficialOrderSentDate=Date official quarantine order was sent CaseData.healthFacilityName=Health facility +CaseData.homeAddressRecreational=Home Address/Recreational CaseData.followUpComment=Follow-up status comment CaseData.followUpStatus=Follow-up status CaseData.followUpUntil=Follow-up until @@ -529,8 +538,8 @@ CaseData.expectedFollowUpUntil=Expected follow-up until CaseData.surveillanceToolLastShareDate=Last shared with reporting tool CaseData.surveillanceToolShareCount=Reporting tool share count CaseData.surveillanceToolStatus=Reporting tool status -CaseData.differentPlaceOfStayJurisdiction=Place of stay of this case differs from its responsible jurisdiction -CaseData.differentPointOfEntryJurisdiction=Point of entry of this case differs from its responsible / place of stay jurisdiction +CaseData.differentPlaceOfStayJurisdiction=Place of detection of this case differs from its reporting jurisdiction +CaseData.differentPointOfEntryJurisdiction=Point of entry of this case differs from its reporting / place of detection jurisdiction CaseData.responsibleRegion=Reporting region CaseData.responsibleDistrict=Reporting district CaseData.responsibleCommunity=Reporting sub district @@ -596,19 +605,37 @@ CaseExport.followUpStatusChangeUserRoles=Responsible user roles # CaseHospitalization CaseHospitalization=Hospitalization CaseHospitalization.admissionDate=Date of visit or admission -CaseHospitalization.admittedToHealthFacility=Was patient admitted at the facility as an inpatient? +CaseHospitalization.admittedToHealthFacility=Was the patient admitted at the facility? +CaseHospitalization.terminationDateHospitalStay=Termination date of hospital stay +CaseHospitalization.notifyDistrictDate=Date health facility notified district CaseHospitalization.dischargeDate=Date of discharge or transfer CaseHospitalization.healthFacility=Hospital name +CaseHospitalization.fillSectionBeforeSigning=Fill in this section before signing the form +CaseHospitalization.seekHelpChild=Where has the child been seeking help for this problem before presenting at present place (in sequence of visits)? CaseHospitalization.hospitalizedPreviously=Was the patient hospitalized or did he/she visit a health clinic previously for this illness? CaseHospitalization.isolated=Isolation CaseHospitalization.isolationDate=Date of isolation -CaseHospitalization.leftAgainstAdvice=Left against medical advice +CaseHospitalization.leftAgainstAdvice=Left against medical advice ? CaseHospitalization.previousHospitalizations=Previous hospitalizations -CaseHospitalization.intensiveCareUnit=Stay in the intensive care unit +CaseHospitalization.intensiveCareUnit=Admitted to intensive care unit ? CaseHospitalization.intensiveCareUnitStart=Start of the stay CaseHospitalization.intensiveCareUnitEnd=End of the stay CaseHospitalization.hospitalizationReason=Reason for hospitalization CaseHospitalization.otherHospitalizationReason=Specify reason +CaseHospitalization.diseaseOnsetDate=Disease Onset Date +CaseHospitalization.patientHospitalizedOrDetained= Patient Hospitalized/detained or an Outpatient? +CaseHospitalization.dateFirstSeen= Date first seen at a health facility for this disease +CaseHospitalization.durationMonths=Duration: months +CaseHospitalization.durationDays=Duration: days +CaseHospitalization.investigatorName=Investigator Name +CaseHospitalization.investigatorTitle=Investigator Title +CaseHospitalization.investigatorUnit=Investigator Unit +CaseHospitalization.investigatorAddress=Investigator Address +CaseHospitalization.investigatorTel=Investigator tel +CaseHospitalization.place2=Place +CaseHospitalization.durationMonths2=Duration: months +CaseHospitalization.durationDays2=Duration: days + # CaseImport caseImportErrorDescription=Error description caseImportMergeCase=Override existing case with changes from the imported case? @@ -869,6 +896,8 @@ dashboardDone=Done dashboardFatalities=Fatalities dashboardFollowUpUntilShort=F/U Until dashboardGrouping=Grouping +sampleDispatchMode=Sample Dispatch Mode +sampleDispatchDate=Sample Dispatch Date dashboardGt1ConfirmedCases=> 1 Confirmed Cases dashboardGt1ProbableCases=> 1 Probable Cases dashboardGt1SuspectCases=> 1 Suspect Cases @@ -1045,7 +1074,7 @@ EpiData.activityAsCaseDetailsKnown=Activity details known EpiData.activitiesAsCase=Activities as case EpiData.highTransmissionRiskArea=Residing or working in an area with high risk of transmission of the disease, e.g. closed residential and camp-like settings EpiData.largeOutbreaksArea=Residing or travelling to countries/territories/areas experiencing larger outbreaks of local transmission -EpiData.contactWithSourceCaseKnown=Contacts with source case known +EpiData.contactWithSourceCaseKnown=Contacts with a confirmed case # Documents documentUploadDocument=New document documentNoDocuments=There are no documents for this %s @@ -1521,7 +1550,7 @@ Location.region=Region Location.district=District Location.community=Community Location.street=Street -Location.landmark=Landmark +Location.landmark=Closest Landmark Location.contactPersonFirstName=Contact person first name Location.contactPersonLastName=Contact person last name Location.contactPersonPhone=Contact person phone number @@ -1648,6 +1677,7 @@ personsSetMissingGeoCoordinates=Set Missing Geo Coordinates personsUpdated=Persons Updated Person=Person Person.additionalDetails=General comment +Person.additionalPlacesStayed=Additional 4 places stayed in the last 6 months Person.address=Home address Person.addresses=Addresses Person.approximateAge=Age @@ -1691,6 +1721,7 @@ Person.occupationFacilityDetails=Facility name & description Person.occupationFacilityType=Facility type Person.occupationRegion=Facility region Person.occupationType=Type of occupation +Person.homeAddressRecreational=Home Address/Recreational Person.other.occupationDetails=Please specify occupation Person.armedForcesRelationType=Staff of armed forces Person.phone=Primary phone number @@ -1885,7 +1916,7 @@ Sample.diseaseShort=Disease Sample.lab=Laboratory Sample.labDetails=Laboratory name & description Sample.labSampleID=Lab sample ID -Sample.fieldSampleID=Field sample ID +Sample.fieldSampleID=Barcode Sample.labUser=Lab user Sample.noTestPossibleReason=Reason Sample.otherLab=Referral laboratory @@ -1927,6 +1958,97 @@ Sample.district=District Sample.community=Community Sample.deletionReason=Reason for deletion Sample.otherDeletionReason=Reason for deletion details +Sample.csfSampleCollected=CSF Sample Collected? Note: If NO, (Please STILL complete the form and send to district control officer) +Sample.rdtPerformed=Meningitis RDT(Dipstick) Performed +Sample.sampleSentToLab=Sample Sent To Lab +Sample.csfReason=If No, Select Reason +Sample.appearanceOfCsf=Appearance Of CSF +Sample.sampleContainerUsed=Sample Container Used +Sample.rdtResults=RDT Results +Sample.reasonNotSentToLab=If No, Why? +Sample.nameOfPerson=Name Of Person +Sample.telNumber=Tel Number +Sample.inoculationTimeTransportMedia=Time of Inoculation into Transport Media +Sample.districtNotificationDate=District Notification Date +Sample.dateSampleSentToLab=Date Sample Sent To Lab +Sample.dateFormSentToDistrict=Date Form Sent To District +Sample.dateFormReceivedAtDistrict=Date Form Received At District +Sample.dateFormSentToRegion=Date Form Sent To Region +Sample.dateFormReceivedAtRegion=Date Form Received At Region +Sample.dateFormSentToNational=Date Form Sent To National +Sample.dateFormReceivedAtNational=Date Form Received At National +Sample.sampleTests=Type of Sample Tests + + +Sample.laboratoryName = Laboratory Name +Sample.laboratorySampleDateReceived = Date Sample Received +Sample.laboratoryNumber = Laboratory Number +Sample.laboratorySampleContainerReceived = Sample Container(s) Received +Sample.laboratorySampleContainerOther = Sample Container - Other +Sample.laboratorySampleCondition = Sample(s) Condition +Sample.laboratoryAppearanceOfCSF = Appearance Of CSF +Sample.laboratoryTestPerformed = Type of Tests performed +Sample.laboratoryTestPerformedOther = Test Performed - Other +Sample.laboratoryCytology = Cytology +Sample.laboratoryGram = Gram +Sample.laboratoryGramOther = Gram - Other +Sample.laboratoryRdtPerformed = RDT (Dipstick) performed +Sample.laboratoryRdtResults = Laboratory RDT Results +Sample.laboratoryLatex = Latex +Sample.laboratoryCulture = Culture +Sample.laboratoryCultureOther = Culture - Other +Sample.laboratoryOtherTests = Other Tests +Sample.laboratoryOtherTestsResults = Other Tests Results +Sample.laboratoryCeftriaxone = Ceftriaxone +Sample.laboratoryPenicillinG = Penicillin G +Sample.laboratoryAmoxycillin = Amoxycillin +Sample.laboratoryOxacillin = Oxacillin +Sample.laboratoryAntibiogramOther = Antibiogram Other +Sample.laboratoryDatePcrPerformed = Date PCR Performed +Sample.laboratoryPcrType = Type of PCR +Sample.laboratoryPcrOptions = PCR Options +Sample.laboratorySerotype = Serotype +Sample.laboratorySerotypeType = Serotype Type +Sample.laboratorySerotypeResults = Serotype Results +Sample.laboratoryFinalResults = Final Laboratory Result +Sample.laboratoryObservations = Observations +Sample.laboratoryDateResultsSentHealthFacility = Date final results sent to reporting health facility +Sample.laboratoryDateResultsSentDSD = Date of results sent to Disease Surveillance Department/ Ministry of Health +Sample.laboratoryFinalClassification = Final Classification (National Level) +Sample.laboratoryType = Type of Laboratory (District, Regional, Reference) + +Sample.dateSentToNationalRegLab = Date sent from I-C/National Lab to Regional Lab +Sample.dateDifferentiationSentToEpi = Date I-T differentiation results sent to Epi +Sample.dateDifferentiationReceivedFromEpi = Date I-T differentiation received sent to Epi +Sample.dateIsolateSentForSequencing = Date isolate sent for sequencing +Sample.dateSeqResultsSentToProgram = Date sequence results sent to the program +Sample.finalLabResults = Final Lab Results (I = positive, 2 = negative) +Sample.immunocompromisedStatusSuspected =Immunocompromised status suspected (1-Y, 2-N, 99-Unknown) +Sample.afpFinalClassification = FINAL CLASSIFICATION + +SixtyDay.personExamineCase = Name of Person Examining Case +SixtyDay.dateOfFollowup = Date of Follow-up +SixtyDay.dateBirth = Date of Birth +SixtyDay.residentialLocation = Residential Location +SixtyDay.patientFound = Was the Patient Found? +SixtyDay.patientFoundReason = If no, why? +SixtyDay.locateChildAttempt = Describe attempt to Locate Child +SixtyDay.paralysisWeaknessPresent = Is Paralysis or Weakness Present (Yes/No) +SixtyDay.paralysisWeaknessPresentSite = If yes, site of paralysis +SixtyDay.paralyzedPartOther = Paralyzed Other Part +SixtyDay.paralysisWeaknessFloppy = Paralysis or Weakness Floppy? +SixtyDay.muscleToneParalyzedPart = Muscle Tone - In Paralyzed Part +SixtyDay.muscleToneOtherPartBody = Muscle Tone - Other Part of Body +SixtyDay.deepTendon = Deep Tendon Reflex +SixtyDay.muscleVolume = Muscle Volume +SixtyDay.sensoryLoss = Sensory Loss +SixtyDay.provisionalDiagnosis = Provisional Diagnosis +SixtyDay.comments = Comments +SixtyDay.contactDetailsNumber = Contact Details of Person - Phone Number +SixtyDay.contactDetailsEmail = Contact Details of Person - Email Address +SixtyDay.signature = Signature +SixtyDay.dateSubmissionForms = Date of Submission of Forms + # Sample Export SampleExport.additionalTestingRequested=Have additional tests been requested? SampleExport.personAddressCaption=Address of case/contact/event participant person @@ -2116,10 +2238,15 @@ Symptoms.eyesBleeding=Bleeding from the eyes Symptoms.fatigueWeakness=Fatigue/general weakness Symptoms.fever=Fever Symptoms.firstSymptom=First symptom +Symptoms.provisionalDiagnosis=Provisional Diagnosis Symptoms.fluidInLungCavity=Fluid in the lung cavity Symptoms.glasgowComaScale=Glasgow coma scale Symptoms.gumsBleeding=Bleeding of the gums Symptoms.headache=Headache +Symptoms.muscleTone=Muscle Tone +Symptoms.deepTendonReflex=Deep Tendon Reflex +Symptoms.muscleVolume=Muscle Volume +Symptoms.sensoryLoss=Sensory Loss Symptoms.hearingloss=Acute hearing loss Symptoms.heartRate=Heart rate (bpm) Symptoms.height=Height (cm) @@ -2180,8 +2307,8 @@ Symptoms.otherHemorrhagicSymptoms=Other hemorrhagic symptoms Symptoms.otherHemorrhagicSymptomsText=Specify other symptoms Symptoms.otherNonHemorrhagicSymptoms=Other clinical symptoms Symptoms.otherNonHemorrhagicSymptomsText=Specify other symptoms -Symptoms.otherComplications=Other complications -Symptoms.otherComplicationsText=Specify other complications +Symptoms.otherComplications=Other symptom(s) +Symptoms.otherComplicationsText=Specify other symptom(s) Symptoms.otitisMedia=Middle ear inflammation (otitis media) Symptoms.painfulLymphadenitis=Painful lymphadenitis Symptoms.palpableLiver=Palpable liver @@ -2216,6 +2343,8 @@ Symptoms.symptomsOccurred=Symptoms that occurred during this illness Symptoms.symptomsUnknownOccurred=Symptoms with no reliable occurrence information Symptoms.temperature=Current body temperature in \u00B0 C Symptoms.temperatureSource=Source of body temperature +Symptoms.dateOfOnset=Date of Onset +Symptoms.feverBodyTempGreater=Fever / Body Temperature > 38 Degree Celsius Symptoms.throbocytopenia=Thrombocytopenia Symptoms.tremor=Tremor Symptoms.unexplainedBleeding=Bleeding or bruising diff --git a/sormas-api/src/main/resources/descriptions.properties b/sormas-api/src/main/resources/descriptions.properties index 50c290da907..ca005fcb815 100644 --- a/sormas-api/src/main/resources/descriptions.properties +++ b/sormas-api/src/main/resources/descriptions.properties @@ -79,6 +79,7 @@ descCaseFilterCasesWithReinfection = Only list cases for reinfected persons descContactOnlyWithReducedQuarantine = Only list contacts whose quarantine period has been reduced descContactIncludeContactsFromOtherJurisdictions = Include all contacts from other jurisdictions that you have access to, e.g. because you created them or their source case is in your jurisdiction descGdpr = Reminder: All comments entered must comply with GDPR rules as described during connection. +observation = Observation discardDescription = Discards any unsaved changes # EpiData diff --git a/sormas-api/src/main/resources/enum.properties b/sormas-api/src/main/resources/enum.properties index 86140ea0f92..bb02349cd6b 100644 --- a/sormas-api/src/main/resources/enum.properties +++ b/sormas-api/src/main/resources/enum.properties @@ -196,6 +196,22 @@ CaseOutcome.DECEASED = Deceased CaseOutcome.NO_OUTCOME = No Outcome Yet CaseOutcome.RECOVERED = Recovered CaseOutcome.UNKNOWN = Unknown +CaseOutcome.REFERRED = Referred +CaseOutcome.ON_TREATMENT = On Treatment + +# Laboratory Types +LabType.DISTRICT_LAB = District Laboratory +LabType.REGIONAL_LAB = Regional Laboratory +LabType.REFERENCE_LAB = Reference Laboratory + +# CSM Vaccines +CSMVaccines.MenA_CONJUNATE = MenA(conjunate) +CSMVaccines.PCV13_1 = PCV13- 1 +CSMVaccines.PCV13_2 = PCV13- 2 +CSMVaccines.PCV13_3 =PCV13- 3 +CSMVaccines.HIB_1 = Hib 1 +CSMVaccines.HIB_2 = Hib 2 +CSMVaccines.HIB_3 = Hib 3 # CaseReferenceDefinition CaseReferenceDefinition.FULFILLED = Fulfilled @@ -435,6 +451,14 @@ DengueFeverType.DENUGE_SHOCK_SYNDROME = Denuge Shock Syndrome RabiesType.FURIOUS_RABIES = Furious Rabies RabiesType.PARALYTIC_RABIES = Paralytic Rabies +TypeOfAbode.DHIMS_FACILITY = Facility +DhimsFacility.CHPS_COMPOUND =CHPS Compound +DhimsFacility.MATERNITY_HOME = Maternity Home +DhimsFacility.CLINIC = Clinic +DhimsFacility.HEALTH_CENTRE = Health Centre +DhimsFacility.POLYCLINIC = Polyclinic +DhimsFacility.HOSPITAL = Hospital + # Disease Disease.AFP = Acute Flaccid Paralysis Disease.CHOLERA = Cholera @@ -494,6 +518,8 @@ Disease.M_PNEUMONIAE = M.pneumoniae Disease.C_PNEUMONIAE = C.pneumoniae Disease.ARI = ARI (Acute Respiratory Infections) Disease.CHIKUNGUNYA = Chikungunya +Disease.MARBURG = Marburg +Disease.ZIKA = Zika Disease.POST_IMMUNIZATION_ADVERSE_EVENTS_MILD = Post-immunization adverse events mild Disease.POST_IMMUNIZATION_ADVERSE_EVENTS_SEVERE = Post-immunization adverse events severe Disease.FHA = FHA (Functional Hypothalamic Amenorrhea) @@ -512,7 +538,7 @@ Disease.Short.UNDEFINED = Undefined Disease.Short.OTHER = Other Disease.Short.PLAGUE = Plague Disease.Short.POLIO = Polio -Disease.Short.AHF = VHF +Disease.Short.AHF = AHF Disease.Short.WEST_NILE_FEVER = West Nile Fever Disease.Short.YELLOW_FEVER = Yellow Fever Disease.Short.RABIES = Rabies @@ -587,10 +613,18 @@ EducationType.SECONDARY = Secondary EducationType.TERTIARY = Tertiary EducationType.OTHER = Other +SampleMaterial.PLASMA_SERUM = Plasma / Serum +CaseOutcome.ALIVE = Alive + EntityRelevanceStatus.ACTIVE = Active EntityRelevanceStatus.ARCHIVED = Archived EntityRelevanceStatus.ALL = All +AFPFacilityOptions.Hospital = Hospital +AFPFacilityOptions.CHPS = CHPS Compound +AFPFacilityOptions.Polyclinic = Polyclinic +AFPFacilityOptions.HC_CR =HC C/R + # EpiCurveGrouping EpiCurveGrouping.DAY = Day EpiCurveGrouping.MONTH = Month @@ -855,7 +889,31 @@ Language.UR_PK = Urdu MapCaseDisplayMode.CASE_ADDRESS = ... by home address MapCaseDisplayMode.FACILITY = ... by facility MapCaseDisplayMode.FACILITY_OR_CASE_ADDRESS = ... by facility or home address - + +# SampleDispatchMode +SampleDispatchMode.REGIONAL_COLDROOM = Dispatched to the regional coldroom +SampleDispatchMode.NATIONAL_LAB = Dispatched to the national lab by courier +SampleDispatchMode.NATIONAL_BY_DISTRICT = Dispatched to the national by district using courier + +# CsfReason +CsfReason.LACK_OF_LP_KIT = Lack of LP Kit +CsfReason.LACK_OF_SKILL = Lack of Skill +CsfReason.LP_CONTRAINDICATED = LP contraindicated +CsfReason.OTHER = Other + +CsfAppearance.CLEAR = Clear +CsfAppearance.CLOUDY = Cloudy +CsfAppearance.BLOODY = Bloody +CsfAppearance.XANTHOCHROMIC = Xanthochromic +CsfAppearance.TURBID = Turbid +CsfAppearance.PURULENT = Purulent + +# SampleContainerUsed +SampleContainerUsed.DRY_TUBE = DryTube +SampleContainerUsed.TRANS_ISOLATE = Trans-Isolate(TI) +SampleContainerUsed.CRYOTUBE = Cryotube +SampleContainerUsed.OTHER = Other + MapCaseClassificationOption.ALL_CASES = Show all cases MapCaseClassificationOption.CONFIRMED_CASES_ONLY = Show confirmed cases only @@ -984,6 +1042,38 @@ PathogenTestType.LATEX_AGGLUTINATION = Latex Agglutination PathogenTestType.CQ_VALUE_DETECTION = CQ Value Detection PathogenTestType.SEQUENCING = Sequencing +LatexCulture.NMA = NmA +LatexCulture.NMC = NmC +LatexCulture.NMW = NmW +LatexCulture.NMW_Y = NmW/Y +LatexCulture.NMB = NmB +LatexCulture.NMB_ECOLIK1 = NmB/E.coli K1 +LatexCulture.S_PNEUMONIAE = S. Pneumoniae +LatexCulture.HIB = Hib +LatexCulture.STREPB = Strep B +LatexCulture.NEGATIVE = Negative +LatexCulture.NMY = NmY +LatexCulture.NMX = NmX +LatexCulture.NM_INDETERMINATE = Nm Indeterminate +LatexCulture.H_INFLUENZAE_INDETERMINATE = H. Influenzae Indeterminate +LatexCulture.OTHER_GERMS = Other Germs +LatexCulture.CONTAMINATED = Contaminated +LatexCulture.OTHER_TEST = Other Test + + +Antibiogram.SENSITIVE = Sensitive +Antibiogram.RESISTANT = Resistant +Antibiogram.INTERMEDIATE = Intermediate +Antibiogram.NOT_DONE = Not Done + + +LabTest.CYTOLOGY = Cytology +LabTest.GRAM_STAIN = Gram Stain +LabTest.LATEX = Latex +LabTest.RDT = RDT +LabTest.OTHER = Other + + PCRTestSpecification.VARIANT_SPECIFIC = Variant specific PCRTestSpecification.N501Y_MUTATION_DETECTION = N501Y mutation detection @@ -1078,6 +1168,8 @@ RiskLevel.UNKNOWN = Unknown # SampleMaterial SampleMaterial.BLOOD = Blood +SampleMaterial.WHOLE_BLOOD = Whole Blood +SampleMaterial.PLASMA = Plasma SampleMaterial.CEREBROSPINAL_FLUID = Cerebrospinal fluid SampleMaterial.CRUST = Crust SampleMaterial.NASAL_SWAB = Nasal swab @@ -1102,6 +1194,10 @@ SampleMaterial.ANTERIOR_NARES_SWAB=Anterior nares swab SampleMaterial.OP_ASPIRATE=Oropharyngeal aspirate SampleMaterial.NP_ASPIRATE=Nasopharyngeal aspirate SampleMaterial.PLEURAL_FLUID=Pleural fluid specimen +SampleMaterial.POST_MORTEM_LIVER_SPECIMEN=Post Mortem Liver Specimen +YellowFeverSample.POST_MORTEM_LIVER_SPECIMEN=Post Mortem Liver Specimen +YellowFeverSample.SERUM=Serum +YellowFeverSample.WHOLE_BLOOD=Whole Blood # SampleSource SampleSource.ANIMAL=Animal SampleSource.ENVIRONMENT=Environment @@ -1116,6 +1212,22 @@ Sex.FEMALE=Female Sex.MALE=Male Sex.OTHER=Other Sex.UNKNOWN=Unknown + + +# AFPClassification +AFPClassification.CONFIRMED_POLIO = Confirmed Polio +AFPClassification.COMPATIBLE = Compatible +AFPClassification.DISCARDED = Discarded +AFPClassification.NOT_AN_AFP_CASE = Not an AFP Case +AFPClassification.cVDPV = cVDPV +AFPClassification.aVDPV = aVDPV +AFPClassification.iVDPV = iVDPV +AFPClassification.SERO_TYPE = Sero Type + + +# Detained +HospOut.HOSPITALIZED_DETAINED =Patient hospitalized/detained +HospOut.OUTPATIENT = Outpatient # ShipmentStatus ShipmentStatus.NOT_SHIPPED=Not shipped ShipmentStatus.RECEIVED=Received diff --git a/sormas-api/src/main/resources/strings.properties b/sormas-api/src/main/resources/strings.properties index 74fa6884251..0af9971f5f7 100644 --- a/sormas-api/src/main/resources/strings.properties +++ b/sormas-api/src/main/resources/strings.properties @@ -409,6 +409,7 @@ headingCasesGuide = Guide: Case Directory headingCasesSentToExternalSurveillanceTool=Cases sent to the reporting tool headingChangePathogenTestResult = Change pathogen test result headingClinicalMeasurements = Clinical measurements +headingClinicalHistory = Clinical history headingClinicalVisitsDeleted = Clinical assessments deleted headingComplications = Complications headingConfirmArchiving = Confirm archiving @@ -506,6 +507,9 @@ headingFollowUpStatus = Follow-up status headingFollowUpStatusChanged = Follow-up status changed headingHealthConditions = Pre-existing conditions headingHospitalization = Current Hospitalization +headingSixtyDay = 60-Days +headingFillThis = Fill in this section before signing the form +headingChildSeek = Where has the child been seeking help for this problem before presenting at present place (in sequence of visits)? headingPreviousHospitalizations = Previous Hospitalizations headingImportCaseContacts = Import Case Contacts headingImportCases = Import Cases @@ -586,6 +590,11 @@ headingPrescriptionsDeleted = Prescriptions deleted headingRecovery = Recovery headingReferSample = Refer sample to another laboratory headingRequestedAdditionalTests = Requested additional tests: +headingDistrictLaboratory = District Laboratory +headingRegionalLaboratory = Regional Laboratory +headingReferenceLaboratory = Reference Laboratory +laboratoryAntibiogramHeadlineloc = Antibiogram +laboratoryPcrHeadlineloc = PCR headingRequestedPathogenTests = Requested pathogen tests: headingResponsibleJurisdiction=Responsible jurisdiction headingResults = Results @@ -670,7 +679,7 @@ headingReduceQuarantine = Reduce quarantine headingAdjustQuarantine = Adjust quarantine headingExtendFollowUp = Extend follow-up period headingExposureInvestigation = Exposure Investigation -headingEpiDataSourceCaseContacts = Contacts with Source Case +headingEpiDataSourceCaseContacts = Contact with a confirmed case headingExposureDetails = Exposure Details headingAnimalContactDetails = Animal Contact Details headingBurialDetails = Burial Details @@ -707,7 +716,7 @@ headingShareRequestCases=Cases headingShareRequestContacts=Contacts headingShareRequestEvents=Events headingShareRequestEventParticipants=Event participants -headingCaseResponsibleJurisidction=Responsible jurisdiction +headingCaseResponsibleJurisidction=Reporting region and district headingSeeAllPersons=See persons for all association types headingPlaceOfStayInHospital = Place of stay in hospital headingCurrentHospitalization = Current hospitalization @@ -717,7 +726,7 @@ headingUpdatedPersonInformation = Updated person information headingCorrectSample = Correct sample data headingPreviousSampleInformation = Previous sample information headingUpdatedSampleInformation = Updated sample information -headingCorrectPathogenTest = Correct pathogent test data +headingCorrectPathogenTest = Correct pathogen test data headingPreviousPathogenTestInformation = Previous pathogen test information headingUpdatedPathogenTestInformation = Updated pathogen test information headingLabMessageCorrectionThrough = No more changes found diff --git a/sormas-api/src/test/java/de/symeda/sormas/api/EntityDtoAccessHelperTest.java b/sormas-api/src/test/java/de/symeda/sormas/api/EntityDtoAccessHelperTest.java index e647cbe1fc6..05b4911c520 100644 --- a/sormas-api/src/test/java/de/symeda/sormas/api/EntityDtoAccessHelperTest.java +++ b/sormas-api/src/test/java/de/symeda/sormas/api/EntityDtoAccessHelperTest.java @@ -26,6 +26,7 @@ import java.lang.reflect.InvocationTargetException; import java.util.Date; +import de.symeda.sormas.api.utils.YesNo; import org.junit.Before; import org.junit.Test; @@ -54,7 +55,7 @@ public void setup() { hospitalizationDto = new HospitalizationDto(); hospitalizationDto.setDischargeDate(new Date(1600387200000L)); - hospitalizationDto.setIsolated(YesNoUnknown.NO); + hospitalizationDto.setIsolated(YesNo.NO); personReferenceDto = new PersonReferenceDto(); personReferenceDto.setUuid("GHIJKL"); diff --git a/sormas-app/app/local.properties b/sormas-app/app/local.properties new file mode 100644 index 00000000000..cd7ec2b23fe --- /dev/null +++ b/sormas-app/app/local.properties @@ -0,0 +1,8 @@ +## This file must *NOT* be checked into Version Control Systems, +# as it contains information specific to your local configuration. +# +# Location of the SDK. This is only used by Gradle. +# For customization when using a Version Control System, please read the +# header note. +#Wed Dec 13 15:08:40 GMT 2023 +sdk.dir=C\:\\Users\\danie\\AppData\\Local\\Android\\Sdk diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/BaseEditActivity.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/BaseEditActivity.java index f95d5d583f4..9cfe7c73c5a 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/BaseEditActivity.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/BaseEditActivity.java @@ -282,7 +282,7 @@ public void replaceFragment(BaseEditFragment f, boolean allowBackNavigation) { @Override protected boolean openPage(PageMenuItem menuItem) { - BaseEditFragment newActiveFragment = buildEditFragment(menuItem, storedRootEntity); + BaseEditFragment newActiveFragment = buildEditFragment(menuItem, storedRootEntity); if (newActiveFragment == null) return false; replaceFragment(newActiveFragment, true); diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/Case.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/Case.java index 218460e7133..79e10fdc94f 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/Case.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/Case.java @@ -30,6 +30,8 @@ import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; import javax.persistence.Transient; import de.symeda.sormas.api.Disease; @@ -47,7 +49,7 @@ import de.symeda.sormas.api.caze.QuarantineReason; import de.symeda.sormas.api.caze.RabiesType; import de.symeda.sormas.api.caze.ScreeningType; -import de.symeda.sormas.api.caze.ReportingType; +//import de.symeda.sormas.api.caze.ReportingType; import de.symeda.sormas.api.caze.TransmissionClassification; import de.symeda.sormas.api.caze.Trimester; import de.symeda.sormas.api.caze.VaccinationStatus; @@ -55,6 +57,7 @@ import de.symeda.sormas.api.customizableenum.CustomizableEnumType; import de.symeda.sormas.api.disease.DiseaseVariant; import de.symeda.sormas.api.infrastructure.facility.FacilityType; +import de.symeda.sormas.api.utils.CardOrHistory; import de.symeda.sormas.api.utils.DataHelper; import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.app.backend.caze.maternalhistory.MaternalHistory; @@ -104,6 +107,8 @@ public class Case extends PseudonymizableAdo { public static final String REGION = "region"; public static final String COMPLETENESS = "completeness"; public static final String VACCINATION_STATUS = "vaccinationStatus"; + public static final String VACCINATION_TYPE = "vaccinationType"; + public static final String VACCINATION_DATE = "vaccinationDate"; public static final String HEALTH_CONDITIONS = "healthConditions"; // public static final String CONTACT_TRANSMISSION_CLASSIFICATION = "caseTransmissionClassification"; public static final String CASE_TRANSMISSION_CLASSIFICATION = "caseTransmissionClassification"; @@ -230,6 +235,10 @@ public class Case extends PseudonymizableAdo { @DatabaseField(columnName = "vaccination") private VaccinationStatus vaccinationStatus; + @Enumerated(EnumType.STRING) + private CardOrHistory vaccinationType; + private Date vaccinationDate; + @Enumerated(EnumType.STRING) private YesNoUnknown smallpoxVaccinationScar; @@ -690,6 +699,24 @@ public void setVaccinationStatus(VaccinationStatus vaccinationStatus) { this.vaccinationStatus = vaccinationStatus; } + @Enumerated(EnumType.STRING) + public CardOrHistory getVaccinationType() { + return vaccinationType; + } + + public void setVaccinationType(CardOrHistory vaccinationType) { + this.vaccinationType = vaccinationType; + } + + @Temporal(TemporalType.TIMESTAMP) + public Date getVaccinationDate() { + return vaccinationDate; + } + + public void setVaccinationDate(Date vaccinationDate) { + this.vaccinationDate = vaccinationDate; + } + public YesNoUnknown getSmallpoxVaccinationScar() { return smallpoxVaccinationScar; } diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/CaseDtoHelper.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/CaseDtoHelper.java index 3e22ed3a8db..ca62c2cd210 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/CaseDtoHelper.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/caze/CaseDtoHelper.java @@ -153,6 +153,8 @@ public void fillInnerFromDto(Case target, CaseDataDto source) { target.setHealthConditions(healthConditionsDtoHelper.fillOrCreateFromDto(target.getHealthConditions(), source.getHealthConditions())); target.setVaccinationStatus(source.getVaccinationStatus()); + target.setVaccinationType(source.getVaccinationType()); + target.setVaccinationDate(source.getVaccinationDate()); target.setSmallpoxVaccinationScar(source.getSmallpoxVaccinationScar()); target.setSmallpoxVaccinationReceived(source.getSmallpoxVaccinationReceived()); target.setSmallpoxLastVaccinationDate(source.getSmallpoxLastVaccinationDate()); @@ -401,6 +403,8 @@ public void fillInnerFromAdo(CaseDataDto target, Case source) { target.setClinicianEmail(source.getClinicianEmail()); target.setPregnant(source.getPregnant()); target.setVaccinationStatus(source.getVaccinationStatus()); + target.setVaccinationType(source.getVaccinationType()); + target.setVaccinationDate(source.getVaccinationDate()); target.setSmallpoxVaccinationScar(source.getSmallpoxVaccinationScar()); target.setSmallpoxVaccinationReceived(source.getSmallpoxVaccinationReceived()); target.setSmallpoxLastVaccinationDate(source.getSmallpoxLastVaccinationDate()); @@ -496,7 +500,7 @@ public void fillInnerFromAdo(CaseDataDto target, Case source) { @Override protected long getApproximateJsonSizeInBytes() { return CaseDataDto.APPROXIMATE_JSON_SIZE_IN_BYTES; - target.setCaseTransmissionClassification(source.getCaseTransmissionClassification()); + //target.setCaseTransmissionClassification(source.getCaseTransmissionClassification()); } public static CaseReferenceDto toReferenceDto(Case ado) { diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/common/DatabaseHelper.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/common/DatabaseHelper.java index 086f7b8c9c3..cb00f555b57 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/common/DatabaseHelper.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/common/DatabaseHelper.java @@ -2993,14 +2993,53 @@ public void onUpgrade(SQLiteDatabase db, ConnectionSource connectionSource, int getDao(DiseaseConfiguration.class).executeRaw("ALTER TABLE diseaseConfiguration ADD COLUMN ageGroupsString text;"); getDao(DiseaseConfiguration.class).executeRaw("UPDATE diseaseConfiguration SET changeDate = 0;"); - case 216: - currentVersion = 216; + case 337: + currentVersion = 337; getDao(Case.class).executeRaw("ALTER TABLE cases ADD COLUMN caseTransmissionClassification varchar(512);"); - case 217: - currentVersion = 217; + case 338: + currentVersion = 338; getDao(Contact.class).executeRaw("ALTER TABLE contacts ADD COLUMN contactTransmissionClassification varchar(512);"); + case 339: + currentVersion = 339; + getDao(Case.class).executeRaw("ALTER TABLE cases ADD COLUMN vaccinationType varchar(256);"); + getDao(Case.class).executeRaw("ALTER TABLE cases ADD COLUMN vaccinationDate timestamp;"); + case 340: + currentVersion = 340; + getDao(Person.class).executeRaw("ALTER TABLE person ADD COLUMN ghanaCard varchar(256) NULL;"); + getDao(Person.class).executeRaw("ALTER TABLE person ADD COLUMN otherName varchar(256) NULL;"); + + getDao(Sample.class).executeRaw("ALTER TABLE samples ADD COLUMN sampleMaterialRequested boolean;"); + getDao(Sample.class).executeRaw("ALTER TABLE samples ADD COLUMN ipSampleSent varchar(255);"); + getDao(Sample.class).executeRaw("ALTER TABLE samples ADD COLUMN ipSampleResults varchar(512);"); + getDao(Sample.class).executeRaw("ALTER TABLE samples ALTER COLUMN sampleMaterial DROP NOT NULL;"); + getDao(Sample.class).executeRaw("ALTER TABLE samples ALTER COLUMN samplePurpose DROP NOT NULL;"); + + getDao(Case.class).executeRaw("ALTER TABLE cases ADD COLUMN afpFacilityOptions varchar(255) NULL;"); + + getDao(Location.class).executeRaw("ALTER TABLE location ADD COLUMN landmark varchar(255) NULL;"); + getDao(Location.class).executeRaw("ALTER TABLE location ADD COLUMN afpFacilityOptions varchar(255) NULL;"); + + getDao(Facility.class).executeRaw("ALTER TABLE facility ADD COLUMN landmark varchar(255) NULL;"); + getDao(Facility.class).executeRaw("ALTER TABLE facility ADD COLUMN facilityAfpType varchar(255) NULL;"); + getDao(Facility.class).executeRaw("ALTER TABLE facility ADD COLUMN facility_AfpType varchar(255) NULL;"); + + case 341: + currentVersion = 341; + getDao(Sample.class).executeRaw("ALTER TABLE samples ADD COLUMN sampleMaterialTypeForYF boolean;"); + case 342: + currentVersion = 342; + getDao(EpiData.class).executeRaw("ALTER TABLE epidata ADD COLUMN disease varchar(255) NULL;"); + case 343: + currentVersion = 343; + getDao(Person.class).executeRaw("ALTER TABLE person ADD COLUMN disease varchar(255) NULL;"); + case 344: + currentVersion = 344; + getDao(Sample.class).executeRaw("ALTER TABLE samples ADD COLUMN pathogentestresult varchar(255) NULL;"); + case 345: + currentVersion = 345; + getDao(Location.class).executeRaw("ALTER TABLE location ADD COLUMN landMark varchar(255) NULL;"); // ATTENTION: break should only be done after last version break; diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/contact/Contact.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/contact/Contact.java index 53e2cfa487f..74fca5b18a3 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/contact/Contact.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/contact/Contact.java @@ -226,7 +226,7 @@ public class Contact extends PseudonymizableAdo { private Date quarantineOfficialOrderSentDate; @Column(length = CHARACTER_LIMIT_BIG) private String additionalDetails; - @Column(length = COLUMN_LENGTH_DEFAULT) +// @Column(length = COLUMN_LENGTH_DEFAULT) @Enumerated(EnumType.STRING) private TransmissionClassification contactTransmissionClassification; @@ -888,6 +888,8 @@ public VaccinationStatus getVaccinationStatus() { public void setVaccinationStatus(VaccinationStatus vaccinationStatus) { this.vaccinationStatus = vaccinationStatus; + } + public TransmissionClassification getContactTransmissionClassification() { return contactTransmissionClassification; } diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/contact/ContactDtoHelper.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/contact/ContactDtoHelper.java index bb1732c4e4e..19fb7eda44b 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/contact/ContactDtoHelper.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/contact/ContactDtoHelper.java @@ -326,7 +326,7 @@ public void fillInnerFromAdo(ContactDto target, Contact source) { @Override protected long getApproximateJsonSizeInBytes() { return ContactDto.APPROXIMATE_JSON_SIZE_IN_BYTES; - target.setContactTransmissionClassification(source.getContactTransmissionClassification()); + //target.setContactTransmissionClassification(source.getContactTransmissionClassification()); } public static ContactReferenceDto toReferenceDto(Contact ado) { diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/epidata/EpiData.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/epidata/EpiData.java index a74a1b5e4b6..929e16ab816 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/epidata/EpiData.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/epidata/EpiData.java @@ -24,6 +24,7 @@ import com.j256.ormlite.table.DatabaseTable; +import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.app.backend.activityascase.ActivityAsCase; import de.symeda.sormas.app.backend.common.EmbeddedAdo; @@ -39,7 +40,10 @@ public class EpiData extends PseudonymizableAdo { public static final String TABLE_NAME = "epidata"; public static final String I18N_PREFIX = "EpiData"; + public static final String DISEASE = "disease"; + @Enumerated(EnumType.STRING) + private Disease disease; @Enumerated(EnumType.STRING) private YesNoUnknown exposureDetailsKnown; @Enumerated(EnumType.STRING) @@ -64,6 +68,12 @@ public YesNoUnknown getExposureDetailsKnown() { public void setExposureDetailsKnown(YesNoUnknown exposureDetailsKnown) { this.exposureDetailsKnown = exposureDetailsKnown; } + /*public Disease getDisease() { + return disease; + } + public void setDisease(Disease disease) { + this.disease = disease; + }*/ public YesNoUnknown getActivityAsCaseDetailsKnown() { return activityAsCaseDetailsKnown; diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/epidata/EpiDataDtoHelper.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/epidata/EpiDataDtoHelper.java index 887c230ad4d..64581181d06 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/epidata/EpiDataDtoHelper.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/epidata/EpiDataDtoHelper.java @@ -74,6 +74,7 @@ public void fillInnerFromDto(EpiData target, EpiDataDto source) { target.setHighTransmissionRiskArea(source.getHighTransmissionRiskArea()); target.setLargeOutbreaksArea(source.getLargeOutbreaksArea()); target.setAreaInfectedAnimals(source.getAreaInfectedAnimals()); + //target.setDisease(source.getDisease()); List exposures = new ArrayList<>(); if (!source.getExposures().isEmpty()) { @@ -107,6 +108,7 @@ public void fillInnerFromAdo(EpiDataDto target, EpiData source) { target.setHighTransmissionRiskArea(source.getHighTransmissionRiskArea()); target.setLargeOutbreaksArea(source.getLargeOutbreaksArea()); target.setAreaInfectedAnimals(source.getAreaInfectedAnimals()); + //target.setDisease(source.getDisease()); List exposureDtos = new ArrayList<>(); if (!source.getExposures().isEmpty()) { diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/location/Location.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/location/Location.java index b716ba6ad01..f8a6e95d2d7 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/location/Location.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/location/Location.java @@ -91,6 +91,9 @@ public class Location extends PseudonymizableAdo { private String street; @Column(length = CHARACTER_LIMIT_DEFAULT) private String houseNumber; + + @Column(length = CHARACTER_LIMIT_DEFAULT) + private String landMark; @Column(length = CHARACTER_LIMIT_DEFAULT) private String additionalInformation; @Column @@ -237,6 +240,15 @@ public void setHouseNumber(String houseNumber) { this.houseNumber = houseNumber; } + @Bindable + public String getLandMark() { + return landMark; + } + + public void setLandMark(String landMark) { + this.landMark = landMark; + } + @Bindable public String getAdditionalInformation() { return additionalInformation; @@ -339,6 +351,12 @@ public String getCompleteString() { } sb.append(getHouseNumber()); } + if (getLandMark() != null && !getLandMark().isEmpty()) { + if (sb.length() > 0) { + sb.append(" "); + } + sb.append(getLandMark()); + } if (getAdditionalInformation() != null && !getAdditionalInformation().isEmpty()) { if (sb.length() > 0) { sb.append(", "); @@ -450,6 +468,7 @@ public String toString() { public boolean isEmptyLocation() { return street == null && houseNumber == null + && landMark == null && additionalInformation == null && details == null && city == null diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/location/LocationDtoHelper.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/location/LocationDtoHelper.java index f26a0412ac5..90b45834ce2 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/location/LocationDtoHelper.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/location/LocationDtoHelper.java @@ -83,6 +83,7 @@ public void fillInnerFromDto(Location target, LocationDto source) { target.setPseudonymized(source.isPseudonymized()); target.setStreet(source.getStreet()); target.setHouseNumber(source.getHouseNumber()); + target.setLandMark(source.getLandMark()); target.setAdditionalInformation(source.getAdditionalInformation()); target.setAddressType(source.getAddressType()); target.setAddressTypeDetails(source.getAddressTypeDetails()); @@ -141,6 +142,7 @@ public void fillInnerFromAdo(LocationDto target, Location source) { target.setPseudonymized(source.isPseudonymized()); target.setStreet(source.getStreet()); target.setHouseNumber(source.getHouseNumber()); + target.setLandMark(source.getLandMark()); target.setAdditionalInformation(source.getAdditionalInformation()); target.setAddressType(source.getAddressType()); target.setAddressTypeDetails(source.getAddressTypeDetails()); diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/person/Person.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/person/Person.java index 642827dc855..6c50e470947 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/person/Person.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/person/Person.java @@ -71,11 +71,19 @@ public class Person extends PseudonymizableAdo { public static final String BIRTHDATE_YYYY = "birthdateYYYY"; public static final String BIRTHDATE_MM = "birthdateMM"; public static final String BIRTHDATE_DD = "birthdateDD"; + public static final String OTHER_NAME = "otherName"; + public static final String GHANA_CARD = "ghanaCard"; + public static final String PASSPORT_NUMBER = "passportNumber"; + public static final String DISEASE = "disease"; @Column(nullable = false) private String firstName; @Column(nullable = false) private String lastName; + @Column(length = CHARACTER_LIMIT_DEFAULT) + private String otherName; + @Column(length = CHARACTER_LIMIT_DEFAULT) + private String ghanaCard; @Enumerated(EnumType.STRING) private Salutation salutation; @Column(length = CHARACTER_LIMIT_DEFAULT) @@ -188,6 +196,9 @@ public class Person extends PseudonymizableAdo { @Column(columnDefinition = "text") private String additionalDetails; + @Enumerated(EnumType.STRING) + private Disease disease; + public Person() { } @@ -209,6 +220,14 @@ public void setLastName(String lastName) { this.lastName = lastName; } + public String getOtherName() { + return otherName; + } + + public void setOtherName(String otherName) { + this.otherName = otherName; + } + public Salutation getSalutation() { return salutation; } @@ -406,7 +425,12 @@ public void setCauseOfDeathDetails(String causeOfDeathDetails) { public Disease getCauseOfDeathDisease() { return causeOfDeathDisease; } - + public Disease getDisease() { + return disease; + } + public void setDisease(Disease disease) { + this.disease = disease; + } public void setCauseOfDeathDisease(Disease causeOfDeathDisease) { this.causeOfDeathDisease = causeOfDeathDisease; } @@ -526,11 +550,16 @@ public Integer getBirthWeight() { public void setBirthWeight(Integer birthWeight) { this.birthWeight = birthWeight; } + public String getGhanaCard() { + return ghanaCard; + } + public void setGhanaCard(String ghanaCard) { + this.ghanaCard = ghanaCard; + } public String getPassportNumber() { return passportNumber; } - public void setPassportNumber(String passportNumber) { this.passportNumber = passportNumber; } diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/person/PersonDtoHelper.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/person/PersonDtoHelper.java index 038b7774344..dd3e6244a3e 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/person/PersonDtoHelper.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/person/PersonDtoHelper.java @@ -71,6 +71,7 @@ public void fillInnerFromDto(Person target, PersonDto source) { target.setFirstName(source.getFirstName()); target.setLastName(source.getLastName()); + target.setOtherName(source.getOtherName()); target.setSalutation(source.getSalutation()); target.setOtherSalutation(source.getOtherSalutation()); target.setBirthName(source.getBirthName()); @@ -104,6 +105,7 @@ public void fillInnerFromDto(Person target, PersonDto source) { target.setCauseOfDeath(source.getCauseOfDeath()); target.setCauseOfDeathDisease(source.getCauseOfDeathDisease()); target.setCauseOfDeathDetails(source.getCauseOfDeathDetails()); + target.setDisease(source.getDisease()); target.setMothersName(source.getMothersName()); target.setFathersName(source.getFathersName()); target.setNamesOfGuardians(source.getNamesOfGuardians()); @@ -117,6 +119,7 @@ public void fillInnerFromDto(Person target, PersonDto source) { target.setPassportNumber(source.getPassportNumber()); target.setNationalHealthId(source.getNationalHealthId()); + target.setGhanaCard(source.getGhanaCard()); target.setPseudonymized(source.isPseudonymized()); target.setPlaceOfBirthFacilityType(source.getPlaceOfBirthFacilityType()); @@ -155,6 +158,7 @@ public void fillInnerFromAdo(PersonDto target, Person source) { target.setFirstName(source.getFirstName()); target.setLastName(source.getLastName()); + target.setOtherName(source.getOtherName()); target.setSalutation(source.getSalutation()); target.setOtherSalutation(source.getOtherSalutation()); target.setBirthName(source.getBirthName()); @@ -179,6 +183,7 @@ public void fillInnerFromAdo(PersonDto target, Person source) { target.setCauseOfDeath(source.getCauseOfDeath()); target.setCauseOfDeathDisease(source.getCauseOfDeathDisease()); target.setCauseOfDeathDetails(source.getCauseOfDeathDetails()); + //target.setDisease(source.getDisease()); Location address = DatabaseHelper.getLocationDao().queryForId(source.getAddress().getId()); target.setAddress(locationHelper.adoToDto(address)); @@ -225,6 +230,7 @@ public void fillInnerFromAdo(PersonDto target, Person source) { target.setPassportNumber(source.getPassportNumber()); target.setNationalHealthId(source.getNationalHealthId()); + target.setGhanaCard(source.getGhanaCard()); target.setPseudonymized(source.isPseudonymized()); target.setPlaceOfBirthFacilityType(source.getPlaceOfBirthFacilityType()); diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/Sample.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/Sample.java index da2915997f5..7ede59ca5d5 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/Sample.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/Sample.java @@ -18,9 +18,11 @@ import static de.symeda.sormas.api.utils.FieldConstraints.CHARACTER_LIMIT_BIG; import static de.symeda.sormas.api.utils.FieldConstraints.CHARACTER_LIMIT_DEFAULT; +import java.util.Arrays; import java.util.Date; import java.util.HashSet; import java.util.Set; +import java.util.stream.Collectors; import javax.persistence.Column; import javax.persistence.Entity; @@ -34,6 +36,7 @@ import com.j256.ormlite.field.DatabaseField; import com.j256.ormlite.table.DatabaseTable; +import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.sample.AdditionalTestType; import de.symeda.sormas.api.sample.PathogenTestResultType; import de.symeda.sormas.api.sample.PathogenTestType; @@ -42,6 +45,7 @@ import de.symeda.sormas.api.sample.SampleSource; import de.symeda.sormas.api.sample.SamplingReason; import de.symeda.sormas.api.sample.SpecimenCondition; +import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.app.backend.caze.Case; import de.symeda.sormas.app.backend.common.PseudonymizableAdo; import de.symeda.sormas.app.backend.contact.Contact; @@ -68,6 +72,7 @@ public class Sample extends PseudonymizableAdo { public static final String PATHOGEN_TEST_RESULT = "pathogenTestResult"; public static final String LAB_SAMPLE_ID = "labSampleID"; public static final String FIELD_SAMPLE_ID = "fieldSampleID"; + public static final String DISEASE = "disease"; @DatabaseField(foreign = true, foreignAutoRefresh = true) private Case associatedCase; @@ -142,6 +147,8 @@ public class Sample extends PseudonymizableAdo { @DatabaseField private boolean shipped; + private boolean sampleMaterialTypeForYF; + @DatabaseField private boolean received; @@ -154,15 +161,25 @@ public class Sample extends PseudonymizableAdo { @DatabaseField private Boolean additionalTestingRequested; + @DatabaseField + private YesNoUnknown ipSampleSent; + + private String ipSampleResults; + @Column(length = CHARACTER_LIMIT_DEFAULT) private String requestedPathogenTestsString; @Column(length = CHARACTER_LIMIT_DEFAULT) private String requestedAdditionalTestsString; + private String requestedSampleMaterialsString; + @Transient private Set requestedPathogenTests; + @Transient + private Set requestedSampleMaterials; + @Transient private Set requestedAdditionalTests; @@ -182,6 +199,9 @@ public class Sample extends PseudonymizableAdo { @DatabaseField private boolean ownershipHandedOver; + @Enumerated(EnumType.STRING) + private Disease disease; + public Case getAssociatedCase() { return associatedCase; } @@ -265,6 +285,7 @@ public void setSampleMaterialText(String sampleMaterialText) { public Facility getLab() { return lab; } + //getters and setters for pending results public void setLab(Facility lab) { this.lab = lab; @@ -358,6 +379,14 @@ public void setShipped(boolean shipped) { this.shipped = shipped; } + public boolean isYellowFeverSampleType() { + return sampleMaterialTypeForYF; + } + + public void setYellowFeverSampleType(boolean sampleMaterialTypeForYF) { + this.sampleMaterialTypeForYF = sampleMaterialTypeForYF; + } + public boolean isReceived() { return received; } @@ -390,6 +419,27 @@ public void setAdditionalTestingRequested(Boolean additionalTestingRequested) { this.additionalTestingRequested = additionalTestingRequested; } + public YesNoUnknown getIpSampleSent(){ + return ipSampleSent; + } + public void setIpSampleSent(YesNoUnknown ipSampleSent) { + this.ipSampleSent = ipSampleSent; + } + + public String getIpSampleResults(){ + return ipSampleResults; + } + public void setIpSampleResults(String ipSampleResults) { + this.ipSampleResults = ipSampleResults; + } + + public Disease getDisease() { + return disease; + } + public void setDisease(Disease disease) { + this.disease = disease; + } + public String getRequestedPathogenTestsString() { return requestedPathogenTestsString; } @@ -472,6 +522,37 @@ public void setRequestedAdditionalTests(Set requestedAdditio requestedAdditionalTestsString = sb.toString(); } + @Transient + public Set getRequestedSampleMaterials() { + if (requestedSampleMaterials == null) { + if (StringUtils.isEmpty(requestedSampleMaterialsString)) { + requestedSampleMaterials = new HashSet<>(); + } else { + requestedSampleMaterials = + Arrays.stream(requestedSampleMaterialsString.split(",")).map(SampleMaterial::valueOf).collect(Collectors.toSet()); + } + } + return requestedSampleMaterials; + } + + public void setRequestedSampleMaterials(Set requestedSampleMaterials) { + this.requestedSampleMaterials = requestedSampleMaterials; + + if (this.requestedSampleMaterials == null) { + return; + } + + StringBuilder sb = new StringBuilder(); + requestedSampleMaterials.stream().forEach(t -> { + sb.append(t.name()); + sb.append(","); + }); + if (sb.length() > 0) { + sb.substring(0, sb.lastIndexOf(",")); + } + requestedSampleMaterialsString = sb.toString(); + } + public String getRequestedOtherPathogenTests() { return requestedOtherPathogenTests; } diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/SampleDtoHelper.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/SampleDtoHelper.java index 54e1d6abe42..918ed20c7bb 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/SampleDtoHelper.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/backend/sample/SampleDtoHelper.java @@ -17,6 +17,7 @@ import java.util.List; +import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.PushResult; import de.symeda.sormas.api.sample.SampleDto; import de.symeda.sormas.api.sample.SampleReferenceDto; @@ -92,12 +93,17 @@ public void fillInnerFromDto(Sample target, SampleDto source) { target.setReferredToUuid(null); } target.setShipped(source.isShipped()); + target.setYellowFeverSampleType(source.isYellowFeverSampleType()); target.setReceived(source.isReceived()); target.setPathogenTestResult(source.getPathogenTestResult()); target.setPathogenTestingRequested(source.getPathogenTestingRequested()); target.setAdditionalTestingRequested(source.getAdditionalTestingRequested()); + target.setIpSampleSent(source.getIpSampleSent()); + target.setIpSampleResults(String.valueOf(source.getIpSampleResults())); + target.setDisease(source.getDisease()); target.setRequestedPathogenTests(source.getRequestedPathogenTests()); target.setRequestedAdditionalTests(source.getRequestedAdditionalTests()); + target.setRequestedSampleMaterials(source.getRequestedSampleMaterials()); target.setRequestedOtherPathogenTests(source.getRequestedOtherPathogenTests()); target.setRequestedOtherAdditionalTests(source.getRequestedOtherAdditionalTests()); @@ -160,14 +166,19 @@ public void fillInnerFromAdo(SampleDto target, Sample source) { target.setComment(source.getComment()); target.setSampleSource(source.getSampleSource()); target.setShipped(source.isShipped()); + target.setYellowFeverSampleType(source.isYellowFeverSampleType()); target.setReceived(source.isReceived()); target.setPathogenTestResult(source.getPathogenTestResult()); target.setPathogenTestingRequested(source.getPathogenTestingRequested()); target.setAdditionalTestingRequested(source.getAdditionalTestingRequested()); + target.setIpSampleSent(source.getIpSampleSent()); + target.setIpSampleResults(Disease.valueOf(source.getIpSampleResults())); target.setRequestedPathogenTests(source.getRequestedPathogenTests()); target.setRequestedAdditionalTests(source.getRequestedAdditionalTests()); + target.setRequestedSampleMaterials(source.getRequestedSampleMaterials()); target.setRequestedOtherPathogenTests(source.getRequestedOtherPathogenTests()); target.setRequestedOtherAdditionalTests(source.getRequestedOtherAdditionalTests()); + target.setDisease(source.getDisease()); target.setReportLat(source.getReportLat()); target.setReportLon(source.getReportLon()); diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditFragment.java index 79dff87ae0a..0d5c62bb61b 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditFragment.java @@ -21,9 +21,11 @@ import static de.symeda.sormas.api.caze.CaseConfirmationBasis.EPIDEMIOLOGICAL_CONFIRMATION; import static de.symeda.sormas.api.caze.CaseConfirmationBasis.LABORATORY_DIAGNOSTIC_CONFIRMATION; +import java.util.ArrayList; import java.util.Date; import java.util.List; +import android.view.View; import android.webkit.WebView; import androidx.fragment.app.FragmentActivity; @@ -45,7 +47,7 @@ import de.symeda.sormas.api.caze.QuarantineReason; import de.symeda.sormas.api.caze.RabiesType; import de.symeda.sormas.api.caze.ScreeningType; -import de.symeda.sormas.api.caze.ReportingType; +//import de.symeda.sormas.api.caze.ReportingType; import de.symeda.sormas.api.caze.TransmissionClassification; import de.symeda.sormas.api.caze.Trimester; import de.symeda.sormas.api.caze.VaccinationStatus; @@ -57,6 +59,7 @@ import de.symeda.sormas.api.infrastructure.facility.FacilityTypeGroup; import de.symeda.sormas.api.user.JurisdictionLevel; import de.symeda.sormas.api.user.UserRight; +import de.symeda.sormas.api.utils.CardOrHistory; import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers; import de.symeda.sormas.api.utils.fieldvisibility.FieldVisibilityCheckers; @@ -90,6 +93,7 @@ public class CaseEditFragment extends BaseEditFragment reportingTypeList; private List caseTransmissionClassificationsList; +// private Disease disease; + private List lab; + private String labDetails; // Static methods @@ -421,6 +428,7 @@ public void onLayoutBinding(FragmentCaseEditLayoutBinding contentBinding) { FragmentActivity thisActivity = this.getActivity(); contentBinding.caseDataCaseTransmissionClassification.initializeSpinner(caseTransmissionClassificationsList); + contentBinding.caseDataCaseTransmissionClassification.setVisibility(View.INVISIBLE); contentBinding.caseDataDisease.addValueChangedListener(new ValueChangeListener() { Disease currentDisease = record.getDisease(); @@ -454,6 +462,8 @@ public void onChange(ControlPropertyField field) { contentBinding.setData(record); contentBinding.setYesNoUnknownClass(YesNoUnknown.class); contentBinding.setVaccinationStatusClass(VaccinationStatus.class); + contentBinding.setVaccinationType(CardOrHistory.class); + contentBinding.caseDataVaccinationDate.setEnabled(true); contentBinding.setTrimesterClass(Trimester.class); contentBinding.setDifferentPlaceOfStayJurisdiction(differentPlaceOfStayJurisdiction); @@ -644,69 +654,129 @@ public void onAfterLayoutBinding(final FragmentCaseEditLayoutBinding contentBind // Initialize ControlSpinnerFields contentBinding.caseDataDisease.initializeSpinner(diseaseList); - contentBinding.caseDataDiseaseVariant.initializeSpinner(diseaseVariantList); - contentBinding.caseDataCaseClassification.initializeSpinner(caseClassificationList); - contentBinding.caseDataCaseIdentificationSource.initializeSpinner(caseIdentificationSourceList); - contentBinding.caseDataScreeningType.initializeSpinner(caseScreeningTypeList); - contentBinding.caseDataOutcome.initializeSpinner(caseOutcomeList); - contentBinding.caseDataPlagueType.initializeSpinner(plagueTypeList); - contentBinding.caseDataDengueFeverType.initializeSpinner(dengueFeverTypeList); - contentBinding.caseDataRabiesType.initializeSpinner(humanRabiesTypeList); - contentBinding.caseDataNotifyingClinic.initializeSpinner(hospitalWardTypeList); - contentBinding.caseDataQuarantine.initializeSpinner(quarantineList); - contentBinding.caseDataCaseConfirmationBasis.initializeSpinner(caseConfirmationBasisList); - - // Initialize ControlDateFields - contentBinding.caseDataReportDate.initializeDateField(getFragmentManager()); - contentBinding.caseDataOutcomeDate.initializeDateField(getFragmentManager()); - contentBinding.caseDataSmallpoxLastVaccinationDate.initializeDateField(getFragmentManager()); - contentBinding.caseDataDistrictLevelDate.initializeDateField(getFragmentManager()); - contentBinding.caseDataQuarantineFrom.initializeDateField(getFragmentManager()); - contentBinding.caseDataQuarantineTo.initializeDateField(getFragmentManager()); - contentBinding.caseDataQuarantineOrderedVerballyDate.initializeDateField(getChildFragmentManager()); - contentBinding.caseDataQuarantineOrderedOfficialDocumentDate.initializeDateField(getChildFragmentManager()); - contentBinding.caseDataQuarantineOfficialOrderSentDate.initializeDateField(getChildFragmentManager()); - - // Replace classification user field with classified by field when case has been classified automatically - if (contentBinding.getData().getClassificationDate() != null && contentBinding.getData().getClassificationUser() == null) { - contentBinding.caseDataClassificationUser.setVisibility(GONE); - contentBinding.caseDataClassifiedBy.setVisibility(VISIBLE); - contentBinding.caseDataClassifiedBy.setValue(getResources().getString(R.string.system)); - } - if (record.getCaseOrigin() == CaseOrigin.POINT_OF_ENTRY && record.getHealthFacility() == null) { - contentBinding.facilityTypeFieldsLayout.setVisibility(GONE); - contentBinding.caseDataHealthFacility.setVisibility(GONE); - contentBinding.caseDataHealthFacilityDetails.setVisibility(GONE); - } else if (record.getHealthFacility() != null && FacilityDto.NONE_FACILITY_UUID.equals(record.getHealthFacility().getUuid())) { - contentBinding.facilityOrHome.setValue(TypeOfPlace.HOME); - } else { - contentBinding.facilityOrHome.setValue(TypeOfPlace.FACILITY); - if (record.getFacilityType() != null) { - contentBinding.facilityTypeGroup.setValue(record.getFacilityType().getFacilityTypeGroup()); + contentBinding.caseDataDisease.addValueChangedListener( e -> { + Disease selectedDisease = (Disease) e.getValue(); + + List outcomeList = new ArrayList<>(); + outcomeList.add(new Item("", null)); + + contentBinding.caseDataDiseaseVariant.initializeSpinner(diseaseVariantList); + contentBinding.caseDataCaseClassification.initializeSpinner(caseClassificationList); + contentBinding.caseDataCaseIdentificationSource.initializeSpinner(caseIdentificationSourceList); + contentBinding.caseDataScreeningType.initializeSpinner(caseScreeningTypeList); + + contentBinding.caseDataPlagueType.initializeSpinner(plagueTypeList); + contentBinding.caseDataDengueFeverType.initializeSpinner(dengueFeverTypeList); + contentBinding.caseDataRabiesType.initializeSpinner(humanRabiesTypeList); + contentBinding.caseDataNotifyingClinic.initializeSpinner(hospitalWardTypeList); + contentBinding.caseDataQuarantine.initializeSpinner(quarantineList); + contentBinding.caseDataCaseConfirmationBasis.initializeSpinner(caseConfirmationBasisList); + + if(selectedDisease == Disease.YELLOW_FEVER){ + for(CaseOutcome caseOutcome: CaseOutcome.values()){ + if(caseOutcome == CaseOutcome.ALIVE || caseOutcome == CaseOutcome.DECEASED){ + Item item = new Item(caseOutcome.toString(), caseOutcome); + outcomeList.add(item); + } + } + contentBinding.caseDataInternalToken.setVisibility(GONE); + contentBinding.caseDataExternalToken.setVisibility(GONE); + contentBinding.caseDataReInfection.setVisibility(GONE); + contentBinding.caseDataOutcome.initializeSpinner(outcomeList); + contentBinding.caseDataCaseClassification.setVisibility(GONE); + contentBinding.caseDataInvestigationStatus.setVisibility(GONE); + contentBinding.caseDataCaseTransmissionClassification.setVisibility(GONE); + contentBinding.caseDataQuarantine.setVisibility(GONE); + contentBinding.caseDataPregnant.setVisibility(GONE); + contentBinding.caseDataPostpartum.setVisibility(GONE); + contentBinding.additionalMedicalInformation.setVisibility(GONE); + contentBinding.generalComment.setVisibility(GONE); + contentBinding.caseDataAdditionalDetails.setVisibility(GONE); + } + else if(selectedDisease == Disease.AHF){ + for(CaseOutcome caseOutcome: CaseOutcome.values()){ + if(caseOutcome == CaseOutcome.ALIVE || caseOutcome == CaseOutcome.DECEASED){ + Item item = new Item(caseOutcome.toString(), caseOutcome); + outcomeList.add(item); + } + } + contentBinding.caseDataReInfection.setVisibility(GONE); + contentBinding.caseDataOutcome.initializeSpinner(outcomeList); + contentBinding.caseDataCaseTransmissionClassification.setVisibility(GONE); + contentBinding.caseDataVaccinationStatus.setVisibility(GONE); + contentBinding.caseDataVaccinationType.setVisibility(GONE); + contentBinding.caseDataVaccinationDate.setVisibility(GONE); + } + else if(selectedDisease == Disease.CSM){ + contentBinding.caseDataCaseClassification.setVisibility(GONE); + contentBinding.caseDataInvestigationStatus.setVisibility(GONE); + contentBinding.caseDataInternalToken.setVisibility(GONE); + contentBinding.caseDataExternalToken.setVisibility(GONE); + contentBinding.caseDataReInfection.setVisibility(GONE); + contentBinding.caseDataCaseTransmissionClassification.setVisibility(GONE); + contentBinding.caseDataQuarantine.setVisibility(GONE); + contentBinding.caseDataPregnant.setVisibility(GONE); + contentBinding.caseDataPostpartum.setVisibility(GONE); + contentBinding.caseDataSurveillanceOfficer.setVisibility(GONE); + contentBinding.caseDataAdditionalDetails.setVisibility(GONE); + contentBinding.generalComment.setVisibility(GONE); } - } - // Swiss fields - contentBinding.caseDataQuarantineReasonBeforeIsolation.initializeSpinner(quarantineReasonList); - contentBinding.caseDataEndOfIsolationReason.initializeSpinner(endOfIsolationReasonList); + // Initialize ControlDateFields + contentBinding.caseDataReportDate.initializeDateField(getFragmentManager()); + contentBinding.caseDataOutcomeDate.initializeDateField(getFragmentManager()); + contentBinding.caseDataSmallpoxLastVaccinationDate.initializeDateField(getFragmentManager()); + contentBinding.caseDataDistrictLevelDate.initializeDateField(getFragmentManager()); + contentBinding.caseDataVaccinationDate.initializeDateField(getFragmentManager()); + contentBinding.caseDataQuarantineFrom.initializeDateField(getFragmentManager()); + contentBinding.caseDataQuarantineTo.initializeDateField(getFragmentManager()); + contentBinding.caseDataQuarantineOrderedVerballyDate.initializeDateField(getChildFragmentManager()); + contentBinding.caseDataQuarantineOrderedOfficialDocumentDate.initializeDateField(getChildFragmentManager()); + contentBinding.caseDataQuarantineOfficialOrderSentDate.initializeDateField(getChildFragmentManager()); + + // Replace classification user field with classified by field when case has been classified automatically + if (contentBinding.getData().getClassificationDate() != null && contentBinding.getData().getClassificationUser() == null) { + contentBinding.caseDataClassificationUser.setVisibility(GONE); + contentBinding.caseDataClassifiedBy.setVisibility(VISIBLE); + contentBinding.caseDataClassifiedBy.setValue(getResources().getString(R.string.system)); + } + + if (record.getCaseOrigin() == CaseOrigin.POINT_OF_ENTRY && record.getHealthFacility() == null) { + contentBinding.facilityTypeFieldsLayout.setVisibility(GONE); + contentBinding.caseDataHealthFacility.setVisibility(GONE); + contentBinding.caseDataHealthFacilityDetails.setVisibility(GONE); + } else if (record.getHealthFacility() != null && FacilityDto.NONE_FACILITY_UUID.equals(record.getHealthFacility().getUuid())) { + contentBinding.facilityOrHome.setValue(TypeOfPlace.HOME); + } else { + contentBinding.facilityOrHome.setValue(TypeOfPlace.FACILITY); + if (record.getFacilityType() != null) { + contentBinding.facilityTypeGroup.setValue(record.getFacilityType().getFacilityTypeGroup()); + } + } - if (isVisibleAllowed(CaseDataDto.class, contentBinding.caseDataContactTracingFirstContactType) - || isVisibleAllowed(CaseDataDto.class, contentBinding.caseDataContactTracingFirstContactDate)) { - contentBinding.caseDataContactTracingDivider.setVisibility(VISIBLE); - contentBinding.caseDataContactTracingFirstContactHeading.setVisibility(VISIBLE); + // Swiss fields + contentBinding.caseDataQuarantineReasonBeforeIsolation.initializeSpinner(quarantineReasonList); + contentBinding.caseDataEndOfIsolationReason.initializeSpinner(endOfIsolationReasonList); - contentBinding.caseDataContactTracingFirstContactType.initializeSpinner(contactTracingContactTypeList); - contentBinding.caseDataContactTracingFirstContactDate.initializeDateField(getChildFragmentManager()); - } - // end swiss fields + if (isVisibleAllowed(CaseDataDto.class, contentBinding.caseDataContactTracingFirstContactType) + || isVisibleAllowed(CaseDataDto.class, contentBinding.caseDataContactTracingFirstContactDate)) { + contentBinding.caseDataContactTracingDivider.setVisibility(VISIBLE); + contentBinding.caseDataContactTracingFirstContactHeading.setVisibility(VISIBLE); - contentBinding.caseDataInfectionSetting.initializeSpinner(infectionSettingList); - contentBinding.caseDataProhibitionToWorkFrom.initializeDateField(getChildFragmentManager()); - contentBinding.caseDataProhibitionToWorkUntil.initializeDateField(getChildFragmentManager()); + contentBinding.caseDataContactTracingFirstContactType.initializeSpinner(contactTracingContactTypeList); + contentBinding.caseDataContactTracingFirstContactDate.initializeDateField(getChildFragmentManager()); + } + // end swiss fields + + contentBinding.caseDataInfectionSetting.initializeSpinner(infectionSettingList); + contentBinding.caseDataProhibitionToWorkFrom.initializeDateField(getChildFragmentManager()); + contentBinding.caseDataProhibitionToWorkUntil.initializeDateField(getChildFragmentManager()); + + // reinfection + contentBinding.caseDataPreviousInfectionDate.initializeDateField(getChildFragmentManager()); + }); - // reinfection - contentBinding.caseDataPreviousInfectionDate.initializeDateField(getChildFragmentManager()); } private void updateDiseaseVariantsField(FragmentCaseEditLayoutBinding contentBinding) { @@ -741,4 +811,8 @@ public CaseConfirmationBasis getCaseConfirmationBasis() { public void setCaseConfirmationBasis(CaseConfirmationBasis caseConfirmationBasis) { this.caseConfirmationBasis = caseConfirmationBasis; } + + private boolean diseaseCheck(){ + return disease == Disease.YELLOW_FEVER; + } } diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditHospitalizationFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditHospitalizationFragment.java index 40412340395..ac308e3d8e4 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditHospitalizationFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseEditHospitalizationFragment.java @@ -23,6 +23,7 @@ import java.util.List; +import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.hospitalization.HospitalizationDto; import de.symeda.sormas.api.hospitalization.HospitalizationReasonType; import de.symeda.sormas.api.hospitalization.PreviousHospitalizationDto; @@ -191,6 +192,14 @@ protected void onAfterLayoutBinding(FragmentCaseEditHospitalizationLayoutBinding contentBinding.caseHospitalizationIsolationDate.initializeDateField(getFragmentManager()); verifyPrevHospitalizationStatus(); + + if(caze.getDisease() == Disease.AHF){ + contentBinding.caseHospitalizationAdmittedToHealthFacility.setVisibility(View.GONE); + contentBinding.caseHospitalizationAdmissionDate.setVisibility(View.GONE); + contentBinding.caseHospitalizationDischargeDate.setVisibility(View.GONE); + contentBinding.caseHospitalizationLeftAgainstAdvice.setVisibility(View.GONE); + contentBinding.caseHospitalizationHospitalizationReason.setVisibility(View.GONE); + } } @Override diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseNewFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseNewFragment.java index c181d557bfa..ecb0439355f 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseNewFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/edit/CaseNewFragment.java @@ -18,6 +18,8 @@ import static android.view.View.GONE; import static android.view.View.VISIBLE; +import android.view.View; + import java.util.ArrayList; import java.util.Calendar; import java.util.List; @@ -38,7 +40,6 @@ import de.symeda.sormas.api.person.Sex; import de.symeda.sormas.api.user.JurisdictionLevel; import de.symeda.sormas.api.utils.DateHelper; -import de.symeda.sormas.api.utils.fieldvisibility.FieldVisibilityCheckers; import de.symeda.sormas.app.BaseEditFragment; import de.symeda.sormas.app.R; import de.symeda.sormas.app.backend.caze.Case; @@ -243,10 +244,18 @@ public void onLayoutBinding(FragmentCaseNewLayoutBinding contentBinding) { int year = Calendar.getInstance().get(Calendar.YEAR); contentBinding.personBirthdateYYYY.setSelectionOnOpen(year - 35); - contentBinding.personSex.initializeSpinner(sexList); + List filteredSexList = new ArrayList<>(); + filteredSexList.add(new Item("", null)); - contentBinding.personPresentCondition.initializeSpinner(presentConditionList); + for (Sex sex : Sex.values()) { + if (sex == Sex.MALE || sex == Sex.FEMALE) { + Item item = new Item(sex.toString(), sex); + filteredSexList.add(item); + } + } + contentBinding.personSex.initializeSpinner(filteredSexList); + contentBinding.personPresentCondition.initializeSpinner(presentConditionList); contentBinding.facilityOrHome.addValueChangedListener(e -> { if (e.getValue() == TypeOfPlace.FACILITY) { contentBinding.facilityTypeGroup.setValue(FacilityTypeGroup.MEDICAL_FACILITY); @@ -258,6 +267,18 @@ public void onLayoutBinding(FragmentCaseNewLayoutBinding contentBinding) { } }); contentBinding.caseDataDisease.addValueChangedListener(e -> { + Disease selectedDisease = (Disease) e.getValue(); + if(selectedDisease == Disease.YELLOW_FEVER){ + contentBinding.caseDataCaseTransmissionClassification.setVisibility(GONE); + } + else if(selectedDisease == Disease.AHF){ + contentBinding.caseDataCaseTransmissionClassification.setVisibility(GONE); + } else if (selectedDisease == Disease.CSM) { + contentBinding.caseDataCaseTransmissionClassification.setVisibility(GONE); + contentBinding.caseDataCaseOrigin.setVisibility(GONE); + }else{ + contentBinding.caseDataCaseTransmissionClassification.setVisibility(View.VISIBLE); + } contentBinding.rapidCaseEntryCheckBox.setVisibility( e.getValue() != null && ((CaseNewActivity) getActivity()).getLineListingDiseases().contains(e.getValue()) ? VISIBLE : GONE); updateDiseaseVariantsField(contentBinding); @@ -367,6 +388,9 @@ public void onAfterLayoutBinding(final FragmentCaseNewLayoutBinding contentBindi contentBinding.caseDataCaseOrigin.setVisibility(GONE); contentBinding.caseDataPointOfEntry.setVisibility(GONE); } + + //Get Disease in change listener + } private void updateDiseaseVariantsField(FragmentCaseNewLayoutBinding contentBinding) { @@ -382,12 +406,29 @@ private void updateDiseaseVariantsField(FragmentCaseNewLayoutBinding contentBind private void updatePresentConditionField(FragmentCaseNewLayoutBinding contentBinding) { Disease diseaseValue = (Disease) contentBinding.caseDataDisease.getValue(); PresentCondition presentConditionValue = (PresentCondition) contentBinding.personPresentCondition.getValue(); - List items; - if (diseaseValue == null) { - items = DataUtils.getEnumItems(PresentCondition.class, true); + List items = new ArrayList<>(); + + if (diseaseValue != null) { + if (diseaseValue == Disease.YELLOW_FEVER || diseaseValue == Disease.AHF) { + items.add(new Item(PresentCondition.ALIVE.toString(), PresentCondition.ALIVE)); + items.add(new Item(PresentCondition.UNKNOWN.toString(), PresentCondition.UNKNOWN)); + } else if (diseaseValue == Disease.CSM) { + items.add(new Item(PresentCondition.ALIVE.toString(), PresentCondition.ALIVE)); + items.add(new Item(PresentCondition.DEAD.toString(), PresentCondition.DEAD)); + } else if (diseaseValue == Disease.AFP) { + items.add(new Item(PresentCondition.ALIVE.toString(), PresentCondition.ALIVE)); + items.add(new Item(PresentCondition.DEAD.toString(), PresentCondition.DEAD)); + items.add(new Item(PresentCondition.BURIED.toString(), PresentCondition.BURIED)); + } else { + // For other diseases, add all PresentCondition values + items = DataUtils.getEnumItems(PresentCondition.class, true); + } } else { - items = DataUtils.getEnumItems(PresentCondition.class, true, FieldVisibilityCheckers.withDisease(diseaseValue)); + // Handle case when diseaseValue is null + items = DataUtils.getEnumItems(PresentCondition.class, true); } + + // Check and add the current value if not present in the items list if (presentConditionValue != null) { Item currentValueItem = new Item(presentConditionValue.toString(), presentConditionValue); if (!items.contains(currentValueItem)) { diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadFragment.java index 0224d571b3a..b545e03edf1 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/caze/read/CaseReadFragment.java @@ -195,12 +195,13 @@ public void onLayoutBinding(FragmentCaseReadLayoutBinding contentBinding) { contentBinding.setSingleClassification(CaseConfirmationBasis.LABORATORY_DIAGNOSTIC_CONFIRMATION); } // contentBinding.setCaseTransmissionClassificationClass(record.getCaseTransmissionClassification().toString()); - contentBinding.setCaseTransmissionClassificationClass(record.getCaseTransmissionClassification()); + //contentBinding.setCaseTransmissionClassificationClass(record.getCaseTransmissionClassification()); } @Override public void onAfterLayoutBinding(FragmentCaseReadLayoutBinding contentBinding) { setUpFieldVisibilities(contentBinding); + Disease disease = record.getDisease(); // Replace classification user field with classified by field when case has been classified automatically if (contentBinding.getData().getClassificationDate() != null && contentBinding.getData().getClassificationUser() == null) { @@ -220,6 +221,42 @@ public void onAfterLayoutBinding(FragmentCaseReadLayoutBinding contentBinding) { contentBinding.facilityOrHome.setValue(TypeOfPlace.FACILITY); contentBinding.facilityTypeGroup.setValue(record.getFacilityType().getFacilityTypeGroup()); } + if(disease == Disease.AHF) { + contentBinding.caseDataReInfection.setVisibility(GONE); + contentBinding.caseDataCaseTransmissionClassification.setVisibility(GONE); + contentBinding.caseDataVaccinationStatus.setVisibility(GONE); + contentBinding.caseDataVaccinationType.setVisibility(GONE); + contentBinding.caseDataVaccinationDate.setVisibility(GONE); + } + else if (disease == Disease.CSM) { + contentBinding.caseDataInvestigationStatus.setVisibility(GONE); + contentBinding.caseDataExternalToken.setVisibility(GONE); + contentBinding.caseDataInternalToken.setVisibility(GONE); + contentBinding.caseDataReInfection.setVisibility(GONE); + contentBinding.caseDataCaseTransmissionClassification.setVisibility(GONE); + contentBinding.caseDataQuarantine.setVisibility(GONE); + contentBinding.caseDataPregnant.setVisibility(GONE); + contentBinding.caseDataPostpartum.setVisibility(GONE); + contentBinding.caseDataSurveillanceOfficer.setVisibility(GONE); + contentBinding.caseDataAdditionalDetails.setVisibility(GONE); + contentBinding.caseDataCaseClassification.setVisibility(GONE); + } + else if(disease == Disease.YELLOW_FEVER){ + contentBinding.caseDataInternalToken.setVisibility(GONE); + contentBinding.caseDataInternalToken.setVisibility(GONE); + contentBinding.caseDataReInfection.setVisibility(GONE); + contentBinding.caseDataCaseClassification.setVisibility(GONE); + contentBinding.caseDataInvestigationStatus.setVisibility(GONE); + contentBinding.caseDataCaseTransmissionClassification.setVisibility(GONE); + contentBinding.caseDataQuarantine.setVisibility(GONE); + contentBinding.caseDataPregnant.setVisibility(GONE); + contentBinding.caseDataPostpartum.setVisibility(GONE); + contentBinding.caseDataAdditionalDetails.setVisibility(GONE); + contentBinding.caseDataVaccinationStatus.setVisibility(VISIBLE); + contentBinding.caseDataVaccinationType.setVisibility(VISIBLE); + contentBinding.caseDataVaccinationDate.setVisibility(VISIBLE); + contentBinding.caseDataAdditionalDetails.setVisibility(GONE); + } } @Override diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/component/Item.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/component/Item.java index 081d82bb584..649fc987326 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/component/Item.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/component/Item.java @@ -17,6 +17,8 @@ import java.util.Objects; +import de.symeda.sormas.api.person.Sex; + public class Item { private String key; diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/component/controls/ControlPropertyField.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/component/controls/ControlPropertyField.java index c49f6133484..6bab707f99c 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/component/controls/ControlPropertyField.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/component/controls/ControlPropertyField.java @@ -39,6 +39,7 @@ import de.symeda.sormas.api.customizableenum.CustomizableEnum; import de.symeda.sormas.api.i18n.I18nProperties; import de.symeda.sormas.app.R; +import de.symeda.sormas.app.component.Item; import de.symeda.sormas.app.util.ControlLabelOnTouchListener; public abstract class ControlPropertyField extends LinearLayout { diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/component/dialog/LocationDialog.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/component/dialog/LocationDialog.java index 457cb89c9fb..3712d3a5978 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/component/dialog/LocationDialog.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/component/dialog/LocationDialog.java @@ -33,6 +33,7 @@ import androidx.fragment.app.FragmentActivity; import de.symeda.sormas.api.CountryHelper; +import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.i18n.I18nProperties; import de.symeda.sormas.api.i18n.Strings; import de.symeda.sormas.api.infrastructure.area.AreaType; @@ -67,6 +68,7 @@ public class LocationDialog extends FormDialog { private Location data; private Facility previousFacility; private DialogLocationLayoutBinding contentBinding; + private Disease disease; // Constructor @@ -220,6 +222,18 @@ protected void initializeContentView(ViewDataBinding rootBinding, ViewDataBindin } }); + contentBinding.locationCountry.addValueChangedListener(e -> { + final Country country = (Country) e.getValue(); + + if (country != null && "Ghana".equals(country.getName())) { + // Show all items for Ghana + showAllItems(); + } else { + // Hide all items for countries other than Ghana + hideAllItems(); + } + }); + contentBinding.locationFacility.addValueChangedListener(field -> { final Facility facility = (Facility) field.getValue(); @@ -274,6 +288,42 @@ protected void initializeContentView(ViewDataBinding rootBinding, ViewDataBindin ValidationHelper.initPhoneNumberValidator(contentBinding.locationContactPersonPhone); } + private void hideAllItems(){ + contentBinding.locationRegion.setVisibility(GONE); + contentBinding.locationDistrict.setVisibility(GONE); + contentBinding.locationCommunity.setVisibility(GONE); + contentBinding.locationPostalCode.setVisibility(GONE); + contentBinding.locationCity.setVisibility(GONE); + contentBinding.locationStreet.setVisibility(GONE); + contentBinding.locationAdditionalInformation.setVisibility(GONE); + contentBinding.locationAreaType.setVisibility(GONE); + contentBinding.locationHouseNumber.setVisibility(GONE); + contentBinding.pickGpsCoordinates.setVisibility(GONE); + contentBinding.locationLatitude.setVisibility(GONE); + contentBinding.locationLongitude.setVisibility(GONE); + contentBinding.locationLatLonAccuracy.setVisibility(GONE); + } + + private void showAllItems() { + contentBinding.locationRegion.setVisibility(VISIBLE); + contentBinding.locationDistrict.setVisibility(VISIBLE); + contentBinding.locationCommunity.setVisibility(VISIBLE); + contentBinding.locationPostalCode.setVisibility(VISIBLE); + contentBinding.locationCity.setVisibility(VISIBLE); + contentBinding.locationStreet.setVisibility(VISIBLE); + contentBinding.locationAdditionalInformation.setVisibility(VISIBLE); + contentBinding.locationAreaType.setVisibility(VISIBLE); + contentBinding.pickGpsCoordinates.setVisibility(VISIBLE); + contentBinding.locationLatitude.setVisibility(VISIBLE); + contentBinding.locationLongitude.setVisibility(VISIBLE); + contentBinding.locationLatLonAccuracy.setVisibility(VISIBLE); + + if(disease == Disease.CSM){ + contentBinding.locationAreaType.setVisibility(GONE); + contentBinding.locationAdditionalInformation.setVisibility(GONE); + } + + } private void overrideLocationDetailsWithFacilityOnes(Facility facility) { contentBinding.locationCity.setValue(facility.getCity()); contentBinding.locationPostalCode.setValue(facility.getPostalCode()); @@ -433,4 +483,8 @@ public void configureAsPersonAddressDialog(boolean showDeleteButton) { contentBinding.locationFacilityDetails.setValue(oldDetails); }); } + + public void setDisease(Disease incomingDisease) { + disease = incomingDisease; + } } diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/EpiDataFragmentHelper.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/EpiDataFragmentHelper.java index 3a7375a7d9c..c089382912e 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/EpiDataFragmentHelper.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/EpiDataFragmentHelper.java @@ -55,4 +55,13 @@ public static EpiData getEpiDataOfCaseOrContact(AbstractDomainObject abstractDom return contact.getEpiData(); } } + + public static Disease getDisease(AbstractDomainObject abstractDomainObject) { + if (abstractDomainObject instanceof Case) { + Case caze = (Case) abstractDomainObject; + return caze.getDisease(); + } else { + return null; + } + } } diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/EpidemiologicalDataEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/EpidemiologicalDataEditFragment.java index d07c6db21d6..445b5a67b48 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/EpidemiologicalDataEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/epidata/EpidemiologicalDataEditFragment.java @@ -17,6 +17,7 @@ import static android.view.View.GONE; import static android.view.View.VISIBLE; +import static de.symeda.sormas.app.epidata.EpiDataFragmentHelper.getDisease; import static de.symeda.sormas.app.epidata.EpiDataFragmentHelper.getDiseaseOfCaseOrContact; import static de.symeda.sormas.app.epidata.EpiDataFragmentHelper.getEpiDataOfCaseOrContact; @@ -27,6 +28,7 @@ import androidx.databinding.ObservableArrayList; +import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.activityascase.ActivityAsCaseDto; import de.symeda.sormas.api.epidata.EpiDataDto; import de.symeda.sormas.api.exposure.ExposureDto; @@ -54,9 +56,11 @@ public class EpidemiologicalDataEditFragment extends BaseEditFragment filteredList = new ArrayList<>(); + filteredList.add(new Item("", null)); + + for (PersonContactDetailType type : PersonContactDetailType.values()) { + if (type == PersonContactDetailType.PHONE || type == PersonContactDetailType.OTHER) { + Item item = new Item(type.toString(), type); + filteredList.add(item); + } + } + contentBinding.personContactDetailPersonContactDetailType.initializeSpinner(filteredList); + //contentBinding.personContactDetailPersonContactDetailType.initializeSpinner(DataUtils.getEnumItems(PersonContactDetailType.class, true)); contentBinding.personContactDetailPhoneNumberType.initializeSpinner(DataUtils.getEnumItems(PhoneNumberType.class, true)); contentBinding.personContactDetailPersonContactDetailType.addValueChangedListener(e -> { diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/person/edit/PersonEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/person/edit/PersonEditFragment.java index dd8bceb406c..a4aef428e30 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/person/edit/PersonEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/person/edit/PersonEditFragment.java @@ -86,6 +86,7 @@ public class PersonEditFragment extends BaseEditFragment filteredSexList = new ArrayList<>(); + filteredSexList.add(new Item("", null)); + + for (Sex sex : Sex.values()) { + if (sex == Sex.MALE || sex == Sex.FEMALE) { + Item item = new Item(sex.toString(), sex); + filteredSexList.add(item); + } + } + + contentBinding.personSex.initializeSpinner(filteredSexList); contentBinding.personCauseOfDeath.initializeSpinner(causeOfDeathList); contentBinding.personCauseOfDeathDisease.initializeSpinner(diseaseList); contentBinding.personDeathPlaceType.initializeSpinner(deathPlaceTypeList); @@ -264,8 +276,9 @@ private void setUpLayoutBinding(final BaseEditFragment fragment, final Person re public static void setUpControlListeners( final Person record, final BaseEditFragment fragment, - final FragmentPersonEditLayoutBinding contentBinding) { - contentBinding.personAddress.setOnClickListener(v -> openAddressPopup(record, fragment, contentBinding)); + final FragmentPersonEditLayoutBinding contentBinding, + final Disease disease) { + contentBinding.personAddress.setOnClickListener(v -> openAddressPopup(record, fragment, contentBinding, disease)); } public static Date calculateBirthDateValue(FragmentPersonEditLayoutBinding contentBinding) { @@ -311,10 +324,11 @@ private static void updateApproximateAgeField(FragmentPersonEditLayoutBinding co } } - private static void openAddressPopup(final Person record, final BaseEditFragment fragment, final FragmentPersonEditLayoutBinding contentBinding) { + private static void openAddressPopup(final Person record, final BaseEditFragment fragment, final FragmentPersonEditLayoutBinding contentBinding, Disease disease) { final Location location = record.getAddress(); final Location locationClone = (Location) location.clone(); final LocationDialog locationDialog = new LocationDialog(BaseActivity.getActiveActivity(), locationClone, fragment.getFieldAccessCheckers()); + locationDialog.setDisease(disease); locationDialog.show(); locationDialog.setPositiveCallback(() -> { @@ -585,6 +599,8 @@ protected void prepareFragmentData() { if (ado instanceof Case) { record = ((Case) ado).getPerson(); + disease = ((Case) ado).getDisease(); + rootData = ado; } else if (ado instanceof Contact) { record = ((Contact) ado).getPerson(); @@ -624,13 +640,47 @@ public void onLayoutBinding(FragmentPersonEditLayoutBinding contentBinding) { getContentBinding().setPersonContactDetailBindCallback(this::setLocationFieldVisibilitiesAndAccesses); setUpLayoutBinding(this, record, contentBinding); - } + +// contentBinding.personDisease.addValueChangedListener(new ValueChangeListener() { +// Disease currentDisease = record.getDisease(); +// @Override +// public void onChange(ControlPropertyField field) { +// +// } +// }); + } @Override public void onAfterLayoutBinding(final FragmentPersonEditLayoutBinding contentBinding) { if (!ConfigProvider.isConfiguredServer(CountryHelper.COUNTRY_CODE_GERMANY)) { contentBinding.personArmedForcesRelationType.setVisibility(GONE); } + + if (disease != null) { + if (disease == Disease.AHF) { + + List presentConditionList = new ArrayList<>(); + presentConditionList.add(new Item("", null)); + + for (PresentCondition present : PresentCondition.values()) { + if (present == PresentCondition.ALIVE || present == PresentCondition.UNKNOWN) { + Item item = new Item(present.toString(), present); + presentConditionList.add(item); + } + } + contentBinding.personPresentCondition.initializeSpinner(presentConditionList); + } + else if(disease == Disease.CSM){ + contentBinding.personAdditionalDetails.setVisibility(GONE); + contentBinding.headingAdditionalDetails.setVisibility(GONE); + contentBinding.personNickname.setVisibility(GONE); + contentBinding.personMothersMaidenName.setVisibility(GONE); + + + + } + } + } @Override diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/sample/edit/SampleEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/sample/edit/SampleEditFragment.java index 4f1ca83863c..f84e4464a72 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/sample/edit/SampleEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/sample/edit/SampleEditFragment.java @@ -20,10 +20,12 @@ import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.List; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; +import org.bouncycastle.jcajce.provider.asymmetric.util.IESUtil; import com.google.android.gms.common.api.CommonStatusCodes; @@ -34,7 +36,10 @@ import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.feature.FeatureType; +import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.i18n.Strings; import de.symeda.sormas.api.infrastructure.facility.FacilityDto; +import de.symeda.sormas.api.person.Sex; import de.symeda.sormas.api.sample.AdditionalTestType; import de.symeda.sormas.api.sample.PathogenTestResultType; import de.symeda.sormas.api.sample.PathogenTestType; @@ -60,6 +65,7 @@ import de.symeda.sormas.app.databinding.FragmentSampleEditLayoutBinding; import de.symeda.sormas.app.sample.read.SampleReadActivity; import de.symeda.sormas.app.util.DataUtils; +import de.symeda.sormas.app.util.DiseaseConfigurationCache; public class SampleEditFragment extends BaseEditFragment { @@ -78,6 +84,9 @@ public class SampleEditFragment extends BaseEditFragment requestedPathogenTests = new ArrayList<>(); private List requestedAdditionalTests = new ArrayList<>(); private List finalTestResults; + private List diseaseList; + //private List labResultList; + private Disease disease; public static SampleEditFragment newInstance(Sample activityRootData) { return newInstanceWithFieldCheckers( @@ -154,6 +163,13 @@ public Sample getPrimaryData() { @Override protected void prepareFragmentData() { record = getActivityRootData(); + + List diseases = DiseaseConfigurationCache.getInstance().getAllDiseases(true, true, true); + diseaseList = DataUtils.toItems(diseases); + if (record.getDisease() != null && !diseases.contains(record.getDisease())) { + diseaseList.add(DataUtils.toItem(record.getDisease())); + } + if (record.getId() != null) { mostRecentTest = DatabaseHelper.getSampleTestDao().queryMostRecentBySample(record); if (ConfigProvider.hasUserRight(UserRight.ADDITIONAL_TEST_VIEW) @@ -172,6 +188,7 @@ record = getActivityRootData(); labList = DatabaseHelper.getFacilityDao().getActiveLaboratories(true); samplePurposeList = DataUtils.getEnumItems(SamplePurpose.class, true); samplingReasonList = DataUtils.getEnumItems(SamplingReason.class, true, getFieldVisibilityCheckers()); + //labResultList = DataUtils.getEnumItems(PathogenTestResultType.class, true); for (PathogenTestType pathogenTest : record.getRequestedPathogenTests()) { requestedPathogenTests.clear(); @@ -222,6 +239,8 @@ public void onAfterLayoutBinding(final FragmentSampleEditLayoutBinding contentBi setFieldVisibilitiesAndAccesses(SampleDto.class, contentBinding.mainContent); setUpFieldVisibilities(contentBinding); + Disease selectedDisease = getDiseaseOfAssociatedEntity(record); + // Initialize ControlSpinnerFields contentBinding.sampleSampleMaterial.initializeSpinner(sampleMaterialList); contentBinding.sampleSampleSource.initializeSpinner(sampleSourceList); @@ -234,7 +253,6 @@ public void onAfterLayoutBinding(final FragmentSampleEditLayoutBinding contentBi contentBinding.sampleLabDetails.hideField(true); } }); - if (finalTestResults != null) { contentBinding.samplePathogenTestResult.initializeSpinner(finalTestResults); if (contentBinding.samplePathogenTestResult.getValue() == null) { @@ -250,6 +268,28 @@ public void onAfterLayoutBinding(final FragmentSampleEditLayoutBinding contentBi .setVisibility(ConfigProvider.getUser().equals(record.getReportingUser()) ? VISIBLE : GONE); contentBinding.sampleAdditionalTestingRequested .setVisibility(ConfigProvider.getUser().equals(record.getReportingUser()) ? VISIBLE : GONE); + + handleDisease(Disease.YELLOW_FEVER, "National Public Health and Reference Lab"); + handleDisease(Disease.AHF, "Noguchi Memorial Institute for Medical Research"); + handleDisease(Disease.AFP, "Noguchi Memorial Institute for Medical Research"); + + switch (selectedDisease) { + case CSM: + handleCSM(); + break; + case AHF: + handleAHF(); + break; + case AFP: + handleAFP(); + break; + case YELLOW_FEVER: + handleYellowFever(); + + default: + break; + } + } else { contentBinding.sampleShipped.setValue(null); contentBinding.sampleShipmentDate.setValue(null); @@ -328,9 +368,92 @@ public void onAfterLayoutBinding(final FragmentSampleEditLayoutBinding contentBi if (!ConfigProvider.hasUserRight(UserRight.ADDITIONAL_TEST_VIEW) && !DatabaseHelper.getFeatureConfigurationDao().isFeatureDisabled(FeatureType.ADDITIONAL_TESTS)) { contentBinding.additionalTestingLayout.setVisibility(GONE); + } + + } + + private void handleDisease(Disease targetDisease, String labName) { + Disease selectedDisease = getDiseaseOfAssociatedEntity(record); + + if (selectedDisease == targetDisease) { + checkLabName(labName); + } + } + + private void checkLabName(String labName){ + if(labList != null){ + ListallActiveLaboratories = DatabaseHelper.getFacilityDao().getActiveLaboratories(false); + Facility facilitylab = findLabByName(allActiveLaboratories, labName); + + if(facilitylab != null){ + labList.addAll(allActiveLaboratories); + getContentBinding().sampleLab.setValue(facilitylab); + } else { + System.out.println("Please add " + labName + " to Facility Configuration"); + } + } else { + System.out.println("Lab dropdown is null. Please contact the administrator."); + } + } + + private Facility findLabByName(List labs, String labName) { + for (Facility labItem : labs) { + if (labName.equals(labItem.getName())) { + return labItem; + } } + return null; } + private void handleCSM() { + getContentBinding().samplePurpose.setVisibility(GONE); + getContentBinding().samplePurpose.setVisibility(GONE); + } + + private void handleAFP() { + getContentBinding().samplePurpose.setVisibility(GONE); + getContentBinding().samplePurpose.setRequired(false); + } + + private void handleAHF(){ + getContentBinding().sampleSampleSource.setVisibility(GONE); + getContentBinding().sampleSamplingReason.setVisibility(GONE); + getContentBinding().sampleSamplingReason.setVisibility(GONE); + getContentBinding().sampleSamplingReasonDetails.setVisibility(GONE); + getContentBinding().sampleSamplingReasonDetails.setVisibility(GONE); + } + + private void handleYellowFever(){ + getContentBinding().sampleSampleDateTime.setVisibility(GONE); + getContentBinding().sampleSampleMaterial.setVisibility(GONE); + getContentBinding().sampleSamplingReason.setVisibility(GONE); + getContentBinding().samplePathogenTestingRequested.setVisibility(GONE); + + getContentBinding().sampleSampleDateTime.setRequired(false); + getContentBinding().sampleSampleMaterial.setRequired(false); + + //Sample IP Sent + getContentBinding().sampleIpSent.setEnabled(true); + getContentBinding().sampleIpResults.setEnabled(true); + + getContentBinding().sampleMaterialTypeForYellowFever.setEnabled(true); + getContentBinding().sampleYellowFeverSampleTypes.setEnumClass(SampleMaterial.class); + + List labResultList = new ArrayList<>(); + labResultList.add(new Item("", null)); + + for (PathogenTestResultType resultType : PathogenTestResultType.values()) { + if (resultType == PathogenTestResultType.PENDING || resultType == PathogenTestResultType.POSITIVE || resultType == PathogenTestResultType.NEGATIVE) { + Item item = new Item(resultType.toString(), resultType); + labResultList.add(item); + } + } + + getContentBinding().sampleLabResults.initializeSpinner(labResultList); + + } + + @Override public int getEditLayout() { return R.layout.fragment_sample_edit_layout; diff --git a/sormas-app/app/src/main/java/de/symeda/sormas/app/symptoms/SymptomsEditFragment.java b/sormas-app/app/src/main/java/de/symeda/sormas/app/symptoms/SymptomsEditFragment.java index 093b827d26f..1196298de9f 100644 --- a/sormas-app/app/src/main/java/de/symeda/sormas/app/symptoms/SymptomsEditFragment.java +++ b/sormas-app/app/src/main/java/de/symeda/sormas/app/symptoms/SymptomsEditFragment.java @@ -206,6 +206,25 @@ public void onAfterLayoutBinding(FragmentSymptomsEditLayoutBinding contentBindin contentBinding.symptomsCongenitalHeartDiseaseDetails.setVisibility(GONE); } }); + + if(disease == Disease.CSM){ + contentBinding.symptomsMusclePain.setVisibility(GONE); + contentBinding.symptomsAnorexiaAppetiteLoss.setVisibility(GONE); + contentBinding.symptomsDiarrhea.setVisibility(GONE); + contentBinding.symptomsEyePainLightSensitive.setVisibility(GONE); + contentBinding.symptomsJointPain.setVisibility(GONE); + contentBinding.symptomsPurpuricRash.setVisibility(GONE); + contentBinding.symptomsSkinRash.setVisibility(GONE); + contentBinding.symptomsNausea.setVisibility(GONE); + contentBinding.symptomsRefusalFeedorDrink.setVisibility(GONE); + contentBinding.symptomsVomiting.setVisibility(GONE); + contentBinding.symptomsConfusedDisoriented.setVisibility(GONE); + contentBinding.symptomsHyperglycemia.setVisibility(GONE); + contentBinding.symptomsHypoglycemia.setVisibility(GONE); + contentBinding.symptomsMeningealSigns.setVisibility(GONE); + contentBinding.symptomsSepsis.setVisibility(GONE); + contentBinding.symptomsShock.setVisibility(GONE); + } } private void initSymptomFields(FragmentSymptomsEditLayoutBinding contentBinding) { diff --git a/sormas-app/app/src/main/res/layout/dialog_location_layout.xml b/sormas-app/app/src/main/res/layout/dialog_location_layout.xml index 354c665f8b0..ec3f2bb260f 100644 --- a/sormas-app/app/src/main/res/layout/dialog_location_layout.xml +++ b/sormas-app/app/src/main/res/layout/dialog_location_layout.xml @@ -128,6 +128,12 @@ style="@style/ControlSingleColumnStyle" app:value="@={data.houseNumber}" /> + + + + + + @@ -50,6 +51,8 @@ + + @@ -183,7 +186,7 @@ @@ -729,6 +732,7 @@ + + + + + android:text="@string/heading_additional_details" /> + app:value="@={data.disease}" /> + app:value="@={data.caseTransmissionClassification}" /> + + + + + + + + + @@ -43,6 +44,8 @@ + + + + + + + + + + - + + + + + + + @@ -77,6 +78,13 @@ app:imeOptions="actionNext" style="@style/ControlSecondOfTwoColumnsStyle" /> + + + + + + + + + + + + @@ -41,6 +43,8 @@ + + + + + + + + + + + + + + + + + + + + + + Event participant Vaccinations Event Tasks Executed by - Place of stay + Place of detection Fatalities First Name Sex @@ -413,7 +413,7 @@ Read Campaign Data Campaign Data Summary Select Campaign Form - Place of stay + Place of detection Vaccination Edit Vaccination New Vaccination diff --git a/sormas-app/app/src/main/res/values/strings.xml b/sormas-app/app/src/main/res/values/strings.xml index 8848b3c093a..ff51fd60669 100644 --- a/sormas-app/app/src/main/res/values/strings.xml +++ b/sormas-app/app/src/main/res/values/strings.xml @@ -89,6 +89,7 @@ Synchronization conflicts Options Pick current GPS for address + Closest landmark Redownload Redownload later Refer case from Point of Entry @@ -358,6 +359,7 @@ Most Recent Additional Tests Most Recent Hospitalization Most Recent Pathogen Test + Laboratory results New SORMAS version Outbreak Response Person Involved diff --git a/sormas-app/gradle/wrapper/gradle-wrapper.jar b/sormas-app/gradle/wrapper/gradle-wrapper.jar index 13372aef5e24af05341d49695ee84e5f9b594659..7454180f2ae8848c63b8b4dea2cb829da983f2fa 100644 GIT binary patch literal 59536 zcma&NbC71ylI~qywr$(CZQJHswz}-9F59+k+g;UV+cs{`J?GrGXYR~=-ydruB3JCa zB64N^cILAcWk5iofq)<(fq;O7{th4@;QxID0)qN`mJ?GIqLY#rX8-|G{5M0pdVW5^ zzXk$-2kQTAC?_N@B`&6-N-rmVFE=$QD?>*=4<|!MJu@}isLc4AW#{m2if&A5T5g&~ ziuMQeS*U5sL6J698wOd)K@oK@1{peP5&Esut<#VH^u)gp`9H4)`uE!2$>RTctN+^u z=ASkePDZA-X8)rp%D;p*~P?*a_=*Kwc<^>QSH|^<0>o37lt^+Mj1;4YvJ(JR-Y+?%Nu}JAYj5 z_Qc5%Ao#F?q32i?ZaN2OSNhWL;2oDEw_({7ZbgUjna!Fqn3NzLM@-EWFPZVmc>(fZ z0&bF-Ch#p9C{YJT9Rcr3+Y_uR^At1^BxZ#eo>$PLJF3=;t_$2|t+_6gg5(j{TmjYU zK12c&lE?Eh+2u2&6Gf*IdKS&6?rYbSEKBN!rv{YCm|Rt=UlPc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ym z#_#p^T!P~#Dx$%^K>Y_nj_3J*E_LwJ60-5Xu=LkJAwcP@|0;a&+|+ZX`Jbj9P5;T% z|KOc}4*#4o{U?09`9Hz`Xo-I!P=9XfIrr*MQ}y=$!qgv?_J38^bNb4kM&_OVg^_=Eu-qG5U(fw0KMgH){C8pazq~51rN97hf#20-7=aK0)N|UM H-+%o-(+5aQ diff --git a/sormas-app/gradle/wrapper/gradle-wrapper.properties b/sormas-app/gradle/wrapper/gradle-wrapper.properties index 6bfee2b513d..ffed3a254e9 100644 --- a/sormas-app/gradle/wrapper/gradle-wrapper.properties +++ b/sormas-app/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Mon Sep 02 09:14:54 CEST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/sormas-app/gradlew b/sormas-app/gradlew index 0a17c5491b3..1b6c787337f 100755 --- a/sormas-app/gradlew +++ b/sormas-app/gradlew @@ -1,75 +1,129 @@ -#!/usr/bin/env bash +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum -warn ( ) { +warn () { echo "$*" -} +} >&2 -die ( ) { +die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -78,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -86,76 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=$((i+1)) + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/sormas-app/gradlew.bat b/sormas-app/gradlew.bat index 8a0b282aa68..107acd32c4e 100644 --- a/sormas-app/gradlew.bat +++ b/sormas-app/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -8,20 +24,23 @@ @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -35,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -45,34 +64,14 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java index 50785438858..410ecc69cea 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/Case.java @@ -41,9 +41,13 @@ import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.Transient; +import javax.validation.constraints.Size; -import de.symeda.sormas.api.utils.AFPFacilityOptions; -import de.symeda.sormas.api.utils.CardOrHistory; +import de.symeda.sormas.api.i18n.Validations; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; +import de.symeda.sormas.api.sixtyday.SixtyDayDto; +import de.symeda.sormas.api.utils.*; +import de.symeda.sormas.backend.sixtyday.SixtyDay; import org.hibernate.annotations.Type; import de.symeda.auditlog.api.Audited; @@ -77,8 +81,6 @@ import de.symeda.sormas.api.i18n.I18nProperties; import de.symeda.sormas.api.i18n.Strings; import de.symeda.sormas.api.infrastructure.facility.FacilityType; -import de.symeda.sormas.api.utils.PersonalData; -import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.backend.caze.maternalhistory.MaternalHistory; import de.symeda.sormas.backend.caze.porthealthinfo.PortHealthInfo; import de.symeda.sormas.backend.caze.surveillancereport.SurveillanceReport; @@ -143,6 +145,12 @@ public class Case extends CoreAdo implements SormasToSormasShareable, HasExterna public static final String CLINICIAN_NAME = "clinicianName"; public static final String CLINICIAN_PHONE = "clinicianPhone"; public static final String CLINICIAN_EMAIL = "clinicianEmail"; + public static final String REPORTING_OFFICER_NAME = "reportingOfficerName"; + public static final String REPORTING_OFFICER_TITLE = "reportingOfficerTitle"; + public static final String FUNCTION_OF_REPORTING_OFFICER = "functionOfReportingOfficer"; + public static final String REPORTING_OFFICER_CONTACT_PHONE = "reportingOfficerContactPhone"; + public static final String REPORTING_OFFICER_EMAIL = "reportingOfficerEmail"; + public static final String CASE_OFFICER = "caseOfficer"; public static final String SYMPTOMS = "symptoms"; public static final String TASKS = "tasks"; @@ -153,6 +161,7 @@ public class Case extends CoreAdo implements SormasToSormasShareable, HasExterna public static final String DISTRICT = "district"; public static final String COMMUNITY = "community"; public static final String HOSPITALIZATION = "hospitalization"; + public static final String SIXTY_DAY = "sixtyDay"; public static final String EPI_DATA = "epiData"; public static final String CLINICAL_COURSE = "clinicalCourse"; public static final String MATERNAL_HISTORY = "maternalHistory"; @@ -208,6 +217,8 @@ public class Case extends CoreAdo implements SormasToSormasShareable, HasExterna public static final String QUARANTINE_OFFICIAL_ORDER_SENT_DATE = "quarantineOfficialOrderSentDate"; public static final String POSTPARTUM = "postpartum"; public static final String TRIMESTER = "trimester"; + public static final String VACCINE_TYPE = "vaccineType"; + public static final String NUMBER_OF_DOSES = "numberOfDoses"; public static final String SAMPLES = "samples"; public static final String FOLLOW_UP_STATUS = "followUpStatus"; public static final String FOLLOW_UP_COMMENT = "followUpComment"; @@ -216,6 +227,7 @@ public class Case extends CoreAdo implements SormasToSormasShareable, HasExterna public static final String VISITS = "visits"; public static final String SURVEILLANCE_REPORTS = "surveillanceReports"; public static final String FACILITY_TYPE = "facilityType"; + public static final String DHIMS_FACILITY_TYPE = "dhimsFacilityType"; public static final String AFP_FACILITY_OPTIONS = "afpFacilityOptions"; public static final String CONTACTS = "contacts"; public static final String CONVERTED_FROM_CONTACT = "convertedContact"; @@ -278,6 +290,7 @@ public class Case extends CoreAdo implements SormasToSormasShareable, HasExterna private InvestigationStatus investigationStatus; private Hospitalization hospitalization; + private SixtyDay sixtyDay; private EpiData epiData; private Therapy therapy; private ClinicalCourse clinicalCourse; @@ -292,6 +305,7 @@ public class Case extends CoreAdo implements SormasToSormasShareable, HasExterna private District district; private Community community; private FacilityType facilityType; + private DhimsFacility dhimsFacilityType; private AFPFacilityOptions afpFacilityOptions; private Facility healthFacility; private String healthFacilityDetails; @@ -311,8 +325,14 @@ public class Case extends CoreAdo implements SormasToSormasShareable, HasExterna private String clinicianName; private String clinicianPhone; private String clinicianEmail; + private String reportingOfficerName; + private String reportingOfficerTitle; + private String functionOfReportingOfficer; + private String reportingOfficerContactPhone; + private String reportingOfficerEmail; private User caseOfficer; - + private String homeAddressRecreational; + private String hospitalName; private HospitalWardType notifyingClinic; private String notifyingClinicDetails; @@ -320,7 +340,7 @@ public class Case extends CoreAdo implements SormasToSormasShareable, HasExterna private HealthConditions healthConditions; - private YesNoUnknown pregnant; + private YesNo pregnant; private YesNoUnknown ipSampleSent; private Disease ipSampleResults; private VaccinationStatus vaccinationStatus; @@ -377,9 +397,10 @@ public class Case extends CoreAdo implements SormasToSormasShareable, HasExterna private Date followUpUntil; private boolean overwriteFollowUpUntil; - private YesNoUnknown postpartum; + private YesNo postpartum; private Trimester trimester; - + private CSMVaccines vaccineType; + private String numberOfDoses; private List tasks; private Set samples = new HashSet<>(); private Set visits = new HashSet<>(); @@ -721,6 +742,64 @@ public String getClinicianEmail() { public void setClinicianEmail(String clinicianEmail) { this.clinicianEmail = clinicianEmail; } + @Column(length = CHARACTER_LIMIT_DEFAULT) + public String getReportingOfficerName() {return reportingOfficerName;} + + public void setReportingOfficerName(String reportingOfficerName) { + this.reportingOfficerName = reportingOfficerName; + } + + @Column(length = CHARACTER_LIMIT_DEFAULT) + public String getReportingOfficerTitle() { + return reportingOfficerTitle; + } + + public void setReportingOfficerTitle(String reportingOfficerTitle) { + this.reportingOfficerTitle = reportingOfficerTitle; + } + + @Column(length = CHARACTER_LIMIT_DEFAULT) + public String getFunctionOfReportingOfficer() { + return functionOfReportingOfficer; + } + + public void setFunctionOfReportingOfficer(String functionOfReportingOfficer) { + this.functionOfReportingOfficer = functionOfReportingOfficer; + } + @Column(length = CHARACTER_LIMIT_DEFAULT) + public String getReportingOfficerContactPhone() { + return reportingOfficerContactPhone; + } + + public void setReportingOfficerContactPhone(String reportingOfficerContactPhone) { + this.reportingOfficerContactPhone = reportingOfficerContactPhone; + } + + @Column(length = CHARACTER_LIMIT_DEFAULT) + public String getHomeAddressRecreational() { + return homeAddressRecreational; + } + + public void setHomeAddressRecreational(String homeAddressRecreational) { + this.homeAddressRecreational = homeAddressRecreational; + } + @Column(length = CHARACTER_LIMIT_DEFAULT) + public String getHospitalName() { + return hospitalName; + } + + public void setHospitalName(String hospitalName) { + this.hospitalName = hospitalName; + } + + @Column(length = CHARACTER_LIMIT_DEFAULT) + public String getReportingOfficerEmail() { + return reportingOfficerEmail; + } + + public void setReportingOfficerEmail(String reportingOfficerEmail) { + this.reportingOfficerEmail = reportingOfficerEmail; + } @ManyToOne(cascade = {}) public User getCaseOfficer() { @@ -830,6 +909,17 @@ public void setEpiData(EpiData epiData) { this.epiData = epiData; } + @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY) + @AuditedIgnore + public SixtyDay getSixtyDay(){ + if (sixtyDay == null){ + sixtyDay = new SixtyDay(); + } + return sixtyDay; + } + + public void setSixtyDay(SixtyDay sixtyDay) {this.sixtyDay = sixtyDay; } + // It's necessary to do a lazy fetch here because having three eager fetching // one to one relations // produces an error where two non-xa connections are opened @@ -910,11 +1000,11 @@ public void setHealthConditions(HealthConditions healthConditions) { } @Enumerated(EnumType.STRING) - public YesNoUnknown getPregnant() { + public YesNo getPregnant() { return pregnant; } - public void setPregnant(YesNoUnknown pregnant) { + public void setPregnant(YesNo pregnant) { this.pregnant = pregnant; } @@ -1219,6 +1309,7 @@ public void setAdditionalDetails(String additionalDetails) { this.additionalDetails = additionalDetails; } + @Column(length = CHARACTER_LIMIT_DEFAULT) public String getExternalID() { return externalID; @@ -1429,11 +1520,11 @@ public void setQuarantineOfficialOrderSentDate(Date quarantineOfficialOrderSentD } @Enumerated(EnumType.STRING) - public YesNoUnknown getPostpartum() { + public YesNo getPostpartum() { return postpartum; } - public void setPostpartum(YesNoUnknown postpartum) { + public void setPostpartum(YesNo postpartum) { this.postpartum = postpartum; } @@ -1445,6 +1536,22 @@ public Trimester getTrimester() { public void setTrimester(Trimester trimester) { this.trimester = trimester; } + @Enumerated(EnumType.STRING) + public CSMVaccines getVaccineType() { + return vaccineType; + } + + public void setVaccineType(CSMVaccines vaccineType) { + this.vaccineType = vaccineType; + } + @Column(length = CHARACTER_LIMIT_DEFAULT) + public String getNumberOfDoses() { + return numberOfDoses; + } + + public void setNumberOfDoses(String numberOfDoses) { + this.numberOfDoses = numberOfDoses; + } @Enumerated(EnumType.STRING) public FollowUpStatus getFollowUpStatus() { @@ -1491,6 +1598,13 @@ public void setFacilityType(FacilityType facilityType) { this.facilityType = facilityType; } @Enumerated(EnumType.STRING) + public DhimsFacility getDhimsFacilityType() { + return dhimsFacilityType; + } + public void setDhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + } + @Enumerated(EnumType.STRING) public AFPFacilityOptions getAfpFacilityOptions() { return afpFacilityOptions; } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java index cf1ed6e383f..cb690e8d5ce 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseFacadeEjb.java @@ -71,6 +71,10 @@ import javax.validation.Valid; import javax.validation.constraints.NotNull; +import de.symeda.sormas.api.sixtyday.SixtyDayDto; +import de.symeda.sormas.api.utils.*; +import de.symeda.sormas.backend.sixtyday.SixtyDay; +import de.symeda.sormas.backend.sixtyday.SixtyDayFacadeEjb; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.joda.time.DateTime; @@ -194,14 +198,7 @@ import de.symeda.sormas.api.user.NotificationType; import de.symeda.sormas.api.user.UserReferenceDto; import de.symeda.sormas.api.user.UserRight; -import de.symeda.sormas.api.utils.AccessDeniedException; -import de.symeda.sormas.api.utils.DataHelper; import de.symeda.sormas.api.utils.DataHelper.Pair; -import de.symeda.sormas.api.utils.DateHelper; -import de.symeda.sormas.api.utils.InfoProvider; -import de.symeda.sormas.api.utils.SortProperty; -import de.symeda.sormas.api.utils.ValidationRuntimeException; -import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.api.utils.fieldaccess.checkers.UserRightFieldAccessChecker; import de.symeda.sormas.api.utils.fieldvisibility.FieldVisibilityCheckers; import de.symeda.sormas.api.visit.VisitDto; @@ -258,6 +255,7 @@ import de.symeda.sormas.backend.hospitalization.Hospitalization; import de.symeda.sormas.backend.hospitalization.HospitalizationFacadeEjb; import de.symeda.sormas.backend.hospitalization.HospitalizationFacadeEjb.HospitalizationFacadeEjbLocal; +import de.symeda.sormas.backend.sixtyday.SixtyDayFacadeEjb.SixtyDayFacadeEjbLocal; import de.symeda.sormas.backend.hospitalization.PreviousHospitalization; import de.symeda.sormas.backend.immunization.ImmunizationEntityHelper; import de.symeda.sormas.backend.immunization.entity.Immunization; @@ -397,6 +395,8 @@ public class CaseFacadeEjb extends AbstractCoreFacadeEjb getExportList( joins.getEpiData().get(EpiData.ID), joins.getRoot().get(Case.SYMPTOMS).get(Symptoms.ID), joins.getHospitalization().get(Hospitalization.ID), + joins.getSixtyDay().get(SixtyDay.ID), joins.getRoot().get(Case.HEALTH_CONDITIONS).get(HealthConditions.ID), caseRoot.get(Case.UUID), caseRoot.get(Case.EPID_NUMBER), caseRoot.get(Case.DISEASE), caseRoot.get(Case.DISEASE_VARIANT), caseRoot.get(Case.DISEASE_DETAILS), @@ -831,6 +832,7 @@ public List getExportList( joins.getPerson().get(Person.EDUCATION_TYPE), joins.getPerson().get(Person.EDUCATION_DETAILS), joins.getPerson().get(Person.OCCUPATION_TYPE), joins.getPerson().get(Person.OCCUPATION_DETAILS), joins.getPerson().get(Person.ARMED_FORCES_RELATION_TYPE), joins.getEpiData().get(EpiData.CONTACT_WITH_SOURCE_CASE_KNOWN), + joins.getSixtyDay().get(SixtyDay.PARALYSIS_WEAKNESS_PRESENT), caseRoot.get(Case.VACCINATION_STATUS), caseRoot.get(Case.POSTPARTUM), caseRoot.get(Case.TRIMESTER), caseRoot.get(Case.VACCINATION_TYPE), caseRoot.get(Case.VACCINATION_DATE), eventCountSq, @@ -1520,6 +1522,7 @@ public void saveBulkEditWithFacilities( caze.setDistrict(newDistrict); caze.setCommunity(newCommunity); caze.setFacilityType(updatedCaseBulkEditData.getFacilityType()); + caze.setDhimsFacilityType(updatedCaseBulkEditData.getDhimsFacilityType()); caze.setHealthFacility(facilityService.getByUuid(updatedCaseBulkEditData.getHealthFacility().getUuid())); caze.setHealthFacilityDetails(updatedCaseBulkEditData.getHealthFacilityDetails()); CaseLogic.handleHospitalization(toDto(caze), existingCaseDto, doTransfer); @@ -1754,7 +1757,7 @@ public void validate(CaseDataDto caze) throws ValidationRuntimeException { && !communityFacade.getByUuid(caze.getResponsibleCommunity().getUuid()).getDistrict().equals(caze.getResponsibleDistrict())) { throw new ValidationRuntimeException(I18nProperties.getValidationError(Validations.noResponsibleCommunityInResponsibleDistrict)); } - if ((caze.getCaseOrigin() == null || caze.getCaseOrigin() == CaseOrigin.IN_COUNTRY) && caze.getHealthFacility() == null && caze.getAfpFacilityOptions() == null) { + if ((caze.getCaseOrigin() == null || caze.getCaseOrigin() == CaseOrigin.IN_COUNTRY) && (caze.getHealthFacility() == null && caze.getDhimsFacilityType() == null && caze.getAfpFacilityOptions() == null && caze.getHospitalName() == null)) { throw new ValidationRuntimeException(I18nProperties.getValidationError(Validations.validFacility)); } if (CaseOrigin.POINT_OF_ENTRY.equals(caze.getCaseOrigin()) && caze.getPointOfEntry() == null) { @@ -2116,11 +2119,11 @@ public void onCaseChanged(CaseDataDto existingCase, Case newCase, boolean syncSh // Set Yes/No/Unknown fields associated with embedded lists to Yes if the lists // are not empty if (!newCase.getHospitalization().getPreviousHospitalizations().isEmpty() - && YesNoUnknown.YES != newCase.getHospitalization().getHospitalizedPreviously()) { - newCase.getHospitalization().setHospitalizedPreviously(YesNoUnknown.YES); + && YesNo.YES != newCase.getHospitalization().getHospitalizedPreviously()) { + newCase.getHospitalization().setHospitalizedPreviously(YesNo.YES); } - if (!newCase.getEpiData().getExposures().isEmpty() && !YesNoUnknown.YES.equals(newCase.getEpiData().getExposureDetailsKnown())) { - newCase.getEpiData().setExposureDetailsKnown(YesNoUnknown.YES); + if (!newCase.getEpiData().getExposures().isEmpty() && !YesNo.YES.equals(newCase.getEpiData().getExposureDetailsKnown())) { + newCase.getEpiData().setExposureDetailsKnown(YesNo.YES); } // Update completeness value @@ -2660,6 +2663,7 @@ public void pseudonymizeDto(Case source, CaseDataDto dto, Pseudonymizer pseudony pseudonymizer.pseudonymizeDto(SymptomsDto.class, dto.getSymptoms(), inJurisdiction, null); pseudonymizer.pseudonymizeDto(MaternalHistoryDto.class, dto.getMaternalHistory(), inJurisdiction, null); + pseudonymizer.pseudonymizeDto(SixtyDayDto.class, dto.getSixtyDay(), inJurisdiction, null); }); } } @@ -2719,6 +2723,7 @@ public void restorePseudonymizedDto(CaseDataDto dto, CaseDataDto existingCaseDto pseudonymizer.restorePseudonymizedValues(SymptomsDto.class, dto.getSymptoms(), existingCaseDto.getSymptoms(), inJurisdiction); pseudonymizer .restorePseudonymizedValues(MaternalHistoryDto.class, dto.getMaternalHistory(), existingCaseDto.getMaternalHistory(), inJurisdiction); + pseudonymizer.restorePseudonymizedValues(SixtyDayDto.class, dto.getSixtyDay(), existingCaseDto.getSixtyDay(), inJurisdiction); } } @@ -2758,7 +2763,7 @@ public static CaseDataDto toCaseDto(Case source) { target.setPlagueType(source.getPlagueType()); target.setDengueFeverType(source.getDengueFeverType()); target.setRabiesType(source.getRabiesType()); - target.setCaseClassification(source.getCaseClassification()); + target.setCaseClassification(source.getCaseClassification() == CaseClassification.NOT_CLASSIFIED ? CaseClassification.SUSPECT : source.getCaseClassification()); target.setCaseIdentificationSource(source.getCaseIdentificationSource()); target.setScreeningType(source.getScreeningType()); target.setClassificationUser(UserFacadeEjb.toReferenceDto(source.getClassificationUser())); @@ -2770,6 +2775,7 @@ public static CaseDataDto toCaseDto(Case source) { target.setInvestigationStatus(source.getInvestigationStatus()); target.setPerson(PersonFacadeEjb.toReferenceDto(source.getPerson())); target.setHospitalization(HospitalizationFacadeEjb.toDto(source.getHospitalization())); + target.setSixtyDay(SixtyDayFacadeEjb.toDto(source.getSixtyDay())); target.setEpiData(EpiDataFacadeEjb.toDto(source.getEpiData())); if (source.getTherapy() != null) { target.setTherapy(TherapyFacadeEjb.toDto(source.getTherapy())); @@ -2806,8 +2812,15 @@ public static CaseDataDto toCaseDto(Case source) { target.setClinicianName(source.getClinicianName()); target.setClinicianPhone(source.getClinicianPhone()); target.setClinicianEmail(source.getClinicianEmail()); + target.setReportingOfficerTitle(source.getReportingOfficerTitle()); + target.setReportingOfficerName(source.getReportingOfficerName()); + target.setFunctionOfReportingOfficer(source.getFunctionOfReportingOfficer()); + target.setReportingOfficerContactPhone(source.getReportingOfficerContactPhone()); + target.setReportingOfficerEmail(source.getReportingOfficerEmail()); target.setCaseOfficer(UserFacadeEjb.toReferenceDto(source.getCaseOfficer())); target.setSymptoms(SymptomsFacadeEjb.toDto(source.getSymptoms())); + target.setHomeAddressRecreational(source.getHomeAddressRecreational()); + target.setHospitalName(source.getHospitalName()); target.setPregnant(source.getPregnant()); target.setIpSampleSent(source.getIpSampleSent()); @@ -2860,11 +2873,14 @@ public static CaseDataDto toCaseDto(Case source) { target.setQuarantineOfficialOrderSentDate(source.getQuarantineOfficialOrderSentDate()); target.setPostpartum(source.getPostpartum()); target.setTrimester(source.getTrimester()); + target.setVaccineType(source.getVaccineType()); + target.setNumberOfDoses(source.getNumberOfDoses()); target.setFollowUpComment(source.getFollowUpComment()); target.setFollowUpStatus(source.getFollowUpStatus()); target.setFollowUpUntil(source.getFollowUpUntil()); target.setOverwriteFollowUpUntil(source.isOverwriteFollowUpUntil()); target.setFacilityType(source.getFacilityType()); + target.setDhimsFacilityType(source.getDhimsFacilityType()); target.setAfpFacilityOptions(source.getAfpFacilityOptions()); target.setCaseIdIsm(source.getCaseIdIsm()); @@ -2930,7 +2946,6 @@ public Case fillOrBuildEntity(@NotNull CaseDataDto source, Case target, boolean target = DtoHelper.fillOrBuildEntity(source, target, () -> { Case newCase = new Case(); - newCase.setSystemCaseClassification(CaseClassification.NOT_CLASSIFIED); return newCase; }, checkChangeDate); @@ -2948,13 +2963,15 @@ public Case fillOrBuildEntity(@NotNull CaseDataDto source, Case target, boolean // make sure we do have a report date target.setReportDate(new Date()); } + target.setReportingUser(userService.getByReferenceDto(source.getReportingUser())); target.setInvestigatedDate(source.getInvestigatedDate()); target.setRegionLevelDate(source.getRegionLevelDate()); target.setNationalLevelDate(source.getNationalLevelDate()); target.setDistrictLevelDate(source.getDistrictLevelDate()); target.setPerson(personService.getByReferenceDto(source.getPerson())); - target.setCaseClassification(source.getCaseClassification()); + + target.setCaseClassification(source.getCaseClassification() == CaseClassification.NOT_CLASSIFIED ? CaseClassification.SUSPECT : source.getCaseClassification()); target.setCaseIdentificationSource(source.getCaseIdentificationSource()); target.setScreeningType(source.getScreeningType()); target.setClassificationUser(userService.getByReferenceDto(source.getClassificationUser())); @@ -2965,6 +2982,7 @@ public Case fillOrBuildEntity(@NotNull CaseDataDto source, Case target, boolean target.setLaboratoryDiagnosticConfirmation(source.getLaboratoryDiagnosticConfirmation()); target.setInvestigationStatus(source.getInvestigationStatus()); target.setHospitalization(hospitalizationFacade.fromDto(source.getHospitalization(), checkChangeDate)); + target.setSixtyDay(sixtyDayFacade.fromDto(source.getSixtyDay(), checkChangeDate)); target.setEpiData(epiDataFacade.fromDto(source.getEpiData(), checkChangeDate)); if (source.getTherapy() == null) { source.setTherapy(TherapyDto.build()); @@ -2999,10 +3017,17 @@ public Case fillOrBuildEntity(@NotNull CaseDataDto source, Case target, boolean target.setSurveillanceOfficer(userService.getByReferenceDto(source.getSurveillanceOfficer())); target.setClinicianName(source.getClinicianName()); + target.setReportingOfficerName(source.getReportingOfficerName()); + target.setReportingOfficerTitle(source.getReportingOfficerTitle()); + target.setFunctionOfReportingOfficer(source.getFunctionOfReportingOfficer()); + target.setReportingOfficerContactPhone(source.getReportingOfficerContactPhone()); + target.setReportingOfficerEmail(source.getReportingOfficerEmail()); target.setClinicianPhone(source.getClinicianPhone()); target.setClinicianEmail(source.getClinicianEmail()); target.setCaseOfficer(userService.getByReferenceDto(source.getCaseOfficer())); target.setSymptoms(symptomsFacade.fromDto(source.getSymptoms(), checkChangeDate)); + target.setHomeAddressRecreational(source.getHomeAddressRecreational()); + target.setHospitalName(source.getHospitalName()); target.setPregnant(source.getPregnant()); target.setIpSampleSent(source.getIpSampleSent()); @@ -3055,7 +3080,10 @@ public Case fillOrBuildEntity(@NotNull CaseDataDto source, Case target, boolean target.setQuarantineOfficialOrderSentDate(source.getQuarantineOfficialOrderSentDate()); target.setPostpartum(source.getPostpartum()); target.setTrimester(source.getTrimester()); + target.setVaccineType(source.getVaccineType()); + target.setNumberOfDoses(source.getNumberOfDoses()); target.setFacilityType(source.getFacilityType()); + target.setDhimsFacilityType(source.getDhimsFacilityType()); target.setAfpFacilityOptions(source.getAfpFacilityOptions()); if (source.getSormasToSormasOriginInfo() != null) { target.setSormasToSormasOriginInfo(originInfoFacade.fromDto(source.getSormasToSormasOriginInfo(), checkChangeDate)); @@ -3688,11 +3716,11 @@ private void mergeCase(CaseDataDto leadCaseData, CaseDataDto otherCaseData, bool // 10 Activity as case final EpiData otherEpiData = otherCase.getEpiData(); if (otherEpiData != null - && YesNoUnknown.YES == otherEpiData.getActivityAsCaseDetailsKnown() + && YesNo.YES == otherEpiData.getActivityAsCaseDetailsKnown() && CollectionUtils.isNotEmpty(otherEpiData.getActivitiesAsCase())) { final EpiData leadEpiData = leadCase.getEpiData(); - leadEpiData.setActivityAsCaseDetailsKnown(YesNoUnknown.YES); + leadEpiData.setActivityAsCaseDetailsKnown(YesNo.YES); epiDataService.ensurePersisted(leadEpiData); } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseJoins.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseJoins.java index 3f3da4aa042..72f806cb741 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseJoins.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseJoins.java @@ -41,6 +41,7 @@ import de.symeda.sormas.backend.sample.Sample; import de.symeda.sormas.backend.sample.SampleJoins; import de.symeda.sormas.backend.share.ExternalShareInfo; +import de.symeda.sormas.backend.sixtyday.SixtyDay; import de.symeda.sormas.backend.sormastosormas.share.shareinfo.SormasToSormasShareInfo; import de.symeda.sormas.backend.symptoms.Symptoms; import de.symeda.sormas.backend.user.User; @@ -60,6 +61,7 @@ public class CaseJoins extends QueryJoins { private Join surveillanceOfficer; private Join reportingUser; private Join hospitalization; + private Join sixtyDay; private Join epiData; private Join symptoms; private Join clinicalCourse; @@ -202,6 +204,14 @@ private void setHospitalization(Join hospitalization) { this.hospitalization = hospitalization; } + public Join getSixtyDay() { + return getOrCreate(sixtyDay, Case.SIXTY_DAY, JoinType.LEFT, this::setSixtyDay); + } + + private void setSixtyDay(Join sixtyDay) { + this.sixtyDay = sixtyDay; + } + public Join getEpiData() { return getOrCreate(epiData, Case.EPI_DATA, JoinType.LEFT, this::setEpiData); } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseService.java index aa0fc6a4b0f..778f307e747 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/CaseService.java @@ -48,6 +48,7 @@ import javax.transaction.Transactional; import javax.validation.constraints.NotNull; +import de.symeda.sormas.backend.sixtyday.SixtyDay; import org.apache.commons.lang3.StringUtils; import de.symeda.sormas.api.Disease; @@ -252,6 +253,7 @@ public List getAllActiveCasesAfter(Date date, boolean includeExtendedChang from.fetch(Case.THERAPY); from.fetch(Case.HEALTH_CONDITIONS); from.fetch(Case.HOSPITALIZATION); + from.fetch(Case.SIXTY_DAY); from.fetch(Case.EPI_DATA); from.fetch(Case.PORT_HEALTH_INFO); from.fetch(Case.MATERNAL_HISTORY); @@ -706,6 +708,9 @@ public Predicate createCriteriaFilter(CaseCrite if (caseCriteria.getFacilityType() != null) { filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(Case.FACILITY_TYPE), caseCriteria.getFacilityType())); } + if (caseCriteria.getDhimsFacilityType() != null) { + filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(Case.DHIMS_FACILITY_TYPE), caseCriteria.getDhimsFacilityType())); + } if (caseCriteria.getAfpFacilityOptions() != null) { filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(Case.AFP_FACILITY_OPTIONS), caseCriteria.getAfpFacilityOptions())); } @@ -1182,11 +1187,13 @@ private Predicate createChangeDateFilter( @Override protected > T addChangeDates(T builder, From caseFrom, boolean includeExtendedChangeDateFilters) { Join hospitalization = caseFrom.join(Case.HOSPITALIZATION, JoinType.LEFT); + Join sixtyDay = caseFrom.join(Case.SIXTY_DAY, JoinType.LEFT); Join clinicalCourse = caseFrom.join(Case.CLINICAL_COURSE, JoinType.LEFT); builder = super.addChangeDates(builder, caseFrom, includeExtendedChangeDateFilters).add(caseFrom, Case.SYMPTOMS) .add(hospitalization) .add(hospitalization, Hospitalization.PREVIOUS_HOSPITALIZATIONS) + .add(sixtyDay) .add(caseFrom, Case.THERAPY) .add(clinicalCourse) .add(caseFrom, Case.HEALTH_CONDITIONS) diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/caseimport/CaseImportFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/caseimport/CaseImportFacadeEjb.java index 9a0bafdff2b..5b16527148d 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/caseimport/CaseImportFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/caseimport/CaseImportFacadeEjb.java @@ -31,6 +31,7 @@ import javax.transaction.Transactional; import javax.validation.Valid; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import de.symeda.sormas.api.utils.AFPFacilityOptions; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -456,8 +457,10 @@ private void insertColumnEntryIntoData(CaseDataDto caze, PersonDto person, Strin infrastructureData.getElement0(), infrastructureData.getElement1(), getTypeOfFacility(pd.getName(), currentElement), + getTypeOfDhimsFacility(pd.getName(), currentElement), false); + if (facilities.isEmpty()) { if (infrastructureData.getElement1() != null) { throw new ImportErrorException( @@ -611,6 +614,18 @@ protected FacilityType getTypeOfFacility(String propertyName, Object currentElem return (FacilityType) pd.getReadMethod().invoke(currentElement); } + protected DhimsFacility getTypeOfDhimsFacility(String propertyName, Object currentElement) + throws IntrospectionException, InvocationTargetException, IllegalAccessException { + String typeProperty; + if (CaseDataDto.class.equals(currentElement.getClass()) && CaseDataDto.DHIMS_FACILITY_TYPE.equals(propertyName)) { + typeProperty = CaseDataDto.DHIMS_FACILITY_TYPE; + } else { + typeProperty = propertyName + "DhimsType"; + } + PropertyDescriptor pd = new PropertyDescriptor(typeProperty, currentElement.getClass()); + return (DhimsFacility) pd.getReadMethod().invoke(currentElement); + } + protected AFPFacilityOptions getTypeOfFacilityForAFP(String propertyName, Object currentElement) throws IntrospectionException, InvocationTargetException, IllegalAccessException { String typeProperty; diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/classification/CaseClassificationFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/classification/CaseClassificationFacadeEjb.java index 32a1952f8a1..f642c510b1a 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/classification/CaseClassificationFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/classification/CaseClassificationFacadeEjb.java @@ -501,7 +501,7 @@ private void buildCriteria() { PathogenTestType.ISOLATION, PathogenTestType.SEQUENCING, PathogenTestType.RAPID_TEST), - xOf(1, anyOfSymptoms(SymptomState.UNKNOWN, Disease.CORONAVIRUS), anyOfSymptoms(null, Disease.CORONAVIRUS)), + xOf(1, anyOfSymptoms(SymptomState.NO, Disease.CORONAVIRUS), anyOfSymptoms(null, Disease.CORONAVIRUS)), noneOf(anyOfSymptoms(SymptomState.NO, Disease.CORONAVIRUS)), noneOf(suspect)); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/surveillancereport/SurveillanceReport.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/surveillancereport/SurveillanceReport.java index 0899b91b1aa..207254d6d40 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/surveillancereport/SurveillanceReport.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/surveillancereport/SurveillanceReport.java @@ -27,6 +27,7 @@ import de.symeda.auditlog.api.Audited; import de.symeda.sormas.api.caze.surveillancereport.ReportingType; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import de.symeda.sormas.api.infrastructure.facility.FacilityType; import de.symeda.sormas.backend.caze.Case; import de.symeda.sormas.backend.common.AbstractDomainObject; @@ -50,6 +51,7 @@ public class SurveillanceReport extends AbstractDomainObject { public static final String FACILITY_REGION = "facilityRegion"; public static final String FACILITY_DISTRICT = "facilityDistrict"; public static final String FACILITY_TYPE = "facilityType"; + public static final String DHIMS_FACILITY_TYPE = "dhimsFacilityType"; public static final String FACILITY = "facility"; public static final String FACILITY_DETAILS = "facilityDetails"; public static final String NOTIFICATION_DETAILS = "notificationDetails"; @@ -68,6 +70,7 @@ public class SurveillanceReport extends AbstractDomainObject { private District facilityDistrict; private FacilityType facilityType; + private DhimsFacility dhimsFacilityType; private Facility facility; @@ -142,6 +145,14 @@ public void setFacilityType(FacilityType facilityType) { this.facilityType = facilityType; } + @Enumerated(EnumType.STRING) + public DhimsFacility getDhimsFacilityType() { + return dhimsFacilityType; + } + public void setDhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + } + @ManyToOne public Facility getFacility() { return facility; diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/surveillancereport/SurveillanceReportFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/surveillancereport/SurveillanceReportFacadeEjb.java index 686df299ee7..ad191471c37 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/surveillancereport/SurveillanceReportFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/caze/surveillancereport/SurveillanceReportFacadeEjb.java @@ -87,6 +87,7 @@ public static SurveillanceReportDto toDto(SurveillanceReport source) { target.setFacilityRegion(RegionFacadeEjb.toReferenceDto(source.getFacilityRegion())); target.setFacilityDistrict(DistrictFacadeEjb.toReferenceDto(source.getFacilityDistrict())); target.setFacilityType(source.getFacilityType()); + target.setDhimsFacilityType(source.getDhimsFacilityType()); target.setFacility(FacilityFacadeEjb.toReferenceDto(source.getFacility())); target.setFacilityDetails(source.getFacilityDetails()); target.setNotificationDetails(source.getNotificationDetails()); @@ -179,6 +180,7 @@ public SurveillanceReport fromDto(@NotNull SurveillanceReportDto source, boolean target.setFacilityRegion(regionService.getByReferenceDto(source.getFacilityRegion())); target.setFacilityDistrict(districtService.getByReferenceDto(source.getFacilityDistrict())); target.setFacilityType(source.getFacilityType()); + target.setDhimsFacilityType(source.getDhimsFacilityType()); target.setFacility(facilityService.getByReferenceDto(source.getFacility())); target.setFacilityDetails(source.getFacilityDetails()); target.setNotificationDetails(source.getNotificationDetails()); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/common/StartupShutdownService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/common/StartupShutdownService.java index 54d6be4545d..3c58f8c9e3e 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/common/StartupShutdownService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/common/StartupShutdownService.java @@ -55,6 +55,7 @@ import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -351,7 +352,7 @@ private void createDefaultUsers() { Region region = regionService.getByUuid(DefaultEntityHelper.getConstantUuidFor(DefaultEntityHelper.DefaultInfrastructureUuidSeed.REGION)); District district = region.getDistricts().get(0); Community community = district.getCommunities().get(0); - List healthFacilities = facilityService.getActiveFacilitiesByCommunityAndType(community, FacilityType.HOSPITAL, false, false); + List healthFacilities = facilityService.getActiveFacilitiesByCommunityAndType(community, FacilityType.HOSPITAL,false, false); Facility facility = !healthFacilities.isEmpty() ? healthFacilities.get(0) : null; List laboratories = facilityService.getAllActiveLaboratories(false); Facility laboratory = !laboratories.isEmpty() ? laboratories.get(0) : null; diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiData.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiData.java index 096b0576848..989269f2ad5 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiData.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiData.java @@ -28,6 +28,8 @@ import javax.persistence.OneToMany; import de.symeda.auditlog.api.Audited; +import de.symeda.sormas.api.Disease; +import de.symeda.sormas.api.utils.YesNo; import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.backend.activityascase.ActivityAsCase; import de.symeda.sormas.backend.common.AbstractDomainObject; @@ -45,35 +47,62 @@ public class EpiData extends AbstractDomainObject { public static final String EXPOSURES = "exposures"; public static final String ACTIVITIES_AS_CASE = "activitiesAsCase"; - private YesNoUnknown exposureDetailsKnown; - private YesNoUnknown activityAsCaseDetailsKnown; - private YesNoUnknown contactWithSourceCaseKnown; - private YesNoUnknown highTransmissionRiskArea; - private YesNoUnknown largeOutbreaksArea; - private YesNoUnknown areaInfectedAnimals; + private YesNo exposureDetailsKnown; + private YesNo activityAsCaseDetailsKnown; + private YesNo recentTravelOutbreak; + private YesNo contactSimilarOutbreak; + private YesNo contactSickAnimals; + private YesNo contactWithSourceCaseKnown; + private YesNo highTransmissionRiskArea; + private YesNo largeOutbreaksArea; + private YesNo areaInfectedAnimals; + private Disease disease; private List exposures = new ArrayList<>(); private List activitiesAsCase = new ArrayList<>(); private Date changeDateOfEmbeddedLists; @Enumerated(EnumType.STRING) - public YesNoUnknown getExposureDetailsKnown() { + public YesNo getExposureDetailsKnown() { return exposureDetailsKnown; } - public void setExposureDetailsKnown(YesNoUnknown exposureDetailsKnown) { + public void setExposureDetailsKnown(YesNo exposureDetailsKnown) { this.exposureDetailsKnown = exposureDetailsKnown; } @Enumerated(EnumType.STRING) - public YesNoUnknown getActivityAsCaseDetailsKnown() { + public YesNo getActivityAsCaseDetailsKnown() { return activityAsCaseDetailsKnown; } - public void setActivityAsCaseDetailsKnown(YesNoUnknown activityAsCaseDetailsKnown) { + public void setActivityAsCaseDetailsKnown(YesNo activityAsCaseDetailsKnown) { this.activityAsCaseDetailsKnown = activityAsCaseDetailsKnown; } + @Enumerated(EnumType.STRING) + public YesNo getRecentTravelOutbreak() { + return recentTravelOutbreak; + } + public void setRecentTravelOutbreak(YesNo recentTravelOutbreak) { + this.recentTravelOutbreak = recentTravelOutbreak; + } + @Enumerated(EnumType.STRING) + public YesNo getContactSimilarOutbreak() { + return contactSimilarOutbreak; + } + + public void setContactSimilarOutbreak(YesNo contactSimilarOutbreak) { + this.contactSimilarOutbreak = contactSimilarOutbreak; + } + @Enumerated(EnumType.STRING) + public YesNo getContactSickAnimals() { + return contactSickAnimals; + } + + public void setContactSickAnimals(YesNo contactSickAnimals) { + this.contactSickAnimals = contactSickAnimals; + } @OneToMany(cascade = CascadeType.ALL, orphanRemoval = true, mappedBy = Exposure.EPI_DATA) public List getExposures() { return exposures; @@ -104,38 +133,44 @@ public void setChangeDateOfEmbeddedLists(Date changeDateOfEmbeddedLists) { } @Enumerated(EnumType.STRING) - public YesNoUnknown getAreaInfectedAnimals() { + public YesNo getAreaInfectedAnimals() { return areaInfectedAnimals; } - public void setAreaInfectedAnimals(YesNoUnknown areaInfectedAnimals) { + public void setAreaInfectedAnimals(YesNo areaInfectedAnimals) { this.areaInfectedAnimals = areaInfectedAnimals; } + public Disease getDisease() { + return disease; + } + public void setDisease(Disease disease) { + this.disease = disease; + } @Enumerated(EnumType.STRING) - public YesNoUnknown getHighTransmissionRiskArea() { + public YesNo getHighTransmissionRiskArea() { return highTransmissionRiskArea; } - public void setHighTransmissionRiskArea(YesNoUnknown highTransmissionRiskArea) { + public void setHighTransmissionRiskArea(YesNo highTransmissionRiskArea) { this.highTransmissionRiskArea = highTransmissionRiskArea; } @Enumerated(EnumType.STRING) - public YesNoUnknown getLargeOutbreaksArea() { + public YesNo getLargeOutbreaksArea() { return largeOutbreaksArea; } - public void setLargeOutbreaksArea(YesNoUnknown largeOutbreaksArea) { + public void setLargeOutbreaksArea(YesNo largeOutbreaksArea) { this.largeOutbreaksArea = largeOutbreaksArea; } @Enumerated(EnumType.STRING) - public YesNoUnknown getContactWithSourceCaseKnown() { + public YesNo getContactWithSourceCaseKnown() { return contactWithSourceCaseKnown; } - public void setContactWithSourceCaseKnown(YesNoUnknown contactWithSourceCaseKnown) { + public void setContactWithSourceCaseKnown(YesNo contactWithSourceCaseKnown) { this.contactWithSourceCaseKnown = contactWithSourceCaseKnown; } } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiDataFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiDataFacadeEjb.java index 85df4b31c34..ea58f139a87 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiDataFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/epidata/EpiDataFacadeEjb.java @@ -68,10 +68,14 @@ public EpiData fromDto(EpiDataDto source, boolean checkChangeDate) { target.setExposureDetailsKnown(source.getExposureDetailsKnown()); target.setActivityAsCaseDetailsKnown(source.getActivityAsCaseDetailsKnown()); + target.setRecentTravelOutbreak(source.getRecentTravelOutbreak()); + target.setContactSimilarOutbreak(source.getContactSimilarOutbreak()); + target.setContactSickAnimals(source.getContactSickAnimals()); target.setContactWithSourceCaseKnown(source.getContactWithSourceCaseKnown()); target.setHighTransmissionRiskArea(source.getHighTransmissionRiskArea()); target.setLargeOutbreaksArea(source.getLargeOutbreaksArea()); target.setAreaInfectedAnimals(source.getAreaInfectedAnimals()); + target.setDisease(source.getDisease()); List exposures = new ArrayList<>(); for (ExposureDto exposureDto : source.getExposures()) { @@ -212,10 +216,14 @@ public static EpiDataDto toDto(EpiData epiData) { target.setExposureDetailsKnown(source.getExposureDetailsKnown()); target.setActivityAsCaseDetailsKnown(source.getActivityAsCaseDetailsKnown()); + target.setRecentTravelOutbreak(source.getRecentTravelOutbreak()); + target.setContactSimilarOutbreak(source.getContactSimilarOutbreak()); + target.setContactSickAnimals(source.getContactSickAnimals()); target.setContactWithSourceCaseKnown(source.getContactWithSourceCaseKnown()); target.setHighTransmissionRiskArea(source.getHighTransmissionRiskArea()); target.setLargeOutbreaksArea(source.getLargeOutbreaksArea()); target.setAreaInfectedAnimals(source.getAreaInfectedAnimals()); + target.setDisease(source.getDisease()); List exposureDtos = new ArrayList<>(); for (Exposure exposure : source.getExposures()) { diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/event/EventService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/event/EventService.java index 801bbd6cb0a..0f9d4fd9853 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/event/EventService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/event/EventService.java @@ -742,6 +742,10 @@ public Predicate buildCriteriaFilter(EventCriteria eventCriteria, EventQueryCont filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(joins.getLocation().get(Location.FACILITY_TYPE), eventCriteria.getFacilityType())); } + if (eventCriteria.getDhimsFacilityType() != null) { + filter = + CriteriaBuilderHelper.and(cb, filter, cb.equal(joins.getLocation().get(Location.DHIMS_FACILITY_TYPE), eventCriteria.getDhimsFacilityType())); + } if (eventCriteria.getFacility() != null) { filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(joins.getFacility().get(Facility.UUID), eventCriteria.getFacility().getUuid())); } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/exposure/Exposure.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/exposure/Exposure.java index 4a291939604..7f3b22e605c 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/exposure/Exposure.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/exposure/Exposure.java @@ -42,7 +42,7 @@ import de.symeda.sormas.api.exposure.HabitationType; import de.symeda.sormas.api.exposure.TypeOfAnimal; import de.symeda.sormas.api.exposure.WorkEnvironment; -import de.symeda.sormas.api.utils.YesNoUnknown; +import de.symeda.sormas.api.utils.YesNo; import de.symeda.sormas.backend.common.AbstractDomainObject; import de.symeda.sormas.backend.contact.Contact; import de.symeda.sormas.backend.epidata.EpiData; @@ -84,31 +84,31 @@ public class Exposure extends AbstractDomainObject { private WorkEnvironment workEnvironment; // Details - private YesNoUnknown indoors; - private YesNoUnknown outdoors; - private YesNoUnknown wearingMask; - private YesNoUnknown wearingPpe; - private YesNoUnknown otherProtectiveMeasures; + private YesNo indoors; + private YesNo outdoors; + private YesNo wearingMask; + private YesNo wearingPpe; + private YesNo otherProtectiveMeasures; private String protectiveMeasuresDetails; - private YesNoUnknown shortDistance; - private YesNoUnknown longFaceToFaceContact; - private YesNoUnknown animalMarket; - private YesNoUnknown percutaneous; - private YesNoUnknown contactToBodyFluids; - private YesNoUnknown handlingSamples; - private YesNoUnknown eatingRawAnimalProducts; - private YesNoUnknown handlingAnimals; + private YesNo shortDistance; + private YesNo longFaceToFaceContact; + private YesNo animalMarket; + private YesNo percutaneous; + private YesNo contactToBodyFluids; + private YesNo handlingSamples; + private YesNo eatingRawAnimalProducts; + private YesNo handlingAnimals; private AnimalCondition animalCondition; - private YesNoUnknown animalVaccinated; + private YesNo animalVaccinated; private AnimalContactType animalContactType; private String animalContactTypeDetails; - private YesNoUnknown bodyOfWater; + private YesNo bodyOfWater; private WaterSource waterSource; private String waterSourceDetails; private Contact contactToCase; - private YesNoUnknown prophylaxis; + private YesNo prophylaxis; private Date prophylaxisDate; - private YesNoUnknown riskArea; + private YesNo riskArea; // Exposure sub-types private GatheringType gatheringType; @@ -119,14 +119,14 @@ public class Exposure extends AbstractDomainObject { private String typeOfAnimalDetails; // Fields specific to ExposureType.BURIAL - private YesNoUnknown physicalContactDuringPreparation; - private YesNoUnknown physicalContactWithBody; - private YesNoUnknown deceasedPersonIll; + private YesNo physicalContactDuringPreparation; + private YesNo physicalContactWithBody; + private YesNo deceasedPersonIll; private String deceasedPersonName; private String deceasedPersonRelation; // Fields specific to ExposureType.GATHERING - private YesNoUnknown largeAttendanceNumber; + private YesNo largeAttendanceNumber; @ManyToOne @JoinColumn(nullable = false) @@ -226,47 +226,47 @@ public void setExposureRole(ExposureRole exposureRole) { } @Enumerated(EnumType.STRING) - public YesNoUnknown getIndoors() { + public YesNo getIndoors() { return indoors; } - public void setIndoors(YesNoUnknown indoors) { + public void setIndoors(YesNo indoors) { this.indoors = indoors; } @Enumerated(EnumType.STRING) - public YesNoUnknown getOutdoors() { + public YesNo getOutdoors() { return outdoors; } - public void setOutdoors(YesNoUnknown outdoors) { + public void setOutdoors(YesNo outdoors) { this.outdoors = outdoors; } @Enumerated(EnumType.STRING) - public YesNoUnknown getWearingMask() { + public YesNo getWearingMask() { return wearingMask; } - public void setWearingMask(YesNoUnknown wearingMask) { + public void setWearingMask(YesNo wearingMask) { this.wearingMask = wearingMask; } @Enumerated(EnumType.STRING) - public YesNoUnknown getWearingPpe() { + public YesNo getWearingPpe() { return wearingPpe; } - public void setWearingPpe(YesNoUnknown wearingPpe) { + public void setWearingPpe(YesNo wearingPpe) { this.wearingPpe = wearingPpe; } @Enumerated(EnumType.STRING) - public YesNoUnknown getOtherProtectiveMeasures() { + public YesNo getOtherProtectiveMeasures() { return otherProtectiveMeasures; } - public void setOtherProtectiveMeasures(YesNoUnknown otherProtectiveMeasures) { + public void setOtherProtectiveMeasures(YesNo otherProtectiveMeasures) { this.otherProtectiveMeasures = otherProtectiveMeasures; } @@ -280,74 +280,74 @@ public void setProtectiveMeasuresDetails(String protectiveMeasuresDetails) { } @Enumerated(EnumType.STRING) - public YesNoUnknown getShortDistance() { + public YesNo getShortDistance() { return shortDistance; } - public void setShortDistance(YesNoUnknown shortDistance) { + public void setShortDistance(YesNo shortDistance) { this.shortDistance = shortDistance; } @Enumerated(EnumType.STRING) - public YesNoUnknown getLongFaceToFaceContact() { + public YesNo getLongFaceToFaceContact() { return longFaceToFaceContact; } - public void setLongFaceToFaceContact(YesNoUnknown longFaceToFaceContact) { + public void setLongFaceToFaceContact(YesNo longFaceToFaceContact) { this.longFaceToFaceContact = longFaceToFaceContact; } @Enumerated(EnumType.STRING) - public YesNoUnknown getAnimalMarket() { + public YesNo getAnimalMarket() { return animalMarket; } - public void setAnimalMarket(YesNoUnknown animalMarket) { + public void setAnimalMarket(YesNo animalMarket) { this.animalMarket = animalMarket; } @Enumerated(EnumType.STRING) - public YesNoUnknown getPercutaneous() { + public YesNo getPercutaneous() { return percutaneous; } - public void setPercutaneous(YesNoUnknown percutaneous) { + public void setPercutaneous(YesNo percutaneous) { this.percutaneous = percutaneous; } @Enumerated(EnumType.STRING) - public YesNoUnknown getContactToBodyFluids() { + public YesNo getContactToBodyFluids() { return contactToBodyFluids; } - public void setContactToBodyFluids(YesNoUnknown contactToBodyFluids) { + public void setContactToBodyFluids(YesNo contactToBodyFluids) { this.contactToBodyFluids = contactToBodyFluids; } @Enumerated(EnumType.STRING) - public YesNoUnknown getHandlingSamples() { + public YesNo getHandlingSamples() { return handlingSamples; } - public void setHandlingSamples(YesNoUnknown handlingSamples) { + public void setHandlingSamples(YesNo handlingSamples) { this.handlingSamples = handlingSamples; } @Enumerated(EnumType.STRING) - public YesNoUnknown getEatingRawAnimalProducts() { + public YesNo getEatingRawAnimalProducts() { return eatingRawAnimalProducts; } - public void setEatingRawAnimalProducts(YesNoUnknown eatingRawAnimalProducts) { + public void setEatingRawAnimalProducts(YesNo eatingRawAnimalProducts) { this.eatingRawAnimalProducts = eatingRawAnimalProducts; } @Enumerated(EnumType.STRING) - public YesNoUnknown getHandlingAnimals() { + public YesNo getHandlingAnimals() { return handlingAnimals; } - public void setHandlingAnimals(YesNoUnknown handlingAnimals) { + public void setHandlingAnimals(YesNo handlingAnimals) { this.handlingAnimals = handlingAnimals; } @@ -361,11 +361,11 @@ public void setAnimalCondition(AnimalCondition animalCondition) { } @Enumerated(EnumType.STRING) - public YesNoUnknown getAnimalVaccinated() { + public YesNo getAnimalVaccinated() { return animalVaccinated; } - public void setAnimalVaccinated(YesNoUnknown animalVaccinated) { + public void setAnimalVaccinated(YesNo animalVaccinated) { this.animalVaccinated = animalVaccinated; } @@ -388,11 +388,11 @@ public void setAnimalContactTypeDetails(String animalContactTypeDetails) { } @Enumerated(EnumType.STRING) - public YesNoUnknown getBodyOfWater() { + public YesNo getBodyOfWater() { return bodyOfWater; } - public void setBodyOfWater(YesNoUnknown bodyOfWater) { + public void setBodyOfWater(YesNo bodyOfWater) { this.bodyOfWater = bodyOfWater; } @@ -479,29 +479,29 @@ public void setTypeOfAnimalDetails(String typeOfAnimalDetails) { } @Enumerated(EnumType.STRING) - public YesNoUnknown getPhysicalContactDuringPreparation() { + public YesNo getPhysicalContactDuringPreparation() { return physicalContactDuringPreparation; } - public void setPhysicalContactDuringPreparation(YesNoUnknown physicalContactDuringPreparation) { + public void setPhysicalContactDuringPreparation(YesNo physicalContactDuringPreparation) { this.physicalContactDuringPreparation = physicalContactDuringPreparation; } @Enumerated(EnumType.STRING) - public YesNoUnknown getPhysicalContactWithBody() { + public YesNo getPhysicalContactWithBody() { return physicalContactWithBody; } - public void setPhysicalContactWithBody(YesNoUnknown physicalContactWithBody) { + public void setPhysicalContactWithBody(YesNo physicalContactWithBody) { this.physicalContactWithBody = physicalContactWithBody; } @Enumerated(EnumType.STRING) - public YesNoUnknown getDeceasedPersonIll() { + public YesNo getDeceasedPersonIll() { return deceasedPersonIll; } - public void setDeceasedPersonIll(YesNoUnknown deceasedPersonIll) { + public void setDeceasedPersonIll(YesNo deceasedPersonIll) { this.deceasedPersonIll = deceasedPersonIll; } @@ -587,11 +587,11 @@ public void setSeatNumber(String seatNumber) { } @Enumerated(EnumType.STRING) - public YesNoUnknown getProphylaxis() { + public YesNo getProphylaxis() { return prophylaxis; } - public void setProphylaxis(YesNoUnknown prophylaxis) { + public void setProphylaxis(YesNo prophylaxis) { this.prophylaxis = prophylaxis; } @@ -605,20 +605,20 @@ public void setProphylaxisDate(Date prophylaxisDate) { } @Enumerated(EnumType.STRING) - public YesNoUnknown getRiskArea() { + public YesNo getRiskArea() { return riskArea; } - public void setRiskArea(YesNoUnknown riskArea) { + public void setRiskArea(YesNo riskArea) { this.riskArea = riskArea; } @Enumerated(EnumType.STRING) - public YesNoUnknown getLargeAttendanceNumber() { + public YesNo getLargeAttendanceNumber() { return largeAttendanceNumber; } - public void setLargeAttendanceNumber(YesNoUnknown largeAttendanceNumber) { + public void setLargeAttendanceNumber(YesNo largeAttendanceNumber) { this.largeAttendanceNumber = largeAttendanceNumber; } } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/hospitalization/Hospitalization.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/hospitalization/Hospitalization.java index 68bba0b3528..f5c90a8091f 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/hospitalization/Hospitalization.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/hospitalization/Hospitalization.java @@ -31,9 +31,14 @@ import javax.persistence.OneToMany; import javax.persistence.Temporal; import javax.persistence.TemporalType; +import javax.validation.constraints.Size; import de.symeda.auditlog.api.Audited; import de.symeda.sormas.api.hospitalization.HospitalizationReasonType; +import de.symeda.sormas.api.i18n.Validations; +import de.symeda.sormas.api.utils.FieldConstraints; +import de.symeda.sormas.api.utils.HospOut; +import de.symeda.sormas.api.utils.YesNo; import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.backend.common.AbstractDomainObject; @@ -57,23 +62,45 @@ public class Hospitalization extends AbstractDomainObject { public static final String INTENSIVE_CARE_UNIT_START = "intensiveCareUnitStart"; public static final String INTENSIVE_CARE_UNIT_END = "intensiveCareUnitEnd"; public static final String DESCRIPTION = "description"; + public static final String DISEASE_ONSET_DATE = "diseaseOnsetDate"; + public static final String PATIENT_HOSPITALIZED_DETAINED = "patientHospitalizedOrDetained"; - private YesNoUnknown admittedToHealthFacility; + private YesNo admittedToHealthFacility; + private YesNo admittedToHealthFacilityNew; private Date admissionDate; private Date dischargeDate; - private YesNoUnknown isolated; + private YesNo isolated; private Date isolationDate; - private YesNoUnknown leftAgainstAdvice; + private YesNo leftAgainstAdvice; - private YesNoUnknown hospitalizedPreviously; + private YesNo hospitalizedPreviously; private Date changeDateOfEmbeddedLists; private List previousHospitalizations = new ArrayList(); - private YesNoUnknown intensiveCareUnit; + private YesNo intensiveCareUnit; private Date intensiveCareUnitStart; private Date intensiveCareUnitEnd; private HospitalizationReasonType hospitalizationReason; private String otherHospitalizationReason; private String description; + private Date diseaseOnsetDate; + private HospOut patientHospitalizedOrDetained; + + private String place; + @Size(max = FieldConstraints.CHARACTER_LIMIT_UUID_MAX, message = Validations.onlyNumbersAllowed) + private String durationMonths; + @Size(max = FieldConstraints.CHARACTER_LIMIT_UUID_MAX, message = Validations.onlyNumbersAllowed) + private String durationDays; + private String place2; + private String durationMonths2; + private String durationDays2; + private String investigatorName; + private String investigatorTitle; + private String investigatorUnit; + private String investigatorAddress; + private String investigatorTel; + private Date notifyDistrictDate; + private Date dateFirstSeen; + private Date terminationDateHospitalStay; @Temporal(TemporalType.TIMESTAMP) public Date getAdmissionDate() { @@ -94,11 +121,11 @@ public void setDischargeDate(Date dischargeDate) { } @Enumerated(EnumType.STRING) - public YesNoUnknown getIsolated() { + public YesNo getIsolated() { return isolated; } - public void setIsolated(YesNoUnknown isolated) { + public void setIsolated(YesNo isolated) { this.isolated = isolated; } @@ -112,11 +139,11 @@ public void setIsolationDate(Date isolationDate) { } @Enumerated(EnumType.STRING) - public YesNoUnknown getHospitalizedPreviously() { + public YesNo getHospitalizedPreviously() { return hospitalizedPreviously; } - public void setHospitalizedPreviously(YesNoUnknown hospitalizedPreviously) { + public void setHospitalizedPreviously(YesNo hospitalizedPreviously) { this.hospitalizedPreviously = hospitalizedPreviously; } @@ -130,14 +157,21 @@ public void setPreviousHospitalizations(List previousHo } @Enumerated(EnumType.STRING) - public YesNoUnknown getAdmittedToHealthFacility() { + public YesNo getAdmittedToHealthFacility() { return admittedToHealthFacility; } - public void setAdmittedToHealthFacility(YesNoUnknown admittedToHealthFacility) { + public void setAdmittedToHealthFacility(YesNo admittedToHealthFacility) { this.admittedToHealthFacility = admittedToHealthFacility; } + public YesNo getAdmittedToHealthFacilityNew() { + return admittedToHealthFacilityNew; + } + + public void setAdmittedToHealthFacilityNew(YesNo admittedToHealthFacilityNew) { + this.admittedToHealthFacilityNew = admittedToHealthFacilityNew; + } /** * This change date has to be set whenever one of the embedded lists is modified: !oldList.equals(newList) * @@ -152,20 +186,20 @@ public void setChangeDateOfEmbeddedLists(Date changeDateOfEmbeddedLists) { } @Enumerated(EnumType.STRING) - public YesNoUnknown getLeftAgainstAdvice() { + public YesNo getLeftAgainstAdvice() { return leftAgainstAdvice; } - public void setLeftAgainstAdvice(YesNoUnknown leftAgainstAdvice) { + public void setLeftAgainstAdvice(YesNo leftAgainstAdvice) { this.leftAgainstAdvice = leftAgainstAdvice; } @Enumerated(EnumType.STRING) - public YesNoUnknown getIntensiveCareUnit() { + public YesNo getIntensiveCareUnit() { return intensiveCareUnit; } - public void setIntensiveCareUnit(YesNoUnknown intensiveCareUnit) { + public void setIntensiveCareUnit(YesNo intensiveCareUnit) { this.intensiveCareUnit = intensiveCareUnit; } @@ -212,4 +246,130 @@ public String getDescription() { public void setDescription(String description) { this.description = description; } + @Temporal(TemporalType.TIMESTAMP) + public Date getDiseaseOnsetDate() { + return diseaseOnsetDate; + } + + public void setDiseaseOnsetDate(Date diseaseOnsetDate) { + this.diseaseOnsetDate = diseaseOnsetDate; + } + @Enumerated(EnumType.STRING) + public HospOut getPatientHospitalizedOrDetained() { + return patientHospitalizedOrDetained; + } + + public void setPatientHospitalizedOrDetained(HospOut patientHospitalizedOrDetained) { + this.patientHospitalizedOrDetained = patientHospitalizedOrDetained; + } + + public String getPlace() { + return place; + } + + public void setPlace(String place) { + this.place = place; + } + + public String getDurationMonths() { + return durationMonths; + } + + public void setDurationMonths(String durationMonths) { + this.durationMonths = durationMonths; + } + + public String getDurationDays() { + return durationDays; + } + public String getPlace2() { + return place2; + } + + public void setPlace2(String place2) { + this.place2 = place2; + } + + public String getDurationMonths2() { + return durationMonths2; + } + + public void setDurationMonths2(String durationMonths2) { + this.durationMonths2 = durationMonths2; + } + + public String getDurationDays2() { + return durationDays2; + } + + public void setDurationDays2(String durationDays2) { + this.durationDays2 = durationDays2; + } + + public void setDurationDays(String durationDays) { + this.durationDays = durationDays; + } + + public String getInvestigatorName() { + return investigatorName; + } + + public void setInvestigatorName(String investigatorName) { + this.investigatorName = investigatorName; + } + + public String getInvestigatorTitle() { + return investigatorTitle; + } + + public void setInvestigatorTitle(String investigatorTitle) { + this.investigatorTitle = investigatorTitle; + } + + public String getInvestigatorUnit() { + return investigatorUnit; + } + + public void setInvestigatorUnit(String investigatorUnit) { + this.investigatorUnit = investigatorUnit; + } + + public String getInvestigatorAddress() { + return investigatorAddress; + } + + public void setInvestigatorAddress(String investigatorAddress) { + this.investigatorAddress = investigatorAddress; + } + + public String getInvestigatorTel() { + return investigatorTel; + } + + public void setInvestigatorTel(String investigatorTel) { + this.investigatorTel = investigatorTel; + } + @Temporal(TemporalType.TIMESTAMP) + public Date getNotifyDistrictDate() { + return notifyDistrictDate; + } + + public void setNotifyDistrictDate(Date notifyDistrictDate) { + this.notifyDistrictDate = notifyDistrictDate; + } + @Temporal(TemporalType.TIMESTAMP) + public Date getDateFirstSeen() { + return dateFirstSeen; + } + public void setDateFirstSeen(Date dateFirstSeen) { + this.dateFirstSeen = dateFirstSeen; + } + @Temporal(TemporalType.TIMESTAMP) + public Date getTerminationDateHospitalStay() { + return terminationDateHospitalStay; + } + + public void setTerminationDateHospitalStay(Date terminationDateHospitalStay) { + this.terminationDateHospitalStay = terminationDateHospitalStay; + } } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/hospitalization/HospitalizationFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/hospitalization/HospitalizationFacadeEjb.java index 8c5ef2da07c..21246554b63 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/hospitalization/HospitalizationFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/hospitalization/HospitalizationFacadeEjb.java @@ -67,6 +67,7 @@ public Hospitalization fromDto(HospitalizationDto source, boolean checkChangeDat Hospitalization target = DtoHelper.fillOrBuildEntity(source, service.getByUuid(source.getUuid()), Hospitalization::new, checkChangeDate); target.setAdmittedToHealthFacility(source.getAdmittedToHealthFacility()); + target.setAdmittedToHealthFacilityNew(source.getAdmittedToHealthFacilityNew()); target.setAdmissionDate(source.getAdmissionDate()); target.setDischargeDate(source.getDischargeDate()); target.setHospitalizedPreviously(source.getHospitalizedPreviously()); @@ -91,6 +92,21 @@ public Hospitalization fromDto(HospitalizationDto source, boolean checkChangeDat target.setIntensiveCareUnitStart(source.getIntensiveCareUnitStart()); target.setIntensiveCareUnitEnd(source.getIntensiveCareUnitEnd()); target.setDescription(source.getDescription()); + target.setDiseaseOnsetDate(source.getDiseaseOnsetDate()); + target.setNotifyDistrictDate(source.getNotifyDistrictDate()); + target.setDateFirstSeen(source.getDateFirstSeen()); + target.setTerminationDateHospitalStay(source.getTerminationDateHospitalStay()); + target.setPlace(source.getPlace()); + target.setDurationMonths(source.getDurationMonths()); + target.setDurationDays(source.getDurationDays()); + target.setPlace2(source.getPlace2()); + target.setDurationMonths2(source.getDurationMonths2()); + target.setDurationDays2(source.getDurationDays2()); + target.setInvestigatorName(source.getInvestigatorName()); + target.setInvestigatorTitle(source.getInvestigatorTitle()); + target.setInvestigatorUnit(source.getInvestigatorUnit()); + target.setInvestigatorAddress(source.getInvestigatorAddress()); + target.setInvestigatorTel(source.getInvestigatorTel()); return target; } @@ -136,6 +152,7 @@ public static HospitalizationDto toDto(Hospitalization hospitalization) { DtoHelper.fillDto(target, source); target.setAdmittedToHealthFacility(source.getAdmittedToHealthFacility()); + target.setAdmittedToHealthFacilityNew(source.getAdmittedToHealthFacilityNew()); target.setAdmissionDate(source.getAdmissionDate()); target.setDischargeDate(source.getDischargeDate()); target.setHospitalizedPreviously(source.getHospitalizedPreviously()); @@ -155,6 +172,22 @@ public static HospitalizationDto toDto(Hospitalization hospitalization) { target.setIntensiveCareUnitStart(source.getIntensiveCareUnitStart()); target.setIntensiveCareUnitEnd(source.getIntensiveCareUnitEnd()); target.setDescription(source.getDescription()); + target.setDiseaseOnsetDate(source.getDiseaseOnsetDate()); + target.setPatientHospitalizedOrDetained(source.getPatientHospitalizedOrDetained()); + target.setPlace(source.getPlace()); + target.setDurationMonths(source.getDurationMonths()); + target.setDurationDays(source.getDurationDays()); + target.setPlace2(source.getPlace2()); + target.setDurationMonths2(source.getDurationMonths2()); + target.setDurationDays2(source.getDurationDays2()); + target.setInvestigatorName(source.getInvestigatorName()); + target.setInvestigatorTitle(source.getInvestigatorTitle()); + target.setInvestigatorUnit(source.getInvestigatorUnit()); + target.setInvestigatorAddress(source.getInvestigatorAddress()); + target.setInvestigatorTel(source.getInvestigatorTel()); + target.setNotifyDistrictDate(source.getNotifyDistrictDate()); + target.setDateFirstSeen(source.getDateFirstSeen()); + target.setTerminationDateHospitalStay(source.getTerminationDateHospitalStay()); return target; } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/hospitalization/PreviousHospitalization.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/hospitalization/PreviousHospitalization.java index 4d6c1783ef0..1dd78764bdd 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/hospitalization/PreviousHospitalization.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/hospitalization/PreviousHospitalization.java @@ -33,6 +33,7 @@ import de.symeda.auditlog.api.Audited; import de.symeda.sormas.api.hospitalization.HospitalizationReasonType; +import de.symeda.sormas.api.utils.YesNo; import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.backend.common.AbstractDomainObject; import de.symeda.sormas.backend.infrastructure.community.Community; @@ -64,7 +65,7 @@ public class PreviousHospitalization extends AbstractDomainObject { public static final String INTENSIVE_CARE_UNIT_START = "intensiveCareUnitStart"; public static final String INTENSIVE_CARE_UNIT_END = "intensiveCareUnitEnd"; - private YesNoUnknown admittedToHealthFacility; + private YesNo admittedToHealthFacility; private Date admissionDate; private Date dischargeDate; private Region region; @@ -72,22 +73,22 @@ public class PreviousHospitalization extends AbstractDomainObject { private Community community; private Facility healthFacility; private String healthFacilityDetails; - private YesNoUnknown isolated; + private YesNo isolated; private Date isolationDate; private String description; private Hospitalization hospitalization; private HospitalizationReasonType hospitalizationReason; private String otherHospitalizationReason; - private YesNoUnknown intensiveCareUnit; + private YesNo intensiveCareUnit; private Date intensiveCareUnitStart; private Date intensiveCareUnitEnd; @Enumerated(EnumType.STRING) - public YesNoUnknown getAdmittedToHealthFacility() { + public YesNo getAdmittedToHealthFacility() { return admittedToHealthFacility; } - public void setAdmittedToHealthFacility(YesNoUnknown admittedToHealthFacility) { + public void setAdmittedToHealthFacility(YesNo admittedToHealthFacility) { this.admittedToHealthFacility = admittedToHealthFacility; } @@ -146,11 +147,11 @@ public void setHealthFacility(Facility healthFacility) { } @Enumerated(EnumType.STRING) - public YesNoUnknown getIsolated() { + public YesNo getIsolated() { return isolated; } - public void setIsolated(YesNoUnknown isolated) { + public void setIsolated(YesNo isolated) { this.isolated = isolated; } @@ -209,11 +210,11 @@ public void setOtherHospitalizationReason(String otherReasonForHospitalization) } @Enumerated(EnumType.STRING) - public YesNoUnknown getIntensiveCareUnit() { + public YesNo getIntensiveCareUnit() { return intensiveCareUnit; } - public void setIntensiveCareUnit(YesNoUnknown intensiveCareUnit) { + public void setIntensiveCareUnit(YesNo intensiveCareUnit) { this.intensiveCareUnit = intensiveCareUnit; } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/importexport/ImportFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/importexport/ImportFacadeEjb.java index e5a6a3fe1fb..b0e9affa21f 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/importexport/ImportFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/importexport/ImportFacadeEjb.java @@ -24,6 +24,7 @@ import static de.symeda.sormas.api.caze.CaseDataDto.DISTRICT; import static de.symeda.sormas.api.caze.CaseDataDto.EPID_NUMBER; import static de.symeda.sormas.api.caze.CaseDataDto.FACILITY_TYPE; +import static de.symeda.sormas.api.caze.CaseDataDto.DHIMS_FACILITY_TYPE; import static de.symeda.sormas.api.caze.CaseDataDto.HEALTH_FACILITY; import static de.symeda.sormas.api.caze.CaseDataDto.HEALTH_FACILITY_DETAILS; import static de.symeda.sormas.api.caze.CaseDataDto.PERSON; @@ -74,6 +75,7 @@ import javax.validation.Validator; import javax.validation.ValidatorFactory; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.text.WordUtils; import org.slf4j.Logger; @@ -411,6 +413,7 @@ public void generateCaseLineListingImportTemplateFile() throws IOException { importColumns.add(ImportColumn.from(CaseDataDto.class, RESPONSIBLE_DISTRICT, DistrictReferenceDto.class, separator)); importColumns.add(ImportColumn.from(CaseDataDto.class, RESPONSIBLE_COMMUNITY, CommunityReferenceDto.class, separator)); importColumns.add(ImportColumn.from(CaseDataDto.class, FACILITY_TYPE, FacilityType.class, separator)); + importColumns.add(ImportColumn.from(CaseDataDto.class, DHIMS_FACILITY_TYPE, DhimsFacility.class, separator)); importColumns.add(ImportColumn.from(CaseDataDto.class, HEALTH_FACILITY, FacilityReferenceDto.class, separator)); importColumns.add(ImportColumn.from(CaseDataDto.class, HEALTH_FACILITY_DETAILS, String.class, separator)); importColumns.add(ImportColumn.from(CaseDataDto.class, POINT_OF_ENTRY, PointOfEntryReferenceDto.class, separator)); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/infrastructure/facility/Facility.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/infrastructure/facility/Facility.java index 65f036a0326..37dcf1687b1 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/infrastructure/facility/Facility.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/infrastructure/facility/Facility.java @@ -27,7 +27,9 @@ import javax.persistence.ManyToOne; import de.symeda.sormas.api.infrastructure.area.AreaType; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import de.symeda.sormas.api.infrastructure.facility.FacilityType; +import de.symeda.sormas.api.utils.AFPFacilityOptions; import de.symeda.sormas.backend.common.InfrastructureAdo; import de.symeda.sormas.backend.infrastructure.community.Community; import de.symeda.sormas.backend.infrastructure.district.District; @@ -57,6 +59,8 @@ public class Facility extends InfrastructureAdo { public static final String LATITUDE = "latitude"; public static final String LONGITUDE = "longitude"; public static final String TYPE = "type"; + public static final String DHIMS_FACILITY_TYPE = "dhimsFacilityType"; + public static final String AFP_TYPE = "afpType"; public static final String PUBLIC_OWNERSHIP = "publicOwnership"; public static final String EXTERNAL_ID = "externalID"; @@ -77,6 +81,8 @@ public class Facility extends InfrastructureAdo { private Double latitude; private Double longitude; private FacilityType type; + private DhimsFacility dhimsFacilityType; + private AFPFacilityOptions afpType; private boolean publicOwnership; private String externalID; @@ -230,6 +236,19 @@ public void setType(FacilityType type) { this.type = type; } + @Enumerated(EnumType.STRING) + public DhimsFacility getDhimsFacilityType() { + return dhimsFacilityType; + } + + public void setDhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + } + @Enumerated(EnumType.STRING) + public AFPFacilityOptions getAfpType(){return afpType;} + + public void setAfpType(AFPFacilityOptions afpType){this.afpType = afpType;} + public boolean isPublicOwnership() { return publicOwnership; } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/infrastructure/facility/FacilityFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/infrastructure/facility/FacilityFacadeEjb.java index ebdc20a7f82..ca855f86858 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/infrastructure/facility/FacilityFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/infrastructure/facility/FacilityFacadeEjb.java @@ -36,6 +36,8 @@ import javax.persistence.criteria.Root; import javax.validation.constraints.NotNull; +import de.symeda.sormas.api.infrastructure.facility.*; +import de.symeda.sormas.api.utils.AFPFacilityOptions; import org.apache.commons.collections.CollectionUtils; import de.symeda.sormas.api.ReferenceDto; @@ -44,14 +46,6 @@ import de.symeda.sormas.api.i18n.Validations; import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityCriteria; -import de.symeda.sormas.api.infrastructure.facility.FacilityDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityExportDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityFacade; -import de.symeda.sormas.api.infrastructure.facility.FacilityHelper; -import de.symeda.sormas.api.infrastructure.facility.FacilityIndexDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityType; import de.symeda.sormas.api.utils.SortProperty; import de.symeda.sormas.api.utils.ValidationRuntimeException; import de.symeda.sormas.backend.common.CriteriaBuilderHelper; @@ -102,6 +96,18 @@ public List getActiveFacilitiesByCommunityAndType( return facilities.stream().map(FacilityFacadeEjb::toReferenceDto).collect(Collectors.toList()); } + @Override + public List getActiveFacilitiesByCommunityAndType( + CommunityReferenceDto communityRef, + DhimsFacility dhimsFacilityType, + boolean includeOtherFacility, + boolean includeNoneFacility) { + + Community community = communityService.getByUuid(communityRef.getUuid()); + List facilities = service.getActiveFacilitiesByCommunityAndType(community, dhimsFacilityType, includeOtherFacility, includeNoneFacility); + return facilities.stream().map(FacilityFacadeEjb::toReferenceDto).collect(Collectors.toList()); + } + @Override public List getActiveFacilitiesByDistrictAndType( DistrictReferenceDto districtRef, @@ -110,14 +116,26 @@ public List getActiveFacilitiesByDistrictAndType( boolean includeNoneFacility) { District district = districtService.getByUuid(districtRef.getUuid()); - List facilities = service.getActiveFacilitiesByDistrictAndType(district, type, includeOtherFacility, includeNoneFacility); + List facilities = service.getActiveFacilitiesByDistrictAndType(district, type, includeOtherFacility, includeNoneFacility); + return facilities.stream().map(FacilityFacadeEjb::toReferenceDto).collect(Collectors.toList()); + } + + @Override + public List getActiveFacilitiesByDistrictAndType( + DistrictReferenceDto districtRef, + DhimsFacility dhimsFacilityType, + boolean includeOtherFacility, + boolean includeNoneFacility) { + + District district = districtService.getByUuid(districtRef.getUuid()); + List facilities = service.getActiveFacilitiesByDistrictAndType(district, dhimsFacilityType, includeOtherFacility, includeNoneFacility); return facilities.stream().map(FacilityFacadeEjb::toReferenceDto).collect(Collectors.toList()); } @Override public List getActiveHospitalsByCommunity(CommunityReferenceDto communityRef, boolean includeOtherFacility) { Community community = communityService.getByUuid(communityRef.getUuid()); - List facilities = service.getActiveFacilitiesByCommunityAndType(community, FacilityType.HOSPITAL, includeOtherFacility, false); + List facilities = service.getActiveFacilitiesByCommunityAndType(community, FacilityType.HOSPITAL, includeOtherFacility, false); return facilities.stream().map(FacilityFacadeEjb::toReferenceDto).collect(Collectors.toList()); } @@ -176,6 +194,9 @@ public List getAllWithoutRegionAfter(Date date) { cq.where(filter); } + //add facility items here + //cq.multiselect() + return em.createQuery(cq).getResultList(); } @@ -194,6 +215,7 @@ protected void selectDtoFields(CriteriaQuery cq, Root roo Join community = root.join(Facility.COMMUNITY, JoinType.LEFT); Join district = root.join(Facility.DISTRICT, JoinType.LEFT); Join region = root.join(Facility.REGION, JoinType.LEFT); + //Join afpFacilityOptions = root.join(Facility.AFP_TYPE, JoinType.LEFT); // Need to be in the same order as in the constructor cq.multiselect( root.get(Facility.CREATION_DATE), @@ -223,6 +245,8 @@ protected void selectDtoFields(CriteriaQuery cq, Root roo root.get(Facility.LATITUDE), root.get(Facility.LONGITUDE), root.get(Facility.TYPE), + root.get(Facility.DHIMS_FACILITY_TYPE), + root.get(Facility.AFP_TYPE), root.get(Facility.PUBLIC_OWNERSHIP), root.get(Facility.EXTERNAL_ID)); } @@ -280,6 +304,11 @@ public List getByExternalIdAndType(String id, FacilityType .collect(Collectors.toList()); } + @Override + public List getByExternalIdAndType(String id, FacilityType type, AFPFacilityOptions afpType, boolean includeArchivedEntities) { + return null; + } + @Override public Page getIndexPage(FacilityCriteria criteria, Integer offset, Integer size, List sortProperties) { List facilityIndexList = getIndexList(criteria, offset, size, sortProperties); @@ -289,11 +318,13 @@ public Page getIndexPage(FacilityCriteria criteria, Integer of @Override public List getByNameAndType( - String name, - DistrictReferenceDto districtRef, - CommunityReferenceDto communityRef, - FacilityType type, - boolean includeArchivedEntities) { + String name, + DistrictReferenceDto districtRef, + CommunityReferenceDto communityRef, + FacilityType type, + DhimsFacility dhimsFacilityType, + AFPFacilityOptions afpType, + boolean includeArchivedEntities) { return service .getFacilitiesByNameAndType( @@ -301,15 +332,31 @@ public List getByNameAndType( districtService.getByReferenceDto(districtRef), communityService.getByReferenceDto(communityRef), type, + dhimsFacilityType, + afpType, includeArchivedEntities) .stream() .map(FacilityFacadeEjb::toReferenceDto) .collect(Collectors.toList()); } + @Override + public List getByNameAndType(String name, DistrictReferenceDto districtRef, CommunityReferenceDto communityRef, FacilityType type, boolean includeArchivedEntities) { + return null; + } + + @Override + public List getByNameAndType(String name, DistrictReferenceDto districtRef, CommunityReferenceDto communityRef, FacilityType type, AFPFacilityOptions afpType, boolean includeArchivedEntities) { + return null; + } + @Override + public List getByNameAndType(String name, DistrictReferenceDto districtRef, CommunityReferenceDto communityRef, FacilityType type, DhimsFacility dhimsFacilityType, boolean includeArchivedEntities) { + return null; + } + @Override public List getLaboratoriesByName(String name, boolean includeArchivedEntities) { - return service.getFacilitiesByNameAndType(name, null, null, FacilityType.LABORATORY, includeArchivedEntities) + return service.getFacilitiesByNameAndType(name, null, null, FacilityType.LABORATORY, DhimsFacility.HOSPITAL, AFPFacilityOptions.Hospital, includeArchivedEntities) .stream() .map(FacilityFacadeEjb::toReferenceDto) .collect(Collectors.toList()); @@ -367,6 +414,8 @@ public FacilityDto toDto(Facility entity) { dto.setName(entity.getName()); dto.setType(entity.getType()); + dto.setDhimsFacilityType(entity.getDhimsFacilityType()); + dto.setAfpType(entity.getAfpType()); dto.setPublicOwnership(entity.isPublicOwnership()); dto.setRegion(RegionFacadeEjb.toReferenceDto(entity.getRegion())); dto.setDistrict(DistrictFacadeEjb.toReferenceDto(entity.getDistrict())); @@ -432,6 +481,8 @@ public List getIndexList(FacilityCriteria facilityCriteria, In case Facility.TYPE: expression = facility.get(sortProperty.propertyName); break; + case Facility.DHIMS_FACILITY_TYPE: + case Facility.AFP_TYPE: case Facility.REGION: expression = region.get(Region.NAME); break; @@ -459,6 +510,8 @@ public List getIndexList(FacilityCriteria facilityCriteria, In facility.get(Facility.UUID), facility.get(Facility.NAME), facility.get(Facility.TYPE), + facility.get(Facility.DHIMS_FACILITY_TYPE), + facility.get(Facility.AFP_TYPE), region.get(Region.UUID), region.get(Region.NAME), district.get(District.UUID), @@ -486,6 +539,8 @@ public List getExportList(FacilityCriteria facilityCriteria, facility.get(Facility.UUID), facility.get(Facility.NAME), facility.get(Facility.TYPE), + facility.get(Facility.DHIMS_FACILITY_TYPE), + facility.get(Facility.AFP_TYPE), region.get(Region.NAME), district.get(District.NAME), community.get(Community.NAME), @@ -567,6 +622,8 @@ protected List findDuplicates(FacilityDto dto, boolean includeArchived districtService.getByReferenceDto(dto.getDistrict()), communityService.getByReferenceDto(dto.getCommunity()), dto.getType(), + dto.getDhimsFacilityType(), + dto.getAfpType(), includeArchived); } @@ -618,6 +675,8 @@ protected Facility fillOrBuildEntity(@NotNull FacilityDto source, Facility targe target.setLongitude(source.getLongitude()); target.setType(source.getType()); + target.setDhimsFacilityType(source.getDhimsFacilityType()); + target.setAfpType(source.getAfpType()); target.setArchived(source.isArchived()); target.setExternalID(source.getExternalID()); target.setCentrallyManaged(source.isCentrallyManaged()); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/infrastructure/facility/FacilityService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/infrastructure/facility/FacilityService.java index b08f9502b49..3e5ab1166a8 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/infrastructure/facility/FacilityService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/infrastructure/facility/FacilityService.java @@ -34,9 +34,11 @@ import de.symeda.sormas.api.EntityRelevanceStatus; import de.symeda.sormas.api.infrastructure.country.CountryReferenceDto; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import de.symeda.sormas.api.infrastructure.facility.FacilityCriteria; import de.symeda.sormas.api.infrastructure.facility.FacilityDto; import de.symeda.sormas.api.infrastructure.facility.FacilityType; +import de.symeda.sormas.api.utils.AFPFacilityOptions; import de.symeda.sormas.api.utils.DataHelper; import de.symeda.sormas.backend.common.AbstractInfrastructureAdoService; import de.symeda.sormas.backend.common.CriteriaBuilderHelper; @@ -96,6 +98,38 @@ public List getActiveFacilitiesByCommunityAndType( return facilities; } + public List getActiveFacilitiesByCommunityAndType( + Community community, + DhimsFacility dhimsFacilityType, + boolean includeOtherFacility, + boolean includeNoneFacility) { + + CriteriaBuilder cb = em.getCriteriaBuilder(); + CriteriaQuery cq = cb.createQuery(getElementClass()); + Root from = cq.from(getElementClass()); + + Predicate filter = createBasicFilter(cb, from); + + if (dhimsFacilityType != null) { + filter = cb.and(filter, cb.equal(from.get(Facility.DHIMS_FACILITY_TYPE), dhimsFacilityType)); + } + filter = cb.and(filter, cb.equal(from.get(Facility.COMMUNITY), community)); + cq.where(filter); + cq.distinct(true); + cq.orderBy(cb.asc(from.get(Facility.NAME))); + + List facilities = em.createQuery(cq).getResultList(); + + if (includeOtherFacility) { + facilities.add(getByUuid(FacilityDto.OTHER_FACILITY_UUID)); + } + if (includeNoneFacility) { + facilities.add(getByUuid(FacilityDto.NONE_FACILITY_UUID)); + } + + return facilities; + } + public List getActiveFacilitiesByDistrictAndType( District district, FacilityType type, @@ -110,6 +144,7 @@ public List getActiveFacilitiesByDistrictAndType( if (type != null) { filter = cb.and(filter, cb.equal(from.get(Facility.TYPE), type)); } + filter = cb.and(filter, cb.equal(from.get(Facility.DISTRICT), district)); cq.where(filter); cq.distinct(true); @@ -127,6 +162,38 @@ public List getActiveFacilitiesByDistrictAndType( return facilities; } + public List getActiveFacilitiesByDistrictAndType( + District district, + DhimsFacility dhimsFacilityType, + boolean includeDhimsFacility, + boolean includeNoneFacility) { + + CriteriaBuilder cb = em.getCriteriaBuilder(); + CriteriaQuery cq = cb.createQuery(getElementClass()); + Root from = cq.from(getElementClass()); + + Predicate filter = createBasicFilter(cb, from); + + if (dhimsFacilityType != null) { + filter = cb.and(filter, cb.equal(from.get(Facility.DHIMS_FACILITY_TYPE), dhimsFacilityType)); + } + filter = cb.and(filter, cb.equal(from.get(Facility.DISTRICT), district)); + cq.where(filter); + cq.distinct(true); + cq.orderBy(cb.asc(from.get(Facility.NAME))); + + List facilities = em.createQuery(cq).getResultList(); + + if (includeDhimsFacility) { + facilities.add(getByUuid(FacilityDto.OTHER_FACILITY_UUID)); + } + if (includeNoneFacility) { + facilities.add(getByUuid(FacilityDto.NONE_FACILITY_UUID)); + } + + return facilities; + } + public List getAllActiveLaboratories(boolean includeOtherFacility) { return getAllActiveLaboratories(includeOtherFacility, null); } @@ -167,6 +234,8 @@ public List getFacilitiesByNameAndType( District district, Community community, FacilityType type, + DhimsFacility dhimsFacilityType, + AFPFacilityOptions afpType, boolean includeArchivedEntities) { CriteriaBuilder cb = em.getCriteriaBuilder(); @@ -191,6 +260,12 @@ public List getFacilitiesByNameAndType( if (type != null) { filter = cb.and(filter, cb.equal(from.get(Facility.TYPE), type)); } + if (dhimsFacilityType != null) { + filter = cb.and(filter, cb.equal(from.get(Facility.DHIMS_FACILITY_TYPE), dhimsFacilityType)); + } + if (afpType != null) { + filter = cb.and(filter, cb.equal(from.get(Facility.AFP_TYPE), afpType)); + } } cq.where(filter); @@ -276,6 +351,11 @@ public Predicate buildCriteriaFilter(FacilityCriteria facilityCriteria, Criteria } else { filter = CriteriaBuilderHelper.and(cb, filter, cb.isNotNull(from.get(Facility.TYPE))); } + if (facilityCriteria.getDhimsFacilityType() != null) { + filter = CriteriaBuilderHelper.and(cb, filter, cb.equal(from.get(Facility.DHIMS_FACILITY_TYPE), facilityCriteria.getDhimsFacilityType())); + } else { + filter = CriteriaBuilderHelper.and(cb, filter, cb.isNotNull(from.get(Facility.DHIMS_FACILITY_TYPE))); + } if (facilityCriteria.getRelevanceStatus() != null) { if (facilityCriteria.getRelevanceStatus() == EntityRelevanceStatus.ACTIVE) { filter = CriteriaBuilderHelper diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/location/Location.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/location/Location.java index abaa74363cc..0e02a5385c8 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/location/Location.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/location/Location.java @@ -32,6 +32,7 @@ import de.symeda.auditlog.api.Audited; import de.symeda.sormas.api.infrastructure.area.AreaType; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import de.symeda.sormas.api.infrastructure.facility.FacilityType; import de.symeda.sormas.api.person.PersonAddressType; import de.symeda.sormas.api.utils.LocationHelper; @@ -72,6 +73,7 @@ public class Location extends AbstractDomainObject { public static final String ADDRESS_TYPE = "addressType"; public static final String ADDRESS_TYPE_DETAILS = "addressTypeDetails"; public static final String FACILITY_TYPE = "facilityType"; + public static final String DHIMS_FACILITY_TYPE = "dhimsFacilityType"; public static final String FACILITY = "facility"; public static final String FACILITY_DETAILS = "facilityDetails"; public static final String CONTACT_PERSON_FIRST_NAME = "contactPersonFirstName"; @@ -103,6 +105,7 @@ public class Location extends AbstractDomainObject { private PersonAddressType addressType; private String addressTypeDetails; private FacilityType facilityType; + private DhimsFacility dhimsFacilityType; private Facility facility; private String facilityDetails; @@ -290,6 +293,15 @@ public void setFacilityType(FacilityType facilityType) { this.facilityType = facilityType; } + @Enumerated(EnumType.STRING) + public DhimsFacility getDhimsFacilityType() { + return dhimsFacilityType; + } + + public void setDhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + } + @ManyToOne(cascade = {}) public Facility getFacility() { return facility; diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/location/LocationFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/location/LocationFacadeEjb.java index 92c4ad27798..fcb7e602b5c 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/location/LocationFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/location/LocationFacadeEjb.java @@ -132,6 +132,7 @@ public static LocationDto toDto(Location source) { target.setFacility(FacilityFacadeEjb.toReferenceDto(source.getFacility())); target.setFacilityDetails(source.getFacilityDetails()); target.setFacilityType(source.getFacilityType()); + target.setDhimsFacilityType(source.getDhimsFacilityType()); target.setContactPersonFirstName(source.getContactPersonFirstName()); target.setContactPersonLastName(source.getContactPersonLastName()); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/person/Person.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/person/Person.java index 4df434a7fe7..e1ffd82db50 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/person/Person.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/person/Person.java @@ -40,10 +40,12 @@ import javax.persistence.Temporal; import javax.persistence.TemporalType; import javax.persistence.Transient; +import javax.validation.constraints.Size; import de.symeda.auditlog.api.Audited; import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.externaldata.HasExternalData; +import de.symeda.sormas.api.i18n.Validations; import de.symeda.sormas.api.infrastructure.facility.FacilityType; import de.symeda.sormas.api.person.ApproximateAgeType; import de.symeda.sormas.api.person.ArmedForcesRelationType; @@ -58,6 +60,7 @@ import de.symeda.sormas.api.person.Salutation; import de.symeda.sormas.api.person.Sex; import de.symeda.sormas.api.person.SymptomJournalStatus; +import de.symeda.sormas.api.utils.FieldConstraints; import de.symeda.sormas.backend.caze.Case; import de.symeda.sormas.backend.common.AbstractDomainObject; import de.symeda.sormas.backend.common.messaging.ManualMessageLog; @@ -213,7 +216,8 @@ public class Person extends AbstractDomainObject implements HasExternalData { private Country birthCountry; private Country citizenship; private String additionalDetails; - + private String additionalPlacesStayed; + private String homeAddressRecreational; private List cases = new ArrayList<>(); private List contacts = new ArrayList<>(); private List eventParticipants = new ArrayList<>(); @@ -803,6 +807,22 @@ public String getAdditionalDetails() { public void setAdditionalDetails(String additionalDetails) { this.additionalDetails = additionalDetails; } + @Column(columnDefinition = "text") + public String getAdditionalPlacesStayed() { + return additionalPlacesStayed; + } + + public void setAdditionalPlacesStayed(String additionalPlacesStayed) { + this.additionalPlacesStayed = additionalPlacesStayed; + } + @Column(columnDefinition = "text") + public String getHomeAddressRecreational() { + return homeAddressRecreational; + } + + public void setHomeAddressRecreational(String homeAddressRecreational) { + this.homeAddressRecreational = homeAddressRecreational; + } private void setPersonContactInformation(String contactInfo, PersonContactDetailType personContactDetailType) { final PersonContactDetail pcd = diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/person/PersonFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/person/PersonFacadeEjb.java index ed7f7aecf6a..a2c9ddf56dc 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/person/PersonFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/person/PersonFacadeEjb.java @@ -997,6 +997,8 @@ public static PersonDto toDto(Person source) { target.setBirthCountry(CountryFacadeEjb.toReferenceDto(source.getBirthCountry())); target.setCitizenship(CountryFacadeEjb.toReferenceDto(source.getCitizenship())); target.setAdditionalDetails(source.getAdditionalDetails()); + target.setAdditionalPlacesStayed(source.getAdditionalPlacesStayed()); + target.setHomeAddressRecreational(source.getHomeAddressRecreational()); return target; } @@ -1685,6 +1687,8 @@ public Person fillOrBuildEntity(@NotNull PersonDto source, Person target, boolea target.setBirthCountry(countryService.getByReferenceDto(source.getBirthCountry())); target.setCitizenship(countryService.getByReferenceDto(source.getCitizenship())); target.setAdditionalDetails(source.getAdditionalDetails()); + target.setAdditionalPlacesStayed(source.getAdditionalPlacesStayed()); + target.setHomeAddressRecreational(source.getHomeAddressRecreational()); return target; } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/Sample.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/Sample.java index 398dbff33c0..177c380b7b9 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/Sample.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/Sample.java @@ -28,22 +28,12 @@ import java.util.Set; import java.util.stream.Collectors; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.OneToOne; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import javax.persistence.Transient; +import javax.persistence.*; import de.symeda.sormas.api.Disease; -import de.symeda.sormas.api.utils.YesNoUnknown; +import de.symeda.sormas.api.caze.CaseClassification; +import de.symeda.sormas.api.utils.*; +import de.symeda.sormas.api.utils.pseudonymization.SampleDispatchMode; import org.apache.commons.lang3.StringUtils; import de.symeda.auditlog.api.Audited; @@ -66,6 +56,8 @@ import de.symeda.sormas.backend.sormastosormas.origin.SormasToSormasOriginInfo; import de.symeda.sormas.backend.sormastosormas.share.shareinfo.SormasToSormasShareInfo; import de.symeda.sormas.backend.user.User; +import org.bouncycastle.asn1.x509.Time; +import org.joda.time.DateTime; @Entity(name = "samples") @Audited @@ -99,11 +91,13 @@ public class Sample extends DeletableAdo implements SormasToSormasShareable { public static final String RECEIVED = "received"; public static final String SPECIMEN_CONDITION = "specimenCondition"; public static final String PATHOGEN_TESTING_REQUESTED = "pathogenTestingRequested"; + public static final String SAMPLE_MATERIAL_REQUESTED = "sampleMaterialTestingRequested"; public static final String ADDITIONAL_TESTING_REQUESTED = "additionalTestingRequested"; public static final String ADDITIONAL_TESTS = "additionalTests"; public static final String PATHOGEN_TEST_RESULT = "pathogenTestResult"; public static final String PATHOGEN_TEST_RESULT_CHANGE_DATE = "pathogenTestResultChangeDate"; public static final String REQUESTED_PATHOGEN_TESTS_STRING = "requestedPathogenTestsString"; + public static final String REQUESTED_SAMPLE_MATERIALS_STRING = "requestedSampleMaterialsString"; public static final String REQUESTED_ADDITIONAL_TESTS_STRING = "requestedAdditionalTestsString"; public static final String REQUESTED_OTHER_PATHOGEN_TESTS = "requestedOtherPathogenTests"; public static final String REQUESTED_OTHER_ADDITIONAL_TESTS = "requestedOtherAdditionalTests"; @@ -113,6 +107,64 @@ public class Sample extends DeletableAdo implements SormasToSormasShareable { public static final String SORMAS_TO_SORMAS_ORIGIN_INFO = "sormasToSormasOriginInfo"; public static final String SORMAS_TO_SORMAS_SHARES = "sormasToSormasShares"; + public static final String CSF_SAMPLE_COLLECTED = "csfSampleCollected"; + public static final String CSF_REASON = "csfReason"; + public static final String APPEARANCE_OF_CSF = "appearanceOfCsf"; + public static final String INOCULATION_TIME_TRANSPORT_MEDIA = "inoculationTimeTransportMedia"; + public static final String SAMPLE_SENT_TO_LAB = "sampleSentToLab"; + public static final String DATE_SAMPLE_SENT_TO_LAB = "dateSampleSentToLab"; + public static final String SAMPLE_CONTAINER_USED = "sampleContainerUsed"; + public static final String RDT_PERFORMED = "rdtPerformed"; + public static final String RDT_RESULTS = "rdtResults"; + public static final String DISTRICT_NOTIFICATION_DATE = "districtNotificationDate"; + public static final String NAME_OF_PERSON = "nameOfPerson"; + public static final String TEL_NUMBER = "telNumber"; + public static final String DATE_FORM_SENT_TO_DISTRICT = "dateFormSentToDistrict"; + public static final String DATE_FORM_RECEIVED_AT_DISTRICT = "dateFormReceivedAtDistrict"; + public static final String DATE_FORM_SENT_TO_REGION = "dateFormSentToRegion"; + public static final String DATE_FORM_RECEIVED_AT_REGION = "dateFormReceivedAtRegion"; + public static final String DATE_FORM_SENT_TO_NATIONAL = "dateFormSentToNational"; + public static final String DATE_FORM_RECEIVED_AT_NATIONAL = "dateFormReceivedAtNational"; + public static final String REASON_NOT_SENT_TO_LAB = "reasonNotSentToLab"; + + public static final String LABORATORY_NAME = "laboratoryName"; + public static final String LABORATORY_SAMPLE_DATE_RECEIVED = "laboratorySampleDateReceived"; + public static final String LABORATORY_NUMBER = "laboratoryNumber"; + public static final String LABORATORY_SAMPLE_CONTAINER_RECEIVED = "laboratorySampleContainerReceived"; + public static final String LABORATORY_SAMPLE_CONTAINER_OTHER = "laboratorySampleContainerOther"; + public static final String LABORATORY_SAMPLE_CONDITION = "laboratorySampleCondition"; + public static final String LABORATORY_APPEARANCE_OF_CSF = "laboratoryAppearanceOfCSF"; + public static final String LABORATORY_TEST_PERFORMED = "laboratoryTestPerformed"; + public static final String LABORATORY_TEST_PERFORMED_OTHER = "laboratoryTestPerformedOther"; + public static final String LABORATORY_CYTOLOGY = "laboratoryCytology"; + public static final String LABORATORY_GRAM = "laboratoryGram"; + public static final String LABORATORY_GRAM_OTHER = "laboratoryGramOther"; + public static final String LABORATORY_RDT_PERFORMED = "laboratoryRdtPerformed"; + public static final String LABORATORY_RDT_RESULTS = "laboratoryRdtResults"; + public static final String LABORATORY_LATEX = "laboratoryLatex"; + public static final String LABORATORY_CULTURE = "laboratoryCulture"; + public static final String LABORATORY_CULTURE_OTHER = "laboratoryCultureOther"; + public static final String LABORATORY_OTHER_TESTS = "laboratoryOtherTests"; + public static final String LABORATORY_OTHER_TESTS_RESULTS = "laboratoryOtherTestsResults"; + public static final String LABORATORY_CEFTRIAXONE = "laboratoryCeftriaxone"; + public static final String LABORATORY_PENICILLIN_G = "laboratoryPenicillinG"; + public static final String LABORATORY_AMOXYCILLIN = "laboratoryAmoxycillin"; + public static final String LABORATORY_OXACILLIN = "laboratoryOxacillin"; + public static final String LABORATORY_ANTIBIOGRAM_OTHER = "laboratoryAntibiogramOther"; + public static final String LABORATORY_DATE_PCR_PERFORMED = "laboratoryDatePcrPerformed"; + public static final String LABORATORY_PCR_TYPE = "laboratoryPcrType"; + public static final String LABORATORY_PCR_OPTIONS = "laboratoryPcrOptions"; + public static final String LABORATORY_SEROTYPE = "laboratorySerotype"; + public static final String LABORATORY_SEROTYPE_TYPE = "laboratorySerotypeType"; + public static final String LABORATORY_SEROTYPE_RESULTS = "laboratorySerotypeResults"; + public static final String LABORATORY_FINAL_RESULTS = "laboratoryFinalResults"; + public static final String LABORATORY_OBSERVATIONS = "laboratoryObservations"; + public static final String LABORATORY_DATE_RESULTS_SENT_HEALTH_FACILITY = "laboratoryDateResultsSentHealthFacility"; + public static final String LABORATORY_DATE_RESULTS_SENT_DSD = "laboratoryDateResultsSentDSD"; + public static final String LABORATORY_FINAL_CLASSIFICATION = "laboratoryFinalClassification"; + public static final String LABORATORY_TYPE = "laboratoryType"; + + private Case associatedCase; private Contact associatedContact; private EventParticipant associatedEventParticipant; @@ -140,20 +192,24 @@ public class Sample extends DeletableAdo implements SormasToSormasShareable { private SampleSource sampleSource; private Sample referredTo; private boolean shipped; + private boolean sampleMaterialTypeForYF; + private boolean sampleDiseaseTests; private boolean received; private PathogenTestResultType pathogenTestResult; private Date pathogenTestResultChangeDate; private Boolean pathogenTestingRequested; - private Boolean sampleMaterialRequested; + private Boolean sampleMaterialTestingRequested; private Boolean additionalTestingRequested; private Set requestedPathogenTests; - private Set requestedSampleMaterials; + private Set requestedSampleMaterials; + private Set sampleTests; private Set requestedAdditionalTests; private String requestedOtherPathogenTests; private String requestedOtherAdditionalTests; private String requestedPathogenTestsString; private String requestedSampleMaterialsString; + private String sampleTestsString; private String requestedAdditionalTestsString; private SamplingReason samplingReason; private String samplingReasonDetails; @@ -164,7 +220,79 @@ public class Sample extends DeletableAdo implements SormasToSormasShareable { private SormasToSormasOriginInfo sormasToSormasOriginInfo; private List sormasToSormasShares = new ArrayList<>(0); private YesNoUnknown ipSampleSent; - private Disease ipSampleResults; + private IpResult ipSampleResults; + private Disease disease; + private SampleDispatchMode sampleDispatchMode; + private Date sampleDispatchDate; + + private YesNo csfSampleCollected; + private YesNo rdtPerformed; + private YesNo sampleSentToLab; + + private CsfReason csfReason; + private CsfAppearance appearanceOfCsf; + private SampleContainerUsed sampleContainerUsed; + + private String rdtResults; + private String reasonNotSentToLab; + private String nameOfPerson; + private String telNumber; + + private Date inoculationTimeTransportMedia; + private Date districtNotificationDate; + private Date dateSampleSentToLab; + private Date dateFormSentToDistrict; + private Date dateFormReceivedAtDistrict; + private Date dateFormSentToRegion; + private Date dateFormReceivedAtRegion; + private Date dateFormSentToNational; + private Date dateFormReceivedAtNational; + private String laboratoryName; + private String laboratoryNumber; + private String laboratorySerotype; + private String laboratorySerotypeType; + private String laboratorySerotypeResults; + private String laboratoryFinalResults; + private String laboratoryObservations; + private String laboratorySampleContainerOther; + private String laboratoryTestPerformedOther; + private String laboratoryCytology; + private String laboratoryGramOther; + private String laboratoryCultureOther; + private String laboratoryOtherTests; + private String laboratoryOtherTestsResults; + private String laboratoryRdtResults; + private CaseClassification laboratoryFinalClassification; + private String laboratoryPcrType; + private SampleContainerUsed laboratorySampleContainerReceived; + private SpecimenCondition laboratorySampleCondition; + private CsfAppearance laboratoryAppearanceOfCSF; + private LabTest laboratoryTestPerformed; + private Gram laboratoryGram; + private YesNo laboratoryRdtPerformed; + private LatexCulture laboratoryLatex; + private LatexCulture laboratoryCulture; + private LatexCulture laboratoryPcrOptions; + private Antibiogram laboratoryCeftriaxone; + private Antibiogram laboratoryPenicillinG; + private Antibiogram laboratoryAmoxycillin; + private Antibiogram laboratoryOxacillin; + private Antibiogram laboratoryAntibiogramOther; + private LabType laboratoryType; + private Date laboratoryDateResultsSentHealthFacility; + private Date laboratoryDateResultsSentDSD; + private Date laboratorySampleDateReceived; + private Date laboratoryDatePcrPerformed; + + private Date dateSentToNationalRegLab; + private Date dateDifferentiationSentToEpi; + private Date dateDifferentiationReceivedFromEpi; + private Date dateIsolateSentForSequencing; + private Date dateSeqResultsSentToProgram; + + private PosNeg finalLabResults; + private YesNoUnknown immunocompromisedStatusSuspected; + private AFPClassification afpFinalClassification; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn @@ -392,6 +520,22 @@ public void setShipped(boolean shipped) { this.shipped = shipped; } + public boolean isYellowFeverSampleType() { + return sampleMaterialTypeForYF; + } + + public void setYellowFeverSampleType(boolean sampleMaterialTypeForYF) { + this.sampleMaterialTypeForYF = sampleMaterialTypeForYF; + } + + public boolean isDiseaseSampleTests() { + return sampleDiseaseTests; + } + + public void setDiseaseSampleTests(boolean sampleDiseaseTests) { + this.sampleDiseaseTests = sampleDiseaseTests; + } + @Column public boolean isReceived() { return received; @@ -429,12 +573,12 @@ public void setPathogenTestingRequested(Boolean pathogenTestingRequested) { } @Column - public Boolean getSampleMaterialRequested() { - return sampleMaterialRequested; + public Boolean getSampleMaterialTestingRequested() { + return sampleMaterialTestingRequested; } - public void setSampleMaterialRequested(Boolean sampleMaterialRequested) { - this.sampleMaterialRequested = sampleMaterialRequested; + public void setSampleMaterialTestingRequested(Boolean sampleMaterialTestingRequested) { + this.sampleMaterialTestingRequested = sampleMaterialTestingRequested; } @Column @@ -478,19 +622,19 @@ public void setRequestedPathogenTests(Set requestedPathogenTes } @Transient - public Set getRequestedSampleMaterials() { + public Set getRequestedSampleMaterials() { if (requestedSampleMaterials == null) { if (StringUtils.isEmpty(requestedSampleMaterialsString)) { requestedSampleMaterials = new HashSet<>(); } else { requestedSampleMaterials = - Arrays.stream(requestedSampleMaterialsString.split(",")).map(SampleMaterial::valueOf).collect(Collectors.toSet()); + Arrays.stream(requestedSampleMaterialsString.split(",")).map(YellowFeverSample::valueOf).collect(Collectors.toSet()); } } return requestedSampleMaterials; } - public void setRequestedSampleMaterials(Set requestedSampleMaterials) { + public void setRequestedSampleMaterials(Set requestedSampleMaterials) { this.requestedSampleMaterials = requestedSampleMaterials; if (this.requestedSampleMaterials == null) { @@ -508,6 +652,37 @@ public void setRequestedSampleMaterials(Set requestedSampleMater requestedSampleMaterialsString = sb.toString(); } + @Transient + public Set getSampleTests() { + if (sampleTests == null) { + if (StringUtils.isEmpty(sampleTestsString)) { + sampleTests = new HashSet<>(); + } else { + sampleTests = + Arrays.stream(sampleTestsString.split(",")).map(PathogenTestType::valueOf).collect(Collectors.toSet()); + } + } + return sampleTests; + } + + public void setSampleTests(Set sampleTests) { + this.sampleTests = sampleTests; + + if (this.sampleTests == null) { + return; + } + + StringBuilder sb = new StringBuilder(); + sampleTests.stream().forEach(t -> { + sb.append(t.name()); + sb.append(","); + }); + if (sb.length() > 0) { + sb.substring(0, sb.lastIndexOf(",")); + } + sampleTestsString = sb.toString(); + } + @Transient public Set getRequestedAdditionalTests() { if (requestedAdditionalTests == null) { @@ -548,6 +723,15 @@ public void setRequestedPathogenTestsString(String requestedPathogenTestsString) requestedPathogenTests = null; } + public String getRequestedSampleMaterialsString() { + return requestedSampleMaterialsString; + } + + public void setRequestedSampleMaterialsString(String requestedSampleMaterialsString) { + this.requestedSampleMaterialsString = requestedSampleMaterialsString; + requestedSampleMaterials = null; + } + public String getRequestedAdditionalTestsString() { return requestedAdditionalTestsString; } @@ -601,14 +785,39 @@ public YesNoUnknown getIpSampleSent() { return ipSampleSent; } - public void setIpSampleResults(Disease ipSampleResults) { + public Date getSampleDispatchDate() { + return sampleDispatchDate; + } + + public void setSampleDispatchDate(Date sampleDispatchDate) { + this.sampleDispatchDate = sampleDispatchDate; + } + + public void setIpSampleResults(IpResult ipSampleResults) { this.ipSampleResults = ipSampleResults; } @Enumerated(EnumType.STRING) - public Disease getIpSampleResults(){ + public IpResult getIpSampleResults(){ return ipSampleResults; } + public void setDisease(Disease disease) { + this.disease = disease; + } + @Enumerated(EnumType.STRING) + public Disease getDisease(){ + return disease; + } + + @Enumerated(EnumType.STRING) + public SampleDispatchMode getSampleDispatchMode() { + return sampleDispatchMode; + } + + public void setSampleDispatchMode(SampleDispatchMode sampleDispatchMode) { + this.sampleDispatchMode = sampleDispatchMode; + } + public SampleReferenceDto toReference() { return new SampleReferenceDto( getUuid(), @@ -667,4 +876,494 @@ public List getSormasToSormasShares() { public void setSormasToSormasShares(List sormasToSormasShares) { this.sormasToSormasShares = sormasToSormasShares; } + + public YesNo getCsfSampleCollected() { + return csfSampleCollected; + } + public void setCsfSampleCollected(YesNo csfSampleCollected) { + this.csfSampleCollected = csfSampleCollected; + } + public YesNo getRdtPerformed() { + return rdtPerformed; + } + public void setRdtPerformed(YesNo rdtPerformed) { + this.rdtPerformed = rdtPerformed; + } + public YesNo getSampleSentToLab() { + return sampleSentToLab; + } + public void setSampleSentToLab(YesNo sampleSentToLab) { + this.sampleSentToLab = sampleSentToLab; + } + + public CsfReason getCsfReason() { + return csfReason; + } + public void setCsfReason(CsfReason csfReason) { + this.csfReason = csfReason; + } + public CsfAppearance getAppearanceOfCsf() {return appearanceOfCsf; } + public void setAppearanceOfCsf(CsfAppearance appearanceOfCsf) { + this.appearanceOfCsf = appearanceOfCsf; + } + public SampleContainerUsed getSampleContainerUsed() { + return sampleContainerUsed; + } + public void setSampleContainerUsed(SampleContainerUsed sampleContainerUsed) { + this.sampleContainerUsed = sampleContainerUsed; + } + + public String getRdtResults() { + return rdtResults; + } + + public void setRdtResults(String rdtResults) { + this.rdtResults = rdtResults; + } + + public String getReasonNotSentToLab() { + return reasonNotSentToLab; + } + + public void setReasonNotSentToLab(String reasonNotSentToLab) { + this.reasonNotSentToLab = reasonNotSentToLab; + } + public String getNameOfPerson() { + return nameOfPerson; + } + + public void setNameOfPerson(String nameOfPerson) { + this.nameOfPerson = nameOfPerson; + } + public String getTelNumber() { + return telNumber; + } + + public void setTelNumber(String telNumber) { + this.telNumber = telNumber; + } + + public Date getInoculationTimeTransportMedia() { + return inoculationTimeTransportMedia; + } + + public void setInoculationTimeTransportMedia(Date inoculationTimeTransportMedia) { + this.inoculationTimeTransportMedia = inoculationTimeTransportMedia; + } + + public Date getDistrictNotificationDate() { + return districtNotificationDate; + } + + public void setDistrictNotificationDate(Date districtNotificationDate) { + this.districtNotificationDate = districtNotificationDate; + } + + public Date getDateSampleSentToLab() { + return dateSampleSentToLab; + } + + public void setDateSampleSentToLab(Date dateSampleSentToLab) { + this.dateSampleSentToLab = dateSampleSentToLab; + } + + public Date getDateFormSentToDistrict() { + return dateFormSentToDistrict; + } + + public void setDateFormSentToDistrict(Date dateFormSentToDistrict) { + this.dateFormSentToDistrict = dateFormSentToDistrict; + } + + public Date getDateFormReceivedAtDistrict() { + return dateFormReceivedAtDistrict; + } + + public void setDateFormReceivedAtDistrict(Date dateFormReceivedAtDistrict) { + this.dateFormReceivedAtDistrict = dateFormReceivedAtDistrict; + } + + public Date getDateFormSentToRegion() { + return dateFormSentToRegion; + } + + public void setDateFormSentToRegion(Date dateFormSentToRegion) { + this.dateFormSentToRegion = dateFormSentToRegion; + } + + public Date getDateFormReceivedAtRegion() { + return dateFormReceivedAtRegion; + } + + public void setDateFormReceivedAtRegion(Date dateFormReceivedAtRegion) { + this.dateFormReceivedAtRegion = dateFormReceivedAtRegion; + } + + public Date getDateFormSentToNational() { + return dateFormSentToNational; + } + + public void setDateFormSentToNational(Date dateFormSentToNational) { + this.dateFormSentToNational = dateFormSentToNational; + } + + public Date getDateFormReceivedAtNational() { + return dateFormReceivedAtNational; + } + + public void setDateFormReceivedAtNational(Date dateFormReceivedAtNational) { + this.dateFormReceivedAtNational = dateFormReceivedAtNational; + } + + public String getLaboratoryName() { + return laboratoryName; + } + + public void setLaboratoryName(String laboratoryName) { + this.laboratoryName = laboratoryName; + } + + public String getLaboratoryNumber() { + return laboratoryNumber; + } + + public void setLaboratoryNumber(String laboratoryNumber) { + this.laboratoryNumber = laboratoryNumber; + } + + public String getLaboratorySerotype() { + return laboratorySerotype; + } + + public void setLaboratorySerotype(String laboratorySerotype) { + this.laboratorySerotype = laboratorySerotype; + } + + public String getLaboratorySerotypeType() { + return laboratorySerotypeType; + } + + public void setLaboratorySerotypeType(String laboratorySerotypeType) { + this.laboratorySerotypeType = laboratorySerotypeType; + } + + public String getLaboratorySerotypeResults() { + return laboratorySerotypeResults; + } + + public void setLaboratorySerotypeResults(String laboratorySerotypeResults) { + this.laboratorySerotypeResults = laboratorySerotypeResults; + } + + public String getLaboratoryFinalResults() { + return laboratoryFinalResults; + } + + public void setLaboratoryFinalResults(String laboratoryFinalResults) { + this.laboratoryFinalResults = laboratoryFinalResults; + } + + public String getLaboratoryObservations() { + return laboratoryObservations; + } + + public void setLaboratoryObservations(String laboratoryObservations) { + this.laboratoryObservations = laboratoryObservations; + } + + public String getLaboratorySampleContainerOther() { + return laboratorySampleContainerOther; + } + + public void setLaboratorySampleContainerOther(String laboratorySampleContainerOther) { + this.laboratorySampleContainerOther = laboratorySampleContainerOther; + } + + public String getLaboratoryTestPerformedOther() { + return laboratoryTestPerformedOther; + } + + public void setLaboratoryTestPerformedOther(String laboratoryTestPerformedOther) { + this.laboratoryTestPerformedOther = laboratoryTestPerformedOther; + } + + public String getLaboratoryCytology() { + return laboratoryCytology; + } + + public void setLaboratoryCytology(String laboratoryCytology) { + this.laboratoryCytology = laboratoryCytology; + } + + public String getLaboratoryGramOther() { + return laboratoryGramOther; + } + + public void setLaboratoryGramOther(String laboratoryGramOther) { + this.laboratoryGramOther = laboratoryGramOther; + } + + public String getLaboratoryCultureOther() { + return laboratoryCultureOther; + } + + public void setLaboratoryCultureOther(String laboratoryCultureOther) { + this.laboratoryCultureOther = laboratoryCultureOther; + } + + public String getLaboratoryOtherTests() { + return laboratoryOtherTests; + } + + public void setLaboratoryOtherTests(String laboratoryOtherTests) { + this.laboratoryOtherTests = laboratoryOtherTests; + } + + public String getLaboratoryOtherTestsResults() { + return laboratoryOtherTestsResults; + } + + public void setLaboratoryOtherTestsResults(String laboratoryOtherTestsResults) { + this.laboratoryOtherTestsResults = laboratoryOtherTestsResults; + } + + public String getLaboratoryRdtResults() { + return laboratoryRdtResults; + } + + public void setLaboratoryRdtResults(String laboratoryRdtResults) { + this.laboratoryRdtResults = laboratoryRdtResults; + } + + public CaseClassification getLaboratoryFinalClassification() { + return laboratoryFinalClassification; + } + + public void setLaboratoryFinalClassification(CaseClassification laboratoryFinalClassification) { + this.laboratoryFinalClassification = laboratoryFinalClassification; + } + + public String getLaboratoryPcrType() { + return laboratoryPcrType; + } + + public void setLaboratoryPcrType(String laboratoryPcrType) { + this.laboratoryPcrType = laboratoryPcrType; + } + + public SampleContainerUsed getLaboratorySampleContainerReceived() { + return laboratorySampleContainerReceived; + } + + public void setLaboratorySampleContainerReceived(SampleContainerUsed laboratorySampleContainerReceived) { + this.laboratorySampleContainerReceived = laboratorySampleContainerReceived; + } + + public SpecimenCondition getLaboratorySampleCondition() { + return laboratorySampleCondition; + } + + public void setLaboratorySampleCondition(SpecimenCondition laboratorySampleCondition) { + this.laboratorySampleCondition = laboratorySampleCondition; + } + + public CsfAppearance getLaboratoryAppearanceOfCSF() { + return laboratoryAppearanceOfCSF; + } + + public void setLaboratoryAppearanceOfCSF(CsfAppearance laboratoryAppearanceOfCSF) { + this.laboratoryAppearanceOfCSF = laboratoryAppearanceOfCSF; + } + + public LabTest getLaboratoryTestPerformed() { + return laboratoryTestPerformed; + } + + public void setLaboratoryTestPerformed(LabTest laboratoryTestPerformed) { + this.laboratoryTestPerformed = laboratoryTestPerformed; + } + + public Gram getLaboratoryGram() { + return laboratoryGram; + } + + public void setLaboratoryGram(Gram laboratoryGram) { + this.laboratoryGram = laboratoryGram; + } + + public YesNo getLaboratoryRdtPerformed() { + return laboratoryRdtPerformed; + } + + public void setLaboratoryRdtPerformed(YesNo laboratoryRdtPerformed) { + this.laboratoryRdtPerformed = laboratoryRdtPerformed; + } + + public LatexCulture getLaboratoryLatex() { + return laboratoryLatex; + } + + public void setLaboratoryLatex(LatexCulture laboratoryLatex) { + this.laboratoryLatex = laboratoryLatex; + } + + public LatexCulture getLaboratoryCulture() { + return laboratoryCulture; + } + + public void setLaboratoryCulture(LatexCulture laboratoryCulture) { + this.laboratoryCulture = laboratoryCulture; + } + + public LatexCulture getLaboratoryPcrOptions() { + return laboratoryPcrOptions; + } + + public void setLaboratoryPcrOptions(LatexCulture laboratoryPcrOptions) { + this.laboratoryPcrOptions = laboratoryPcrOptions; + } + + public Antibiogram getLaboratoryCeftriaxone() { + return laboratoryCeftriaxone; + } + + public void setLaboratoryCeftriaxone(Antibiogram laboratoryCeftriaxone) { + this.laboratoryCeftriaxone = laboratoryCeftriaxone; + } + + public Antibiogram getLaboratoryPenicillinG() { + return laboratoryPenicillinG; + } + + public void setLaboratoryPenicillinG(Antibiogram laboratoryPenicillinG) { + this.laboratoryPenicillinG = laboratoryPenicillinG; + } + + public Antibiogram getLaboratoryAmoxycillin() { + return laboratoryAmoxycillin; + } + + public void setLaboratoryAmoxycillin(Antibiogram laboratoryAmoxycillin) { + this.laboratoryAmoxycillin = laboratoryAmoxycillin; + } + + public Antibiogram getLaboratoryOxacillin() { + return laboratoryOxacillin; + } + + public void setLaboratoryOxacillin(Antibiogram laboratoryOxacillin) { + this.laboratoryOxacillin = laboratoryOxacillin; + } + + public Antibiogram getLaboratoryAntibiogramOther() { + return laboratoryAntibiogramOther; + } + + public void setLaboratoryAntibiogramOther(Antibiogram laboratoryAntibiogramOther) { + this.laboratoryAntibiogramOther = laboratoryAntibiogramOther; + } + + public LabType getLaboratoryType() { + return laboratoryType; + } + + public void setLaboratoryType(LabType laboratoryType) { + this.laboratoryType = laboratoryType; + } + + public Date getLaboratoryDateResultsSentHealthFacility() { + return laboratoryDateResultsSentHealthFacility; + } + + public void setLaboratoryDateResultsSentHealthFacility(Date laboratoryDateResultsSentHealthFacility) { + this.laboratoryDateResultsSentHealthFacility = laboratoryDateResultsSentHealthFacility; + } + + public Date getLaboratoryDateResultsSentDSD() { + return laboratoryDateResultsSentDSD; + } + + public void setLaboratoryDateResultsSentDSD(Date laboratoryDateResultsSentDSD) { + this.laboratoryDateResultsSentDSD = laboratoryDateResultsSentDSD; + } + + public Date getLaboratorySampleDateReceived() { + return laboratorySampleDateReceived; + } + + public void setLaboratorySampleDateReceived(Date laboratorySampleDateReceived) { + this.laboratorySampleDateReceived = laboratorySampleDateReceived; + } + + public Date getLaboratoryDatePcrPerformed() { + return laboratoryDatePcrPerformed; + } + + public void setLaboratoryDatePcrPerformed(Date laboratoryDatePcrPerformed) { + this.laboratoryDatePcrPerformed = laboratoryDatePcrPerformed; + } + + public Date getDateSentToNationalRegLab() { + return dateSentToNationalRegLab; + } + + public void setDateSentToNationalRegLab(Date dateSentToNationalRegLab) { + this.dateSentToNationalRegLab = dateSentToNationalRegLab; + } + + public Date getDateDifferentiationSentToEpi() { + return dateDifferentiationSentToEpi; + } + + public void setDateDifferentiationSentToEpi(Date dateDifferentiationSentToEpi) { + this.dateDifferentiationSentToEpi = dateDifferentiationSentToEpi; + } + + public Date getDateDifferentiationReceivedFromEpi() { + return dateDifferentiationReceivedFromEpi; + } + + public void setDateDifferentiationReceivedFromEpi(Date dateDifferentiationReceivedFromEpi) { + this.dateDifferentiationReceivedFromEpi = dateDifferentiationReceivedFromEpi; + } + + public Date getDateIsolateSentForSequencing() { + return dateIsolateSentForSequencing; + } + + public void setDateIsolateSentForSequencing(Date dateIsolateSentForSequencing) { + this.dateIsolateSentForSequencing = dateIsolateSentForSequencing; + } + + public Date getDateSeqResultsSentToProgram() { + return dateSeqResultsSentToProgram; + } + + public void setDateSeqResultsSentToProgram(Date dateSeqResultsSentToProgram) { + this.dateSeqResultsSentToProgram = dateSeqResultsSentToProgram; + } + + public PosNeg getFinalLabResults() { + return finalLabResults; + } + + public void setFinalLabResults(PosNeg finalLabResults) { + this.finalLabResults = finalLabResults; + } + + public YesNoUnknown getImmunocompromisedStatusSuspected() { + return immunocompromisedStatusSuspected; + } + + public void setImmunocompromisedStatusSuspected(YesNoUnknown immunocompromisedStatusSuspected) { + this.immunocompromisedStatusSuspected = immunocompromisedStatusSuspected; + } + + public AFPClassification getAfpFinalClassification() { + return afpFinalClassification; + } + + public void setAfpFinalClassification(AFPClassification afpFinalClassification) { + this.afpFinalClassification = afpFinalClassification; + } } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleFacadeEjb.java index 5d924ff1702..a58f60306a2 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleFacadeEjb.java @@ -14,11 +14,7 @@ */ package de.symeda.sormas.backend.sample; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Date; -import java.util.List; +import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -36,6 +32,7 @@ import javax.validation.constraints.NotNull; import de.symeda.sormas.api.Disease; +import de.symeda.sormas.api.sample.*; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -53,20 +50,6 @@ import de.symeda.sormas.api.i18n.Validations; import de.symeda.sormas.api.infrastructure.facility.FacilityDto; import de.symeda.sormas.api.infrastructure.facility.FacilityHelper; -import de.symeda.sormas.api.sample.AdditionalTestDto; -import de.symeda.sormas.api.sample.PathogenTestDto; -import de.symeda.sormas.api.sample.PathogenTestResultType; -import de.symeda.sormas.api.sample.SampleCriteria; -import de.symeda.sormas.api.sample.SampleDto; -import de.symeda.sormas.api.sample.SampleExportDto; -import de.symeda.sormas.api.sample.SampleFacade; -import de.symeda.sormas.api.sample.SampleIndexDto; -import de.symeda.sormas.api.sample.SampleJurisdictionFlagsDto; -import de.symeda.sormas.api.sample.SampleListEntryDto; -import de.symeda.sormas.api.sample.SampleMaterial; -import de.symeda.sormas.api.sample.SamplePurpose; -import de.symeda.sormas.api.sample.SampleReferenceDto; -import de.symeda.sormas.api.sample.SampleSimilarityCriteria; import de.symeda.sormas.api.user.NotificationType; import de.symeda.sormas.api.user.UserRight; import de.symeda.sormas.api.utils.AccessDeniedException; @@ -376,10 +359,20 @@ public SampleDto saveSample(@Valid SampleDto dto, boolean handleChanges, boolean if (sample.getAdditionalTestingRequested() == null) { sample.setAdditionalTestingRequested(false); } - if (sample.getSampleMaterialRequested() == null) { - sample.setSampleMaterialRequested(false); + if (sample.getSampleMaterialTestingRequested() == null) { + sample.setSampleMaterialTestingRequested(false); } + if (sample.getSampleTests() == null || sample.getSampleTests().isEmpty()) { + Set defaultTests = new HashSet<>(Arrays.asList( + PathogenTestType.IGM_SERUM_ANTIBODY, + PathogenTestType.IGG_SERUM_ANTIBODY, + PathogenTestType.PCR_RT_PCR + )); + sample.setSampleTests(defaultTests); + } + + sampleService.ensurePersisted(sample); if (handleChanges) { @@ -539,7 +532,9 @@ private List getExportList( sampleRoot.get(Sample.LAB_DETAILS), sampleRoot.get(Sample.PATHOGEN_TEST_RESULT), sampleRoot.get(Sample.PATHOGEN_TESTING_REQUESTED), + sampleRoot.get(Sample.SAMPLE_MATERIAL_REQUESTED), sampleRoot.get(Sample.REQUESTED_PATHOGEN_TESTS_STRING), + sampleRoot.get(Sample.REQUESTED_SAMPLE_MATERIALS_STRING), sampleRoot.get(Sample.REQUESTED_OTHER_PATHOGEN_TESTS), sampleRoot.get(Sample.ADDITIONAL_TESTING_REQUESTED), sampleRoot.get(Sample.REQUESTED_ADDITIONAL_TESTS_STRING), @@ -793,12 +788,14 @@ public Sample fromDto(@NotNull SampleDto source, boolean checkChangeDate) { target.setSampleSource(source.getSampleSource()); target.setReferredTo(sampleService.getByReferenceDto(source.getReferredTo())); target.setShipped(source.isShipped()); + target.setYellowFeverSampleType(source.isYellowFeverSampleType()); target.setReceived(source.isReceived()); target.setPathogenTestingRequested(source.getPathogenTestingRequested()); - target.setSampleMaterialRequested(source.getSampleMaterialRequested()); + target.setSampleMaterialTestingRequested(source.getSampleMaterialTestingRequested()); target.setAdditionalTestingRequested(source.getAdditionalTestingRequested()); target.setRequestedPathogenTests(source.getRequestedPathogenTests()); target.setRequestedSampleMaterials(source.getRequestedSampleMaterials()); + target.setSampleTests(source.getSampleTests()); target.setRequestedAdditionalTests(source.getRequestedAdditionalTests()); target.setPathogenTestResult(source.getPathogenTestResult()); target.setRequestedOtherPathogenTests(source.getRequestedOtherPathogenTests()); @@ -808,11 +805,82 @@ public Sample fromDto(@NotNull SampleDto source, boolean checkChangeDate) { target.setIpSampleSent(source.getIpSampleSent()); target.setIpSampleResults(source.getIpSampleResults()); + target.setDisease(source.getDisease()); + target.setSampleDispatchMode(source.getSampleDispatchMode()); + target.setSampleDispatchDate(source.getSampleDispatchDate()); target.setReportLat(source.getReportLat()); target.setReportLon(source.getReportLon()); target.setReportLatLonAccuracy(source.getReportLatLonAccuracy()); + target.setCsfSampleCollected(source.getCsfSampleCollected()); + target.setRdtPerformed(source.getRdtPerformed()); + target.setSampleSentToLab(source.getSampleSentToLab()); + target.setCsfReason(source.getCsfReason()); + target.setAppearanceOfCsf(source.getAppearanceOfCsf()); + target.setSampleContainerUsed(source.getSampleContainerUsed()); + target.setRdtResults(source.getRdtResults()); + target.setReasonNotSentToLab(source.getReasonNotSentToLab()); + target.setNameOfPerson(source.getNameOfPerson()); + target.setTelNumber(source.getTelNumber()); + target.setInoculationTimeTransportMedia(source.getInoculationTimeTransportMedia()); + target.setDistrictNotificationDate(source.getDistrictNotificationDate()); + target.setDateSampleSentToLab(source.getDateSampleSentToLab()); + target.setDateFormSentToDistrict(source.getDateFormSentToDistrict()); + target.setDateFormReceivedAtDistrict(source.getDateFormReceivedAtDistrict()); + target.setDateFormSentToRegion(source.getDateFormSentToRegion()); + target.setDateFormReceivedAtRegion(source.getDateFormReceivedAtRegion()); + target.setDateFormSentToNational(source.getDateFormSentToNational()); + target.setDateFormReceivedAtNational(source.getDateFormReceivedAtNational()); + + + target.setLaboratoryName(source.getLaboratoryName()); + target.setLaboratoryNumber(source.getLaboratoryNumber()); + target.setLaboratorySerotype(source.getLaboratorySerotype()); + target.setLaboratorySerotypeType(source.getLaboratorySerotypeType()); + target.setLaboratorySerotypeResults(source.getLaboratorySerotypeResults()); + target.setLaboratoryFinalResults(source.getLaboratoryFinalResults()); + target.setLaboratoryObservations(source.getLaboratoryObservations()); + target.setLaboratorySampleContainerOther(source.getLaboratorySampleContainerOther()); + target.setLaboratoryTestPerformedOther(source.getLaboratoryTestPerformedOther()); + target.setLaboratoryCytology(source.getLaboratoryCytology()); + target.setLaboratoryGramOther(source.getLaboratoryGramOther()); + target.setLaboratoryCultureOther(source.getLaboratoryCultureOther()); + target.setLaboratoryOtherTests(source.getLaboratoryOtherTests()); + target.setLaboratoryOtherTestsResults(source.getLaboratoryOtherTestsResults()); + target.setLaboratoryRdtResults(source.getLaboratoryRdtResults()); + target.setLaboratoryFinalClassification(source.getLaboratoryFinalClassification()); + target.setLaboratoryPcrType(source.getLaboratoryPcrType()); + target.setLaboratorySampleContainerReceived(source.getLaboratorySampleContainerReceived()); + target.setLaboratorySampleCondition(source.getLaboratorySampleCondition()); + target.setLaboratoryAppearanceOfCSF(source.getLaboratoryAppearanceOfCSF()); + target.setLaboratoryTestPerformed(source.getLaboratoryTestPerformed()); + target.setLaboratoryGram(source.getLaboratoryGram()); + target.setLaboratoryRdtPerformed(source.getLaboratoryRdtPerformed()); + target.setLaboratoryLatex(source.getLaboratoryLatex()); + target.setLaboratoryCulture(source.getLaboratoryCulture()); + target.setLaboratoryPcrOptions(source.getLaboratoryPcrOptions()); + target.setLaboratoryCeftriaxone(source.getLaboratoryCeftriaxone()); + target.setLaboratoryPenicillinG(source.getLaboratoryPenicillinG()); + target.setLaboratoryAmoxycillin(source.getLaboratoryAmoxycillin()); + target.setLaboratoryOxacillin(source.getLaboratoryOxacillin()); + target.setLaboratoryAntibiogramOther(source.getLaboratoryAntibiogramOther()); + target.setLaboratoryType(source.getLaboratoryType()); + target.setLaboratoryDateResultsSentHealthFacility(source.getLaboratoryDateResultsSentHealthFacility()); + target.setLaboratoryDateResultsSentDSD(source.getLaboratoryDateResultsSentDSD()); + target.setLaboratorySampleDateReceived(source.getLaboratorySampleDateReceived()); + target.setLaboratoryDatePcrPerformed(source.getLaboratoryDatePcrPerformed()); + target.setDateSentToNationalRegLab(source.getDateSentToNationalRegLab()); + target.setDateDifferentiationSentToEpi(source.getDateDifferentiationSentToEpi()); + target.setDateDifferentiationReceivedFromEpi(source.getDateDifferentiationReceivedFromEpi()); + target.setDateIsolateSentForSequencing(source.getDateIsolateSentForSequencing()); + target.setDateSeqResultsSentToProgram(source.getDateSeqResultsSentToProgram()); + target.setFinalLabResults(source.getFinalLabResults()); + target.setImmunocompromisedStatusSuspected(source.getImmunocompromisedStatusSuspected()); + target.setAfpFinalClassification(source.getAfpFinalClassification()); + + + if (source.getSormasToSormasOriginInfo() != null) { target.setSormasToSormasOriginInfo(originInfoFacade.fromDto(source.getSormasToSormasOriginInfo(), checkChangeDate)); } @@ -930,10 +998,13 @@ public static SampleDto toDto(Sample source) { target.setShipped(source.isShipped()); target.setReceived(source.isReceived()); target.setPathogenTestingRequested(source.getPathogenTestingRequested()); - target.setSampleMaterialRequested(source.getSampleMaterialRequested()); + target.setSampleMaterialTestingRequested(source.getSampleMaterialTestingRequested()); + target.setYellowFeverSampleType(source.isYellowFeverSampleType()); + target.setDiseaseSampleTests(source.isDiseaseSampleTests()); target.setAdditionalTestingRequested(source.getAdditionalTestingRequested()); target.setRequestedPathogenTests(source.getRequestedPathogenTests()); target.setRequestedSampleMaterials(source.getRequestedSampleMaterials()); + target.setSampleTests(source.getSampleTests()); target.setRequestedAdditionalTests(source.getRequestedAdditionalTests()); target.setPathogenTestResult(source.getPathogenTestResult()); target.setRequestedOtherPathogenTests(source.getRequestedOtherPathogenTests()); @@ -954,6 +1025,75 @@ public static SampleDto toDto(Sample source) { target.setIpSampleSent(source.getIpSampleSent()); target.setIpSampleResults(source.getIpSampleResults()); + target.setDisease(source.getDisease()); + target.setSampleDispatchMode(source.getSampleDispatchMode()); + target.setSampleDispatchDate(source.getSampleDispatchDate()); + + target.setCsfSampleCollected(source.getCsfSampleCollected()); + target.setRdtPerformed(source.getRdtPerformed()); + target.setSampleSentToLab(source.getSampleSentToLab()); + target.setCsfReason(source.getCsfReason()); + target.setAppearanceOfCsf(source.getAppearanceOfCsf()); + target.setSampleContainerUsed(source.getSampleContainerUsed()); + target.setRdtResults(source.getRdtResults()); + target.setReasonNotSentToLab(source.getReasonNotSentToLab()); + target.setNameOfPerson(source.getNameOfPerson()); + target.setTelNumber(source.getTelNumber()); + target.setInoculationTimeTransportMedia(source.getInoculationTimeTransportMedia()); + target.setDistrictNotificationDate(source.getDistrictNotificationDate()); + target.setDateSampleSentToLab(source.getDateSampleSentToLab()); + target.setDateFormSentToDistrict(source.getDateFormSentToDistrict()); + target.setDateFormReceivedAtDistrict(source.getDateFormReceivedAtDistrict()); + target.setDateFormSentToRegion(source.getDateFormSentToRegion()); + target.setDateFormReceivedAtRegion(source.getDateFormReceivedAtRegion()); + target.setDateFormSentToNational(source.getDateFormSentToNational()); + target.setDateFormReceivedAtNational(source.getDateFormReceivedAtNational()); + + target.setLaboratoryName(source.getLaboratoryName()); + target.setLaboratoryNumber(source.getLaboratoryNumber()); + target.setLaboratorySerotype(source.getLaboratorySerotype()); + target.setLaboratorySerotypeType(source.getLaboratorySerotypeType()); + target.setLaboratorySerotypeResults(source.getLaboratorySerotypeResults()); + target.setLaboratoryFinalResults(source.getLaboratoryFinalResults()); + target.setLaboratoryObservations(source.getLaboratoryObservations()); + target.setLaboratorySampleContainerOther(source.getLaboratorySampleContainerOther()); + target.setLaboratoryTestPerformedOther(source.getLaboratoryTestPerformedOther()); + target.setLaboratoryCytology(source.getLaboratoryCytology()); + target.setLaboratoryGramOther(source.getLaboratoryGramOther()); + target.setLaboratoryCultureOther(source.getLaboratoryCultureOther()); + target.setLaboratoryOtherTests(source.getLaboratoryOtherTests()); + target.setLaboratoryOtherTestsResults(source.getLaboratoryOtherTestsResults()); + target.setLaboratoryRdtResults(source.getLaboratoryRdtResults()); + target.setLaboratoryFinalClassification(source.getLaboratoryFinalClassification()); + target.setLaboratoryPcrType(source.getLaboratoryPcrType()); + target.setLaboratorySampleContainerReceived(source.getLaboratorySampleContainerReceived()); + target.setLaboratorySampleCondition(source.getLaboratorySampleCondition()); + target.setLaboratoryAppearanceOfCSF(source.getLaboratoryAppearanceOfCSF()); + target.setLaboratoryTestPerformed(source.getLaboratoryTestPerformed()); + target.setLaboratoryGram(source.getLaboratoryGram()); + target.setLaboratoryRdtPerformed(source.getLaboratoryRdtPerformed()); + target.setLaboratoryLatex(source.getLaboratoryLatex()); + target.setLaboratoryCulture(source.getLaboratoryCulture()); + target.setLaboratoryPcrOptions(source.getLaboratoryPcrOptions()); + target.setLaboratoryCeftriaxone(source.getLaboratoryCeftriaxone()); + target.setLaboratoryPenicillinG(source.getLaboratoryPenicillinG()); + target.setLaboratoryAmoxycillin(source.getLaboratoryAmoxycillin()); + target.setLaboratoryOxacillin(source.getLaboratoryOxacillin()); + target.setLaboratoryAntibiogramOther(source.getLaboratoryAntibiogramOther()); + target.setLaboratoryDateResultsSentHealthFacility(source.getLaboratoryDateResultsSentHealthFacility()); + target.setLaboratoryDateResultsSentDSD(source.getLaboratoryDateResultsSentDSD()); + target.setLaboratorySampleDateReceived(source.getLaboratorySampleDateReceived()); + target.setLaboratoryDatePcrPerformed(source.getLaboratoryDatePcrPerformed()); + target.setDateSentToNationalRegLab(source.getDateSentToNationalRegLab()); + target.setDateDifferentiationSentToEpi(source.getDateDifferentiationSentToEpi()); + target.setDateDifferentiationReceivedFromEpi(source.getDateDifferentiationReceivedFromEpi()); + target.setDateIsolateSentForSequencing(source.getDateIsolateSentForSequencing()); + target.setDateSeqResultsSentToProgram(source.getDateSeqResultsSentToProgram()); + target.setFinalLabResults(source.getFinalLabResults()); + target.setImmunocompromisedStatusSuspected(source.getImmunocompromisedStatusSuspected()); + target.setAfpFinalClassification(source.getAfpFinalClassification()); + + return target; } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleService.java index d7e743699bc..891dfade2df 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleService.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/sample/SampleService.java @@ -38,6 +38,7 @@ import javax.ejb.Stateless; import javax.ejb.TransactionAttribute; import javax.ejb.TransactionAttributeType; +import javax.persistence.TypedQuery; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.CriteriaUpdate; @@ -103,6 +104,9 @@ import de.symeda.sormas.backend.util.JurisdictionHelper; import de.symeda.sormas.backend.util.Pseudonymizer; import de.symeda.sormas.backend.util.QueryHelper; +import org.hibernate.engine.spi.SessionImplementor; +import org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory; +import org.hibernate.hql.spi.QueryTranslator; @Stateless @LocalBean diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/sixtyday/SixtyDay.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/sixtyday/SixtyDay.java new file mode 100644 index 00000000000..b9d3501afd1 --- /dev/null +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/sixtyday/SixtyDay.java @@ -0,0 +1,238 @@ +package de.symeda.sormas.backend.sixtyday; + +import de.symeda.auditlog.api.Audited; +import de.symeda.sormas.api.utils.*; +import de.symeda.sormas.backend.common.AbstractDomainObject; + +import javax.persistence.*; +import java.util.Date; + +@Entity +@Audited +public class SixtyDay extends AbstractDomainObject { + + private static final long serialVersionUID = -8294812479501735786L; + + public static final String TABLE_NAME = "sixtyday"; + public static final String PERSON_EXAMINE_CASE = "personExamineCase"; + public static final String DATE_OF_FOLLOWUP = "dateOfFollowup"; + public static final String DATE_BIRTH = "dateBirth"; + public static final String RESIDENTIAL_LOCATION = "residentialLocation"; + public static final String PATIENT_FOUND = "patientFound"; + public static final String PATIENT_FOUND_REASON = "patientFoundReason"; + public static final String LOCATE_CHILD_ATTEMPT = "locateChildAttempt"; + public static final String PARALYSIS_WEAKNESS_PRESENT = "paralysisWeaknessPresent"; + public static final String PARALYSIS_WEAKNESS_PRESENT_SITE = "paralysisWeaknessPresentSite"; + public static final String PARALYZED_PART_OTHER = "paralyzedPartOther"; + public static final String PARALYSIS_WEAKNESS_FLOPPY = "paralysisWeaknessFloppy"; + public static final String PARALYZED_PART = "muscleToneParalyzedPart"; + public static final String OTHER_PART_BODY = "muscleToneOtherPartBody"; + public static final String DEEP_TENDON_REFLEX_SELECTION = "deepTendon"; + public static final String MUSCLE_VOLUME_SELECTION = "muscleVolume"; + public static final String SENSORY_LOSS_SELECTION = "sensoryLoss"; + public static final String PROVISIONAL_DIAGNOSIS = "provisionalDiagnosis"; + public static final String COMMENTS = "comments"; + public static final String CONTACT_DETAILS_NUMBER = "contactDetailsNumber"; + public static final String CONTACT_DETAILS_EMAIL = "contactDetailsEmail"; + public static final String SIGNATURE = "signature"; + public static final String DATE_SUBMISSION_FORMS = "dateSubmissionForms"; + + private String personExamineCase; + private Date dateOfFollowup; + private Date dateBirth; + private String residentialLocation; + private YesNo patientFound; + private String patientFoundReason; + private String locateChildAttempt; + private YesNo paralysisWeaknessPresent; + private ParalysisSite paralysisWeaknessPresentSite; + private String paralyzedPartOther; + private YesNo paralysisWeaknessFloppy; + private SymptomLevel muscleToneParalyzedPart; + private SymptomLevel muscleToneOtherPartBody; + private SymptomLevel deepTendon; + private NormalWasted muscleVolume; + private YesNo sensoryLoss; + private String provisionalDiagnosis; + private String comments; + private String contactDetailsNumber; + private String contactDetailsEmail; + private String signature; + private Date dateSubmissionForms; + + + public String getPersonExamineCase() { + return personExamineCase; + } + public void setPersonExamineCase(String personExamineCase) { + this.personExamineCase = personExamineCase; + } + @Temporal(TemporalType.TIMESTAMP) + public Date getDateOfFollowup() { + return dateOfFollowup; + } + + public void setDateOfFollowup(Date dateOfFollowup) { + this.dateOfFollowup = dateOfFollowup; + } + @Temporal(TemporalType.TIMESTAMP) + public Date getDateBirth() { + return dateBirth; + } + + public void setDateBirth(Date dateBirth) { + this.dateBirth = dateBirth; + } + + public String getResidentialLocation() { + return residentialLocation; + } + + public void setResidentialLocation(String residentialLocation) { + this.residentialLocation = residentialLocation; + } + @Enumerated(EnumType.STRING) + public YesNo getPatientFound() { + return patientFound; + } + + public void setPatientFound(YesNo patientFound) { + this.patientFound = patientFound; + } + + public String getPatientFoundReason() { + return patientFoundReason; + } + + public void setPatientFoundReason(String patientFoundReason) { + this.patientFoundReason = patientFoundReason; + } + + public String getLocateChildAttempt() { + return locateChildAttempt; + } + + public void setLocateChildAttempt(String locateChildAttempt) { + this.locateChildAttempt = locateChildAttempt; + } + @Enumerated(EnumType.STRING) + public YesNo getParalysisWeaknessPresent() { + return paralysisWeaknessPresent; + } + + public void setParalysisWeaknessPresent(YesNo paralysisWeaknessPresent) { + this.paralysisWeaknessPresent = paralysisWeaknessPresent; + } + @Enumerated(EnumType.STRING) + public ParalysisSite getParalysisWeaknessPresentSite() { + return paralysisWeaknessPresentSite; + } + + public void setParalysisWeaknessPresentSite(ParalysisSite paralysisWeaknessPresentSite) { + this.paralysisWeaknessPresentSite = paralysisWeaknessPresentSite; + } + + public String getParalyzedPartOther() { + return paralyzedPartOther; + } + + public void setParalyzedPartOther(String paralyzedPartOther) { + this.paralyzedPartOther = paralyzedPartOther; + } + @Enumerated(EnumType.STRING) + public YesNo getParalysisWeaknessFloppy() { + return paralysisWeaknessFloppy; + } + + public void setParalysisWeaknessFloppy(YesNo paralysisWeaknessFloppy) { + this.paralysisWeaknessFloppy = paralysisWeaknessFloppy; + } + @Enumerated(EnumType.STRING) + public SymptomLevel getMuscleToneParalyzedPart() { + return muscleToneParalyzedPart; + } + + public void setMuscleToneParalyzedPart(SymptomLevel muscleToneParalyzedPart) { + this.muscleToneParalyzedPart = muscleToneParalyzedPart; + } + @Enumerated(EnumType.STRING) + public SymptomLevel getMuscleToneOtherPartBody() { + return muscleToneOtherPartBody; + } + + public void setMuscleToneOtherPartBody(SymptomLevel muscleToneOtherPartBody) { + this.muscleToneOtherPartBody = muscleToneOtherPartBody; + } + @Enumerated(EnumType.STRING) + public SymptomLevel getDeepTendon() { + return deepTendon; + } + + public void setDeepTendon(SymptomLevel deepTendon) { + this.deepTendon = deepTendon; + } + @Enumerated(EnumType.STRING) + public NormalWasted getMuscleVolume() { + return muscleVolume; + } + + public void setMuscleVolume(NormalWasted muscleVolume) { + this.muscleVolume = muscleVolume; + } + @Enumerated(EnumType.STRING) + public YesNo getSensoryLoss() { + return sensoryLoss; + } + + public void setSensoryLoss(YesNo sensoryLoss) { + this.sensoryLoss = sensoryLoss; + } + + public String getProvisionalDiagnosis() { + return provisionalDiagnosis; + } + + public void setProvisionalDiagnosis(String provisionalDiagnosis) { + this.provisionalDiagnosis = provisionalDiagnosis; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public String getContactDetailsNumber() { + return contactDetailsNumber; + } + + public void setContactDetailsNumber(String contactDetailsNumber) { + this.contactDetailsNumber = contactDetailsNumber; + } + + public String getContactDetailsEmail() { + return contactDetailsEmail; + } + + public void setContactDetailsEmail(String contactDetailsEmail) { + this.contactDetailsEmail = contactDetailsEmail; + } + + public String getSignature() { + return signature; + } + + public void setSignature(String signature) { + this.signature = signature; + } + + public Date getDateSubmissionForms() { + return dateSubmissionForms; + } + + public void setDateSubmissionForms(Date dateSubmissionForms) { + this.dateSubmissionForms = dateSubmissionForms; + } +} diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/sixtyday/SixtyDayFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/sixtyday/SixtyDayFacadeEjb.java new file mode 100644 index 00000000000..8c8bfdd96e8 --- /dev/null +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/sixtyday/SixtyDayFacadeEjb.java @@ -0,0 +1,112 @@ +package de.symeda.sormas.backend.sixtyday; + + +import de.symeda.sormas.api.sixtyday.SixtyDayDto; +import de.symeda.sormas.api.sixtyday.SixtyDayFacade; +import de.symeda.sormas.backend.caze.CaseService; +import de.symeda.sormas.backend.infrastructure.community.CommunityService; +import de.symeda.sormas.backend.infrastructure.district.DistrictService; +import de.symeda.sormas.backend.infrastructure.facility.FacilityService; +import de.symeda.sormas.backend.infrastructure.region.RegionService; +import de.symeda.sormas.backend.util.DtoHelper; + +import javax.ejb.EJB; +import javax.ejb.LocalBean; +import javax.ejb.Stateless; +import java.util.ArrayList; +import java.util.List; + +@Stateless(name = "SixtyDayFacade") +public class SixtyDayFacadeEjb implements SixtyDayFacade { + + @EJB + private SixtyDayService service; + @EJB + private CaseService caseService; + @EJB + private RegionService regionService; + @EJB + private DistrictService districtService; + @EJB + private CommunityService communityService; + @EJB + private FacilityService facilityService; + + public SixtyDay fromDto(SixtyDayDto source, boolean checkChangeDate) { + + if (source == null) { + return null; + } + + SixtyDay target = DtoHelper.fillOrBuildEntity(source, service.getByUuid(source.getUuid()), SixtyDay::new, checkChangeDate); + + target.setPersonExamineCase(source.getPersonExamineCase()); + target.setDateOfFollowup(source.getDateOfFollowup()); + target.setDateBirth(source.getDateBirth()); + target.setResidentialLocation(source.getResidentialLocation()); + target.setPatientFound(source.getPatientFound()); + target.setPatientFoundReason(source.getPatientFoundReason()); + target.setLocateChildAttempt(source.getLocateChildAttempt()); + target.setParalysisWeaknessPresent(source.getParalysisWeaknessPresent()); + target.setParalysisWeaknessPresentSite(source.getParalysisWeaknessPresentSite()); + target.setParalyzedPartOther(source.getParalyzedPartOther()); + target.setParalysisWeaknessFloppy(source.getParalysisWeaknessFloppy()); + target.setMuscleToneParalyzedPart(source.getMuscleToneParalyzedPart()); + target.setMuscleToneOtherPartBody(source.getMuscleToneOtherPartBody()); + target.setDeepTendon(source.getDeepTendon()); + target.setMuscleVolume(source.getMuscleVolume()); + target.setSensoryLoss(source.getSensoryLoss()); + target.setProvisionalDiagnosis(source.getProvisionalDiagnosis()); + target.setComments(source.getComments()); + target.setContactDetailsNumber(source.getContactDetailsNumber()); + target.setContactDetailsEmail(source.getContactDetailsEmail()); + target.setSignature(source.getSignature()); + target.setDateSubmissionForms(source.getDateSubmissionForms()); + + return target; + } + + + public static SixtyDayDto toDto(SixtyDay sixtyDay) { + + if (sixtyDay == null) { + return null; + } + + SixtyDayDto target = new SixtyDayDto(); + SixtyDay source = sixtyDay; + + DtoHelper.fillDto(target, source); + + target.setPersonExamineCase(source.getPersonExamineCase()); + target.setDateOfFollowup(source.getDateOfFollowup()); + target.setDateBirth(source.getDateBirth()); + target.setResidentialLocation(source.getResidentialLocation()); + target.setPatientFound(source.getPatientFound()); + target.setPatientFoundReason(source.getPatientFoundReason()); + target.setLocateChildAttempt(source.getLocateChildAttempt()); + target.setParalysisWeaknessPresent(source.getParalysisWeaknessPresent()); + target.setParalysisWeaknessPresentSite(source.getParalysisWeaknessPresentSite()); + target.setParalyzedPartOther(source.getParalyzedPartOther()); + target.setParalysisWeaknessFloppy(source.getParalysisWeaknessFloppy()); + target.setMuscleToneParalyzedPart(source.getMuscleToneParalyzedPart()); + target.setMuscleToneOtherPartBody(source.getMuscleToneOtherPartBody()); + target.setDeepTendon(source.getDeepTendon()); + target.setMuscleVolume(source.getMuscleVolume()); + target.setSensoryLoss(source.getSensoryLoss()); + target.setProvisionalDiagnosis(source.getProvisionalDiagnosis()); + target.setComments(source.getComments()); + target.setContactDetailsNumber(source.getContactDetailsNumber()); + target.setContactDetailsEmail(source.getContactDetailsEmail()); + target.setSignature(source.getSignature()); + target.setDateSubmissionForms(source.getDateSubmissionForms()); + + return target; + } + + @LocalBean + @Stateless + public static class SixtyDayFacadeEjbLocal extends SixtyDayFacadeEjb { + + } +} diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/sixtyday/SixtyDayService.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/sixtyday/SixtyDayService.java new file mode 100644 index 00000000000..aa51c2094f7 --- /dev/null +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/sixtyday/SixtyDayService.java @@ -0,0 +1,23 @@ +package de.symeda.sormas.backend.sixtyday; + +import de.symeda.sormas.api.utils.DataHelper; +import de.symeda.sormas.backend.common.BaseAdoService; + +import javax.ejb.LocalBean; +import javax.ejb.Stateless; + +@Stateless +@LocalBean +public class SixtyDayService extends BaseAdoService { + + public SixtyDayService() { + super(SixtyDay.class); + } + + public SixtyDay createSixtyDay() { + + SixtyDay sixtyDay = new SixtyDay(); + sixtyDay.setUuid(DataHelper.createUuid()); + return sixtyDay; + } +} diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/sormastosormas/entities/caze/CaseShareDataBuilder.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/sormastosormas/entities/caze/CaseShareDataBuilder.java index 40fd1b5877e..fb88a6d923f 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/sormastosormas/entities/caze/CaseShareDataBuilder.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/sormastosormas/entities/caze/CaseShareDataBuilder.java @@ -115,6 +115,7 @@ private SormasToSormasCasePreview getCasePreview(Case caze, Pseudonymizer pseudo casePreview.setDistrict(DistrictFacadeEjb.toReferenceDto(caze.getResponsibleDistrict())); casePreview.setCommunity(CommunityFacadeEjb.toReferenceDto(caze.getResponsibleCommunity())); casePreview.setFacilityType(caze.getFacilityType()); + casePreview.setDhimsFacilityType(caze.getDhimsFacilityType()); casePreview.setHealthFacility(FacilityFacadeEjb.toReferenceDto(caze.getHealthFacility())); casePreview.setHealthFacilityDetails(caze.getHealthFacilityDetails()); casePreview.setPointOfEntry(PointOfEntryFacadeEjb.toReferenceDto(caze.getPointOfEntry())); diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/Symptoms.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/Symptoms.java index 9f2b84a5101..0e424b1609d 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/Symptoms.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/Symptoms.java @@ -17,6 +17,7 @@ *******************************************************************************/ package de.symeda.sormas.backend.symptoms; +import static de.symeda.sormas.api.Disease.*; import static de.symeda.sormas.api.utils.FieldConstraints.CHARACTER_LIMIT_DEFAULT; import java.util.Date; @@ -29,9 +30,13 @@ import javax.persistence.TemporalType; import de.symeda.auditlog.api.Audited; +import de.symeda.sormas.api.caze.CaseOutcome; import de.symeda.sormas.api.symptoms.CongenitalHeartDiseaseType; import de.symeda.sormas.api.symptoms.SymptomState; import de.symeda.sormas.api.symptoms.TemperatureSource; +import de.symeda.sormas.api.utils.Diseases; +import de.symeda.sormas.api.utils.SymptomGroup; +import de.symeda.sormas.api.utils.SymptomGrouping; import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.backend.common.AbstractDomainObject; @@ -44,6 +49,7 @@ public class Symptoms extends AbstractDomainObject { public static final String TABLE_NAME = "symptoms"; public static final String ONSET_DATE = "onsetDate"; + public static final String DATE_OF_ONSET = "dateOfOnset"; public static final String SYMPTOMATIC = "symptomatic"; public static final String TEMPERATURE = "temperature"; public static final String TEMPERATURE_SOURCE = "temperatureSource"; @@ -52,6 +58,8 @@ public class Symptoms extends AbstractDomainObject { public static final String HEART_RATE = "heartRate"; private Date onsetDate; + private Date dateOfOnset; + private YesNoUnknown feverBodyTempGreater; private String onsetSymptom; private Boolean symptomatic; private String patientIllLocation; @@ -63,6 +71,7 @@ public class Symptoms extends AbstractDomainObject { private Integer heartRate; private Integer respiratoryRate; private Integer weight; + private CaseOutcome outcome; private Integer height; private Integer midUpperArmCircumference; private Integer glasgowComaScale; @@ -217,6 +226,13 @@ public class Symptoms extends AbstractDomainObject { private SymptomState dizzinessStandingUp; private SymptomState highOrLowBloodPressure; private SymptomState urinaryRetention; + private SymptomState muscleTone; + + private SymptomState deepTendonReflex; + + private SymptomState muscleVolume; + + private SymptomState sensoryLoss; // complications private SymptomState alteredConsciousness; @@ -237,6 +253,7 @@ public class Symptoms extends AbstractDomainObject { private SymptomState otherComplications; private String otherComplicationsText; + private String provisionalDiagnosis; // when adding new fields make sure to extend toHumanString @@ -249,6 +266,23 @@ public void setOnsetDate(Date onsetDate) { this.onsetDate = onsetDate; } + @Temporal(TemporalType.TIMESTAMP) + public Date getDateOfOnset() { + return dateOfOnset; + } + + public void setDateOfOnset(Date dateOfOnset) { + this.dateOfOnset = dateOfOnset; + } + @Enumerated(EnumType.STRING) + public YesNoUnknown getFeverBodyTempGreater() { + return feverBodyTempGreater; + } + + public void setFeverBodyTempGreater(YesNoUnknown feverBodyTempGreater) { + this.feverBodyTempGreater = feverBodyTempGreater; + } + @Column(length = CHARACTER_LIMIT_DEFAULT) public String getPatientIllLocation() { return patientIllLocation; @@ -1190,7 +1224,12 @@ public Integer getWeight() { public void setWeight(Integer weight) { this.weight = weight; } - + public CaseOutcome getOutcome() { + return outcome; + } + public void setOutcome(CaseOutcome outcome) { + this.outcome = outcome; + } public Integer getHeight() { return height; } @@ -1824,6 +1863,40 @@ public void setUrinaryRetention(SymptomState urinaryRetention) { this.urinaryRetention = urinaryRetention; } + @Enumerated(EnumType.STRING) + public SymptomState getMuscleTone() { + return muscleTone; + } + + public void setMuscleTone(SymptomState muscleTone) { + this.muscleTone = muscleTone; + } + @Enumerated(EnumType.STRING) + public SymptomState getDeepTendonReflex() { + return deepTendonReflex; + } + + public void setDeepTendonReflex(SymptomState deepTendonReflex) { + this.deepTendonReflex = deepTendonReflex; + } + + @Enumerated(EnumType.STRING) + public SymptomState getMuscleVolume() { + return muscleVolume; + } + + public void setMuscleVolume(SymptomState muscleVolume) { + this.muscleVolume = muscleVolume; + } + @Enumerated(EnumType.STRING) + public SymptomState getSensoryLoss() { + return sensoryLoss; + } + + public void setSensoryLoss(SymptomState sensoryLoss) { + this.sensoryLoss = sensoryLoss; + } + @Enumerated public SymptomState getOtherComplications() { return otherComplications; @@ -1841,4 +1914,13 @@ public String getOtherComplicationsText() { public void setOtherComplicationsText(String otherComplicationsText) { this.otherComplicationsText = otherComplicationsText; } + + @Column(length = CHARACTER_LIMIT_DEFAULT) + public String getProvisionalDiagnosis() { + return provisionalDiagnosis; + } + + public void setProvisionalDiagnosis(String provisionalDiagnosis) { + this.provisionalDiagnosis = provisionalDiagnosis; + } } diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/SymptomsFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/SymptomsFacadeEjb.java index afb54c23bf6..5b3ec7ba2bb 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/SymptomsFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/SymptomsFacadeEjb.java @@ -71,6 +71,8 @@ public Symptoms fromDto(SymptomsDto source, boolean checkChangeDate) { target.setNeckStiffness(source.getNeckStiffness()); target.setNoseBleeding(source.getNoseBleeding()); target.setOnsetDate(source.getOnsetDate()); + target.setDateOfOnset(source.getDateOfOnset()); + target.setFeverBodyTempGreater(source.getFeverBodyTempGreater()); target.setOnsetSymptom(source.getOnsetSymptom()); target.setOtherHemorrhagicSymptoms(source.getOtherHemorrhagicSymptoms()); target.setOtherHemorrhagicSymptomsText(source.getOtherHemorrhagicSymptomsText()); @@ -151,6 +153,7 @@ public Symptoms fromDto(SymptomsDto source, boolean checkChangeDate) { target.setMidUpperArmCircumference(source.getMidUpperArmCircumference()); target.setRespiratoryRate(source.getRespiratoryRate()); target.setWeight(source.getWeight()); + target.setOutcome(source.getOutcome()); target.setHeight(source.getHeight()); target.setGlasgowComaScale(source.getGlasgowComaScale()); target.setBilateralCataracts(source.getBilateralCataracts()); @@ -203,6 +206,7 @@ public Symptoms fromDto(SymptomsDto source, boolean checkChangeDate) { target.setInDrawingOfChestWall(source.getInDrawingOfChestWall()); target.setOtherComplications(source.getOtherComplications()); target.setOtherComplicationsText(source.getOtherComplicationsText()); + target.setProvisionalDiagnosis(source.getProvisionalDiagnosis()); target.setRespiratoryDiseaseVentilation(source.getRespiratoryDiseaseVentilation()); target.setFeelingIll(source.getFeelingIll()); target.setShivering(source.getShivering()); @@ -220,6 +224,10 @@ public Symptoms fromDto(SymptomsDto source, boolean checkChangeDate) { target.setDizzinessStandingUp(source.getDizzinessStandingUp()); target.setHighOrLowBloodPressure(source.getHighOrLowBloodPressure()); target.setUrinaryRetention(source.getUrinaryRetention()); + target.setMuscleTone(source.getMuscleTone()); + target.setDeepTendonReflex(source.getDeepTendonReflex()); + target.setMuscleVolume(source.getMuscleVolume()); + target.setSensoryLoss(source.getSensoryLoss()); return target; } @@ -236,6 +244,7 @@ public static SymptomsDto toDto(Symptoms symptoms) { DtoHelper.fillDto(target, source); target.setAbdominalPain(source.getAbdominalPain()); + target.setOutcome(source.getOutcome()); target.setAlteredConsciousness(source.getAlteredConsciousness()); target.setAnorexiaAppetiteLoss(source.getAnorexiaAppetiteLoss()); target.setBleedingVagina(source.getBleedingVagina()); @@ -266,6 +275,8 @@ public static SymptomsDto toDto(Symptoms symptoms) { target.setNeckStiffness(source.getNeckStiffness()); target.setNoseBleeding(source.getNoseBleeding()); target.setOnsetDate(source.getOnsetDate()); + target.setDateOfOnset(source.getDateOfOnset()); + target.setFeverBodyTempGreater(source.getFeverBodyTempGreater()); target.setOnsetSymptom(source.getOnsetSymptom()); target.setOtherHemorrhagicSymptoms(source.getOtherHemorrhagicSymptoms()); target.setOtherHemorrhagicSymptomsText(source.getOtherHemorrhagicSymptomsText()); @@ -398,6 +409,7 @@ public static SymptomsDto toDto(Symptoms symptoms) { target.setInDrawingOfChestWall(source.getInDrawingOfChestWall()); target.setOtherComplications(source.getOtherComplications()); target.setOtherComplicationsText(source.getOtherComplicationsText()); + target.setProvisionalDiagnosis(source.getProvisionalDiagnosis()); target.setRespiratoryDiseaseVentilation(source.getRespiratoryDiseaseVentilation()); target.setFeelingIll(source.getFeelingIll()); target.setShivering(source.getShivering()); @@ -415,6 +427,10 @@ public static SymptomsDto toDto(Symptoms symptoms) { target.setDizzinessStandingUp(source.getDizzinessStandingUp()); target.setHighOrLowBloodPressure(source.getHighOrLowBloodPressure()); target.setUrinaryRetention(source.getUrinaryRetention()); + target.setMuscleTone(source.getMuscleTone()); + target.setDeepTendonReflex(source.getDeepTendonReflex()); + target.setMuscleVolume(source.getMuscleVolume()); + target.setSensoryLoss(source.getSensoryLoss()); return target; } diff --git a/sormas-backend/src/main/resources/META-INF/persistence.xml b/sormas-backend/src/main/resources/META-INF/persistence.xml index a6dda1c3d6b..0a3ed1cf004 100644 --- a/sormas-backend/src/main/resources/META-INF/persistence.xml +++ b/sormas-backend/src/main/resources/META-INF/persistence.xml @@ -20,6 +20,7 @@ de.symeda.sormas.backend.event.EventGroup de.symeda.sormas.backend.infrastructure.facility.Facility de.symeda.sormas.backend.hospitalization.Hospitalization + de.symeda.sormas.backend.sixtyday.SixtyDay de.symeda.sormas.backend.hospitalization.PreviousHospitalization de.symeda.sormas.backend.location.Location de.symeda.sormas.backend.outbreak.Outbreak diff --git a/sormas-backend/src/main/resources/sql/sormas_schema.sql b/sormas-backend/src/main/resources/sql/sormas_schema.sql index f15fe2b0ccf..f09b5bdd483 100644 --- a/sormas-backend/src/main/resources/sql/sormas_schema.sql +++ b/sormas-backend/src/main/resources/sql/sormas_schema.sql @@ -11702,4 +11702,267 @@ ALTER TABLE samples ADD COLUMN ipsamplesent varchar(255); ALTER TABLE samples ADD COLUMN ipsampleresults varchar(512); INSERT INTO schema_version (version_number, comment) VALUES (484, 'Added a column name ipsampleresults to samples'); +ALTER TABLE facility ADD COLUMN facilityafptype varchar(255) NULL; +ALTER TABLE facility ADD COLUMN facility_afptype varchar(255) NULL; +INSERT INTO schema_version (version_number, comment) VALUES (485, 'Added a column name facilityafptype to facility'); + +ALTER TABLE epidata ADD COLUMN disease varchar(255) NULL; +INSERT INTO schema_version (version_number, comment) VALUES (486, 'Added a column name disease to epidata'); + +ALTER TABLE samples ADD COLUMN disease varchar(512) NULL; +INSERT INTO schema_version (version_number, comment) VALUES (487, 'Added a column name disease to samples'); + +ALTER TABLE samples ADD COLUMN yellowfeversampletype varchar(512) NULL; +INSERT INTO schema_version (version_number, comment) VALUES (488, 'Added a column name yellowfeversampletype to samples'); + +ALTER TABLE facility ADD COLUMN afptype varchar(255) NULL; +INSERT INTO schema_version (version_number, comment) VALUES (489, 'Added a column name afptype to facility'); + +ALTER TABLE cases ADD COLUMN dhimsfacilitytype varchar(255); +ALTER TABLE cases_history ADD COLUMN dhimsfacilitytype varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (490, 'Added a column name dhimsfacilitytype to cases'); + +ALTER TABLE facility ADD COLUMN dhimsfacilitytype varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (491, 'Added a column name dhimsfacilitytype to facility'); + +ALTER TABLE location ADD COLUMN dhimsfacilitytype varchar(255); +ALTER TABLE person ADD COLUMN dhimsfacilitytype varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (492, 'Added a column name dhimsfacilitytype to location,person'); + +ALTER TABLE cases ADD COLUMN reportingOfficerTitle varchar(255) NULL; +ALTER TABLE cases ADD COLUMN functionOfReportingOfficer varchar(255) NULL; +ALTER TABLE cases ADD COLUMN reportingOfficerContactPhone varchar(255) NULL; +ALTER TABLE cases ADD COLUMN reportingOfficerEmail varchar(255) NULL; +INSERT INTO schema_version (version_number, comment) VALUES (493, 'Added columns: reportingOfficerTitle, functionOfReportingOfficer, reportingOfficerContactPhone, reportingOfficerEmail to cases'); + +ALTER TABLE samples ADD COLUMN sampletests varchar(255) NULL; +ALTER TABLE samples ADD COLUMN diseasesampletests varchar(255) NULL; +INSERT INTO schema_version (version_number, comment) VALUES (494, 'Added columns: disease, sampletests to samples'); + +ALTER TABLE samples ADD COLUMN sampledispatchmode varchar(255) NULL; +INSERT INTO schema_version (version_number, comment) VALUES (495, 'Added columns: sampleDispatchMode to samples'); + +ALTER TABLE samples ADD COLUMN sampleDispatchDate varchar(255) NULL; +INSERT INTO schema_version (version_number, comment) VALUES (496, 'Added columns: sampleDispatchDate to samples'); + +ALTER TABLE samples ADD COLUMN sampletestsstring varchar(512); +ALTER TABLE samples_history ADD COLUMN sampletestsstring varchar(512); +INSERT INTO schema_version (version_number, comment) VALUES (497, 'Added columns: sampletestsstring to samples'); + +ALTER TABLE symptoms ADD COLUMN outcome varchar(255); +ALTER TABLE symptoms_history ADD COLUMN outcome varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (498, 'Added columns: outcome to symptoms'); + +ALTER TABLE epidata ADD COLUMN recenttraveloutbreak varchar(255); +ALTER TABLE epidata ADD COLUMN contactsimilaroutbreak varchar(255); +ALTER TABLE epidata ADD COLUMN contactsickanimals varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (499, 'Added columns: outcome to epidata'); + +ALTER TABLE cases ADD COLUMN vaccinetype varchar(255); +ALTER TABLE cases ADD COLUMN numberofdoses varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (500, 'Added columns: vaccinetype,numberofdoses to cases'); + +ALTER TABLE samples ADD COLUMN csfsamplecollected varchar(512); +ALTER TABLE samples ADD COLUMN rdtsperformed varchar(512); +ALTER TABLE samples ADD COLUMN samplesenttolab varchar(512); + +ALTER TABLE samples ADD COLUMN csfreason varchar(512); +ALTER TABLE samples ADD COLUMN appearanceofcsf varchar(512); +ALTER TABLE samples ADD COLUMN samplecontainerused varchar(512); + +ALTER TABLE samples ADD COLUMN rdtresults varchar(512); +ALTER TABLE samples ADD COLUMN nameofperson varchar(512); +ALTER TABLE samples ADD COLUMN numberoftel varchar(512); + +ALTER TABLE samples ADD COLUMN inoculationtimetransportmedia timestamp; +ALTER TABLE samples ADD COLUMN districtnotificationdate date; +ALTER TABLE samples ADD COLUMN datesamplesenttolab date; +ALTER TABLE samples ADD COLUMN dateformsenttodistrict date; +ALTER TABLE samples ADD COLUMN dateformreceivedatdistrict date; +ALTER TABLE samples ADD COLUMN dateformsenttoregion date; +ALTER TABLE samples ADD COLUMN dateformreceivedatregion date; +ALTER TABLE samples ADD COLUMN dateformsenttonational date; +ALTER TABLE samples ADD COLUMN dateformreceivedatnational date; +INSERT INTO schema_version (version_number, comment) VALUES (501, 'Added 18 columns to samples'); + +ALTER TABLE samples ADD COLUMN telnumber varchar(255); +ALTER TABLE samples ADD COLUMN reasonnotsenttolab varchar(512); +ALTER TABLE samples ADD COLUMN rdtperformed varchar(512); +INSERT INTO schema_version (version_number, comment) VALUES (502, 'Added telnumber, reasonnotsenttolab,rdtperformed to samples'); + +-- Add columns to the "samples" table +ALTER TABLE samples ADD COLUMN laboratoryName varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryNumber varchar(255); +ALTER TABLE samples ADD COLUMN laboratorySerotype varchar(255); +ALTER TABLE samples ADD COLUMN laboratorySerotypeType varchar(255); +ALTER TABLE samples ADD COLUMN laboratorySerotypeResults varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryFinalResults varchar(512); +ALTER TABLE samples ADD COLUMN laboratoryObservations varchar(255); +ALTER TABLE samples ADD COLUMN laboratorySampleContainerOther varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryTestPerformedOther varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryCytology varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryGramOther varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryCultureOther varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryOtherTests varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryOtherTestsResults varchar(512); +ALTER TABLE samples ADD COLUMN laboratoryRdtResults varchar(512); +ALTER TABLE samples ADD COLUMN laboratoryFinalClassification varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryPcrType varchar(255); + +ALTER TABLE samples ADD COLUMN laboratorySampleContainerReceived varchar(255); +ALTER TABLE samples ADD COLUMN laboratorySampleCondition varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryAppearanceOfCSF varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryTestPerformed varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryGram varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryRdtPerformed varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryLatex varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryCulture varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryPcrOptions varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryCeftriaxone varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryPenicillinG varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryAmoxycillin varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryOxacillin varchar(255); +ALTER TABLE samples ADD COLUMN laboratoryAntibiogramOther varchar(255); + +ALTER TABLE samples ADD COLUMN laboratoryDateResultsSentHealthFacility date; +ALTER TABLE samples ADD COLUMN laboratoryDateResultsSentDSD date; +ALTER TABLE samples ADD COLUMN laboratorySampleDateReceived date; +ALTER TABLE samples ADD COLUMN laboratoryDatePcrPerformed date; +INSERT INTO schema_version (version_number, comment) VALUES (503, 'Added 35 to samples'); + +ALTER TABLE hospitalization ADD COLUMN diseaseonsetdate date; +ALTER TABLE hospitalization ADD COLUMN patienthospitalizedordetained varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (504, 'Added diseaseonsetdate,patientHospitalizedOrDetained to hospitalization'); + +ALTER TABLE samples ADD COLUMN laboratorytype varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (505, 'Added laboratoryType to samples'); + +ALTER TABLE samples ADD COLUMN requestedSampleMaterialsString varchar(512); +ALTER TABLE samples_history ADD COLUMN requestedSampleMaterialsString varchar(512); +INSERT INTO schema_version (version_number, comment) VALUES (506, 'Added requestedSampleMaterialsString to samples'); + +ALTER TABLE samples ADD COLUMN samplematerialtestingrequested boolean; +ALTER TABLE samples_history ADD COLUMN samplematerialtestingrequested boolean; +INSERT INTO schema_version (version_number, comment) VALUES (507, 'Added samplematerialtestingrequested to samples'); + +ALTER TABLE cases ADD COLUMN homeaddressrecreational varchar(512); +INSERT INTO schema_version (version_number, comment) VALUES (508, 'Added homeaddressrecreational to cases'); + +ALTER TABLE person ADD COLUMN additionalplacesstayed varchar(512); +INSERT INTO schema_version (version_number, comment) VALUES (509, 'Added additionalPlacesStayed to person'); + +ALTER TABLE samples ADD COLUMN datesenttonationalreglab date; +ALTER TABLE samples ADD COLUMN datedifferentiationsenttoepi date; +ALTER TABLE samples ADD COLUMN datedifferentiationreceivedfromepi date; +ALTER TABLE samples ADD COLUMN dateisolatesentforSequencing date; +ALTER TABLE samples ADD COLUMN dateseqresultssenttoprogram date; +ALTER TABLE samples ADD COLUMN finallabresults varchar(512); +ALTER TABLE samples ADD COLUMN immunocompromisedstatussuspected varchar(255); +ALTER TABLE samples ADD COLUMN afpfinalclassification varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (510, 'Added 8 columns to samples'); + +ALTER TABLE hospitalization ADD COLUMN place varchar(255); +ALTER TABLE hospitalization ADD COLUMN durationmonths varchar(255); +ALTER TABLE hospitalization ADD COLUMN durationdays varchar(255); +ALTER TABLE hospitalization ADD COLUMN investigatorname varchar(255); +ALTER TABLE hospitalization ADD COLUMN investigatortitle varchar(255); +ALTER TABLE hospitalization ADD COLUMN investigatorunit varchar(255); +ALTER TABLE hospitalization ADD COLUMN investigatoraddress varchar(255); +ALTER TABLE hospitalization ADD COLUMN investigatortel varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (511, 'Added 8 columns to hospitalization'); + +ALTER TABLE hospitalization ADD COLUMN muscleTone varchar(255); +ALTER TABLE hospitalization ADD COLUMN deepTendonReflex varchar(255); +ALTER TABLE hospitalization ADD COLUMN muscleVolume varchar(255); +ALTER TABLE hospitalization ADD COLUMN sensoryLoss varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (512, 'Added 8 columns to hospitalization'); + +ALTER TABLE symptoms ADD COLUMN muscletone varchar(255); +ALTER TABLE symptoms ADD COLUMN deeptendonreflex varchar(255); +ALTER TABLE symptoms ADD COLUMN musclevolume varchar(255); +ALTER TABLE symptoms ADD COLUMN sensoryloss varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (513, 'Added 4 columns to symptoms'); + +ALTER TABLE symptoms ADD COLUMN provisionaldiagnosis varchar(512); +INSERT INTO schema_version (version_number, comment) VALUES (514, 'Added provisionalDiagnosis to symptoms'); + +CREATE TABLE sixtyday ( + id BIGINT PRIMARY KEY NOT NULL, + personexaminecase VARCHAR(255), + dateoffollowup DATE, + datebirth DATE, + residentiallocation VARCHAR(255), + patientfound VARCHAR(50), + patientfoundreason VARCHAR(255), + locatechildattempt VARCHAR(255), + paralysisweaknesspresent VARCHAR(50), + paralysisweaknesspresentsite VARCHAR(50), + paralyzedpartother VARCHAR(255), + paralysisweaknessfloppy VARCHAR(50), + muscletoneparalyzedpart VARCHAR(50), + muscletoneotherpartbody VARCHAR(255), + deeptendon VARCHAR(50), + musclevolume VARCHAR(50), + sensoryloss VARCHAR(50), + provisionaldiagnosis VARCHAR(512), + comments VARCHAR(512), + contactdetailsnumber VARCHAR(50), + contactdetailsemail VARCHAR(255), + signature VARCHAR(255), + datesubmissionforms DATE); + +INSERT INTO schema_version (version_number, comment) VALUES (515, 'created sixtyday table'); + +ALTER TABLE cases ADD COLUMN sixtyday_id bigint; +INSERT INTO schema_version (version_number, comment) VALUES (516, 'Added provisionalDiagnosis to symptoms'); + +ALTER TABLE sixtyday ADD COLUMN changedate timestamp(3); +INSERT INTO schema_version (version_number, comment) VALUES (517, 'Added changedate to sixtyday'); + +ALTER TABLE sixtyday ADD COLUMN change_user_id bigint; +INSERT INTO schema_version (version_number, comment) VALUES (518, 'Added change_user_id to sixtyday'); + +ALTER TABLE sixtyday ADD COLUMN creationdate DATE; +ALTER TABLE sixtyday ADD COLUMN uuid VARCHAR(512); +INSERT INTO schema_version (version_number, comment) VALUES (519, 'Added change_user_id to sixtyday'); + +ALTER TABLE symptoms ADD COLUMN dateofonset DATE; +INSERT INTO schema_version (version_number, comment) VALUES (520, 'Added dateofonset to symptoms'); + +ALTER TABLE cases ALTER COLUMN caseclassification DROP DEFAULT; +ALTER TABLE cases ALTER COLUMN caseclassification SET DEFAULT 'SUSPECT'; +INSERT INTO schema_version (version_number, comment) VALUES (521, 'modified query caseclassify'); + +ALTER TABLE cases ALTER COLUMN systemcaseclassification DROP DEFAULT; +ALTER TABLE cases ALTER COLUMN systemcaseclassification SET DEFAULT 'SUSPECT'; +INSERT INTO schema_version (version_number, comment) VALUES (522, 'Updated default systemcaseclaffication value to SUSPECT'); + +ALTER TABLE cases ALTER COLUMN caseclassification DROP NOT NULL; +ALTER TABLE cases ALTER COLUMN systemcaseclassification DROP NOT NULL; +INSERT INTO schema_version (version_number, comment) VALUES (523, 'modified query not null'); + +ALTER TABLE cases ADD COLUMN hospitalname varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (524, 'added hospitalname to cases'); + +ALTER TABLE cases ADD COLUMN reportingofficername varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (525, 'added reportingOfficerName to cases'); + +ALTER TABLE hospitalization ADD COLUMN notifydistrictdate varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (526, 'added notifydistrictdate to hospitalization'); + +ALTER TABLE person ADD COLUMN homeaddressrecreational varchar(512); +INSERT INTO schema_version (version_number, comment) VALUES (527, 'added homeAddressRecreational to person'); + +ALTER TABLE hospitalization ADD COLUMN admittedtohealthfacilitynew varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (528, 'Added admittedToHealthFacilityNew to hospitalization'); + +ALTER TABLE symptoms ADD COLUMN feverbodytempgreater varchar(255); +INSERT INTO schema_version (version_number, comment) VALUES (529, 'Added feverBodyTempGreater to symptoms'); + +ALTER TABLE hospitalization ADD COLUMN datefirstseen DATE; +INSERT INTO schema_version (version_number, comment) VALUES (530, 'Added datefirstseen to hospitalization'); + +ALTER TABLE hospitalization ADD COLUMN terminationdatehospitalstay DATE; +INSERT INTO schema_version (version_number, comment) VALUES (531, 'Added terminationDateHospitalStay to hospitalization'); -- *** Insert new sql commands BEFORE this line. Remember to always consider _history tables. *** +`` \ No newline at end of file diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/AbstractBeanTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/AbstractBeanTest.java index 30e0db693c1..4eefb6ee316 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/AbstractBeanTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/AbstractBeanTest.java @@ -26,8 +26,10 @@ import javax.persistence.Query; import de.symeda.sormas.api.report.AggregateReportFacade; +import de.symeda.sormas.api.sixtyday.SixtyDayFacade; import de.symeda.sormas.backend.report.AggregateReport; import de.symeda.sormas.backend.report.AggregateReportFacadeEjb; +import de.symeda.sormas.backend.sixtyday.SixtyDayFacadeEjb; import org.junit.Before; import de.symeda.sormas.api.ConfigFacade; @@ -565,6 +567,9 @@ public UserRoleService getUserRoleService() { public HospitalizationFacade getHospitalizationFacade() { return getBean(HospitalizationFacadeEjbLocal.class); } + public SixtyDayFacade getSixtyDayFacade() { + return getBean(SixtyDayFacadeEjb.SixtyDayFacadeEjbLocal.class); + } public EpiDataFacade getEpiDataFacade() { return getBean(EpiDataFacadeEjb.EpiDataFacadeEjbLocal.class); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/TestDataCreator.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/TestDataCreator.java index 9d68754ce13..33db01cd641 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/TestDataCreator.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/TestDataCreator.java @@ -1149,7 +1149,7 @@ public SampleDto createSample(CaseReferenceDto associatedCase, UserReferenceDto } public SampleDto createSample(CaseReferenceDto associatedCase, UserReferenceDto reportingUser, Facility lab, Consumer customConfig) { - return createSample(associatedCase, new Date(), new Date(), reportingUser, SampleMaterial.BLOOD, lab, customConfig); + return createSample(associatedCase, new Date(), new Date(), reportingUser, SampleMaterial.WHOLE_BLOOD, lab, customConfig); } public SampleDto createSample(CaseReferenceDto associatedCase, UserReferenceDto reportingUser, FacilityReferenceDto lab) { @@ -1165,7 +1165,7 @@ public SampleDto createSample( SampleDto sample = SampleDto.build(reportingUser, associatedCase); sample.setSampleDateTime(new Date()); sample.setReportDateTime(new Date()); - sample.setSampleMaterial(SampleMaterial.BLOOD); + sample.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); sample.setSamplePurpose(SamplePurpose.EXTERNAL); sample.setLab(beanTest.getFacilityFacade().getReferenceByUuid(lab.getUuid())); @@ -1279,7 +1279,7 @@ public SampleDto createSample( SampleDto sample = SampleDto.build(reportingUser, associatedContact); sample.setSampleDateTime(new Date()); sample.setReportDateTime(new Date()); - sample.setSampleMaterial(SampleMaterial.BLOOD); + sample.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); sample.setSamplePurpose(SamplePurpose.EXTERNAL); sample.setLab(beanTest.getFacilityFacade().getReferenceByUuid(lab.getUuid())); @@ -1293,7 +1293,7 @@ public SampleDto createSample( } public SampleDto createSample(EventParticipantReferenceDto associatedEventParticipant, UserReferenceDto reportingUser, FacilityReferenceDto lab) { - return createSample(associatedEventParticipant, new Date(), new Date(), reportingUser, SampleMaterial.BLOOD, lab); + return createSample(associatedEventParticipant, new Date(), new Date(), reportingUser, SampleMaterial.WHOLE_BLOOD, lab); } public SampleDto createSample( @@ -1417,7 +1417,7 @@ public PathogenTestDto createPathogenTest( new Date(), new Date(), associatedCase.getReportingUser(), - SampleMaterial.BLOOD, + SampleMaterial.WHOLE_BLOOD, rdcf.facility); return createPathogenTest( new SampleReferenceDto(sample.getUuid()), diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/bagexport/BAGExportFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/bagexport/BAGExportFacadeEjbTest.java index 98c810288de..0684e13862d 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/bagexport/BAGExportFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/bagexport/BAGExportFacadeEjbTest.java @@ -328,7 +328,7 @@ public void testContactExport() { Date sampleDate = DateHelper.subtractDays(new Date(), 5); SampleDto sample = - creator.createSample(contactDto.toReference(), sampleDate, new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + creator.createSample(contactDto.toReference(), sampleDate, new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); Date testDate = DateHelper.subtractDays(new Date(), 4); creator.createPathogenTest( diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseClassificationLogicTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseClassificationLogicTest.java index 5b86bbf7d14..9d555c548af 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseClassificationLogicTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseClassificationLogicTest.java @@ -24,6 +24,7 @@ import java.util.Date; import java.util.List; +import de.symeda.sormas.api.utils.YesNo; import org.jboss.weld.exceptions.UnsupportedOperationException; import org.junit.Before; import org.junit.Test; @@ -94,30 +95,30 @@ public void testAutomaticClassificationForEVD() { // Probable caze = buildProbableCaseBasis(Disease.EVD); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.PROBABLE, caze.getCaseClassification()); caze = buildProbableCaseBasis(Disease.EVD); ExposureDto exposure = ExposureDto.build(ExposureType.WORK); - exposure.setHandlingSamples(YesNoUnknown.YES); + exposure.setHandlingSamples(YesNo.YES); caze.getEpiData().getExposures().add(exposure); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.PROBABLE, caze.getCaseClassification()); caze = buildProbableCaseBasis(Disease.EVD); exposure = ExposureDto.build(ExposureType.WORK); - exposure.setPercutaneous(YesNoUnknown.YES); + exposure.setPercutaneous(YesNo.YES); caze.getEpiData().getExposures().add(exposure); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.PROBABLE, caze.getCaseClassification()); caze = buildProbableCaseBasis(Disease.EVD); exposure = ExposureDto.build(ExposureType.TRAVEL); - exposure.setRiskArea(YesNoUnknown.YES); + exposure.setRiskArea(YesNo.YES); caze.getEpiData().getExposures().add(exposure); ExposureDto exposure2 = ExposureDto.build(ExposureType.BURIAL); - exposure2.setPhysicalContactWithBody(YesNoUnknown.YES); + exposure2.setPhysicalContactWithBody(YesNo.YES); caze.getEpiData().getExposures().add(exposure2); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.PROBABLE, caze.getCaseClassification()); @@ -162,18 +163,18 @@ public void ruleOutFalsePositivesForEVD() { caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); fillEpiData(caze.getEpiData()); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.NO); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.NO); ExposureDto exposure = ExposureDto.build(ExposureType.WORK); - exposure.setHandlingSamples(YesNoUnknown.NO); - exposure.setPercutaneous(YesNoUnknown.NO); + exposure.setHandlingSamples(YesNo.NO); + exposure.setPercutaneous(YesNo.NO); caze.getEpiData().getExposures().add(exposure); ExposureDto exposure2 = ExposureDto.build(ExposureType.TRAVEL); - exposure2.setRiskArea(YesNoUnknown.NO); + exposure2.setRiskArea(YesNo.NO); caze.getEpiData().getExposures().add(exposure2); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze.setOutcome(CaseOutcome.NO_OUTCOME); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); @@ -217,7 +218,7 @@ public void testAutomaticClassificationForCSM() { // Probable caze = buildSuspectCase(Disease.CSM); caze.setOutcome(CaseOutcome.DECEASED); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.PROBABLE, caze.getCaseClassification()); @@ -252,11 +253,11 @@ public void ruleOutFalsePositivesForCSM() { caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); fillEpiData(caze.getEpiData()); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.NO); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.NO); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze.setOutcome(CaseOutcome.NO_OUTCOME); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); @@ -274,67 +275,67 @@ public void testAutomaticClassificationForLassa() { // Suspect CaseDataDto caze = buildSuspectCaseBasis(Disease.LASSA); caze.getSymptoms().setFatigueWeakness(SymptomState.YES); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze = buildSuspectCaseBasis(Disease.LASSA); caze.getSymptoms().setFever(SymptomState.YES); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze = buildSuspectCaseBasis(Disease.LASSA); caze.getSymptoms().setHeadache(SymptomState.YES); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze = buildSuspectCaseBasis(Disease.LASSA); caze.getSymptoms().setSoreThroat(SymptomState.YES); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze = buildSuspectCaseBasis(Disease.LASSA); caze.getSymptoms().setCough(SymptomState.YES); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze = buildSuspectCaseBasis(Disease.LASSA); caze.getSymptoms().setNausea(SymptomState.YES); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze = buildSuspectCaseBasis(Disease.LASSA); caze.getSymptoms().setVomiting(SymptomState.YES); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze = buildSuspectCaseBasis(Disease.LASSA); caze.getSymptoms().setDiarrhea(SymptomState.YES); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze = buildSuspectCaseBasis(Disease.LASSA); caze.getSymptoms().setMusclePain(SymptomState.YES); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze = buildSuspectCaseBasis(Disease.LASSA); caze.getSymptoms().setChestPain(SymptomState.YES); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze = buildSuspectCaseBasis(Disease.LASSA); caze.getSymptoms().setHearingloss(SymptomState.YES); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); @@ -381,7 +382,7 @@ public void ruleOutFalsePositivesForLassa() { fillEpiData(caze.getEpiData()); ExposureDto exposure = creator.buildAnimalContactExposure(TypeOfAnimal.BAT); caze.getEpiData().getExposures().add(exposure); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.NO); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.NO); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.NOT_CLASSIFIED, caze.getCaseClassification()); caze.getSymptoms().setFever(SymptomState.YES); @@ -390,7 +391,7 @@ public void ruleOutFalsePositivesForLassa() { caze.getSymptoms().setFever(SymptomState.NO); ExposureDto exposure2 = creator.buildAnimalContactExposure(TypeOfAnimal.RODENT); caze.getEpiData().getExposures().add(exposure2); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.NOT_CLASSIFIED, caze.getCaseClassification()); @@ -421,7 +422,7 @@ public void testAutomaticClassificationForYellowFever() { // Probable caze = buildSuspectCase(Disease.YELLOW_FEVER); ExposureDto exposure = ExposureDto.build(ExposureType.TRAVEL); - exposure.setRiskArea(YesNoUnknown.YES); + exposure.setRiskArea(YesNo.YES); caze.getEpiData().getExposures().add(exposure); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.PROBABLE, caze.getCaseClassification()); @@ -497,7 +498,7 @@ public void ruleOutFalsePositivesForYellowFever() { caze = buildSuspectCase(Disease.YELLOW_FEVER); fillEpiData(caze.getEpiData()); ExposureDto exposure = ExposureDto.build(ExposureType.TRAVEL); - exposure.setRiskArea(YesNoUnknown.NO); + exposure.setRiskArea(YesNo.NO); caze.getEpiData().getExposures().add(exposure); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); @@ -572,7 +573,7 @@ public void testAutomaticClassificationForDengueFever() { // Probable caze = buildSuspectCase(Disease.DENGUE); ExposureDto exposure = ExposureDto.build(ExposureType.TRAVEL); - exposure.setRiskArea(YesNoUnknown.YES); + exposure.setRiskArea(YesNo.YES); caze.getEpiData().getExposures().add(exposure); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.PROBABLE, caze.getCaseClassification()); @@ -628,7 +629,7 @@ public void ruleOutFalsePositivesForDengueFever() { caze = buildSuspectCase(Disease.DENGUE); fillEpiData(caze.getEpiData()); ExposureDto exposure = ExposureDto.build(ExposureType.TRAVEL); - exposure.setRiskArea(YesNoUnknown.NO); + exposure.setRiskArea(YesNo.NO); caze.getEpiData().getExposures().add(exposure); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); @@ -654,40 +655,40 @@ public void testAutomaticClassificationForNewFlu() { // Suspect CaseDataDto caze = buildSuspectCaseBasis(Disease.NEW_INFLUENZA); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze.getSymptoms().setCough(SymptomState.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze = buildSuspectCaseBasis(Disease.NEW_INFLUENZA); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze.getSymptoms().setDifficultyBreathing(SymptomState.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze = buildSuspectCaseBasis(Disease.NEW_INFLUENZA); caze.getSymptoms().setCough(SymptomState.YES); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze = buildSuspectCaseBasis(Disease.NEW_INFLUENZA); caze.getSymptoms().setCough(SymptomState.YES); - caze.getEpiData().setAreaInfectedAnimals(YesNoUnknown.YES); + caze.getEpiData().setAreaInfectedAnimals(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze = buildSuspectCaseBasis(Disease.NEW_INFLUENZA); caze.getSymptoms().setCough(SymptomState.YES); ExposureDto exposure = ExposureDto.build(ExposureType.WORK); - exposure.setHandlingSamples(YesNoUnknown.YES); + exposure.setHandlingSamples(YesNo.YES); caze.getEpiData().getExposures().add(exposure); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); // Probable caze = buildProbableCaseBasis(Disease.NEW_INFLUENZA); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.PROBABLE, caze.getCaseClassification()); @@ -727,10 +728,10 @@ public void ruleOutFalsePositivesForNewFlu() { caze = getCaseFacade().save(caze); assertEquals(CaseClassification.NOT_CLASSIFIED, caze.getCaseClassification()); caze.getSymptoms().setCough(SymptomState.YES); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.NO); - caze.getEpiData().setAreaInfectedAnimals(YesNoUnknown.NO); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.NO); + caze.getEpiData().setAreaInfectedAnimals(YesNo.NO); ExposureDto exposure = ExposureDto.build(ExposureType.WORK); - exposure.setHandlingSamples(YesNoUnknown.NO); + exposure.setHandlingSamples(YesNo.NO); caze.getEpiData().getExposures().add(exposure); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.NOT_CLASSIFIED, caze.getCaseClassification()); @@ -742,7 +743,7 @@ public void ruleOutFalsePositivesForNewFlu() { assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); caze.setOutcome(CaseOutcome.NO_OUTCOME); fillEpiData(caze.getEpiData()); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.NO); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.NO); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); @@ -780,7 +781,7 @@ public void testAutomaticClassificationForMeasles() { // Probable caze = buildSuspectCase(Disease.MEASLES); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.PROBABLE, caze.getCaseClassification()); @@ -814,7 +815,7 @@ public void ruleOutFalsePositivesForMeasles() { // Probable caze = buildSuspectCase(Disease.MEASLES); fillEpiData(caze.getEpiData()); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.NO); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.NO); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); @@ -844,7 +845,7 @@ public void testAutomaticClassificationForCholera() { caze = buildSuspectCaseBasis(Disease.CHOLERA); caze.getSymptoms().setDiarrhea(SymptomState.YES); ExposureDto exposure = ExposureDto.build(ExposureType.TRAVEL); - exposure.setRiskArea(YesNoUnknown.YES); + exposure.setRiskArea(YesNo.YES); caze.getEpiData().getExposures().add(exposure); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); @@ -866,7 +867,7 @@ public void ruleOutFalsePositivesForCholera() { caze.getSymptoms().setDehydration(SymptomState.NO); caze.getSymptoms().setDiarrhea(SymptomState.NO); ExposureDto exposure = ExposureDto.build(ExposureType.TRAVEL); - exposure.setRiskArea(YesNoUnknown.NO); + exposure.setRiskArea(YesNo.NO); caze.getEpiData().getExposures().add(exposure); PersonDto casePerson = getPersonFacade().getPersonByUuid(caze.getPerson().getUuid()); casePerson.setApproximateAge(5); @@ -877,7 +878,7 @@ public void ruleOutFalsePositivesForCholera() { casePerson.setApproximateAge(0); getPersonFacade().savePerson(casePerson); caze.setOutcome(CaseOutcome.DECEASED); - caze.getEpiData().getExposures().get(0).setRiskArea(YesNoUnknown.YES); + caze.getEpiData().getExposures().get(0).setRiskArea(YesNo.YES); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.NOT_CLASSIFIED, caze.getCaseClassification()); caze.getSymptoms().setDiarrhea(SymptomState.YES); @@ -987,7 +988,7 @@ public void testAutomaticClassificationForPlague() { caze = buildSuspectCase(Disease.PLAGUE); ExposureDto exposure = ExposureDto.build(ExposureType.TRAVEL); - exposure.setRiskArea(YesNoUnknown.YES); + exposure.setRiskArea(YesNo.YES); caze.getEpiData().getExposures().add(exposure); caze = getCaseFacade().save(caze); caze = getCaseFacade().getCaseDataByUuid(caze.getUuid()); @@ -1035,7 +1036,7 @@ public void ruleOutFalsePositivesForPlague() { caze = buildSuspectCase(Disease.PLAGUE); fillEpiData(caze.getEpiData()); ExposureDto exposure = ExposureDto.build(ExposureType.TRAVEL); - exposure.setRiskArea(YesNoUnknown.NO); + exposure.setRiskArea(YesNo.NO); caze.getEpiData().getExposures().add(exposure); caze = getCaseFacade().save(caze); assertEquals(CaseClassification.SUSPECT, caze.getCaseClassification()); @@ -1076,7 +1077,7 @@ public void testFulfilledReferenceDefinitionGermanServerUnknownSymptoms1() { public void testFulfilledReferenceDefinitionGermanServerUnknownSymptoms2() { MockProducer.getProperties().setProperty(ConfigFacadeEjb.COUNTRY_LOCALE, "de"); CaseDataDto caze = buildSuspectCase(Disease.CORONAVIRUS); - caze.getSymptoms().setCough(SymptomState.UNKNOWN); + caze.getSymptoms().setCough(SymptomState.NO); caze.getSymptoms().setChillsSweats(SymptomState.YES); caze = getCaseFacade().save(caze); createSampleTestsForAllTestTypesExcept(caze, Disease.CORONAVIRUS, PathogenTestType.ISOLATION); @@ -1091,7 +1092,7 @@ public void testFulfilledReferenceDefinitionGermanServerUnknownSymptoms3() { CaseDataDto caze = buildSuspectCase(Disease.CORONAVIRUS); caze.getSymptoms().setCough(null); caze.getSymptoms().setChillsSweats(SymptomState.YES); - caze.getSymptoms().setOxygenSaturationLower94(SymptomState.UNKNOWN); + caze.getSymptoms().setOxygenSaturationLower94(SymptomState.NO); caze = getCaseFacade().save(caze); createSampleTestsForAllTestTypesExcept(caze, Disease.CORONAVIRUS, PathogenTestType.ISOLATION); caze = getCaseFacade().getCaseDataByUuid(caze.getUuid()); @@ -1175,7 +1176,7 @@ private void fillEpiData(EpiDataDto epiData) { for (Method method : methods) { if (method.getName().startsWith("set") && method.getParameterTypes()[0] == YesNoUnknown.class) { try { - method.invoke(epiData, YesNoUnknown.YES); + method.invoke(epiData, YesNo.YES); } catch (Exception e) { throw new RuntimeException(e); } @@ -1243,7 +1244,7 @@ private CaseDataDto buildSuspectCase(Disease disease) { break; case LASSA: caze.getSymptoms().setFever(SymptomState.YES); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); break; case YELLOW_FEVER: caze.getSymptoms().setJaundice(SymptomState.YES); @@ -1254,7 +1255,7 @@ private CaseDataDto buildSuspectCase(Disease disease) { break; case NEW_INFLUENZA: caze.getSymptoms().setCough(SymptomState.YES); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); break; case MEASLES: caze.getSymptoms().setCough(SymptomState.YES); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseFacadeEjbPseudonymizationTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseFacadeEjbPseudonymizationTest.java index 847cf100268..cba52f58dd3 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseFacadeEjbPseudonymizationTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseFacadeEjbPseudonymizationTest.java @@ -198,10 +198,10 @@ public void testPseudonymizeCaseExportData() { // create contact in current jurisdiction to have access on pseudonymized case creator.createContact(user2.toReference(), createPerson().toReference(), caze1); Date sampleDate = new Date(1591747200000L);//2020-06-10 - creator.createSample(caze1.toReference(), sampleDate, sampleDate, user1.toReference(), SampleMaterial.BLOOD, rdcf1.facility); + creator.createSample(caze1.toReference(), sampleDate, sampleDate, user1.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf1.facility); CaseDataDto caze2 = createCase(rdcf2, user2); - creator.createSample(caze2.toReference(), sampleDate, sampleDate, user2.toReference(), SampleMaterial.BLOOD, rdcf2.facility); + creator.createSample(caze2.toReference(), sampleDate, sampleDate, user2.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf2.facility); List exportList = getCaseFacade().getExportList(new CaseCriteria(), Collections.emptySet(), CaseExportType.CASE_SURVEILLANCE, 0, 100, null, Language.EN); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseFacadeEjbTest.java index c3a4bd9f540..436cd332b1d 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/caze/CaseFacadeEjbTest.java @@ -15,8 +15,6 @@ package de.symeda.sormas.backend.caze; -import static com.github.tomakehurst.wiremock.client.WireMock.exactly; -import static com.github.tomakehurst.wiremock.client.WireMock.postRequestedFor; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; @@ -60,8 +58,8 @@ import javax.validation.ValidatorFactory; import com.github.tomakehurst.wiremock.junit.WireMockRule; -import de.symeda.sormas.api.externalsurveillancetool.ExternalSurveillanceToolException; import de.symeda.sormas.api.externalsurveillancetool.ExternalSurveillanceToolFacade; +import de.symeda.sormas.api.utils.*; import de.symeda.sormas.backend.MockProducer; import org.apache.commons.lang3.time.DateUtils; import org.apache.http.HttpStatus; @@ -166,11 +164,6 @@ import de.symeda.sormas.api.user.DefaultUserRole; import de.symeda.sormas.api.user.UserDto; import de.symeda.sormas.api.user.UserReferenceDto; -import de.symeda.sormas.api.utils.DataHelper; -import de.symeda.sormas.api.utils.DateHelper; -import de.symeda.sormas.api.utils.OutdatedEntityException; -import de.symeda.sormas.api.utils.SortProperty; -import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.api.utils.criteria.ExternalShareDateType; import de.symeda.sormas.api.vaccination.VaccinationDto; import de.symeda.sormas.api.visit.VisitCriteria; @@ -242,11 +235,11 @@ public void testFilterByResponsibleRegionAndDistrictOfCase() { Disease.CORONAVIRUS, null); SampleDto contactSample = - creator.createSample(contact.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + creator.createSample(contact.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); ContactDto otherContact = creator.createContact(user.toReference(), creator.createPerson("John", "Doe").toReference(), new Date()); SampleDto otherContactSample = - creator.createSample(otherContact.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + creator.createSample(otherContact.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); otherContact.setResultingCase(caze.toReference()); getContactFacade().save(otherContact); @@ -911,7 +904,7 @@ public void testGetExportListWithRelevantVaccinations() { caze = getCaseFacade().save(caze); Calendar cal = Calendar.getInstance(); cal.add(Calendar.DATE, -1); - creator.createSample(caze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcfEntities.facility); + creator.createSample(caze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcfEntities.facility); creator.createSample(caze.toReference(), cal.getTime(), cal.getTime(), user.toReference(), SampleMaterial.CRUST, rdcfEntities.facility); creator.createPathogenTest(caze, PathogenTestType.ANTIGEN_DETECTION, PathogenTestResultType.POSITIVE); creator.createPrescription(caze); @@ -1155,7 +1148,7 @@ public void testGetExportListNoDuplicates() { new Date(), rdcf); - caze.getEpiData().setExposureDetailsKnown(YesNoUnknown.YES); + caze.getEpiData().setExposureDetailsKnown(YesNo.YES); { ExposureDto exposure = ExposureDto.build(ExposureType.TRAVEL); @@ -1275,9 +1268,9 @@ public void testCaseDeletion() throws ExternalSurveillanceToolRuntimeException { null, new Date(), user.toReference()); - SampleDto sample = creator.createSample(caze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + SampleDto sample = creator.createSample(caze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); SampleDto sampleAssociatedToContactAndCase = - creator.createSample(caze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + creator.createSample(caze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); ContactDto contact2 = creator.createContact(user.toReference(), user.toReference(), contactPerson.toReference(), caze, new Date(), new Date(), null); sampleAssociatedToContactAndCase.setAssociatedContact(new ContactReferenceDto(contact2.getUuid())); @@ -1733,8 +1726,8 @@ public void testMergeCase() throws IOException { c.setAdditionalDetails("Test additional details"); c.setFollowUpComment("Test followup comment"); }); - leadCase.setPregnant(YesNoUnknown.UNKNOWN); - leadCase.getEpiData().setActivityAsCaseDetailsKnown(YesNoUnknown.NO); + leadCase.setPregnant(YesNo.NO); + leadCase.getEpiData().setActivityAsCaseDetailsKnown(YesNo.NO); getCaseFacade().save(leadCase); VisitDto leadVisit = creator.createVisit(leadCase.getDisease(), leadCase.getPerson(), leadCase.getReportDate()); leadVisit.getSymptoms().setAnorexiaAppetiteLoss(SymptomState.YES); @@ -1783,7 +1776,7 @@ public void testMergeCase() throws IOException { PrescriptionDto prescription = creator.createPrescription(otherCase); ClinicalVisitDto visit = creator.createClinicalVisit(otherCase); - otherCase.getEpiData().setActivityAsCaseDetailsKnown(YesNoUnknown.YES); + otherCase.getEpiData().setActivityAsCaseDetailsKnown(YesNo.YES); final ArrayList otherActivitiesAsCase = new ArrayList<>(); ActivityAsCaseDto activityAsCaseDto = new ActivityAsCaseDto(); activityAsCaseDto.setActivityAsCaseType(ActivityAsCaseType.GATHERING); @@ -1961,7 +1954,7 @@ public void testCloneCaseActivityAsCaseIsCloned() { c.setFollowUpComment("Test other followup comment"); }); - aCase.getEpiData().setActivityAsCaseDetailsKnown(YesNoUnknown.YES); + aCase.getEpiData().setActivityAsCaseDetailsKnown(YesNo.YES); final ArrayList otherActivitiesAsCase = new ArrayList<>(); ActivityAsCaseDto activityAsCaseDto = new ActivityAsCaseDto(); activityAsCaseDto.setActivityAsCaseType(ActivityAsCaseType.GATHERING); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/contact/ContactFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/contact/ContactFacadeEjbTest.java index 32092bf5aa1..51f54d87f89 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/contact/ContactFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/contact/ContactFacadeEjbTest.java @@ -46,6 +46,7 @@ import de.symeda.sormas.api.common.DeletionDetails; import de.symeda.sormas.api.common.DeletionReason; import de.symeda.sormas.api.i18n.Strings; +import de.symeda.sormas.api.utils.*; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.DateUtils; import org.junit.Assert; @@ -58,7 +59,6 @@ import de.symeda.sormas.api.caze.CaseDataDto; import de.symeda.sormas.api.caze.CaseReferenceDto; import de.symeda.sormas.api.caze.InvestigationStatus; -import de.symeda.sormas.api.caze.VaccinationInfoSource; import de.symeda.sormas.api.caze.VaccinationStatus; import de.symeda.sormas.api.caze.Vaccine; import de.symeda.sormas.api.caze.VaccineManufacturer; @@ -89,7 +89,6 @@ import de.symeda.sormas.api.exposure.ExposureType; import de.symeda.sormas.api.followup.FollowUpLogic; import de.symeda.sormas.api.i18n.I18nProperties; -import de.symeda.sormas.api.i18n.Strings; import de.symeda.sormas.api.immunization.ImmunizationDto; import de.symeda.sormas.api.immunization.ImmunizationManagementStatus; import de.symeda.sormas.api.immunization.ImmunizationStatus; @@ -112,10 +111,6 @@ import de.symeda.sormas.api.user.DefaultUserRole; import de.symeda.sormas.api.user.UserDto; import de.symeda.sormas.api.user.UserReferenceDto; -import de.symeda.sormas.api.utils.DataHelper; -import de.symeda.sormas.api.utils.DateHelper; -import de.symeda.sormas.api.utils.SortProperty; -import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.api.vaccination.VaccinationDto; import de.symeda.sormas.api.visit.VisitCriteria; import de.symeda.sormas.api.visit.VisitDto; @@ -533,9 +528,9 @@ public void testContactDeletion() { new Date(), user.toReference()); SampleDto sample = - creator.createSample(contact.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + creator.createSample(contact.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); SampleDto sample2 = - creator.createSample(contact.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + creator.createSample(contact.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); sample2.setAssociatedCase(new CaseReferenceDto(caze.getUuid())); getSampleFacade().saveSample(sample2); @@ -1126,7 +1121,7 @@ public void testGetExportListWithRelevantVaccinations() { PersonDto contactPerson = getPersonFacade().getPersonByUuid(contact.getPerson().getUuid()); VisitDto visit = creator.createVisit(caze.getDisease(), contactPerson.toReference(), new Date(), VisitStatus.COOPERATIVE, VisitOrigin.USER); EpiDataDto epiData = contact.getEpiData(); - epiData.setExposureDetailsKnown(YesNoUnknown.YES); + epiData.setExposureDetailsKnown(YesNo.YES); List travels = new ArrayList<>(); ExposureDto exposure = ExposureDto.build(ExposureType.TRAVEL); exposure.getLocation().setDetails("Mallorca"); @@ -1270,7 +1265,7 @@ public void testGetExportListWithoutRelevantVaccinations() { PersonDto contactPerson = getPersonFacade().getPersonByUuid(contact.getPerson().getUuid()); VisitDto visit = creator.createVisit(caze.getDisease(), contactPerson.toReference(), new Date(), VisitStatus.COOPERATIVE, VisitOrigin.USER); EpiDataDto epiData = contact.getEpiData(); - epiData.setExposureDetailsKnown(YesNoUnknown.YES); + epiData.setExposureDetailsKnown(YesNo.YES); List travels = new ArrayList<>(); ExposureDto exposure = ExposureDto.build(ExposureType.TRAVEL); exposure.getLocation().setDetails("Mallorca"); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/epidata/EpiDataPseudonymizationTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/epidata/EpiDataPseudonymizationTest.java index 2724855c2e9..b5ed611b164 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/epidata/EpiDataPseudonymizationTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/epidata/EpiDataPseudonymizationTest.java @@ -21,6 +21,7 @@ import static org.hamcrest.Matchers.nullValue; import static org.mockito.Mockito.when; +import de.symeda.sormas.api.utils.YesNo; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.junit.MockitoJUnitRunner; @@ -151,7 +152,7 @@ private CaseDataDto createCaseWEpiData(UserDto user, TestDataCreator.RDCF rdcf) epiData.getExposures().add(exposure2); ExposureDto exposure3 = ExposureDto.build(ExposureType.TRAVEL); - exposure3.setBodyOfWater(YesNoUnknown.YES); + exposure3.setBodyOfWater(YesNo.YES); exposure3.setWaterSource(WaterSource.OTHER); exposure3.setWaterSourceDetails("Test water source details"); epiData.getExposures().add(exposure3); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/externalmessage/ExternalMessageServiceTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/externalmessage/ExternalMessageServiceTest.java index 27ea6696809..407343ea17f 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/externalmessage/ExternalMessageServiceTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/externalmessage/ExternalMessageServiceTest.java @@ -45,7 +45,7 @@ public void testGetForSample() throws InterruptedException { PersonDto person = creator.createPerson(); CaseDataDto caze = creator.createCase(user.toReference(), person.toReference(), rdcf); Date sampleDate = new Date(1624952153848L); - SampleDto sample1 = creator.createSample(caze.toReference(), sampleDate, sampleDate, user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + SampleDto sample1 = creator.createSample(caze.toReference(), sampleDate, sampleDate, user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); SampleReferenceDto sampleReference1 = sample1.toReference(); ExternalMessageDto labMessage1a = creator.createLabMessage(null); @@ -60,7 +60,7 @@ public void testGetForSample() throws InterruptedException { getLabMessageFacade().save(labMessage1Deleted); getLabMessageFacade().deleteExternalMessage(labMessage1Deleted.getUuid()); - SampleDto sample2 = creator.createSample(caze.toReference(), sampleDate, sampleDate, user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + SampleDto sample2 = creator.createSample(caze.toReference(), sampleDate, sampleDate, user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); SampleReferenceDto sampleReference2 = sample2.toReference(); ExternalMessageDto labMessage2 = creator.createLabMessage(null); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/infrastructure/facility/FacilityFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/infrastructure/facility/FacilityFacadeEjbTest.java index 972792648b8..7502284f833 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/infrastructure/facility/FacilityFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/infrastructure/facility/FacilityFacadeEjbTest.java @@ -11,12 +11,9 @@ import java.util.Date; import java.util.List; +import de.symeda.sormas.api.infrastructure.facility.*; import org.junit.Test; -import de.symeda.sormas.api.infrastructure.facility.FacilityCriteria; -import de.symeda.sormas.api.infrastructure.facility.FacilityDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityIndexDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityType; import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; import de.symeda.sormas.api.utils.SortProperty; diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/infrastructure/facility/FacilityServiceTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/infrastructure/facility/FacilityServiceTest.java index 77c4e7b1d0d..80df78f617c 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/infrastructure/facility/FacilityServiceTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/infrastructure/facility/FacilityServiceTest.java @@ -22,6 +22,7 @@ import static org.hamcrest.Matchers.hasSize; import static org.junit.Assert.assertNotNull; +import de.symeda.sormas.api.utils.AFPFacilityOptions; import org.junit.Test; import de.symeda.sormas.api.infrastructure.facility.FacilityDto; @@ -57,11 +58,11 @@ public void testGetHealthFacilitiesByName() { Community otherCommunity = creator.createCommunity("Other Community", otherDistrict); creator.createFacility("Facility", region, district, community); - assertThat(getFacilityService().getFacilitiesByNameAndType("Facility", district, community, null, true), hasSize(1)); - assertThat(getFacilityService().getFacilitiesByNameAndType(" Facility ", district, community, null, true), hasSize(1)); - assertThat(getFacilityService().getFacilitiesByNameAndType("facility", district, null, null, true), hasSize(1)); - assertThat(getFacilityService().getFacilitiesByNameAndType("FACILITY", district, null, null, true), hasSize(1)); - assertThat(getFacilityService().getFacilitiesByNameAndType("Facility", otherDistrict, otherCommunity, null, true), empty()); - assertThat(getFacilityService().getFacilitiesByNameAndType("Redcliffe Church", district, community, null, true), empty()); + assertThat(getFacilityService().getFacilitiesByNameAndType("Facility", district, community, null, null,AFPFacilityOptions.valueOf(""),true), hasSize(1)); + assertThat(getFacilityService().getFacilitiesByNameAndType(" Facility ", district, community, null, null,AFPFacilityOptions.valueOf(""),true), hasSize(1)); + assertThat(getFacilityService().getFacilitiesByNameAndType("facility", district, null, null,null,AFPFacilityOptions.valueOf("") ,true), hasSize(1)); + assertThat(getFacilityService().getFacilitiesByNameAndType("FACILITY", district, null, null,null,AFPFacilityOptions.valueOf("") ,true), hasSize(1)); + assertThat(getFacilityService().getFacilitiesByNameAndType("Facility", otherDistrict, otherCommunity, null,null,AFPFacilityOptions.valueOf(""),true), empty()); + assertThat(getFacilityService().getFacilitiesByNameAndType("Redcliffe Church", district, community, null,null,AFPFacilityOptions.valueOf("") ,true), empty()); } } diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/sample/PathogenTestFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/sample/PathogenTestFacadeEjbTest.java index b2b4bf713ef..413f77ee045 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/sample/PathogenTestFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/sample/PathogenTestFacadeEjbTest.java @@ -81,7 +81,7 @@ public void testSaveAndUpdatePathogenTestAssociatedToContact() { final CaseDataDto caze = creator.createCase(user.toReference(), person.toReference(), rdcf); final ContactDto contact = creator.createContact(user.toReference(), person.toReference(), caze); final SampleDto sample = - creator.createSample(contact.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + creator.createSample(contact.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); final PathogenTestDto newPathogenTest = creator.buildPathogenTestDto(rdcf, user, sample, contact.getDisease(), testDateTime); @@ -97,7 +97,7 @@ public void testSaveAndUpdatePathogenTestAssociatedToBothCaseAndContact() { final CaseDataDto caze = creator.createCase(user.toReference(), person.toReference(), rdcf); final ContactDto contact = creator.createContact(user.toReference(), person.toReference(), caze); final SampleDto sample = - creator.createSample(contact.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + creator.createSample(contact.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); final CaseDataDto caseDataDto = CaseDataDto.buildFromContact(contact); caseDataDto.setResponsibleRegion(new RegionReferenceDto(rdcf.region.getUuid(), null, null)); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/sample/SampleFacadeEjbPseudonymizationTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/sample/SampleFacadeEjbPseudonymizationTest.java index 1904b41126d..9a717621fbd 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/sample/SampleFacadeEjbPseudonymizationTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/sample/SampleFacadeEjbPseudonymizationTest.java @@ -437,7 +437,7 @@ private SampleDto createContactSample(ContactDto contactDto) { lab.setName("Lab"); getFacilityService().persist(lab); - return creator.createSample(contactDto.toReference(), new Date(), new Date(), user1.toReference(), SampleMaterial.BLOOD, lab); + return creator.createSample(contactDto.toReference(), new Date(), new Date(), user1.toReference(), SampleMaterial.WHOLE_BLOOD, lab); } private void assertNotPseudonymized(SampleDto sample, String reportingUserUuid) { diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/sample/SampleFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/sample/SampleFacadeEjbTest.java index 64b5f531576..fadf1d23983 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/sample/SampleFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/sample/SampleFacadeEjbTest.java @@ -196,14 +196,14 @@ public void testGetIndexListBySampleAssociationType() { DateHelper.subtractDays(new Date(), 4), new Date(), user.toReference(), - SampleMaterial.BLOOD, + SampleMaterial.WHOLE_BLOOD, rdcf.facility); SampleDto referredSample = creator.createSample( contact.toReference(), DateHelper.subtractDays(new Date(), 3), new Date(), user.toReference(), - SampleMaterial.BLOOD, + SampleMaterial.WHOLE_BLOOD, rdcf.facility); sample.setReferredTo(referredSample.toReference()); creator.createAdditionalTest(sample.toReference()); @@ -230,7 +230,7 @@ public void testGetIndexListBySampleAssociationType() { DateHelper.subtractDays(new Date(), 2), new Date(), user.toReference(), - SampleMaterial.BLOOD, + SampleMaterial.WHOLE_BLOOD, rdcf.facility); long count = getSampleFacade().count(new SampleCriteria()); @@ -303,14 +303,14 @@ public void testGetIndexListForCaseConvertedFromContact() { DateHelper.subtractDays(new Date(), 4), new Date(), user.toReference(), - SampleMaterial.BLOOD, + SampleMaterial.WHOLE_BLOOD, rdcf.facility); SampleDto referredSample = creator.createSample( contact.toReference(), DateHelper.subtractDays(new Date(), 3), new Date(), user.toReference(), - SampleMaterial.BLOOD, + SampleMaterial.WHOLE_BLOOD, rdcf.facility); sample.setReferredTo(referredSample.toReference()); creator.createAdditionalTest(sample.toReference()); @@ -370,7 +370,7 @@ public void testSampleDeletion() { InvestigationStatus.PENDING, new Date(), rdcf); - SampleDto sample = creator.createSample(caze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + SampleDto sample = creator.createSample(caze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); PathogenTestDto sampleTest = creator.createPathogenTest( sample.toReference(), PathogenTestType.MICROSCOPY, @@ -420,9 +420,9 @@ public void testAllSamplesDeletionWithOneAdditionalTest() { new Date(), rdcf); SampleDto firstSample = - creator.createSample(firstCaze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + creator.createSample(firstCaze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); SampleDto secondSample = - creator.createSample(firstCaze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + creator.createSample(firstCaze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); PathogenTestDto firstSamplePathogenTest = creator.createPathogenTest( firstSample.toReference(), PathogenTestType.MICROSCOPY, @@ -475,9 +475,9 @@ public void testAllSamplesDeletionWithMultipleAdditionalTest() { new Date(), rdcf); SampleDto thirdSample = - creator.createSample(secondCaze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + creator.createSample(secondCaze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); SampleDto forthSample = - creator.createSample(secondCaze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + creator.createSample(secondCaze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); PathogenTestDto secondSamplePathogenTest = creator.createPathogenTest( thirdSample.toReference(), PathogenTestType.RAPID_TEST, @@ -541,7 +541,7 @@ public void testArchivedSampleNotGettingTransfered() { InvestigationStatus.PENDING, new Date(), rdcf); - SampleDto sample = creator.createSample(caze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + SampleDto sample = creator.createSample(caze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); creator.createPathogenTest( sample.toReference(), PathogenTestType.MICROSCOPY, @@ -607,24 +607,24 @@ public void testGetSimilarSamples() { creator.createSample(caze.toReference(), officer.toReference(), rdcf.facility, (s) -> { s.setLabSampleID("case_sample_id"); s.setSampleDateTime(sampleDateTime1); - s.setSampleMaterial(SampleMaterial.BLOOD); + s.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); }); Date sampleDateTime2 = DateHelper.parseDate("08.02.2021", new SimpleDateFormat("dd.MM.yyyy")); creator.createSample(caze.toReference(), officer.toReference(), rdcf.facility, (s) -> { s.setLabSampleID("case_sample_id_2"); s.setSampleDateTime(sampleDateTime2); - s.setSampleMaterial(SampleMaterial.BLOOD); + s.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); }); ContactReferenceDto contact = creator.createContact(officer.toReference(), creator.createPerson().toReference()).toReference(); SampleDto contactSample = - creator.createSample(contact, sampleDateTime1, new Date(), officer.toReference(), SampleMaterial.BLOOD, rdcf.facility); + creator.createSample(contact, sampleDateTime1, new Date(), officer.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); EventParticipantDto eventParticipant = creator.createEventParticipant(creator.createEvent(officer.toReference()).toReference(), creator.createPerson(), officer.toReference()); SampleDto eventParticipantSample = creator - .createSample(eventParticipant.toReference(), sampleDateTime1, new Date(), officer.toReference(), SampleMaterial.BLOOD, rdcf.facility); + .createSample(eventParticipant.toReference(), sampleDateTime1, new Date(), officer.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); SampleSimilarityCriteria criteria = new SampleSimilarityCriteria(); criteria.sampleCriteria(new SampleCriteria().caze(caze.toReference())); @@ -638,7 +638,7 @@ public void testGetSimilarSamples() { similarSamples = getSampleFacade().getSimilarSamples(criteria); MatcherAssert.assertThat(similarSamples, hasSize(0)); - criteria.setSampleMaterial(SampleMaterial.BLOOD); + criteria.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); criteria.setSampleDateTime(DateHelper.addDays(sampleDateTime2, 1)); similarSamples = getSampleFacade().getSimilarSamples(criteria); @@ -659,7 +659,7 @@ public void testGetSimilarSamples() { // contact samples SampleSimilarityCriteria contactSampleCriteria = new SampleSimilarityCriteria().sampleCriteria(new SampleCriteria().contact(contact)); contactSampleCriteria.setSampleDateTime(sampleDateTime1); - contactSampleCriteria.setSampleMaterial(SampleMaterial.BLOOD); + contactSampleCriteria.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); List contactSimilarSamples = getSampleFacade().getSimilarSamples(contactSampleCriteria); MatcherAssert.assertThat(contactSimilarSamples, hasSize(1)); @@ -669,7 +669,7 @@ public void testGetSimilarSamples() { SampleSimilarityCriteria eventParticipantSampleCriteria = new SampleSimilarityCriteria().sampleCriteria(new SampleCriteria().eventParticipant(eventParticipant.toReference())); eventParticipantSampleCriteria.setSampleDateTime(sampleDateTime1); - eventParticipantSampleCriteria.setSampleMaterial(SampleMaterial.BLOOD); + eventParticipantSampleCriteria.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); List eventParticipantSimilarSamples = getSampleFacade().getSimilarSamples(eventParticipantSampleCriteria); MatcherAssert.assertThat(eventParticipantSimilarSamples, hasSize(1)); @@ -726,7 +726,7 @@ public void testSaveSampleWithUnexistingCase() { SampleDto cazeSample = SampleDto.build(user.toReference(), unexistingCase.toReference()); cazeSample.setSampleDateTime(new Date()); - cazeSample.setSampleMaterial(SampleMaterial.BLOOD); + cazeSample.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); cazeSample.setSamplePurpose(SamplePurpose.INTERNAL); try { @@ -748,7 +748,7 @@ public void testSaveSampleWithUnexistingContact() { SampleDto contactSample = SampleDto.build(user.toReference(), unexistingContact.toReference()); contactSample.setSampleDateTime(new Date()); - contactSample.setSampleMaterial(SampleMaterial.BLOOD); + contactSample.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); contactSample.setSamplePurpose(SamplePurpose.INTERNAL); try { @@ -773,7 +773,7 @@ public void testSaveSampleWithUnexistingEventParticipant() { SampleDto eventParticipantSample = SampleDto.build(user.toReference(), unexstingEventParticipant.toReference()); eventParticipantSample.setSampleDateTime(new Date()); - eventParticipantSample.setSampleMaterial(SampleMaterial.BLOOD); + eventParticipantSample.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); eventParticipantSample.setSamplePurpose(SamplePurpose.INTERNAL); try { @@ -794,7 +794,7 @@ public void testSaveSampleWithUnexistingLaboratory() { SampleDto cazeSample = SampleDto.build(user.toReference(), caze.toReference()); cazeSample.setSampleDateTime(new Date()); - cazeSample.setSampleMaterial(SampleMaterial.BLOOD); + cazeSample.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); cazeSample.setSamplePurpose(SamplePurpose.INTERNAL); FacilityDto unexistingLaboratory = FacilityDto.build(); @@ -818,7 +818,7 @@ public void testSaveSampleWithUnexistingReportingUser() { SampleDto sample = SampleDto.build(user.toReference(), caze.toReference()); sample.setSampleDateTime(new Date()); - sample.setSampleMaterial(SampleMaterial.BLOOD); + sample.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); sample.setSamplePurpose(SamplePurpose.INTERNAL); UserDto unexistingUser = UserDto.build(); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/sormastosormas/SormasToSormasTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/sormastosormas/SormasToSormasTest.java index ed517ee4c0b..2c270f8e26f 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/sormastosormas/SormasToSormasTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/sormastosormas/SormasToSormasTest.java @@ -144,7 +144,7 @@ protected SormasToSormasSampleDto createRemoteSampleDtoWithTests( sample.setLab(rdcf.facility); sample.setSampleDateTime(new Date()); - sample.setSampleMaterial(SampleMaterial.BLOOD); + sample.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); sample.setSampleSource(SampleSource.HUMAN); sample.setSamplePurpose(SamplePurpose.INTERNAL); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/sormastosormas/entities/SormasToSormasCaseFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/sormastosormas/entities/SormasToSormasCaseFacadeEjbTest.java index 17c889955c0..5a2f1552d0d 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/sormastosormas/entities/SormasToSormasCaseFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/sormastosormas/entities/SormasToSormasCaseFacadeEjbTest.java @@ -33,6 +33,7 @@ import javax.ws.rs.core.Response; +import de.symeda.sormas.api.utils.YesNo; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentMatchers; @@ -281,7 +282,7 @@ public void testSaveSharedCaseWithInfrastructureName() throws SormasToSormasExce person.setLastName("Smith"); CaseDataDto caze = createRemoteCaseDto(rdcf, person); - caze.getHospitalization().setAdmittedToHealthFacility(YesNoUnknown.YES); + caze.getHospitalization().setAdmittedToHealthFacility(YesNo.YES); caze.getSymptoms().setAgitation(SymptomState.YES); ExposureDto exposure = ExposureDto.build(ExposureType.ANIMAL_CONTACT); exposure.setAnimalContactType(AnimalContactType.TOUCH); @@ -328,7 +329,7 @@ public void testSaveSharedCaseWithInfrastructureExternalId() throws SormasToSorm person.setLastName("Smith"); CaseDataDto caze = createRemoteCaseDto(rdcf, person); - caze.getHospitalization().setAdmittedToHealthFacility(YesNoUnknown.YES); + caze.getHospitalization().setAdmittedToHealthFacility(YesNo.YES); caze.getSymptoms().setAgitation(SymptomState.YES); ExposureDto exposure = ExposureDto.build(ExposureType.ANIMAL_CONTACT); exposure.setAnimalContactType(AnimalContactType.TOUCH); @@ -1216,7 +1217,7 @@ private SampleDto createRemoteSample(CaseReferenceDto associatedCase, UserRefere SampleDto sample = SampleDto.build(reportingUser, associatedCase); sample.setSampleDateTime(new Date()); sample.setReportDateTime(new Date()); - sample.setSampleMaterial(SampleMaterial.BLOOD); + sample.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); sample.setSamplePurpose(SamplePurpose.EXTERNAL); sample.setLab(getFacilityFacade().getReferenceByUuid(lab.getUuid())); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/sormastosormas/entities/SormasToSormasContactFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/sormastosormas/entities/SormasToSormasContactFacadeEjbTest.java index c06cda8ebb6..8f0347f7ae5 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/sormastosormas/entities/SormasToSormasContactFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/sormastosormas/entities/SormasToSormasContactFacadeEjbTest.java @@ -21,7 +21,6 @@ import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.nullValue; import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.ArgumentMatchers.isNotNull; import java.util.Arrays; import java.util.Calendar; @@ -497,7 +496,7 @@ protected SampleDto createRemoteSample(ContactReferenceDto associatedContact, Us SampleDto sample = SampleDto.build(reportingUser, associatedContact); sample.setSampleDateTime(new Date()); sample.setReportDateTime(new Date()); - sample.setSampleMaterial(SampleMaterial.BLOOD); + sample.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); sample.setSamplePurpose(SamplePurpose.EXTERNAL); sample.setLab(getFacilityFacade().getReferenceByUuid(lab.getUuid())); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/sormastosormas/entities/SormasToSormasEventFacadeEjbTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/sormastosormas/entities/SormasToSormasEventFacadeEjbTest.java index c031a7dbf3d..abb17e62694 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/sormastosormas/entities/SormasToSormasEventFacadeEjbTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/sormastosormas/entities/SormasToSormasEventFacadeEjbTest.java @@ -183,7 +183,7 @@ public void testShareEventWithSamples() throws SormasToSormasException { null); SampleDto sample = - creator.createSample(eventParticipant.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility); + creator.createSample(eventParticipant.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility); creator.createPathogenTest( sample.toReference(), PathogenTestType.CULTURE, @@ -350,7 +350,7 @@ public void testSaveSharedEventsWithSamples() throws SormasToSormasException, So SampleDto savedSample = getSampleFacade().getSampleByUuid(sample.getUuid()); assertThat(savedSample, is(notNullValue())); assertThat(savedSample.getAssociatedEventParticipant(), is(eventParticipant.toReference())); - assertThat(savedSample.getSampleMaterial(), is(SampleMaterial.BLOOD)); + assertThat(savedSample.getSampleMaterial(), is(SampleMaterial.WHOLE_BLOOD)); assertThat(savedSample.getLab(), is(localLab.toReference())); assertThat(savedSample.getLabSampleID(), is("Test lab sample id")); @@ -781,7 +781,7 @@ private EventParticipantDto createEventParticipantDto(EventReferenceDto event, U private SampleDto createSample(EventParticipantReferenceDto eventParticipant, UserReferenceDto reportingUser, FacilityReferenceDto lab) { SampleDto sample = SampleDto.build(reportingUser, eventParticipant); - sample.setSampleMaterial(SampleMaterial.BLOOD); + sample.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); sample.setSamplePurpose(SamplePurpose.INTERNAL); sample.setLab(lab); sample.setSampleDateTime(new Date()); diff --git a/sormas-backend/src/test/java/de/symeda/sormas/backend/util/DtoHelperTest.java b/sormas-backend/src/test/java/de/symeda/sormas/backend/util/DtoHelperTest.java index 73cdc1a634b..12f20b2780f 100644 --- a/sormas-backend/src/test/java/de/symeda/sormas/backend/util/DtoHelperTest.java +++ b/sormas-backend/src/test/java/de/symeda/sormas/backend/util/DtoHelperTest.java @@ -85,14 +85,14 @@ public void testFillDto() { // lead and other have different values SymptomState abdominalPain = SymptomState.NO; targetSymptomsDto.setAbdominalPain(abdominalPain); - sourceSymptomsDto.setAbdominalPain(SymptomState.UNKNOWN); + sourceSymptomsDto.setAbdominalPain(SymptomState.NO); // lead has value, other has not SymptomState alteredConsciousness = SymptomState.YES; targetSymptomsDto.setAlteredConsciousness(alteredConsciousness); // lead has no value, other has - SymptomState anorexiaAppetiteLoss = SymptomState.UNKNOWN; + SymptomState anorexiaAppetiteLoss = SymptomState.NO; sourceSymptomsDto.setAnorexiaAppetiteLoss(anorexiaAppetiteLoss); targetDto.setSymptoms(targetSymptomsDto); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/ActivityAsCase/ActivityAsCaseForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/ActivityAsCase/ActivityAsCaseForm.java index 079b4d3813d..4513f8d1410 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/ActivityAsCase/ActivityAsCaseForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/ActivityAsCase/ActivityAsCaseForm.java @@ -184,7 +184,9 @@ private void addBasicFields() { || TypeOfPlace.COMMUNITY_FACILITY.equals(field.getValue()) || TypeOfPlace.FACILITY_36_IFSG.equals(field.getValue())) { ComboBox facilityType = locationForm.getFacilityType(); + ComboBox dhimsFacilityType = locationForm.getDhimsFacilityType(); facilityType.removeAllItems(); + dhimsFacilityType.removeAllItems(); List list; TypeOfPlace type = (TypeOfPlace) field.getValue(); if (TypeOfPlace.FACILITY_23_IFSG.equals(type)) { diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractCaseView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractCaseView.java index e5af39e5c38..7c0cf66a74c 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractCaseView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractCaseView.java @@ -46,6 +46,7 @@ import de.symeda.sormas.ui.epidata.CaseEpiDataView; import de.symeda.sormas.ui.externalmessage.ExternalMessagesView; import de.symeda.sormas.ui.hospitalization.HospitalizationView; +import de.symeda.sormas.ui.sixtydayfollowup.SixtyDayFollowupView; import de.symeda.sormas.ui.therapy.TherapyView; import de.symeda.sormas.ui.utils.AbstractDetailView; import de.symeda.sormas.ui.utils.CssStyles; @@ -168,6 +169,18 @@ public void refreshMenu(SubMenu menu, String params) { I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, CaseDataDto.HOSPITALIZATION), params); } + if (FacadeProvider.getFeatureConfigurationFacade().isFeatureEnabled(FeatureType.CASE_SURVEILANCE) + && !caze.checkIsUnreferredPortHealthCase() + && !UserProvider.getCurrent().isPortHealthUser()) { + if(caze.getDisease() == Disease.AFP){ + menu.addView( + SixtyDayFollowupView.VIEW_NAME, + I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, CaseDataDto.SIXTY_DAY), + params); + } + + } + if (caze.getCaseOrigin() == CaseOrigin.POINT_OF_ENTRY && caze.getPointOfEntry() != null && UserProvider.getCurrent().hasUserRight(UserRight.PORT_HEALTH_INFO_VIEW)) { @@ -187,7 +200,8 @@ public void refreshMenu(SubMenu menu, String params) { && UserProvider.getCurrent().hasUserRight(UserRight.THERAPY_VIEW) && !caze.checkIsUnreferredPortHealthCase() && !FacadeProvider.getFeatureConfigurationFacade().isFeatureDisabled(FeatureType.CLINICAL_MANAGEMENT)) { - menu.addView(TherapyView.VIEW_NAME, I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, CaseDataDto.THERAPY), params); + + //menu.addView(TherapyView.VIEW_NAME, I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, CaseDataDto.THERAPY), params); } } @@ -202,10 +216,10 @@ public void refreshMenu(SubMenu menu, String params) { && UserProvider.getCurrent().hasUserRight(UserRight.CLINICAL_COURSE_VIEW) && !caze.checkIsUnreferredPortHealthCase() && !FacadeProvider.getFeatureConfigurationFacade().isFeatureDisabled(FeatureType.CLINICAL_MANAGEMENT)) { - menu.addView( + /*menu.addView( ClinicalCourseView.VIEW_NAME, I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, CaseDataDto.CLINICAL_COURSE), - params); + params);*/ } } if (FacadeProvider.getDiseaseConfigurationFacade().hasFollowUp(caze.getDisease()) diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractTableField.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractTableField.java index 9e509ef2d6e..1aaef3361c8 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractTableField.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/AbstractTableField.java @@ -27,6 +27,7 @@ import java.util.Set; import java.util.function.Consumer; +import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.EntityDto; import de.symeda.sormas.api.utils.DataHelper; import org.apache.commons.lang3.ObjectUtils; @@ -98,6 +99,7 @@ public void setMaxTablePageLength(int maxTablePageLength) { private BeanItemContainer container; protected UiFieldAccessCheckers fieldAccessCheckers; + protected Disease disease; protected CaseDataForm caseDataForm; diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/BulkCaseDataForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/BulkCaseDataForm.java index 715feddc11c..63ca6a65b73 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/BulkCaseDataForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/BulkCaseDataForm.java @@ -53,10 +53,7 @@ import de.symeda.sormas.api.i18n.Strings; import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityType; -import de.symeda.sormas.api.infrastructure.facility.FacilityTypeGroup; +import de.symeda.sormas.api.infrastructure.facility.*; import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto; import de.symeda.sormas.api.user.UserReferenceDto; import de.symeda.sormas.api.user.UserRight; @@ -126,6 +123,7 @@ public class BulkCaseDataForm extends AbstractEditForm { private CheckBox shareWithReportingToolCheckbox; private ComboBox facilityTypeGroup; private ComboBox facilityType; + private ComboBox dhimsFacilityType; private TextField healthFacilityDetails; private Collection selectedCases; private OptionGroup facilityOrHome; @@ -253,6 +251,8 @@ protected void addFields() { facilityTypeGroup.setEnabled(false); facilityType = addField(CaseDataDto.FACILITY_TYPE, ComboBox.class); facilityType.setEnabled(false); + dhimsFacilityType = addField(CaseDataDto.DHIMS_FACILITY_TYPE, ComboBox.class); + dhimsFacilityType.setEnabled(false); ComboBox facility = addInfrastructureField(CaseBulkEditData.HEALTH_FACILITY); facility.setImmediate(true); facility.setEnabled(false); @@ -286,7 +286,7 @@ protected void addFields() { facility, communityDto != null ? FacadeProvider.getFacilityFacade() - .getActiveFacilitiesByCommunityAndType(communityDto, (FacilityType) facilityType.getValue(), true, false) + .getActiveFacilitiesByCommunityAndType(communityDto, (FacilityType) facilityType.getValue(),true, false) : district.getValue() != null ? FacadeProvider.getFacilityFacade() .getActiveFacilitiesByDistrictAndType( @@ -478,7 +478,7 @@ private void updateFacility(DistrictReferenceDto district, CommunityReferenceDto FieldHelper.updateItems( facility, FacadeProvider.getFacilityFacade() - .getActiveFacilitiesByCommunityAndType(community, (FacilityType) facilityType.getValue(), true, false)); + .getActiveFacilitiesByCommunityAndType(community, (FacilityType) facilityType.getValue(),true, false)); } else { FieldHelper.updateItems( facility, diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseController.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseController.java index 6a6a15eab92..ff73bc617d8 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseController.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseController.java @@ -26,6 +26,9 @@ import java.util.function.Consumer; import java.util.stream.Collectors; +import de.symeda.sormas.api.utils.*; +import de.symeda.sormas.ui.sixtydayfollowup.SixtyDayFollowupView; +import de.symeda.sormas.ui.sixtydayfollowup.SixtyDayForm; import org.apache.commons.collections.CollectionUtils; import com.vaadin.navigator.Navigator; @@ -102,11 +105,6 @@ import de.symeda.sormas.api.user.UserDto; import de.symeda.sormas.api.user.UserReferenceDto; import de.symeda.sormas.api.user.UserRight; -import de.symeda.sormas.api.utils.DataHelper; -import de.symeda.sormas.api.utils.DateHelper; -import de.symeda.sormas.api.utils.HtmlHelper; -import de.symeda.sormas.api.utils.ValidationRuntimeException; -import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers; import de.symeda.sormas.api.visit.VisitDto; import de.symeda.sormas.ui.ControllerProvider; @@ -169,6 +167,9 @@ public void registerViews(Navigator navigator) { } navigator.addView(HospitalizationView.VIEW_NAME, HospitalizationView.class); navigator.addView(CaseEpiDataView.VIEW_NAME, CaseEpiDataView.class); + + navigator.addView(SixtyDayFollowupView.VIEW_NAME, SixtyDayFollowupView.class); + if (userProvider.hasUserRight(UserRight.THERAPY_VIEW)) { navigator.addView(TherapyView.VIEW_NAME, TherapyView.class); } @@ -272,7 +273,7 @@ public void createFromContact(ContactDto contact) { VaadinUiUtil.showModalPopupWindow(caseCreateComponent, I18nProperties.getString(Strings.headingCreateNewCase)); } else { CaseDataDto selectedCase = FacadeProvider.getCaseFacade().getCaseDataByUuid(uuid); - selectedCase.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + selectedCase.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); FacadeProvider.getCaseFacade().save(selectedCase); ContactDto updatedContact = FacadeProvider.getContactFacade().getByUuid(contact.getUuid()); @@ -363,7 +364,7 @@ public void convertSamePersonContactsAndEventParticipants(CaseDataDto caze, Runn convertToCaseConfirmComponent.addCommitListener(() -> { CaseDataDto refreshedCaze = FacadeProvider.getCaseFacade().getCaseDataByUuid(caze.getUuid()); - refreshedCaze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + refreshedCaze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); saveCase(refreshedCaze); setResultingCase(refreshedCaze, matchingContacts, matchingEventParticipants); SormasUI.refreshView(); @@ -415,7 +416,7 @@ private void showConvertToCaseSelection( List selectedContacts = convertToCaseSelectionField.getSelectedContacts(); if (!selectedContacts.isEmpty()) { CaseDataDto refreshedCaze = FacadeProvider.getCaseFacade().getCaseDataByUuid(caze.getUuid()); - refreshedCaze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + refreshedCaze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); saveCase(refreshedCaze); } @@ -614,7 +615,7 @@ public CommitDiscardWrapperComponent getCaseCreateComponent( person = FacadeProvider.getPersonFacade().getPersonByUuid(convertedContact.getPerson().getUuid()); if (unrelatedDisease == null) { caze = CaseDataDto.buildFromContact(convertedContact); - caze.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caze.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); } else { caze = CaseDataDto.buildFromUnrelatedContact(convertedContact, unrelatedDisease); } @@ -682,6 +683,10 @@ public CommitDiscardWrapperComponent getCaseCreateComponent( dto.setFacilityType(null); } + if (dto.getDhimsFacilityType() == null || FacilityDto.NONE_FACILITY_UUID.equals(dto.getDhimsFacilityType().getUuid())) { + dto.setDhimsFacilityType(null); + } + if (convertedContact != null) { int incubationPeriod = FacadeProvider.getDiseaseConfigurationFacade().getCaseFollowUpDuration(dto.getDisease()); List visits = FacadeProvider.getVisitFacade() @@ -1223,12 +1228,12 @@ public CommitDiscardWrapperComponent getHospitalizationComp editView.setPreCommitListener(successCallback -> { final CaseDataDto cazeDto = FacadeProvider.getCaseFacade().getCaseDataByUuid(caseUuid); - final YesNoUnknown initialAdmittedToHealthFacility = cazeDto.getHospitalization().getAdmittedToHealthFacility(); - final YesNoUnknown admittedToHealthFacility = - (YesNoUnknown) ((NullableOptionGroup) hospitalizationForm.getField(HospitalizationDto.ADMITTED_TO_HEALTH_FACILITY)) + final YesNo initialAdmittedToHealthFacility = cazeDto.getHospitalization().getAdmittedToHealthFacility(); + final YesNo admittedToHealthFacility = + (YesNo) ((NullableOptionGroup) hospitalizationForm.getField(HospitalizationDto.ADMITTED_TO_HEALTH_FACILITY)) .getNullableValue(); - if (YesNoUnknown.YES == admittedToHealthFacility + if (YesNo.YES == admittedToHealthFacility && initialAdmittedToHealthFacility != admittedToHealthFacility && cazeDto.getFacilityType() != FacilityType.HOSPITAL) { @@ -1278,6 +1283,41 @@ public CommitDiscardWrapperComponent getHospitalizationComp return editView; } + public CommitDiscardWrapperComponent getSixtyDayComponent(final String caseUuid, ViewMode viewMode) { + + CaseDataDto caze = findCase(caseUuid); + SixtyDayForm sixtyDayForm = new SixtyDayForm(caze, viewMode, caze.isPseudonymized()); + sixtyDayForm.setValue(caze.getSixtyDay()); + + final CommitDiscardWrapperComponent editView = new CommitDiscardWrapperComponent( + sixtyDayForm, + UserProvider.getCurrent().hasUserRight(UserRight.CASE_EDIT), + sixtyDayForm.getFieldGroup()); + + final JurisdictionValues jurisdictionValues = new JurisdictionValues(); + + editView.setPreCommitListener(successCallback -> { + final CaseDataDto cazeDto = FacadeProvider.getCaseFacade().getCaseDataByUuid(caseUuid); + }); + + editView.addCommitListener(() -> { + final CaseDataDto cazeDto = findCase(caseUuid); + + if (jurisdictionValues.valuesUpdated) { + cazeDto.setRegion(jurisdictionValues.region); + cazeDto.setDistrict(jurisdictionValues.district); + cazeDto.setCommunity(jurisdictionValues.community); + cazeDto.setFacilityType(jurisdictionValues.facilityType); + cazeDto.setHealthFacility(jurisdictionValues.facility); + cazeDto.setHealthFacilityDetails(jurisdictionValues.facilityDetails); + } + cazeDto.setSixtyDay(sixtyDayForm.getValue()); + saveCase(cazeDto); + }); + + return editView; + } + public CommitDiscardWrapperComponent getMaternalHistoryComponent(final String caseUuid, ViewMode viewMode) { CaseDataDto caze = findCase(caseUuid); @@ -1431,13 +1471,13 @@ public void saveCaseWithFacilityChangedPrompt(CaseDataDto caze, CaseDataDto oldC currentHospitalizationForm.getField(HospitalizationDto.ADMITTED_TO_HEALTH_FACILITY); switch (option) { case OPTION1: { - caze.getHospitalization().setAdmittedToHealthFacility((YesNoUnknown) admittedToHealthFacilityField.getNullableValue()); + caze.getHospitalization().setAdmittedToHealthFacility((YesNo) admittedToHealthFacilityField.getNullableValue()); saveCase(caze); ControllerProvider.getCaseController().navigateToView(HospitalizationView.VIEW_NAME, caze.getUuid(), null); } break; case OPTION2: { - caze.getHospitalization().setAdmittedToHealthFacility((YesNoUnknown) admittedToHealthFacilityField.getNullableValue()); + caze.getHospitalization().setAdmittedToHealthFacility((YesNo) admittedToHealthFacilityField.getNullableValue()); saveCase(caze); ControllerProvider.getCaseController().navigateToView(CaseDataView.VIEW_NAME, caze.getUuid(), null); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java index 7b68d5d4471..7abbb18710f 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseCreateForm.java @@ -31,6 +31,9 @@ import java.util.Date; import java.util.List; +import de.symeda.sormas.api.infrastructure.facility.*; +import de.symeda.sormas.api.utils.AFPFacilityOptions; +import de.symeda.sormas.api.utils.TypeOfAbode; import org.apache.commons.collections.CollectionUtils; import com.google.common.collect.Sets; @@ -56,10 +59,6 @@ import de.symeda.sormas.api.i18n.Strings; import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityType; -import de.symeda.sormas.api.infrastructure.facility.FacilityTypeGroup; import de.symeda.sormas.api.infrastructure.pointofentry.PointOfEntryReferenceDto; import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto; import de.symeda.sormas.api.person.PersonDto; @@ -82,6 +81,7 @@ private static final long serialVersionUID = 1L; private static final String FACILITY_OR_HOME_LOC = "facilityOrHomeLoc"; + private static final String DHIMSFACILITY_OR_HOME_LOC = "dhimsFacilityOrHomeLoc"; private static final String FACILITY_TYPE_GROUP_LOC = "typeGroupLoc"; private static final String DONT_SHARE_WARNING_LOC = "dontShareWithReportingToolWarnLoc"; private static final String RESPONSIBLE_JURISDICTION_HEADING_LOC = "responsibleJurisdictionHeadingLoc"; @@ -94,8 +94,10 @@ private ComboBox diseaseVariantField; private TextField diseaseVariantDetailsField; private NullableOptionGroup facilityOrHome; + private NullableOptionGroup dhimsFacilityOrHome; private ComboBox facilityTypeGroup; private ComboBox facilityType; + private ComboBox dhimsFacilityType; private ComboBox responsibleDistrictCombo; private ComboBox responsibleCommunityCombo; private CheckBox differentPlaceOfStayJurisdiction; @@ -104,6 +106,8 @@ private ComboBox communityCombo; private ComboBox facilityCombo; private ComboBox pointOfEntryDistrictCombo; + private DateField investigated; + private TextField hospitalName; private PersonCreateForm personCreateForm; @@ -121,10 +125,11 @@ fluidColumn(6, 0, locs(CaseDataDto.DISEASE_DETAILS, CaseDataDto.PLAGUE_TYPE, CaseDataDto.DENGUE_FEVER_TYPE, CaseDataDto.RABIES_TYPE))) - + fluidRowLocs(6, CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION) + + + fluidRowLocs(CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION) + fluidRowLocs(4, CaseDataDto.CASE_ORIGIN) // private static final String HTML_LAYOUT = fluidRowLocs(CaseDataDto.CASE_ORIGIN, "") - + fluidRowLocs(CaseDataDto.REPORT_DATE, CaseDataDto.EPID_NUMBER, CaseDataDto.EXTERNAL_ID) + + fluidRowLocs(CaseDataDto.REPORT_DATE, CaseDataDto.EPID_NUMBER, CaseDataDto.INVESTIGATED_DATE) + + fluidRowLocs(6,CaseDataDto.EXTERNAL_ID) + fluidRowLocs(CaseDataDto.DISEASE_VARIANT, CaseDataDto.DISEASE_VARIANT_DETAILS) + fluidRowLocs(RESPONSIBLE_JURISDICTION_HEADING_LOC) + fluidRowLocs(CaseDataDto.RESPONSIBLE_REGION, CaseDataDto.RESPONSIBLE_DISTRICT, CaseDataDto.RESPONSIBLE_COMMUNITY) @@ -133,10 +138,13 @@ + fluidRowLocs(DIFFERENT_PLACE_OF_STAY_JURISDICTION) + fluidRowLocs(PLACE_OF_STAY_HEADING_LOC) + fluidRowLocs(FACILITY_OR_HOME_LOC) + + fluidRowLocs(DHIMSFACILITY_OR_HOME_LOC) + fluidRowLocs(CaseDataDto.REGION, CaseDataDto.DISTRICT, CaseDataDto.COMMUNITY) + fluidRowLocs(FACILITY_TYPE_GROUP_LOC, CaseDataDto.FACILITY_TYPE) + fluidRowLocs(CaseDataDto.HEALTH_FACILITY, CaseDataDto.HEALTH_FACILITY_DETAILS) - + fluidRowLocs(CaseDataDto.AFP_FACILITY_OPTIONS) + + fluidRowLocs(6, CaseDataDto.HOME_ADDRESS_RECREATIONAL) + + fluidRowLocs(6,CaseDataDto.AFP_FACILITY_OPTIONS) + + fluidRowLocs(CaseDataDto.DHIMS_FACILITY_TYPE, CaseDataDto.HOSPITAL_NAME) + fluidRowLocs(DIFFERENT_POINT_OF_ENTRY_JURISDICTION) + fluidRowLocs(POINT_OF_ENTRY_REGION, POINT_OF_ENTRY_DISTRICT) + fluidRowLocs(CaseDataDto.POINT_OF_ENTRY, CaseDataDto.POINT_OF_ENTRY_DETAILS) @@ -184,7 +192,7 @@ protected void addFields() { CaseFormHelper.addDontShareWithReportingTool(getContent(), () -> dontShareCheckbox, DONT_SHARE_WARNING_LOC); } - addField(CaseDataDto.REPORT_DATE, DateField.class); + DateField reportDate = addField(CaseDataDto.REPORT_DATE, DateField.class); ComboBox diseaseField = addDiseaseField(CaseDataDto.DISEASE, false, true); diseaseVariantField = addField(CaseDataDto.DISEASE_VARIANT, ComboBox.class); diseaseVariantDetailsField = addField(CaseDataDto.DISEASE_VARIANT_DETAILS, TextField.class); @@ -195,8 +203,11 @@ protected void addFields() { NullableOptionGroup plagueType = addField(CaseDataDto.PLAGUE_TYPE, NullableOptionGroup.class); addField(CaseDataDto.DENGUE_FEVER_TYPE, NullableOptionGroup.class); addField(CaseDataDto.RABIES_TYPE, NullableOptionGroup.class); + TextField homeaddrecreational = addField(CaseDataDto.HOME_ADDRESS_RECREATIONAL, TextField.class); + homeaddrecreational.setVisible(false); - personCreateForm = new PersonCreateForm(showHomeAddressForm, true, true, showPersonSearchButton); +// personCreateForm = new PersonCreateForm(showHomeAddressForm, true, true, showPersonSearchButton); + personCreateForm = new PersonCreateForm(false, true,true, false); personCreateForm.setWidth(100, Unit.PERCENTAGE); getContent().addComponent(personCreateForm, CaseDataDto.PERSON); @@ -207,9 +218,13 @@ protected void addFields() { placeOfStayHeadingLabel.addStyleName(H3); getContent().addComponent(placeOfStayHeadingLabel, PLACE_OF_STAY_HEADING_LOC); + //Place of Stay differs ComboBox region = addInfrastructureField(CaseDataDto.REGION); + region.setCaption("Resident Region"); districtCombo = addInfrastructureField(CaseDataDto.DISTRICT); + districtCombo.setCaption("Resident District"); communityCombo = addInfrastructureField(CaseDataDto.COMMUNITY); + communityCombo.setCaption("Resident Sub-district"); communityCombo.setNullSelectionAllowed(true); // jurisdictionfields @@ -274,6 +289,7 @@ protected void addFields() { facilityOrHome = addCustomField(FACILITY_OR_HOME_LOC, TypeOfPlace.class, NullableOptionGroup.class, I18nProperties.getCaption(Captions.casePlaceOfStay)); facilityOrHome.removeAllItems(); + facilityOrHome.setVisible(false); for (TypeOfPlace place : TypeOfPlace.FOR_CASES) { facilityOrHome.addItem(place); facilityOrHome.setItemCaption(place, I18nProperties.getEnumCaption(place)); @@ -295,7 +311,8 @@ protected void addFields() { getContent().addComponent(facilityType, CaseDataDto.FACILITY_TYPE); facilityCombo = addInfrastructureField(CaseDataDto.HEALTH_FACILITY); facilityCombo.setImmediate(true); - NullableOptionGroup afpFacilityOptions = addField(CaseDataDto.AFP_FACILITY_OPTIONS, NullableOptionGroup.class); + ComboBox afpFacilityOptions = addField(CaseDataDto.AFP_FACILITY_OPTIONS, ComboBox.class); + afpFacilityOptions.setVisible(false); TextField facilityDetails = addField(CaseDataDto.HEALTH_FACILITY_DETAILS, TextField.class); facilityDetails.setVisible(false); ComboBox cbPointOfEntry = addInfrastructureField(CaseDataDto.POINT_OF_ENTRY); @@ -303,6 +320,39 @@ protected void addFields() { TextField tfPointOfEntryDetails = addField(CaseDataDto.POINT_OF_ENTRY_DETAILS, TextField.class); tfPointOfEntryDetails.setVisible(false); + dhimsFacilityOrHome = + addCustomField(DHIMSFACILITY_OR_HOME_LOC, TypeOfAbode.class, NullableOptionGroup.class, I18nProperties.getCaption(Captions.casePlaceOfStay)); + dhimsFacilityOrHome.setVisible(false); + dhimsFacilityOrHome.removeAllItems(); + + for(TypeOfAbode place : TypeOfAbode.FOR_DHIMS_CASES){ + dhimsFacilityOrHome.addItem(place); + dhimsFacilityOrHome.setItemCaption(place, I18nProperties.getEnumCaption(place)); + } + dhimsFacilityOrHome.setItemCaptionMode(ItemCaptionMode.EXPLICIT); + dhimsFacilityOrHome.setId("dhimsFacilityOrHome"); + dhimsFacilityOrHome.setWidth(100, Unit.PERCENTAGE); + CssStyles.style(dhimsFacilityOrHome, ValoTheme.OPTIONGROUP_HORIZONTAL); + dhimsFacilityOrHome.setVisible(false); + + dhimsFacilityType = ComboBoxHelper.createComboBoxV7(); + dhimsFacilityType.setVisible(false); + for(DhimsFacility dhimsFacility : DhimsFacility.values()){ + dhimsFacilityType.addItem(dhimsFacility); + } + + dhimsFacilityType.setId("dhimsType"); + dhimsFacilityType.setCaption("Facility Type"); + dhimsFacilityType.setCaption(I18nProperties.getCaption(Captions.dhimsFacilityType)); + dhimsFacilityType.setCaption(I18nProperties.getCaption(Captions.dhimsFacilityType)); + dhimsFacilityType.setWidth(100, Unit.PERCENTAGE); + + getContent().addComponent(dhimsFacilityType, CaseDataDto.DHIMS_FACILITY_TYPE); + + hospitalName = addField(CaseDataDto.HOSPITAL_NAME, TextField.class); + hospitalName.setVisible(false); + hospitalName.setCaption("Please enter hospital name"); + if (convertedTravelEntry != null) { differentPointOfEntryJurisdiction.setValue(true); RegionReferenceDto regionReferenceDto = convertedTravelEntry.getPointOfEntryRegion() != null @@ -340,9 +390,7 @@ protected void addFields() { updatePOEs(); } }); - communityCombo.addValueChangeListener(e -> { - updateFacility(); - }); + communityCombo.addValueChangeListener(e -> updateFacility()); facilityOrHome.addValueChangeListener(e -> { FieldHelper.removeItems(facilityCombo); @@ -359,9 +407,6 @@ protected void addFields() { updateFacility(); } - if (CaseOrigin.IN_COUNTRY.equals(ogCaseOrigin.getValue())) { - facilityCombo.setRequired(true); - } updateFacilityFields(facilityCombo, facilityDetails); } else if (TypeOfPlace.HOME.equals(facilityOrHome.getValue()) || ((facilityOrHome.getValue() instanceof java.util.Set) && TypeOfPlace.HOME.equals(facilityOrHome.getNullableValue()))) { @@ -379,9 +424,45 @@ protected void addFields() { facilityType.addValueChangeListener(e -> updateFacility()); region.addItems(FacadeProvider.getRegionFacade().getAllActiveByServerCountry()); + afpFacilityOptions.addValueChangeListener(e -> { + if(AFPFacilityOptions.Hospital.equals(afpFacilityOptions.getValue())){ + hospitalName.setVisible(true); + } else { + hospitalName.setVisible(false); + hospitalName.clear(); + } + }); + + dhimsFacilityOrHome.addValueChangeListener(e -> { + if (TypeOfAbode.DHIMS_FACILITY.equals(dhimsFacilityOrHome.getValue()) + || ((dhimsFacilityOrHome.getValue() instanceof java.util.Set) && TypeOfAbode.DHIMS_FACILITY.equals(dhimsFacilityOrHome.getNullableValue()))) { + + if (dhimsFacilityType.getValue() == null) { + dhimsFacilityType.setValue(DhimsFacility.CHPS_COMPOUND); + } + + dhimsFacilityType.addValueChangeListener(event -> { + if (DhimsFacility.HOSPITAL.equals(dhimsFacilityType.getValue())) { + hospitalName.setVisible(true); + } else { + hospitalName.setVisible(false); + hospitalName.clear(); + } + }); + + + } else if (TypeOfAbode.HOME.equals(dhimsFacilityOrHome.getValue()) + || ((dhimsFacilityOrHome.getValue() instanceof java.util.Set) && TypeOfAbode.HOME.equals(dhimsFacilityOrHome.getNullableValue()))) { + setNoneFacility(); + dhimsFacilityType.clear(); + } + }); + + region.addItems(FacadeProvider.getRegionFacade().getAllActiveByServerCountry()); + OptionGroup caseTransmissionClassification = addField(CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION, OptionGroup.class); - caseTransmissionClassification.setRequired(false); - caseTransmissionClassification.setVisible(true); + //caseTransmissionClassification.setRequired(false); + caseTransmissionClassification.setVisible(false); // if (userJurisdictionLevel == JurisdictionLevel.COMMUNITY) { // region.setReadOnly(true); // district.setReadOnly(true); @@ -401,6 +482,7 @@ protected void addFields() { facilityOrHome.setImmediate(true); facilityOrHome.setValue(Sets.newHashSet(TypeOfPlace.FACILITY)); // [FACILITY] facilityOrHome.setReadOnly(true); + facilityTypeGroup.setValue(FacilityTypeGroup.MEDICAL_FACILITY); facilityTypeGroup.setReadOnly(true); facilityType.setValue(FacilityType.HOSPITAL); @@ -414,7 +496,6 @@ protected void addFields() { if (ev.getProperty().getValue() == CaseOrigin.IN_COUNTRY) { setVisible(false, CaseDataDto.POINT_OF_ENTRY, CaseDataDto.POINT_OF_ENTRY_DETAILS); differentPointOfEntryJurisdiction.setVisible(false); - setRequired(true, FACILITY_OR_HOME_LOC, FACILITY_TYPE_GROUP_LOC, CaseDataDto.FACILITY_TYPE, CaseDataDto.HEALTH_FACILITY); setRequired(false, CaseDataDto.POINT_OF_ENTRY); updateFacilityFields(facilityCombo, facilityDetails); } else { @@ -423,13 +504,15 @@ protected void addFields() { setRequired(true, CaseDataDto.POINT_OF_ENTRY); if (userJurisdictionLevel != JurisdictionLevel.HEALTH_FACILITY) { facilityOrHome.clear(); - setRequired(false, FACILITY_OR_HOME_LOC, FACILITY_TYPE_GROUP_LOC, CaseDataDto.FACILITY_TYPE, CaseDataDto.HEALTH_FACILITY); + //setRequired(false, FACILITY_OR_HOME_LOC, FACILITY_TYPE_GROUP_LOC, CaseDataDto.FACILITY_TYPE, CaseDataDto.HEALTH_FACILITY); + setRequired(false, DHIMSFACILITY_OR_HOME_LOC, CaseDataDto.DHIMS_FACILITY_TYPE); } updatePointOfEntryFields(cbPointOfEntry, tfPointOfEntryDetails); } }); - setRequired(true, FACILITY_OR_HOME_LOC); + //setRequired(true, FACILITY_OR_HOME_LOC); +// setRequired(true, DHIMSFACILITY_OR_HOME_LOC); } // jurisdiction field valuechangelisteners @@ -459,17 +542,18 @@ protected void addFields() { // Set initial visibilities & accesses initializeVisibilitiesAndAllowedVisibilities(); - setRequired(true, CaseDataDto.REPORT_DATE, CaseDataDto.DISEASE, FACILITY_TYPE_GROUP_LOC, CaseDataDto.FACILITY_TYPE); +// setRequired(true, CaseDataDto.REPORT_DATE, CaseDataDto.DISEASE, FACILITY_TYPE_GROUP_LOC, CaseDataDto.FACILITY_TYPE); + setRequired(true, CaseDataDto.REPORT_DATE, CaseDataDto.DISEASE); FieldHelper.addSoftRequiredStyle(plagueType, communityCombo, facilityDetails); FieldHelper .setVisibleWhen(getFieldGroup(), Arrays.asList(CaseDataDto.DISEASE_DETAILS), CaseDataDto.DISEASE, Arrays.asList(Disease.OTHER), true); FieldHelper.setRequiredWhen(getFieldGroup(), CaseDataDto.DISEASE, Arrays.asList(CaseDataDto.DISEASE_DETAILS), Arrays.asList(Disease.OTHER)); - FieldHelper.setRequiredWhen( + /*FieldHelper.setRequiredWhen( getFieldGroup(), CaseDataDto.CASE_ORIGIN, Arrays.asList(CaseDataDto.HEALTH_FACILITY), - Arrays.asList(CaseOrigin.IN_COUNTRY)); + Arrays.asList(CaseOrigin.IN_COUNTRY));*/ FieldHelper.setRequiredWhen( getFieldGroup(), CaseDataDto.CASE_ORIGIN, @@ -484,18 +568,22 @@ protected void addFields() { Arrays.asList(facilityTypeGroup, facilityType, facilityCombo), Collections.singletonList(TypeOfPlace.FACILITY), false); - FieldHelper.setRequiredWhen( + /*FieldHelper.setRequiredWhen( facilityOrHome, Arrays.asList(facilityTypeGroup, facilityType, facilityCombo), Collections.singletonList(TypeOfPlace.FACILITY), false, - null); + null);*/ facilityCombo.addValueChangeListener(e -> { updateFacilityFields(facilityCombo, facilityDetails); this.getValue().setFacilityType((FacilityType) facilityType.getValue()); }); + dhimsFacilityType.addValueChangeListener(e -> { + this.getValue().setDhimsFacilityType((DhimsFacility) dhimsFacilityType.getValue()); + }); + cbPointOfEntry.addValueChangeListener(e -> { updatePointOfEntryFields(cbPointOfEntry, tfPointOfEntryDetails); }); @@ -508,24 +596,55 @@ protected void addFields() { }); diseaseField.addValueChangeListener((ValueChangeListener) valueChangeEvent -> { Disease disease = (Disease) valueChangeEvent.getProperty().getValue(); + updateDiseaseVariant(disease); + if (investigated == null) { + investigated = addField(CaseDataDto.INVESTIGATED_DATE, DateField.class); + } + investigated.setVisible(false); - caseTransmissionClassification.setVisible(disease != Disease.YELLOW_FEVER && disease != Disease.CSM && disease != Disease.AHF); + //caseTransmissionClassification.setVisible(disease != Disease.YELLOW_FEVER && disease != Disease.CSM && disease != Disease.AHF); ogCaseOrigin.setVisible(disease != Disease.CSM); - facilityOrHome.setVisible(disease != Disease.AFP); if(disease == Disease.AFP){ - setRequired(false,FACILITY_OR_HOME_LOC); - setRequired(false,FACILITY_TYPE_GROUP_LOC); - setRequired(false,CaseDataDto.FACILITY_TYPE); - setRequired(false,CaseDataDto.HEALTH_FACILITY); - setRequired(false,CaseDataDto.HEALTH_FACILITY_DETAILS); + afpFacilityOptions.setVisible(true); + caseTransmissionClassification.setVisible(false); + dhimsFacilityOrHome.setVisible(false); + dhimsFacilityType.setVisible(false); + homeaddrecreational.setVisible(true); + } + + if(disease == Disease.YELLOW_FEVER){ + setRequired(true, DHIMSFACILITY_OR_HOME_LOC); + setRequired(true, CaseDataDto.DHIMS_FACILITY_TYPE); + afpFacilityOptions.setVisible(false); + } + if(disease == Disease.AHF) { + setRequired(true, DHIMSFACILITY_OR_HOME_LOC); + setRequired(true, CaseDataDto.DHIMS_FACILITY_TYPE); + afpFacilityOptions.setVisible(false); + } + if(disease == Disease.CSM){ + setRequired(true, DHIMSFACILITY_OR_HOME_LOC); + setRequired(true, CaseDataDto.DHIMS_FACILITY_TYPE); + caseTransmissionClassification.setVisible(true); + afpFacilityOptions.setVisible(false); } - if(disease != Disease.AFP){ - setVisible(false, CaseDataDto.AFP_FACILITY_OPTIONS); + + if(disease == Disease.NEW_INFLUENZA){ + setVisible(false, DHIMSFACILITY_OR_HOME_LOC); + setVisible(false, CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION); + afpFacilityOptions.setVisible(false); + hospitalName.setVisible(true); } + investigated.setVisible(disease == Disease.NEW_INFLUENZA); + dhimsFacilityOrHome.setVisible(disease == Disease.YELLOW_FEVER || disease == Disease.AHF || disease == Disease.CSM); + dhimsFacilityType.setVisible(disease == Disease.YELLOW_FEVER || disease == Disease.AHF || disease == Disease.CSM); + personCreateForm.updatePresentConditionEnum((Disease) valueChangeEvent.getProperty().getValue()); + + }); diseaseVariantField.addValueChangeListener(e -> { @@ -566,6 +685,12 @@ private void updateFacility() { return; } + Object dhimsFacilityOrHomeValue = dhimsFacilityOrHome.isRequired() ? dhimsFacilityOrHome.getValue() : dhimsFacilityOrHome.getNullableValue(); + if (TypeOfAbode.HOME.equals(dhimsFacilityOrHomeValue)) { + setNoneFacility(); + return; + } + FieldHelper.removeItems(facilityCombo); final DistrictReferenceDto district; @@ -584,14 +709,15 @@ private void updateFacility() { FieldHelper.updateItems( facilityCombo, FacadeProvider.getFacilityFacade() - .getActiveFacilitiesByCommunityAndType(community, (FacilityType) facilityType.getValue(), true, false)); + .getActiveFacilitiesByCommunityAndType(community, (FacilityType) facilityType.getValue(),true, false)); } else { FieldHelper.updateItems( facilityCombo, FacadeProvider.getFacilityFacade() - .getActiveFacilitiesByDistrictAndType(district, (FacilityType) facilityType.getValue(), true, false)); + .getActiveFacilitiesByDistrictAndType(district, (FacilityType) facilityType.getValue(),true, false)); } } + } private void updatePOEs() { @@ -623,7 +749,7 @@ private void updateFacilityFields(ComboBox cbFacility, TextField tfFacilityDetai boolean visibleAndRequired = otherHealthFacility || noneHealthFacility; tfFacilityDetails.setVisible(visibleAndRequired); - tfFacilityDetails.setRequired(otherHealthFacility); + tfFacilityDetails.setRequired(false); if (otherHealthFacility) { tfFacilityDetails.setCaption(I18nProperties.getPrefixCaption(CaseDataDto.I18N_PREFIX, CaseDataDto.HEALTH_FACILITY_DETAILS)); @@ -640,6 +766,7 @@ private void updateFacilityFields(ComboBox cbFacility, TextField tfFacilityDetai tfFacilityDetails.setVisible(false); tfFacilityDetails.setRequired(false); tfFacilityDetails.clear(); + } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java index 24f092380b4..b7545603499 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java @@ -39,6 +39,7 @@ import de.symeda.sormas.api.caze.*; import de.symeda.sormas.api.hospitalization.HospitalizationDto; +import de.symeda.sormas.api.infrastructure.facility.*; import de.symeda.sormas.api.person.PresentCondition; import de.symeda.sormas.api.person.Sex; import de.symeda.sormas.api.utils.*; @@ -94,10 +95,6 @@ import de.symeda.sormas.api.i18n.Validations; import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityType; -import de.symeda.sormas.api.infrastructure.facility.FacilityTypeGroup; import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto; import de.symeda.sormas.api.person.PersonDto; import de.symeda.sormas.api.sample.SampleDto; @@ -149,6 +146,8 @@ public class CaseDataForm extends AbstractEditForm { private static final String PLACE_OF_STAY_HEADING_LOC = "placeOfStayHeadingLoc"; private static final String FACILITY_OR_HOME_LOC = "facilityOrHomeLoc"; private static final String TYPE_GROUP_LOC = "typeGroupLoc"; + private static final String DHIMSFACILITY_OR_HOME_LOC = "dhimsFacilityOrHomeLoc"; + private static final String DHIMS_FACILITY_TYPE_GROUP_LOC = "dhimsTypeGroupLoc"; private static final String CONTACT_TRACING_FIRST_CONTACT_HEADER_LOC = "contactTracingFirstContact"; private static final String EXPECTED_FOLLOW_UP_UNTIL_DATE_LOC = "expectedFollowUpUntilDateLoc"; private static final String CASE_CONFIRMATION_BASIS = "caseConfirmationBasis"; @@ -208,11 +207,14 @@ public class CaseDataForm extends AbstractEditForm { fluidRowLocs(CaseDataDto.DONT_SHARE_WITH_REPORTING_TOOL) + fluidRowLocs(DONT_SHARE_WARNING_LOC) + fluidRowLocs(DIFFERENT_PLACE_OF_STAY_JURISDICTION) + + fluidRowLocs(6, CaseDataDto.HOME_ADDRESS_RECREATIONAL) + fluidRowLocs(PLACE_OF_STAY_HEADING_LOC) + fluidRowLocs(FACILITY_OR_HOME_LOC) + fluidRowLocs(CaseDataDto.REGION, CaseDataDto.DISTRICT, CaseDataDto.COMMUNITY) + fluidRowLocs(TYPE_GROUP_LOC, CaseDataDto.FACILITY_TYPE) + fluidRowLocs(CaseDataDto.HEALTH_FACILITY, CaseDataDto.HEALTH_FACILITY_DETAILS) + + fluidRowLocs(DHIMSFACILITY_OR_HOME_LOC) + + fluidRowLocs(CaseDataDto.DHIMS_FACILITY_TYPE, CaseDataDto.AFP_FACILITY_OPTIONS, CaseDataDto.HOSPITAL_NAME) + inlineLocs(CaseDataDto.POINT_OF_ENTRY, CaseDataDto.POINT_OF_ENTRY_DETAILS, CASE_REFER_POINT_OF_ENTRY_BTN_LOC) + fluidRowLocs(CaseDataDto.NOSOCOMIAL_OUTBREAK, CaseDataDto.INFECTION_SETTING) + locCss(VSPACE_3, CaseDataDto.SHARED_TO_COUNTRY) + @@ -236,8 +238,9 @@ public class CaseDataForm extends AbstractEditForm { loc(MEDICAL_INFORMATION_LOC) + fluidRowLocs(CaseDataDto.BLOOD_ORGAN_OR_TISSUE_DONATED) + fluidRowLocs(CaseDataDto.PREGNANT, CaseDataDto.POSTPARTUM) + fluidRowLocs(CaseDataDto.TRIMESTER, "") + - fluidRowLocs(CaseDataDto.IPSAMPLESENT) + fluidRowLocs(CaseDataDto.IPSAMPLERESULTS, "") + + //fluidRowLocs(CaseDataDto.IPSAMPLESENT) + fluidRowLocs(CaseDataDto.IPSAMPLERESULTS, "") + fluidRowLocs(CaseDataDto.VACCINATION_STATUS, CaseDataDto.VACCINATION_TYPE, CaseDataDto.VACCINATION_DATE) + + fluidRowLocs(CaseDataDto.VACCINE_TYPE, CaseDataDto.NUMBER_OF_DOSES, CaseDataDto.VACCINATION_DATE) + fluidRowLocs(CaseDataDto.SMALLPOX_VACCINATION_RECEIVED, CaseDataDto.SMALLPOX_VACCINATION_SCAR) + fluidRowLocs(CaseDataDto.SMALLPOX_LAST_VACCINATION_DATE, "") + fluidRowLocs(SMALLPOX_VACCINATION_SCAR_IMG) + @@ -256,6 +259,9 @@ public class CaseDataForm extends AbstractEditForm { private static final String PAPER_FORM_DATES_AND_HEALTH_CONDITIONS_HTML_LAYOUT = fluidRowLocs(6, CaseDataDto.SURVEILLANCE_OFFICER) + + fluidRowLocs(CaseDataDto.REPORTING_OFFICER_NAME, CaseDataDto.REPORTING_OFFICER_TITLE) + + fluidRowLocs(CaseDataDto.FUNCTION_OF_REPORTING_OFFICER, CaseDataDto.REPORTING_OFFICER_CONTACT_PHONE) + + fluidRowLocs(6,CaseDataDto.REPORTING_OFFICER_EMAIL) + loc(PAPER_FORM_DATES_LOC) + fluidRowLocs(CaseDataDto.DISTRICT_LEVEL_DATE, CaseDataDto.REGION_LEVEL_DATE, CaseDataDto.NATIONAL_LEVEL_DATE) + loc(GENERAL_COMMENT_LOC) + fluidRowLocs(CaseDataDto.ADDITIONAL_DETAILS) + @@ -286,14 +292,22 @@ public class CaseDataForm extends AbstractEditForm { private ComboBox districtCombo; private ComboBox communityCombo; private OptionGroup facilityOrHome; + private OptionGroup dhimsFacilityOrHome; private ComboBox facilityTypeGroup; private ComboBox facilityTypeCombo; + private ComboBox dhimsFacilityTypeCombo; private ComboBox facilityCombo; private TextField facilityDetails; private boolean quarantineChangedByFollowUpUntilChange = false; private TextField tfExpectedFollowUpUntilDate; private FollowUpPeriodDto expectedFollowUpPeriodDto; private boolean ignoreDifferentPlaceOfStayJurisdiction = false; + private DateField cardDateField; + private NullableOptionGroup vaccineType; + private TextField numberOfDoses; + private ComboBox cbCaseClassification; + private TextField hospitalName; + private final Map reinfectionTrees = new EnumMap<>(ReinfectionDetailGroup.class); @@ -381,12 +395,10 @@ protected void addFields() { DateField districtLevelDate = addField(CaseDataDto.DISTRICT_LEVEL_DATE, DateField.class); DateField regionLevelDate = addField(CaseDataDto.REGION_LEVEL_DATE, DateField.class); DateField nationalLevelDate = addField(CaseDataDto.NATIONAL_LEVEL_DATE, DateField.class); + districtLevelDate.setVisible(false); + regionLevelDate.setVisible(false); + nationalLevelDate.setVisible(false); - if(disease == Disease.YELLOW_FEVER || disease == Disease.AHF || disease == Disease.CSM){ - districtLevelDate.setVisible(false); - regionLevelDate.setVisible(false); - nationalLevelDate.setVisible(false); - } TextField epidField = addField(CaseDataDto.EPID_NUMBER, TextField.class); epidField.setInvalidCommitted(true); @@ -413,20 +425,20 @@ protected void addFields() { } TextField externalTokenField = addField(CaseDataDto.EXTERNAL_TOKEN, TextField.class); - externalTokenField.setVisible(true); + externalTokenField.setVisible(false); Label externalTokenWarningLabel = new Label(I18nProperties.getString(Strings.messageCaseExternalTokenWarning)); externalTokenWarningLabel.addStyleNames(VSPACE_3, LABEL_WHITE_SPACE_NORMAL); getContent().addComponent(externalTokenWarningLabel, EXTERNAL_TOKEN_WARNING_LOC); TextField internaltoken = addField(CaseDataDto.INTERNAL_TOKEN, TextField.class); - internaltoken.setVisible(true); + internaltoken.setVisible(false); NullableOptionGroup investigationstatus = addField(CaseDataDto.INVESTIGATION_STATUS, NullableOptionGroup.class); investigationstatus.setVisible(true); NullableOptionGroup outcome = new NullableOptionGroup("Outcome"); - if(disease == Disease.YELLOW_FEVER || disease == Disease.AHF){ + if(disease == Disease.YELLOW_FEVER || disease == Disease.AHF || disease == Disease.CSM || disease == Disease.AFP){ for(CaseOutcome caseOutcome : CaseOutcome.values()){ if(caseOutcome == CaseOutcome.DECEASED || caseOutcome == CaseOutcome.ALIVE){ @@ -439,7 +451,8 @@ protected void addFields() { addField(CaseDataDto.SEQUELAE, NullableOptionGroup.class); addFields(CaseDataDto.INVESTIGATED_DATE, CaseDataDto.OUTCOME_DATE, CaseDataDto.SEQUELAE_DETAILS); - + TextField homeaddrecreational = addField(CaseDataDto.HOME_ADDRESS_RECREATIONAL, TextField.class); + homeaddrecreational.setVisible(false); addField(CaseDataDto.CASE_IDENTIFICATION_SOURCE); addField(CaseDataDto.SCREENING_TYPE); @@ -461,9 +474,13 @@ protected void addFields() { addField(CaseDataDto.RABIES_TYPE, NullableOptionGroup.class); addField(CaseDataDto.CASE_ORIGIN, TextField.class); OptionGroup caseTransmissionClassification = addField(CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION, OptionGroup.class); - caseTransmissionClassification.setVisible(true); + caseTransmissionClassification.setVisible(false); + + ComboBox afpFacilityOptions = addField(CaseDataDto.AFP_FACILITY_OPTIONS, ComboBox.class); + afpFacilityOptions.setVisible(false); quarantine = addField(CaseDataDto.QUARANTINE); + quarantine.setVisible(false); quarantine.addValueChangeListener(e -> onValueChange()); quarantineFrom = addField(CaseDataDto.QUARANTINE_FROM, DateField.class); dfQuarantineTo = addDateField(CaseDataDto.QUARANTINE_TO, DateField.class, -1); @@ -488,10 +505,9 @@ protected void addFields() { setReadOnly(true, CaseDataDto.PREVIOUS_QUARANTINE_TO); setVisible(false, CaseDataDto.QUARANTINE_CHANGE_COMMENT, CaseDataDto.PREVIOUS_QUARANTINE_TO); - if(disease != Disease.CSM && disease != Disease.YELLOW_FEVER){ if (isConfiguredServer(CountryHelper.COUNTRY_CODE_GERMANY)) { - final ComboBox cbCaseClassification = addField(CaseDataDto.CASE_CLASSIFICATION, ComboBox.class); + cbCaseClassification = addField(CaseDataDto.CASE_CLASSIFICATION, ComboBox.class); cbCaseClassification.addValidator( new GermanCaseClassificationValidator(caseUuid, I18nProperties.getValidationError(Validations.caseClassificationInvalid))); @@ -535,8 +551,10 @@ protected void addFields() { final NullableOptionGroup caseClassificationGroup = addField(CaseDataDto.CASE_CLASSIFICATION, NullableOptionGroup.class); caseClassificationGroup.removeItem(CaseClassification.CONFIRMED_NO_SYMPTOMS); caseClassificationGroup.removeItem(CaseClassification.CONFIRMED_UNKNOWN_SYMPTOMS); + caseClassificationGroup.removeItem(CaseClassification.NOT_CLASSIFIED); + caseClassificationGroup.removeItem(CaseClassification.NO_CASE); + caseClassificationGroup.setValue(CaseClassification.SUSPECT); } - } boolean extendedClassification = FacadeProvider.getDiseaseConfigurationFacade().usesExtendedClassification(disease); @@ -773,6 +791,14 @@ protected void addFields() { ComboBox surveillanceOfficerField = addField(CaseDataDto.SURVEILLANCE_OFFICER, ComboBox.class); surveillanceOfficerField.setNullSelectionAllowed(true); + surveillanceOfficerField.setVisible(false); + + addField(CaseDataDto.REPORTING_OFFICER_NAME, TextField.class); + addField(CaseDataDto.REPORTING_OFFICER_TITLE, TextField.class); + addField(CaseDataDto.FUNCTION_OF_REPORTING_OFFICER, TextField.class); + addField(CaseDataDto.REPORTING_OFFICER_CONTACT_PHONE, TextField.class); + TextField reportingOfficerEmail = addField(CaseDataDto.REPORTING_OFFICER_EMAIL, TextField.class); + reportingOfficerEmail.setVisible(false); differentPlaceOfStayJurisdiction = addCustomField(DIFFERENT_PLACE_OF_STAY_JURISDICTION, Boolean.class, CheckBox.class); differentPlaceOfStayJurisdiction.addStyleName(VSPACE_3); @@ -824,6 +850,21 @@ protected void addFields() { facilityDetails = addField(CaseDataDto.HEALTH_FACILITY_DETAILS, TextField.class); facilityDetails.setVisible(false); + dhimsFacilityOrHome = new OptionGroup(I18nProperties.getCaption(Captions.casePlaceOfStay), TypeOfAbode.FOR_DHIMS_CASES); + dhimsFacilityOrHome.setId("dhimsFacilityOrHome"); + dhimsFacilityOrHome.setWidth(100, Unit.PERCENTAGE); + CssStyles.style(dhimsFacilityOrHome, ValoTheme.OPTIONGROUP_HORIZONTAL); + getContent().addComponent(dhimsFacilityOrHome, DHIMSFACILITY_OR_HOME_LOC); + + dhimsFacilityTypeCombo = ComboBoxHelper.createComboBoxV7(); + for(DhimsFacility dhimsFacility : DhimsFacility.values()){ + dhimsFacilityTypeCombo.addItem(dhimsFacility); + } + + dhimsFacilityTypeCombo = addField(CaseDataDto.DHIMS_FACILITY_TYPE); + + hospitalName = addField(CaseDataDto.HOSPITAL_NAME, TextField.class); + hospitalName.setCaption("Hospital Name"); regionCombo.addValueChangeListener(e -> { RegionReferenceDto regionDto = (RegionReferenceDto) e.getProperty().getValue(); FieldHelper @@ -881,6 +922,27 @@ protected void addFields() { setReadOnly(!UserProvider.getCurrent().hasUserRight(UserRight.CASE_SHARE), CaseDataDto.SHARED_TO_COUNTRY); } + dhimsFacilityOrHome.addValueChangeListener(e -> { + //FieldHelper.removeItems(facilityCombo); + if (TypeOfAbode.DHIMS_FACILITY.equals(dhimsFacilityOrHome.getValue())) { + // switched from home to facility + + if (dhimsFacilityTypeCombo.getValue() == null) { + dhimsFacilityTypeCombo.setValue(DhimsFacility.CHPS_COMPOUND); + } + + } else { + // switched from facility to home + if (!facilityCombo.isReadOnly()) { + FacilityReferenceDto noFacilityRef = FacadeProvider.getFacilityFacade().getByUuid(FacilityDto.NONE_FACILITY_UUID).toReference(); + facilityCombo.addItem(noFacilityRef); + facilityCombo.setValue(noFacilityRef); + } + dhimsFacilityTypeCombo.clear(); + } + }); + + ComboBox pointOfEntry = addInfrastructureField(CaseDataDto.POINT_OF_ENTRY, false); addField(CaseDataDto.POINT_OF_ENTRY_DETAILS, TextField.class); @@ -913,9 +975,12 @@ protected void addFields() { AccessibleTextField tfReportLat = addField(CaseDataDto.REPORT_LAT, AccessibleTextField.class); tfReportLat.setConverter(new StringToAngularLocationConverter()); + tfReportLat.setVisible(false); AccessibleTextField tfReportLon = addField(CaseDataDto.REPORT_LON, AccessibleTextField.class); tfReportLon.setConverter(new StringToAngularLocationConverter()); - addField(CaseDataDto.REPORT_LAT_LON_ACCURACY, TextField.class); + tfReportLon.setVisible(false); + AccessibleTextField tfReportAccuracy = addField(CaseDataDto.REPORT_LAT_LON_ACCURACY, AccessibleTextField.class); + tfReportAccuracy.setVisible(false); dfFollowUpUntil = null; cbOverwriteFollowUpUntil = null; @@ -978,6 +1043,7 @@ protected void addFields() { I18nProperties.getPrefixDescription(CaseDataDto.I18N_PREFIX, CaseDataDto.ADDITIONAL_DETAILS, "") + "\n" + I18nProperties.getDescription(Descriptions.descGdpr)); CssStyles.style(additionalDetails, CssStyles.CAPTION_HIDDEN); + additionalDetails.setVisible(false); addField(CaseDataDto.PREGNANT, NullableOptionGroup.class); addField(CaseDataDto.POSTPARTUM, NullableOptionGroup.class); @@ -987,22 +1053,7 @@ protected void addFields() { addField(CaseDataDto.IPSAMPLERESULTS); vaccinationStatus = addField(CaseDataDto.VACCINATION_STATUS, NullableOptionGroup.class); - - NullableOptionGroup vaccinatedByCardOrHistory = addField(CaseDataDto.VACCINATION_TYPE, NullableOptionGroup.class); - - FieldHelper.setEnabledWhen(vaccinationStatus, Arrays.asList(VaccinationStatus.VACCINATED, VaccinationStatus.UNVACCINATED, VaccinationStatus.UNKNOWN), Collections.singletonList( - vaccinatedByCardOrHistory - ), false); - - DateField cardDateField = addField(CaseDataDto.VACCINATION_DATE, DateField.class); - - FieldHelper.setEnabledWhen( - vaccinatedByCardOrHistory, - Arrays.asList(CardOrHistory.CARD, CardOrHistory.HISTORY), - Collections.singletonList( - cardDateField - ), - false); + vaccinationStatus.removeItem(VaccinationStatus.UNKNOWN); addFields(CaseDataDto.SMALLPOX_VACCINATION_SCAR, CaseDataDto.SMALLPOX_VACCINATION_RECEIVED); addDateField(CaseDataDto.SMALLPOX_LAST_VACCINATION_DATE, DateField.class, 0); @@ -1125,7 +1176,11 @@ protected void addFields() { TYPE_GROUP_LOC, CaseDataDto.FACILITY_TYPE, CaseDataDto.HEALTH_FACILITY, - CaseDataDto.HEALTH_FACILITY_DETAILS); + CaseDataDto.HEALTH_FACILITY_DETAILS, + DHIMSFACILITY_OR_HOME_LOC, + DHIMS_FACILITY_TYPE_GROUP_LOC, + CaseDataDto.DHIMS_FACILITY_TYPE + ); if (!isEditableAllowed(CaseDataDto.COMMUNITY)) { setEnabled(false, CaseDataDto.REGION, CaseDataDto.DISTRICT); @@ -1141,8 +1196,6 @@ protected void addFields() { diseaseField.addValueChangeListener((ValueChangeListener) valueChangeEvent -> { Disease disease = (Disease) valueChangeEvent.getProperty().getValue(); - caseTransmissionClassification.setVisible(disease != Disease.YELLOW_FEVER && disease != Disease.CSM && disease != Disease.AHF); - investigationstatus.setVisible(disease != Disease.YELLOW_FEVER && disease != Disease.CSM); investigationstatus.setVisible(disease != Disease.YELLOW_FEVER && disease != Disease.CSM); ogReinfection.setVisible(disease != Disease.YELLOW_FEVER && disease != Disease.CSM && disease != Disease.AHF); generalCommentLabel.setVisible(false); @@ -1268,25 +1321,7 @@ protected void addFields() { Arrays.asList(CaseDataDto.PREGNANT, CaseDataDto.VACCINATION_STATUS, CaseDataDto.SMALLPOX_VACCINATION_RECEIVED); HealthConditionsForm healthConditionsField = addField(CaseDataDto.HEALTH_CONDITIONS, HealthConditionsForm.class); - - if(disease == Disease.YELLOW_FEVER || disease == Disease.CSM){ - externalTokenField.setVisible(false); - internaltoken.setVisible(false); - quarantine.setVisible(false); - additionalDetails.setVisible(false); - healthConditionsField.setVisible(false); - getFieldGroup().getField(CaseDataDto.PREGNANT).setVisible(false); - getFieldGroup().getField(CaseDataDto.POSTPARTUM).setVisible(false); - - } - - if(disease == Disease.CSM){ - setVisible(false, CaseDataDto.REPORT_LAT, CaseDataDto.REPORT_LON, CaseDataDto.REPORT_LAT_LON_ACCURACY); - } - - if(disease == Disease.AHF){ - setVisible(false, CaseDataDto.VACCINATION_STATUS, CaseDataDto.VACCINATION_TYPE, CaseDataDto.VACCINATION_DATE); - } + healthConditionsField.setVisible(false); for (String medicalInformationField : medicalInformationFields) { if (getFieldGroup().getField(medicalInformationField).isVisible()) { @@ -1301,7 +1336,7 @@ protected void addFields() { Label paperFormDatesLabel = new Label(I18nProperties.getString(Strings.headingPaperFormDates)); paperFormDatesLabel.addStyleName(H3); - Set excludedDiseases = new HashSet<>(Arrays.asList(Disease.YELLOW_FEVER, Disease.AHF, Disease.CSM)); + Set excludedDiseases = new HashSet<>(Arrays.asList(Disease.YELLOW_FEVER, Disease.AHF, Disease.CSM, Disease.AFP, Disease.NEW_INFLUENZA)); if (!excludedDiseases.contains(disease)) { getContent().addComponent(paperFormDatesLabel, PAPER_FORM_DATES_LOC); @@ -1326,6 +1361,13 @@ protected void addFields() { addField(CaseDataDto.OTHER_DELETION_REASON, TextArea.class).setRows(3); setVisible(false, CaseDataDto.DELETION_REASON, CaseDataDto.OTHER_DELETION_REASON); + if(disease == Disease.YELLOW_FEVER || disease == Disease.CSM){ + quarantine.setVisible(false); + getFieldGroup().getField(CaseDataDto.PREGNANT).setVisible(false); + getFieldGroup().getField(CaseDataDto.POSTPARTUM).setVisible(false); + + } + addValueChangeListener(e -> { diseaseField.addValueChangeListener(new DiseaseChangeListener(diseaseField, getValue().getDisease())); @@ -1368,7 +1410,7 @@ protected void addFields() { .setVisible(UserProvider.getCurrent().hasUserRight(UserRight.CASE_REFER_FROM_POE) && getValue().getHealthFacility() == null); } - if (getValue().getHealthFacility() == null) { + if (getValue().getHealthFacility() == null && disease != Disease.YELLOW_FEVER) { setVisible( false, DIFFERENT_PLACE_OF_STAY_JURISDICTION, @@ -1390,6 +1432,8 @@ protected void addFields() { facilityTypeGroup.setReadOnly(facilityTypeCombo.isReadOnly()); facilityOrHome.setReadOnly(facilityTypeCombo.isReadOnly()); + dhimsFacilityOrHome.setReadOnly(dhimsFacilityTypeCombo.isReadOnly()); + // Hide case origin from port health users if (UserProvider.getCurrent().isPortHealthUser()) { setVisible(false, CaseDataDto.CASE_ORIGIN); @@ -1466,6 +1510,89 @@ public String getFormattedHtmlMessage() { for (CaseReinfectionCheckBoxTree reinfectionTree : reinfectionTrees.values()) { reinfectionTree.initCheckboxes(); } + + //AHF + if(disease == Disease.AHF){ + setRequired(false, DHIMSFACILITY_OR_HOME_LOC); + setRequired(false, CaseDataDto.DHIMS_FACILITY_TYPE); + setVisible(false, CaseDataDto.VACCINATION_STATUS); + setVisible(false, DHIMSFACILITY_OR_HOME_LOC, CaseDataDto.CLINICIAN_NAME, CaseDataDto.CLINICIAN_EMAIL, CaseDataDto.CLINICIAN_PHONE); + + if (dhimsFacilityTypeCombo.getValue() != null && hospitalName.getValue() == null) { + setVisible(false, CaseDataDto.HOSPITAL_NAME); + + } + + } + + //YELLOW FEVER + if(disease == Disease.YELLOW_FEVER){ + setVisible(false, + FACILITY_OR_HOME_LOC, + TYPE_GROUP_LOC, + CaseDataDto.FACILITY_TYPE, + CaseDataDto.HEALTH_FACILITY, + CaseDataDto.HEALTH_FACILITY_DETAILS ); + + setRequired(false, + FACILITY_OR_HOME_LOC, + TYPE_GROUP_LOC, + CaseDataDto.FACILITY_TYPE, + CaseDataDto.HEALTH_FACILITY, + CaseDataDto.HEALTH_FACILITY_DETAILS); + + nationalLevelDate.setVisible(true); + NullableOptionGroup vaccinatedByCardOrHistory = addField(CaseDataDto.VACCINATION_TYPE, NullableOptionGroup.class); + + FieldHelper.setEnabledWhen(vaccinationStatus, Arrays.asList(VaccinationStatus.VACCINATED), Collections.singletonList( + vaccinatedByCardOrHistory + ), false); + + FieldHelper + .setVisibleWhen(vaccinationStatus, Arrays.asList(vaccinatedByCardOrHistory), Arrays.asList(VaccinationStatus.VACCINATED), true); + + cardDateField = addField(CaseDataDto.VACCINATION_DATE, DateField.class); + cardDateField.setVisible(false); + + FieldHelper + .setVisibleWhen(vaccinatedByCardOrHistory, Arrays.asList(cardDateField), Arrays.asList(CardOrHistory.CARD), true); + } + + //CSM + else if(disease == Disease.CSM){ + + setVisible(false, CaseDataDto.REPORT_LAT, CaseDataDto.REPORT_LON, CaseDataDto.REPORT_LAT_LON_ACCURACY); + vaccineType = addField(CaseDataDto.VACCINE_TYPE, NullableOptionGroup.class); + vaccineType.setCaption("Vaccine Type"); + numberOfDoses = addField(CaseDataDto.NUMBER_OF_DOSES, TextField.class); + numberOfDoses.setCaption("Number of Doses"); + cardDateField = addField(CaseDataDto.VACCINATION_DATE, DateField.class); + + vaccineType.setVisible(false); + numberOfDoses.setVisible(false); + cardDateField.setVisible(false); + setVisible(false, + DHIMSFACILITY_OR_HOME_LOC); + reportingOfficerEmail.setVisible(false); + + FieldHelper + .setVisibleWhen(vaccinationStatus, Arrays.asList(vaccineType, numberOfDoses, cardDateField), Arrays.asList(VaccinationStatus.VACCINATED), true); + + } + //AFP + if(disease == Disease.AFP){ + afpFacilityOptions.setVisible(true); + setVisible(false, DHIMSFACILITY_OR_HOME_LOC, CaseDataDto.DHIMS_FACILITY_TYPE); + homeaddrecreational.setVisible(true); + } + //INFLUENZA + if(disease == Disease.NEW_INFLUENZA){ + setVisible(false, DHIMSFACILITY_OR_HOME_LOC, CaseDataDto.CASE_TRANSMISSION_CLASSIFICATION); + hospitalName.setVisible(true); + nationalLevelDate.setVisible(true); + dhimsFacilityTypeCombo.setVisible(false); + afpFacilityOptions.setVisible(false); + } }); } @@ -1812,7 +1939,18 @@ private void updateFacility() { FieldHelper.removeItems(facilityCombo); } } - } + + if (TypeOfAbode.HOME.equals(dhimsFacilityOrHome.getValue())) { + FacilityReferenceDto noFacilityRef = FacadeProvider.getFacilityFacade().getByUuid(FacilityDto.NONE_FACILITY_UUID).toReference(); + facilityCombo.addItem(noFacilityRef); + boolean readOnly = facilityCombo.isReadOnly(); + facilityCombo.setReadOnly(false); + facilityCombo.setValue(noFacilityRef); + facilityCombo.setReadOnly(readOnly); + } else { + FieldHelper.removeItems(facilityCombo); + } + } @Override protected String createHtmlLayout() { diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseFilterForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseFilterForm.java index 32fec406259..0922db78097 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseFilterForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseFilterForm.java @@ -12,6 +12,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import org.apache.commons.collections.CollectionUtils; import com.vaadin.server.Sizeable; @@ -80,6 +81,7 @@ public class CaseFilterForm extends AbstractFilterForm { CaseDataDto.COMMUNITY, CaseCriteria.FACILITY_TYPE_GROUP, CaseCriteria.FACILITY_TYPE, + CaseCriteria.DHIMS_FACILITY_TYPE, CaseDataDto.HEALTH_FACILITY, CaseDataDto.POINT_OF_ENTRY, CaseDataDto.SURVEILLANCE_OFFICER, @@ -204,6 +206,10 @@ public void addMoreFilters(CustomLayout moreFiltersContainer) { ComboBox facilityField = addField(moreFiltersContainer, FieldConfiguration.pixelSized(CaseDataDto.HEALTH_FACILITY, 140)); facilityField.setDescription(I18nProperties.getDescription(Descriptions.descFacilityFilter)); + + ComboBox dhimsFacilityType = addField(moreFiltersContainer, FieldConfiguration.pixelSized(CaseCriteria.DHIMS_FACILITY_TYPE, 140)); + dhimsFacilityType.setInputPrompt(I18nProperties.getPrefixCaption(FacilityDto.I18N_PREFIX, FacilityDto.DHIMS_FACILITY_TYPE)); + dhimsFacilityType.removeAllItems(); } if (UserProvider.getCurrent().hasUserRight(UserRight.PORT_HEALTH_INFO_VIEW)) { @@ -439,6 +445,7 @@ protected void applyDependenciesOnFieldChange(String propertyId, Property.ValueC final ComboBox communityField = getField(CaseDataDto.COMMUNITY); final ComboBox facilityTypeGroupField = getField(CaseCriteria.FACILITY_TYPE_GROUP); final ComboBox facilityTypeField = getField(CaseCriteria.FACILITY_TYPE); + final ComboBox dhimsFacilityTypeField = getField(CaseCriteria.DHIMS_FACILITY_TYPE); final ComboBox facilityField = getField(CaseDataDto.HEALTH_FACILITY); final ComboBox pointOfEntryField = getField(CaseDataDto.POINT_OF_ENTRY); final ComboBox caseOriginField = getField(CaseDataDto.CASE_ORIGIN); @@ -524,6 +531,7 @@ protected void applyDependenciesOnFieldChange(String propertyId, Property.ValueC } final FacilityType facilityType = facilityTypeField != null ? (FacilityType) facilityTypeField.getValue() : null; + final DhimsFacility dhimsFacilityType = dhimsFacilityTypeField != null ? (DhimsFacility) dhimsFacilityTypeField.getValue() : null; if (facilityType == null && facilityField != null) { facilityField.removeAllItems(); @@ -535,7 +543,21 @@ protected void applyDependenciesOnFieldChange(String propertyId, Property.ValueC } else { FieldHelper.updateItems( facilityField, - FacadeProvider.getFacilityFacade().getActiveFacilitiesByCommunityAndType(community, facilityType, true, false)); + FacadeProvider.getFacilityFacade().getActiveFacilitiesByCommunityAndType(community, facilityType,true, false)); + } + } + + if (dhimsFacilityType == null && dhimsFacilityTypeField != null) { + dhimsFacilityTypeField.removeAllItems(); + } else if (dhimsFacilityTypeField != null) { + if (community == null) { + FieldHelper.updateItems( + dhimsFacilityTypeField, + FacadeProvider.getFacilityFacade().getActiveFacilitiesByDistrictAndType(currentDistrict, dhimsFacilityType, true,false)); + } else { + FieldHelper.updateItems( + dhimsFacilityTypeField, + FacadeProvider.getFacilityFacade().getActiveFacilitiesByCommunityAndType(community, dhimsFacilityType,false, false)); } } } @@ -578,6 +600,28 @@ protected void applyDependenciesOnFieldChange(String propertyId, Property.ValueC } break; } + case CaseCriteria.DHIMS_FACILITY_TYPE: { + DhimsFacility dhimsFacilityType = (DhimsFacility) event.getProperty().getValue(); + if (!DataHelper.equal(dhimsFacilityType, criteria.getDhimsFacilityType())) { + if (dhimsFacilityType == null) { + clearAndDisableFields(dhimsFacilityTypeField); + } else { + enableFields(dhimsFacilityTypeField); + dhimsFacilityTypeField.setValue(null); + CommunityReferenceDto community = (CommunityReferenceDto) communityField.getValue(); + if (community != null) { + FieldHelper.updateItems( + dhimsFacilityTypeField, + FacadeProvider.getFacilityFacade().getActiveFacilitiesByCommunityAndType(community, dhimsFacilityType, true, false)); + } else if (currentDistrict != null) { + FieldHelper.updateItems( + facilityField, + FacadeProvider.getFacilityFacade().getActiveFacilitiesByDistrictAndType(currentDistrict,dhimsFacilityType, true,false)); + } + } + } + break; + } case CaseCriteria.BIRTHDATE_MM: { Integer birthMM = (Integer) event.getProperty().getValue(); @@ -672,6 +716,7 @@ protected void applyDependenciesOnNewValue(CaseCriteria criteria) { final CommunityReferenceDto community = user.getCommunity() == null ? criteria.getCommunity() : user.getCommunity(); final FacilityTypeGroup facilityTypeGroup = criteria.getFacilityTypeGroup(); final FacilityType facilityType = criteria.getFacilityType(); + final DhimsFacility dhimsFacilityType = criteria.getDhimsFacilityType(); // district if (region != null) { @@ -708,7 +753,7 @@ protected void applyDependenciesOnNewValue(CaseCriteria criteria) { enableFields(facilityField); if (community != null) { facilityField - .addItems(FacadeProvider.getFacilityFacade().getActiveFacilitiesByCommunityAndType(community, facilityType, true, false)); + .addItems(FacadeProvider.getFacilityFacade().getActiveFacilitiesByCommunityAndType(community, facilityType,true, false)); } else { facilityField .addItems(FacadeProvider.getFacilityFacade().getActiveFacilitiesByDistrictAndType(district, facilityType, true, false)); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/components/linelisting/LineListingLayout.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/components/linelisting/LineListingLayout.java index 84b58b0f938..8f1261d894e 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/components/linelisting/LineListingLayout.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/components/linelisting/LineListingLayout.java @@ -31,10 +31,7 @@ import de.symeda.sormas.api.i18n.Strings; import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityType; -import de.symeda.sormas.api.infrastructure.facility.FacilityTypeGroup; +import de.symeda.sormas.api.infrastructure.facility.*; import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto; import de.symeda.sormas.api.person.PersonDto; import de.symeda.sormas.api.symptoms.SymptomsDto; @@ -67,6 +64,7 @@ public class LineListingLayout extends VerticalLayout { private final ComboBox district; private final ComboBox typeGroup; private final ComboBox type; + private final ComboBox dhimsFacilityType; private final List caseLines; @@ -113,6 +111,11 @@ public LineListingLayout(Window window) { type.setWidth(200, Unit.PIXELS); sharedInformationBar.addComponent(type); + dhimsFacilityType = new ComboBox<>(I18nProperties.getPrefixCaption(FacilityDto.I18N_PREFIX, FacilityDto.DHIMS_FACILITY_TYPE)); + dhimsFacilityType.setId("dhimsFacilityType"); + dhimsFacilityType.setWidth(200, Unit.PIXELS); + sharedInformationBar.addComponent(dhimsFacilityType); + region.addValueChangeListener(e -> { RegionReferenceDto regionDto = e.getValue(); updateDistricts(regionDto); @@ -131,7 +134,7 @@ public LineListingLayout(Window window) { type.addValueChangeListener(e -> { removeFacilities(); if (type.getValue() != null && district.getValue() != null) { - updateFacilities(type.getValue(), district.getValue()); + updateFacilities(type.getValue(), dhimsFacilityType.getValue(),district.getValue()); } }); @@ -249,10 +252,10 @@ private void updateCommunityAndFacility(DistrictReferenceDto districtDto, CaseLi } } - private void updateFacilities(FacilityType type, DistrictReferenceDto districtDto) { + private void updateFacilities(FacilityType type, DhimsFacility dhimsFacilityType, DistrictReferenceDto districtDto) { for (CaseLineLayout line : caseLines) { if (line.getCommunity().getValue() != null) { - updateFacility(type, line.getCommunity().getValue(), line); + updateFacility(type, dhimsFacilityType, line.getCommunity().getValue(), line); } else { updateFacility(type, districtDto, line); } @@ -265,7 +268,7 @@ private void updateFacility(FacilityType type, DistrictReferenceDto districtDto, districtDto != null ? FacadeProvider.getFacilityFacade().getActiveFacilitiesByDistrictAndType(districtDto, type, true, false) : null); } - private void updateFacility(FacilityType type, CommunityReferenceDto communityDto, CaseLineLayout line) { + private void updateFacility(FacilityType type, DhimsFacility dhimsFacilityType, CommunityReferenceDto communityDto, CaseLineLayout line) { FieldHelper.updateItems( line.getFacility(), communityDto != null ? FacadeProvider.getFacilityFacade().getActiveFacilitiesByCommunityAndType(communityDto, type, true, false) : null); @@ -320,6 +323,7 @@ private LinkedList> getCaseLineDtos() { caze.setEpidNumber(caseLineDto.getEpidNumber()); caze.setResponsibleCommunity(caseLineDto.getCommunity()); caze.setFacilityType(caseLineDto.getFacilityType()); + caze.setDhimsFacilityType(caseLineDto.getDhimsFacilityType()); caze.setHealthFacility(caseLineDto.getFacility()); caze.setHealthFacilityDetails(caseLineDto.getFacilityDetails()); if (caseLineDto.getDateOfOnset() != null) { @@ -366,6 +370,7 @@ private CaseLineLayout buildNewLine(VerticalLayout lineComponent) { newLineDto.setCommunity(lastLineDto.getCommunity()); newLineDto.setFacilityTypeGroup(lastLineDto.getFacilityTypeGroup()); newLineDto.setFacilityType(lastLineDto.getFacilityType()); + newLineDto.setDhimsFacilityType(lastLineDto.getDhimsFacilityType()); newLineDto.setFacility(lastLineDto.getFacility()); newLineDto.setFacilityDetails(lastLineDto.getFacilityDetails()); @@ -420,6 +425,7 @@ public CaseLineLayout(int lineIndex) { binder.forField(district).asRequired().bind(CaseLineDto.DISTRICT); binder.forField(typeGroup).asRequired().bind(CaseLineDto.FACILITY_TYPE_GROUP); binder.forField(type).asRequired().bind(CaseLineDto.FACILITY_TYPE); + binder.forField(type).asRequired().bind(CaseLineDto.DHIMS_FACILITY_TYPE); dateOfReport = new DateField(); dateOfReport.setId("lineListingDateOfReport_" + lineIndex); @@ -600,6 +606,7 @@ public static class CaseLineDto implements Serializable { public static final String DATE_OF_ONSET = "dateOfOnset"; public static final String FACILITY_TYPE_GROUP = "facilityTypeGroup"; public static final String FACILITY_TYPE = "facilityType"; + public static final String DHIMS_FACILITY_TYPE = "dhimsFacilityType"; private Disease disease; private String diseaseDetails; @@ -610,6 +617,7 @@ public static class CaseLineDto implements Serializable { private CommunityReferenceDto community; private FacilityTypeGroup facilityTypeGroup; private FacilityType facilityType; + private DhimsFacility dhimsFacilityType; private FacilityReferenceDto facility; private String facilityDetails; private PersonFieldDto person; @@ -718,5 +726,12 @@ public FacilityType getFacilityType() { public void setFacilityType(FacilityType facilityType) { this.facilityType = facilityType; } + public DhimsFacility getDhimsFacilityType() { + return dhimsFacilityType; + } + public void setDhimsFacilityType(DhimsFacility dhimsFacilityType) { + this.dhimsFacilityType = dhimsFacilityType; + } + } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/DevModeView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/DevModeView.java index b9d4b29df21..ef68dda7ff6 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/DevModeView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/DevModeView.java @@ -37,6 +37,7 @@ import java.util.UUID; import java.util.stream.Collectors; +import de.symeda.sormas.api.utils.YellowFeverSample; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -975,6 +976,8 @@ private void generateCases() { caze.setResponsibleCommunity(healthFacility.getCommunity()); caze.setHealthFacility(healthFacility.toReference()); caze.setFacilityType(healthFacility.getType()); + caze.setDhimsFacilityType(healthFacility.getDhimsFacilityType()); + caze.setAfpFacilityOptions(healthFacility.getAfpFacilityOptions()); caze.setReportLat(healthFacility.getLatitude()); caze.setReportLon(healthFacility.getLongitude()); } @@ -1061,13 +1064,14 @@ private void generateSamples() { sample.setAdditionalTestingRequested(true); sample.setRequestedAdditionalTests(additionalTestTypes); } + if (config.isRequestSampleMaterialsToAdded()) { - Set sampleMaterialTypes = new HashSet(); - int until = randomInt(1, SampleMaterial.values().length); + Set sampleMaterialTypes = new HashSet(); + int until = randomInt(1, YellowFeverSample.values().length); for (int j = 0; j < until; j++) { - sampleMaterialTypes.add(SampleMaterial.values()[j]); + sampleMaterialTypes.add(YellowFeverSample.values()[j]); } - sample.setSampleMaterialRequested(true); + sample.setSampleMaterialTestingRequested(true); sample.setRequestedSampleMaterials(sampleMaterialTypes); } @@ -1384,6 +1388,8 @@ private void generateEvents() { FacilityIndexDto facility = random(healthFacilities); caze.setHealthFacility(facility.toReference()); caze.setFacilityType(facility.getType()); + caze.setDhimsFacilityType(facility.getDhimsFacilityType()); + caze.setAfpFacilityOptions(facility.getAfpFacilityOptions()); caze.setAdditionalDetails("Case generated using DevMode on " + LocalDate.now()); FacadeProvider.getCaseFacade().save(caze); eventParticipant.setResultingCase(caze.toReference()); @@ -1825,7 +1831,7 @@ public static SampleGenerationConfig getDefaultConfig() { sampleGenerationConfig.region = null; sampleGenerationConfig.district = null; sampleGenerationConfig.samplePurpose = SamplePurpose.INTERNAL; - sampleGenerationConfig.sampleMaterial = SampleMaterial.BLOOD; + sampleGenerationConfig.sampleMaterial = SampleMaterial.WHOLE_BLOOD; return sampleGenerationConfig; } @@ -1838,7 +1844,7 @@ public static SampleGenerationConfig getPerformanceTestConfig() { sampleGenerationConfig.region = null; sampleGenerationConfig.district = null; sampleGenerationConfig.samplePurpose = SamplePurpose.EXTERNAL; - sampleGenerationConfig.sampleMaterial = SampleMaterial.BLOOD; + sampleGenerationConfig.sampleMaterial = SampleMaterial.WHOLE_BLOOD; sampleGenerationConfig.laboratory = FacadeProvider.getFacilityFacade().getAllActiveLaboratories(false).get(0); return sampleGenerationConfig; } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/infrastructure/FacilitiesView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/infrastructure/FacilitiesView.java index 2b81a4300d4..549be832b56 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/infrastructure/FacilitiesView.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/configuration/infrastructure/FacilitiesView.java @@ -20,6 +20,7 @@ import java.util.Set; import java.util.stream.Collectors; +import de.symeda.sormas.api.infrastructure.facility.*; import org.vaadin.hene.popupbutton.PopupButton; import com.vaadin.icons.VaadinIcons; @@ -43,12 +44,6 @@ import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; import de.symeda.sormas.api.infrastructure.country.CountryReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityCriteria; -import de.symeda.sormas.api.infrastructure.facility.FacilityDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityExportDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityIndexDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityType; -import de.symeda.sormas.api.infrastructure.facility.FacilityTypeGroup; import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto; import de.symeda.sormas.api.user.UserRight; import de.symeda.sormas.ui.ControllerProvider; @@ -83,6 +78,7 @@ public class FacilitiesView extends AbstractConfigurationView { private SearchField searchField; private ComboBox typeGroupFilter; private ComboBox typeFilter; + private ComboBox dhimsFacilityTypeFilter; private ComboBox countryFilter; private ComboBox regionFilter; private ComboBox districtFilter; @@ -276,6 +272,16 @@ private HorizontalLayout createFilterBar() { }); filterLayout.addComponent(typeFilter); + dhimsFacilityTypeFilter = ComboBoxHelper.createComboBoxV7(); + dhimsFacilityTypeFilter.setId(FacilityDto.DHIMS_FACILITY_TYPE); + dhimsFacilityTypeFilter.setWidth(220, Unit.PIXELS); + dhimsFacilityTypeFilter.setCaption(I18nProperties.getPrefixCaption(FacilityDto.I18N_PREFIX, FacilityDto.DHIMS_FACILITY_TYPE)); + dhimsFacilityTypeFilter.addValueChangeListener(e -> { + criteria.dhimsFacilityType((DhimsFacility) e.getProperty().getValue()); + navigateTo(criteria); + }); + filterLayout.addComponent(dhimsFacilityTypeFilter); + countryFilter = addCountryFilter(filterLayout, country -> { criteria.country(country); grid.reload(); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactController.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactController.java index db59492fa44..4a821a33687 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactController.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/contact/ContactController.java @@ -23,6 +23,7 @@ import java.util.function.Supplier; import java.util.stream.Collectors; +import de.symeda.sormas.api.utils.*; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -67,10 +68,6 @@ import de.symeda.sormas.api.person.PersonFacade; import de.symeda.sormas.api.user.UserDto; import de.symeda.sormas.api.user.UserRight; -import de.symeda.sormas.api.utils.DataHelper; -import de.symeda.sormas.api.utils.DateFormatHelper; -import de.symeda.sormas.api.utils.ValidationRuntimeException; -import de.symeda.sormas.api.utils.YesNoUnknown; import de.symeda.sormas.ui.ControllerProvider; import de.symeda.sormas.ui.SormasUI; import de.symeda.sormas.ui.UserProvider; @@ -401,7 +398,7 @@ public CommitDiscardWrapperComponent getContactCreateComponen final ContactDto dto = createForm.getValue(); if (asSourceContact && caze != null) { CaseDataDto caseDto = FacadeProvider.getCaseFacade().getByUuid(caze.getUuid()); - caseDto.getEpiData().setContactWithSourceCaseKnown(YesNoUnknown.YES); + caseDto.getEpiData().setContactWithSourceCaseKnown(YesNo.YES); FacadeProvider.getCaseFacade().save(caseDto); } if (asSourceContact && alternativeCallback != null && casePerson != null) { diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/dashboard/map/DashboardMapComponent.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/dashboard/map/DashboardMapComponent.java index 154895d3f1f..346ba150dc3 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/dashboard/map/DashboardMapComponent.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/dashboard/map/DashboardMapComponent.java @@ -577,10 +577,10 @@ private HorizontalLayout createFooter() { } } - PopupButton layersDropdown = ButtonHelper.createPopupButton(Captions.dashboardMapLayers, layersLayout, CssStyles.BUTTON_SUBTLE); + //PopupButton layersDropdown = ButtonHelper.createPopupButton(Captions.dashboardMapLayers, layersLayout, CssStyles.BUTTON_SUBTLE); - mapFooterLayout.addComponent(layersDropdown); - mapFooterLayout.setComponentAlignment(layersDropdown, Alignment.MIDDLE_RIGHT); + //mapFooterLayout.addComponent(layersDropdown); + //mapFooterLayout.setComponentAlignment(layersDropdown, Alignment.MIDDLE_RIGHT); return mapFooterLayout; } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java index 6642586b64a..7a9767b80c9 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/epidata/EpiDataForm.java @@ -29,6 +29,7 @@ import java.util.function.Consumer; import java.util.function.Supplier; +import de.symeda.sormas.api.utils.YesNo; import org.apache.commons.collections.CollectionUtils; import com.vaadin.shared.ui.ContentMode; @@ -58,17 +59,23 @@ public class EpiDataForm extends AbstractEditForm { private static final long serialVersionUID = 1L; private static final String LOC_EXPOSURE_INVESTIGATION_HEADING = "locExposureInvestigationHeading"; + private static final String LOC_EXPOSURE_TRAVEL_HISTORY_HEADING = "locExposureTravelHistoryHeading"; private static final String LOC_ACTIVITY_AS_CASE_INVESTIGATION_HEADING = "locActivityAsCaseInvestigationHeading"; private static final String LOC_SOURCE_CASE_CONTACTS_HEADING = "locSourceCaseContactsHeading"; private static final String LOC_EPI_DATA_FIELDS_HINT = "locEpiDataFieldsHint"; //@formatter:off private static final String MAIN_HTML_LAYOUT = - loc(LOC_EXPOSURE_INVESTIGATION_HEADING) + + loc(LOC_EXPOSURE_TRAVEL_HISTORY_HEADING) + + loc(EpiDataDto.RECENT_TRAVEL_OUTBREAK)+ + loc(EpiDataDto.CONTACT_SIMILAR_SYMPTOMS)+ + loc(EpiDataDto.CONTACT_SICK_ANIMALS)+ + loc(LOC_EXPOSURE_INVESTIGATION_HEADING) + loc(EpiDataDto.EXPOSURE_DETAILS_KNOWN) + loc(EpiDataDto.EXPOSURES) + - loc(LOC_ACTIVITY_AS_CASE_INVESTIGATION_HEADING) + + loc(LOC_ACTIVITY_AS_CASE_INVESTIGATION_HEADING) + loc(EpiDataDto.ACTIVITY_AS_CASE_DETAILS_KNOWN)+ + loc(EpiDataDto.ACTIVITIES_AS_CASE) + locCss(VSPACE_TOP_3, LOC_EPI_DATA_FIELDS_HINT) + loc(EpiDataDto.HIGH_TRANSMISSION_RISK_AREA) + @@ -110,6 +117,13 @@ protected void addFields() { addHeadingsAndInfoTexts(); } + NullableOptionGroup recentTravelOutbreak = addField(EpiDataDto.RECENT_TRAVEL_OUTBREAK, NullableOptionGroup.class); + recentTravelOutbreak.setCaption("Did the patient travel to a place with a recent history of outbreak?"); + NullableOptionGroup contactSimilarOutbreak = addField(EpiDataDto.CONTACT_SIMILAR_SYMPTOMS, NullableOptionGroup.class); + contactSimilarOutbreak.setCaption("Did the patient come in contact with someone with similar symptoms"); + NullableOptionGroup contactSickAnimals = addField(EpiDataDto.CONTACT_SICK_ANIMALS, NullableOptionGroup.class); + contactSickAnimals.setCaption("Did the patient come in contact with sick animal(s)?"); + NullableOptionGroup ogExposureDetailsKnown = addField(EpiDataDto.EXPOSURE_DETAILS_KNOWN, NullableOptionGroup.class); ExposuresField exposuresField = addField(EpiDataDto.EXPOSURES, ExposuresField.class); exposuresField.setEpiDataParentClass(parentClass); @@ -127,8 +141,8 @@ protected void addFields() { if (sourceContactsToggleCallback != null) { ogContactWithSourceCaseKnown.addValueChangeListener(e -> { - YesNoUnknown sourceContactsKnown = (YesNoUnknown) FieldHelper.getNullableSourceFieldValue((Field) e.getProperty()); - sourceContactsToggleCallback.accept(YesNoUnknown.YES == sourceContactsKnown); + YesNo sourceContactsKnown = (YesNo) FieldHelper.getNullableSourceFieldValue((Field) e.getProperty()); + sourceContactsToggleCallback.accept(YesNo.YES == sourceContactsKnown); }); } @@ -136,7 +150,7 @@ protected void addFields() { getFieldGroup(), EpiDataDto.EXPOSURES, EpiDataDto.EXPOSURE_DETAILS_KNOWN, - Collections.singletonList(YesNoUnknown.YES), + Collections.singletonList(YesNo.YES), true); initializeVisibilitiesAndAllowedVisibilities(); @@ -149,16 +163,27 @@ protected void addFields() { if (diseaseCheck()) { setVisible(false, EpiDataDto.EXPOSURES, EpiDataDto.EXPOSURE_DETAILS_KNOWN, EpiDataDto.CONTACT_WITH_SOURCE_CASE_KNOWN); } + + if (diseaseCSMCheck()) { + recentTravelOutbreak.setVisible(false); + contactSickAnimals.setVisible(false); + + setVisible(false, EpiDataDto.HIGH_TRANSMISSION_RISK_AREA, EpiDataDto.LARGE_OUTBREAKS_AREA, EpiDataDto.ACTIVITY_AS_CASE_DETAILS_KNOWN); + + } + } private void addActivityAsCaseFields() { - getContent().addComponent( - new MultilineLabel( - h3(I18nProperties.getString(Strings.headingActivityAsCase)) - + divsCss(VSPACE_3, I18nProperties.getString(Strings.infoActivityAsCaseInvestigation)), - ContentMode.HTML), - LOC_ACTIVITY_AS_CASE_INVESTIGATION_HEADING); + if(!diseaseCSMCheck()){ + getContent().addComponent( + new MultilineLabel( + h3(I18nProperties.getString(Strings.headingActivityAsCase)) + + divsCss(VSPACE_3, I18nProperties.getString(Strings.infoActivityAsCaseInvestigation)), + ContentMode.HTML), + LOC_ACTIVITY_AS_CASE_INVESTIGATION_HEADING); + } NullableOptionGroup ogActivityAsCaseDetailsKnown = addField(EpiDataDto.ACTIVITY_AS_CASE_DETAILS_KNOWN, NullableOptionGroup.class); ActivityAsCaseField activityAsCaseField = addField(EpiDataDto.ACTIVITIES_AS_CASE, ActivityAsCaseField.class); @@ -169,7 +194,7 @@ private void addActivityAsCaseFields() { getFieldGroup(), EpiDataDto.ACTIVITIES_AS_CASE, EpiDataDto.ACTIVITY_AS_CASE_DETAILS_KNOWN, - Collections.singletonList(YesNoUnknown.YES), + Collections.singletonList(YesNo.YES), true); activityAsCaseField.addValueChangeListener(e -> { @@ -216,4 +241,5 @@ protected String createHtmlLayout() { private boolean diseaseCheck(){ return disease == Disease.YELLOW_FEVER; } + private boolean diseaseCSMCheck(){return disease == Disease.CSM; } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/exposure/ExposuresField.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/exposure/ExposuresField.java index fff89034677..3b3fe778d7a 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/exposure/ExposuresField.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/exposure/ExposuresField.java @@ -19,6 +19,7 @@ import java.util.function.Consumer; import java.util.function.Supplier; +import de.symeda.sormas.api.utils.YesNo; import org.apache.commons.lang3.StringUtils; import com.vaadin.icons.VaadinIcons; @@ -146,10 +147,10 @@ private void addGeneratedColumns(Table table) { : (exposure.getTypeOfAnimalDetails() != null ? exposure.getTypeOfAnimalDetails() : TypeOfAnimal.OTHER.toString())) + ")"; } - if (exposure.getRiskArea() == YesNoUnknown.YES || exposure.isProbableInfectionEnvironment()) + if (exposure.getRiskArea() == YesNo.YES || exposure.isProbableInfectionEnvironment()) exposureString = "" + exposureString + ""; - if (exposure.getRiskArea() == YesNoUnknown.YES) { + if (exposure.getRiskArea() == YesNo.YES) { exposureString = VaadinIcons.INFO_CIRCLE.getHtml() + " " + exposureString; } @@ -159,7 +160,7 @@ private void addGeneratedColumns(Table table) { Label exposureTypeLabel = new Label(exposureString, ContentMode.HTML); - if (exposure.getRiskArea() == YesNoUnknown.YES) { + if (exposure.getRiskArea() == YesNo.YES) { exposureTypeLabel.setDescription(I18nProperties.getString(Strings.infoExposuresRiskAreaHint) + " "); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/hospitalization/HospitalizationForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/hospitalization/HospitalizationForm.java index c8d147f1b4d..da9f60f52dd 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/hospitalization/HospitalizationForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/hospitalization/HospitalizationForm.java @@ -16,26 +16,26 @@ package de.symeda.sormas.ui.hospitalization; import static de.symeda.sormas.ui.utils.CssStyles.H3; -import static de.symeda.sormas.ui.utils.LayoutUtil.fluidRowLocs; -import static de.symeda.sormas.ui.utils.LayoutUtil.loc; +import static de.symeda.sormas.ui.utils.CssStyles.VSPACE_TOP_3; +import static de.symeda.sormas.ui.utils.LayoutUtil.*; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Objects; +import com.vaadin.v7.ui.*; import de.symeda.sormas.api.Disease; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; +import de.symeda.sormas.api.sample.SampleDto; +import de.symeda.sormas.api.utils.AFPFacilityOptions; +import de.symeda.sormas.api.utils.YesNo; import org.joda.time.DateTimeComparator; import com.vaadin.server.ErrorMessage; import com.vaadin.server.UserError; import com.vaadin.shared.ui.ErrorLevel; import com.vaadin.ui.Label; -import com.vaadin.v7.ui.ComboBox; -import com.vaadin.v7.ui.DateField; -import com.vaadin.v7.ui.Field; -import com.vaadin.v7.ui.TextArea; -import com.vaadin.v7.ui.TextField; import de.symeda.sormas.api.FacadeProvider; import de.symeda.sormas.api.caze.CaseDataDto; @@ -69,13 +69,18 @@ public class HospitalizationForm extends AbstractEditForm { private static final String HOSPITALIZATION_HEADING_LOC = "hospitalizationHeadingLoc"; private static final String PREVIOUS_HOSPITALIZATIONS_HEADING_LOC = "previousHospitalizationsHeadingLoc"; + private static final String FILL_SECTION_HEADING_LOC = "fillSectionHeadingLoc"; + private static final String SEEK_HELP_HEADING_LOC = "seekHelpHeadingLoc"; private static final String HEALTH_FACILITY = Captions.CaseHospitalization_healthFacility; //@formatter:off private static final String HTML_LAYOUT = loc(HOSPITALIZATION_HEADING_LOC) + fluidRowLocs(HospitalizationDto.ADMITTED_TO_HEALTH_FACILITY) + - fluidRowLocs(HEALTH_FACILITY) + + fluidRowLocs(HEALTH_FACILITY) + + fluidRowLocs(HospitalizationDto.ADMITTED_TO_HEALTH_FACILITY_NEW) + + fluidRowLocs(4,HospitalizationDto.DATE_FIRST_SEEN_HOSPITAL_FOR_DISEASE, 4,HospitalizationDto.TERMINATION_DATE_HOSPITAL_STAY) + fluidRowLocs(HospitalizationDto.ADMISSION_DATE, HospitalizationDto.DISCHARGE_DATE, HospitalizationDto.LEFT_AGAINST_ADVICE, "") + + fluidRowLocs(6,HospitalizationDto.NOTIFY_DISTRICT_DATE) + fluidRowLocs(HospitalizationDto.HOSPITALIZATION_REASON, HospitalizationDto.OTHER_HOSPITALIZATION_REASON) + fluidRowLocs(3, HospitalizationDto.INTENSIVE_CARE_UNIT, 3, HospitalizationDto.INTENSIVE_CARE_UNIT_START, @@ -85,7 +90,18 @@ public class HospitalizationForm extends AbstractEditForm { + fluidRowLocs(HospitalizationDto.DESCRIPTION) + loc(PREVIOUS_HOSPITALIZATIONS_HEADING_LOC) + fluidRowLocs(HospitalizationDto.HOSPITALIZED_PREVIOUSLY) + - fluidRowLocs(HospitalizationDto.PREVIOUS_HOSPITALIZATIONS); + fluidRowLocs(HospitalizationDto.PREVIOUS_HOSPITALIZATIONS) + + fluidRowLocs(6, HospitalizationDto.DISEASE_ONSET_DATE) + + fluidRowLocs(HospitalizationDto.PATIENT_HOSPITALIZED_DETAINED) + + + //AFP + loc(FILL_SECTION_HEADING_LOC) + + loc(SEEK_HELP_HEADING_LOC) + + fluidRowLocs(HospitalizationDto.PLACE, HospitalizationDto.DURATION_MONTHS, HospitalizationDto.DURATION_DAYS) + + fluidRowLocs(HospitalizationDto.PLACE2, HospitalizationDto.DURATION_MONTHS2, HospitalizationDto.DURATION_DAYS2) + + locCss(VSPACE_TOP_3, HospitalizationDto.INVESTIGATOR_NAME) + + fluidRowLocs(HospitalizationDto.INVESTIGATOR_TITLE, HospitalizationDto.INVESTIGATOR_UNIT) + + fluidRowLocs(HospitalizationDto.INVESTIGATOR_ADDRESS, HospitalizationDto.INVESTIGATOR_TEL); private final CaseDataDto caze; private final ViewMode viewMode; private NullableOptionGroup intensiveCareUnit; @@ -124,56 +140,112 @@ protected void addFields() { getContent().addComponent(previousHospitalizationsHeadingLabel, PREVIOUS_HOSPITALIZATIONS_HEADING_LOC); TextField facilityField = addCustomField(HEALTH_FACILITY, FacilityReferenceDto.class, TextField.class); - FacilityReferenceDto healthFacility = caze.getHealthFacility(); - final boolean noneFacility = healthFacility == null || healthFacility.getUuid().equalsIgnoreCase(FacilityDto.NONE_FACILITY_UUID); - facilityField.setValue(noneFacility || !FacilityType.HOSPITAL.equals(caze.getFacilityType()) ? null : healthFacility.toString()); +// FacilityReferenceDto healthFacility = caze.getHealthFacility(); + + String healthFacility = caze.getHospitalName(); + DhimsFacility facilityType = caze.getDhimsFacilityType(); + AFPFacilityOptions afpFacilityOptions = caze.getAfpFacilityOptions(); + final boolean noneFacility = healthFacility == null || healthFacility.equalsIgnoreCase(FacilityDto.NONE_FACILITY_UUID); + + if (facilityType != null && facilityType != DhimsFacility.HOSPITAL){ + facilityField.setValue(String.valueOf(facilityType)); + } + else if(afpFacilityOptions != null && afpFacilityOptions != AFPFacilityOptions.Hospital){ + facilityField.setValue(String.valueOf(afpFacilityOptions)); + } + else if(healthFacility != null ){ + facilityField.setValue(healthFacility); + } + else { + System.out.println("Is facility type HOSPITAL: " + DhimsFacility.HOSPITAL.equals(caze.getDhimsFacilityType())); + facilityField.setValue(noneFacility || !DhimsFacility.HOSPITAL.equals(caze.getDhimsFacilityType()) ? null : healthFacility); + } facilityField.setReadOnly(true); final NullableOptionGroup admittedToHealthFacilityField = addField(HospitalizationDto.ADMITTED_TO_HEALTH_FACILITY, NullableOptionGroup.class); + admittedToHealthFacilityField.setVisible(false); + + final NullableOptionGroup admittedToHealthFacilityFieldNew = addField(HospitalizationDto.ADMITTED_TO_HEALTH_FACILITY_NEW, NullableOptionGroup.class); + admittedToHealthFacilityFieldNew.setVisible(false); + admittedToHealthFacilityFieldNew.setCaption("Was the Patient Admitted at the Facility (in-patient)?"); final DateField admissionDateField = addField(HospitalizationDto.ADMISSION_DATE, DateField.class); final DateField dischargeDateField = addDateField(HospitalizationDto.DISCHARGE_DATE, DateField.class, 7); intensiveCareUnit = addField(HospitalizationDto.INTENSIVE_CARE_UNIT, NullableOptionGroup.class); intensiveCareUnitStart = addField(HospitalizationDto.INTENSIVE_CARE_UNIT_START, DateField.class); + DateField notifyDistrictDate = addField(HospitalizationDto.NOTIFY_DISTRICT_DATE, DateField.class); + DateField dateFirstSeen = addField(HospitalizationDto.DATE_FIRST_SEEN_HOSPITAL_FOR_DISEASE, DateField.class); + DateField terminationDateHospitalStay = addField(HospitalizationDto.TERMINATION_DATE_HOSPITAL_STAY, DateField.class); + dateFirstSeen.setVisible(false); + notifyDistrictDate.setVisible(false); intensiveCareUnitStart.setVisible(false); + terminationDateHospitalStay.setVisible(false); intensiveCareUnitEnd = addField(HospitalizationDto.INTENSIVE_CARE_UNIT_END, DateField.class); intensiveCareUnitEnd.setVisible(false); FieldHelper - .setVisibleWhen(intensiveCareUnit, Arrays.asList(intensiveCareUnitStart, intensiveCareUnitEnd), Arrays.asList(YesNoUnknown.YES), true); + .setVisibleWhen(intensiveCareUnit, Arrays.asList(intensiveCareUnitStart, intensiveCareUnitEnd), Arrays.asList(YesNo.YES), true); final Field isolationDateField = addField(HospitalizationDto.ISOLATION_DATE); final TextArea descriptionField = addField(HospitalizationDto.DESCRIPTION, TextArea.class); descriptionField.setRows(4); final NullableOptionGroup isolatedField = addField(HospitalizationDto.ISOLATED, NullableOptionGroup.class); final NullableOptionGroup leftAgainstAdviceField = addField(HospitalizationDto.LEFT_AGAINST_ADVICE, NullableOptionGroup.class); - final ComboBox hospitalizationReason = addField(HospitalizationDto.HOSPITALIZATION_REASON); - final TextField otherHospitalizationReason = addField(HospitalizationDto.OTHER_HOSPITALIZATION_REASON, TextField.class); + ComboBox hospitalizationReason = addField(HospitalizationDto.HOSPITALIZATION_REASON); + TextField otherHospitalizationReason = addField(HospitalizationDto.OTHER_HOSPITALIZATION_REASON, TextField.class); NullableOptionGroup hospitalizedPreviouslyField = addField(HospitalizationDto.HOSPITALIZED_PREVIOUSLY, NullableOptionGroup.class); CssStyles.style(hospitalizedPreviouslyField, CssStyles.ERROR_COLOR_PRIMARY); PreviousHospitalizationsField previousHospitalizationsField = addField(HospitalizationDto.PREVIOUS_HOSPITALIZATIONS, PreviousHospitalizationsField.class); if(caze.getDisease() == Disease.AFP){ - admittedToHealthFacilityField.removeItem(YesNoUnknown.UNKNOWN); - setVisible(false, HospitalizationDto.LEFT_AGAINST_ADVICE, HospitalizationDto.INTENSIVE_CARE_UNIT, HospitalizationDto.ISOLATED); + + Label fillThisSectionHeadingLabel = new Label(I18nProperties.getString(Strings.headingFillThis)); + fillThisSectionHeadingLabel.addStyleName(H3); + getContent().addComponent(fillThisSectionHeadingLabel, FILL_SECTION_HEADING_LOC); + + Label childSeekhelpHeadingLabel = new Label(I18nProperties.getString(Strings.headingChildSeek)); + childSeekhelpHeadingLabel.addStyleName(H3); + getContent().addComponent(childSeekhelpHeadingLabel, SEEK_HELP_HEADING_LOC); + + TextField place = addField(HospitalizationDto.PLACE, TextField.class); + TextField durationMonths = addField(HospitalizationDto.DURATION_MONTHS, TextField.class); + TextField durationDays = addField(HospitalizationDto.DURATION_DAYS, TextField.class); + TextField place2 = addField(HospitalizationDto.PLACE2, TextField.class); + TextField durationMonths2 = addField(HospitalizationDto.DURATION_MONTHS2, TextField.class); + TextField durationDays2 = addField(HospitalizationDto.DURATION_DAYS2, TextField.class); + TextField investigatorName = addField(HospitalizationDto.INVESTIGATOR_NAME, TextField.class); + TextField investigatorTitle = addField(HospitalizationDto.INVESTIGATOR_TITLE, TextField.class); + TextField investigatorUnit = addField(HospitalizationDto.INVESTIGATOR_UNIT, TextField.class); + TextField investigatorAddress = addField(HospitalizationDto.INVESTIGATOR_ADDRESS, TextField.class); + TextField investigatorTel = addField(HospitalizationDto.INVESTIGATOR_TEL, TextField.class); + + admittedToHealthFacilityFieldNew.setVisible(true); + setVisible(false, HospitalizationDto.LEFT_AGAINST_ADVICE, HospitalizationDto.INTENSIVE_CARE_UNIT, HospitalizationDto.ISOLATED, HospitalizationDto.ADMITTED_TO_HEALTH_FACILITY); + hospitalizationReason.setVisible(false); + hospitalizedPreviouslyField.setVisible(false); + previousHospitalizationsHeadingLabel.setVisible(false); } - FieldHelper.setEnabledWhen( - admittedToHealthFacilityField, - Arrays.asList(YesNoUnknown.YES, YesNoUnknown.NO, YesNoUnknown.UNKNOWN), - Arrays.asList( - facilityField, - admissionDateField, - dischargeDateField, - intensiveCareUnit, - intensiveCareUnitStart, - intensiveCareUnitEnd, - isolationDateField, - descriptionField, - isolatedField, - leftAgainstAdviceField, - hospitalizationReason, - otherHospitalizationReason), - false); + /*if(caze.getDisease() != Disease.AHF) { + FieldHelper.setEnabledWhen( + admittedToHealthFacilityField, + Arrays.asList(YesNo.YES, YesNo.NO), + Arrays.asList( + facilityField, + admissionDateField, + dischargeDateField, + intensiveCareUnit, + intensiveCareUnitStart, + intensiveCareUnitEnd, + isolationDateField, + descriptionField, + isolatedField, + leftAgainstAdviceField, + hospitalizationReason, + otherHospitalizationReason), + false); + }*/ + + initializeVisibilitiesAndAllowedVisibilities(); initializeAccessAndAllowedAccesses(); @@ -183,7 +255,7 @@ protected void addFields() { getFieldGroup(), HospitalizationDto.ISOLATION_DATE, HospitalizationDto.ISOLATED, - Arrays.asList(YesNoUnknown.YES), + Arrays.asList(YesNo.YES), true); } if (isVisibleAllowed(HospitalizationDto.PREVIOUS_HOSPITALIZATIONS)) { @@ -191,7 +263,7 @@ protected void addFields() { getFieldGroup(), HospitalizationDto.PREVIOUS_HOSPITALIZATIONS, HospitalizationDto.HOSPITALIZED_PREVIOUSLY, - Arrays.asList(YesNoUnknown.YES), + Arrays.asList(YesNo.YES), true); } @@ -277,14 +349,63 @@ public String getFormattedHtmlMessage() { intensiveCareUnitEnd.addValueChangeListener(event -> intensiveCareUnitStart.markAsDirty()); hospitalizedPreviouslyField.addValueChangeListener(e -> updatePrevHospHint(hospitalizedPreviouslyField, previousHospitalizationsField)); previousHospitalizationsField.addValueChangeListener(e -> updatePrevHospHint(hospitalizedPreviouslyField, previousHospitalizationsField)); + + if(caze.getDisease() == Disease.CSM){ + addField(HospitalizationDto.DISEASE_ONSET_DATE, DateField.class); + addField(HospitalizationDto.PATIENT_HOSPITALIZED_DETAINED, NullableOptionGroup.class); + + setVisible(false, HospitalizationDto.ADMITTED_TO_HEALTH_FACILITY, HEALTH_FACILITY, HospitalizationDto.DISCHARGE_DATE, HospitalizationDto.LEFT_AGAINST_ADVICE, + HospitalizationDto.INTENSIVE_CARE_UNIT, HospitalizationDto.ISOLATED, HospitalizationDto.DESCRIPTION); + + hospitalizationReason.setVisible(false); + hospitalizedPreviouslyField.setVisible(false); + previousHospitalizationsHeadingLabel.setVisible(false); + + } + + if(caze.getDisease() == Disease.AHF){ + setVisible(false, HospitalizationDto.ADMISSION_DATE,HospitalizationDto.DISCHARGE_DATE, HospitalizationDto.LEFT_AGAINST_ADVICE, HospitalizationDto.ISOLATED); + hospitalizationReason.setVisible(false); + hospitalizedPreviouslyField.setVisible(false); + previousHospitalizationsHeadingLabel.setVisible(false); + + admittedToHealthFacilityFieldNew.setVisible(true); + + } + + if(caze.getDisease() == Disease.YELLOW_FEVER){ + notifyDistrictDate.setVisible(true); + hospitalizationReason.setVisible(false); + hospitalizedPreviouslyField.setVisible(false); + previousHospitalizationsHeadingLabel.setVisible(false); + } + + if(caze.getDisease() == Disease.NEW_INFLUENZA){ + + hospitalizationReason.setVisible(false); + hospitalizedPreviouslyField.setVisible(false); + previousHospitalizationsHeadingLabel.setVisible(false); + leftAgainstAdviceField.setVisible(false); + isolatedField.setVisible(false); + descriptionField.setVisible(false); + + admittedToHealthFacilityFieldNew.setVisible(true); + admissionDateField.setVisible(true); + dischargeDateField.setVisible(true); + dateFirstSeen.setVisible(true); + terminationDateHospitalStay.setVisible(true); + dischargeDateField.setCaption("Date person discharged from hospital"); + admissionDateField.setCaption("Date of admission (in-patient)"); + + } } private void updatePrevHospHint(NullableOptionGroup hospitalizedPreviouslyField, PreviousHospitalizationsField previousHospitalizationsField) { - YesNoUnknown value = (YesNoUnknown) hospitalizedPreviouslyField.getNullableValue(); + YesNo value = (YesNo) hospitalizedPreviouslyField.getNullableValue(); Collection previousHospitalizations = previousHospitalizationsField.getValue(); if (UserProvider.getCurrent().hasUserRight(UserRight.CASE_EDIT) - && value == YesNoUnknown.YES + && value == YesNo.YES && (previousHospitalizations == null || previousHospitalizations.size() == 0)) { hospitalizedPreviouslyField.setComponentError(new UserError(I18nProperties.getValidationError(Validations.softAddEntryToList))); } else { diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/immunization/components/filter/ImmunizationFilterForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/immunization/components/filter/ImmunizationFilterForm.java index 752956e939e..702a6b2e2dc 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/immunization/components/filter/ImmunizationFilterForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/immunization/components/filter/ImmunizationFilterForm.java @@ -24,6 +24,7 @@ import de.symeda.sormas.api.immunization.ImmunizationDateType; import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import de.symeda.sormas.api.infrastructure.facility.FacilityDto; import de.symeda.sormas.api.infrastructure.facility.FacilityType; import de.symeda.sormas.api.infrastructure.facility.FacilityTypeGroup; @@ -52,6 +53,7 @@ public class ImmunizationFilterForm extends AbstractFilterForm errorLineAsList = new ArrayList<>(); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/location/LocationEditForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/location/LocationEditForm.java index f88208df512..6fed16afae6 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/location/LocationEditForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/location/LocationEditForm.java @@ -32,6 +32,7 @@ import de.symeda.sormas.api.InfrastructureDataReferenceDto; import de.symeda.sormas.api.caze.CaseDataDto; import de.symeda.sormas.api.infrastructure.area.AreaType; +import de.symeda.sormas.api.infrastructure.facility.*; import de.symeda.sormas.ui.caze.CaseDataForm; import de.symeda.sormas.ui.caze.CasePersonView; import de.symeda.sormas.ui.person.PersonEditForm; @@ -70,10 +71,6 @@ import de.symeda.sormas.api.infrastructure.continent.ContinentReferenceDto; import de.symeda.sormas.api.infrastructure.country.CountryReferenceDto; import de.symeda.sormas.api.infrastructure.district.DistrictReferenceDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityType; -import de.symeda.sormas.api.infrastructure.facility.FacilityTypeGroup; import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto; import de.symeda.sormas.api.infrastructure.subcontinent.SubcontinentCriteria; import de.symeda.sormas.api.infrastructure.subcontinent.SubcontinentReferenceDto; @@ -108,17 +105,20 @@ public class LocationEditForm extends AbstractEditForm { divs( fluidRowLocs(LocationDto.COUNTRY, COUNTRY_HINT_LOC, ""), fluidRowLocs(LocationDto.ADDRESS_TYPE, LocationDto.ADDRESS_TYPE_DETAILS, ""), - fluidRowLocs(LocationDto.CONTINENT, LocationDto.SUB_CONTINENT, ""), + //fluidRowLocs(LocationDto.CONTINENT, LocationDto.SUB_CONTINENT, ""), fluidRowLocs(LocationDto.REGION, LocationDto.DISTRICT, LocationDto.COMMUNITY), - fluidRowLocs(FACILITY_TYPE_GROUP_LOC, LocationDto.FACILITY_TYPE), - fluidRowLocs(LocationDto.FACILITY, LocationDto.FACILITY_DETAILS), - fluidRowLocs(LocationDto.STREET, LocationDto.HOUSE_NUMBER, LocationDto.ADDITIONAL_INFORMATION), - fluidRowLocs(LocationDto.POSTAL_CODE, LocationDto.CITY, LocationDto.AREA_TYPE), -// fluidRowLocs(LocationDto.LAND_MARK), + //fluidRowLocs(FACILITY_TYPE_GROUP_LOC, LocationDto.FACILITY_TYPE), + //fluidRowLocs(LocationDto.FACILITY, LocationDto.FACILITY_DETAILS), + fluidRowLocs(6,LocationDto.STREET), + fluidRowLocs(6,LocationDto.ADDITIONAL_INFORMATION), + fluidRowLocs(6,LocationDto.HOUSE_NUMBER), + fluidRowLocs(LocationDto.CITY, LocationDto.AREA_TYPE), + fluidRowLocs(6,LocationDto.POSTAL_CODE), + fluidRowLocs(6,LocationDto.LAND_MARK), fluidRowLocs(LocationDto.CONTACT_PERSON_FIRST_NAME, LocationDto.CONTACT_PERSON_LAST_NAME), fluidRowLocs(LocationDto.CONTACT_PERSON_PHONE, LocationDto.CONTACT_PERSON_EMAIL), fluidRow( - fluidColumnLoc(4, 0, LocationDto.DETAILS), + //fluidColumnLoc(4, 0, LocationDto.DETAILS), fluidColumnLoc(2, 0, GEO_BUTTONS_LOC), fluidColumnLoc(2, 0, LocationDto.LATITUDE), fluidColumnLoc(2, 0, LocationDto.LONGITUDE), @@ -128,6 +128,7 @@ public class LocationEditForm extends AbstractEditForm { private ComboBox addressType; private ComboBox facilityTypeGroup; private ComboBox facilityType; + private ComboBox dhimsFacilityType; private ComboBox facility; private TextField facilityDetails; private ComboBox continent; @@ -155,10 +156,10 @@ public LocationEditForm(FieldVisibilityCheckers fieldVisibilityCheckers, UiField public ComboBox getFacilityTypeGroup() { return facilityTypeGroup; } - public ComboBox getFacilityType() { return facilityType; } + public ComboBox getDhimsFacilityType() {return dhimsFacilityType;} private void setConvertedValue(String propertyId, Object value) { ((AbstractField) getField(propertyId)).setConvertedValue(value); @@ -239,6 +240,8 @@ protected void addFields() { TextField postalCodeField = addField(LocationDto.POSTAL_CODE, TextField.class); areaType = addField(LocationDto.AREA_TYPE, ComboBox.class); + areaType.removeItem(AreaType.UNKNOWN); + areaType.setVisible(false); areaType.setDescription(I18nProperties.getDescription(getPropertyI18nPrefix() + "." + LocationDto.AREA_TYPE)); contactPersonFirstName = addField(LocationDto.CONTACT_PERSON_FIRST_NAME, TextField.class); @@ -255,12 +258,16 @@ protected void addFields() { final AccessibleTextField tfAccuracy = addField(LocationDto.LAT_LON_ACCURACY, AccessibleTextField.class); final StringToAngularLocationConverter stringToAngularLocationConverter = new StringToAngularLocationConverter(); tfLatitude.setConverter(stringToAngularLocationConverter); + tfLatitude.setVisible(false); tfLongitude.setConverter(stringToAngularLocationConverter); + tfLongitude.setVisible(false); tfAccuracy.setConverter(stringToAngularLocationConverter); + tfAccuracy.setVisible(false); continent = addInfrastructureField(LocationDto.CONTINENT); subcontinent = addInfrastructureField(LocationDto.SUB_CONTINENT); country = addInfrastructureField(LocationDto.COUNTRY); + country.setVisible(false); ComboBox region = addInfrastructureField(LocationDto.REGION); ComboBox district = addInfrastructureField(LocationDto.DISTRICT); ComboBox community = addInfrastructureField(LocationDto.COMMUNITY); @@ -864,15 +871,47 @@ public void setCoordinates(GeoLatLon coordinates) { } } + public void setOnlyUnknownForYellowFever(Disease incomingDisease) { + newDisease = incomingDisease; + if (newDisease != null && newDisease.equals(Disease.YELLOW_FEVER)) { + setVisible(true, LocationDto.LONGITUDE, LocationDto.LATITUDE, LocationDto.LAND_MARK); + } + } + public void setOnlyUnknownForAHF(Disease incomingDisease) { + newDisease = incomingDisease; + if (newDisease != null && newDisease.equals(Disease.AHF)) { + setVisible(false, + LocationDto.POSTAL_CODE, LocationDto.ADDITIONAL_INFORMATION); + } + } + public void setOnlyUnknownForCSM(Disease incomingDisease) { newDisease = incomingDisease; if (newDisease != null && newDisease.equals(Disease.CSM)) { - additionalInformationField.setCaption("Landmark"); - for (AreaType areatype : AreaType.values()) { - if (areatype != AreaType.UNKNOWN) { - areaType.removeItem(areatype); - } - } + setVisible(true, LocationDto.LONGITUDE, LocationDto.LATITUDE, LocationDto.LAT_LON_ACCURACY, LocationDto.LAND_MARK); + } + } + + public void setOnlyUnknownForInfluenza(Disease incomingDisease) { + newDisease = incomingDisease; + if (newDisease != null && newDisease.equals(Disease.NEW_INFLUENZA)) { + setVisible(false, + LocationDto.POSTAL_CODE, LocationDto.STREET, LocationDto.REGION, LocationDto.DISTRICT, LocationDto.COMMUNITY); + additionalInformationField.setCaption("Address (Location)"); + areaType.setVisible(true); + + } + } + public void setOnlyUnknownForAFP(Disease incomingDisease) { + newDisease = incomingDisease; + if (newDisease != null && newDisease.equals(Disease.AFP)) { + additionalInformationField.setCaption("Village"); + + setVisible(false, LocationDto.ADDRESS_TYPE, + LocationDto.ADDRESS_TYPE_DETAILS, + LocationDto.CITY, + LocationDto.STREET, + LocationDto.CONTACT_PERSON_FIRST_NAME); } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonContactDetailEditForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonContactDetailEditForm.java index 7039ea79fd7..096a22dc118 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonContactDetailEditForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonContactDetailEditForm.java @@ -12,6 +12,7 @@ import com.vaadin.v7.ui.Field; import com.vaadin.v7.ui.TextField; +import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.i18n.Captions; import de.symeda.sormas.api.i18n.I18nProperties; import de.symeda.sormas.api.i18n.Validations; @@ -35,8 +36,11 @@ public class PersonContactDetailEditForm extends AbstractEditForm { final Field contactInformationField = getFieldGroup().getField(PersonContactDetailDto.CONTACT_INFORMATION); final PersonContactDetailType value = (PersonContactDetailType) e.getProperty().getValue(); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonContactDetailsField.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonContactDetailsField.java index 7b97224fc6d..28fd8eb835e 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonContactDetailsField.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonContactDetailsField.java @@ -54,7 +54,7 @@ protected void editEntry(PersonContactDetailDto entry, boolean create, Consumer< entry.setUuid(DataHelper.createUuid()); } - PersonContactDetailEditForm editForm = new PersonContactDetailEditForm(fieldVisibilityCheckers, fieldAccessCheckers); + PersonContactDetailEditForm editForm = new PersonContactDetailEditForm(fieldVisibilityCheckers, fieldAccessCheckers, disease); editForm.setValue(entry); final CommitDiscardWrapperComponent editView = diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonCreateForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonCreateForm.java index c4c93f27579..4060692d614 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonCreateForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonCreateForm.java @@ -90,7 +90,7 @@ public class PersonCreateForm extends AbstractEditForm { private static final String HTML_LAYOUT = "%s" + fluidRow(fluidRowLocs(PersonDto.BIRTH_DATE_YYYY, PersonDto.BIRTH_DATE_MM, PersonDto.BIRTH_DATE_DD), fluidRowLocs(PersonDto.SEX)) + fluidRowLocs(PersonDto.GHANA_CARD, PersonDto.NATIONAL_HEALTH_ID, PersonDto.PASSPORT_NUMBER) - + fluidRowLocs(PersonDto.PRESENT_CONDITION, SymptomsDto.ONSET_DATE) + fluidRowLocs(PersonDto.PHONE, PersonDto.EMAIL_ADDRESS) + + fluidRowLocs(PersonDto.PRESENT_CONDITION, PersonDto.PHONE) + fluidRowLocs(6,PersonDto.EMAIL_ADDRESS) + fluidRowLocs(ENTER_HOME_ADDRESS_NOW) + loc(HOME_ADDRESS_HEADER) + divsCss(VSPACE_3, fluidRowLocs(HOME_ADDRESS_LOC)); private static final String NAME_ROW_WITH_PERSON_SEARCH = fluidRowLocs(PersonDto.FIRST_NAME, PersonDto.LAST_NAME, PersonDto.OTHER_NAME, PERSON_SEARCH_LOC); @@ -209,6 +209,7 @@ protected void addFields() { phone.setCaption(I18nProperties.getCaption(Captions.Person_phone)); TextField email = addCustomField(PersonDto.EMAIL_ADDRESS, String.class, TextField.class); email.setCaption(I18nProperties.getCaption(Captions.Person_emailAddress)); + email.setVisible(false); phone.addValidator(new PhoneNumberValidator(I18nProperties.getValidationError(Validations.validPhoneNumber, phone.getCaption()))); email.addValidator(new EmailValidator(I18nProperties.getValidationError(Validations.validEmailAddress, email.getCaption()))); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonEditForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonEditForm.java index 7d9a5cae3eb..e3137393b8f 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonEditForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/person/PersonEditForm.java @@ -112,24 +112,25 @@ public class PersonEditForm extends AbstractEditForm { oneOfFourCol(PersonDto.BURIAL_CONDUCTOR), oneOfTwoCol(PersonDto.BURIAL_PLACE_DESCRIPTION) ) + - fluidRowLocs(PersonDto.PASSPORT_NUMBER, PersonDto.NATIONAL_HEALTH_ID, PersonDto.GHANA_CARD) + - fluidRowLocs(PersonDto.EXTERNAL_ID, PersonDto.EXTERNAL_TOKEN) + - fluidRowLocs(PersonDto.INTERNAL_TOKEN, EXTERNAL_TOKEN_WARNING_LOC) + + fluidRowLocs(PersonDto.NATIONAL_HEALTH_ID, PersonDto.GHANA_CARD, PersonDto.PASSPORT_NUMBER) + + //fluidRowLocs(PersonDto.EXTERNAL_ID, PersonDto.EXTERNAL_TOKEN) + + //fluidRowLocs(PersonDto.INTERNAL_TOKEN, EXTERNAL_TOKEN_WARNING_LOC) + fluidRowLocs(PersonDto.HAS_COVID_APP, PersonDto.COVID_CODE_DELIVERED) + loc(OCCUPATION_HEADER) + divsCss(VSPACE_3, - fluidRowLocs(PersonDto.OCCUPATION_TYPE, PersonDto.OCCUPATION_DETAILS) + + fluidRowLocs(PersonDto.OCCUPATION_DETAILS, PersonDto.OCCUPATION_TYPE) + fluidRow(oneOfTwoCol(PersonDto.ARMED_FORCES_RELATION_TYPE)), fluidRowLocs(PersonDto.EDUCATION_TYPE, PersonDto.EDUCATION_DETAILS) ) + loc(ADDRESS_HEADER) + + fluidRowLocs(6,PersonDto.HOME_ADDRESS_RECREATIONAL) + divsCss(VSPACE_3, fluidRowLocs(PersonDto.ADDRESS)) + - loc(ADDRESSES_HEADER) + - fluidRowLocs(PersonDto.ADDRESSES) + + /*loc(ADDRESSES_HEADER) + + fluidRowLocs(PersonDto.ADDRESSES) +*/ loc(CONTACT_INFORMATION_HEADER) + divsCss( @@ -140,7 +141,8 @@ public class PersonEditForm extends AbstractEditForm { fluidRowLocs(PersonDto.NAMES_OF_GUARDIANS) + fluidRowLocs(PersonDto.BIRTH_COUNTRY, PersonDto.CITIZENSHIP) + fluidRowLocs(PersonDto.PERSON_CONTACT_DETAILS)) + - loc(GENERAL_COMMENT_LOC) + fluidRowLocs(CaseDataDto.ADDITIONAL_DETAILS); + loc(GENERAL_COMMENT_LOC) + fluidRowLocs(CaseDataDto.ADDITIONAL_DETAILS) + + fluidRowLocs(PersonDto.ADDITIONAL_PLACES_STAYED); private final Label occupationHeader = new Label(I18nProperties.getString(Strings.headingPersonOccupation)); private final Label addressHeader = new Label(I18nProperties.getPrefixCaption(PersonDto.I18N_PREFIX, PersonDto.ADDRESS)); private final Label addressesHeader = new Label(I18nProperties.getPrefixCaption(PersonDto.I18N_PREFIX, PersonDto.ADDRESSES)); @@ -231,8 +233,10 @@ protected void addFields() { } addField(PersonDto.SEX, sexComboBox); addField(PersonDto.BIRTH_NAME, TextField.class); - addField(PersonDto.NICKNAME, TextField.class); - addField(PersonDto.MOTHERS_MAIDEN_NAME, TextField.class); + TextField nickie = addField(PersonDto.NICKNAME, TextField.class); + nickie.setVisible(false); + TextField maiden = addField(PersonDto.MOTHERS_MAIDEN_NAME, TextField.class); + maiden.setVisible(false); addFields(PersonDto.MOTHERS_NAME, PersonDto.FATHERS_NAME); addFields(PersonDto.NAMES_OF_GUARDIANS); ComboBox presentCondition = addField(PersonDto.PRESENT_CONDITION, ComboBox.class); @@ -266,6 +270,8 @@ protected void addFields() { e -> ControllerProvider.getPersonController() .validateBirthDate((Integer) e, (Integer) birthDateMonth.getValue(), (Integer) birthDateDay.getValue())); + TextField homeaddrecreational = addField(CaseDataDto.HOME_ADDRESS_RECREATIONAL, TextField.class); + homeaddrecreational.setVisible(false); DateField deathDate = addField(PersonDto.DEATH_DATE, DateField.class); TextField approximateAgeField = addField(PersonDto.APPROXIMATE_AGE, TextField.class); approximateAgeField @@ -294,6 +300,11 @@ protected void addFields() { addressForm = addField(PersonDto.ADDRESS, LocationEditForm.class); addressForm.setOnlyUnknownForCSM(disease); + addressForm.setOnlyUnknownForAFP(disease); + addressForm.setOnlyUnknownForInfluenza(disease); + addressForm.setOnlyUnknownForYellowFever(disease); + addressForm.setOnlyUnknownForAHF(disease); + addressForm.setCaption(null); addField(PersonDto.ADDRESSES, LocationsField.class).setCaption(null); @@ -303,12 +314,14 @@ protected void addFields() { personContactDetailsField.setCaption(null); personContactDetailsField.setPseudonymized(isPseudonymized); - addFields( - PersonDto.OCCUPATION_TYPE, - PersonDto.OCCUPATION_DETAILS, - PersonDto.ARMED_FORCES_RELATION_TYPE, - PersonDto.EDUCATION_TYPE, - PersonDto.EDUCATION_DETAILS); + ComboBox occu = addField(PersonDto.OCCUPATION_TYPE, ComboBox.class); + TextField occuDetails = addField(PersonDto.OCCUPATION_DETAILS, TextField.class); + occuDetails.setCaption("Please Specify Occupation"); + ComboBox armedForces = addField(PersonDto.ARMED_FORCES_RELATION_TYPE, ComboBox.class); + ComboBox educationType = addField(PersonDto.EDUCATION_TYPE, ComboBox.class); + educationType.removeItem(EducationType.NURSERY); + TextField educationDetails = addField(PersonDto.EDUCATION_DETAILS, TextField.class); + occu.setVisible(false); List countries = FacadeProvider.getCountryFacade().getAllActiveAsReference(); addInfrastructureField(PersonDto.BIRTH_COUNTRY).addItems(countries); @@ -359,7 +372,6 @@ protected void addFields() { setRequired(true, PersonDto.FIRST_NAME, PersonDto.LAST_NAME, PersonDto.SEX); setVisible( false, - PersonDto.OCCUPATION_DETAILS, PersonDto.DEATH_DATE, PersonDto.DEATH_PLACE_TYPE, PersonDto.DEATH_PLACE_DESCRIPTION, @@ -549,11 +561,24 @@ protected void addFields() { if (disease == Disease.CSM) { generalCommentLabel.setVisible(false); - setVisible(false, PersonDto.NICKNAME, PersonDto.MOTHERS_MAIDEN_NAME, PersonDto.ADDITIONAL_DETAILS); + setVisible(false, PersonDto.ADDITIONAL_DETAILS); } if(disease == Disease.AFP){ - setVisible(false, PersonDto.OCCUPATION_TYPE,PersonDto.EDUCATION_TYPE, PersonDto.NICKNAME, PersonDto.MOTHERS_MAIDEN_NAME, PersonDto.ADDITIONAL_DETAILS, PersonDto.MOTHERS_NAME, PersonDto.FATHERS_NAME ); + TextArea additionalPlacesStayed = addField(PersonDto.ADDITIONAL_PLACES_STAYED, TextArea.class, new ResizableTextAreaWrapper<>(false)); + setVisible(false, PersonDto.OCCUPATION_TYPE,PersonDto.EDUCATION_TYPE, PersonDto.ADDITIONAL_DETAILS, PersonDto.ADDRESSES); + additionalDetails.setCaption("Village"); + generalCommentLabel.setVisible(false); + occupationHeader.setVisible(false); + addressesHeader.setVisible(false); + contactInformationHeader.setVisible(false); + homeaddrecreational.setVisible(true); + occuDetails.setVisible(false); + + } + + if (disease == Disease.AHF) { + setVisible(false, PersonDto.PERSON_CONTACT_DETAILS); } } @@ -754,18 +779,13 @@ private void toggleOccupationMetaFields() { switch (type) { case BUSINESSMAN_WOMAN: case TRANSPORTER: - case OTHER: - setVisible(true, PersonDto.OCCUPATION_DETAILS); - break; - case HEALTHCARE_WORKER: - setVisible(true, PersonDto.OCCUPATION_DETAILS); + /*case OTHER: + setVisible(true, PersonDto.OCCUPATION_DETAILS);*/ break; default: - setVisible(false, PersonDto.OCCUPATION_DETAILS); + //setVisible(false, PersonDto.OCCUPATION_DETAILS); break; } - } else { - setVisible(false, PersonDto.OCCUPATION_DETAILS); } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/AbstractSampleForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/AbstractSampleForm.java index 56dff8f9c8d..d93f9a67bdd 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/AbstractSampleForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/AbstractSampleForm.java @@ -11,8 +11,7 @@ import java.util.*; import java.util.stream.Collectors; -import com.vaadin.ui.CssLayout; -import com.vaadin.ui.Label; +import com.vaadin.ui.*; import com.vaadin.v7.data.Property; import com.vaadin.v7.ui.AbstractField; import com.vaadin.v7.ui.CheckBox; @@ -25,16 +24,19 @@ import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.FacadeProvider; -import de.symeda.sormas.api.caze.CaseDataDto; -import de.symeda.sormas.api.caze.CaseReferenceDto; +import de.symeda.sormas.api.caze.*; import de.symeda.sormas.api.contact.ContactReferenceDto; +import de.symeda.sormas.api.customizableenum.CustomizableEnumType; +import de.symeda.sormas.api.dashboard.EpiCurveGrouping; +import de.symeda.sormas.api.disease.DiseaseVariant; +import de.symeda.sormas.api.event.TypeOfPlace; import de.symeda.sormas.api.feature.FeatureType; -import de.symeda.sormas.api.i18n.Descriptions; -import de.symeda.sormas.api.i18n.I18nProperties; -import de.symeda.sormas.api.i18n.Strings; -import de.symeda.sormas.api.i18n.Validations; +import de.symeda.sormas.api.i18n.*; import de.symeda.sormas.api.infrastructure.facility.FacilityDto; import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; +import de.symeda.sormas.api.person.PersonDto; +import de.symeda.sormas.api.person.PresentCondition; +import de.symeda.sormas.api.person.Sex; import de.symeda.sormas.api.sample.AdditionalTestType; import de.symeda.sormas.api.sample.PathogenTestResultType; import de.symeda.sormas.api.sample.PathogenTestType; @@ -43,19 +45,21 @@ import de.symeda.sormas.api.sample.SamplePurpose; import de.symeda.sormas.api.sample.SamplingReason; import de.symeda.sormas.api.sample.SpecimenCondition; +import de.symeda.sormas.api.user.JurisdictionLevel; import de.symeda.sormas.api.user.UserReferenceDto; import de.symeda.sormas.api.user.UserRight; -import de.symeda.sormas.api.utils.YesNoUnknown; +import de.symeda.sormas.api.utils.*; import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers; import de.symeda.sormas.api.utils.fieldvisibility.FieldVisibilityCheckers; +import de.symeda.sormas.api.utils.pseudonymization.SampleDispatchMode; import de.symeda.sormas.ui.UserProvider; -import de.symeda.sormas.ui.utils.AbstractEditForm; -import de.symeda.sormas.ui.utils.CssStyles; -import de.symeda.sormas.ui.utils.DateComparisonValidator; +import de.symeda.sormas.ui.dashboard.map.MapCaseDisplayMode; +import de.symeda.sormas.ui.utils.*; import de.symeda.sormas.ui.utils.DateFormatHelper; import de.symeda.sormas.ui.utils.DateTimeField; -import de.symeda.sormas.ui.utils.FieldHelper; -import de.symeda.sormas.ui.utils.NullableOptionGroup; +import org.apache.commons.collections.CollectionUtils; +import org.joda.time.DateTime; +import org.vaadin.hene.popupbutton.PopupButton; public abstract class AbstractSampleForm extends AbstractEditForm { @@ -68,32 +72,57 @@ public abstract class AbstractSampleForm extends AbstractEditForm { protected static final String SAMPLE_MATERIAL_READ_HEADLINE_LOC = "sampleMaterialReadHeadlineLoc"; protected static final String ADDITIONAL_TESTING_READ_HEADLINE_LOC = "additionalTestingReadHeadlineLoc"; protected static final String REQUESTED_PATHOGEN_TESTS_READ_LOC = "requestedPathogenTestsReadLoc"; + protected static final String DISTRICT_LABORATORY_HEADLINE_LOC = "districtLaboratoryLoc"; + protected static final String REGIONAL_LABORATORY_HEADLINE_LOC = "regionalLaboratoryLoc"; + protected static final String REFERENCE_LABORATORY_HEADLINE_LOC = "referenceLaboratoryLoc"; + protected static final String LABORATORY_ANTIBIOGRAM_HEADLINE_LOC = "laboratoryAntibiogramHeadlineloc"; + protected static final String LABORATORY_PCR_HEADLINE_LOC = "laboratoryPcrHeadlineloc"; protected static final String REQUESTED_ADDITIONAL_TESTS_READ_LOC = "requestedAdditionalTestsReadLoc"; protected static final String REPORT_INFO_LABEL_LOC = "reportInfoLabelLoc"; protected static final String REFERRED_FROM_BUTTON_LOC = "referredFromButtonLoc"; private Disease disease; public ComboBox sampleMaterialComboBox; private ComboBox lab; - private TextField labDetails; + protected SampleDispatchMode sampleDispatchMode = SampleDispatchMode.REGIONAL_COLDROOM; + private DateTimeField sampleDateField; + private DateTimeField laboratorySampleDateReceived; //@formatter:off protected static final String SAMPLE_COMMON_HTML_LAYOUT = fluidRowLocs(SampleDto.UUID, REPORT_INFO_LABEL_LOC) + + fluidRowLocs(SampleDto.CSF_SAMPLE_COLLECTED) + + fluidRowLocs(SampleDto.CSF_REASON) + + fluidRowLocs(SampleDto.SAMPLE_DATE_TIME) + + fluidRowLocs(SampleDto.APPEARANCE_OF_CSF) + + fluidRowLocs(6,SampleDto.INOCULATION_TIME_TRANSPORT_MEDIA) + + fluidRowLocs(SampleDto.SAMPLE_SENT_TO_LAB, SampleDto.REASON_NOT_SENT_TO_LAB) + + fluidRowLocs(SampleDto.DATE_SAMPLE_SENT_TO_LAB, SampleDto.LAB, SampleDto.LAB_DETAILS) + + fluidRowLocs(SampleDto.SAMPLE_CONTAINER_USED) + + fluidRowLocs(SampleDto.RDT_PERFORMED, SampleDto.RDT_RESULTS) + + fluidRowLocs(SampleDto.DISTRICT_NOTIFICATION_DATE, SampleDto.NAME_OF_PERSON, SampleDto.TEL_NUMBER) + + fluidRowLocs(SampleDto.DATE_FORM_SENT_TO_DISTRICT, SampleDto.DATE_FORM_RECEIVED_AT_DISTRICT) + + fluidRowLocs(SampleDto.DATE_FORM_SENT_TO_REGION, SampleDto.DATE_FORM_RECEIVED_AT_REGION) + + fluidRowLocs(SampleDto.DATE_FORM_SENT_TO_NATIONAL, SampleDto.DATE_FORM_RECEIVED_AT_NATIONAL) + + + fluidRowLocs(SampleDto.SAMPLE_PURPOSE) + - fluidRowLocs(SampleDto.SAMPLE_DATE_TIME, SampleDto.SAMPLE_MATERIAL) + + fluidRowLocs(6,SampleDto.SAMPLE_MATERIAL) + + fluidRowLocs(SampleDto.FIELD_SAMPLE_ID, REFERRED_FROM_BUTTON_LOC) + + fluidRowLocs(6, SampleDto.DISEASE) + + fluidRowLocs(SampleDto.SAMPLE_TESTS) + + fluidRowLocs(SampleDto.SAMPLE_DISPATCH_MODE) + + fluidRowLocs(6,SampleDto.SAMPLE_DISPATCH_DATE) + fluidRowLocs("", SampleDto.SAMPLE_MATERIAL_TEXT) + fluidRowLocs(SampleDto.SAMPLING_REASON, SampleDto.SAMPLING_REASON_DETAILS) + fluidRowLocs(SampleDto.SAMPLE_SOURCE, "") + - fluidRowLocs(SampleDto.FIELD_SAMPLE_ID, REFERRED_FROM_BUTTON_LOC) + - fluidRowLocs(SampleDto.LAB, SampleDto.LAB_DETAILS) + + //fluidRowLocs(SampleDto.LAB, SampleDto.LAB_DETAILS) + - fluidRowLocs(SampleDto.IPSAMPLESENT) + fluidRowLocs(SampleDto.IPSAMPLERESULTS, "") + + fluidRowLocs(SampleDto.IPSAMPLESENT) + fluidRowLocs(SampleDto.IPSAMPLERESULTS, "")+ locCss(VSPACE_TOP_3, SampleDto.SAMPLE_MATERIAL_REQUESTED) + loc(SAMPLE_MATERIAL_READ_HEADLINE_LOC) + loc(SampleDto.REQUESTED_SAMPLE_MATERIALS) + - locCss(VSPACE_TOP_3, SampleDto.PATHOGEN_TESTING_REQUESTED) + loc(PATHOGEN_TESTING_READ_HEADLINE_LOC) + loc(PATHOGEN_TESTING_INFO_LOC) + @@ -108,17 +137,55 @@ public abstract class AbstractSampleForm extends AbstractEditForm { loc(SampleDto.REQUESTED_OTHER_ADDITIONAL_TESTS) + loc(REQUESTED_ADDITIONAL_TESTS_READ_LOC) + - locCss(VSPACE_TOP_3, SampleDto.SHIPPED) + + //locCss(VSPACE_TOP_3, SampleDto.SHIPPED) + fluidRowLocs(SampleDto.SHIPMENT_DATE, SampleDto.SHIPMENT_DETAILS) + -// - locCss(VSPACE_TOP_3, SampleDto.RECEIVED) + + //locCss(VSPACE_TOP_3, SampleDto.RECEIVED) + fluidRowLocs(SampleDto.RECEIVED_DATE, SampleDto.LAB_SAMPLE_ID) + -// fluidRowLocs(SampleDto.SPECIMEN_CONDITION, SampleDto.NO_TEST_POSSIBLE_REASON) + fluidRowLocs(SampleDto.COMMENT) + fluidRowLocs(SampleDto.PATHOGEN_TEST_RESULT) + fluidRowLocs(CaseDataDto.DELETION_REASON) + - fluidRowLocs(CaseDataDto.OTHER_DELETION_REASON); + fluidRowLocs(CaseDataDto.OTHER_DELETION_REASON) + + + fluidRowLocs(6,SampleDto.LABORATORY_TYPE) + + fluidRowLocs(DISTRICT_LABORATORY_HEADLINE_LOC) + + + fluidRowLocs(REGIONAL_LABORATORY_HEADLINE_LOC) + + fluidRowLocs(REFERENCE_LABORATORY_HEADLINE_LOC) + + locCss(VSPACE_TOP_3, SampleDto.LABORATORY_NAME) + + fluidRowLocs(SampleDto.LABORATORY_SAMPLE_DATE_RECEIVED, SampleDto.LABORATORY_NUMBER) + + fluidRowLocs(SampleDto.LABORATORY_SAMPLE_CONTAINER_RECEIVED, SampleDto.LABORATORY_SAMPLE_CONTAINER_OTHER) + + fluidRowLocs(SampleDto.LABORATORY_SAMPLE_CONDITION) + + fluidRowLocs(SampleDto.LABORATORY_APPEARANCE_OF_CSF, SampleDto.LABORATORY_TEST_PERFORMED, SampleDto.LABORATORY_TEST_PERFORMED_OTHER) + + fluidRowLocs(SampleDto.LABORATORY_CYTOLOGY, SampleDto.LABORATORY_GRAM, SampleDto.LABORATORY_GRAM_OTHER) + + fluidRowLocs(SampleDto.LABORATORY_RDT_PERFORMED, SampleDto.LABORATORY_RDT_RESULTS) + + fluidRowLocs(SampleDto.LABORATORY_LATEX) + + fluidRowLocs(SampleDto.LABORATORY_CULTURE, SampleDto.LABORATORY_CULTURE_OTHER) + + fluidRowLocs(SampleDto.LABORATORY_OTHER_TESTS, SampleDto.LABORATORY_OTHER_TESTS_RESULTS) + + + loc(LABORATORY_ANTIBIOGRAM_HEADLINE_LOC) + + fluidRowLocs(SampleDto.LABORATORY_CEFTRIAXONE, SampleDto.LABORATORY_PENICILLIN_G) + + fluidRowLocs(SampleDto.LABORATORY_AMOXYCILLIN, SampleDto.LABORATORY_OXACILLIN) + + fluidRowLocs(SampleDto.LABORATORY_ANTIBIOGRAM_OTHER) + + + loc(LABORATORY_PCR_HEADLINE_LOC) + + fluidRowLocs(SampleDto.LABORATORY_DATE_PCR_PERFORMED, SampleDto.LABORATORY_PCR_TYPE) + + fluidRowLocs(SampleDto.LABORATORY_PCR_OPTIONS) + + fluidRowLocs(SampleDto.LABORATORY_SEROTYPE, SampleDto.LABORATORY_SEROTYPE_TYPE, SampleDto.LABORATORY_SEROTYPE_RESULTS) + + fluidRowLocs(6,SampleDto.LABORATORY_FINAL_RESULTS) + + fluidRowLocs(SampleDto.LABORATORY_OBSERVATIONS) + + fluidRowLocs(SampleDto.LABORATORY_DATE_RESULTS_SENT_HEALTH_FACILITY, SampleDto.LABORATORY_DATE_RESULTS_SENT_DSD) + + fluidRowLocs(SampleDto.LABORATORY_FINAL_CLASSIFICATION) + + + + //AFP + fluidRowLocs(SampleDto.DATE_SENT_NATIONAL_REG_LAB, SampleDto.DATE_DIFFERENTIATION_SENT_EPI, SampleDto.DATE_DIFFERENTIATION_RECEIVED_EPI) + + fluidRowLocs(SampleDto.DATE_ISOLATE_SENT_SEQUENCING, SampleDto.DATE_SEQ_RESULTS_SENT_PROGRAM) + + fluidRowLocs(6,SampleDto.FINAL_LAB_RESULTS) + + fluidRowLocs(6,SampleDto.IMMUNOCOMPROMISED_STATUS_SUSPECTED) + + fluidRowLocs(6,SampleDto.AFP_FINAL_CLASSIFICATION); + + //@formatter:on protected AbstractSampleForm(Class type, String propertyI18nPrefix, Disease disease, UiFieldAccessCheckers fieldAccessCheckers) { @@ -137,10 +204,18 @@ protected void addCommonFields() { addField(SampleDto.REPORTING_USER).setReadOnly(true); samplePurpose.addValueChangeListener(e -> updateRequestedTestFields()); addField(SampleDto.LAB_SAMPLE_ID, TextField.class); - final DateTimeField sampleDateField = addField(SampleDto.SAMPLE_DATE_TIME, DateTimeField.class); + sampleDateField = addField(SampleDto.SAMPLE_DATE_TIME, DateTimeField.class); sampleDateField.setInvalidCommitted(false); //sampleMaterialComboBox = addField(SampleDto.SAMPLE_MATERIAL); + ComboBox diseaseBox = new ComboBox("Diseases"); + + for (Disease ahfDisease : Disease.AHF_DISEASES) { + diseaseBox.addItem(ahfDisease); + } + + ComboBox diseaseField = addField(SampleDto.DISEASE, diseaseBox); + addField(SampleDto.SAMPLE_MATERIAL_TEXT, TextField.class); addField(SampleDto.SAMPLE_SOURCE, ComboBox.class); addField(SampleDto.FIELD_SAMPLE_ID, TextField.class); @@ -161,11 +236,22 @@ protected void addCommonFields() { comment.setDescription( I18nProperties.getPrefixDescription(SampleDto.I18N_PREFIX, SampleDto.COMMENT, "") + "\n" + I18nProperties.getDescription(Descriptions.descGdpr)); - addField(SampleDto.SHIPPED, CheckBox.class); + CheckBox check = addField(SampleDto.SHIPPED, CheckBox.class); + addField(SampleDto.RECEIVED, CheckBox.class); - addField(SampleDto.IPSAMPLESENT, NullableOptionGroup.class); - addField(SampleDto.IPSAMPLERESULTS); + OptionGroup ipSampleSent = new OptionGroup("YesNoUnknown"); + + for (YesNoUnknown val : YesNoUnknown.values()) { + if (val == YesNoUnknown.YES || val == YesNoUnknown.NO) { + ipSampleSent.addItem(val); + } + } + addField(SampleDto.IPSAMPLESENT, ipSampleSent); + ipSampleSent.setCaption("Was a sample sent to the IP?"); + + ComboBox ipSampleResults = addField(SampleDto.IPSAMPLERESULTS); + ipSampleResults.setCaption("IP Sample Results"); ComboBox testResultField = addField(SampleDto.PATHOGEN_TEST_RESULT, ComboBox.class); testResultField.removeItem(PathogenTestResultType.NOT_DONE); @@ -185,11 +271,27 @@ protected void addCommonFields() { addField(SampleDto.OTHER_DELETION_REASON, TextArea.class).setRows(3); setVisible(false, SampleDto.DELETION_REASON, SampleDto.OTHER_DELETION_REASON); + diseaseField.addValueChangeListener((ValueChangeListener) valueChangeEvent -> { + Disease disease = (Disease) valueChangeEvent.getProperty().getValue(); + + switch(disease){ + case EVD: + case LASSA: + case DENGUE: + case CHIKUNGUNYA: + case YELLOW_FEVER: + case MARBURG: + case ZIKA: + selectAHFTests(); + break; + } + }); + } protected void defaultValueChangeListener() { - final NullableOptionGroup samplePurposeField = (NullableOptionGroup) getField(SampleDto.SAMPLE_PURPOSE); + final NullableOptionGroup samplePurposeField = getField(SampleDto.SAMPLE_PURPOSE); final Field receivedField = getField(SampleDto.RECEIVED); final Field shippedField = getField(SampleDto.SHIPPED); @@ -243,27 +345,6 @@ protected void defaultValueChangeListener() { Arrays.asList(SamplePurpose.EXTERNAL, null)); - Disease disease = getDisease(); - - switch (disease) { - case CSM: - handleCSM(); - break; - case AFP: - handleAFP(); - break; - case NEW_INFLUENZA: - handleNewInfluenza(); - break; - case YELLOW_FEVER: - handleYellowFever(); - - default: - // Handle default case, maybe log an error or set default visibility - break; - } - - } else { getField(SampleDto.SAMPLE_DATE_TIME).setEnabled(false); getField(SampleDto.SAMPLE_MATERIAL).setEnabled(false); @@ -285,6 +366,23 @@ protected void defaultValueChangeListener() { reportInfoLabel.setEnabled(false); getContent().addComponent(reportInfoLabel, REPORT_INFO_LABEL_LOC); + switch (disease) { + case CSM: + handleCSM(); + break; + case AFP: + handleAFP(); + break; + case AHF: + handleAHF(); + break; + case YELLOW_FEVER: + handleYellowFever(); + default: + // Handle default case, maybe log an error or set default visibility + break; + } + } protected abstract Disease getDisease(); @@ -435,6 +533,13 @@ protected void initializeRequestedTestFields() { updateRequestedTestFields(); } + CheckBox sampleMaterialRequestedField = addField(SampleDto.SAMPLE_MATERIAL_REQUESTED, CheckBox.class); + OptionGroup requestedSampleMaterialsField = addField(SampleDto.REQUESTED_SAMPLE_MATERIALS, OptionGroup.class); + Field sampleMaterialTestingField = getField(SampleDto.SAMPLE_MATERIAL_REQUESTED); + + //tests for diseases + OptionGroup sampleTestsField = addField(SampleDto.SAMPLE_TESTS, OptionGroup.class); + protected void initializeMaterialsMultiSelect( ){ @@ -442,36 +547,42 @@ protected void initializeMaterialsMultiSelect( ){ getContent().addComponent(materialMultiSelectInfoLabel, SAMPLE_MATERIAL_INFO_LOC); // Yes/No fields for sample materials - CheckBox sampleMaterialRequestedField = addField(SampleDto.SAMPLE_MATERIAL_REQUESTED, CheckBox.class); sampleMaterialRequestedField.setWidthUndefined(); sampleMaterialRequestedField.addValueChangeListener(e -> updateSampleMaterialFields()); + sampleMaterialRequestedField.setCaption("Sample Types"); + // CheckBox groups to select sample Materials - OptionGroup requestedSampleMaterialsField = addField(SampleDto.REQUESTED_SAMPLE_MATERIALS, OptionGroup.class); CssStyles.style(requestedSampleMaterialsField, CssStyles.OPTIONGROUP_CHECKBOXES_HORIZONTAL); requestedSampleMaterialsField.setMultiSelect(true); requestedSampleMaterialsField.addItems( - Arrays.stream(SampleMaterial.values()) - .filter( c -> fieldVisibilityCheckers.isVisible(SampleMaterial.class, c.name())) + Arrays.stream(YellowFeverSample.values()) + .filter( c -> fieldVisibilityCheckers.isVisible(YellowFeverSample.class, c.name())) .collect(Collectors.toList())); - requestedSampleMaterialsField.removeItem(SampleMaterial.OTHER); requestedSampleMaterialsField.setCaption(null); - updateSampleMaterialFields(); + } + + private void selectAHFTests(){ + + //CssStyles.style(sampleTestsField, CssStyles.OPTIONGROUP_CHECKBOXES_HORIZONTAL); + sampleTestsField.setReadOnly(true); + + for (PathogenTestType pathogenTestType : PathogenTestType.DISEASE_TESTS) { + sampleTestsField.addItem(pathogenTestType); + } + sampleTestsField.removeItem(PathogenTestType.OTHER); + sampleTestsField.setCaption("Sample Tests"); } private void updateSampleMaterialFields() { - Field sampleMaterialTestingField = getField(SampleDto.SAMPLE_MATERIAL_REQUESTED); - boolean sampleMaterialsRequested = Boolean.TRUE.equals(sampleMaterialTestingField.getValue()); setVisible(sampleMaterialsRequested, SampleDto.REQUESTED_SAMPLE_MATERIALS); getContent().getComponent(SAMPLE_MATERIAL_INFO_LOC).setVisible(sampleMaterialsRequested); - - if (getValue() != null ) { CssLayout requestedSampleMaterialsLayout = new CssLayout(); CssStyles.style(requestedSampleMaterialsLayout, VSPACE_3); @@ -483,10 +594,23 @@ private void updateSampleMaterialFields() { } getContent().addComponent(requestedSampleMaterialsLayout, SAMPLE_MATERIAL_INFO_LOC); } -// else { -// getContent().removeComponent(REQUESTED_PATHOGEN_TESTS_READ_LOC); -// } + } + private void updateSampleTestsFields() { + + if(getValue() != null){ + CssLayout requestedSampleTestsLayout = new CssLayout(); + CssStyles.style(requestedSampleTestsLayout, VSPACE_3); + for (YellowFeverSample sampleTests : getValue().getRequestedSampleMaterials()) { + Label testLabel = new Label(sampleTests.toString()); + testLabel.setWidthUndefined(); + CssStyles.style(testLabel, CssStyles.LABEL_ROUNDED_CORNERS, CssStyles.LABEL_BACKGROUND_FOCUS_LIGHT, VSPACE_4, HSPACE_RIGHT_4); + requestedSampleTestsLayout.addComponent(testLabel); + } + getContent().addComponent(requestedSampleTestsLayout, SAMPLE_MATERIAL_INFO_LOC); + }else { + getContent().removeComponent(SAMPLE_MATERIAL_INFO_LOC); + } } private void updateRequestedTestFields() { @@ -555,37 +679,237 @@ private void updateRequestedTestFields() { } else { getContent().removeComponent(REQUESTED_ADDITIONAL_TESTS_READ_LOC); } + } private void handleDisease(Disease targetDisease, String labName) { if (disease == targetDisease) { - setVisibleAndCheckLab(labName, SampleDto.SAMPLING_REASON, SampleDto.PATHOGEN_TESTING_REQUESTED); + setVisibleAndCheckLab(labName, SampleDto.PATHOGEN_TESTING_REQUESTED); } } private void handleCSM() { - setVisible(false, SampleDto.SAMPLE_PURPOSE, - SampleDto.SAMPLING_REASON, - SampleDto.REQUESTED_PATHOGEN_TESTS, - SampleDto.REQUESTED_OTHER_PATHOGEN_TESTS); - sampleMaterialComboBox.setValue(SampleMaterial.CEREBROSPINAL_FLUID); + sampleDateField.setVisible(false); + + ComboBox laboType = addField(SampleDto.LABORATORY_TYPE, ComboBox.class); + laboType.setRequired(true); + + OptionGroup csfSampleCollected = addField(SampleDto.CSF_SAMPLE_COLLECTED, OptionGroup.class); + NullableOptionGroup csfReason = addField(SampleDto.CSF_REASON, NullableOptionGroup.class); + NullableOptionGroup appearanceOfCsf = addField(SampleDto.APPEARANCE_OF_CSF, NullableOptionGroup.class); + addField(SampleDto.INOCULATION_TIME_TRANSPORT_MEDIA, DateField.class); + OptionGroup sampleSentToLab = addField(SampleDto.SAMPLE_SENT_TO_LAB, OptionGroup.class); + TextField reasonNotSent = addField(SampleDto.REASON_NOT_SENT_TO_LAB, TextField.class); + DateField dateSampleSentToLab = addField(SampleDto.DATE_SAMPLE_SENT_TO_LAB, DateField.class); + NullableOptionGroup sampleContainerUsed = addField(SampleDto.SAMPLE_CONTAINER_USED, NullableOptionGroup.class); + OptionGroup rdtPerformed = addField(SampleDto.RDT_PERFORMED, OptionGroup.class); + addField(SampleDto.RDT_RESULTS, TextField.class); + addField(SampleDto.DISTRICT_NOTIFICATION_DATE, DateField.class); + addField(SampleDto.NAME_OF_PERSON, TextField.class); + addField(SampleDto.TEL_NUMBER, TextField.class); + addField(SampleDto.DATE_FORM_SENT_TO_DISTRICT, DateField.class); + addField(SampleDto.DATE_FORM_RECEIVED_AT_DISTRICT, DateField.class); + addField(SampleDto.DATE_FORM_SENT_TO_REGION, DateField.class); + addField(SampleDto.DATE_FORM_RECEIVED_AT_REGION, DateField.class); + addField(SampleDto.DATE_FORM_SENT_TO_NATIONAL, DateField.class); + addField(SampleDto.DATE_FORM_RECEIVED_AT_NATIONAL, DateField.class); + + csfReason.setVisible(false); + reasonNotSent.setVisible(false); + dateSampleSentToLab.setVisible(false); + + + FieldHelper + .setVisibleWhen(csfSampleCollected, Arrays.asList(sampleDateField), Arrays.asList(YesNo.YES), true); + FieldHelper + .setVisibleWhen(sampleSentToLab, Arrays.asList(reasonNotSent), Arrays.asList(YesNo.NO), true); + FieldHelper + .setVisibleWhen(sampleSentToLab, Arrays.asList(dateSampleSentToLab), Arrays.asList(YesNo.YES), true); + + setPropertiesVisibility(); + + Label districtLaboratory = new Label(I18nProperties.getString(Strings.headingDistrictLaboratory)); + CssStyles.style(districtLaboratory, CssStyles.LABEL_BOLD, CssStyles.LABEL_SECONDARY, VSPACE_4); + getContent().addComponent(districtLaboratory, DISTRICT_LABORATORY_HEADLINE_LOC); + districtLaboratory.setVisible(false); + + Label regionalLaboratory = new Label(I18nProperties.getString(Strings.headingRegionalLaboratory)); + CssStyles.style(regionalLaboratory, CssStyles.LABEL_BOLD, CssStyles.LABEL_SECONDARY, VSPACE_4); + getContent().addComponent(regionalLaboratory, REGIONAL_LABORATORY_HEADLINE_LOC); + regionalLaboratory.setVisible(false); + + Label referenceLaboratory = new Label(I18nProperties.getString(Strings.headingReferenceLaboratory)); + CssStyles.style(referenceLaboratory, CssStyles.LABEL_BOLD, CssStyles.LABEL_SECONDARY, VSPACE_4); + getContent().addComponent(referenceLaboratory, REFERENCE_LABORATORY_HEADLINE_LOC); + referenceLaboratory.setVisible(false); + + TextField laboratoryName = addField(SampleDto.LABORATORY_NAME, TextField.class); + laboratorySampleDateReceived = addField(SampleDto.LABORATORY_SAMPLE_DATE_RECEIVED, DateTimeField.class); + laboratorySampleDateReceived.setInvalidCommitted(false); + TextField laboratoryNumber = addField(SampleDto.LABORATORY_NUMBER, TextField.class); + OptionGroup laboratorySampleContainerReceived = addField(SampleDto.LABORATORY_SAMPLE_CONTAINER_RECEIVED, OptionGroup.class); + laboratorySampleContainerReceived.setWidthUndefined(); + TextField laboratorySampleContainerOther = addField(SampleDto.LABORATORY_SAMPLE_CONTAINER_OTHER, TextField.class); + OptionGroup laboratorySampleCondition = addField(SampleDto.LABORATORY_SAMPLE_CONDITION, OptionGroup.class); + NullableOptionGroup laboratoryAppearanceOfCSF = addField(SampleDto.LABORATORY_APPEARANCE_OF_CSF, NullableOptionGroup.class); + NullableOptionGroup laboratoryTestPerformed = addField(SampleDto.LABORATORY_TEST_PERFORMED, NullableOptionGroup.class); + TextField laboratoryTestPerformedOther = addField(SampleDto.LABORATORY_TEST_PERFORMED_OTHER, TextField.class); + TextField laboratoryCytology = addField(SampleDto.LABORATORY_CYTOLOGY, TextField.class); + NullableOptionGroup laboratoryGram = addField(SampleDto.LABORATORY_GRAM, NullableOptionGroup.class); + TextField laboratoryGramOther = addField(SampleDto.LABORATORY_GRAM_OTHER, TextField.class); + OptionGroup laboratoryRdtPerformed = addField(SampleDto.LABORATORY_RDT_PERFORMED, OptionGroup.class); + TextField laboratoryRdtResults = addField(SampleDto.LABORATORY_RDT_RESULTS, TextField.class); + + + NullableOptionGroup laboratoryLatex = new NullableOptionGroup(); + for (LatexCulture latexCulture : LatexCulture.LATEX) { + laboratoryLatex.addItem(latexCulture); + laboratoryLatex.setItemCaption(latexCulture, latexCulture.toString()); + } + addField(SampleDto.LABORATORY_LATEX, laboratoryLatex); + + NullableOptionGroup laboratoryCulture = new NullableOptionGroup(); + for (LatexCulture latexCulture : LatexCulture.LAB_CULTURE) { + laboratoryCulture.addItem(latexCulture); + laboratoryCulture.setItemCaption(latexCulture, latexCulture.toString()); + } + addField(SampleDto.LABORATORY_CULTURE, laboratoryCulture); + TextField laboratoryCultureOther = addField(SampleDto.LABORATORY_CULTURE_OTHER, TextField.class); + TextField laboratoryOtherTests = addField(SampleDto.LABORATORY_OTHER_TESTS, TextField.class); + TextField laboratoryOtherTestsResults = addField(SampleDto.LABORATORY_OTHER_TESTS_RESULTS, TextField.class); + ComboBox laboratoryCeftriaxone = addField(SampleDto.LABORATORY_CEFTRIAXONE, ComboBox.class); + ComboBox laboratoryPenicillinG = addField(SampleDto.LABORATORY_PENICILLIN_G, ComboBox.class); + ComboBox laboratoryAmoxycillin = addField(SampleDto.LABORATORY_AMOXYCILLIN, ComboBox.class); + ComboBox laboratoryOxacillin = addField(SampleDto.LABORATORY_OXACILLIN, ComboBox.class); + OptionGroup laboratoryAntibiogramOther = addField(SampleDto.LABORATORY_ANTIBIOGRAM_OTHER, OptionGroup.class); + DateField laboratoryDatePcrPerformed = addField(SampleDto.LABORATORY_DATE_PCR_PERFORMED, DateField.class); + TextField laboratoryPcrType = addField(SampleDto.LABORATORY_PCR_TYPE, TextField.class); + + NullableOptionGroup labPcrOptions = new NullableOptionGroup(); + for (LatexCulture latexCulture : LatexCulture.LAB_CULTURE) { + labPcrOptions.addItem(latexCulture); + labPcrOptions.setItemCaption(latexCulture, latexCulture.toString()); + } + addField(SampleDto.LABORATORY_PCR_OPTIONS, labPcrOptions); + + TextField laboratorySerotype = addField(SampleDto.LABORATORY_SEROTYPE, TextField.class); + TextField laboratorySerotypeType = addField(SampleDto.LABORATORY_SEROTYPE_TYPE, TextField.class); + TextField laboratorySerotypeResults = addField(SampleDto.LABORATORY_SEROTYPE_RESULTS, TextField.class); + TextField laboratoryFinalResults = addField(SampleDto.LABORATORY_FINAL_RESULTS, TextField.class); + + TextArea laboratoryObservations = addField(SampleDto.LABORATORY_OBSERVATIONS, TextArea.class); + laboratoryObservations.setRows(4); + laboratoryObservations.setDescription( + I18nProperties.getPrefixDescription(SampleDto.I18N_PREFIX, SampleDto.LABORATORY_OBSERVATIONS, "") + "\n" + + I18nProperties.getDescription(Descriptions.observation)); + + DateField laboratoryDateResultsSentHealthFacility = addField(SampleDto.LABORATORY_DATE_RESULTS_SENT_HEALTH_FACILITY, DateField.class); + DateField laboratoryDateResultsSentDSD = addField(SampleDto.LABORATORY_DATE_RESULTS_SENT_DSD, DateField.class); + + OptionGroup laboratoryFinalClassification = new OptionGroup(); + for (CaseClassification caseClassification : CaseClassification.CASE_CLASSIFY) { + laboratoryFinalClassification.addItem(caseClassification); + laboratoryFinalClassification.setItemCaption(caseClassification, caseClassification.toString()); + } + addField(SampleDto.LABORATORY_FINAL_CLASSIFICATION, laboratoryFinalClassification); + + laboType.addValueChangeListener(e -> { + LabType labType = (LabType) e.getProperty().getValue(); + + districtLaboratory.setVisible(false); + regionalLaboratory.setVisible(false); + referenceLaboratory.setVisible(false); + + setVisible(false, SampleDto.LABORATORY_CULTURE, SampleDto.LABORATORY_CULTURE_OTHER, SampleDto.LABORATORY_OTHER_TESTS, SampleDto.LABORATORY_OTHER_TESTS_RESULTS); + setVisible(false, SampleDto.LABORATORY_CEFTRIAXONE, SampleDto.LABORATORY_PENICILLIN_G, SampleDto.LABORATORY_AMOXYCILLIN, SampleDto.LABORATORY_OXACILLIN, SampleDto.LABORATORY_ANTIBIOGRAM_OTHER); + setVisible(false, SampleDto.LABORATORY_DATE_PCR_PERFORMED, SampleDto.LABORATORY_PCR_TYPE, SampleDto.LABORATORY_PCR_OPTIONS, SampleDto.LABORATORY_SEROTYPE, SampleDto.LABORATORY_SEROTYPE_TYPE, + SampleDto.LABORATORY_SEROTYPE_RESULTS, SampleDto.LABORATORY_FINAL_CLASSIFICATION); + + if (labType == LabType.DISTRICT_LAB) { + districtLaboratory.setVisible(true); + } + else if (labType == LabType.REGIONAL_LAB) { + regionalLaboratory.setVisible(true); + setVisible(true,SampleDto.LABORATORY_CULTURE, SampleDto.LABORATORY_CULTURE_OTHER, SampleDto.LABORATORY_OTHER_TESTS, SampleDto.LABORATORY_OTHER_TESTS_RESULTS); + setVisible(true, SampleDto.LABORATORY_CEFTRIAXONE, SampleDto.LABORATORY_PENICILLIN_G, SampleDto.LABORATORY_AMOXYCILLIN, SampleDto.LABORATORY_OXACILLIN, SampleDto.LABORATORY_ANTIBIOGRAM_OTHER); + setVisible(true, SampleDto.LABORATORY_DATE_PCR_PERFORMED, SampleDto.LABORATORY_PCR_TYPE, SampleDto.LABORATORY_PCR_OPTIONS, SampleDto.LABORATORY_SEROTYPE, SampleDto.LABORATORY_SEROTYPE_TYPE, SampleDto.LABORATORY_SEROTYPE_RESULTS); + } + else if (labType == LabType.REFERENCE_LAB) { + referenceLaboratory.setVisible(true); + // Set all other fields to visible + setVisible(true, SampleDto.LABORATORY_CULTURE, SampleDto.LABORATORY_CULTURE_OTHER, SampleDto.LABORATORY_OTHER_TESTS, SampleDto.LABORATORY_OTHER_TESTS_RESULTS); + setVisible(true, SampleDto.LABORATORY_CEFTRIAXONE, SampleDto.LABORATORY_PENICILLIN_G, SampleDto.LABORATORY_AMOXYCILLIN, SampleDto.LABORATORY_OXACILLIN, SampleDto.LABORATORY_ANTIBIOGRAM_OTHER); + setVisible(true, SampleDto.LABORATORY_DATE_PCR_PERFORMED, SampleDto.LABORATORY_PCR_TYPE, SampleDto.LABORATORY_PCR_OPTIONS, SampleDto.LABORATORY_SEROTYPE, SampleDto.LABORATORY_SEROTYPE_TYPE, + SampleDto.LABORATORY_SEROTYPE_RESULTS, SampleDto.LABORATORY_FINAL_CLASSIFICATION); + } + + setVisible(false, SampleDto.PATHOGEN_TESTING_REQUESTED); + }); + } private void handleAFP() { - setVisible(false, SampleDto.SAMPLE_PURPOSE); + DateField dateSentNationalRegLab = addField(SampleDto.DATE_SENT_NATIONAL_REG_LAB, DateField.class); + DateField dateDifferentiationSentEpi = addField(SampleDto.DATE_DIFFERENTIATION_SENT_EPI, DateField.class); + DateField dateDifferentiationReceivedEpi = addField(SampleDto.DATE_DIFFERENTIATION_RECEIVED_EPI, DateField.class); + DateField dateIsolateSentSequencing = addField(SampleDto.DATE_ISOLATE_SENT_SEQUENCING, DateField.class); + DateField dateSeqResultsSentProgram = addField(SampleDto.DATE_SEQ_RESULTS_SENT_PROGRAM, DateField.class); + NullableOptionGroup finalLabResults = addField(SampleDto.FINAL_LAB_RESULTS, NullableOptionGroup.class); + NullableOptionGroup immunocompromisedStatusSuspected = addField(SampleDto.IMMUNOCOMPROMISED_STATUS_SUSPECTED, NullableOptionGroup.class); + ComboBox afpFinalClassification = addField(SampleDto.AFP_FINAL_CLASSIFICATION, ComboBox.class); + + + setVisible(false, SampleDto.SAMPLE_PURPOSE, SampleDto.REQUESTED_SAMPLE_MATERIALS, SampleDto.FIELD_SAMPLE_ID, SampleDto.SAMPLE_MATERIAL_TEXT, + SampleDto.IPSAMPLESENT, SampleDto.SAMPLE_MATERIAL_REQUESTED, SampleDto.SHIPPED, SampleDto.RECEIVED, SampleDto.COMMENT, SampleDto.SAMPLE_TESTS, SampleDto.DISEASE, SampleDto.SAMPLING_REASON); + setRequired(false, SampleDto.SAMPLE_PURPOSE); + + setVisible(false, SampleDto.PATHOGEN_TEST_RESULT, SampleDto.SAMPLE_SOURCE); + setVisible(false, SampleDto.SAMPLE_SOURCE); + setVisible(false, SampleDto.SAMPLE_MATERIAL); } - private void handleNewInfluenza(){ - setVisible(false,SampleDto.SAMPLE_SOURCE ); + private void handleAHF(){ + setVisible(false,SampleDto.SAMPLE_SOURCE, + SampleDto.SAMPLE_PURPOSE,SampleDto.SAMPLING_REASON, SampleDto.FIELD_SAMPLE_ID, SampleDto.SAMPLE_MATERIAL_TEXT, + SampleDto.IPSAMPLESENT, SampleDto.SAMPLE_MATERIAL_REQUESTED, SampleDto.SHIPPED, SampleDto.RECEIVED, SampleDto.COMMENT, SampleDto.PATHOGEN_TESTING_REQUESTED, SampleDto.REQUESTED_SAMPLE_MATERIALS); + + List validValues = Arrays.asList(SampleMaterial.WHOLE_BLOOD, SampleMaterial.PLASMA_SERUM); + FieldHelper.updateEnumData(sampleMaterialComboBox, validValues); + } private void handleYellowFever(){ + OptionGroup outcome = new OptionGroup("Sample Dispatch Modes"); + setRequired(false, SampleDto.SAMPLE_DATE_TIME, SampleDto.SAMPLE_MATERIAL); sampleMaterialComboBox.setVisible(false); + setVisible(false, SampleDto.SAMPLE_MATERIAL, SampleDto.SAMPLING_REASON, SampleDto.PATHOGEN_TESTING_REQUESTED); + setVisible(false, SampleDto.SAMPLE_TESTS, SampleDto.SAMPLE_SOURCE, SampleDto.DISEASE, SampleDto.SAMPLE_MATERIAL_TEXT); + + for (SampleDispatchMode sampleDis : SampleDispatchMode.values()) { + if (sampleDis == SampleDispatchMode.NATIONAL_LAB || sampleDis == SampleDispatchMode.REGIONAL_COLDROOM || sampleDis == SampleDispatchMode.NATIONAL_BY_DISTRICT) { + outcome.addItem(sampleDis); + } + } + + OptionGroup sampleDispatchModeTypes = addField(SampleDto.SAMPLE_DISPATCH_MODE, outcome); + DateField cardDateField = addField(SampleDto.SAMPLE_DISPATCH_DATE, DateField.class); + cardDateField.setValue(DateTime.now().toDate()); + + FieldHelper.setEnabledWhen( + sampleDispatchModeTypes, + Arrays.asList(SampleDispatchMode.NATIONAL_LAB, SampleDispatchMode.REGIONAL_COLDROOM, SampleDispatchMode.NATIONAL_BY_DISTRICT), + Collections.singletonList( + cardDateField + ), + false); + initializeMaterialsMultiSelect(); + //updateSampleTestsFields(); + } private FacilityReferenceDto findLabByName(List labs, String labName) { @@ -616,4 +940,40 @@ private void setVisibleAndCheckLab(String labName, String...fieldsToHide) { System.out.println("Lab dropdown is null. Please check your code."); } } + + private void setPropertiesVisibility(){ + setVisible(false, + SampleDto.SAMPLE_PURPOSE, + SampleDto.SAMPLING_REASON, + SampleDto.SAMPLING_REASON_DETAILS, + SampleDto.IPSAMPLESENT, + SampleDto.IPSAMPLERESULTS, + SampleDto.SAMPLE_MATERIAL_REQUESTED, + SampleDto.REQUESTED_SAMPLE_MATERIALS, + SampleDto.PATHOGEN_TESTING_REQUESTED, + SampleDto.REQUESTED_PATHOGEN_TESTS, + SampleDto.REQUESTED_OTHER_PATHOGEN_TESTS, + SampleDto.ADDITIONAL_TESTING_REQUESTED, + SampleDto.REQUESTED_ADDITIONAL_TESTS, + SampleDto.REQUESTED_OTHER_ADDITIONAL_TESTS, + SampleDto.SAMPLE_MATERIAL_TEXT, + SampleDto.SAMPLE_SOURCE, + SampleDto.FIELD_SAMPLE_ID, + SampleDto.DISEASE, + SampleDto.SAMPLE_TESTS, + SampleDto.COMMENT, + SampleDto.PATHOGEN_TEST_RESULT, + SampleDto.SHIPPED, + SampleDto.SHIPMENT_DATE, + SampleDto.SHIPMENT_DETAILS, + SampleDto.RECEIVED, + SampleDto.RECEIVED_DATE, + SampleDto.LAB_SAMPLE_ID, + SampleDto.SPECIMEN_CONDITION, + SampleDto.NO_TEST_POSSIBLE_REASON, + CaseDataDto.DELETION_REASON, + CaseDataDto.OTHER_DELETION_REASON + ); + } + } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.java index 5f91aaeb8bf..e8768982ad6 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/PathogenTestForm.java @@ -23,12 +23,11 @@ import static de.symeda.sormas.ui.utils.LayoutUtil.fluidRowLocs; import static de.symeda.sormas.ui.utils.LayoutUtil.loc; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.function.Consumer; +import de.symeda.sormas.api.caze.CaseDataDto; +import de.symeda.sormas.api.caze.CaseOutcome; import org.apache.commons.collections.CollectionUtils; import com.vaadin.ui.Label; @@ -63,7 +62,7 @@ import de.symeda.sormas.ui.utils.FieldHelper; import de.symeda.sormas.ui.utils.NullableOptionGroup; -public class PathogenTestForm extends AbstractEditForm { +public class PathogenTestForm extends AbstractEditForm { private static final long serialVersionUID = -1218707278398543154L; @@ -100,6 +99,7 @@ public class PathogenTestForm extends AbstractEditForm { private TextField testTypeTextField; private ComboBox pcrTestSpecification; private TextField typingIdField; + private ComboBox testTypeField; public PathogenTestForm(SampleDto sample, boolean create, int caseSampleCount, boolean isPseudonymized) { super( @@ -134,7 +134,17 @@ protected void addFields() { addField(PathogenTestDto.VIA_LIMS); addField(PathogenTestDto.EXTERNAL_ID); addField(PathogenTestDto.EXTERNAL_ORDER_ID); - ComboBox testTypeField = addField(PathogenTestDto.TEST_TYPE, ComboBox.class); + + if(Objects.equals(disease, Disease.AHF.toString())){ + + for (PathogenTestType pathogenTestType : PathogenTestType.DISEASE_TESTS) { + testTypeField.addItem(pathogenTestType); + } + + testTypeField = addField(PathogenTestDto.TEST_TYPE, testTypeField); + } + + testTypeField = addField(PathogenTestDto.TEST_TYPE, ComboBox.class); testTypeField.setItemCaptionMode(ItemCaptionMode.ID_TOSTRING); testTypeField.setImmediate(true); pcrTestSpecification = addField(PathogenTestDto.PCR_TEST_SPECIFICATION, ComboBox.class); diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/SampleController.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/SampleController.java index 6d60ef4e694..5038aaadeb8 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/SampleController.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/samples/SampleController.java @@ -118,7 +118,10 @@ public void create(EventParticipantReferenceDto eventParticipantRef, Disease dis private void createSample(SampleDto sampleDto, Disease disease, Runnable callback) { final CommitDiscardWrapperComponent editView = getSampleCreateComponent(sampleDto, disease, callback); // add option to create additional pathogen tests - addPathogenTestButton(editView, false); + + if(disease != Disease.CSM && disease != Disease.YELLOW_FEVER && disease != Disease.AFP){ + addPathogenTestButton(editView, false); + } VaadinUiUtil.showModalPopupWindow(editView, I18nProperties.getString(Strings.headingCreateNewSample)); } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/sixtydayfollowup/SixtyDayFollowupView.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/sixtydayfollowup/SixtyDayFollowupView.java new file mode 100644 index 00000000000..d1bd79980c3 --- /dev/null +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/sixtydayfollowup/SixtyDayFollowupView.java @@ -0,0 +1,25 @@ +package de.symeda.sormas.ui.sixtydayfollowup; + +import de.symeda.sormas.ui.ControllerProvider; +import de.symeda.sormas.ui.caze.AbstractCaseView; +import de.symeda.sormas.ui.utils.CommitDiscardWrapperComponent; + + +@SuppressWarnings("serial") +public class SixtyDayFollowupView extends AbstractCaseView { + + public static final String VIEW_NAME = ROOT_VIEW_NAME + "/60-Days"; + + public SixtyDayFollowupView() { + super(VIEW_NAME, true); + } + + @Override + protected void initView(String params) { + + CommitDiscardWrapperComponent sixtyDayForm = + ControllerProvider.getCaseController().getSixtyDayComponent(getCaseRef().getUuid(), getViewMode()); + setSubComponent(sixtyDayForm); + setCaseEditPermission(sixtyDayForm); + } +} diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/sixtydayfollowup/SixtyDayForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/sixtydayfollowup/SixtyDayForm.java new file mode 100644 index 00000000000..9e957e63468 --- /dev/null +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/sixtydayfollowup/SixtyDayForm.java @@ -0,0 +1,153 @@ +package de.symeda.sormas.ui.sixtydayfollowup; + +import com.vaadin.server.ErrorMessage; +import com.vaadin.shared.ui.ErrorLevel; +import com.vaadin.ui.Label; +import com.vaadin.v7.ui.*; +import de.symeda.sormas.api.Disease; +import de.symeda.sormas.api.FacadeProvider; +import de.symeda.sormas.api.caze.CaseDataDto; +import de.symeda.sormas.api.i18n.Captions; +import de.symeda.sormas.api.i18n.I18nProperties; +import de.symeda.sormas.api.i18n.Strings; +import de.symeda.sormas.api.i18n.Validations; +import de.symeda.sormas.api.infrastructure.facility.FacilityDto; +import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; +import de.symeda.sormas.api.infrastructure.facility.FacilityType; +import de.symeda.sormas.api.sixtyday.SixtyDayDto; +import de.symeda.sormas.api.symptoms.SymptomsDto; +import de.symeda.sormas.api.utils.YesNoUnknown; +import de.symeda.sormas.api.utils.fieldaccess.UiFieldAccessCheckers; +import de.symeda.sormas.api.utils.fieldvisibility.FieldVisibilityCheckers; +import de.symeda.sormas.ui.hospitalization.PreviousHospitalizationsField; +import de.symeda.sormas.ui.utils.*; +import org.joda.time.DateTimeComparator; + +import java.util.Arrays; +import java.util.Collections; + +import static de.symeda.sormas.ui.utils.CssStyles.H3; +import static de.symeda.sormas.ui.utils.LayoutUtil.fluidRowLocs; +import static de.symeda.sormas.ui.utils.LayoutUtil.loc; + + + +public class SixtyDayForm extends AbstractEditForm{ + + private static final long serialVersionUID = 1L; + private static final String SIXTYDAY_HEADING_LOC = "hospitalizationHeadingLoc"; + + private static final String HTML_LAYOUT = + loc(SIXTYDAY_HEADING_LOC) + + fluidRowLocs(SixtyDayDto.PERSON_EXAMINE_CASE) + + fluidRowLocs(SixtyDayDto.DATE_OF_FOLLOWUP, SixtyDayDto.DATE_BIRTH) + + fluidRowLocs(SixtyDayDto.RESIDENTIAL_LOCATION) + + fluidRowLocs(SixtyDayDto.PATIENT_FOUND) + + fluidRowLocs(SixtyDayDto.PATIENT_FOUND_REASON) + + fluidRowLocs(SixtyDayDto.LOCATE_CHILD_ATTEMPT) + + fluidRowLocs(SixtyDayDto.PARALYSIS_WEAKNESS_PRESENT) + + fluidRowLocs(SixtyDayDto.PARALYSIS_WEAKNESS_PRESENT_SITE, SixtyDayDto.PARALYZED_PART_OTHER) + + fluidRowLocs(SixtyDayDto.PARALYSIS_WEAKNESS_FLOPPY) + + fluidRowLocs(SixtyDayDto.PARALYZED_PART) + + fluidRowLocs(SixtyDayDto.OTHER_PART_BODY) + + fluidRowLocs(SixtyDayDto.DEEP_TENDON_REFLEX_SELECTION) + + fluidRowLocs(SixtyDayDto.MUSCLE_VOLUME_SELECTION) + + fluidRowLocs(SixtyDayDto.SENSORY_LOSS_SELECTION) + + fluidRowLocs(SixtyDayDto.PROVISIONAL_DIAGNOSIS) + + fluidRowLocs(SixtyDayDto.COMMENTS) + + fluidRowLocs(SixtyDayDto.CONTACT_DETAILS_NUMBER, SixtyDayDto.CONTACT_DETAILS_EMAIL) + + fluidRowLocs(SixtyDayDto.SIGNATURE, SixtyDayDto.DATE_SUBMISSION_FORMS); + + private final CaseDataDto caze; + private final ViewMode viewMode; + + public SixtyDayForm(CaseDataDto caze, ViewMode viewMode, boolean isPseudonymized) { + + super( + SixtyDayDto.class, + SixtyDayDto.I18N_PREFIX, + false, + FieldVisibilityCheckers.withCountry(FacadeProvider.getConfigFacade().getCountryLocale()) + .add(new OutbreakFieldVisibilityChecker(viewMode)), + UiFieldAccessCheckers.forSensitiveData(isPseudonymized)); + this.caze = caze; + this.viewMode = viewMode; + addFields(); + } + + @Override + protected void addFields() { + + if (caze == null || viewMode == null) { + return; + } + + Label sixtyDayHeadingLabel = new Label(I18nProperties.getString(Strings.headingSixtyDay)); + sixtyDayHeadingLabel.addStyleName(H3); + getContent().addComponent(sixtyDayHeadingLabel, SIXTYDAY_HEADING_LOC); + + TextField personExamineCase = addField(SixtyDayDto.PERSON_EXAMINE_CASE, TextField.class); + DateField admissionDateField = addField(SixtyDayDto.DATE_OF_FOLLOWUP, DateField.class); + DateField dateOfBirthField = addField(SixtyDayDto.DATE_BIRTH, DateField.class); + + TextField residentialLocationField = addField(SixtyDayDto.RESIDENTIAL_LOCATION, TextField.class); + NullableOptionGroup patientFoundField = addField(SixtyDayDto.PATIENT_FOUND, NullableOptionGroup.class); + TextField patientFoundReasonField = addField(SixtyDayDto.PATIENT_FOUND_REASON, TextField.class); + TextField locateChildAttemptField = addField(SixtyDayDto.LOCATE_CHILD_ATTEMPT, TextField.class); + + OptionGroup paralysisWeaknessPresentField = addField(SixtyDayDto.PARALYSIS_WEAKNESS_PRESENT, OptionGroup.class); + ComboBox paralysisWeaknessPresentSiteField = addField(SixtyDayDto.PARALYSIS_WEAKNESS_PRESENT_SITE, ComboBox.class); + TextField paralysisWeaknessResponse = addField(SixtyDayDto.PARALYZED_PART_OTHER, TextField.class); + OptionGroup paralysisWeaknessFloppyField = addField(SixtyDayDto.PARALYSIS_WEAKNESS_FLOPPY, OptionGroup.class); + + NullableOptionGroup paralyzedPartField = addField(SixtyDayDto.PARALYZED_PART, NullableOptionGroup.class); + NullableOptionGroup otherPartBodyField = addField(SixtyDayDto.OTHER_PART_BODY, NullableOptionGroup.class); + NullableOptionGroup deepTendonReflexSelectionField = addField(SixtyDayDto.DEEP_TENDON_REFLEX_SELECTION, NullableOptionGroup.class); + NullableOptionGroup muscleVolumeSelectionField = addField(SixtyDayDto.MUSCLE_VOLUME_SELECTION, NullableOptionGroup.class); + NullableOptionGroup sensoryLossSelectionField = addField(SixtyDayDto.SENSORY_LOSS_SELECTION, NullableOptionGroup.class); + + TextArea provisionalDiagnosisField = addField(SixtyDayDto.PROVISIONAL_DIAGNOSIS, TextArea.class); + provisionalDiagnosisField.setRows(4); + TextArea commentsField = addField(SixtyDayDto.COMMENTS, TextArea.class); + TextField contactDetailsNumberField = addField(SixtyDayDto.CONTACT_DETAILS_NUMBER, TextField.class); + TextField contactDetailsEmailField = addField(SixtyDayDto.CONTACT_DETAILS_EMAIL, TextField.class); + TextField signatureField = addField(SixtyDayDto.SIGNATURE, TextField.class); + DateField dateSubmissionFormsField = addField(SixtyDayDto.DATE_SUBMISSION_FORMS, DateField.class); + + + initializeVisibilitiesAndAllowedVisibilities(); + initializeAccessAndAllowedAccesses(); + + + personExamineCase.setCaption("Name of Person Examining Case"); + admissionDateField.setCaption("Date of Follow-up"); + dateOfBirthField.setCaption("Date of Birth"); + residentialLocationField.setCaption("Residential Location"); + patientFoundField.setCaption("Was the Patient Found?"); + patientFoundReasonField.setCaption("If no, why?"); + locateChildAttemptField.setCaption("Describe attempt to Locate Child"); + paralysisWeaknessPresentField.setCaption("Is Paralysis or Weakness Present (Yes/No)"); + paralysisWeaknessPresentSiteField.setCaption("If yes, site of paralysis"); + paralysisWeaknessResponse.setCaption("Paralyzed Other Part"); + paralysisWeaknessFloppyField.setCaption("Paralysis or Weakness Floppy?"); + paralyzedPartField.setCaption("Muscle Tone - In Paralyzed Part"); + otherPartBodyField.setCaption("Muscle Tone - Other Part of Body"); + deepTendonReflexSelectionField.setCaption("Deep Tendon Reflex"); + muscleVolumeSelectionField.setCaption("Muscle Volume"); + sensoryLossSelectionField.setCaption("Sensory Loss"); + provisionalDiagnosisField.setCaption("Provisional Diagnosis"); + commentsField.setCaption("Comments"); + contactDetailsNumberField.setCaption("Contact Details of Person - Phone Number"); + contactDetailsEmailField.setCaption("Contact Details of Person - Email Address"); + signatureField.setCaption("Signature"); + dateSubmissionFormsField.setCaption("Date of Submission of Forms"); + } + + + @Override + protected String createHtmlLayout() { + return HTML_LAYOUT; + } + + +} \ No newline at end of file diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/statistics/StatisticsFilterJurisdictionElement.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/statistics/StatisticsFilterJurisdictionElement.java index d55e9a32a3e..4da86541afe 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/statistics/StatisticsFilterJurisdictionElement.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/statistics/StatisticsFilterJurisdictionElement.java @@ -28,10 +28,7 @@ import de.symeda.sormas.api.FacadeProvider; import de.symeda.sormas.api.caze.CaseDataDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityReferenceDto; -import de.symeda.sormas.api.infrastructure.facility.FacilityType; -import de.symeda.sormas.api.infrastructure.facility.FacilityTypeGroup; +import de.symeda.sormas.api.infrastructure.facility.*; import de.symeda.sormas.api.i18n.Captions; import de.symeda.sormas.api.i18n.I18nProperties; import de.symeda.sormas.api.infrastructure.community.CommunityReferenceDto; @@ -51,6 +48,7 @@ public class StatisticsFilterJurisdictionElement extends StatisticsFilterElement StatisticsFilterValuesElement communityElement; StatisticsFilterValuesElement facilityElement; private ComboBox type; + private ComboBox dhimsFacilityType; public StatisticsFilterJurisdictionElement(int rowIndex) { setSpacing(true); @@ -225,6 +223,9 @@ public List getSelectedHealthFacilities() { FacilityType getFacilityType() { return (FacilityType) type.getValue(); } + DhimsFacility getDhimsFacilityType() { + return (DhimsFacility) dhimsFacilityType.getValue(); + } @Override public List getSelectedValues() { diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/statistics/StatisticsFilterValuesElement.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/statistics/StatisticsFilterValuesElement.java index 24b7f4e9b0f..bf8e522e847 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/statistics/StatisticsFilterValuesElement.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/statistics/StatisticsFilterValuesElement.java @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; +import de.symeda.sormas.api.infrastructure.facility.DhimsFacility; import org.apache.commons.collections.CollectionUtils; import com.explicatis.ext_token_field.ExtTokenField; @@ -65,6 +66,7 @@ public class StatisticsFilterValuesElement extends StatisticsFilterElement { * Only needed when this element is part of a Region/District element. */ private StatisticsFilterJurisdictionElement jurisdictionElement; + private ComboBox dhimsFacilityType; private StatisticsFilterResidenceElement residenceElement; @@ -205,7 +207,7 @@ private List getFilterValues() { CommunityReferenceDto selectedCommunity = (CommunityReferenceDto) selectedCommunityTokenizable.getValue(); facilities.addAll( FacadeProvider.getFacilityFacade() - .getActiveFacilitiesByCommunityAndType(selectedCommunity, jurisdictionElement.getFacilityType(), false, false)); + .getActiveFacilitiesByCommunityAndType(selectedCommunity, jurisdictionElement.getFacilityType(), false, false)); } return createTokens(facilities); } else if (CollectionUtils.isNotEmpty(selectedDistrictTokenizables)) { @@ -313,4 +315,8 @@ public List getSelectedValues() { public ExtTokenField getTokenField() { return tokenField; } + + DhimsFacility getDhimsFacilityType() { + return (DhimsFacility) dhimsFacilityType.getValue(); + } } diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/symptoms/SymptomsForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/symptoms/SymptomsForm.java index 796164deea7..414f717394b 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/symptoms/SymptomsForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/symptoms/SymptomsForm.java @@ -42,6 +42,8 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import com.vaadin.v7.ui.*; +import de.symeda.sormas.api.caze.CaseOutcome; import org.joda.time.DateTimeComparator; import com.vaadin.server.ErrorMessage; @@ -58,11 +60,6 @@ import com.vaadin.ui.themes.ValoTheme; import com.vaadin.v7.data.fieldgroup.FieldGroup; import com.vaadin.v7.data.util.converter.Converter.ConversionException; -import com.vaadin.v7.ui.AbstractField; -import com.vaadin.v7.ui.ComboBox; -import com.vaadin.v7.ui.DateField; -import com.vaadin.v7.ui.Field; -import com.vaadin.v7.ui.TextField; import de.symeda.sormas.api.Disease; import de.symeda.sormas.api.FacadeProvider; @@ -98,6 +95,7 @@ public class SymptomsForm extends AbstractEditForm { private static final long serialVersionUID = 1L; private static final String CLINICAL_MEASUREMENTS_HEADING_LOC = "clinicalMeasurementsHeadingLoc"; + private static final String CLINICAL_HISTORY_HEADING_LOC = "clinicalHistoryHeadingLoc"; private static final String SIGNS_AND_SYMPTOMS_HEADING_LOC = "signsAndSymptomsHeadingLoc"; private static final String GENERAL_SIGNS_AND_SYMPTOMS_HEADING_LOC = "generalSignsAndSymptomsHeadingLoc"; private static final String RESPIRATORY_SIGNS_AND_SYMPTOMS_HEADING_LOC = "respiratorySignsAndSymptomsHeadingLoc"; @@ -128,8 +126,20 @@ public class SymptomsForm extends AbstractEditForm { fluidRowCss(VSPACE_3, //XXX #1620 fluidColumnLoc? fluidColumn(8, 0, loc(SYMPTOMS_HINT_LOC))) + + fluidRowLocs(6,DATE_OF_ONSET) + + fluidRowLocs(6,FEVER_BODY_TEMP_GREATER) + fluidRow(fluidColumn(8,4, locCss(CssStyles.ALIGN_RIGHT,BUTTONS_LOC)))+ createSymptomGroupLayout(SymptomGroup.GENERAL, GENERAL_SIGNS_AND_SYMPTOMS_HEADING_LOC) + + fluidRowLocs(6,ALTERED_CONSCIOUSNESS) + + fluidRowLocs(6,CONFUSED_DISORIENTED) + + fluidRowLocs(6,HEMORRHAGIC_SYNDROME) + + fluidRowLocs(HYPERGLYCEMIA, HYPOGLYCEMIA) + + fluidRowLocs(6,MENINGEAL_SIGNS) + + fluidRowLocs(6,SEIZURES) + + fluidRowLocs(6,SEPSIS) + + fluidRowLocs(6,SHOCK) + + fluidRowLocs(6,OTHER_COMPLICATIONS) + + fluidRowLocs(6,OTHER_COMPLICATIONS_TEXT) + createSymptomGroupLayout(SymptomGroup.RESPIRATORY, RESPIRATORY_SIGNS_AND_SYMPTOMS_HEADING_LOC) + createSymptomGroupLayout(SymptomGroup.CARDIOVASCULAR, CARDIOVASCULAR_SIGNS_AND_SYMPTOMS_HEADING_LOC) + //createSymptomGroupLayout(SymptomGroup.GASTROINTESTINAL, GASTROINTESTINAL_SIGNS_AND_SYMPTOMS_HEADING_LOC) + @@ -139,17 +149,9 @@ public class SymptomsForm extends AbstractEditForm { createSymptomGroupLayout(SymptomGroup.OTHER, OTHER_SIGNS_AND_SYMPTOMS_HEADING_LOC) + locsCss(VSPACE_3, PATIENT_ILL_LOCATION, SYMPTOMS_COMMENTS) + fluidRowLocsCss(VSPACE_3, ONSET_SYMPTOM, ONSET_DATE) + - loc(COMPLICATIONS_HEADING) + - fluidRow( - fluidColumn(6, 0, - locsCss(VSPACE_3, - ALTERED_CONSCIOUSNESS, CONFUSED_DISORIENTED, HEMORRHAGIC_SYNDROME, - HYPERGLYCEMIA, HYPOGLYCEMIA, OTHER_COMPLICATIONS, - OTHER_COMPLICATIONS_TEXT)), - fluidColumn(6, 0, - locsCss(VSPACE_3, - MENINGEAL_SIGNS, SEIZURES, SEPSIS, SHOCK)) - ); + //loc(CLINICAL_HISTORY_HEADING_LOC) + + fluidRowLocs(6,OUTCOME)+ + fluidRowLocs(PROVISONAL_DIAGNOSIS); //@formatter:on private static String createSymptomGroupLayout(SymptomGroup symptomGroup, String loc) { @@ -235,6 +237,9 @@ protected void addFields() { Label clinicalMeasurementsHeadingLabel = createLabel(I18nProperties.getString(Strings.headingClinicalMeasurements), H3, CLINICAL_MEASUREMENTS_HEADING_LOC); + Label headingClinicalHistoryHeadingLabel = + createLabel(I18nProperties.getString(Strings.headingClinicalHistory), H3, CLINICAL_HISTORY_HEADING_LOC); + Label signsAndSymptomsHeadingLabel = createLabel(I18nProperties.getString(Strings.headingSignsAndSymptoms), H3, SIGNS_AND_SYMPTOMS_HEADING_LOC); @@ -290,6 +295,8 @@ public String getFormattedHtmlMessage() { temperature.setCaption(I18nProperties.getCaption(Captions.symptomsMaxTemperature)); } addField(TEMPERATURE_SOURCE); + ComboBox outcome = addField(CaseDataDto.OUTCOME, ComboBox.class); + outcome.removeItem(CaseOutcome.UNKNOWN); ComboBox bloodPressureSystolic = addField(BLOOD_PRESSURE_SYSTOLIC, ComboBox.class); bloodPressureSystolic.addItems(SymptomsHelper.getBloodPressureValues()); @@ -508,22 +515,17 @@ public String getFormattedHtmlMessage() { HEIGHT, MID_UPPER_ARM_CIRCUMFERENCE, GLASGOW_COMA_SCALE); - } else { - setVisible(false, ONSET_SYMPTOM, ONSET_DATE); } + /*else { + setVisible(false, ONSET_SYMPTOM, ONSET_DATE); + }*/ // Initialize lists conditionalBleedingSymptomFieldIds = Arrays.asList( - GUMS_BLEEDING, - INJECTION_SITE_BLEEDING, - NOSE_BLEEDING, BLOODY_BLACK_STOOL, - RED_BLOOD_VOMIT, DIGESTED_BLOOD_VOMIT, - EYES_BLEEDING, COUGHING_BLOOD, - BLEEDING_VAGINA, SKIN_BRUISING, STOMACH_BLEEDING, BLOOD_URINE, @@ -662,7 +664,6 @@ public String getFormattedHtmlMessage() { DIZZINESS_STANDING_UP, HIGH_OR_LOW_BLOOD_PRESSURE, URINARY_RETENTION, - // complications ALTERED_CONSCIOUSNESS, CONFUSED_DISORIENTED, HEMORRHAGIC_SYNDROME, @@ -740,24 +741,54 @@ public String getFormattedHtmlMessage() { setUpMonkeypoxVisibilities(); } if (disease == Disease.AFP) { + TextArea provisionalDiagnosis = addField(PROVISONAL_DIAGNOSIS, TextArea.class); + provisionalDiagnosis.setRows(4); + + addFields( + MUSCLE_TONE, + DEEP_TENDON_REFLEX, + MUSCLE_VOLUME, + SENSORY_LOSS); + setVisible(false, TEMPERATURE, TEMPERATURE_SOURCE); + clinicalMeasurementsHeadingLabel.setVisible(false); + setVisible(false, FEVER, + ALTERED_CONSCIOUSNESS, + SEIZURES, + HEADACHE, + NECK_STIFFNESS); + + symptomsHide(); + setVisible(true, OTHER_COMPLICATIONS, OTHER_COMPLICATIONS_TEXT); + + } + if(disease == Disease.NEW_INFLUENZA){ + addField(DATE_OF_ONSET, DateField.class); + OptionGroup feverBodytemp = addField(FEVER_BODY_TEMP_GREATER, OptionGroup.class); + + setVisible(false, TEMPERATURE, TEMPERATURE_SOURCE); + clinicalMeasurementsHeadingLabel.setVisible(false); + setVisible(false, ONSET_DATE); + symptomsHide(); + setVisible(false, FEVER, HEADACHE, ALTERED_CONSCIOUSNESS, CONVULSION, SEIZURES); + setVisible(true, COUGH, SORE_THROAT, DIFFICULTY_BREATHING); } if(disease == Disease.CSM){ - setVisible(false, VOMITING, - DIARRHEA, - BLOOD_IN_STOOL, - NAUSEA, - ABDOMINAL_PAIN, - MUSCLE_PAIN, - FATIGUE_WEAKNESS, - SKIN_RASH, + symptomsHide(); + setVisible(true, BULGING_FONTANELLE, OTHER_COMPLICATIONS, OTHER_COMPLICATIONS_TEXT); + clinicalMeasurementsHeadingLabel.setVisible(false); + setVisible(false, TEMPERATURE, TEMPERATURE_SOURCE); + + } else if (disease == Disease.AHF) { + setVisible(true, VOMITING, INJECTION_SITE_BLEEDING, GUMS_BLEEDING, DIARRHEA, EYES_BLEEDING, BLOODY_BLACK_STOOL, ABDOMINAL_PAIN, DIGESTED_BLOOD_VOMIT, + NOSE_BLEEDING, BLEEDING_VAGINA, BREATHLESSNESS, JOINT_PAIN); + setVisible(false, SORE_THROAT, COUGH, COUGH_WITH_SPUTUM, COUGH_WITH_HEAMOPTYSIS, RUNNY_NOSE, - DIFFICULTY_BREATHING, CHEST_PAIN, CONJUNCTIVITIS, EYE_PAIN_LIGHT_SENSITIVE, @@ -766,26 +797,15 @@ public String getFormattedHtmlMessage() { OTITIS_MEDIA, HEARINGLOSS, DEHYDRATION, - ANOREXIA_APPETITE_LOSS, REFUSAL_FEEDOR_DRINK, - JOINT_PAIN, - HICCUPS, BACKACHE, - EYES_BLEEDING, JAUNDICE, DARK_URINE, STOMACH_BLEEDING, RAPID_BREATHING, SWOLLEN_GLANDS, UNEXPLAINED_BLEEDING, - GUMS_BLEEDING, - INJECTION_SITE_BLEEDING, - NOSE_BLEEDING, - BLOODY_BLACK_STOOL, - RED_BLOOD_VOMIT, - DIGESTED_BLOOD_VOMIT, COUGHING_BLOOD, - BLEEDING_VAGINA, SKIN_BRUISING, BLOOD_URINE, OTHER_HEMORRHAGIC_SYMPTOMS, @@ -836,7 +856,6 @@ public String getFormattedHtmlMessage() { SPLENOMEGALY, MICROCEPHALY, MENINGOENCEPHALITIS, - PURPURIC_RASH, DEVELOPMENTAL_DELAY, CONGENITAL_HEART_DISEASE_TYPE, CONGENITAL_HEART_DISEASE_DETAILS, @@ -878,11 +897,8 @@ public String getFormattedHtmlMessage() { RESPIRATORY_DISEASE_VENTILATION, FAST_HEART_RATE, OXYGEN_SATURATION_LOWER_94, - FEVERISHFEELING, WEAKNESS, - FATIGUE, COUGH_WITHOUT_SPUTUM, - BREATHLESSNESS, CHEST_PRESSURE, BLUE_LIPS, BLOOD_CIRCULATION_PROBLEMS, @@ -902,7 +918,8 @@ public String getFormattedHtmlMessage() { //SEIZURES, SEPSIS, SHOCK); - + setVisible(false, TEMPERATURE, TEMPERATURE_SOURCE); + clinicalMeasurementsHeadingLabel.setVisible(false); } if (symptomsContext != SymptomsContext.CASE) { @@ -969,7 +986,7 @@ public String getFormattedHtmlMessage() { Button setEmptyToNoButton = createButtonSetClearedToSymptomState(Captions.symptomsSetClearedToNo, SymptomState.NO); - Button setEmptyToUnknownButton = createButtonSetClearedToSymptomState(Captions.symptomsSetClearedToUnknown, SymptomState.UNKNOWN); + //Button setEmptyToUnknownButton = createButtonSetClearedToSymptomState(Captions.symptomsSetClearedToUnknown, SymptomState.UNKNOWN); // Complications heading - not displayed for Rubella (dirty, should be made generic) Label complicationsHeading = new Label(I18nProperties.getString(Strings.headingComplications)); @@ -981,7 +998,7 @@ public String getFormattedHtmlMessage() { HorizontalLayout buttonsLayout = new HorizontalLayout(); buttonsLayout.addComponent(clearAllButton); buttonsLayout.addComponent(setEmptyToNoButton); - buttonsLayout.addComponent(setEmptyToUnknownButton); + //buttonsLayout.addComponent(setEmptyToUnknownButton); buttonsLayout.setDefaultComponentAlignment(Alignment.MIDDLE_CENTER); buttonsLayout.setMargin(new MarginInfo(true, false, true, true)); @@ -997,6 +1014,163 @@ public String getFormattedHtmlMessage() { } } + private void symptomsHide() { + setVisible(false, VOMITING, + DIARRHEA, + BLOOD_IN_STOOL, + NAUSEA, + ABDOMINAL_PAIN, + MUSCLE_PAIN, + FATIGUE_WEAKNESS, + SKIN_RASH, + SORE_THROAT, + COUGH, + COUGH_WITH_SPUTUM, + COUGH_WITH_HEAMOPTYSIS, + RUNNY_NOSE, + DIFFICULTY_BREATHING, + CHEST_PAIN, + CONJUNCTIVITIS, + EYE_PAIN_LIGHT_SENSITIVE, + KOPLIKS_SPOTS, + THROBOCYTOPENIA, + OTITIS_MEDIA, + HEARINGLOSS, + DEHYDRATION, + ANOREXIA_APPETITE_LOSS, + REFUSAL_FEEDOR_DRINK, + JOINT_PAIN, + HICCUPS, + BACKACHE, + EYES_BLEEDING, + JAUNDICE, + DARK_URINE, + STOMACH_BLEEDING, + RAPID_BREATHING, + SWOLLEN_GLANDS, + UNEXPLAINED_BLEEDING, + GUMS_BLEEDING, + NOSE_BLEEDING, + BLOODY_BLACK_STOOL, + RED_BLOOD_VOMIT, + DIGESTED_BLOOD_VOMIT, + COUGHING_BLOOD, + BLEEDING_VAGINA, + SKIN_BRUISING, + BLOOD_URINE, + OTHER_HEMORRHAGIC_SYMPTOMS, + OTHER_HEMORRHAGIC_SYMPTOMS_TEXT, + OTHER_NON_HEMORRHAGIC_SYMPTOMS, + OTHER_NON_HEMORRHAGIC_SYMPTOMS_TEXT, + LESIONS, + LESIONS_THAT_ITCH, + LESIONS_SAME_STATE, + LESIONS_SAME_SIZE, + LESIONS_DEEP_PROFOUND, + LESIONS_FACE, + LESIONS_LEGS, + LESIONS_SOLES_FEET, + LESIONS_PALMS_HANDS, + LESIONS_THORAX, + LESIONS_ARMS, + LESIONS_GENITALS, + LESIONS_ALL_OVER_BODY, + LYMPHADENOPATHY, + LYMPHADENOPATHY_AXILLARY, + LYMPHADENOPATHY_CERVICAL, + LYMPHADENOPATHY_INGUINAL, + CHILLS_SWEATS, + BEDRIDDEN, + ORAL_ULCERS, + PAINFUL_LYMPHADENITIS, + BLACKENING_DEATH_OF_TISSUE, + BUBOES_GROIN_ARMPIT_NECK, + PHARYNGEAL_ERYTHEMA, + PHARYNGEAL_EXUDATE, + OEDEMA_FACE_NECK, + OEDEMA_LOWER_EXTREMITY, + LOSS_SKIN_TURGOR, + PALPABLE_LIVER, + PALPABLE_SPLEEN, + MALAISE, + SUNKEN_EYES_FONTANELLE, + SIDE_PAIN, + FLUID_IN_LUNG_CAVITY, + TREMOR, + BILATERAL_CATARACTS, + UNILATERAL_CATARACTS, + CONGENITAL_GLAUCOMA, + CONGENITAL_HEART_DISEASE, + PIGMENTARY_RETINOPATHY, + RADIOLUCENT_BONE_DISEASE, + SPLENOMEGALY, + MICROCEPHALY, + MENINGOENCEPHALITIS, + PURPURIC_RASH, + DEVELOPMENTAL_DELAY, + CONGENITAL_HEART_DISEASE_TYPE, + CONGENITAL_HEART_DISEASE_DETAILS, + JAUNDICE_WITHIN_24_HOURS_OF_BIRTH, + PATIENT_ILL_LOCATION, + HYDROPHOBIA, + OPISTHOTONUS, + ANXIETY_STATES, + DELIRIUM, + UPROARIOUSNESS, + PARASTHESIA_AROUND_WOUND, + EXCESS_SALIVATION, + INSOMNIA, + PARALYSIS, + EXCITATION, + DYSPHAGIA, + AEROPHOBIA, + HYPERACTIVITY, + PARESIS, + AGITATION, + ASCENDING_FLACCID_PARALYSIS, + ERRATIC_BEHAVIOUR, + COMA, + CONVULSION, + FLUID_IN_LUNG_CAVITY_AUSCULTATION, + FLUID_IN_LUNG_CAVITY_XRAY, + ABNORMAL_LUNG_XRAY_FINDINGS, + CONJUNCTIVAL_INJECTION, + ACUTE_RESPIRATORY_DISTRESS_SYNDROME, + PNEUMONIA_CLINICAL_OR_RADIOLOGIC, + LOSS_OF_TASTE, + LOSS_OF_SMELL, + WHEEZING, + SKIN_ULCERS, + INABILITY_TO_WALK, + IN_DRAWING_OF_CHEST_WALL, + FEELING_ILL, + SHIVERING, + RESPIRATORY_DISEASE_VENTILATION, + FAST_HEART_RATE, + OXYGEN_SATURATION_LOWER_94, + FEVERISHFEELING, + WEAKNESS, + FATIGUE, + COUGH_WITHOUT_SPUTUM, + BREATHLESSNESS, + CHEST_PRESSURE, + BLUE_LIPS, + BLOOD_CIRCULATION_PROBLEMS, + PALPITATIONS, + DIZZINESS_STANDING_UP, + HIGH_OR_LOW_BLOOD_PRESSURE, + URINARY_RETENTION, + CONFUSED_DISORIENTED, + OTHER_COMPLICATIONS, + OTHER_COMPLICATIONS_TEXT, + HEMORRHAGIC_SYNDROME, + HYPERGLYCEMIA, + HYPOGLYCEMIA, + MENINGEAL_SIGNS, + SEPSIS, + SHOCK); + } + private void toggleFeverComponentError(NullableOptionGroup feverField, ComboBox temperatureField) { Float temperatureValue = (Float) temperatureField.getValue(); SymptomState feverValue = (SymptomState) feverField.getNullableValue(); diff --git a/sormas-ui/src/test/java/de/symeda/sormas/ui/FacadeProviderMock.java b/sormas-ui/src/test/java/de/symeda/sormas/ui/FacadeProviderMock.java index f4f3da3c4e4..1169f26041e 100644 --- a/sormas-ui/src/test/java/de/symeda/sormas/ui/FacadeProviderMock.java +++ b/sormas-ui/src/test/java/de/symeda/sormas/ui/FacadeProviderMock.java @@ -46,6 +46,7 @@ import de.symeda.sormas.api.report.WeeklyReportFacade; import de.symeda.sormas.api.sample.PathogenTestFacade; import de.symeda.sormas.api.sample.SampleFacade; +import de.symeda.sormas.api.sixtyday.SixtyDayFacade; import de.symeda.sormas.api.symptoms.SymptomsFacade; import de.symeda.sormas.api.task.TaskFacade; import de.symeda.sormas.api.travelentry.TravelEntryFacade; @@ -85,6 +86,7 @@ import de.symeda.sormas.backend.report.WeeklyReportFacadeEjb.WeeklyReportFacadeEjbLocal; import de.symeda.sormas.backend.sample.PathogenTestFacadeEjb.PathogenTestFacadeEjbLocal; import de.symeda.sormas.backend.sample.SampleFacadeEjb.SampleFacadeEjbLocal; +import de.symeda.sormas.backend.sixtyday.SixtyDayFacadeEjb; import de.symeda.sormas.backend.symptoms.SymptomsFacadeEjb.SymptomsFacadeEjbLocal; import de.symeda.sormas.backend.task.TaskFacadeEjb.TaskFacadeEjbLocal; import de.symeda.sormas.backend.travelentry.TravelEntryFacadeEjb; @@ -135,6 +137,8 @@ public

P lookupEjbRemote(Class

clazz) { return (P) bm.getBean(UserFacadeEjbLocal.class); } else if (HospitalizationFacade.class == clazz) { return (P) bm.getBean(HospitalizationFacadeEjbLocal.class); + } else if (SixtyDayFacade.class == clazz) { + return (P) bm.getBean(SixtyDayFacadeEjb.SixtyDayFacadeEjbLocal.class); } else if (EpiDataFacade.class == clazz) { return (P) bm.getBean(EpiDataFacadeEjbLocal.class); } else if (WeeklyReportFacade.class == clazz) { diff --git a/sormas-ui/src/test/java/de/symeda/sormas/ui/TestDataCreator.java b/sormas-ui/src/test/java/de/symeda/sormas/ui/TestDataCreator.java index e24524f2c1c..de9744fefca 100644 --- a/sormas-ui/src/test/java/de/symeda/sormas/ui/TestDataCreator.java +++ b/sormas-ui/src/test/java/de/symeda/sormas/ui/TestDataCreator.java @@ -246,7 +246,7 @@ public SampleDto createSample( SampleDto sample = SampleDto.build(reportingUser, associatedContact); sample.setSampleDateTime(new Date()); sample.setReportDateTime(new Date()); - sample.setSampleMaterial(SampleMaterial.BLOOD); + sample.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); sample.setSamplePurpose(SamplePurpose.EXTERNAL); sample.setLab(FacadeProvider.getFacilityFacade().getReferenceByUuid(lab.getUuid())); @@ -506,7 +506,7 @@ public SampleDto createSample( UserReferenceDto reportingUser, FacilityDto lab, Consumer customConfig) { - return createSample(associatedCase, new Date(), new Date(), reportingUser, SampleMaterial.BLOOD, lab, customConfig); + return createSample(associatedCase, new Date(), new Date(), reportingUser, SampleMaterial.WHOLE_BLOOD, lab, customConfig); } public SampleDto createSample( diff --git a/sormas-ui/src/test/java/de/symeda/sormas/ui/caze/GermanCaseClassificationValidatorTest.java b/sormas-ui/src/test/java/de/symeda/sormas/ui/caze/GermanCaseClassificationValidatorTest.java index b415a3e2caa..0a2bab88874 100644 --- a/sormas-ui/src/test/java/de/symeda/sormas/ui/caze/GermanCaseClassificationValidatorTest.java +++ b/sormas-ui/src/test/java/de/symeda/sormas/ui/caze/GermanCaseClassificationValidatorTest.java @@ -79,7 +79,7 @@ public void testCaseClassificationValidator() { // assert classifications when no symptoms & non-positive lab result final SampleDto sample = - creator.createSample(caze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.BLOOD, rdcf.facility.toReference()); + creator.createSample(caze.toReference(), new Date(), new Date(), user.toReference(), SampleMaterial.WHOLE_BLOOD, rdcf.facility.toReference()); valid(CaseClassification.NOT_CLASSIFIED, validator); invalid(CaseClassification.SUSPECT, validator); diff --git a/sormas-ui/src/test/java/de/symeda/sormas/ui/caze/importer/CaseImporterTest.java b/sormas-ui/src/test/java/de/symeda/sormas/ui/caze/importer/CaseImporterTest.java index 3dfb51992fd..1886eabfbc5 100644 --- a/sormas-ui/src/test/java/de/symeda/sormas/ui/caze/importer/CaseImporterTest.java +++ b/sormas-ui/src/test/java/de/symeda/sormas/ui/caze/importer/CaseImporterTest.java @@ -398,11 +398,11 @@ public void testImportWithSamples() throws IOException, InterruptedException, Cs List case2Samples = getSampleFacade().getByCaseUuids(Collections.singletonList(case2.getUuid())); assertEquals(1, case2Samples.size()); - assertEquals(SampleMaterial.BLOOD, case2Samples.get(0).getSampleMaterial()); + assertEquals(SampleMaterial.WHOLE_BLOOD, case2Samples.get(0).getSampleMaterial()); List case3Samples = getSampleFacade().getByCaseUuids(Collections.singletonList(case3.getUuid())); assertEquals(2, case3Samples.size()); - assertEquals("Should have one blood sample", 1, case3Samples.stream().filter(s -> s.getSampleMaterial() == SampleMaterial.BLOOD).count()); + assertEquals("Should have one blood sample", 1, case3Samples.stream().filter(s -> s.getSampleMaterial() == SampleMaterial.WHOLE_BLOOD).count()); assertEquals("Should have one stool sample", 1, case3Samples.stream().filter(s -> s.getSampleMaterial() == SampleMaterial.STOOL).count()); } diff --git a/sormas-ui/src/test/java/de/symeda/sormas/ui/externalmessage/labmessage/AbstractLabMessageProcessingFlowTest.java b/sormas-ui/src/test/java/de/symeda/sormas/ui/externalmessage/labmessage/AbstractLabMessageProcessingFlowTest.java index b5523ffe248..948b7521e08 100644 --- a/sormas-ui/src/test/java/de/symeda/sormas/ui/externalmessage/labmessage/AbstractLabMessageProcessingFlowTest.java +++ b/sormas-ui/src/test/java/de/symeda/sormas/ui/externalmessage/labmessage/AbstractLabMessageProcessingFlowTest.java @@ -597,7 +597,7 @@ public void testCreateCaseAndCreateSample() throws ExecutionException, Interrupt ExternalMessageDto labMessage = createLabMessage(Disease.CORONAVIRUS, "test-report-id", ExternalMessageStatus.UNPROCESSED); labMessage.setSampleDateTime(new Date()); - labMessage.setSampleMaterial(SampleMaterial.BLOOD); + labMessage.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); TestReportDto testReport1 = TestReportDto.build(); testReport1.setTestType(PathogenTestType.CULTURE); @@ -614,7 +614,7 @@ public void testCreateCaseAndCreateSample() throws ExecutionException, Interrupt verify(handleCreateSampleAndPathogenTests).handle(argThat(sample -> { assertThat(sample.getAssociatedCase(), is(caseCaptor.getValue().toReference())); assertThat(sample.getSampleDateTime(), is(labMessage.getSampleDateTime())); - assertThat(sample.getSampleMaterial(), is(SampleMaterial.BLOOD)); + assertThat(sample.getSampleMaterial(), is(SampleMaterial.WHOLE_BLOOD)); assertThat(sample.getReportingUser(), is(user.toReference())); return true; @@ -656,7 +656,7 @@ public void testCreateSampleCancel() throws ExecutionException, InterruptedExcep ExternalMessageDto labMessage = createLabMessage(Disease.CORONAVIRUS, "test-report-id", ExternalMessageStatus.UNPROCESSED); labMessage.setSampleDateTime(new Date()); - labMessage.setSampleMaterial(SampleMaterial.BLOOD); + labMessage.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); ProcessingResult result = runFlow(labMessage); @@ -741,7 +741,7 @@ public void testCreateContactAndCreateSample() throws ExecutionException, Interr ExternalMessageDto labMessage = createLabMessage(Disease.CORONAVIRUS, "test-report-id", ExternalMessageStatus.UNPROCESSED); labMessage.setSampleDateTime(new Date()); - labMessage.setSampleMaterial(SampleMaterial.BLOOD); + labMessage.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); TestReportDto testReport = TestReportDto.build(); testReport.setTestType(PathogenTestType.CULTURE); @@ -754,7 +754,7 @@ public void testCreateContactAndCreateSample() throws ExecutionException, Interr verify(handleCreateSampleAndPathogenTests).handle(argThat(sample -> { assertThat(sample.getAssociatedContact(), is(contactCaptor.getValue().toReference())); assertThat(sample.getSampleDateTime(), is(labMessage.getSampleDateTime())); - assertThat(sample.getSampleMaterial(), is(SampleMaterial.BLOOD)); + assertThat(sample.getSampleMaterial(), is(SampleMaterial.WHOLE_BLOOD)); assertThat(sample.getReportingUser(), is(user.toReference())); return true; @@ -953,7 +953,7 @@ public void testCreateEventAndCreateEventParticipantAndCreateSample() throws Exe ExternalMessageDto labMessage = createLabMessage(Disease.CORONAVIRUS, "test-report-id", ExternalMessageStatus.UNPROCESSED); labMessage.setSampleDateTime(new Date()); - labMessage.setSampleMaterial(SampleMaterial.BLOOD); + labMessage.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); TestReportDto testReport = TestReportDto.build(); testReport.setTestType(PathogenTestType.CULTURE); @@ -966,7 +966,7 @@ public void testCreateEventAndCreateEventParticipantAndCreateSample() throws Exe verify(handleCreateSampleAndPathogenTests).handle(argThat(sample -> { assertThat(sample.getAssociatedEventParticipant(), is(eventParticipantCaptor.getValue().toReference())); assertThat(sample.getSampleDateTime(), is(labMessage.getSampleDateTime())); - assertThat(sample.getSampleMaterial(), is(SampleMaterial.BLOOD)); + assertThat(sample.getSampleMaterial(), is(SampleMaterial.WHOLE_BLOOD)); assertThat(sample.getReportingUser(), is(user.toReference())); return true; diff --git a/sormas-ui/src/test/java/de/symeda/sormas/ui/externalmessage/labmessage/RelatedLabMessageHandlerTest.java b/sormas-ui/src/test/java/de/symeda/sormas/ui/externalmessage/labmessage/RelatedLabMessageHandlerTest.java index f522b7dfabd..8ba897bc232 100644 --- a/sormas-ui/src/test/java/de/symeda/sormas/ui/externalmessage/labmessage/RelatedLabMessageHandlerTest.java +++ b/sormas-ui/src/test/java/de/symeda/sormas/ui/externalmessage/labmessage/RelatedLabMessageHandlerTest.java @@ -506,7 +506,7 @@ public void test_handle_handleSampleChanges() throws ExecutionException, Interru ExternalMessageDto labMessageToProcess = ExternalMessageDto.build(); labMessageToProcess.setReportId(reportId); labMessageToProcess.setLabSampleId(labSampleId); - labMessageToProcess.setSampleMaterial(SampleMaterial.BLOOD); + labMessageToProcess.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); labMessageToProcess.setReporterExternalIds(Collections.singletonList(sample.getLab().getExternalId())); labMessageToProcess.setSampleDateTime(sample.getSampleDateTime()); labMessageToProcess.setSpecimenCondition(sample.getSpecimenCondition()); @@ -516,7 +516,7 @@ public void test_handle_handleSampleChanges() throws ExecutionException, Interru assertThat(originalSample.getSampleMaterial(), is(sample.getSampleMaterial())); SampleDto updatedSample = invocation.getArgument(2); - assertThat(updatedSample.getSampleMaterial(), is(SampleMaterial.BLOOD)); + assertThat(updatedSample.getSampleMaterial(), is(SampleMaterial.WHOLE_BLOOD)); assertThat(updatedSample.getSampleMaterial(), is(not(sample.getSampleMaterial()))); assertThat(originalSample.getUuid(), is(updatedSample.getUuid())); @@ -755,7 +755,7 @@ public void test_handle_confirmCorrectionFlowCalledOnce() throws ExecutionExcept labMessageToProcess.setPersonFirstName(person.getFirstName()); labMessageToProcess.setPersonLastName(person.getLastName() + " Changed"); labMessageToProcess.setPersonSex(person.getSex()); - labMessageToProcess.setSampleMaterial(SampleMaterial.BLOOD); + labMessageToProcess.setSampleMaterial(SampleMaterial.WHOLE_BLOOD); labMessageToProcess.setReporterExternalIds(Collections.singletonList(sample.getLab().getExternalId())); labMessageToProcess.setSampleDateTime(sample.getSampleDateTime()); labMessageToProcess.setSpecimenCondition(sample.getSpecimenCondition()); diff --git a/sormas-ui/src/test/java/de/symeda/sormas/ui/importexport/ImportExportTest.java b/sormas-ui/src/test/java/de/symeda/sormas/ui/importexport/ImportExportTest.java index e44341daf65..fd0487f42f7 100644 --- a/sormas-ui/src/test/java/de/symeda/sormas/ui/importexport/ImportExportTest.java +++ b/sormas-ui/src/test/java/de/symeda/sormas/ui/importexport/ImportExportTest.java @@ -33,6 +33,7 @@ import java.util.List; import java.util.stream.Collectors; +import de.symeda.sormas.api.utils.YesNo; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; import org.junit.Test; @@ -93,10 +94,10 @@ public void testImportExportedCase() throws IOException, CsvException, InvalidCo caze.setQuarantine(QuarantineType.INSTITUTIONELL); caze.setQuarantineFrom(dateNow); caze.setQuarantineTo(dateNow); - caze.getHospitalization().setAdmittedToHealthFacility(YesNoUnknown.YES); + caze.getHospitalization().setAdmittedToHealthFacility(YesNo.YES); caze.getHospitalization().setAdmissionDate(dateNow); caze.getHospitalization().setDischargeDate(dateNow); - caze.getHospitalization().setLeftAgainstAdvice(YesNoUnknown.YES); + caze.getHospitalization().setLeftAgainstAdvice(YesNo.YES); caze.getSymptoms().setAbdominalPain(SymptomState.YES); caze.getSymptoms().setAgitation(SymptomState.YES); caze.getSymptoms().setBedridden(SymptomState.YES); diff --git a/sormas-ui/src/test/java/de/symeda/sormas/ui/samples/SampleControllerTest.java b/sormas-ui/src/test/java/de/symeda/sormas/ui/samples/SampleControllerTest.java index a7935ec89dd..7c76f36dd02 100644 --- a/sormas-ui/src/test/java/de/symeda/sormas/ui/samples/SampleControllerTest.java +++ b/sormas-ui/src/test/java/de/symeda/sormas/ui/samples/SampleControllerTest.java @@ -60,7 +60,7 @@ public void testGetDiseaseOf() { new Date(), new Date(), user.toReference(), - SampleMaterial.BLOOD, + SampleMaterial.WHOLE_BLOOD, rdcf.facility.toReference()); assertThat(sut.getDiseaseOf(sample), equalTo(Disease.CHOLERA));