Skip to content

Commit

Permalink
[GITFLOW]merging 'release-0.3.0' into 'master'
Browse files Browse the repository at this point in the history
  • Loading branch information
ciSymeda committed Aug 15, 2017
2 parents 3318257 + 359e48d commit 18380fb
Show file tree
Hide file tree
Showing 138 changed files with 1,920 additions and 1,328 deletions.
2 changes: 1 addition & 1 deletion sormas-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>de.symeda.sormas</groupId>
<artifactId>sormas-base</artifactId>
<version>0.2.0</version>
<version>0.3.0</version>
<relativePath>../sormas-base</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public class CaseDataDto extends CaseReferenceDto {
public static final String INVESTIGATED_DATE = "investigatedDate";
public static final String SURVEILLANCE_OFFICER = "surveillanceOfficer";
public static final String CASE_OFFICER = "caseOfficer";
public static final String CONTACT_OFFICER = "contactOfficer";
public static final String SYMPTOMS = "symptoms";
public static final String HOSPITALIZATION = "hospitalization";
public static final String EPI_DATA = "epiData";
Expand Down Expand Up @@ -77,7 +76,6 @@ public class CaseDataDto extends CaseReferenceDto {

private UserReferenceDto surveillanceOfficer;
private UserReferenceDto caseOfficer;
private UserReferenceDto contactOfficer;

public CaseClassification getCaseClassification() {
return caseClassification;
Expand Down Expand Up @@ -159,14 +157,6 @@ public void setCaseOfficer(UserReferenceDto caseOfficer) {
this.caseOfficer = caseOfficer;
}

public UserReferenceDto getContactOfficer() {
return contactOfficer;
}

public void setContactOfficer(UserReferenceDto contactOfficer) {
this.contactOfficer = contactOfficer;
}

public SymptomsDto getSymptoms() {
return symptoms;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ public interface ContactFacade {
ContactReferenceDto getReferenceByUuid(String uuid);

List<String> getAllUuids(String userUuid);

void generateContactFollowUpTasks();
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public class SampleDto extends SampleReferenceDto {
public static final String SAMPLE_MATERIAL_TEXT = "sampleMaterialText";
public static final String LAB = "lab";
public static final String OTHER_LAB = "otherLab";
public static final String SHIPMENT_STATUS = "shipmentStatus";
public static final String SHIPMENT_DATE = "shipmentDate";
public static final String SHIPMENT_DETAILS = "shipmentDetails";
public static final String RECEIVED_DATE = "receivedDate";
Expand All @@ -31,6 +30,9 @@ public class SampleDto extends SampleReferenceDto {
public static final String COMMENT = "comment";
public static final String SAMPLE_SOURCE = "sampleSource";
public static final String SUGGESTED_TYPE_OF_TEST = "suggestedTypeOfTest";
public static final String REFERRED_TO = "referredTo";
public static final String SHIPPED = "shipped";
public static final String RECEIVED = "received";

private CaseReferenceDto associatedCase;
private String sampleCode;
Expand All @@ -42,7 +44,6 @@ public class SampleDto extends SampleReferenceDto {
private String sampleMaterialText;
private FacilityReferenceDto lab;
private FacilityReferenceDto otherLab;
private ShipmentStatus shipmentStatus;
private Date shipmentDate;
private String shipmentDetails;
private Date receivedDate;
Expand All @@ -51,6 +52,9 @@ public class SampleDto extends SampleReferenceDto {
private String comment;
private SampleSource sampleSource;
private SampleTestType suggestedTypeOfTest;
private SampleReferenceDto referredTo;
private boolean shipped;
private boolean received;

public CaseReferenceDto getAssociatedCase() {
return associatedCase;
Expand Down Expand Up @@ -112,12 +116,6 @@ public FacilityReferenceDto getOtherLab() {
public void setOtherLab(FacilityReferenceDto otherLab) {
this.otherLab = otherLab;
}
public ShipmentStatus getShipmentStatus() {
return shipmentStatus;
}
public void setShipmentStatus(ShipmentStatus shipmentStatus) {
this.shipmentStatus = shipmentStatus;
}
public Date getShipmentDate() {
return shipmentDate;
}
Expand Down Expand Up @@ -166,5 +164,23 @@ public SampleTestType getSuggestedTypeOfTest() {
public void setSuggestedTypeOfTest(SampleTestType suggestedTypeOfTest) {
this.suggestedTypeOfTest = suggestedTypeOfTest;
}
public SampleReferenceDto getReferredTo() {
return referredTo;
}
public void setReferredTo(SampleReferenceDto referredTo) {
this.referredTo = referredTo;
}
public boolean isShipped() {
return shipped;
}
public void setShipped(boolean shipped) {
this.shipped = shipped;
}
public boolean isReceived() {
return received;
}
public void setReceived(boolean received) {
this.received = received;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public interface SampleFacade {
SampleDto saveSample(SampleDto dto);

SampleReferenceDto getReferenceByUuid(String uuid);

SampleReferenceDto getReferredFrom(String sampleUuid);

List<String> getAllUuids(String userUuid);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class SampleIndexDto extends SampleReferenceDto {
public static final String DISEASE = "disease";
public static final String SAMPLE_CODE = "sampleCode";
public static final String LAB_SAMPLE_ID = "labSampleID";
public static final String SHIPMENT_STATUS = "shipmentStatus";
public static final String LGA = "lga";
public static final String SHIPMENT_DATE = "shipmentDate";
public static final String RECEIVED_DATE = "receivedDate";
Expand All @@ -29,12 +28,14 @@ public class SampleIndexDto extends SampleReferenceDto {
public static final String TEST_RESULT = "testResult";
public static final String SPECIMEN_CONDITION = "specimenCondition";
public static final String NO_TEST_POSSIBLE_REASON = "noTestPossibleReason";
public static final String REFERRED_TO = "referredTo";
public static final String SHIPPED = "shipped";
public static final String RECEIVED = "received";

private CaseReferenceDto associatedCase;
private Disease disease;
private String sampleCode;
private String labSampleID;
private ShipmentStatus shipmentStatus;
private DistrictReferenceDto lga;
private Date shipmentDate;
private Date receivedDate;
Expand All @@ -45,6 +46,9 @@ public class SampleIndexDto extends SampleReferenceDto {
private SampleTestResultType testResult;
private SpecimenCondition specimenCondition;
private String noTestPossibleReason;
private SampleReferenceDto referredTo;
private boolean shipped;
private boolean received;

public CaseReferenceDto getAssociatedCase() {
return associatedCase;
Expand All @@ -70,12 +74,6 @@ public String getLabSampleID() {
public void setLabSampleID(String labSampleID) {
this.labSampleID = labSampleID;
}
public ShipmentStatus getShipmentStatus() {
return shipmentStatus;
}
public void setShipmentStatus(ShipmentStatus shipmentStatus) {
this.shipmentStatus = shipmentStatus;
}
public DistrictReferenceDto getLga() {
return lga;
}
Expand Down Expand Up @@ -135,6 +133,24 @@ public String getNoTestPossibleReason() {
}
public void setNoTestPossibleReason(String noTestPossibleReason) {
this.noTestPossibleReason = noTestPossibleReason;
}
public SampleReferenceDto getReferredTo() {
return referredTo;
}
public void setReferredTo(SampleReferenceDto referredTo) {
this.referredTo = referredTo;
}
public boolean isShipped() {
return shipped;
}
public void setShipped(boolean shipped) {
this.shipped = shipped;
}
public boolean isReceived() {
return received;
}
public void setReceived(boolean received) {
this.received = received;
}

}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.symeda.sormas.api.symptoms;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public final class SymptomsHelper {
Expand All @@ -17,4 +18,32 @@ public static String getTemperatureString(float value) {
return String.format("%.1f °C", value);
}

public static void updateIsSymptomatic(SymptomsDto dto) {
if (dto == null) {
return;
}

if (dto.getTemperature() != null && dto.getTemperature() >= 38.0f) {
dto.setSymptomatic(true);
return;
}

List<SymptomState> unconditionalSymptoms = Arrays.asList(dto.getFever(), dto.getVomiting(), dto.getDiarrhea(), dto.getBloodInStool(),
dto.getNausea(), dto.getAbdominalPain(), dto.getHeadache(), dto.getMusclePain(), dto.getFatigueWeakness(), dto.getSkinRash(),
dto.getNeckStiffness(), dto.getSoreThroat(), dto.getCough(), dto.getRunnyNose(), dto.getDifficultyBreathing(),
dto.getChestPain(), dto.getConfusedDisoriented(), dto.getSeizures(), dto.getAlteredConsciousness(), dto.getConjunctivitis(),
dto.getEyePainLightSensitive(), dto.getKopliksSpots(), dto.getThrobocytopenia(), dto.getOtitisMedia(), dto.getHearingloss(),
dto.getDehydration(), dto.getAnorexiaAppetiteLoss(), dto.getRefusalFeedorDrink(), dto.getJointPain(), dto.getShock(),
dto.getHiccups(), dto.getUnexplainedBleeding(), dto.getOtherNonHemorrhagicSymptoms());

for (SymptomState symptom : unconditionalSymptoms) {
if (symptom == SymptomState.YES) {
dto.setSymptomatic(true);
return;
}
}

dto.setSymptomatic(false);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ else if (UserRole.SURVEILLANCE_OFFICER.equals(userRole)
}
else if (UserRole.INFORMANT.equals(userRole)) {
switch (currentStatus) {
case PENDING:
return Arrays.asList(TaskStatus.DONE, TaskStatus.NOT_EXECUTABLE);
default:
return Collections.emptyList();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public enum TaskType {
CASE_MANAGEMENT(TaskContext.CASE),
CASE_BURIAL(TaskContext.CASE),
CONTACT_TRACING(TaskContext.CASE),
SAMPLE_COLLECTION(TaskContext.CASE),
CONTACT_INVESTIGATION(TaskContext.CONTACT),
CONTACT_FOLLOW_UP(TaskContext.CONTACT),
ANIMAL_TESTING(TaskContext.EVENT),
Expand Down
13 changes: 13 additions & 0 deletions sormas-api/src/main/java/de/symeda/sormas/api/user/UserRole.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ public enum UserRole {
LAB_USER(false, false),
;

public static final String _SYSTEM = "SYSTEM";
public static final String _USER = "USER";
public static final String _ADMIN = "ADMIN";
public static final String _SURVEILLANCE_SUPERVISOR = "SURVEILLANCE_SUPERVISOR";
public static final String _SURVEILLANCE_OFFICER = "SURVEILLANCE_OFFICER";
public static final String _INFORMANT = "INFORMANT";
public static final String _CASE_SUPERVISOR = "CASE_SUPERVISOR";
public static final String _CASE_OFFICER = "CASE_OFFICER";
public static final String _CONTACT_SUPERVISOR = "CONTACT_SUPERVISOR";
public static final String _CONTACT_OFFICER = "CONTACT_OFFICER";
public static final String _RUMOR_MANAGER = "RUMOR_MANAGER";
public static final String _LAB_USER = "LAB_USER";

private final boolean supervisor;
private final boolean officer;

Expand Down
1 change: 1 addition & 0 deletions sormas-api/src/main/resources/enum.properties
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ TaskType.ANIMAL_DEPOPULATION = depopulation of animals
TaskType.OTHER = other task as described in comments
TaskType.DAILY_REPORT_GENERATION = generate daily report
TaskType.SURVEILLANCE_REPORT_GENERATION = generate surveillance report
TaskType.SAMPLE_COLLECTION = sample collection

TemperatureSource.AXILLARY=axillary
TemperatureSource.ORAL=oral
Expand Down
7 changes: 4 additions & 3 deletions sormas-api/src/main/resources/fieldCaptions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ CaseData.healthFacilityDetails=Health facility name & description
CaseData.facilityDetails=Health facility name & description
CaseData.reportingUser=Reporting user
CaseData.reportDate=Date of report
CaseData.reportInfoLoc = Report date & user
CaseData.investigatedDate=Date of investigation
CaseData.surveillanceOfficer = Surveillance officer
CaseData.surveillanceOfficer = Responsible surveillance officer
CaseData.caseOfficer = Case officer
CaseData.contactOfficer = Contact officer
CaseData.region = State
Expand All @@ -39,7 +40,6 @@ CaseData.measlesDoses = How many doses
CaseData.vaccinationInfoSource = Source of vaccination information
CaseData.measlesVaccinationInfoSource = Source of vaccination information
CaseData.epiData = Epidemiological data
CaseData.reportInfoLoc = Report date & user
CaseData.epidNumber = EPID number

# captions for caseData-tabs
Expand Down Expand Up @@ -369,7 +369,6 @@ Sample.sampleMaterial = Sample material
Sample.sampleMaterialText = Specify other material
Sample.shipmentDate = Date of shipment
Sample.shipmentDetails = Shipment details
Sample.shipmentStatus = Shipment status
Sample.lab = Laboratory
Sample.otherLab = Referral laboratory
Sample.lga = LGA
Expand All @@ -395,6 +394,8 @@ Sample.testResult = Test result
Sample.comment = Comment
Sample.sampleSource = Sample source
Sample.suggestedTypeOfTest = Suggested type of test
Sample.shipped = Shipped
Sample.received = Received

SampleTest = Sample test
SampleTest.testType = Type of test
Expand Down
Loading

0 comments on commit 18380fb

Please sign in to comment.