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

Commit 0239839

Browse files
ChristopherRiedelFredrikSchäferVitagroupvidi42sergiupacurariu
authored
Feature 3488 lab message UI first approach (SORMAS-Foundation#4023)
* SORMAS-Foundation#3486: Add LabMessage to backend * SORMAS-Foundation#3488: LabMessage directory * SORMAS-Foundation#3696 Wrap the Adapter in a Facade * SORMAS-Foundation#3488: LabMessage process * SORMAS-Foundation#3488 fetching * SORMAS-Foundation#3488 use system events, migrate since-time management to sormas * SORMAS-Foundation#3488: finished process for new or existing case with new sample * SORMAS-Foundation#3488 Added labmessages cronjob * SORMAS-Foundation#3488: change behavior after process * SORMAS-Foundation#3488 separate start and end date of systemevent Co-authored-by: Christopher Riedel <[email protected]> Co-authored-by: FredrikSchäferVitagroup <[email protected]> Co-authored-by: Alex Vidrean <[email protected]> Co-authored-by: sergiupacurariu <[email protected]>
1 parent 6c06de6 commit 0239839

53 files changed

Lines changed: 1860 additions & 47 deletions

File tree

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/ConfigFacade.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,5 @@ public interface ConfigFacade {
117117

118118
boolean isSmsServiceSetUp();
119119

120+
String getDemisJndiName();
120121
}

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*/
1515
package de.symeda.sormas.api;
1616

17+
import javax.naming.ConfigurationException;
1718
import javax.naming.InitialContext;
1819
import javax.naming.NamingException;
1920

@@ -48,6 +49,8 @@
4849
import de.symeda.sormas.api.infrastructure.InfrastructureFacade;
4950
import de.symeda.sormas.api.infrastructure.PointOfEntryFacade;
5051
import de.symeda.sormas.api.infrastructure.PopulationDataFacade;
52+
import de.symeda.sormas.api.labmessage.ExternalLabResultsFacade;
53+
import de.symeda.sormas.api.labmessage.LabMessageFacade;
5154
import de.symeda.sormas.api.outbreak.OutbreakFacade;
5255
import de.symeda.sormas.api.person.PersonFacade;
5356
import de.symeda.sormas.api.region.AreaFacade;
@@ -327,6 +330,23 @@ public static SystemEventFacade getSystemEventFacade() {
327330
return get().lookupEjbRemote(SystemEventFacade.class);
328331
}
329332

333+
public static LabMessageFacade getLabMessageFacade() {
334+
return get().lookupEjbRemote(LabMessageFacade.class);
335+
}
336+
337+
public static ExternalLabResultsFacade getExternalLabResultsFacade() {
338+
try {
339+
String jndiName = FacadeProvider.getConfigFacade().getDemisJndiName();
340+
if (jndiName == null) {
341+
throw new ConfigurationException("No LabResultAdapter JNDI name is configured in the sormas.properties");
342+
} else {
343+
return (ExternalLabResultsFacade) get().ic.lookup(jndiName);
344+
}
345+
} catch (NamingException e) {
346+
throw new RuntimeException(e.getMessage(), e);
347+
}
348+
}
349+
330350
@SuppressWarnings("unchecked")
331351
public <P> P lookupEjbRemote(Class<P> clazz) {
332352
try {

sormas-api/src/main/java/de/symeda/sormas/api/event/EventParticipantFacade.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import javax.ejb.Remote;
2525

2626
import de.symeda.sormas.api.Language;
27+
import de.symeda.sormas.api.labmessage.EventParticipantSimilarityCriteria;
2728
import de.symeda.sormas.api.utils.SortProperty;
2829

2930
@Remote
@@ -73,4 +74,5 @@ List<EventParticipantIndexDto> getIndexList(
7374

7475
List<EventParticipantExportDto> getExportList(EventParticipantCriteria eventParticipantCriteria, int first, int max, Language userLanguage);
7576

77+
List<SimilarEventParticipantDto> getSimilarEventParticipants(EventParticipantSimilarityCriteria eventParticipantSimilarityCriteria);
7678
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package de.symeda.sormas.api.event;
2+
3+
import java.io.Serializable;
4+
5+
public class SimilarEventParticipantDto implements Serializable {
6+
7+
private static final long serialVersionUID = 8213721554266613715L;
8+
9+
}

sormas-api/src/main/java/de/symeda/sormas/api/facility/FacilityFacade.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,4 +88,6 @@ List<FacilityReferenceDto> getByNameAndType(
8888
Map<String, String> getDistrictUuidsForFacilities(List<FacilityReferenceDto> facilities);
8989

9090
Map<String, String> getCommunityUuidsForFacilities(List<FacilityReferenceDto> facilities);
91+
92+
List<FacilityReferenceDto> getByExternalIdAndType(String id, FacilityType type, boolean includeArchivedEntities);
9193
}

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ public interface Captions {
187187
String caseConfirmCase = "caseConfirmCase";
188188
String caseContacts = "caseContacts";
189189
String caseCreateCase = "caseCreateCase";
190+
String caseCreateNew = "caseCreateNew";
190191
String CaseData = "CaseData";
191192
String CaseData_additionalDetails = "CaseData.additionalDetails";
192193
String CaseData_caseClassification = "CaseData.caseClassification";
@@ -411,6 +412,7 @@ public interface Captions {
411412
String caseReferToFacility = "caseReferToFacility";
412413
String caseSearchCase = "caseSearchCase";
413414
String caseSearchSpecificCase = "caseSearchSpecificCase";
415+
String caseSelect = "caseSelect";
414416
String caseTransferCase = "caseTransferCase";
415417
String caseTransferCases = "caseTransferCases";
416418
String changeUserEmail = "changeUserEmail";
@@ -871,6 +873,7 @@ public interface Captions {
871873
String EventParticipant_uuid = "EventParticipant.uuid";
872874
String eventParticipantAddPerson = "eventParticipantAddPerson";
873875
String eventParticipantContactCountOnlyWithSourceCaseInEvent = "eventParticipantContactCountOnlyWithSourceCaseInEvent";
876+
String eventParticipantCreateNew = "eventParticipantCreateNew";
874877
String EventParticipantExport_addressCommunity = "EventParticipantExport.addressCommunity";
875878
String EventParticipantExport_addressDistrict = "EventParticipantExport.addressDistrict";
876879
String EventParticipantExport_addressGpsCoordinates = "EventParticipantExport.addressGpsCoordinates";
@@ -894,6 +897,7 @@ public interface Captions {
894897
String EventParticipantExport_eventTypeOfPlace = "EventParticipantExport.eventTypeOfPlace";
895898
String EventParticipantExport_personNationalHealthId = "EventParticipantExport.personNationalHealthId";
896899
String EventParticipantExport_sampleInformation = "EventParticipantExport.sampleInformation";
900+
String eventParticipantSelect = "eventParticipantSelect";
897901
String eventSearchEvent = "eventSearchEvent";
898902
String eventSearchSpecificEvent = "eventSearchSpecificEvent";
899903
String eventSelect = "eventSelect";
@@ -1043,6 +1047,7 @@ public interface Captions {
10431047
String LabMessage = "LabMessage";
10441048
String LabMessage_labMessageDetails = "LabMessage.labMessageDetails";
10451049
String LabMessage_labSampleId = "LabMessage.labSampleId";
1050+
String LabMessage_messageDateTime = "LabMessage.messageDateTime";
10461051
String LabMessage_personBirthDateDD = "LabMessage.personBirthDateDD";
10471052
String LabMessage_personBirthDateMM = "LabMessage.personBirthDateMM";
10481053
String LabMessage_personBirthDateYYYY = "LabMessage.personBirthDateYYYY";
@@ -1066,6 +1071,10 @@ public interface Captions {
10661071
String LabMessage_testLabPostalCode = "LabMessage.testLabPostalCode";
10671072
String LabMessage_testResult = "LabMessage.testResult";
10681073
String LabMessage_testType = "LabMessage.testType";
1074+
String labMessageFetch = "labMessageFetch";
1075+
String labMessageProcess = "labMessageProcess";
1076+
String labMessageProcessed = "labMessageProcessed";
1077+
String labMessageUnprocessed = "labMessageUnprocessed";
10691078
String lastName = "lastName";
10701079
String lineListingAddLine = "lineListingAddLine";
10711080
String lineListingDisableAll = "lineListingDisableAll";
@@ -1847,6 +1856,7 @@ public interface Captions {
18471856
String View_samples = "View.samples";
18481857
String View_samples_archive = "View.samples.archive";
18491858
String View_samples_data = "View.samples.data";
1859+
String View_samples_labMessages = "View.samples.labMessages";
18501860
String View_samples_sub = "View.samples.sub";
18511861
String View_statistics = "View.statistics";
18521862
String View_statistics_database_export = "View.statistics.database-export";

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ public interface Strings {
404404
String headingPIAAccountCreation = "headingPIAAccountCreation";
405405
String headingPickOrCreateCase = "headingPickOrCreateCase";
406406
String headingPickOrCreateContact = "headingPickOrCreateContact";
407+
String headingPickOrCreateEntry = "headingPickOrCreateEntry";
407408
String headingPickOrCreateEvent = "headingPickOrCreateEvent";
408409
String headingPickOrCreatePerson = "headingPickOrCreatePerson";
409410
String headingPointOfEntryImport = "headingPointOfEntryImport";
@@ -423,6 +424,7 @@ public interface Strings {
423424
String headingSelectCampaign = "headingSelectCampaign";
424425
String headingSelectSourceCase = "headingSelectSourceCase";
425426
String headingSetOutbreakStatus = "headingSetOutbreakStatus";
427+
String headingShowLabMessage = "headingShowLabMessage";
426428
String headingSignsAndSymptoms = "headingSignsAndSymptoms";
427429
String headingSomeEventsNotDeleted = "headingSomeEventsNotDeleted";
428430
String headingStoppedFollowUp = "headingStoppedFollowUp";
@@ -467,6 +469,7 @@ public interface Strings {
467469
String infoContactCreationSourceCase = "infoContactCreationSourceCase";
468470
String infoContactDashboard = "infoContactDashboard";
469471
String infoContactsViewRegionDistrictFilter = "infoContactsViewRegionDistrictFilter";
472+
String infoCreateEntry = "infoCreateEntry";
470473
String infoCreateNewContactDiscardsChanges = "infoCreateNewContactDiscardsChanges";
471474
String infoCreateNewSampleDiscardsChanges = "infoCreateNewSampleDiscardsChanges";
472475
String infoCreateNewSampleDiscardsChangesEventParticipant = "infoCreateNewSampleDiscardsChangesEventParticipant";
@@ -530,12 +533,14 @@ public interface Strings {
530533
String infoSearchCaseForContact = "infoSearchCaseForContact";
531534
String infoSelectOrCreateContact = "infoSelectOrCreateContact";
532535
String infoSelectOrCreateContactImport = "infoSelectOrCreateContactImport";
536+
String infoSelectOrCreateEntry = "infoSelectOrCreateEntry";
533537
String infoSelectOrCreatePersonForCase = "infoSelectOrCreatePersonForCase";
534538
String infoSelectOrCreatePersonForCaseImport = "infoSelectOrCreatePersonForCaseImport";
535539
String infoSelectOrCreatePersonForContact = "infoSelectOrCreatePersonForContact";
536540
String infoSelectOrCreatePersonForContactImport = "infoSelectOrCreatePersonForContactImport";
537541
String infoSelectOrCreatePersonForEventParticipant = "infoSelectOrCreatePersonForEventParticipant";
538542
String infoSelectOrCreatePersonForEventParticipantImport = "infoSelectOrCreatePersonForEventParticipantImport";
543+
String infoSelectOrCreatePersonForLabMessage = "infoSelectOrCreatePersonForLabMessage";
539544
String infoSkipOrOverrideDuplicateCampaignFormDataImport = "infoSkipOrOverrideDuplicateCampaignFormDataImport";
540545
String infoSpecificCaseSearch = "infoSpecificCaseSearch";
541546
String infoSpecificEventSearch = "infoSpecificEventSearch";
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package de.symeda.sormas.api.labmessage;
2+
3+
import de.symeda.sormas.api.BaseCriteria;
4+
import de.symeda.sormas.api.Disease;
5+
import de.symeda.sormas.api.person.PersonReferenceDto;
6+
7+
public class EventParticipantSimilarityCriteria extends BaseCriteria implements Cloneable {
8+
9+
private PersonReferenceDto person;
10+
private Disease disease;
11+
12+
public PersonReferenceDto getPerson() {
13+
return person;
14+
}
15+
16+
public void setPerson(PersonReferenceDto person) {
17+
this.person = person;
18+
}
19+
20+
public Disease getDisease() {
21+
return disease;
22+
}
23+
24+
public void setDisease(Disease disease) {
25+
this.disease = disease;
26+
}
27+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package de.symeda.sormas.api.labmessage;
2+
3+
import javax.ejb.Remote;
4+
import javax.ejb.Stateless;
5+
import java.util.Date;
6+
import java.util.List;
7+
8+
@Remote
9+
public interface ExternalLabResultsFacade {
10+
11+
List<LabMessageDto> getExternalLabMessages(Date since);
12+
13+
String convertToHTML(LabMessageDto message);
14+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package de.symeda.sormas.api.labmessage;
2+
3+
import java.io.Serializable;
4+
5+
import de.symeda.sormas.api.BaseCriteria;
6+
7+
public class LabMessageCriteria extends BaseCriteria implements Serializable {
8+
9+
private Boolean processed;
10+
11+
public Boolean getProcessed() {
12+
return processed;
13+
}
14+
15+
public void setProcessed(Boolean processed) {
16+
this.processed = processed;
17+
}
18+
19+
public LabMessageCriteria processed(Boolean processed) {
20+
setProcessed(processed);
21+
return this;
22+
}
23+
}

0 commit comments

Comments
 (0)