Skip to content

Commit

Permalink
update sormas_schema.sql for aefi module, fix tests, update user righ…
Browse files Browse the repository at this point in the history
…ts in web descriptors
  • Loading branch information
obinna-h-n committed Oct 23, 2024
1 parent 6efd99d commit 221b30a
Show file tree
Hide file tree
Showing 18 changed files with 628 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
/*
* SORMAS® - Surveillance Outbreak Response Management & Analysis System
* Copyright © 2016-2024 Helmholtz-Zentrum für Infektionsforschung GmbH (HZI)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Expand All @@ -22,6 +19,9 @@
import java.util.ArrayList;
import java.util.List;

import de.symeda.sormas.api.audit.AuditedClass;

@AuditedClass
public class AefiChartData implements Serializable {

private static final long serialVersionUID = 3538219674050390425L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ public enum DatabaseTable {
IMMUNIZATIONS(DatabaseTableType.SORMAS, "immunizations", dependingOnFeature(FeatureType.IMMUNIZATION_MANAGEMENT)),
VACCINATIONS(DatabaseTableType.SORMAS, IMMUNIZATIONS, "vaccinations"),

ADVERSE_EVENTS_FOLLOWING_IMMUNIZATIONS(DatabaseTableType.SORMAS,
"adverse_events_following_immunizations",
dependingOnFeature(FeatureType.ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_MANAGEMENT)),
ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_INVESTIGATIONS(DatabaseTableType.SORMAS,
"adverse_events_following_immunization_investigations",
dependingOnFeature(FeatureType.ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_MANAGEMENT)),
ADVERSE_EVENTS(DatabaseTableType.SORMAS, "adverse_events", dependingOnFeature(FeatureType.ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_MANAGEMENT)),

SAMPLES(DatabaseTableType.SORMAS, "samples", dependingOnFeature(FeatureType.SAMPLES_LAB)),
PATHOGEN_TESTS(DatabaseTableType.SORMAS, SAMPLES, "pathogen_tests"),
ADDITIONAL_TESTS(DatabaseTableType.SORMAS, SAMPLES, "additional_tests", dependingOnFeature(FeatureType.ADDITIONAL_TESTS)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,13 @@ public Set<UserRight> getDefaultUserRights() {
IMMUNIZATION_DELETE,
IMMUNIZATION_ARCHIVE,
IMMUNIZATION_VIEW_ARCHIVED,
DASHBOARD_ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_VIEW,
ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_CREATE,
ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_VIEW,
ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_EDIT,
ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_ARCHIVE,
ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_DELETE,
ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_EXPORT,
PERSON_VIEW,
PERSON_EDIT,
PERSON_DELETE,
Expand Down Expand Up @@ -1315,6 +1322,13 @@ public Set<UserRight> getDefaultUserRights() {
IMMUNIZATION_CREATE,
IMMUNIZATION_EDIT,
IMMUNIZATION_DELETE,
DASHBOARD_ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_VIEW,
ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_CREATE,
ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_VIEW,
ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_EDIT,
ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_ARCHIVE,
ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_DELETE,
ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_EXPORT,
PERSON_VIEW,
PERSON_EDIT,
PERSON_DELETE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

Expand All @@ -53,8 +52,7 @@
import de.symeda.sormas.backend.user.User;
import de.symeda.sormas.backend.vaccination.Vaccination;

@Entity
@Table(name = "adverseeventsfollowingimmunization")
@Entity(name = "adverseeventsfollowingimmunization")
public class Aefi extends CoreAdo {

private static final long serialVersionUID = -7845660472641846292L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
Expand Down Expand Up @@ -66,8 +65,7 @@
import de.symeda.sormas.backend.user.User;
import de.symeda.sormas.backend.vaccination.Vaccination;

@Entity
@Table(name = "adverseeventsfollowingimmunizationinvestigation")
@Entity(name = "adverseeventsfollowingimmunizationinvestigation")
public class AefiInvestigation extends CoreAdo {

private static final long serialVersionUID = 6128204752074963848L;
Expand Down
35 changes: 35 additions & 0 deletions sormas-backend/src/main/resources/META-INF/glassfish-ejb-jar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,36 @@
<group-name>IMMUNIZATION_ARCHIVE</group-name>
</security-role-mapping>

<security-role-mapping>
<role-name>ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_VIEW</role-name>
<group-name>ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_VIEW</group-name>
</security-role-mapping>

<security-role-mapping>
<role-name>ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_CREATE</role-name>
<group-name>ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_CREATE</group-name>
</security-role-mapping>

<security-role-mapping>
<role-name>ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_EDIT</role-name>
<group-name>ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_EDIT</group-name>
</security-role-mapping>

<security-role-mapping>
<role-name>ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_ARCHIVE</role-name>
<group-name>ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_ARCHIVE</group-name>
</security-role-mapping>

<security-role-mapping>
<role-name>ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_DELETE</role-name>
<group-name>ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_DELETE</group-name>
</security-role-mapping>

<security-role-mapping>
<role-name>ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_EXPORT</role-name>
<group-name>ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_EXPORT</group-name>
</security-role-mapping>

<security-role-mapping>
<role-name>PERSON_VIEW</role-name>
<group-name>PERSON_VIEW</group-name>
Expand Down Expand Up @@ -607,6 +637,11 @@
<group-name>DASHBOARD_SAMPLES_VIEW</group-name>
</security-role-mapping>

<security-role-mapping>
<role-name>DASHBOARD_ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_VIEW</role-name>
<group-name>DASHBOARD_ADVERSE_EVENTS_FOLLOWING_IMMUNIZATION_VIEW</group-name>
</security-role-mapping>

<security-role-mapping>
<role-name>CASE_CLINICIAN_VIEW</role-name>
<group-name>CASE_CLINICIAN_VIEW</group-name>
Expand Down
Loading

0 comments on commit 221b30a

Please sign in to comment.