Skip to content

Commit 2aacc3f

Browse files
committed
Merge development into master
2 parents f5539bb + 89fa37f commit 2aacc3f

File tree

276 files changed

+31075
-714
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+31075
-714
lines changed

funding.json

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"$schema": "https://floss.fund/schema/v1.0.0/funding.schema.json#",
3+
"version": "v1.0.0",
4+
"entity": {
5+
"type": "organisation",
6+
"role": "owner",
7+
"name": "SORMAS Foundation",
8+
"email": "info@sormas.org",
9+
"phone": "004953139399434",
10+
"description": "The SORMAS Foundation is a non-profit organization that aims to support countries in strengthening their surveillance and outbreak management systems through the implementation of SORMAS, as well as to ensure the high-quality standards and sustainability of the software itself.",
11+
"webpageUrl": {
12+
"url": "https://github.com/SORMAS-Foundation/SORMAS-Project",
13+
"wellKnown": ""
14+
}
15+
},
16+
"projects": [{
17+
"guid": "sormas",
18+
"name": "SORMAS (Surveillance Outbreak Response Management and Analysis System)",
19+
"description": "SORMAS is an open-source digital platform for epidemic and pandemic preparedness and response. The system allows epidemiological diseases surveillance, early detection and management of disease outbreaks. It started as a research project in 2015 and has since then been recognized as a Digital Public Good (DPG) and mature digital Global Good (DGG) and is in use in several countries across 5 WHO regions.",
20+
"webpageUrl": {
21+
"url": "https://github.com/SORMAS-Foundation/SORMAS-Project",
22+
"wellKnown": ""
23+
},
24+
"repositoryUrl": {
25+
"url": "https://github.com/SORMAS-Foundation/SORMAS-Project",
26+
"wellKnown": ""
27+
},
28+
"licenses": ["spdx:GPL-3.0"],
29+
"tags": ["publichealth", "health", "surveillance", "epidemic", "nonprofit", "globalgood", "digitalpublicgood"]
30+
}],
31+
"funding": {
32+
"channels": [
33+
{
34+
"guid": "bank",
35+
"type": "bank",
36+
"address": "",
37+
"description": "We accept donations through direct bank transfer. Please e-mail us for more details."
38+
},
39+
{
40+
"guid": "paypal",
41+
"type": "payment-provider",
42+
"address": "https://paypal.me/sormasfoundation",
43+
"description": "We accept donations through PayPal. Please note that we can not provide donation receipts in this case. If you require a donation receipt, please e-mail us for information about making a donation through direct bank transfer."
44+
}
45+
],
46+
"plans": [
47+
{
48+
"guid": "infrastructure-hosting",
49+
"status": "active",
50+
"name": "Hosting Costs for Infrastructure",
51+
"description": "This will cover our monthly costs for maintaining Development and QA systems, as well as a publicly available demo system.",
52+
"amount": 500,
53+
"currency": "EUR",
54+
"frequency": "monthly",
55+
"channels": ["bank", "paypal"]
56+
},
57+
{
58+
"guid": "community-exchange-systems",
59+
"status": "active",
60+
"name": "Community Exchange Systems",
61+
"description": "This will cover our monthly costs for hosting our public website (https://www.sormas.org) as well as the community exchange platform (https://community.sormas.org) for one month.",
62+
"amount": 200,
63+
"currency": "EUR",
64+
"frequency": "yearly",
65+
"channels": ["bank", "paypal"]
66+
},
67+
{
68+
"guid": "developer-full-time-onemonth",
69+
"status": "active",
70+
"name": "Developer Salary Full-Time Monthly",
71+
"description": "This will cover the cost of one developer working full-time on the project for one month.",
72+
"amount": 8000,
73+
"currency": "EUR",
74+
"frequency": "monthly",
75+
"channels": ["bank", "paypal"]
76+
},
77+
{
78+
"guid": "angel-plan",
79+
"status": "active",
80+
"name": "Goodwill plan",
81+
"description": "Pay anything you wish to show your support for the project. Thank you for your support!",
82+
"amount": 0,
83+
"currency": "EUR",
84+
"frequency": "one-time",
85+
"channels": ["bank", "paypal"]
86+
}
87+
]
88+
}
89+
}
90+

sormas-api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<parent>
33
<groupId>de.symeda.sormas</groupId>
44
<artifactId>sormas-base</artifactId>
5-
<version>1.100.1</version>
5+
<version>1.101.0-SNAPSHOT</version>
66
<relativePath>../sormas-base</relativePath>
77
</parent>
88
<modelVersion>4.0.0</modelVersion>

