Skip to content

Commit

Permalink
[GITFLOW]merging 'hotfix-1.68.1' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
MateStrysewske committed Feb 28, 2022
2 parents 5ad45df + 7afe584 commit 779d61a
Show file tree
Hide file tree
Showing 33 changed files with 322 additions and 184 deletions.
2 changes: 1 addition & 1 deletion sormas-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>de.symeda.sormas</groupId>
<artifactId>sormas-base</artifactId>
<version>1.68.0</version>
<version>1.68.1</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public enum FeatureType {
new FeatureType[] {
SAMPLES_LAB },
null),
TASK_MANAGEMENT(true, true, null, null),
TASK_MANAGEMENT(true, true, null, ImmutableMap.of(FeatureTypeProperty.ALLOW_FREE_EDITING, Boolean.FALSE)),
WEEKLY_REPORTING(true, true, null, null),
IMMUNIZATION_MANAGEMENT(true, true, null, ImmutableMap.of(FeatureTypeProperty.REDUCED, Boolean.FALSE)),
TRAVEL_ENTRIES(true, false, null, null),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public enum FeatureTypeProperty {

REDUCED(Boolean.class),
AUTOMATIC_RESPONSIBILITY_ASSIGNMENT(Boolean.class),
ALLOW_FREE_FOLLOW_UP_OVERWRITE(Boolean.class);
ALLOW_FREE_FOLLOW_UP_OVERWRITE(Boolean.class),
ALLOW_FREE_EDITING(Boolean.class);

private final Class<?> returnType;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,7 @@ public interface Strings {
String infoSelectOrCreatePersonForImmunization = "infoSelectOrCreatePersonForImmunization";
String infoSelectOrCreatePersonForImport = "infoSelectOrCreatePersonForImport";
String infoSelectOrCreatePersonForLabMessage = "infoSelectOrCreatePersonForLabMessage";
String infoSelectOrCreatePersonForLabMessageWithoutMatches = "infoSelectOrCreatePersonForLabMessageWithoutMatches";
String infoSimilarImmunization = "infoSimilarImmunization";
String infoSkipOrOverrideDuplicateCampaignFormDataImport = "infoSkipOrOverrideDuplicateCampaignFormDataImport";
String infoSpecificCaseSearch = "infoSpecificCaseSearch";
Expand Down
1 change: 1 addition & 0 deletions sormas-api/src/main/resources/strings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,7 @@ infoSelectOrCreatePersonForImmunization = The database already contains at least
infoSelectOrCreatePersonForImport = The database already contains at least one person that seems to be very similar to the personal details of the imported entry.<br/><br/>Please look through the list of persons. If you feel certain that one of those persons matches the person of the imported entry, select it and click on the <i>Save</i> button. Otherwise, click on <i>Create New Person</i> to create a new person.<br/><br/>If you are unsure, you can discard this window to remove the entry from the current import.
infoSelectOrCreatePersonForEventParticipant = The database already contains at least one person that seems to be very similar to the personal details of the created event participant.<br/><br/>Please look through the list of persons. If you feel certain that one of those persons matches your event person, select it and click on the <i>Save</i> button. Otherwise, click on <i>Create New Person</i> to create a new event person for your event.<br/><br/>If you are unsure, you can discard this window and cancel the event participant creation process.
infoSelectOrCreatePersonForLabMessage = The database already contains at least one person that seems to be very similar to the personal details of the lab message.<br/><br/>Please look through the list of persons. If you feel certain that one of those persons matches the lab message person, select it and click on the <i>Confirm</i> button. Otherwise, click on <i>Create New Person</i> to create a new person for the lab message.<br/><br/>If you are unsure, you can discard this window and cancel the process.
infoSelectOrCreatePersonForLabMessageWithoutMatches = A person closely matching the person details of the lab message could not automatically be determined. <br/><br/>You can manually search for matches, or you can create a new person. Once you selected an option, continue via the <i>Confirm</i> button. <br/><br/>If you are unsure, you can discard this window and cancel the process.
infoSkipOrOverrideDuplicateCampaignFormDataImport = The database already contains a dataset for the form %s in the campaign %s for the specified community and date. Please have a look at the details for the existing dataset and choose <i>Skip</i> if you want to keep the existing data or <i>Overwrite</i> if you want to replace the existing data with the data you have imported.
pseudonymizedCasesSelectedWarning = For the bulked-edited cases you have only limited access to the sensitive data. For those cases the value you put into "Place Description" will be ignored.
pseudonymizedEntitiesSelectedWarning = You only have limited access to some of the selected entities. Please deselect pseudonymized entities to continue.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

package de.symeda.sormas.app.caze.edit;

import android.view.View;
import java.util.Date;

import org.joda.time.DateTimeComparator;

import java.util.Date;
import android.view.View;

import de.symeda.sormas.api.CountryHelper;
import de.symeda.sormas.api.caze.CaseClassification;
Expand Down Expand Up @@ -151,7 +151,9 @@ static void initializeHospitalizationValidation(final FragmentCaseEditHospitaliz
if (contentBinding.caseHospitalizationAdmissionDate.getValue() != null
&& contentBinding.caseHospitalizationIntensiveCareUnitStart.getValue() != null) {
if (DateTimeComparator.getInstance()
.compare(contentBinding.caseHospitalizationAdmissionDate.getValue(), contentBinding.caseHospitalizationIntensiveCareUnitStart.getValue())
.compare(
contentBinding.caseHospitalizationAdmissionDate.getValue(),
contentBinding.caseHospitalizationIntensiveCareUnitStart.getValue())
> 0) {
contentBinding.caseHospitalizationAdmissionDate.enableErrorState(
I18nProperties.getValidationError(
Expand Down Expand Up @@ -180,15 +182,17 @@ static void initializeHospitalizationValidation(final FragmentCaseEditHospitaliz
}
}
if (contentBinding.caseHospitalizationDischargeDate.getValue() != null
&& contentBinding.caseHospitalizationIntensiveCareUnitEnd.getValue() != null) {
&& contentBinding.caseHospitalizationIntensiveCareUnitEnd.getValue() != null) {
if (DateTimeComparator.getDateOnlyInstance()
.compare(contentBinding.caseHospitalizationDischargeDate.getValue(), contentBinding.caseHospitalizationIntensiveCareUnitEnd.getValue())
< 0) {
.compare(
contentBinding.caseHospitalizationDischargeDate.getValue(),
contentBinding.caseHospitalizationIntensiveCareUnitEnd.getValue())
< 0) {
contentBinding.caseHospitalizationDischargeDate.enableErrorState(
I18nProperties.getValidationError(
Validations.afterDate,
contentBinding.caseHospitalizationDischargeDate.getCaption(),
contentBinding.caseHospitalizationIntensiveCareUnitEnd.getCaption()));
I18nProperties.getValidationError(
Validations.afterDate,
contentBinding.caseHospitalizationDischargeDate.getCaption(),
contentBinding.caseHospitalizationIntensiveCareUnitEnd.getCaption()));
return true;
}
}
Expand All @@ -200,11 +204,13 @@ static void initializeHospitalizationValidation(final FragmentCaseEditHospitaliz
if (contentBinding.caseHospitalizationIntensiveCareUnitStart.getValue() != null
&& contentBinding.caseHospitalizationIntensiveCareUnitEnd.getValue() != null) {
if (DateTimeComparator.getDateOnlyInstance()
.compare(contentBinding.caseHospitalizationIntensiveCareUnitStart.getValue(), contentBinding.caseHospitalizationIntensiveCareUnitEnd.getValue())
< 0) {
.compare(
contentBinding.caseHospitalizationIntensiveCareUnitStart.getValue(),
contentBinding.caseHospitalizationIntensiveCareUnitEnd.getValue())
> 0) {
contentBinding.caseHospitalizationIntensiveCareUnitStart.enableErrorState(
I18nProperties.getValidationError(
Validations.afterDate,
Validations.beforeDate,
contentBinding.caseHospitalizationIntensiveCareUnitStart.getCaption(),
contentBinding.caseHospitalizationIntensiveCareUnitEnd.getCaption()));
return true;
Expand All @@ -213,11 +219,13 @@ static void initializeHospitalizationValidation(final FragmentCaseEditHospitaliz
if (contentBinding.caseHospitalizationIntensiveCareUnitStart.getValue() != null
&& contentBinding.caseHospitalizationDischargeDate.getValue() != null) {
if (DateTimeComparator.getDateOnlyInstance()
.compare(contentBinding.caseHospitalizationIntensiveCareUnitStart.getValue(), contentBinding.caseHospitalizationDischargeDate.getValue())
< 0) {
.compare(
contentBinding.caseHospitalizationIntensiveCareUnitStart.getValue(),
contentBinding.caseHospitalizationDischargeDate.getValue())
> 0) {
contentBinding.caseHospitalizationIntensiveCareUnitStart.enableErrorState(
I18nProperties.getValidationError(
Validations.afterDate,
Validations.beforeDate,
contentBinding.caseHospitalizationIntensiveCareUnitStart.getCaption(),
contentBinding.caseHospitalizationDischargeDate.getCaption()));
return true;
Expand All @@ -233,10 +241,25 @@ static void initializeHospitalizationValidation(final FragmentCaseEditHospitaliz
}

static void initializePreviousHospitalizationValidation(final DialogPreviousHospitalizationLayoutBinding contentBinding) {
ValidationHelper.initDateIntervalValidator(contentBinding.casePreviousHospitalizationAdmissionDate, contentBinding.casePreviousHospitalizationDischargeDate, false);
ValidationHelper.initDateIntervalValidator(contentBinding.casePreviousHospitalizationAdmissionDate, contentBinding.casePreviousHospitalizationIntensiveCareUnitStart, false);
ValidationHelper.initDateIntervalValidator(contentBinding.casePreviousHospitalizationIntensiveCareUnitStart, contentBinding.casePreviousHospitalizationIntensiveCareUnitEnd, false);
ValidationHelper.initDateIntervalValidator(contentBinding.casePreviousHospitalizationIntensiveCareUnitStart, contentBinding.casePreviousHospitalizationDischargeDate, false);
ValidationHelper.initDateIntervalValidator(contentBinding.casePreviousHospitalizationIntensiveCareUnitEnd, contentBinding.casePreviousHospitalizationDischargeDate, false);
ValidationHelper.initDateIntervalValidator(
contentBinding.casePreviousHospitalizationAdmissionDate,
contentBinding.casePreviousHospitalizationDischargeDate,
false);
ValidationHelper.initDateIntervalValidator(
contentBinding.casePreviousHospitalizationAdmissionDate,
contentBinding.casePreviousHospitalizationIntensiveCareUnitStart,
false);
ValidationHelper.initDateIntervalValidator(
contentBinding.casePreviousHospitalizationIntensiveCareUnitStart,
contentBinding.casePreviousHospitalizationIntensiveCareUnitEnd,
false);
ValidationHelper.initDateIntervalValidator(
contentBinding.casePreviousHospitalizationIntensiveCareUnitStart,
contentBinding.casePreviousHospitalizationDischargeDate,
false);
ValidationHelper.initDateIntervalValidator(
contentBinding.casePreviousHospitalizationIntensiveCareUnitEnd,
contentBinding.casePreviousHospitalizationDischargeDate,
false);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

public interface ImmunizationFacadeRetro {

@GET("contacts/all/{since}/{size}/{lastSynchronizedUuid}")
@GET("immunizations/all/{since}/{size}/{lastSynchronizedUuid}")
Call<List<ImmunizationDto>> pullAllSince(
@Path("since") long since,
@Path("size") int size,
Expand Down
2 changes: 1 addition & 1 deletion sormas-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sormas-base</artifactId>
<groupId>de.symeda.sormas</groupId>
<version>1.68.0</version>
<version>1.68.1</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion sormas-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sormas-base</artifactId>
<groupId>de.symeda.sormas</groupId>
<version>1.68.0</version>
<version>1.68.1</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,10 @@ public List<SimilarPersonDto> getSimilarPersonDtos(PersonSimilarityCriteria crit
if (limit != null) {
query.setMaxResults(limit);
}
return query.getResultList().stream().map(this::toSimilarPersonDto).collect(Collectors.toList());

List<Person> persons = query.getResultList();
List<Long> personsInJurisdiction = getInJurisdictionIDs(persons);
return persons.stream().filter(p -> personsInJurisdiction.contains(p.getId())).map(this::toSimilarPersonDto).collect(Collectors.toList());
}

private SimilarPersonDto toSimilarPersonDto(Person entity) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ public Map<PathogenTestResultType, Long> getNewTestResultCountByResultType(List<
});
return results.stream()
.filter(e -> e[0] != null)
.collect(Collectors.toMap(e -> PathogenTestResultType.valueOf((String) e[0]), e -> ((BigInteger) e[1]).longValue()));
.collect(Collectors.toMap(e -> PathogenTestResultType.valueOf((String) e[0]), e -> ((BigInteger) e[1]).longValue(), Long::sum));
}
}

Expand Down
2 changes: 1 addition & 1 deletion sormas-base/dependencies/serverlibs.pom
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<artifactId>sormas-base</artifactId>
<groupId>de.symeda.sormas</groupId>
<version>1.68.0</version>
<version>1.68.1</version>
<relativePath>../</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sormas-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>de.symeda.sormas</groupId>
<artifactId>sormas-base</artifactId>
<packaging>pom</packaging>
<version>1.68.0</version>
<version>1.68.1</version>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
Expand Down
2 changes: 1 addition & 1 deletion sormas-cargoserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>de.symeda.sormas</groupId>
<artifactId>sormas-base</artifactId>
<version>1.68.0</version>
<version>1.68.1</version>
<relativePath>../sormas-base</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sormas-ear/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>de.symeda.sormas</groupId>
<artifactId>sormas-base</artifactId>
<version>1.68.0</version>
<version>1.68.1</version>
<relativePath>../sormas-base</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sormas-keycloak-service-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sormas-base</artifactId>
<groupId>de.symeda.sormas</groupId>
<version>1.68.0</version>
<version>1.68.1</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion sormas-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>de.symeda.sormas</groupId>
<artifactId>sormas-base</artifactId>
<version>1.68.0</version>
<version>1.68.1</version>
<relativePath>../sormas-base</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion sormas-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>sormas-base</artifactId>
<groupId>de.symeda.sormas</groupId>
<version>1.68.0</version>
<version>1.68.1</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*******************************************************************************/
package de.symeda.sormas.ui.caze;

import de.symeda.sormas.ui.utils.CssStyles;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
Expand Down Expand Up @@ -130,6 +129,7 @@
import de.symeda.sormas.ui.utils.AbstractView;
import de.symeda.sormas.ui.utils.ButtonHelper;
import de.symeda.sormas.ui.utils.CommitDiscardWrapperComponent;
import de.symeda.sormas.ui.utils.CssStyles;
import de.symeda.sormas.ui.utils.DateHelper8;
import de.symeda.sormas.ui.utils.DetailSubComponentWrapper;
import de.symeda.sormas.ui.utils.NullableOptionGroup;
Expand Down Expand Up @@ -555,11 +555,14 @@ public CommitDiscardWrapperComponent<CaseCreateForm> getCaseCreateComponent(
|| (convertedEventParticipant == null && convertedTravelEntry == null));
assert (unrelatedDisease == null || (convertedEventParticipant == null && convertedTravelEntry == null));

CaseCreateForm createForm = convertedContact == null
&& convertedEventParticipant == null
&& convertedTravelEntry == null
&& unrelatedDisease == null
&& !createdFromLabMessage ? new CaseCreateForm() : new CaseCreateForm(convertedTravelEntry);
CaseCreateForm createForm;
if (createdFromLabMessage) {
createForm = new CaseCreateForm(true, false, null);
} else {
createForm = convertedContact == null && convertedEventParticipant == null && convertedTravelEntry == null && unrelatedDisease == null
? new CaseCreateForm()
: new CaseCreateForm(convertedTravelEntry);
}

CaseDataDto caze;
PersonDto person;
Expand Down Expand Up @@ -1760,14 +1763,12 @@ public void sendCasesToExternalSurveillanceTool(Collection<? extends CaseIndexDt
notShareableListComponent.setWidthFull();
notShareableListComponent.setEnabled(false);
Label notSharableLabel = new Label(
String.format(I18nProperties.getString(Strings.errorExternalSurveillanceToolCasesNotSharable), notSharableUuids.size()),
ContentMode.HTML);
String.format(I18nProperties.getString(Strings.errorExternalSurveillanceToolCasesNotSharable), notSharableUuids.size()),
ContentMode.HTML);
notSharableLabel.addStyleName(CssStyles.LABEL_WHITE_SPACE_NORMAL);
VaadinUiUtil.showConfirmationPopup(
I18nProperties.getCaption(Captions.ExternalSurveillanceToolGateway_send),
new VerticalLayout(
notSharableLabel,
notShareableListComponent),
new VerticalLayout(notSharableLabel, notShareableListComponent),
String.format(
I18nProperties.getCaption(Captions.ExternalSurveillanceToolGateway_excludeAndSend),
uuidsWithoutNotSharable.size(),
Expand Down
Loading

0 comments on commit 779d61a

Please sign in to comment.