Skip to content

Commit 3d4d6ff

Browse files
authored
Merge pull request #13326 from SORMAS-Foundation/feature-13283_implement_entities_to_support_doctor_declaration_xml_parsing
Feature 13283 implement entities to support doctor declaration xml parsing
2 parents 29a8996 + 79f0c75 commit 3d4d6ff

43 files changed

Lines changed: 2424 additions & 5 deletions

Some content is hidden

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

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
import de.symeda.sormas.api.manualmessagelog.ManualMessageLogFacade;
8686
import de.symeda.sormas.api.outbreak.OutbreakFacade;
8787
import de.symeda.sormas.api.person.PersonFacade;
88+
import de.symeda.sormas.api.person.notifier.NotifierFacade;
8889
import de.symeda.sormas.api.report.AggregateReportFacade;
8990
import de.symeda.sormas.api.report.WeeklyReportFacade;
9091
import de.symeda.sormas.api.sample.AdditionalTestFacade;
@@ -574,6 +575,10 @@ public static SystemConfigurationCategoryFacade getSystemConfigurationCategoryFa
574575
return get().lookupEjbRemote(SystemConfigurationCategoryFacade.class);
575576
}
576577

578+
public static NotifierFacade getNotifierFacade() {
579+
return get().lookupEjbRemote(NotifierFacade.class);
580+
}
581+
577582
@SuppressWarnings("unchecked")
578583
public <P> P lookupEjbRemote(Class<P> clazz) {
579584
try {

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
import de.symeda.sormas.api.infrastructure.region.RegionReferenceDto;
6161
import de.symeda.sormas.api.person.PersonDto;
6262
import de.symeda.sormas.api.person.PersonReferenceDto;
63+
import de.symeda.sormas.api.person.notifier.NotifierReferenceDto;
6364
import de.symeda.sormas.api.sormastosormas.S2SIgnoreProperty;
6465
import de.symeda.sormas.api.sormastosormas.SormasToSormasConfig;
6566
import de.symeda.sormas.api.sormastosormas.SormasToSormasShareableDto;
@@ -228,6 +229,8 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
228229
public static final String DELETION_REASON = "deletionReason";
229230
public static final String OTHER_DELETION_REASON = "otherDeletionReason";
230231

232+
public static final String NOTIFIER = "notifier";
233+
231234
// Fields are declared in the order they should appear in the import template
232235

233236
@Outbreaks
@@ -621,6 +624,8 @@ public class CaseDataDto extends SormasToSormasShareableDto implements IsCase {
621624
@Size(max = FieldConstraints.CHARACTER_LIMIT_TEXT, message = Validations.textTooLong)
622625
private String otherDeletionReason;
623626

627+
private NotifierReferenceDto notifier;
628+
624629
public static CaseDataDto build(PersonReferenceDto person, Disease disease) {
625630
return build(person, disease, HealthConditionsDto.build());
626631
}
@@ -1777,6 +1782,14 @@ public void setHealthConditions(HealthConditionsDto healthConditions) {
17771782
this.healthConditions = healthConditions;
17781783
}
17791784

1785+
public NotifierReferenceDto getNotifier() {
1786+
return notifier;
1787+
}
1788+
1789+
public void setNotifier(NotifierReferenceDto notifier) {
1790+
this.notifier = notifier;
1791+
}
1792+
17801793
@JsonIgnore
17811794
public String i18nPrefix() {
17821795
return I18N_PREFIX;

sormas-api/src/main/java/de/symeda/sormas/api/caze/surveillancereport/SurveillanceReportCriteria.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public class SurveillanceReportCriteria extends BaseCriteria {
2828

2929
private List<String> caseUuids;
3030

31+
private ReportingType reportingType;
32+
3133
public CaseReferenceDto getCaze() {
3234
return caze;
3335
}
@@ -46,4 +48,23 @@ public SurveillanceReportCriteria caseUuids(List<String> caseUuids) {
4648
this.caseUuids = caseUuids;
4749
return this;
4850
}
51+
52+
/**
53+
* Gets the type of reporting for the criteria.
54+
*
55+
* @return the reporting type
56+
*/
57+
public ReportingType getReportingType() {
58+
return reportingType;
59+
}
60+
61+
/**
62+
* Sets the type of reporting for the criteria.
63+
*
64+
* @param reportingType
65+
* the reporting type to set
66+
*/
67+
public void setReportingType(ReportingType reportingType) {
68+
this.reportingType = reportingType;
69+
}
4970
}

sormas-api/src/main/java/de/symeda/sormas/api/caze/surveillancereport/SurveillanceReportFacade.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ public interface SurveillanceReportFacade
2828
void delete(String surveillanceReportUuid);
2929

3030
List<SurveillanceReportDto> getByCaseUuids(List<String> caseUuids);
31+
3132
}

sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2148,10 +2148,12 @@ public interface Captions {
21482148
String name = "name";
21492149
String nationalHealthId = "nationalHealthId";
21502150
String notAvailableShort = "notAvailableShort";
2151+
String Notification_dateOfNotification = "Notification.dateOfNotification";
21512152
String notificationType = "notificationType";
21522153
String notificationType_caption = "notificationType.caption";
21532154
String notificationType_description = "notificationType.description";
21542155
String notificationType_group = "notificationType.group";
2156+
String Notifier_notification = "Notifier.notification";
21552157
String notSpecified = "notSpecified";
21562158
String notTestedYet = "notTestedYet";
21572159
String noUserSelected = "noUserSelected";

sormas-api/src/main/java/de/symeda/sormas/api/i18n/Strings.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ public interface Strings {
478478
String headingCaseFatalityRate = "headingCaseFatalityRate";
479479
String headingCaseFound = "headingCaseFound";
480480
String headingCaseImport = "headingCaseImport";
481+
String headingCaseNotifiedBy = "headingCaseNotifiedBy";
481482
String headingCaseResponsibleJurisidction = "headingCaseResponsibleJurisidction";
482483
String headingCasesDeleted = "headingCasesDeleted";
483484
String headingCasesGuide = "headingCasesGuide";
@@ -1633,6 +1634,7 @@ public interface Strings {
16331634
String no = "no";
16341635
String none = "none";
16351636
String notAnswered = "notAnswered";
1637+
String notApplicable = "notApplicable";
16361638
String notificationCaseClassificationChanged = "notificationCaseClassificationChanged";
16371639
String notificationCaseInvestigationDone = "notificationCaseInvestigationDone";
16381640
String notificationContactSymptomatic = "notificationContactSymptomatic";

sormas-api/src/main/java/de/symeda/sormas/api/i18n/Validations.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ public interface Validations {
261261
String specifyFirstName = "specifyFirstName";
262262
String specifyJurisdictionLevel = "specifyJurisdictionLevel";
263263
String specifyLastName = "specifyLastName";
264+
String specifyRegistrationNumber = "specifyRegistrationNumber";
264265
String specifySex = "specifySex";
265266
String specifyYear = "specifyYear";
266267
String statisticsIncidenceOnlyNumbersAllowed = "statisticsIncidenceOnlyNumbersAllowed";

sormas-api/src/main/java/de/symeda/sormas/api/importexport/DatabaseTable.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ public enum DatabaseTable {
156156
DELETION_CONFIGURATIONS(DatabaseTableType.CONFIGURATION, "deletion_configurations", null),
157157

158158
SYSTEM_CONFIGURATION_VALUES(DatabaseTableType.CONFIGURATION, "system_configuration_values", null),
159-
SYSTEM_CONFIGURATION_CATEGORIES(DatabaseTableType.CONFIGURATION, "system_configuration_categories", null);
159+
SYSTEM_CONFIGURATION_CATEGORIES(DatabaseTableType.CONFIGURATION, "system_configuration_categories", null),
160+
161+
NOTIFIER(DatabaseTableType.SORMAS, "notifier", null);
160162

161163
private static BiFunction<List<FeatureConfigurationDto>, ConfigFacade, Boolean> dependingOnFeature(FeatureType... featureTypes) {
162164
return (featureConfigurations, configFacade) -> featureConfigurations.stream()
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
/*
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2025 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
* You should have received a copy of the GNU General Public License
13+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
14+
*/
15+
16+
package de.symeda.sormas.api.person.notifier;
17+
18+
import java.util.Set;
19+
20+
import de.symeda.sormas.api.utils.criteria.BaseCriteria;
21+
22+
public class NotifierCriteria extends BaseCriteria implements Cloneable {
23+
24+
private static final long serialVersionUID = 1L;
25+
26+
public static final String REGISTRATION_NUMBER = "registrationNumber";
27+
public static final String FIRST_NAME = "firstName";
28+
public static final String LAST_NAME = "lastName";
29+
public static final String ADDRESS = "address";
30+
public static final String PHONE = "phone";
31+
public static final String EMAIL = "email";
32+
33+
private String registrationNumber;
34+
private String firstName;
35+
private String lastName;
36+
private String address;
37+
private String phone;
38+
private String email;
39+
private Set<String> uuids;
40+
41+
public String getRegistrationNumber() {
42+
return registrationNumber;
43+
}
44+
45+
public void setRegistrationNumber(String registrationNumber) {
46+
this.registrationNumber = registrationNumber;
47+
}
48+
49+
public String getFirstName() {
50+
return firstName;
51+
}
52+
53+
public void setFirstName(String firstName) {
54+
this.firstName = firstName;
55+
}
56+
57+
public String getLastName() {
58+
return lastName;
59+
}
60+
61+
public void setLastName(String lastName) {
62+
this.lastName = lastName;
63+
}
64+
65+
public String getAddress() {
66+
return address;
67+
}
68+
69+
public void setAddress(String address) {
70+
this.address = address;
71+
}
72+
73+
public String getPhone() {
74+
return phone;
75+
}
76+
77+
public void setPhone(String phone) {
78+
this.phone = phone;
79+
}
80+
81+
public String getEmail() {
82+
return email;
83+
}
84+
85+
public void setEmail(String email) {
86+
this.email = email;
87+
}
88+
89+
public Set<String> getUuids() {
90+
return uuids;
91+
}
92+
93+
public void setUuids(Set<String> uuids) {
94+
this.uuids = uuids;
95+
}
96+
97+
@Override
98+
public Object clone() throws CloneNotSupportedException {
99+
return super.clone();
100+
}
101+
}
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
/*
2+
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
3+
* Copyright © 2016-2025 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
4+
* This program is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
* You should have received a copy of the GNU General Public License
13+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
14+
*/
15+
16+
package de.symeda.sormas.api.person.notifier;
17+
18+
import javax.validation.constraints.Size;
19+
20+
import de.symeda.sormas.api.i18n.Validations;
21+
import de.symeda.sormas.api.person.IsPerson;
22+
import de.symeda.sormas.api.utils.FeatureIndependent;
23+
import de.symeda.sormas.api.utils.FieldConstraints;
24+
import de.symeda.sormas.api.utils.PersonalData;
25+
import de.symeda.sormas.api.utils.pseudonymization.PseudonymizableDto;
26+
27+
@FeatureIndependent
28+
public class NotifierDto extends PseudonymizableDto implements IsPerson {
29+
30+
private static final long serialVersionUID = 1L;
31+
32+
public static final String REGISTRATION_NUMBER = "registrationNumber";
33+
public static final String FIRST_NAME = "firstName";
34+
public static final String LAST_NAME = "lastName";
35+
public static final String ADDRESS = "address";
36+
public static final String PHONE = "phone";
37+
public static final String EMAIL = "email";
38+
39+
@Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong)
40+
@PersonalData
41+
private String registrationNumber;
42+
43+
@Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong)
44+
@PersonalData
45+
private String firstName;
46+
47+
@Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong)
48+
@PersonalData
49+
private String lastName;
50+
51+
@Size(max = FieldConstraints.CHARACTER_LIMIT_DEFAULT, message = Validations.textTooLong)
52+
@PersonalData
53+
private String address;
54+
55+
@Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong)
56+
@PersonalData
57+
private String phone;
58+
59+
@Size(max = FieldConstraints.CHARACTER_LIMIT_SMALL, message = Validations.textTooLong)
60+
@PersonalData
61+
private String email;
62+
63+
// Getters and setters
64+
public String getRegistrationNumber() {
65+
return registrationNumber;
66+
}
67+
68+
public void setRegistrationNumber(String registrationNumber) {
69+
this.registrationNumber = registrationNumber;
70+
}
71+
72+
public String getFirstName() {
73+
return firstName;
74+
}
75+
76+
public void setFirstName(String firstName) {
77+
this.firstName = firstName;
78+
}
79+
80+
public String getLastName() {
81+
return lastName;
82+
}
83+
84+
public void setLastName(String lastName) {
85+
this.lastName = lastName;
86+
}
87+
88+
public String getAddress() {
89+
return address;
90+
}
91+
92+
public void setAddress(String address) {
93+
this.address = address;
94+
}
95+
96+
public String getPhone() {
97+
return phone;
98+
}
99+
100+
public void setPhone(String phone) {
101+
this.phone = phone;
102+
}
103+
104+
public String getEmail() {
105+
return email;
106+
}
107+
108+
public void setEmail(String email) {
109+
this.email = email;
110+
}
111+
}

0 commit comments

Comments
 (0)