Skip to content

Commit

Permalink
Feature 13068 self reporting directory (#13081)
Browse files Browse the repository at this point in the history
* #13068 Add a self Reporting directory (UI)
  • Loading branch information
leventegal-she authored Apr 25, 2024
1 parent 8516db0 commit 6f87098
Show file tree
Hide file tree
Showing 18 changed files with 1,007 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
import de.symeda.sormas.api.sample.AdditionalTestFacade;
import de.symeda.sormas.api.sample.PathogenTestFacade;
import de.symeda.sormas.api.sample.SampleFacade;
import de.symeda.sormas.api.selfreport.SelfReportFacade;
import de.symeda.sormas.api.share.ExternalShareInfoFacade;
import de.symeda.sormas.api.sormastosormas.SormasToSormasEncryptionFacade;
import de.symeda.sormas.api.sormastosormas.SormasToSormasFacade;
Expand Down Expand Up @@ -521,14 +522,18 @@ public static ExternalEmailFacade getExternalEmailFacade() {
return get().lookupEjbRemote(ExternalEmailFacade.class);
}

public static ManualMessageLogFacade getManualMessageLogFacade() {
return get().lookupEjbRemote(ManualMessageLogFacade.class);
}
public static ManualMessageLogFacade getManualMessageLogFacade() {
return get().lookupEjbRemote(ManualMessageLogFacade.class);
}

public static SpecialCaseAccessFacade getSpecialCaseAccessFacade() {
return get().lookupEjbRemote(SpecialCaseAccessFacade.class);
}

public static SelfReportFacade getSelfReportFacade() {
return get().lookupEjbRemote(SelfReportFacade.class);
}

@SuppressWarnings("unchecked")
public <P> P lookupEjbRemote(Class<P> clazz) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,7 @@ public interface Captions {
String mainMenuPersons = "mainMenuPersons";
String mainMenuReports = "mainMenuReports";
String mainMenuSamples = "mainMenuSamples";
String mainMenuSelfReports = "mainMenuSelfReports";
String mainMenuShareRequests = "mainMenuShareRequests";
String mainMenuStatistics = "mainMenuStatistics";
String mainMenuTasks = "mainMenuTasks";
Expand Down Expand Up @@ -2196,6 +2197,10 @@ public interface Captions {
String SelfReport_responsibleUser = "SelfReport.responsibleUser";
String SelfReport_sex = "SelfReport.sex";
String SelfReport_type = "SelfReport.type";
String selfReportActiveEnvironments = "selfReportActiveEnvironments";
String selfReportAllActiveAndArchivedEnvironments = "selfReportAllActiveAndArchivedEnvironments";
String selfReportArchivedEnvironments = "selfReportArchivedEnvironments";
String selfReportDeletedEnvironments = "selfReportDeletedEnvironments";
String sex = "sex";
String showPlacesOnMap = "showPlacesOnMap";
String singleDayEventDate = "singleDayEventDate";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,34 @@

package de.symeda.sormas.api.selfreport;

import de.symeda.sormas.api.EntityRelevanceStatus;
import de.symeda.sormas.api.utils.criteria.BaseCriteria;

public class SelfReportCriteria extends BaseCriteria {

private static final long serialVersionUID = 7245463026500908524L;

private SelfReportInvestigationStatus investigationStatus;
private EntityRelevanceStatus relevanceStatus;

public SelfReportInvestigationStatus getInvestigationStatus() {
return investigationStatus;
}

public void setInvestigationStatus(SelfReportInvestigationStatus investigationStatus) {
this.investigationStatus = investigationStatus;
}

public EntityRelevanceStatus getRelevanceStatus() {
return relevanceStatus;
}

public void setRelevanceStatus(EntityRelevanceStatus relevanceStatus) {
this.relevanceStatus = relevanceStatus;
}

public SelfReportCriteria relevanceStatus(EntityRelevanceStatus relevanceStatus) {
setRelevanceStatus(relevanceStatus);
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ public class SelfReportDto extends EntityDto {

public static final String I18N_PREFIX = "SelfReport";

public static final String ADDRESS = "address";

@NotNull(message = Validations.requiredField)
private SelfReportType type;
@NotNull(message = Validations.validReportDateTime)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,41 @@
import java.util.Date;

import de.symeda.sormas.api.Disease;
import de.symeda.sormas.api.caze.AgeAndBirthDateDto;
import de.symeda.sormas.api.caze.BirthDateDto;
import de.symeda.sormas.api.common.DeletionReason;
import de.symeda.sormas.api.person.Sex;
import de.symeda.sormas.api.user.UserReferenceDto;
import de.symeda.sormas.api.utils.pseudonymization.Pseudonymizable;
import de.symeda.sormas.api.uuid.AbstractUuidDto;

public class SelfReportIndexDto extends AbstractUuidDto {
public class SelfReportIndexDto extends AbstractUuidDto implements Pseudonymizable {

private static final long serialVersionUID = -4984417669514467918L;

public static final String TYPE = "type";
public static final String REPORT_DATE = "reportDate";
public static final String DISEASE = "disease";
public static final String FIRST_NAME = "firstName";
public static final String LAST_NAME = "lastName";
public static final String BIRTH_DATE = "birthDate";
public static final String SEX = "sex";
public static final String DISTRICT = "district";
public static final String STREET = "street";
public static final String HOUSE_NUMBER = "houseNumber";
public static final String POSTAL_CODE = "postalCode";
public static final String CITY = "city";
public static final String EMAIL = "email";
public static final String PHONE_NUMBER = "phoneNumber";
public static final String RESPONSIBLE_USER = "responsibleUser";
public static final String INVESTIGATION_STATUS = "investigationStatus";
public static final String PROCESSING_STATUS = "processingStatus";

private SelfReportType type;
private final Date reportDate;
private Disease disease;
private String firstName;
private String lastName;
private AgeAndBirthDateDto ageAndBirthDate;
private BirthDateDto birthDate;
private Sex sex;
private String district;
private String street;
Expand All @@ -44,24 +64,160 @@ public class SelfReportIndexDto extends AbstractUuidDto {
private final UserReferenceDto responsibleUser;
private final SelfReportInvestigationStatus investigationStatus;
private final SelfReportProcessingStatus processingStatus;
private DeletionReason deletionReason;
private String otherDeletionReason;

public SelfReportIndexDto(
String uuid,
SelfReportType type,
Date reportDate,
Disease disease,
String firstName,
String lastName,
BirthDateDto birthDate,
Sex sex,
String district,
String street,
String houseNumber,
String postalCode,
String city,
String email,
String phoneNumber,
UserReferenceDto responsibleUser,
SelfReportInvestigationStatus investigationStatus,
SelfReportProcessingStatus processingStatus) {
SelfReportProcessingStatus processingStatus,
DeletionReason deletionReason,
String otherDeletionReason) {
super(uuid);
this.type = type;
this.reportDate = reportDate;
this.disease = disease;
this.firstName = firstName;
this.lastName = lastName;
this.birthDate = birthDate;
this.sex = sex;
this.district = district;
this.street = street;
this.houseNumber = houseNumber;
this.postalCode = postalCode;
this.city = city;
this.email = email;
this.phoneNumber = phoneNumber;
this.responsibleUser = responsibleUser;
this.investigationStatus = investigationStatus;
this.processingStatus = processingStatus;
this.deletionReason = deletionReason;
this.otherDeletionReason = otherDeletionReason;
}

public SelfReportType getType() {
return type;
}

public void setType(SelfReportType type) {
this.type = type;
}

public Date getReportDate() {
return reportDate;
}

public Disease getDisease() {
return disease;
}

public void setDisease(Disease disease) {
this.disease = disease;
}

public String getFirstName() {
return firstName;
}

public void setFirstName(String firstName) {
this.firstName = firstName;
}

public String getLastName() {
return lastName;
}

public void setLastName(String lastName) {
this.lastName = lastName;
}

public BirthDateDto getBirthDate() {
return birthDate;
}

public void setBirthDate(BirthDateDto birthDate) {
this.birthDate = birthDate;
}

public Sex getSex() {
return sex;
}

public void setSex(Sex sex) {
this.sex = sex;
}

public String getDistrict() {
return district;
}

public void setDistrict(String district) {
this.district = district;
}

public String getStreet() {
return street;
}

public void setStreet(String street) {
this.street = street;
}

public String getHouseNumber() {
return houseNumber;
}

public void setHouseNumber(String houseNumber) {
this.houseNumber = houseNumber;
}

public String getPostalCode() {
return postalCode;
}

public void setPostalCode(String postalCode) {
this.postalCode = postalCode;
}

public String getCity() {
return city;
}

public void setCity(String city) {
this.city = city;
}

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public String getPhoneNumber() {
return phoneNumber;
}

public void setPhoneNumber(String phoneNumber) {
this.phoneNumber = phoneNumber;
}

public UserReferenceDto getResponsibleUser() {
return responsibleUser;
}
Expand All @@ -73,4 +229,40 @@ public SelfReportInvestigationStatus getInvestigationStatus() {
public SelfReportProcessingStatus getProcessingStatus() {
return processingStatus;
}

public DeletionReason getDeletionReason() {
return deletionReason;
}

public void setDeletionReason(DeletionReason deletionReason) {
this.deletionReason = deletionReason;
}

public String getOtherDeletionReason() {
return otherDeletionReason;
}

public void setOtherDeletionReason(String otherDeletionReason) {
this.otherDeletionReason = otherDeletionReason;
}

@Override
public boolean isPseudonymized() {
return false;
}

@Override
public void setPseudonymized(boolean pseudonymized) {

}

@Override
public boolean isInJurisdiction() {
return false;
}

@Override
public void setInJurisdiction(boolean inJurisdiction) {

}
}
6 changes: 6 additions & 0 deletions sormas-api/src/main/resources/captions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1702,6 +1702,7 @@ mainMenuTasks=Tasks
mainMenuUsers=Users
mainMenuAggregateReports=Aggregate
mainMenuShareRequests=Shares
mainMenuSelfReports=Self Reports
MaternalHistory.childrenNumber=Total number of children
MaternalHistory.ageAtBirth=Mother's age at birth of infant patient
MaternalHistory.conjunctivitis=Conjunctivitis
Expand Down Expand Up @@ -2733,6 +2734,7 @@ View.user.userroles=User Roles
View.users.sub=
View.shareRequests=Share directory
View.environments=Environment directory
View.selfreports=Self reports directory
# Visit
visitNewVisit=New visit
Visit=Visit
Expand Down Expand Up @@ -2970,3 +2972,7 @@ SelfReport.comment = Comment
SelfReport.responsibleUser = Responsible user
SelfReport.investigationStatus = Investigation status
SelfReport.processingStatus = Processing status
selfReportActiveEnvironments=Active self reports
selfReportArchivedEnvironments=Archived self reports
selfReportAllActiveAndArchivedEnvironments=All active and archived self reports
selfReportDeletedEnvironments=Deleted self reports
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,26 @@ public class SelfReport extends CoreAdo {

private static final long serialVersionUID = 6676716702984236618L;

public static final String TYPE = "type";
public static final String REPORT_DATE = "reportDate";
public static final String CASE_REFERENCE = "caseReference";
public static final String DISEASE = "disease";
public static final String DISEASE_VARIANT = "diseaseVariant";
public static final String FIRST_NAME = "firstName";
public static final String LAST_NAME = "lastName";
public static final String SEX = "sex";
public static final String BIRTHDATE_DD = "birthdateDD";
public static final String BIRTHDATE_MM = "birthdateMM";
public static final String BIRTHDATE_YYYY = "birthdateYYYY";
public static final String NATIONAL_HEALTH_ID = "nationalHealthId";
public static final String EMAIL = "email";
public static final String PHONE_NUMBER = "phoneNumber";
public static final String ADDRESS = "address";
public static final String COMMENT = "comment";
public static final String RESPONSIBLE_USER = "responsibleUser";
public static final String INVESTIGATION_STATUS = "investigationStatus";
public static final String PROCESSING_STATUS = "processingStatus";

private SelfReportType type;
private Date reportDate;
private String caseReference;
Expand Down
Loading

0 comments on commit 6f87098

Please sign in to comment.