sormas-api/src/main/java/de/symeda/sormas/api/FacadeProvider.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@
103103
import de.symeda.sormas.api.sormastosormas.share.outgoing.ShareRequestInfoFacade;
104104
import de.symeda.sormas.api.sormastosormas.share.outgoing.SormasToSormasShareInfoFacade;
105105
import de.symeda.sormas.api.specialcaseaccess.SpecialCaseAccessFacade;
106+
import de.symeda.sormas.api.survey.SurveyFacade;
107+
import de.symeda.sormas.api.survey.SurveyTokenFacade;
106108
import de.symeda.sormas.api.symptoms.SymptomsFacade;
107109
import de.symeda.sormas.api.systemevents.SystemEventFacade;
108110
import de.symeda.sormas.api.systemevents.sync.SyncFacade;
@@ -554,6 +556,14 @@ public static SelfReportImportFacade getSelfReportImportFacade() {
554556
return get().lookupEjbRemote(SelfReportImportFacade.class);
555557
}
556558

559+
public static SurveyFacade getSurveyFacade() {
560+
return get().lookupEjbRemote(SurveyFacade.class);
561+
}
562+
563+
public static SurveyTokenFacade getSurveyTokenFacade() {
564+
return get().lookupEjbRemote(SurveyTokenFacade.class);
565+
}
566+
557567
@SuppressWarnings("unchecked")
558568
public <P> P lookupEjbRemote(Class<P> clazz) {
559569
try {

sormas-api/src/main/java/de/symeda/sormas/api/audit/Constants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
public class Constants {
99

1010
public static final Set<String> createPrefix =
11-
Collections.unmodifiableSet(new HashSet<>(Arrays.asList("create", "generate", "build", "clone", "calculate")));
11+
Collections.unmodifiableSet(new HashSet<>(Arrays.asList("create", "generate", "build", "clone", "calculate", "upload")));
1212
public static final Set<String> readPrefix = Collections.unmodifiableSet(
1313
new HashSet<>(
1414
Arrays.asList(

sormas-api/src/main/java/de/symeda/sormas/api/caze/CaseCriteria.java

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import de.symeda.sormas.api.person.PresentCondition;
3737
import de.symeda.sormas.api.person.SymptomJournalStatus;
3838
import de.symeda.sormas.api.share.ExternalShareCriteria;
39+
import de.symeda.sormas.api.survey.SurveyReferenceDto;
3940
import de.symeda.sormas.api.user.UserReferenceDto;
4041
import de.symeda.sormas.api.user.UserRoleReferenceDto;
4142
import de.symeda.sormas.api.utils.DateFilterOption;
@@ -87,6 +88,10 @@ public class CaseCriteria extends CriteriaWithDateType implements ExternalShareC
8788
public static final String PERSON_LIKE = "personLike";
8889
public static final String JURISDICTION_TYPE = "jurisdictionType";
8990
public static final String ENTITY_RELEVANCE_STATUS = "relevanceStatus";
91+
public static final String SURVEY_ASSIGNED_FROM = "surveyAssignedFrom";
92+
public static final String SURVEY_ASSIGNED_TO = "surveyAssignedTo";
93+
public static final String SURVEY_RESPONSE_STATUS = "surveyResponseStatus";
94+
public static final String SURVEY = "survey";
9095

9196
private UserRoleReferenceDto reportingUserRole;
9297
private Disease disease;
@@ -154,6 +159,11 @@ public class CaseCriteria extends CriteriaWithDateType implements ExternalShareC
154159
private Boolean onlyShowCasesWithFulfilledReferenceDefinition;
155160
private String personLike;
156161
private Boolean withOwnership;
162+
private Date surveyAssignedFrom;
163+
private Date surveyAssignedTo;
164+
private SurveyResponseStatus surveyResponseStatus;
165+
private SurveyReferenceDto survey;
166+
157167
/**
158168
* Used for filtering merge-able cases to filter both lead and similar cases.
159169
*/
@@ -833,4 +843,36 @@ public CaseCriteria caseReferenceNumber(String caseReferenceNumber) {
833843
this.caseReferenceNumber = caseReferenceNumber;
834844
return this;
835845
}
846+
847+
public Date getSurveyAssignedFrom() {
848+
return surveyAssignedFrom;
849+
}
850+
851+
public void setSurveyAssignedFrom(Date surveyAssignedFrom) {
852+
this.surveyAssignedFrom = surveyAssignedFrom;
853+
}
854+
855+
public Date getSurveyAssignedTo() {
856+
return surveyAssignedTo;
857+
}
858+
859+
public void setSurveyAssignedTo(Date surveyAssignedTo) {
860+
this.surveyAssignedTo = surveyAssignedTo;
861+
}
862+
863+
public SurveyResponseStatus getSurveyResponseStatus() {
864+
return surveyResponseStatus;
865+
}
866+
867+
public void setSurveyResponseStatus(SurveyResponseStatus surveyResponseStatus) {
868+
this.surveyResponseStatus = surveyResponseStatus;
869+
}
870+
871+
public SurveyReferenceDto getSurvey() {
872+
return survey;
873+
}
874+
875+
public void setSurvey(SurveyReferenceDto survey) {
876+
this.survey = survey;
877+
}
836878
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2025 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
*
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
*
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
*/
18+
19+
package de.symeda.sormas.api.caze;
20+
21+
import de.symeda.sormas.api.i18n.I18nProperties;
22+
23+
public enum SurveyResponseStatus {
24+
RECEIVED,
25+
NOT_RECEIVED;
26+
27+
@Override
28+
public String toString() {
29+
return I18nProperties.getEnumCaption(this);
30+
}
31+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
package de.symeda.sormas.api.docgeneneration;
2+
3+
import javax.annotation.Nullable;
4+
5+
import de.symeda.sormas.api.Disease;
6+
import de.symeda.sormas.api.survey.SurveyReferenceDto;
7+
import de.symeda.sormas.api.utils.criteria.BaseCriteria;
8+
9+
public class DocumentTemplateCriteria extends BaseCriteria {
10+
11+
public static final String DOCUMENT_WORKFLOW = "documentWorkflow";
12+
public static final String DISEASE = "disease";
13+
public static final String SURVEY = "surveyReference";
14+
15+
private DocumentWorkflow documentWorkflow;
16+
@Nullable
17+
private Disease disease;
18+
private SurveyReferenceDto surveyReference;
19+
20+
public DocumentTemplateCriteria(DocumentWorkflow documentWorkflow, Disease disease, SurveyReferenceDto surveyReference) {
21+
this.documentWorkflow = documentWorkflow;
22+
this.disease = disease;
23+
this.surveyReference = surveyReference;
24+
}
25+
26+
public DocumentWorkflow getDocumentWorkflow() {
27+
return documentWorkflow;
28+
}
29+
30+
public DocumentTemplateCriteria setDocumentWorkflow(DocumentWorkflow documentWorkflow) {
31+
this.documentWorkflow = documentWorkflow;
32+
return this;
33+
}
34+
35+
public Disease getDisease() {
36+
return disease;
37+
}
38+
39+
public DocumentTemplateCriteria setDisease(Disease disease) {
40+
this.disease = disease;
41+
return this;
42+
}
43+
44+
public SurveyReferenceDto getSurveyReference() {
45+
return surveyReference;
46+
}
47+
48+
public DocumentTemplateCriteria setSurveyReference(SurveyReferenceDto surveyReference) {
49+
this.surveyReference = surveyReference;
50+
return this;
51+
}
52+
}

sormas-api/src/main/java/de/symeda/sormas/api/docgeneneration/DocumentTemplateFacade.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ String generateDocumentTxtFromEntities(
2222
Properties extraProperties)
2323
throws DocumentTemplateException;
2424

25-
List<DocumentTemplateDto> getAvailableTemplates(DocumentWorkflow documentWorkflow, Disease disease);
25+
List<DocumentTemplateDto> getAvailableTemplates(DocumentTemplateCriteria documentTemplateCriteria);
2626

2727
boolean isExistingTemplateFile(DocumentWorkflow documentWorkflow, Disease disease, String templateName);
2828

2929
DocumentVariables getDocumentVariables(DocumentTemplateReferenceDto templateReference) throws DocumentTemplateException;
3030

31-
DocumentTemplateDto saveDocumentTemplate(DocumentTemplateDto template, byte[] document)
32-
throws DocumentTemplateException;
31+
DocumentTemplateDto saveDocumentTemplate(DocumentTemplateDto template, byte[] document) throws DocumentTemplateException;
3332

34-
boolean deleteDocumentTemplate(DocumentTemplateReferenceDto templateReference) throws DocumentTemplateException;
33+
boolean deleteDocumentTemplate(DocumentTemplateReferenceDto templateReference, DocumentWorkflow documentWorkflow)
34+
throws DocumentTemplateException;
3535

3636
byte[] getDocumentTemplateContent(DocumentTemplateReferenceDto templateReference) throws DocumentTemplateException;
3737
}

sormas-api/src/main/java/de/symeda/sormas/api/docgeneneration/DocumentWorkflow.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,23 @@ public enum DocumentWorkflow {
126126
UserRight.EMAIL_TEMPLATE_MANAGEMENT,
127127
ROOT_TRAVEL_ENTRY,
128128
ROOT_PERSON,
129-
ROOT_USER);
129+
ROOT_USER),
130+
SURVEY_DOCUMENT(DocumentWorkflowType.DOCUMENT,
131+
"survey",
132+
DOCX,
133+
UserRight.SURVEY_EDIT,
134+
ROOT_CASE,
135+
ROOT_PERSON,
136+
ROOT_USER,
137+
ROOT_SAMPLE),
138+
SURVEY_EMAIL(DocumentWorkflowType.EMAIL,
139+
Constants.EMAIL_TEMPLATES_FOLDER + "/surveys",
140+
TXT,
141+
UserRight.SURVEY_EDIT,
142+
ROOT_CASE,
143+
ROOT_PERSON,
144+
ROOT_USER,
145+
ROOT_SAMPLE),;
130146

131147
private final DocumentWorkflowType type;
132148
private final String templateDirectory;

sormas-api/src/main/java/de/symeda/sormas/api/document/DocumentFacade.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,6 @@ public interface DocumentFacade {
4444
byte[] getContent(String uuid) throws IOException;
4545

4646
void cleanupDeletedDocuments();
47+
48+
void deleteDocumentFromAllRelations(String documentUuid);
4749
}

0 commit comments

Comments
 (0)