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

Commit

Permalink
SORMAS-Foundation#3486: Add LabMessage to backend
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherRiedel authored Dec 10, 2020
1 parent 666067e commit 04984a0
Show file tree
Hide file tree
Showing 9 changed files with 811 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ public enum FeatureType {
MANUAL_EXTERNAL_MESSAGES(true, true, null),
OTHER_NOTIFICATIONS(true, true, null),
DOCUMENTS(true, false, null),
OUTBREAKS(true, true, null);
OUTBREAKS(true, true, null),
LAB_MESSAGES(true, false, null);

/**
* Server feature means that the feature only needs to be configured once per server since they define the way the system
Expand Down
26 changes: 26 additions & 0 deletions sormas-api/src/main/java/de/symeda/sormas/api/i18n/Captions.java
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,32 @@ public interface Captions {
String importSkips = "importSkips";
String inaccessibleValue = "inaccessibleValue";
String info = "info";
String LabMessage = "LabMessage";
String LabMessage_labMessageDetails = "LabMessage.labMessageDetails";
String LabMessage_labSampleId = "LabMessage.labSampleId";
String LabMessage_personBirthDateDD = "LabMessage.personBirthDateDD";
String LabMessage_personBirthDateMM = "LabMessage.personBirthDateMM";
String LabMessage_personBirthDateYYYY = "LabMessage.personBirthDateYYYY";
String LabMessage_personCity = "LabMessage.personCity";
String LabMessage_personFirstName = "LabMessage.personFirstName";
String LabMessage_personHouseNumber = "LabMessage.personHouseNumber";
String LabMessage_personLastName = "LabMessage.personLastName";
String LabMessage_personPostalCode = "LabMessage.personPostalCode";
String LabMessage_personSex = "LabMessage.personSex";
String LabMessage_personStreet = "LabMessage.personStreet";
String LabMessage_processed = "LabMessage.processed";
String LabMessage_sampleDateTime = "LabMessage.sampleDateTime";
String LabMessage_sampleMaterial = "LabMessage.sampleMaterial";
String LabMessage_sampleReceivedDate = "LabMessage.sampleReceivedDate";
String LabMessage_specimenCondition = "LabMessage.specimenCondition";
String LabMessage_testDateTime = "LabMessage.testDateTime";
String LabMessage_testedDisease = "LabMessage.testedDisease";
String LabMessage_testLabCity = "LabMessage.testLabCity";
String LabMessage_testLabExternalId = "LabMessage.testLabExternalId";
String LabMessage_testLabName = "LabMessage.testLabName";
String LabMessage_testLabPostalCode = "LabMessage.testLabPostalCode";
String LabMessage_testResult = "LabMessage.testResult";
String LabMessage_testType = "LabMessage.testType";
String lastName = "lastName";
String lineListingAddLine = "lineListingAddLine";
String lineListingDisableAll = "lineListingDisableAll";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
package de.symeda.sormas.api.labmessage;

import java.util.Date;

import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.EntityDto;
import de.symeda.sormas.api.person.Sex;
import de.symeda.sormas.api.sample.PathogenTestResultType;
import de.symeda.sormas.api.sample.PathogenTestType;
import de.symeda.sormas.api.sample.SampleMaterial;
import de.symeda.sormas.api.sample.SpecimenCondition;
import de.symeda.sormas.api.utils.DataHelper;

public class LabMessageDto extends EntityDto {

public static final String I18N_PREFIX = "Location";

public static final String SAMPLE_DATE_TIME = "sampleDateTime";
public static final String SAMPLE_RECEIVED_DATE = "sampleReceivedDate";
public static final String LAB_SAMPLE_ID = "labSampleId";
public static final String SAMPLE_MATERIAL = "sampleMaterial";
public static final String TEST_LAB_NAME = "testLabName";
public static final String TEST_LAB_EXTERNAL_ID = "testLabExternalId";
public static final String TEST_LAB_POSTAL_CODE = "testLabPostalCode";
public static final String TEST_LAB_CITY = "testLabCity";
public static final String SPECIMEN_CONDITION = "specimenCondition";
public static final String TEST_TYPE = "testType";
public static final String TESTED_DISEASE = "testedDisease";
public static final String TEST_DATE_TIME = "testDateTime";
public static final String TEST_RESULT = "testResult";
public static final String PERSON_FIRST_NAME = "personFirstName";
public static final String PERSON_LAST_NAME = "personLastName";
public static final String PERSON_SEX = "personSex";
public static final String PERSON_BIRTH_DATE_DD = "personBirthDateDD";
public static final String PERSON_BIRTH_DATE_MM = "personBirthDateMM";
public static final String PERSON_BIRTH_DATE_YYYY = "personBirthDateYYYY";
public static final String PERSON_POSTAL_CODE = "personPostalCode";
public static final String PERSON_CITY = "personCity";
public static final String PERSON_STREET = "personStreet";
public static final String PERSON_HOUSE_NUMBER = "personHouseNumber";
public static final String LAB_MESSAGE_DETAILS = "labMessageDetails";
public static final String PROCESSED = "processed";

private Date sampleDateTime;
private Date sampleReceivedDate;
private String labSampleId;
private SampleMaterial sampleMaterial;
private String testLabName;
private String testLabExternalId;
private String testLabPostalCode;
private String testLabCity;
private SpecimenCondition specimenCondition;
private PathogenTestType testType;
private Disease testedDisease;
private Date testDateTime;
private PathogenTestResultType testResult;
private String personFirstName;
private String personLastName;
private Sex personSex;
private Integer personBirthDateDD;
private Integer personBirthDateMM;
private Integer personBirthDateYYYY;
private String personPostalCode;
private String personCity;
private String personStreet;
private String personHouseNumber;

private String labMessageDetails;

private boolean processed;

public Date getSampleDateTime() {
return sampleDateTime;
}

public void setSampleDateTime(Date sampleDateTime) {
this.sampleDateTime = sampleDateTime;
}

public Date getSampleReceivedDate() {
return sampleReceivedDate;
}

public void setSampleReceivedDate(Date sampleReceivedDate) {
this.sampleReceivedDate = sampleReceivedDate;
}

public String getLabSampleId() {
return labSampleId;
}

public void setLabSampleId(String labSampleId) {
this.labSampleId = labSampleId;
}

public SampleMaterial getSampleMaterial() {
return sampleMaterial;
}

public void setSampleMaterial(SampleMaterial sampleMaterial) {
this.sampleMaterial = sampleMaterial;
}

public String getTestLabName() {
return testLabName;
}

public void setTestLabName(String testLabName) {
this.testLabName = testLabName;
}

public String getTestLabExternalId() {
return testLabExternalId;
}

public void setTestLabExternalId(String testLabExternalId) {
this.testLabExternalId = testLabExternalId;
}

public String getTestLabPostalCode() {
return testLabPostalCode;
}

public void setTestLabPostalCode(String testLabPostalCode) {
this.testLabPostalCode = testLabPostalCode;
}

public String getTestLabCity() {
return testLabCity;
}

public void setTestLabCity(String testLabCity) {
this.testLabCity = testLabCity;
}

public SpecimenCondition getSpecimenCondition() {
return specimenCondition;
}

public void setSpecimenCondition(SpecimenCondition specimenCondition) {
this.specimenCondition = specimenCondition;
}

public PathogenTestType getTestType() {
return testType;
}

public void setTestType(PathogenTestType testType) {
this.testType = testType;
}

public Disease getTestedDisease() {
return testedDisease;
}

public void setTestedDisease(Disease testedDisease) {
this.testedDisease = testedDisease;
}

public Date getTestDateTime() {
return testDateTime;
}

public void setTestDateTime(Date testDateTime) {
this.testDateTime = testDateTime;
}

public PathogenTestResultType getTestResult() {
return testResult;
}

public void setTestResult(PathogenTestResultType testResult) {
this.testResult = testResult;
}

public String getPersonFirstName() {
return personFirstName;
}

public void setPersonFirstName(String personFirstName) {
this.personFirstName = personFirstName;
}

public String getPersonLastName() {
return personLastName;
}

public void setPersonLastName(String personLastName) {
this.personLastName = personLastName;
}

public Sex getPersonSex() {
return personSex;
}

public void setPersonSex(Sex personSex) {
this.personSex = personSex;
}

public Integer getPersonBirthDateDD() {
return personBirthDateDD;
}

public void setPersonBirthDateDD(Integer personBirthDateDD) {
this.personBirthDateDD = personBirthDateDD;
}

public Integer getPersonBirthDateMM() {
return personBirthDateMM;
}

public void setPersonBirthDateMM(Integer personBirthDateMM) {
this.personBirthDateMM = personBirthDateMM;
}

public Integer getPersonBirthDateYYYY() {
return personBirthDateYYYY;
}

public void setPersonBirthDateYYYY(Integer personBirthDateYYYY) {
this.personBirthDateYYYY = personBirthDateYYYY;
}

public String getPersonPostalCode() {
return personPostalCode;
}

public void setPersonPostalCode(String personPostalCode) {
this.personPostalCode = personPostalCode;
}

public String getPersonCity() {
return personCity;
}

public void setPersonCity(String personCity) {
this.personCity = personCity;
}

public String getPersonStreet() {
return personStreet;
}

public void setPersonStreet(String personStreet) {
this.personStreet = personStreet;
}

public String getPersonHouseNumber() {
return personHouseNumber;
}

public void setPersonHouseNumber(String personHouseNumber) {
this.personHouseNumber = personHouseNumber;
}

public String getLabMessageDetails() {
return labMessageDetails;
}

public void setLabMessageDetails(String labMessageDetails) {
this.labMessageDetails = labMessageDetails;
}

public boolean isProcessed() {
return processed;
}

public void setProcessed(boolean processed) {
this.processed = processed;
}

public static LabMessageDto build() {

LabMessageDto labMessage = new LabMessageDto();
labMessage.setUuid(DataHelper.createUuid());
return labMessage;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package de.symeda.sormas.api.labmessage;

import javax.ejb.Remote;

@Remote
public interface LabMessageFacade {

void save(LabMessageDto dto);
}
28 changes: 28 additions & 0 deletions sormas-api/src/main/resources/captions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,34 @@ importLineListing=Line Listing Import
importProcessed=%d/%d Processed
importSkips=%d Skipped

#Lab Message
LabMessage=Lab Message
LabMessage.labMessageDetails=Lab message details
LabMessage.labSampleId=Lab sample ID
LabMessage.personBirthDateDD=Day of birth
LabMessage.personBirthDateMM=Month of birth
LabMessage.personBirthDateYYYY=Year of birth
LabMessage.personCity=City
LabMessage.personFirstName=First name
LabMessage.personHouseNumber=House number
LabMessage.personLastName=Last name
LabMessage.personPostalCode=Postal code
LabMessage.personSex=Sex
LabMessage.personStreet=Street
LabMessage.processed=Processed
LabMessage.sampleDateTime=Date sample was collected
LabMessage.sampleMaterial=Type of sample
LabMessage.sampleReceivedDate=Sample received
LabMessage.specimenCondition=Specimen condition
LabMessage.testDateTime=Date and time of result
LabMessage.testedDisease=Tested disease
LabMessage.testLabCity=Lab city
LabMessage.testLabExternalId=Lab external ID
LabMessage.testLabName=Lab name
LabMessage.testLabPostalCode=Lab postal code
LabMessage.testResult=Test result
LabMessage.testType=Type of test

#Line listing
lineListingAddLine=Add line
lineListingInfrastructureData=Take over infrastructure data from last line
Expand Down
Loading

0 comments on commit 04984a0

Please sign in to comment.