Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit e6be153

Browse files
author
barnabartha
committed
Merge branch 'development' into feature-3152-SymptomsReordering
2 parents 917a6e9 + f1cfc0a commit e6be153

25 files changed

Lines changed: 1264 additions & 170 deletions

File tree

sormas-api/src/main/java/de/symeda/sormas/api/feature/FeatureType.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ public enum FeatureType {
5353
MANUAL_EXTERNAL_MESSAGES(true, true, null),
5454
OTHER_NOTIFICATIONS(true, true, null),
5555
DOCUMENTS(true, false, null),
56-
OUTBREAKS(true, true, null);
56+
OUTBREAKS(true, true, null),
57+
LAB_MESSAGES(true, false, null);
5758

5859
/**
5960
* Server feature means that the feature only needs to be configured once per server since they define the way the system

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,6 +1000,32 @@ public interface Captions {
10001000
String importSkips = "importSkips";
10011001
String inaccessibleValue = "inaccessibleValue";
10021002
String info = "info";
1003+
String LabMessage = "LabMessage";
1004+
String LabMessage_labMessageDetails = "LabMessage.labMessageDetails";
1005+
String LabMessage_labSampleId = "LabMessage.labSampleId";
1006+
String LabMessage_personBirthDateDD = "LabMessage.personBirthDateDD";
1007+
String LabMessage_personBirthDateMM = "LabMessage.personBirthDateMM";
1008+
String LabMessage_personBirthDateYYYY = "LabMessage.personBirthDateYYYY";
1009+
String LabMessage_personCity = "LabMessage.personCity";
1010+
String LabMessage_personFirstName = "LabMessage.personFirstName";
1011+
String LabMessage_personHouseNumber = "LabMessage.personHouseNumber";
1012+
String LabMessage_personLastName = "LabMessage.personLastName";
1013+
String LabMessage_personPostalCode = "LabMessage.personPostalCode";
1014+
String LabMessage_personSex = "LabMessage.personSex";
1015+
String LabMessage_personStreet = "LabMessage.personStreet";
1016+
String LabMessage_processed = "LabMessage.processed";
1017+
String LabMessage_sampleDateTime = "LabMessage.sampleDateTime";
1018+
String LabMessage_sampleMaterial = "LabMessage.sampleMaterial";
1019+
String LabMessage_sampleReceivedDate = "LabMessage.sampleReceivedDate";
1020+
String LabMessage_specimenCondition = "LabMessage.specimenCondition";
1021+
String LabMessage_testDateTime = "LabMessage.testDateTime";
1022+
String LabMessage_testedDisease = "LabMessage.testedDisease";
1023+
String LabMessage_testLabCity = "LabMessage.testLabCity";
1024+
String LabMessage_testLabExternalId = "LabMessage.testLabExternalId";
1025+
String LabMessage_testLabName = "LabMessage.testLabName";
1026+
String LabMessage_testLabPostalCode = "LabMessage.testLabPostalCode";
1027+
String LabMessage_testResult = "LabMessage.testResult";
1028+
String LabMessage_testType = "LabMessage.testType";
10031029
String lastName = "lastName";
10041030
String lineListingAddLine = "lineListingAddLine";
10051031
String lineListingDisableAll = "lineListingDisableAll";
Lines changed: 278 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,278 @@
1+
package de.symeda.sormas.api.labmessage;
2+
3+
import java.util.Date;
4+
5+
import de.symeda.sormas.api.Disease;
6+
import de.symeda.sormas.api.EntityDto;
7+
import de.symeda.sormas.api.person.Sex;
8+
import de.symeda.sormas.api.sample.PathogenTestResultType;
9+
import de.symeda.sormas.api.sample.PathogenTestType;
10+
import de.symeda.sormas.api.sample.SampleMaterial;
11+
import de.symeda.sormas.api.sample.SpecimenCondition;
12+
import de.symeda.sormas.api.utils.DataHelper;
13+
14+
public class LabMessageDto extends EntityDto {
15+
16+
public static final String I18N_PREFIX = "Location";
17+
18+
public static final String SAMPLE_DATE_TIME = "sampleDateTime";
19+
public static final String SAMPLE_RECEIVED_DATE = "sampleReceivedDate";
20+
public static final String LAB_SAMPLE_ID = "labSampleId";
21+
public static final String SAMPLE_MATERIAL = "sampleMaterial";
22+
public static final String TEST_LAB_NAME = "testLabName";
23+
public static final String TEST_LAB_EXTERNAL_ID = "testLabExternalId";
24+
public static final String TEST_LAB_POSTAL_CODE = "testLabPostalCode";
25+
public static final String TEST_LAB_CITY = "testLabCity";
26+
public static final String SPECIMEN_CONDITION = "specimenCondition";
27+
public static final String TEST_TYPE = "testType";
28+
public static final String TESTED_DISEASE = "testedDisease";
29+
public static final String TEST_DATE_TIME = "testDateTime";
30+
public static final String TEST_RESULT = "testResult";
31+
public static final String PERSON_FIRST_NAME = "personFirstName";
32+
public static final String PERSON_LAST_NAME = "personLastName";
33+
public static final String PERSON_SEX = "personSex";
34+
public static final String PERSON_BIRTH_DATE_DD = "personBirthDateDD";
35+
public static final String PERSON_BIRTH_DATE_MM = "personBirthDateMM";
36+
public static final String PERSON_BIRTH_DATE_YYYY = "personBirthDateYYYY";
37+
public static final String PERSON_POSTAL_CODE = "personPostalCode";
38+
public static final String PERSON_CITY = "personCity";
39+
public static final String PERSON_STREET = "personStreet";
40+
public static final String PERSON_HOUSE_NUMBER = "personHouseNumber";
41+
public static final String LAB_MESSAGE_DETAILS = "labMessageDetails";
42+
public static final String PROCESSED = "processed";
43+
44+
private Date sampleDateTime;
45+
private Date sampleReceivedDate;
46+
private String labSampleId;
47+
private SampleMaterial sampleMaterial;
48+
private String testLabName;
49+
private String testLabExternalId;
50+
private String testLabPostalCode;
51+
private String testLabCity;
52+
private SpecimenCondition specimenCondition;
53+
private PathogenTestType testType;
54+
private Disease testedDisease;
55+
private Date testDateTime;
56+
private PathogenTestResultType testResult;
57+
private String personFirstName;
58+
private String personLastName;
59+
private Sex personSex;
60+
private Integer personBirthDateDD;
61+
private Integer personBirthDateMM;
62+
private Integer personBirthDateYYYY;
63+
private String personPostalCode;
64+
private String personCity;
65+
private String personStreet;
66+
private String personHouseNumber;
67+
68+
private String labMessageDetails;
69+
70+
private boolean processed;
71+
72+
public Date getSampleDateTime() {
73+
return sampleDateTime;
74+
}
75+
76+
public void setSampleDateTime(Date sampleDateTime) {
77+
this.sampleDateTime = sampleDateTime;
78+
}
79+
80+
public Date getSampleReceivedDate() {
81+
return sampleReceivedDate;
82+
}
83+
84+
public void setSampleReceivedDate(Date sampleReceivedDate) {
85+
this.sampleReceivedDate = sampleReceivedDate;
86+
}
87+
88+
public String getLabSampleId() {
89+
return labSampleId;
90+
}
91+
92+
public void setLabSampleId(String labSampleId) {
93+
this.labSampleId = labSampleId;
94+
}
95+
96+
public SampleMaterial getSampleMaterial() {
97+
return sampleMaterial;
98+
}
99+
100+
public void setSampleMaterial(SampleMaterial sampleMaterial) {
101+
this.sampleMaterial = sampleMaterial;
102+
}
103+
104+
public String getTestLabName() {
105+
return testLabName;
106+
}
107+
108+
public void setTestLabName(String testLabName) {
109+
this.testLabName = testLabName;
110+
}
111+
112+
public String getTestLabExternalId() {
113+
return testLabExternalId;
114+
}
115+
116+
public void setTestLabExternalId(String testLabExternalId) {
117+
this.testLabExternalId = testLabExternalId;
118+
}
119+
120+
public String getTestLabPostalCode() {
121+
return testLabPostalCode;
122+
}
123+
124+
public void setTestLabPostalCode(String testLabPostalCode) {
125+
this.testLabPostalCode = testLabPostalCode;
126+
}
127+
128+
public String getTestLabCity() {
129+
return testLabCity;
130+
}
131+
132+
public void setTestLabCity(String testLabCity) {
133+
this.testLabCity = testLabCity;
134+
}
135+
136+
public SpecimenCondition getSpecimenCondition() {
137+
return specimenCondition;
138+
}
139+
140+
public void setSpecimenCondition(SpecimenCondition specimenCondition) {
141+
this.specimenCondition = specimenCondition;
142+
}
143+
144+
public PathogenTestType getTestType() {
145+
return testType;
146+
}
147+
148+
public void setTestType(PathogenTestType testType) {
149+
this.testType = testType;
150+
}
151+
152+
public Disease getTestedDisease() {
153+
return testedDisease;
154+
}
155+
156+
public void setTestedDisease(Disease testedDisease) {
157+
this.testedDisease = testedDisease;
158+
}
159+
160+
public Date getTestDateTime() {
161+
return testDateTime;
162+
}
163+
164+
public void setTestDateTime(Date testDateTime) {
165+
this.testDateTime = testDateTime;
166+
}
167+
168+
public PathogenTestResultType getTestResult() {
169+
return testResult;
170+
}
171+
172+
public void setTestResult(PathogenTestResultType testResult) {
173+
this.testResult = testResult;
174+
}
175+
176+
public String getPersonFirstName() {
177+
return personFirstName;
178+
}
179+
180+
public void setPersonFirstName(String personFirstName) {
181+
this.personFirstName = personFirstName;
182+
}
183+
184+
public String getPersonLastName() {
185+
return personLastName;
186+
}
187+
188+
public void setPersonLastName(String personLastName) {
189+
this.personLastName = personLastName;
190+
}
191+
192+
public Sex getPersonSex() {
193+
return personSex;
194+
}
195+
196+
public void setPersonSex(Sex personSex) {
197+
this.personSex = personSex;
198+
}
199+
200+
public Integer getPersonBirthDateDD() {
201+
return personBirthDateDD;
202+
}
203+
204+
public void setPersonBirthDateDD(Integer personBirthDateDD) {
205+
this.personBirthDateDD = personBirthDateDD;
206+
}
207+
208+
public Integer getPersonBirthDateMM() {
209+
return personBirthDateMM;
210+
}
211+
212+
public void setPersonBirthDateMM(Integer personBirthDateMM) {
213+
this.personBirthDateMM = personBirthDateMM;
214+
}
215+
216+
public Integer getPersonBirthDateYYYY() {
217+
return personBirthDateYYYY;
218+
}
219+
220+
public void setPersonBirthDateYYYY(Integer personBirthDateYYYY) {
221+
this.personBirthDateYYYY = personBirthDateYYYY;
222+
}
223+
224+
public String getPersonPostalCode() {
225+
return personPostalCode;
226+
}
227+
228+
public void setPersonPostalCode(String personPostalCode) {
229+
this.personPostalCode = personPostalCode;
230+
}
231+
232+
public String getPersonCity() {
233+
return personCity;
234+
}
235+
236+
public void setPersonCity(String personCity) {
237+
this.personCity = personCity;
238+
}
239+
240+
public String getPersonStreet() {
241+
return personStreet;
242+
}
243+
244+
public void setPersonStreet(String personStreet) {
245+
this.personStreet = personStreet;
246+
}
247+
248+
public String getPersonHouseNumber() {
249+
return personHouseNumber;
250+
}
251+
252+
public void setPersonHouseNumber(String personHouseNumber) {
253+
this.personHouseNumber = personHouseNumber;
254+
}
255+
256+
public String getLabMessageDetails() {
257+
return labMessageDetails;
258+
}
259+
260+
public void setLabMessageDetails(String labMessageDetails) {
261+
this.labMessageDetails = labMessageDetails;
262+
}
263+
264+
public boolean isProcessed() {
265+
return processed;
266+
}
267+
268+
public void setProcessed(boolean processed) {
269+
this.processed = processed;
270+
}
271+
272+
public static LabMessageDto build() {
273+
274+
LabMessageDto labMessage = new LabMessageDto();
275+
labMessage.setUuid(DataHelper.createUuid());
276+
return labMessage;
277+
}
278+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package de.symeda.sormas.api.labmessage;
2+
3+
import javax.ejb.Remote;
4+
5+
@Remote
6+
public interface LabMessageFacade {
7+
8+
void save(LabMessageDto dto);
9+
}

sormas-api/src/main/java/de/symeda/sormas/api/user/UserRight.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import static de.symeda.sormas.api.user.UserRole.ADMIN;
2121
import static de.symeda.sormas.api.user.UserRole.ADMIN_SUPERVISOR;
22+
import static de.symeda.sormas.api.user.UserRole.BAG_USER;
2223
import static de.symeda.sormas.api.user.UserRole.CASE_OFFICER;
2324
import static de.symeda.sormas.api.user.UserRole.CASE_SUPERVISOR;
2425
import static de.symeda.sormas.api.user.UserRole.COMMUNITY_INFORMANT;
@@ -1186,16 +1187,7 @@ public enum UserRight {
11861187
POE_SUPERVISOR
11871188
),
11881189
BAG_EXPORT(
1189-
ADMIN,
1190-
NATIONAL_USER,
1191-
NATIONAL_CLINICIAN,
1192-
POE_NATIONAL_USER,
1193-
SURVEILLANCE_SUPERVISOR,
1194-
ADMIN_SUPERVISOR,
1195-
CASE_SUPERVISOR,
1196-
CONTACT_SUPERVISOR,
1197-
POE_SUPERVISOR,
1198-
LAB_USER
1190+
BAG_USER
11991191
),
12001192
SORMAS_TO_SORMAS_SHARE(
12011193
ADMIN,

sormas-api/src/main/java/de/symeda/sormas/api/user/UserRole.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ public enum UserRole
6161
IMPORT_USER(false, false, false, false, JurisdictionLevel.NONE),
6262
REST_EXTERNAL_VISITS_USER(false, false, false, false, JurisdictionLevel.NONE),
6363
REST_USER(false, false, false, false, JurisdictionLevel.NONE),
64-
SORMAS_TO_SORMAS_CLIENT(false, false, false, false, JurisdictionLevel.NATION);
64+
SORMAS_TO_SORMAS_CLIENT(false, false, false, false, JurisdictionLevel.NATION),
65+
BAG_USER(false, false, false, false, JurisdictionLevel.NONE);
6566

6667
/*
6768
* Hint for SonarQube issues:
@@ -92,6 +93,7 @@ public enum UserRole
9293
public static final String _REST_EXTERNAL_VISITS_USER = REST_EXTERNAL_VISITS_USER.name();
9394
public static final String _REST_USER = REST_USER.name();
9495
public static final String _SORMAS_TO_SORMAS_CLIENT = "SORMAS_TO_SORMAS_CLIENT";
96+
public static final String _BAG_USER = "BAG_USER";
9597

9698
private Set<UserRight> defaultUserRights = null;
9799

@@ -220,6 +222,9 @@ public void addAssignableRoles(Collection<UserRole> collection) {
220222
case SORMAS_TO_SORMAS_CLIENT:
221223
collection.add(SORMAS_TO_SORMAS_CLIENT);
222224
break;
225+
case BAG_USER:
226+
collection.add(BAG_USER);
227+
break;
223228
default:
224229
break;
225230
}

0 commit comments

Comments
 (0)