Index: .gitignore
===================================================================
--- .gitignore	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ .gitignore	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -32,4 +32,2 @@
 ### VS Code ###
 .vscode/
-application.properties
-application-prod.properties
Index: ADME.md
===================================================================
--- README.md	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,4 +1,0 @@
-Reportium Application
-
-This application is for creating your own datasets from a given DataBase, that is based on 'fictional persons'.
-For more informations you can review the following link --> https://develop.finki.ukim.mk/projects/reportium
Index: docker-compose.yml
===================================================================
--- docker-compose.yml	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
+++ docker-compose.yml	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -0,0 +1,17 @@
+version: '3.8'
+services:
+  postgresdb:
+    image: postgres:15
+    container_name: my_postgres
+    restart: always
+    environment:
+      POSTGRES_DB: Reportium
+      POSTGRES_USER: postgres
+      POSTGRES_PASSWORD: postgres
+    ports:
+      - "5432:5432"
+    volumes:
+      - pgdata:/var/lib/postgresql/data
+
+volumes:
+  pgdata:
Index: pom.xml
===================================================================
--- pom.xml	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ pom.xml	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -72,15 +72,4 @@
             <scope>test</scope>
         </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.core</groupId>
-            <artifactId>jackson-databind</artifactId>
-        </dependency>
-        <!-- Download csv file -->
-        <dependency>
-            <groupId>com.github.librepdf</groupId>
-            <artifactId>openpdf</artifactId>
-            <version>1.3.30</version>
-        </dependency>
-
     </dependencies>
 
Index: src/main/java/apps/spring/reportium/entity/CriminalReport.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/CriminalReport.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/entity/CriminalReport.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -31,5 +31,5 @@
     private String location;
 
-    private Boolean resolved = false;
+    private boolean resolved = false;
 
     @ManyToOne(fetch = FetchType.EAGER)
@@ -39,7 +39,3 @@
     @Column(name = "descriptive_punishment", columnDefinition = "TEXT")
     private String descriptivePunishment;
-
-    @OneToOne(mappedBy = "report", fetch = FetchType.LAZY)
-    private Punishment punishment;
-
 }
Index: src/main/java/apps/spring/reportium/entity/DTOs/AcademicReportPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/DTOs/AcademicReportPerPersonDTO.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
+++ src/main/java/apps/spring/reportium/entity/DTOs/AcademicReportPerPersonDTO.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -0,0 +1,26 @@
+package apps.spring.reportium.entity.DTOs;
+
+import apps.spring.reportium.entity.enumerations.InstitutionType;
+import lombok.Data;
+
+@Data
+public class AcademicReportPerPersonDTO {
+    private Integer reportId;
+    private String academicField;
+    private String descriptionOfReport;
+    private String institutionName;
+    private InstitutionType institutionType;
+    private String institutionAddress;
+    private Integer yearEstablished;
+
+    public AcademicReportPerPersonDTO(Integer reportId, String academicField, String descriptionOfReport,
+                             String institutionName, String institutionType, String institutionAddress, Integer yearEstablished) {
+        this.reportId = reportId;
+        this.academicField = academicField;
+        this.descriptionOfReport = descriptionOfReport;
+        this.institutionName = institutionName;
+        this.institutionType = InstitutionType.valueOf(institutionType.toUpperCase().replace(" ", "_"));
+        this.institutionAddress = institutionAddress;
+        this.yearEstablished = yearEstablished;
+    }
+}
Index: src/main/java/apps/spring/reportium/entity/DTOs/CrimeReportPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/DTOs/CrimeReportPerPersonDTO.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
+++ src/main/java/apps/spring/reportium/entity/DTOs/CrimeReportPerPersonDTO.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -0,0 +1,26 @@
+package apps.spring.reportium.entity.DTOs;
+
+import apps.spring.reportium.entity.enumerations.SeverityLevel;
+import lombok.Data;
+
+import java.time.LocalDate;
+
+@Data
+public class CrimeReportPerPersonDTO {
+    private Integer reportId;
+    private String label;
+    private SeverityLevel severityLevel;
+    private String location;
+    private Boolean resolved;
+    private String descriptivePunishment;
+
+    public CrimeReportPerPersonDTO(Integer reportId, String label, String severityLevel,
+                             String location, Boolean resolved, String descriptivePunishment) {
+        this.reportId = reportId;
+        this.label = label;
+        this.severityLevel = SeverityLevel.valueOf(severityLevel);
+        this.location = location;
+        this.resolved = resolved;
+        this.descriptivePunishment = descriptivePunishment;
+    }
+}
Index: src/main/java/apps/spring/reportium/entity/DTOs/EmploymentReportPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/DTOs/EmploymentReportPerPersonDTO.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
+++ src/main/java/apps/spring/reportium/entity/DTOs/EmploymentReportPerPersonDTO.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -0,0 +1,26 @@
+package apps.spring.reportium.entity.DTOs;
+
+import lombok.Data;
+
+import java.time.LocalDate;
+
+@Data
+public class EmploymentReportPerPersonDTO {
+    private Integer reportId;
+    private String summary;
+    private LocalDate startDate;
+    private LocalDate endDate;
+    private String jobRole;
+    private Double incomePerMonth;
+
+    public EmploymentReportPerPersonDTO(Integer reportId, String summary, java.sql.Date startDate,
+                                        java.sql.Date endDate, String jobRole, Double incomePerMonth) {
+        this.reportId = reportId;
+        this.summary = summary;
+        this.startDate = startDate != null ? startDate.toLocalDate() : null;
+        this.endDate = endDate != null ? endDate.toLocalDate() : null;
+        this.jobRole = jobRole;
+        this.incomePerMonth = incomePerMonth;
+    }
+
+}
Index: src/main/java/apps/spring/reportium/entity/DTOs/MedicalReportPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/DTOs/MedicalReportPerPersonDTO.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
+++ src/main/java/apps/spring/reportium/entity/DTOs/MedicalReportPerPersonDTO.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -0,0 +1,45 @@
+package apps.spring.reportium.entity.DTOs;
+
+import apps.spring.reportium.entity.enumerations.DoctorSpecialization;
+import apps.spring.reportium.entity.enumerations.SeverityLevel;
+import lombok.Data;
+
+import java.time.LocalDate;
+
+@Data
+public class MedicalReportPerPersonDTO {
+    private Integer reportId;
+    private String summary;
+    private LocalDate nextControlDate;
+    private String shortDescription;
+    private String therapy;
+    private SeverityLevel severity;
+    private Boolean isChronic;
+    private String doctorName;
+    private String doctorSurname;
+    private DoctorSpecialization specialization;
+
+    public MedicalReportPerPersonDTO(
+            Integer reportId,
+            String summary,
+            java.sql.Date nextControlDate,
+            String shortDescription,
+            String therapy,
+            String severity,
+            Boolean isChronic,
+            String doctorName,
+            String doctorSurname,
+            String specialization
+    ) {
+        this.reportId = reportId;
+        this.summary = summary;
+        this.nextControlDate = nextControlDate != null ? nextControlDate.toLocalDate() : null;
+        this.shortDescription = shortDescription;
+        this.therapy = therapy;
+        this.severity = SeverityLevel.valueOf(severity.toUpperCase().replace(" ", "_"));
+        this.isChronic = isChronic;
+        this.doctorName = doctorName;
+        this.doctorSurname = doctorSurname;
+        this.specialization = DoctorSpecialization.valueOf(specialization.toUpperCase().replace(" ", "_"));
+    }
+}
Index: src/main/java/apps/spring/reportium/entity/DTOs/PersonReportSummaryDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/DTOs/PersonReportSummaryDTO.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
+++ src/main/java/apps/spring/reportium/entity/DTOs/PersonReportSummaryDTO.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -0,0 +1,22 @@
+package apps.spring.reportium.entity.DTOs;
+
+import apps.spring.reportium.entity.enumerations.Gender;
+import lombok.Data;
+
+import java.time.LocalDate;
+
+@Data
+public class PersonReportSummaryDTO {
+    private Integer personId;
+    private String name;
+    private String surname;
+    private String address;
+    private LocalDate birthDate;
+    private Gender gender;
+    private Boolean isAlive;
+    private Integer age;
+    private boolean hasCriminalReport;
+    private boolean hasMedicalReport;
+    private boolean hasAcademicReport;
+    private boolean hasEmploymentReport;
+}
Index: src/main/java/apps/spring/reportium/entity/Diagnosis.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/Diagnosis.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/entity/Diagnosis.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -4,6 +4,4 @@
 import jakarta.persistence.*;
 import lombok.Data;
-import lombok.NoArgsConstructor;
-
 /*
 create table Diagnosis(
@@ -19,10 +17,9 @@
 @Entity
 @Table(name = "Diagnosis")
-@NoArgsConstructor
 public class Diagnosis {
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
     @Column(name = "diagnosis_id")
-    private Integer diagnosisId;
+    private int diagnosisId;
 
     @Column(nullable = false, name = "short_description", columnDefinition = "TEXT")
@@ -38,10 +35,3 @@
     @Enumerated(EnumType.STRING)
     private SeverityLevel severityLevel;
-
-    public Diagnosis(String shortDescription, String therapy, boolean isChronic, SeverityLevel severityLevel) {
-        this.shortDescription = shortDescription;
-        this.therapy = therapy;
-        this.isChronic = isChronic;
-        this.severityLevel = severityLevel;
-    }
 }
Index: src/main/java/apps/spring/reportium/entity/Institution.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/Institution.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/entity/Institution.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -5,5 +5,4 @@
 import jakarta.persistence.*;
 import lombok.Data;
-
 /*
 --enumeration - type of institution
@@ -27,4 +26,5 @@
 )
 public class Institution {
+
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)
Index: src/main/java/apps/spring/reportium/entity/MedicalReport.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/MedicalReport.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/entity/MedicalReport.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -5,5 +5,4 @@
 
 import java.time.LocalDate;
-import java.util.List;
 
 /*
@@ -36,7 +35,3 @@
     @Column(name = "next_control_date")
     private LocalDate nextControlDate;
-
-    @OneToMany(mappedBy = "report")
-    private List<MedicalReportDiagnosis> medicalReportDiagnoses;
-
 }
Index: src/main/java/apps/spring/reportium/entity/MedicalReportDiagnosis.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/MedicalReportDiagnosis.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/entity/MedicalReportDiagnosis.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -4,5 +4,4 @@
 import jakarta.persistence.*;
 import lombok.Data;
-import lombok.NoArgsConstructor;
 
 import java.time.LocalDate;
@@ -25,5 +24,4 @@
         }
 )
-@NoArgsConstructor
 public class MedicalReportDiagnosis {
     @Id
@@ -41,4 +39,3 @@
     @Column(name = "added_on")
     private LocalDate addedOn = LocalDate.now();
-
 }
Index: src/main/java/apps/spring/reportium/entity/Person.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/Person.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/entity/Person.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -61,10 +61,3 @@
     private String contactPhone;
 
-    @Column(name = "is_stub", nullable = false)
-    private boolean stub = false;
-
-    @Override
-    public String toString() {
-        return name + ' ' + surname;
-    }
 }
Index: src/main/java/apps/spring/reportium/entity/Punishment.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/Punishment.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/entity/Punishment.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -48,8 +48,7 @@
 
     @Column(name = "fine_to_pay")
-    private Double fineToPay;
+    private double fineToPay;
 
     @Column(name = "release_date")
     private LocalDate releaseDate;
-
 }
Index: src/main/java/apps/spring/reportium/entity/Report.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/Report.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/entity/Report.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -40,15 +40,3 @@
     @JoinColumn(name = "person_id", foreignKey = @ForeignKey(name = "fk_person_id"))
     private Person person;
-
-    @OneToOne(mappedBy = "report", fetch = FetchType.LAZY)
-    private AcademicReport academicReport;
-
-    @OneToOne(mappedBy = "report", fetch = FetchType.LAZY)
-    private EmploymentReport employmentReport;
-
-    @OneToOne(mappedBy = "report", fetch = FetchType.LAZY)
-    private MedicalReport medicalReport;
-
-    @OneToOne(mappedBy = "report", fetch = FetchType.LAZY)
-    private CriminalReport criminalReport;
 }
Index: c/main/java/apps/spring/reportium/entity/dto/AcademicReportPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/AcademicReportPerPersonDTO.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,26 +1,0 @@
-package apps.spring.reportium.entity.dto;
-
-import apps.spring.reportium.entity.enumerations.InstitutionType;
-import lombok.Data;
-
-@Data
-public class AcademicReportPerPersonDTO {
-    private Integer reportId;
-    private String academicField;
-    private String descriptionOfReport;
-    private String institutionName;
-    private InstitutionType institutionType;
-    private String institutionAddress;
-    private Integer yearEstablished;
-
-    public AcademicReportPerPersonDTO(Integer reportId, String academicField, String descriptionOfReport,
-                             String institutionName, String institutionType, String institutionAddress, Integer yearEstablished) {
-        this.reportId = reportId;
-        this.academicField = academicField;
-        this.descriptionOfReport = descriptionOfReport;
-        this.institutionName = institutionName;
-        this.institutionType = InstitutionType.valueOf(institutionType.toUpperCase().replace(" ", "_"));
-        this.institutionAddress = institutionAddress;
-        this.yearEstablished = yearEstablished;
-    }
-}
Index: c/main/java/apps/spring/reportium/entity/dto/CrimeReportPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/CrimeReportPerPersonDTO.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,24 +1,0 @@
-package apps.spring.reportium.entity.dto;
-
-import apps.spring.reportium.entity.enumerations.SeverityLevel;
-import lombok.Data;
-
-@Data
-public class CrimeReportPerPersonDTO {
-    private Integer reportId;
-    private String label;
-    private SeverityLevel severityLevel;
-    private String location;
-    private Boolean resolved;
-    private String descriptivePunishment;
-
-    public CrimeReportPerPersonDTO(Integer reportId, String label, String severityLevel,
-                             String location, Boolean resolved, String descriptivePunishment) {
-        this.reportId = reportId;
-        this.label = label;
-        this.severityLevel = SeverityLevel.valueOf(severityLevel);
-        this.location = location;
-        this.resolved = resolved;
-        this.descriptivePunishment = descriptivePunishment;
-    }
-}
Index: c/main/java/apps/spring/reportium/entity/dto/DiagnosisSimilarityPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/DiagnosisSimilarityPerPersonDTO.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,22 +1,0 @@
-package apps.spring.reportium.entity.dto;
-
-import lombok.Data;
-
-@Data
-public class DiagnosisSimilarityPerPersonDTO {
-    private Long personId;
-    private String fullName;
-    private Long matchingDiagnosesCount;
-    private String matchingLabels;
-
-    public DiagnosisSimilarityPerPersonDTO() {
-    }
-
-    public DiagnosisSimilarityPerPersonDTO(Long personId, String fullName,
-                                           Long matchingDiagnosesCount, String matchingLabels) {
-        this.personId = personId;
-        this.fullName = fullName;
-        this.matchingDiagnosesCount = matchingDiagnosesCount;
-        this.matchingLabels = matchingLabels;
-    }
-}
Index: c/main/java/apps/spring/reportium/entity/dto/EmploymentReportPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/EmploymentReportPerPersonDTO.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,26 +1,0 @@
-package apps.spring.reportium.entity.dto;
-
-import lombok.Data;
-
-import java.time.LocalDate;
-
-@Data
-public class EmploymentReportPerPersonDTO {
-    private Integer reportId;
-    private String summary;
-    private LocalDate startDate;
-    private LocalDate endDate;
-    private String jobRole;
-    private Double incomePerMonth;
-
-    public EmploymentReportPerPersonDTO(Integer reportId, String summary, java.sql.Date startDate,
-                                        java.sql.Date endDate, String jobRole, Double incomePerMonth) {
-        this.reportId = reportId;
-        this.summary = summary;
-        this.startDate = startDate != null ? startDate.toLocalDate() : null;
-        this.endDate = endDate != null ? endDate.toLocalDate() : null;
-        this.jobRole = jobRole;
-        this.incomePerMonth = incomePerMonth;
-    }
-
-}
Index: c/main/java/apps/spring/reportium/entity/dto/InstitutionTotalReportsDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/InstitutionTotalReportsDTO.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,15 +1,0 @@
-package apps.spring.reportium.entity.dto;
-
-import lombok.Data;
-
-@Data
-public class InstitutionTotalReportsDTO {
-    private String institutionName;
-    private Long numberOfReports;
-
-    public InstitutionTotalReportsDTO(){};
-    public InstitutionTotalReportsDTO(String institutionName, Long numberOfReports) {
-        this.institutionName = institutionName;
-        this.numberOfReports = numberOfReports;
-    }
-}
Index: c/main/java/apps/spring/reportium/entity/dto/MedicalReportPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/MedicalReportPerPersonDTO.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,45 +1,0 @@
-package apps.spring.reportium.entity.dto;
-
-import apps.spring.reportium.entity.enumerations.DoctorSpecialization;
-import apps.spring.reportium.entity.enumerations.SeverityLevel;
-import lombok.Data;
-
-import java.time.LocalDate;
-
-@Data
-public class MedicalReportPerPersonDTO {
-    private Integer reportId;
-    private String summary;
-    private LocalDate nextControlDate;
-    private String shortDescription;
-    private String therapy;
-    private SeverityLevel severity;
-    private Boolean isChronic;
-    private String doctorName;
-    private String doctorSurname;
-    private DoctorSpecialization specialization;
-
-    public MedicalReportPerPersonDTO(
-            Integer reportId,
-            String summary,
-            java.sql.Date nextControlDate,
-            String shortDescription,
-            String therapy,
-            String severity,
-            Boolean isChronic,
-            String doctorName,
-            String doctorSurname,
-            String specialization
-    ) {
-        this.reportId = reportId;
-        this.summary = summary;
-        this.nextControlDate = nextControlDate != null ? nextControlDate.toLocalDate() : null;
-        this.shortDescription = shortDescription;
-        this.therapy = therapy;
-        this.severity = SeverityLevel.valueOf(severity.toUpperCase().replace(" ", "_"));
-        this.isChronic = isChronic;
-        this.doctorName = doctorName;
-        this.doctorSurname = doctorSurname;
-        this.specialization = DoctorSpecialization.valueOf(specialization.toUpperCase().replace(" ", "_"));
-    }
-}
Index: c/main/java/apps/spring/reportium/entity/dto/PersonReportSummaryDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/PersonReportSummaryDTO.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,22 +1,0 @@
-package apps.spring.reportium.entity.dto;
-
-import apps.spring.reportium.entity.enumerations.Gender;
-import lombok.Data;
-
-import java.time.LocalDate;
-
-@Data
-public class PersonReportSummaryDTO {
-    private Integer personId;
-    private String name;
-    private String surname;
-    private String address;
-    private LocalDate birthDate;
-    private Gender gender;
-    private Boolean isAlive;
-    private Integer age;
-    private boolean hasCriminalReport;
-    private boolean hasMedicalReport;
-    private boolean hasAcademicReport;
-    private boolean hasEmploymentReport;
-}
Index: c/main/java/apps/spring/reportium/entity/dto/ReportFilterDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/ReportFilterDTO.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,79 +1,0 @@
-package apps.spring.reportium.entity.dto;
-
-import apps.spring.reportium.entity.converter.DoctorSpecConverter;
-import apps.spring.reportium.entity.converter.GenderConverter;
-import apps.spring.reportium.entity.converter.InstitutionTypeConverter;
-import apps.spring.reportium.entity.enumerations.*;
-import jakarta.persistence.Convert;
-import jakarta.persistence.EnumType;
-import jakarta.persistence.Enumerated;
-import lombok.Data;
-
-
-@Data
-public class ReportFilterDTO {
-    /*WHICH FILTER*/
-    @Enumerated(EnumType.STRING)
-    private SelectedFilterSection filter_selected;
-    /*PERSON FIELDS*/
-    private Integer person_id;
-    private String person_name_string;
-    private String person_surname_string;
-    private Integer correct_age;//option 1
-    private Integer age_start = 0;//option 2
-    private Integer age_end = 120;//option 2
-    @Convert(converter = GenderConverter.class)
-    private Gender gender;
-    private String address_string;
-    private Boolean is_alive = true;
-    /*ACADEMIC REPORT FIELDS*/
-    private String academic_field;
-    @Convert(converter = InstitutionTypeConverter.class)
-    private InstitutionType institution_type;
-    /*EMPLOYMENT REPORT FIELDS*/
-    private Double income_amount;
-    @Enumerated(EnumType.STRING)
-    private ComparisonDTOEnum income_comparison;
-    private Integer years_experience;
-    @Enumerated(EnumType.STRING)
-    private ComparisonDTOEnum years_experience_comparison;
-    /*CRIME REPORT FIELDS*/
-    private String crime_type_label;
-    @Enumerated(EnumType.STRING)
-    private SeverityLevel crime_severity_level;
-    private Boolean is_resolved;
-    @Enumerated(EnumType.STRING)
-    private PunishmentType punishment_type;//FINE, PRISON
-    private Double punishment_fine;//if a punishment type is fine (euros)
-    private Integer punishment_years;//if a punishment type is prison (years)
-    /*MEDICAL REPORT FIELDS*/
-    private String doctor_name_string;//doc
-    private String doctor_surname_string;//doc
-    @Convert(converter = DoctorSpecConverter.class)
-    private DoctorSpecialization specialization;//doc
-    private Boolean is_chronic;
-    private Boolean has_next_control;
-    public boolean hasAnyAdvancedFilterSet() {
-        return person_name_string != null ||
-                person_surname_string != null ||
-                correct_age != null ||
-                age_start != null ||
-                gender != null ||
-                academic_field != null ||
-                income_amount != null ||
-                years_experience != null ||
-                crime_type_label != null ||
-                doctor_name_string != null ||
-                doctor_surname_string != null ||
-                is_chronic != null ||
-                has_next_control != null;
-    }
-
-
-    @Override
-    public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("Report Filter: ").append(filter_selected.toString()).append("\n");
-        return sb.toString();
-    }
-}
Index: c/main/java/apps/spring/reportium/entity/dto/ReportStatisticsPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/ReportStatisticsPerPersonDTO.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,65 +1,0 @@
-package apps.spring.reportium.entity.dto;
-import lombok.Data;
-
-import java.sql.Date;
-
-@Data
-public class ReportStatisticsPerPersonDTO {
-    // General
-    private Long totalReportsFound;
-    private Date firstReportOfPerson;
-    private Date latestReportOfPerson;
-    // Academic
-    private Long academicTotal;
-    private String mostCommonField;
-    private String educationPath;
-    // Employment
-    private Long jobCount;
-    private Long totalWorkingInDays;
-    private Long totalWorkingInMonths;
-    private Long totalWorkingInYears;
-    private Long longestJobDays;
-    private Double maxIncomeFromJob;
-    // Medical
-    private Long diagnosisTotal;
-    private Double chronicRatio;
-    private String mostFrequentDiagnosis;
-    // Criminal
-    private Long criminalCaseTotal;
-    private Double resolutionRatio;
-    public ReportStatisticsPerPersonDTO(Long totalReportsFound,
-                                        Date firstReportOfPerson,
-                                        Date latestReportOfPerson,
-                                        Long academicTotal,
-                                        String mostCommonField,
-                                        String educationPath,
-                                        Long jobCount,
-                                        Long totalWorkingInDays,
-                                        Long totalWorkingInMonths,
-                                        Long totalWorkingInYears,
-                                        Long longestJobDays,
-                                        Double maxIncomeFromJob,
-                                        Long diagnosisTotal,
-                                        Double chronicRatio,
-                                        String mostFrequentDiagnosis,
-                                        Long criminalCaseTotal,
-                                        Double resolutionRatio) {
-        this.totalReportsFound = totalReportsFound;
-        this.firstReportOfPerson = firstReportOfPerson;
-        this.latestReportOfPerson = latestReportOfPerson;
-        this.academicTotal = academicTotal;
-        this.mostCommonField = mostCommonField;
-        this.educationPath = educationPath;
-        this.jobCount = jobCount;
-        this.totalWorkingInDays = totalWorkingInDays;
-        this.totalWorkingInMonths = totalWorkingInMonths;
-        this.totalWorkingInYears = totalWorkingInYears;
-        this.longestJobDays = longestJobDays;
-        this.maxIncomeFromJob = maxIncomeFromJob;
-        this.diagnosisTotal = diagnosisTotal;
-        this.chronicRatio = chronicRatio;
-        this.mostFrequentDiagnosis = mostFrequentDiagnosis;
-        this.criminalCaseTotal = criminalCaseTotal;
-        this.resolutionRatio = resolutionRatio;
-    }
-}
Index: c/main/java/apps/spring/reportium/entity/dto/view_fetching_dtos/AcademicReportViewFetchingDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/view_fetching_dtos/AcademicReportViewFetchingDTO.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,52 +1,0 @@
-package apps.spring.reportium.entity.dto.view_fetching_dtos;
-import lombok.Data;
-import java.time.LocalDate;
-
-@Data
-public class AcademicReportViewFetchingDTO {
-    private Integer reportId;
-    private String summary;
-    private LocalDate reportCreatedAt;
-    private String embgOfPerson;
-    private String personFullname;
-    private String gender;
-    private LocalDate dateOfBirth;
-    private LocalDate dateOfDeath;
-    private String addressOfLiving;
-    private String contactPhone;
-    private String typeOfReport;
-    private String academicField;
-    private String academicReportDescription;
-    private String institutionName;
-    private String institutionAddress;
-    private Integer institutionYearOfEstablishing;
-    private String cityWhereEducating;
-    private String typeOfEducation;
-
-    public AcademicReportViewFetchingDTO(Integer reportId, String summary,
-                                         java.sql.Date reportCreatedAt, String embgOfPerson, String personFullname,
-                                         String gender, java.sql.Date dateOfBirth, java.sql.Date dateOfDeath, String addressOfLiving,
-                                         String contactPhone, String typeOfReport, String academicField, String academicReportDescription,
-                                         String institutionName, String institutionAddress, Integer institutionYearOfEstablishing,
-                                         String cityWhereEducating, String typeOfEducation) {
-        this.reportId = reportId;
-        this.summary = summary;
-        this.reportCreatedAt = reportCreatedAt != null ? reportCreatedAt.toLocalDate() : null;
-        this.embgOfPerson = embgOfPerson;
-        this.personFullname = personFullname;
-        this.gender = gender;
-        this.dateOfBirth = dateOfBirth != null ? dateOfBirth.toLocalDate() : null;
-        this.dateOfDeath = dateOfDeath != null ? dateOfDeath.toLocalDate() : null;
-        this.addressOfLiving = addressOfLiving;
-        this.contactPhone = contactPhone;
-        this.typeOfReport = typeOfReport;
-        this.academicField = academicField;
-        this.academicReportDescription = academicReportDescription;
-        this.institutionName = institutionName;
-        this.institutionAddress = institutionAddress;
-        this.institutionYearOfEstablishing = institutionYearOfEstablishing;
-        this.cityWhereEducating = cityWhereEducating;
-        this.typeOfEducation = typeOfEducation;
-    }
-
-}
Index: c/main/java/apps/spring/reportium/entity/dto/view_fetching_dtos/CrimeReportViewFetchingDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/view_fetching_dtos/CrimeReportViewFetchingDTO.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,48 +1,0 @@
-package apps.spring.reportium.entity.dto.view_fetching_dtos;
-import lombok.Data;
-import java.time.LocalDate;
-
-@Data
-public class CrimeReportViewFetchingDTO {
-    private Integer reportId;
-    private String summary;
-    private LocalDate reportCreatedAt;
-    private String embgOfPerson;
-    private String personFullname;
-    private String gender;
-    private LocalDate dateOfBirth;
-    private LocalDate dateOfDeath;
-    private String addressOfLiving;
-    private String contactPhone;
-    private String typeOfReport;
-    private String typeOfCriminal;
-    private String whereCriminalIsReported;
-    private Boolean isResolved;
-    private String descriptivePunishment;
-    private String severityLevel;
-    private String punishment;
-
-    public CrimeReportViewFetchingDTO(Integer reportId, String summary, java.sql.Date reportCreatedAt, String embgOfPerson,
-                                      String personFullname, String gender, java.sql.Date dateOfBirth, java.sql.Date dateOfDeath,
-                                      String addressOfLiving, String contactPhone, String typeOfReport, String typeOfCriminal,
-                                      String whereCriminalIsReported, Boolean isResolved, String descriptivePunishment,
-                                      String severityLevel, String punishment) {
-        this.reportId = reportId;
-        this.summary = summary;
-        this.reportCreatedAt = reportCreatedAt != null ? reportCreatedAt.toLocalDate() : null;
-        this.embgOfPerson = embgOfPerson;
-        this.personFullname = personFullname;
-        this.gender = gender;
-        this.dateOfBirth = dateOfBirth != null ? dateOfBirth.toLocalDate() : null;
-        this.dateOfDeath = dateOfDeath != null ? dateOfDeath.toLocalDate() : null;
-        this.addressOfLiving = addressOfLiving;
-        this.contactPhone = contactPhone;
-        this.typeOfReport = typeOfReport;
-        this.typeOfCriminal = typeOfCriminal;
-        this.whereCriminalIsReported = whereCriminalIsReported;
-        this.isResolved = isResolved;
-        this.descriptivePunishment = descriptivePunishment;
-        this.severityLevel = severityLevel;
-        this.punishment = punishment;
-    }
-}
Index: c/main/java/apps/spring/reportium/entity/dto/view_fetching_dtos/EmploymentReportViewFetchingDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/view_fetching_dtos/EmploymentReportViewFetchingDTO.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,44 +1,0 @@
-package apps.spring.reportium.entity.dto.view_fetching_dtos;
-import lombok.Data;
-
-import java.time.LocalDate;
-
-@Data
-public class EmploymentReportViewFetchingDTO {
-    private Integer reportId;
-    private String summary;
-    private LocalDate reportCreatedAt;
-    private String embgOfPerson;
-    private String personFullname;
-    private String gender;
-    private LocalDate dateOfBirth;
-    private LocalDate dateOfDeath;
-    private String addressOfLiving;
-    private String contactPhone;
-    private String typeOfReport;
-    private LocalDate startedWorkingDate;
-    private LocalDate endedWorkingDate;
-    private String jobRole;
-    private Double incomePerMonthInEuros;
-
-    public EmploymentReportViewFetchingDTO(Integer reportId, String summary, java.sql.Date reportCreatedAt, String embgOfPerson, String personFullname,
-                                           String gender, java.sql.Date dateOfBirth, java.sql.Date dateOfDeath, String addressOfLiving, String contactPhone,
-                                           String typeOfReport, java.sql.Date startedWorkingDate, java.sql.Date endedWorkingDate, String jobRole,
-                                           Double incomePerMonthInEuros) {
-        this.reportId = reportId;
-        this.summary = summary;
-        this.reportCreatedAt = reportCreatedAt != null ? reportCreatedAt.toLocalDate() : null;
-        this.embgOfPerson = embgOfPerson;
-        this.personFullname = personFullname;
-        this.gender = gender;
-        this.dateOfBirth = dateOfBirth != null ? dateOfBirth.toLocalDate() : null;
-        this.dateOfDeath = dateOfDeath != null ? dateOfDeath.toLocalDate() : null;
-        this.addressOfLiving = addressOfLiving;
-        this.contactPhone = contactPhone;
-        this.typeOfReport = typeOfReport;
-        this.startedWorkingDate = startedWorkingDate != null ? startedWorkingDate.toLocalDate() : null;
-        this.endedWorkingDate = endedWorkingDate != null ? endedWorkingDate.toLocalDate() : null;
-        this.jobRole = jobRole;
-        this.incomePerMonthInEuros = incomePerMonthInEuros;
-    }
-}
Index: c/main/java/apps/spring/reportium/entity/dto/view_fetching_dtos/MedicalReportViewFetchingDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/view_fetching_dtos/MedicalReportViewFetchingDTO.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,57 +1,0 @@
-package apps.spring.reportium.entity.dto.view_fetching_dtos;
-import lombok.Data;
-import java.time.LocalDate;
-
-@Data
-public class MedicalReportViewFetchingDTO {
-    private Integer reportId;
-    private String summary;
-    private LocalDate reportCreatedAt;
-    private String embgOfPerson;
-    private String personFullname;
-    private String gender;
-    private LocalDate dateOfBirth;
-    private LocalDate dateOfDeath;
-    private String addressOfLiving;
-    private String contactPhone;
-    private String typeOfReport;
-    private LocalDate diagnosisCreationDate;
-    private String diagnosisDescription;
-    private Boolean isChronic;
-    private String severity;
-    private String therapyForDiagnosis;
-    private LocalDate nextControlDate;
-    private String doctorFullname;
-    private String doctorSpecialization;
-    private Boolean isDoctorStillActive;
-    private Integer yearsOfExperience;
-
-    public MedicalReportViewFetchingDTO(Integer reportId, String summary, java.sql.Date reportCreatedAt, String embgOfPerson, String personFullname,
-                                        String gender, java.sql.Date dateOfBirth, java.sql.Date dateOfDeath, String addressOfLiving, String contactPhone,
-                                        String typeOfReport, java.sql.Date diagnosisCreationDate, String diagnosisDescription, Boolean isChronic,
-                                        String severity, String therapyForDiagnosis,
-                                        java.sql.Date nextControlDate, String doctorFullname, String doctorSpecialization,
-                                        Boolean isDoctorStillActive, Integer yearsOfExperience) {
-        this.reportId = reportId;
-        this.summary = summary;
-        this.reportCreatedAt = reportCreatedAt != null ? reportCreatedAt.toLocalDate() : null;
-        this.embgOfPerson = embgOfPerson;
-        this.personFullname = personFullname;
-        this.gender = gender;
-        this.dateOfBirth = dateOfBirth != null ? dateOfBirth.toLocalDate() : null;
-        this.dateOfDeath = dateOfDeath != null ? dateOfDeath.toLocalDate() : null;
-        this.addressOfLiving = addressOfLiving;
-        this.contactPhone = contactPhone;
-        this.typeOfReport = typeOfReport;
-        this.diagnosisCreationDate = diagnosisCreationDate != null ? diagnosisCreationDate.toLocalDate() : null;
-        this.diagnosisDescription = diagnosisDescription;
-        this.isChronic = isChronic;
-        this.severity = severity;
-        this.therapyForDiagnosis = therapyForDiagnosis;
-        this.nextControlDate = nextControlDate != null ? nextControlDate.toLocalDate() : null;
-        this.doctorFullname = doctorFullname;
-        this.doctorSpecialization = doctorSpecialization;
-        this.isDoctorStillActive = isDoctorStillActive;
-        this.yearsOfExperience = yearsOfExperience;
-    }
-}
Index: c/main/java/apps/spring/reportium/entity/enumerations/ComparisonDTOEnum.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/enumerations/ComparisonDTOEnum.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,5 +1,0 @@
-package apps.spring.reportium.entity.enumerations;
-
-public enum ComparisonDTOEnum {
-    more,less,equal
-}
Index: c/main/java/apps/spring/reportium/entity/enumerations/LogType.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/enumerations/LogType.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,9 +1,0 @@
-package apps.spring.reportium.entity.enumerations;
-
-public enum LogType {
-    REGISTRATION,
-    LOGIN,
-    LOGOUT,
-    CHANGE_ROLE,
-    CHANGE_PASSWORD
-}
Index: c/main/java/apps/spring/reportium/entity/enumerations/SelectedFilterSection.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/enumerations/SelectedFilterSection.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,9 +1,0 @@
-package apps.spring.reportium.entity.enumerations;
-
-public enum SelectedFilterSection {
-    PERSON,
-    ACADEMIC,
-    CRIMINAL,
-    MEDICAL,
-    EMPLOYMENT
-}
Index: c/main/java/apps/spring/reportium/entity/exceptions/AgeFilterOnNotAlivePeopleException.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/exceptions/AgeFilterOnNotAlivePeopleException.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,7 +1,0 @@
-package apps.spring.reportium.entity.exceptions;
-
-public class AgeFilterOnNotAlivePeopleException extends RuntimeException {
-    public AgeFilterOnNotAlivePeopleException(String message) {
-        super(message);
-    }
-}
Index: c/main/java/apps/spring/reportium/repository/FilterSessionRepository.java
===================================================================
--- src/main/java/apps/spring/reportium/repository/FilterSessionRepository.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,9 +1,0 @@
-package apps.spring.reportium.repository;
-
-import apps.spring.reportium.entity.FilterSession;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.stereotype.Repository;
-
-@Repository
-public interface FilterSessionRepository extends JpaRepository<FilterSession,Long> {
-}
Index: src/main/java/apps/spring/reportium/repository/InstitutionRepository.java
===================================================================
--- src/main/java/apps/spring/reportium/repository/InstitutionRepository.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/repository/InstitutionRepository.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -2,28 +2,8 @@
 
 import apps.spring.reportium.entity.Institution;
-import apps.spring.reportium.entity.dto.InstitutionTotalReportsDTO;
 import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.Query;
 import org.springframework.stereotype.Repository;
-
-import java.util.List;
 
 @Repository
 public interface InstitutionRepository extends JpaRepository<Institution, Long> {
-    @Query(value = """
-                WITH top_3_institutions AS (
-                  SELECT ar.institution_id, COUNT(*) AS total_reports
-                  FROM report r
-                  JOIN academicreport ar ON ar.report_id = r.report_id
-                  WHERE r.created_at >= date_trunc('year', now()) - interval '1 year'
-                  GROUP BY ar.institution_id
-                  ORDER BY COUNT(*) DESC
-                  LIMIT 3
-                )
-                SELECT i.name, a.total_reports
-                FROM top_3_institutions a
-                JOIN institution i ON i.institution_id = a.institution_id
-                ORDER BY a.total_reports DESC;
-            """, nativeQuery = true)
-    List<InstitutionTotalReportsDTO> findTop3Institutions();
 }
Index: src/main/java/apps/spring/reportium/repository/PersonRepository.java
===================================================================
--- src/main/java/apps/spring/reportium/repository/PersonRepository.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/repository/PersonRepository.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -2,12 +2,8 @@
 
 import apps.spring.reportium.entity.Person;
-import apps.spring.reportium.entity.enumerations.Gender;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.stereotype.Repository;
-import java.util.List;
-import java.util.Optional;
 
 @Repository
 public interface PersonRepository extends JpaRepository<Person,Long> {
-    Optional<Person> findByStubTrue();
 }
Index: src/main/java/apps/spring/reportium/repository/ReportRepository.java
===================================================================
--- src/main/java/apps/spring/reportium/repository/ReportRepository.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/repository/ReportRepository.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -1,11 +1,12 @@
 package apps.spring.reportium.repository;
 
-import apps.spring.reportium.entity.dto.*;
+import apps.spring.reportium.entity.DTOs.AcademicReportPerPersonDTO;
+import apps.spring.reportium.entity.DTOs.CrimeReportPerPersonDTO;
+import apps.spring.reportium.entity.DTOs.EmploymentReportPerPersonDTO;
+import apps.spring.reportium.entity.DTOs.MedicalReportPerPersonDTO;
 import apps.spring.reportium.entity.Report;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Pageable;
 import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Modifying;
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.data.repository.query.Param;
@@ -15,168 +16,43 @@
 
 @Repository
-public interface ReportRepository extends JpaRepository<Report, Long>, JpaSpecificationExecutor<Report> {
+public interface ReportRepository extends JpaRepository<Report, Long> {
 
     @Query(value = """
-            SELECT r.report_id, academic_field, description_of_report, i.name, i.type, i.address, i.year_established
-            FROM report r
-            JOIN academicreport ar ON ar.report_id = r.report_id
-            JOIN institution i ON i.institution_id = ar.institution_id
-            WHERE r.person_id = :personId
-            """, nativeQuery = true)
+        SELECT r.report_id, academic_field, description_of_report, i.name, i.type, i.address, i.year_established
+        FROM report r
+        JOIN academicreport ar ON ar.report_id = r.report_id
+        JOIN institution i ON i.institution_id = ar.institution_id
+        WHERE r.person_id = :personId
+        """, nativeQuery = true)
     List<AcademicReportPerPersonDTO> getAcademicReportsByPersonId(@Param("personId") Long personId);
 
     @Query(value = """
-            SELECT r.report_id, summary, er.start_date, er.end_date, job_role, income_per_month
-            FROM report r
-            JOIN employmentreport er ON er.report_id = r.report_id
-            WHERE r.person_id = :personId
-            """, nativeQuery = true)
+        SELECT r.report_id, summary, er.start_date, er.end_date, job_role, income_per_month
+        FROM report r
+        JOIN employmentreport er ON er.report_id = r.report_id
+        WHERE r.person_id = :personId
+        """, nativeQuery = true)
     List<EmploymentReportPerPersonDTO> getEmploymentReportsByPersonId(@Param("personId") Long personId);
 
     @Query(value = """
-            SELECT r.report_id, summary, next_control_date, d.short_description, d.therapy, d.severity, d.is_chronic,
-                   doc.name, doc.surname, doc.specialization
-            FROM report r
-            JOIN medicalreport mr ON mr.report_id = r.report_id
-            JOIN medicalreport_diagnosis mrd ON mr.report_id = mrd.report_id
-            JOIN diagnosis d ON mrd.diagnosis_id = d.diagnosis_id
-            JOIN doctor doc ON doc.doctor_id = mr.doctor_id
-            WHERE r.person_id = :personId
-            """, nativeQuery = true)
+        SELECT r.report_id, summary, next_control_date, d.short_description, d.therapy, d.severity, d.is_chronic,
+               doc.name, doc.surname, doc.specialization
+        FROM report r
+        JOIN medicalreport mr ON mr.report_id = r.report_id
+        JOIN medicalreport_diagnosis mrd ON mr.report_id = mrd.report_id
+        JOIN diagnosis d ON mrd.diagnosis_id = d.diagnosis_id
+        JOIN doctor doc ON doc.doctor_id = mr.doctor_id
+        WHERE r.person_id = :personId
+        """, nativeQuery = true)
     List<MedicalReportPerPersonDTO> getMedicalReportsByPersonId(@Param("personId") Long personId);
 
     @Query(value = """
-            SELECT r.report_id, label, severity_level, location, resolved, descriptive_punishment
-            FROM report r
-            JOIN criminalreport cr ON cr.report_id = r.report_id
-            JOIN crimetype ct ON cr.crime_type_id = ct.crime_type_id
-            WHERE r.person_id = :personId
-            """, nativeQuery = true)
+        SELECT r.report_id, label, severity_level, location, resolved, descriptive_punishment
+        FROM report r
+        JOIN criminalreport cr ON cr.report_id = r.report_id
+        JOIN crimetype ct ON cr.crime_type_id = ct.crime_type_id
+        WHERE r.person_id = :personId
+        """, nativeQuery = true)
     List<CrimeReportPerPersonDTO> getCriminalReportsByPersonId(@Param("personId") Long personId);
-
-    @Query(value = """
-            WITH
-            selected_person_reports AS (
-                SELECT * FROM report WHERE person_id = :person_id
-            ),
-            
-            academic AS (
-                SELECT r.created_at, ar.academic_field, ar.report_id
-                FROM report r
-                         JOIN academicreport ar ON r.report_id = ar.report_id
-                         JOIN institution i ON i.institution_id = ar.institution_id
-                WHERE r.person_id = :person_id
-            ),
-            
-            employment AS (
-                SELECT e.start_date, COALESCE(e.end_date, CURRENT_DATE) AS end_date, e.income_per_month
-                FROM employmentreport e
-                         JOIN report r ON r.report_id = e.report_id
-                WHERE r.person_id = :person_id
-            ),
-            
-            medical AS (
-                SELECT d.short_description, d.is_chronic
-                FROM report r
-                         JOIN medicalreport mr ON r.report_id = mr.report_id
-                         JOIN medicalreport_diagnosis mrd ON mrd.report_id = mr.report_id
-                         JOIN diagnosis d ON d.diagnosis_id = mrd.diagnosis_id
-                WHERE r.person_id = :person_id
-            ),
-            
-            criminal AS (
-                SELECT cr.descriptive_punishment, cr.resolved as is_resolved
-                FROM report r
-                         JOIN criminalreport cr ON r.report_id = cr.report_id
-                         JOIN crimetype ct ON ct.crime_type_id = cr.crime_type_id
-                WHERE r.person_id = :person_id
-            ),
-            
-            ordered_academic_reports_by_date AS (
-                SELECT
-                    ar.academic_field,
-                    r.created_at,
-                    ROW_NUMBER() OVER (PARTITION BY ar.academic_field ORDER BY r.created_at) AS row_num
-                FROM report r
-                         JOIN academicreport ar ON ar.report_id = r.report_id
-                WHERE r.person_id = :person_id
-            ),
-            
-            filtered_academic_pathway AS (
-                SELECT academic_field, MIN(created_at) AS started_on
-                FROM ordered_academic_reports_by_date
-                GROUP BY academic_field
-            ),
-            
-            employment_report_stats AS (
-                SELECT
-                    CAST(SUM(ABS(COALESCE(e.end_date, CURRENT_DATE) - e.start_date)) AS BIGINT) AS total_working_in_days,
-                    CAST(CEIL(SUM(ABS(COALESCE(e.end_date, CURRENT_DATE) - e.start_date)) / 30.0) AS BIGINT) AS total_working_in_months,
-                    CAST(CEIL(SUM(ABS(COALESCE(e.end_date, CURRENT_DATE) - e.start_date)) / 365.0) AS BIGINT) AS total_working_in_years,
-                    CAST(MAX(COALESCE(e.end_date, CURRENT_DATE) - e.start_date) AS BIGINT) AS longest_job_days
-                FROM employmentreport e
-                         JOIN report r ON r.report_id = e.report_id
-                WHERE r.person_id = :person_id
-            )
-            SELECT
-            -- General
-            CAST((SELECT COUNT(*) FROM selected_person_reports) AS BIGINT) AS total_reports_found,
-            CAST((SELECT created_at::date FROM selected_person_reports ORDER BY created_at ASC LIMIT 1) AS DATE) AS first_report_of_person,
-            CAST((SELECT created_at::date FROM selected_person_reports ORDER BY created_at DESC LIMIT 1) AS DATE) AS latest_report_of_person,
-            -- Academic
-            CAST((SELECT COUNT(*) FROM academic) AS BIGINT) AS academic_total,
-            CAST((SELECT academic_field
-                  FROM academic
-                  GROUP BY academic_field
-                  ORDER BY COUNT(*) DESC
-                LIMIT 1) AS TEXT) AS most_common_field,
-            CAST((SELECT STRING_AGG(academic_field, ' → ' ORDER BY started_on)
-                  FROM filtered_academic_pathway) AS TEXT) AS education_path,
-            -- Employment
-            CAST((SELECT COUNT(*) FROM employment) AS BIGINT) AS job_count,
-            (SELECT total_working_in_days FROM employment_report_stats),
-            (SELECT total_working_in_months FROM employment_report_stats),
-            (SELECT total_working_in_years FROM employment_report_stats),
-            (SELECT longest_job_days FROM employment_report_stats),
-            CAST((SELECT MAX(income_per_month) FROM employment) AS DOUBLE PRECISION) AS max_income_from_job,
-            -- Medical
-            CAST((SELECT COUNT(*) FROM medical) AS BIGINT) AS diagnosis_total,
-            CAST((SELECT ROUND(SUM(CASE WHEN is_chronic THEN 1 ELSE 0 END)::decimal / COUNT(*), 2)
-                  FROM medical) AS DOUBLE PRECISION) AS chronic_ratio,
-            CAST((SELECT short_description
-                  FROM medical
-                  GROUP BY short_description
-                  ORDER BY COUNT(*) DESC
-                LIMIT 1) AS TEXT) AS most_frequent_diagnosis,
-            -- Criminal
-            CAST((SELECT COUNT(*) FROM criminal) AS BIGINT) AS criminal_case_total,
-            CAST((SELECT ROUND(SUM(CASE WHEN is_resolved THEN 1 ELSE 0 END)::decimal / COUNT(*), 2)
-                  FROM criminal) AS DOUBLE PRECISION) AS resolution_ratio
-            """, nativeQuery = true)
-    ReportStatisticsPerPersonDTO getStatisticsForPerson(@Param("person_id") Long person_id);
-
-    @Query(value = """
-            with selected_person_diagnosis as(
-                select distinct d.diagnosis_id as diagnosis_id, d.short_description as label
-                from person p
-                         join report r on r.person_id = p.person_id
-                         join medicalreport_diagnosis mrd on mrd.report_id = r.report_id
-                         join diagnosis d on mrd.diagnosis_id = d.diagnosis_id
-                where p.person_id = :person_id
-            )
-            select cast(p2.person_id as bigint),
-                 p2.name || ' ' || p2.surname as full_name,
-                 cast(count(distinct spd.diagnosis_id) as bigint) as matching_diagnoses_count,
-                 string_agg(distinct spd.label, ', ') as matching_labels
-            from selected_person_diagnosis spd
-                     join medicalreport_diagnosis mrd2 on mrd2.diagnosis_id = spd.diagnosis_id
-                     join report r2 on r2.report_id = mrd2.report_id
-                     join person p2 on p2.person_id = r2.person_id
-            where p2.person_id != :person_id
-            group by p2.person_id, p2.name, p2.surname
-            having count(distinct spd.diagnosis_id) >=1
-            order by matching_diagnoses_count desc;
-            """, nativeQuery = true)
-    List<DiagnosisSimilarityPerPersonDTO> getSimilarDiagnosesForPerson(@Param("person_id") Long person_id);
 
     Page<Report> findAll(Pageable pageable);
@@ -184,13 +60,4 @@
     Page<Report> findAllByReportId(Integer reportId, Pageable pageable);
 
-    @Modifying(clearAutomatically = true, flushAutomatically = true)
-    @Query(value = """ 
-            UPDATE Report r
-            SET r.person.personId = :stub_person_id
-            WHERE r.person.personId = :target_to_delete_person_id
-            """)
-    int reassignReportsToStub(@Param("target_to_delete_person_id") Long targetId,
-                              @Param("stub_person_id") Long stubId);
-
 }
 
Index: c/main/java/apps/spring/reportium/repository/ReportViewRepository.java
===================================================================
--- src/main/java/apps/spring/reportium/repository/ReportViewRepository.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,22 +1,0 @@
-package apps.spring.reportium.repository;
-
-import apps.spring.reportium.entity.dto.view_fetching_dtos.*;
-import apps.spring.reportium.entity.Report;
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.Query;
-
-import java.util.List;
-
-public interface ReportViewRepository extends JpaRepository<Report, Long> {
-    @Query(value = "SELECT * FROM academic_report_view", nativeQuery = true)
-    List<AcademicReportViewFetchingDTO> getAcademicReportViews();
-
-    @Query(value = "SELECT * FROM employment_report_view", nativeQuery = true)
-    List<EmploymentReportViewFetchingDTO> getEmploymentReportViews();
-
-    @Query(value = "SELECT * FROM medical_report_view", nativeQuery = true)
-    List<MedicalReportViewFetchingDTO> getMedicalReportViews();
-
-    @Query(value = "SELECT * FROM criminal_report_view", nativeQuery = true)
-    List<CrimeReportViewFetchingDTO> getCrimeReportViews();
-}
Index: src/main/java/apps/spring/reportium/repository/UserProfileRepository.java
===================================================================
--- src/main/java/apps/spring/reportium/repository/UserProfileRepository.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/repository/UserProfileRepository.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -13,5 +13,3 @@
 public interface UserProfileRepository extends JpaRepository<UserProfile, Integer> {
     Optional<UserProfile> findByReportiumUser(ReportiumUser reportiumUser);
-
-    UserProfile findByReportiumUserUserId(int reportiumUserUserId);
 }
Index: src/main/java/apps/spring/reportium/service/AuthenticationService.java
===================================================================
--- src/main/java/apps/spring/reportium/service/AuthenticationService.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/service/AuthenticationService.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -2,5 +2,19 @@
 
 import apps.spring.reportium.entity.ReportiumUser;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
 
+/*
+
+CREATE TABLE ReportiumUser (
+    user_id SERIAL PRIMARY KEY,
+    name varchar(30) NOT NULL,
+    surname varchar(30) NOT NULL,
+    email VARCHAR(100) UNIQUE NOT NULL,
+    password_hash TEXT NOT NULL,
+    is_active BOOLEAN DEFAULT TRUE,
+    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
+);
+ */
 public interface AuthenticationService {
     void register_user(String name, String surname, String email, String password, String password_confirmation);
Index: c/main/java/apps/spring/reportium/service/FilterSessionService.java
===================================================================
--- src/main/java/apps/spring/reportium/service/FilterSessionService.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,8 +1,0 @@
-package apps.spring.reportium.service;
-
-import apps.spring.reportium.entity.dto.ReportFilterDTO;
-
-public interface FilterSessionService {
-    void save(ReportFilterDTO filterDTO);
-
-}
Index: c/main/java/apps/spring/reportium/service/InstitutionService.java
===================================================================
--- src/main/java/apps/spring/reportium/service/InstitutionService.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,10 +1,0 @@
-package apps.spring.reportium.service;
-
-import apps.spring.reportium.entity.Institution;
-import apps.spring.reportium.entity.Person;
-
-import java.util.List;
-
-public interface InstitutionService {
-    public List<Institution> getSuitableInstitutions(Person person);
-}
Index: src/main/java/apps/spring/reportium/service/PersonService.java
===================================================================
--- src/main/java/apps/spring/reportium/service/PersonService.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/service/PersonService.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -2,10 +2,9 @@
 
 import apps.spring.reportium.entity.*;
-import apps.spring.reportium.entity.dto.PersonReportSummaryDTO;
+import apps.spring.reportium.entity.DTOs.PersonReportSummaryDTO;
 
 import java.util.List;
 
 public interface PersonService {
-    void deletePerson(String userEmail, Long personId);
     List<PersonReportSummaryDTO> personSummaryReportData();
     Person findById(Integer personId);
Index: src/main/java/apps/spring/reportium/service/ReportService.java
===================================================================
--- src/main/java/apps/spring/reportium/service/ReportService.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/service/ReportService.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -1,34 +1,20 @@
 package apps.spring.reportium.service;
 
-import apps.spring.reportium.entity.dto.*;
+import apps.spring.reportium.entity.DTOs.AcademicReportPerPersonDTO;
+import apps.spring.reportium.entity.DTOs.CrimeReportPerPersonDTO;
+import apps.spring.reportium.entity.DTOs.EmploymentReportPerPersonDTO;
+import apps.spring.reportium.entity.DTOs.MedicalReportPerPersonDTO;
 import apps.spring.reportium.entity.Report;
-import apps.spring.reportium.entity.enumerations.PunishmentType;
 import org.springframework.data.domain.Page;
 
-import java.math.BigDecimal;
-import java.time.LocalDate;
 import java.util.List;
 
 public interface ReportService {
     List<Report> findAll();
-
     List<AcademicReportPerPersonDTO> getAcademicReports(Long personId);
-
     List<MedicalReportPerPersonDTO> getMedicalReports(Long personId);
-
     List<EmploymentReportPerPersonDTO> getEmploymentReports(Long personId);
-
     List<CrimeReportPerPersonDTO> getCriminalReports(Long personId);
-
+//    Page<Report> findPage(Integer reportId, Integer pageNum, Integer pageSize);
     Page<Report> findPaginatedReports(int page, int size, String sortField, String sortDir);
-
-    List<Report> getReportsByAdvancedFilter(ReportFilterDTO filter);
-
-    void saveNewEmploymentReport(Long personId, LocalDate startDate, LocalDate endDate, String jobRole, BigDecimal income, String summary);
-
-    void saveNewAcademicReport(Long personId, Long institution_id, String academicField, String descriptionOfReport);
-
-    void saveNewCriminalReport(Long personId, String caseSummary, String location, Boolean isResolved, Long crimeTypeId, PunishmentType punishmentType, Double fineToPay, LocalDate releaseDate);
-
-    void saveNewMedicalReport(Long personId, String summary, Long doctorId, LocalDate nextControlDate, List<Long> diagnosisIds);
 }
Index: c/main/java/apps/spring/reportium/service/UserLogService.java
===================================================================
--- src/main/java/apps/spring/reportium/service/UserLogService.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,8 +1,0 @@
-package apps.spring.reportium.service;
-
-import apps.spring.reportium.entity.UserProfileLog;
-import apps.spring.reportium.entity.enumerations.LogType;
-
-public interface UserLogService {
-    void createLog(Integer userId, LogType instruction);
-}
Index: src/main/java/apps/spring/reportium/service/impl/AuthenticateServiceImplementation.java
===================================================================
--- src/main/java/apps/spring/reportium/service/impl/AuthenticateServiceImplementation.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/service/impl/AuthenticateServiceImplementation.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -1,8 +1,10 @@
 package apps.spring.reportium.service.impl;
-
 import apps.spring.reportium.entity.UserProfileLog;
-import apps.spring.reportium.entity.enumerations.LogType;
 import apps.spring.reportium.repository.UserProfileLogRepository;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import jakarta.servlet.http.HttpSession;
 import apps.spring.reportium.entity.ReportiumUser;
+import apps.spring.reportium.entity.Role;
 import apps.spring.reportium.entity.UserProfile;
 import apps.spring.reportium.entity.exceptions.NoExistingCredentialsException;
@@ -10,10 +12,11 @@
 import apps.spring.reportium.entity.exceptions.UserAlreadyExistsException;
 import apps.spring.reportium.repository.ReportiumUserRepository;
+import apps.spring.reportium.repository.RoleRepository;
 import apps.spring.reportium.repository.UserProfileRepository;
 import apps.spring.reportium.service.AuthenticationService;
-import apps.spring.reportium.service.UserLogService;
 import jakarta.transaction.Transactional;
 import org.springframework.security.core.Authentication;
 import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
 import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.stereotype.Service;
@@ -26,18 +29,15 @@
     private final UserProfileRepository userProfileRepository;
     private final PasswordEncoder passwordEncoder;
+    private final RoleRepository roleRepository;
     private final UserProfileLogRepository profileLogRepository;
-    private final UserLogService userProfileLogService;
 
-    public AuthenticateServiceImplementation(ReportiumUserRepository reportiumUserRepository,
-                                             UserProfileRepository userProfileRepository,
-                                             PasswordEncoder passwordEncoder,
-                                             UserProfileLogRepository profileLogRepository,
-                                             UserLogService userProfileLogService) {
+    public AuthenticateServiceImplementation(ReportiumUserRepository reportiumUserRepository, UserProfileRepository userProfileRepository, PasswordEncoder passwordEncoder, RoleRepository roleRepository, UserProfileLogRepository profileLogRepository) {
         this.reportiumUserRepository = reportiumUserRepository;
         this.userProfileRepository = userProfileRepository;
         this.passwordEncoder = passwordEncoder;
+        this.roleRepository = roleRepository;
         this.profileLogRepository = profileLogRepository;
-        this.userProfileLogService = userProfileLogService;
     }
+
 
     @Override
@@ -50,5 +50,5 @@
             throw new IllegalArgumentException("Passwords do not match. Check the mistake and try again.");
         }
-        if (reportiumUserRepository.findByEmail(email).isPresent()) {
+        if(reportiumUserRepository.findByEmail(email).isPresent()) {
             throw new UserAlreadyExistsException(String.format("User with this email '%s' already exists.", email));
         }
@@ -61,12 +61,15 @@
         new_application_user.setPasswordHash(passwordEncoder.encode(password));
         new_application_user.setCreatedAt(LocalDateTime.now());
-
         ReportiumUser savedUser = reportiumUserRepository.save(new_application_user);
+        //I have a trigger that creates the user profile
         UserProfile user_profile = userProfileRepository.findByReportiumUser(savedUser).get();
-
-        userProfileLogService.createLog(user_profile.getProfileId(), LogType.REGISTRATION);
+        UserProfileLog userProfileLog = new UserProfileLog();
+        userProfileLog.setUserProfile(user_profile);
+        userProfileLog.setChangedAt(LocalDateTime.now());
+        String description = String.format("New user <%s %s> with mail '%s' has been registered.", savedUser.getName(), savedUser.getSurname() , savedUser.getEmail());
+        userProfileLog.setChangeDescription(description);
+        profileLogRepository.save(userProfileLog);
     }
 
-    @Override
     public ReportiumUser login(String email, String password) {
         if (email == null || email.isEmpty() || password == null || password.isEmpty()) {
@@ -75,10 +78,18 @@
         ReportiumUser user = reportiumUserRepository.findByEmail(email)
                 .orElseThrow(() -> new NoExistingCredentialsException("Invalid email."));
+
         if (!passwordEncoder.matches(password, user.getPasswordHash())) {
             throw new NoExistingCredentialsException("Invalid password.");
         }
+        UserProfileLog userProfileLog = new UserProfileLog();
+        UserProfile up = userProfileRepository.findByReportiumUser(user).get();
+        userProfileLog.setUserProfile(up);
+        userProfileLog.setChangedAt(LocalDateTime.now());
+        String description = String.format("User <%s %s> with mail '%s' has logged in.", user.getName(), user.getSurname() , user.getEmail());
+        userProfileLog.setChangeDescription(description);
+        profileLogRepository.save(userProfileLog);
         return user;
+
     }
-
     @Override
     public ReportiumUser getCurrentUser() {
@@ -91,3 +102,6 @@
                 .orElseThrow(() -> new NoExistingCredentialsException("Authenticated user not found in the database."));
     }
+
+
+
 }
Index: src/main/java/apps/spring/reportium/service/impl/CustomUserDetailsService.java
===================================================================
--- src/main/java/apps/spring/reportium/service/impl/CustomUserDetailsService.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/service/impl/CustomUserDetailsService.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -5,5 +5,8 @@
 import apps.spring.reportium.security.CustomUserDetails;
 import org.springframework.security.core.userdetails.*;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.stereotype.Service;
+
+import java.util.Collections;
 
 @Service
Index: c/main/java/apps/spring/reportium/service/impl/FilterSessionServiceImplementation.java
===================================================================
--- src/main/java/apps/spring/reportium/service/impl/FilterSessionServiceImplementation.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,28 +1,0 @@
-package apps.spring.reportium.service.impl;
-
-import apps.spring.reportium.entity.dto.ReportFilterDTO;
-import apps.spring.reportium.entity.FilterSession;
-import apps.spring.reportium.repository.FilterSessionRepository;
-import apps.spring.reportium.service.FilterSessionService;
-import org.springframework.stereotype.Service;
-
-import java.time.LocalDateTime;
-
-@Service
-public class FilterSessionServiceImplementation implements FilterSessionService {
-    private final FilterSessionRepository filterSessionRepository;
-    private final AuthenticateServiceImplementation authenticateServiceImplementation;
-    public FilterSessionServiceImplementation(FilterSessionRepository filterSessionRepository, AuthenticateServiceImplementation authenticateServiceImplementation) {
-        this.filterSessionRepository = filterSessionRepository;
-        this.authenticateServiceImplementation = authenticateServiceImplementation;
-    }
-
-    @Override
-    public void save(ReportFilterDTO filterDTO) {
-        FilterSession obj_to_save = new FilterSession();
-        obj_to_save.setFilterDescription(filterDTO.toString());
-        obj_to_save.setReportiumUser(authenticateServiceImplementation.getCurrentUser());
-        obj_to_save.setSearchedAt(LocalDateTime.now());
-        filterSessionRepository.save(obj_to_save);
-    }
-}
Index: c/main/java/apps/spring/reportium/service/impl/InstitutionServiceImplementation.java
===================================================================
--- src/main/java/apps/spring/reportium/service/impl/InstitutionServiceImplementation.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,48 +1,0 @@
-package apps.spring.reportium.service.impl;
-
-import apps.spring.reportium.entity.Institution;
-import apps.spring.reportium.entity.Person;
-import apps.spring.reportium.entity.enumerations.InstitutionType;
-import apps.spring.reportium.repository.InstitutionRepository;
-import apps.spring.reportium.service.InstitutionService;
-import org.springframework.stereotype.Service;
-
-import java.time.LocalDate;
-import java.util.List;
-
-@Service
-public class InstitutionServiceImplementation implements InstitutionService {
-    private final InstitutionRepository institutionRepository;
-
-    public InstitutionServiceImplementation(InstitutionRepository institutionRepository) {
-        this.institutionRepository = institutionRepository;
-    }
-
-    @Override
-    public List<Institution> getSuitableInstitutions(Person person) {
-        List<Institution> allInstitutions = institutionRepository.findAll();
-        int personAge = LocalDate.now().getYear() - person.getDateOfBirth().getYear();
-        if (personAge < 5) {
-            return List.of();
-        }
-        if (personAge <= 15) {
-            return allInstitutions
-                    .stream()
-                    .filter(inst ->
-                            inst.getType() == InstitutionType.PRIMARY_SCHOOL || inst.getType() == InstitutionType.ACADEMY)
-                    .toList();
-        }
-        if (personAge <= 19){
-            return allInstitutions
-                    .stream()
-                    .filter(inst ->
-                            inst.getType() == InstitutionType.HIGH_SCHOOL || inst.getType() == InstitutionType.ACADEMY)
-                    .toList();
-        }
-        return allInstitutions
-                    .stream()
-                    .filter(inst ->
-                            inst.getType() == InstitutionType.UNIVERSITY || inst.getType() == InstitutionType.ACADEMY)
-                    .toList();
-    }
-}
Index: src/main/java/apps/spring/reportium/service/impl/PersonServiceImplementation.java
===================================================================
--- src/main/java/apps/spring/reportium/service/impl/PersonServiceImplementation.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/service/impl/PersonServiceImplementation.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -2,16 +2,11 @@
 
 import apps.spring.reportium.entity.*;
-import apps.spring.reportium.entity.dto.PersonReportSummaryDTO;
-import apps.spring.reportium.entity.enumerations.Gender;
-import apps.spring.reportium.entity.exceptions.PersonNotFoundException;
+import apps.spring.reportium.entity.DTOs.PersonReportSummaryDTO;
 import apps.spring.reportium.repository.*;
 import apps.spring.reportium.service.PersonService;
-import apps.spring.reportium.service.UserLogService;
-import jakarta.transaction.Transactional;
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.stereotype.Service;
 
 import java.time.LocalDate;
-import java.time.LocalDateTime;
 import java.time.Period;
 import java.util.ArrayList;
@@ -21,65 +16,19 @@
 public class PersonServiceImplementation implements PersonService {
     private final PersonRepository personRepository;
-    private final ReportRepository reportRepository;
     private final CriminalReportRepository criminalReportRepository;
     private final AcademicReportRepository academicReportRepository;
     private final MedicalReportRepository medicalReportRepository;
     private final EmploymentReportRepository employmentReportRepository;
-    private final ReportiumUserRepository reportiumUserRepository;
-    private final UserProfileLogRepository userProfileLogRepository;
-
-    public PersonServiceImplementation(PersonRepository personRepository, ReportRepository reportRepository,
+    public PersonServiceImplementation(PersonRepository personRepository,
                                        CriminalReportRepository criminalReportRepository,
                                        AcademicReportRepository academicReportRepository,
                                        MedicalReportRepository medicalReportRepository,
-                                       EmploymentReportRepository employmentReportRepository,
-                                       ReportiumUserRepository reportiumUserRepository,
-                                       UserProfileLogRepository userProfileLogRepository) {
+                                       EmploymentReportRepository employmentReportRepository) {
         this.personRepository = personRepository;
-        this.reportRepository = reportRepository;
         this.criminalReportRepository = criminalReportRepository;
         this.academicReportRepository = academicReportRepository;
         this.medicalReportRepository = medicalReportRepository;
         this.employmentReportRepository = employmentReportRepository;
-        this.reportiumUserRepository = reportiumUserRepository;
-        this.userProfileLogRepository = userProfileLogRepository;
     }
-
-    @Transactional
-    @Override
-    public void deletePerson(String userEmail, Long personId) {
-        Person stub = personRepository.findByStubTrue().orElseGet(() -> {
-            Person newStub = new Person();
-            newStub.setEmbg("UNIQUE-EMBG");
-            newStub.setName("Stub");
-            newStub.setSurname("Collector");
-            newStub.setGender(Gender.MALE);
-            newStub.setDateOfBirth(LocalDate.of(1900, 10, 10));
-            newStub.setAlive(false);
-            newStub.setAddress("N/A");
-            newStub.setContactPhone("N/A");
-            newStub.setStub(true);
-            return personRepository.save(newStub);
-        });
-
-        Person targetToDelete = personRepository.findById(personId).orElseThrow(() -> new PersonNotFoundException("Person with id=" + personId + " not found"));
-
-        if (targetToDelete.getPersonId() == stub.getPersonId()) {
-            throw new IllegalStateException("Archive (stub) person cannot be deleted.");
-        }
-
-        int totalReportsMoved = reportRepository.reassignReportsToStub((long) targetToDelete.getPersonId(), (long) stub.getPersonId());
-        String logMessage = String.format("Admin User with email %s has deleted Person: %s %s. All his %d reports were moved to stub person.",
-                userEmail, targetToDelete.getName(), targetToDelete.getSurname(),totalReportsMoved);
-        reportiumUserRepository.findByEmail(userEmail).ifPresent(reportiumUser -> {
-            UserProfileLog userProfileLog = new UserProfileLog();
-            userProfileLog.setChangedAt(LocalDateTime.now());
-            userProfileLog.setChangeDescription(logMessage);
-            userProfileLog.setUserProfile(reportiumUser.getProfile());
-            userProfileLogRepository.save(userProfileLog);
-        });
-        personRepository.delete(targetToDelete);
-    }
-
 
     @Override
Index: src/main/java/apps/spring/reportium/service/impl/ReportServiceImplementation.java
===================================================================
--- src/main/java/apps/spring/reportium/service/impl/ReportServiceImplementation.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/service/impl/ReportServiceImplementation.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -1,33 +1,22 @@
 package apps.spring.reportium.service.impl;
 
-import apps.spring.reportium.entity.dto.*;
+import apps.spring.reportium.entity.DTOs.AcademicReportPerPersonDTO;
+import apps.spring.reportium.entity.DTOs.CrimeReportPerPersonDTO;
+import apps.spring.reportium.entity.DTOs.EmploymentReportPerPersonDTO;
+import apps.spring.reportium.entity.DTOs.MedicalReportPerPersonDTO;
 import apps.spring.reportium.entity.Report;
-import apps.spring.reportium.entity.enumerations.PunishmentType;
 import apps.spring.reportium.repository.ReportRepository;
 import apps.spring.reportium.service.ReportService;
-import apps.spring.reportium.specifications.ReportFilterSpecificationBuilder;
-import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.PageRequest;
 import org.springframework.data.domain.Pageable;
 import org.springframework.data.domain.Sort;
-import org.springframework.data.jpa.domain.Specification;
-import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.stereotype.Service;
 
-import java.math.BigDecimal;
-import java.sql.Array;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.time.LocalDate;
 import java.util.List;
-import java.util.Objects;
 
 @Service
-
 public class ReportServiceImplementation implements ReportService {
     private final ReportRepository reportRepository;
-    @Autowired
-    private JdbcTemplate jdbcTemplate;
 
     public ReportServiceImplementation(ReportRepository reportRepository) {
@@ -59,90 +48,13 @@
         return reportRepository.getCriminalReportsByPersonId(personId);
     }
-
     @Override
     public Page<Report> findPaginatedReports(int page, int size, String sortField, String sortDir) {
-        Sort sort = sortDir.equalsIgnoreCase("asc")
-                ? Sort.by(sortField).ascending().and(Sort.by("reportId").ascending())
-                : Sort.by(sortField).descending().and(Sort.by("reportId").descending());
+        int safePage = Math.max(0, page - 1);
 
-        Pageable pageable = PageRequest.of(page, size, sort);
+        Sort sort = sortDir.equalsIgnoreCase("asc") ?
+                Sort.by(sortField).ascending() : Sort.by(sortField).descending();
+
+        Pageable pageable = PageRequest.of(safePage, size, sort);
         return reportRepository.findAll(pageable);
-
     }
-
-    @Override
-    public List<Report> getReportsByAdvancedFilter(ReportFilterDTO filter) {
-        Specification<Report> spec = ReportFilterSpecificationBuilder.build(filter);
-        return reportRepository.findAll(spec); // from JpaSpecificationExecutor
-    }
-
-    @Override
-    public void saveNewEmploymentReport(Long personId,
-                                        LocalDate startDate,
-                                        LocalDate endDate,
-                                        String jobRole,
-                                        BigDecimal income,
-                                        String summary) {
-        jdbcTemplate.update(
-                "CALL insert_employment_report(?::integer, ?::date, ?::date, ?::text, ?::numeric, ?::text)",
-                personId,
-                startDate,
-                endDate,
-                jobRole,
-                income,
-                summary
-        );
-
-
-    }
-
-    @Override
-    public void saveNewAcademicReport(Long personId,
-                                      Long institution_id,
-                                      String academicField,
-                                      String descriptionOfReport) {
-        jdbcTemplate.update(
-                "CALL insert_academic_report(?::INT, ?::INT, ?::TEXT, ?::TEXT)",
-                personId,
-                institution_id, // assuming Institution has getInstitutionId()
-                academicField,
-                descriptionOfReport
-        );
-    }
-
-    @Override
-    public void saveNewCriminalReport(Long personId, String caseSummary, String location, Boolean isResolved, Long crimeTypeId, PunishmentType punishmentType, Double fineToPay, LocalDate releaseDate) {
-        jdbcTemplate.update(
-                "CALL insert_criminal_report(?::INT, ?::TEXT, ?::TEXT, ?::BOOLEAN, ?::INT, ?::TEXT, ?::NUMERIC, ?::DATE)",
-                personId,
-                caseSummary,
-                location,
-                isResolved,
-                crimeTypeId,
-                punishmentType.name(),
-                fineToPay,
-                releaseDate
-        );
-    }
-
-    @Override
-    public void saveNewMedicalReport(Long personId, String summary, Long doctorId, LocalDate nextControlDate, List<Long> diagnosisIds) {
-        try (Connection conn = Objects.requireNonNull(jdbcTemplate.getDataSource()).getConnection()) {
-            Array diagnosisArray = conn.createArrayOf("INTEGER",
-                    diagnosisIds != null ? diagnosisIds.toArray(new Long[0]) : new Long[0]);
-
-            jdbcTemplate.update(
-                    "CALL insert_medical_report(?::INT, ?::TEXT, ?::INT, ?::DATE, ?::INT[])",
-                    personId,
-                    summary,
-                    doctorId,
-                    nextControlDate,
-                    diagnosisArray
-            );
-        } catch (SQLException e) {
-            throw new RuntimeException("Error executing insert_medical_report", e);
-        }
-    }
-
-
 }
Index: src/main/java/apps/spring/reportium/service/impl/ReportiumUserServiceImplementation.java
===================================================================
--- src/main/java/apps/spring/reportium/service/impl/ReportiumUserServiceImplementation.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/service/impl/ReportiumUserServiceImplementation.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -4,4 +4,5 @@
 import apps.spring.reportium.entity.UserProfile;
 import apps.spring.reportium.repository.ReportiumUserRepository;
+import apps.spring.reportium.repository.RoleRepository;
 import apps.spring.reportium.service.ReportiumUserService;
 import apps.spring.reportium.service.RoleService;
Index: c/main/java/apps/spring/reportium/service/impl/UserLogServiceImplementation.java
===================================================================
--- src/main/java/apps/spring/reportium/service/impl/UserLogServiceImplementation.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,59 +1,0 @@
-package apps.spring.reportium.service.impl;
-
-import apps.spring.reportium.entity.UserProfile;
-import apps.spring.reportium.entity.UserProfileLog;
-import apps.spring.reportium.entity.enumerations.LogType;
-import apps.spring.reportium.entity.exceptions.NoExistingCredentialsException;
-import apps.spring.reportium.repository.UserProfileLogRepository;
-import apps.spring.reportium.repository.UserProfileRepository;
-import apps.spring.reportium.service.UserLogService;
-import jakarta.transaction.Transactional;
-import org.springframework.stereotype.Service;
-
-import java.time.LocalDateTime;
-
-@Service
-public class UserLogServiceImplementation implements UserLogService {
-    private final UserProfileRepository profileRepository;
-    private final UserProfileLogRepository userProfileLogRepository;
-
-    public UserLogServiceImplementation(UserProfileRepository profileRepository,
-                                        UserProfileLogRepository userProfileLogRepository) {
-        this.profileRepository = profileRepository;
-        this.userProfileLogRepository = userProfileLogRepository;
-    }
-
-    @Override
-    @Transactional
-    public void createLog(Integer userId, LogType type) {
-        if (type == null) {
-            throw new IllegalArgumentException("Log type must not be null");
-        }
-
-        UserProfile profile = profileRepository
-                .findById(userId).orElseThrow(() -> new NoExistingCredentialsException("User does not exist"));
-
-        String fullName = buildFullName(profile);
-
-        String description = switch (type) {
-            case LOGIN -> "User %s logged in successfully.".formatted(fullName);
-            case REGISTRATION -> "User %s registered successfully.".formatted(fullName);
-            case LOGOUT -> "User %s logged out successfully.".formatted(fullName);
-            case CHANGE_ROLE -> "The role of user %s was changed successfully.".formatted(fullName);
-            case CHANGE_PASSWORD -> "User %s changed the password successfully.".formatted(fullName);
-        };
-
-        UserProfileLog log = new UserProfileLog();
-        log.setUserProfile(profile);
-        log.setChangeDescription(description);
-        log.setChangedAt(LocalDateTime.now());
-        userProfileLogRepository.save(log);
-    }
-
-    private String buildFullName(UserProfile profile) {
-        var u = profile.getReportiumUser();
-        String name = u.getName() == null ? "" : u.getName().trim();
-        String surname = u.getSurname() == null ? "" : u.getSurname().trim();
-        return (name + " " + surname).trim();
-    }
-}
Index: c/main/java/apps/spring/reportium/specifications/ReportFilterSpecificationBuilder.java
===================================================================
--- src/main/java/apps/spring/reportium/specifications/ReportFilterSpecificationBuilder.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,187 +1,0 @@
-package apps.spring.reportium.specifications;
-
-import apps.spring.reportium.entity.*;
-import apps.spring.reportium.entity.dto.ReportFilterDTO;
-import apps.spring.reportium.entity.enumerations.PunishmentType;
-import apps.spring.reportium.entity.enumerations.SelectedFilterSection;
-import org.springframework.data.jpa.domain.Specification;
-
-import java.time.LocalDate;
-import java.util.ArrayList;
-import java.util.List;
-
-import jakarta.persistence.criteria.Join;
-import jakarta.persistence.criteria.JoinType;
-import jakarta.persistence.criteria.Predicate;
-import jakarta.persistence.criteria.Expression;
-
-public class ReportFilterSpecificationBuilder {
-    public static Specification<Report> build(ReportFilterDTO filter) {
-        return (root, query, cb) -> {
-            //global things
-            query.distinct(false);
-            LocalDate now = LocalDate.now();
-            List<Predicate> predicates = new ArrayList<>();
-            Join<Report, Person> report_on_person_join = root.join("person", JoinType.LEFT);
-            //PERSON PART FILTERS
-            //proof of concept 1 -> Person Join Filters
-            /* Person */
-            //ALL TESTED!
-            if (filter.getFilter_selected().equals(SelectedFilterSection.PERSON)) {
-                // predicate that checks if there exists a person with the string provided in the name
-                if (filter.getPerson_name_string() != null && !filter.getPerson_name_string().isBlank()) {
-                    predicates.add(cb.like(cb.lower(report_on_person_join.get("name")),
-                            "%" + filter.getPerson_name_string().toLowerCase() + "%"));
-                }
-                // predicate that checks if there exists a person with the string provided in the surname
-                if (filter.getPerson_surname_string() != null && !filter.getPerson_surname_string().isBlank()) {
-                    predicates.add(cb.like(cb.lower(report_on_person_join.get("surname")), "%" + filter.getPerson_surname_string().toLowerCase() + "%"));
-                }
-                // Age filters work for people who are alive only, otherwise no
-                if (filter.getIs_alive()) {
-                    if (filter.getCorrect_age() != null && filter.getCorrect_age() > 0) {
-                        Expression<Integer> years_age = cb.function("date_part", Integer.class, cb.literal("year"),
-                                cb.function("age", String.class, cb.currentDate(), report_on_person_join.get("dateOfBirth")));
-                        predicates.add(cb.equal(years_age, filter.getCorrect_age()));
-                    } else if (filter.getCorrect_age() == null || filter.getCorrect_age() == 0) {
-                        if (filter.getAge_start() > 0) {
-                            LocalDate start_age = now.minusYears(filter.getAge_start());//
-                            predicates.add(cb.lessThanOrEqualTo(report_on_person_join.get("dateOfBirth"), start_age));
-                        }
-                        if (filter.getAge_end() < 120) {
-                            LocalDate end_age = now.minusYears(filter.getAge_end() + 1).plusDays(1);
-                            predicates.add(cb.greaterThanOrEqualTo(report_on_person_join.get("dateOfBirth"), end_age));
-                        }
-                    }
-                    predicates.add(cb.isNull(report_on_person_join.get("dateOfDeath")));
-                } else {
-                    predicates.add(cb.isNotNull(report_on_person_join.get("dateOfDeath")));
-                }
-                // Gender
-                if (filter.getGender() != null) {
-                    predicates.add(cb.equal(report_on_person_join.get("gender"), filter.getGender()));
-                }
-                // Address
-                if (filter.getAddress_string() != null && !filter.getAddress_string().isBlank()) {
-                    predicates.add(cb.like(
-                            cb.lower(report_on_person_join.get("address")),
-                            "%" + filter.getAddress_string().toLowerCase() + "%"
-                    ));
-                }
-            }
-            //EMPLOYMENT PART FILTERS
-            //proof of concept 2 -> Employment Report Join Filters
-            /* Employment Report */
-            //ALL TESTED!
-            if (filter.getFilter_selected().equals(SelectedFilterSection.EMPLOYMENT)) {
-                Join<Report, EmploymentReport> employment_report_join = root.join("employmentReport", JoinType.LEFT);
-                //predicate for income check (more,less,equal)
-                if (filter.getIncome_comparison() != null && filter.getIncome_amount() > 0) {
-                    switch (filter.getIncome_comparison()) {
-                        case more ->
-                                predicates.add(cb.greaterThan(employment_report_join.get("incomePerMonth"), filter.getIncome_amount()));
-                        case equal ->
-                                predicates.add(cb.equal(employment_report_join.get("incomePerMonth"), filter.getIncome_amount()));
-                        case less ->
-                                predicates.add(cb.lessThan(employment_report_join.get("incomePerMonth"), filter.getIncome_amount()));
-                    }
-                }
-                //predicate for years_experience check (more,less,equal)
-                if (filter.getYears_experience_comparison() != null && filter.getYears_experience() > 0) {
-                    //this function is in the database, and I execute it
-                    Expression<Integer> totalYearsExpr = cb.function(
-                            "years_total", Integer.class,
-                            employment_report_join.get("startDate"), employment_report_join.get("endDate")
-                    );
-                    switch (filter.getYears_experience_comparison()) {
-                        case more -> predicates.add(cb.greaterThan(totalYearsExpr, filter.getYears_experience()));
-                        case equal -> predicates.add(cb.equal(totalYearsExpr, filter.getYears_experience()));
-                        case less -> predicates.add(cb.lessThan(totalYearsExpr, filter.getYears_experience()));
-                    }
-                }
-            }
-            //ACADEMIC PART FILTERS
-            //proof of concept 3 -> Academic Report Join Filters
-            /* Academic Report */
-            //ALL TESTED!
-            if (filter.getFilter_selected().equals(SelectedFilterSection.ACADEMIC)) {
-                Join<Report, AcademicReport> academic_report_join = root.join("academicReport", JoinType.LEFT);
-                //predicate for field of study
-                if (filter.getAcademic_field() != null && !filter.getAcademic_field().isBlank()) {
-                    predicates.add(cb.like(cb.lower(academic_report_join.get("academicField")), "%" + filter.getAcademic_field().toLowerCase() + "%"));
-                }
-                //predicate for institution field
-                Join<AcademicReport, Institution> academic_report_institution_join = academic_report_join.join("institution", JoinType.LEFT);
-                if (filter.getInstitution_type() != null) {
-                    predicates.add(cb.equal(academic_report_institution_join.get("type"), filter.getInstitution_type()));
-                }
-            }
-            //MEDICAL PART FILTERS
-            //proof of concept 4 -> Medical Report Join Filters
-            /* Medical Report */
-            //ALL TESTED!
-            if (filter.getFilter_selected().equals(SelectedFilterSection.MEDICAL)) {
-                // Join to MedicalReport and Doctor
-                Join<Report, MedicalReport> medicalReportJoin = root.join("medicalReport", JoinType.LEFT);
-                Join<MedicalReport, Doctor> doctorJoin = medicalReportJoin.join("doctor", JoinType.LEFT);
-                Join<MedicalReport, MedicalReportDiagnosis> diagnosisLinkJoin = medicalReportJoin.join("medicalReportDiagnoses", JoinType.LEFT);
-                Join<MedicalReportDiagnosis, Diagnosis> diagnosisJoin = diagnosisLinkJoin.join("diagnosis", JoinType.LEFT);
-                // Has Next Medical Control
-                if (Boolean.TRUE.equals(filter.getHas_next_control())) {
-                    predicates.add(cb.isNotNull(medicalReportJoin.get("nextControlDate")));
-                } else {
-                    predicates.add(cb.isNull(medicalReportJoin.get("nextControlDate")));
-                }
-                // Doctor Name
-                if (filter.getDoctor_name_string() != null && !filter.getDoctor_name_string().isBlank()) {
-                    predicates.add(cb.like(cb.lower(doctorJoin.get("name")), "%" + filter.getDoctor_name_string().toLowerCase() + "%"));
-                }
-                // Doctor Surname
-                if (filter.getDoctor_surname_string() != null && !filter.getDoctor_surname_string().isBlank()) {
-                    predicates.add(cb.like(cb.lower(doctorJoin.get("surname")), "%" + filter.getDoctor_surname_string().toLowerCase() + "%"));
-                }
-                // Specialization
-                if (filter.getSpecialization() != null) {
-                    predicates.add(cb.equal(doctorJoin.get("specialization"), filter.getSpecialization()));
-                }
-                // Chronic diagnosis
-                if (filter.getIs_chronic() != null) {
-                    predicates.add(cb.equal(diagnosisJoin.get("isChronic"), filter.getIs_chronic()));
-                }
-            }
-            //FIXME
-            //CRIMINAL PART FILTERS
-            //proof of concept 5 -> Criminal Report Join Filters
-            /* Criminal Report */
-            if (filter.getFilter_selected().equals(SelectedFilterSection.CRIMINAL)) {
-                Join<Report, CriminalReport> criminal_report_join = root.join("criminalReport", JoinType.LEFT);
-                Join<CriminalReport, CrimeType> crime_type_join = criminal_report_join.join("crimeType", JoinType.LEFT);
-                //predicate for severity level
-                if (filter.getCrime_severity_level() != null) {
-                    predicates.add(cb.equal(crime_type_join.get("severityLevel"), filter.getCrime_severity_level()));
-                }
-                //predicate for resolved
-                if (filter.getIs_resolved() != null) {
-                    predicates.add(cb.equal(criminal_report_join.get("resolved"), filter.getIs_resolved()));
-                }
-                Join<CriminalReport, Punishment> punishment_join = criminal_report_join.join("punishment", JoinType.INNER);
-                //predicate for punishment as fine
-                if (PunishmentType.FINE.equals(filter.getPunishment_type()) && filter.getPunishment_fine() != null && filter.getPunishment_fine() > 0) {
-                    predicates.add(cb.equal(punishment_join.get("fineToPay"), filter.getPunishment_fine()));
-                }
-                //predicate for punishment as prison
-                if (PunishmentType.PRISON.equals(filter.getPunishment_type()) && filter.getPunishment_years() != null && filter.getPunishment_years() > 0) {
-                    Expression<LocalDate> created_at = root.get("createdAt");
-                    Expression<Integer> years_in_prison = cb.function("years_total", Integer.class,
-                            created_at, punishment_join.get("releaseDate"));
-                    predicates.add(cb.equal(years_in_prison, filter.getPunishment_years()));
-                }
-                //predicate for criminal type
-                if (filter.getCrime_type_label() != null && !filter.getCrime_type_label().isBlank()) {
-                    predicates.add(cb.like(cb.lower(crime_type_join.get("label")), "%" + filter.getCrime_type_label().toLowerCase() + "%"));
-                }
-            }
-            return cb.and(predicates.toArray(new Predicate[0]));
-        };
-    }
-}
Index: c/main/java/apps/spring/reportium/web/AdvancedFilterController.java
===================================================================
--- src/main/java/apps/spring/reportium/web/AdvancedFilterController.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,76 +1,0 @@
-package apps.spring.reportium.web;
-
-import apps.spring.reportium.entity.dto.ReportFilterDTO;
-import apps.spring.reportium.entity.Report;
-import apps.spring.reportium.entity.enumerations.*;
-import apps.spring.reportium.service.FilterSessionService;
-import apps.spring.reportium.service.ReportService;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Arrays;
-import java.util.List;
-
-@Controller
-public class AdvancedFilterController {
-    private final ReportService reportService;
-    private final FilterSessionService filterSessionService;
-    public AdvancedFilterController(ReportService reportService, FilterSessionService filterSessionService) {
-        this.reportService = reportService;
-        this.filterSessionService = filterSessionService;
-    }
-    @GetMapping("/advanced_filter")
-    public String showInitialFilterSelection(Model model) {
-        ReportFilterDTO defaultFilter = new ReportFilterDTO();
-        defaultFilter.setFilter_selected(SelectedFilterSection.PERSON);
-        model.addAttribute("filter", defaultFilter);
-        model.addAttribute("filter_types", SelectedFilterSection.values());
-        return "redirect:/advanced_filter_pt2?filter_selected=PERSON";//default to be selected as person
-    }
-
-    @PostMapping("/advanced_filter")
-    public String applyAdvancedFilter(@ModelAttribute ReportFilterDTO filter, Model model) {
-        System.out.println("Advanced filter applied!");
-        System.out.println(filter);
-        return "redirect:/reports";
-    }
-    @GetMapping("/advanced_filter_pt2")
-    public String showAdvancedFilterPage(@RequestParam(name = "filter_selected", required = false) String filterSelected, Model model) {
-        ReportFilterDTO filterDTO = new ReportFilterDTO();
-        SelectedFilterSection filter_type = (filterSelected != null)
-                ? SelectedFilterSection.valueOf(filterSelected)
-                : SelectedFilterSection.PERSON;
-        filterDTO.setFilter_selected(filter_type);
-        model.addAttribute("choice", filter_type);
-        model.addAttribute("filter", filterDTO);
-        model.addAttribute("filter_types", SelectedFilterSection.values());
-        model.addAttribute("severities", Arrays.asList(SeverityLevel.values()));
-        model.addAttribute("specializations", Arrays.asList(DoctorSpecialization.values()));
-        model.addAttribute("comparisons", Arrays.asList(ComparisonDTOEnum.values()));
-        model.addAttribute("institutions", Arrays.asList(InstitutionType.values()));
-        addSharedEnums(model);
-
-        return "filter_panel";
-    }
-
-    @PostMapping("/advanced_filter_pt2")
-    public String handleFilter(@ModelAttribute("filter") ReportFilterDTO filter, Model model) {
-        SelectedFilterSection section = filter.getFilter_selected();
-        if (section == null) filter.setFilter_selected(SelectedFilterSection.PERSON);
-        List<Report> filteredReports = reportService.getReportsByAdvancedFilter(filter);
-        model.addAttribute("results", filteredReports);
-        model.addAttribute("filter", filter);
-        model.addAttribute("choice", section);
-        addSharedEnums(model);
-        filterSessionService.save(filter);
-        return "filtered_results";
-    }
-
-    private void addSharedEnums(Model model) {
-        model.addAttribute("severities", Arrays.asList(SeverityLevel.values()));
-        model.addAttribute("specializations", Arrays.asList(DoctorSpecialization.values()));
-        model.addAttribute("comparisons", Arrays.asList(ComparisonDTOEnum.values()));
-        model.addAttribute("institutions", Arrays.asList(InstitutionType.values()));
-    }
-}
Index: c/main/java/apps/spring/reportium/web/DiagnosisController.java
===================================================================
--- src/main/java/apps/spring/reportium/web/DiagnosisController.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,38 +1,0 @@
-package apps.spring.reportium.web;
-
-import apps.spring.reportium.entity.Diagnosis;
-import apps.spring.reportium.entity.enumerations.SeverityLevel;
-import apps.spring.reportium.repository.DiagnosisRepository;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.*;
-
-@Controller
-@RequestMapping("/diagnosis")
-public class DiagnosisController {
-    private final DiagnosisRepository diagnosisRepository;
-
-    public DiagnosisController(DiagnosisRepository diagnosisRepository) {
-        this.diagnosisRepository = diagnosisRepository;
-    }
-
-    @GetMapping("/create")
-    public String createDiagnosis(@RequestParam Long personId,
-                                  Model model) {
-        model.addAttribute("personId", personId);
-        model.addAttribute("severityLevels", SeverityLevel.values());
-        model.addAttribute("diagnosis", diagnosisRepository.findAll());
-        return "create_diagnosis";
-    }
-
-    @PostMapping
-    public String addDiagnosis(@RequestParam Long personId,
-                               @RequestParam String description,
-                               @RequestParam String therapy,
-                               @RequestParam Boolean isChronic,
-                               @RequestParam SeverityLevel severityLevel) {
-        Diagnosis diagnosis = new Diagnosis(description, therapy, isChronic, severityLevel);
-        diagnosisRepository.save(diagnosis);
-        return "redirect:/reports/add/medical?personId=" + personId;
-    }
-}
Index: src/main/java/apps/spring/reportium/web/HomeController.java
===================================================================
--- src/main/java/apps/spring/reportium/web/HomeController.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/web/HomeController.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -2,13 +2,13 @@
 
 import apps.spring.reportium.entity.*;
-import apps.spring.reportium.entity.dto.*;
+import apps.spring.reportium.entity.DTOs.*;
 import apps.spring.reportium.entity.exceptions.PersonNotFoundException;
-import apps.spring.reportium.repository.InstitutionRepository;
 import apps.spring.reportium.repository.ReportRepository;
 import apps.spring.reportium.service.PersonService;
-import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
 
 import java.util.List;
@@ -19,10 +19,8 @@
     private final PersonService personService;
     private final ReportRepository reportRepository;
-    private final InstitutionRepository institutionRepository;
 
-    public HomeController(PersonService personService, ReportRepository reportRepository, InstitutionRepository institutionRepository) {
+    public HomeController(PersonService personService, ReportRepository reportRepository) {
         this.personService = personService;
         this.reportRepository = reportRepository;
-        this.institutionRepository = institutionRepository;
     }
 
@@ -33,12 +31,4 @@
         return "home";
     }
-
-    @PostMapping("/{id}/delete")
-    public String deletePerson(@PathVariable Long id) {
-        String email = SecurityContextHolder.getContext().getAuthentication().getName();
-        personService.deletePerson(email, id);
-        return "redirect:/";
-    }
-
     @GetMapping("/{id}")
     public String viewPersonReports(@PathVariable("id") Long personId, Model model) {
@@ -51,15 +41,10 @@
         List<AcademicReportPerPersonDTO> person_ar = reportRepository.getAcademicReportsByPersonId(personId);
         List<EmploymentReportPerPersonDTO> person_er = reportRepository.getEmploymentReportsByPersonId(personId);
-        ReportStatisticsPerPersonDTO statistics_per_person = reportRepository.getStatisticsForPerson(personId);
-        List<DiagnosisSimilarityPerPersonDTO> diagnosis_similarity = reportRepository.getSimilarDiagnosesForPerson(personId);
-        List<InstitutionTotalReportsDTO> top3_institutions = institutionRepository.findTop3Institutions();
+
         model.addAttribute("medical_reports", person_mr);
         model.addAttribute("criminal_reports", person_cr);
         model.addAttribute("academic_reports", person_ar);
         model.addAttribute("employment_reports", person_er);
-        model.addAttribute("statistics", statistics_per_person);
-        model.addAttribute("diagnosis_similarities", diagnosis_similarity);
         model.addAttribute("person", person);
-        model.addAttribute("institutions",top3_institutions);
         return "person_reports";
     }
Index: src/main/java/apps/spring/reportium/web/LoginController.java
===================================================================
--- src/main/java/apps/spring/reportium/web/LoginController.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/web/LoginController.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -2,8 +2,5 @@
 
 import apps.spring.reportium.entity.ReportiumUser;
-import apps.spring.reportium.entity.enumerations.LogType;
-import apps.spring.reportium.repository.UserProfileRepository;
 import apps.spring.reportium.service.AuthenticationService;
-import apps.spring.reportium.service.UserLogService;
 import jakarta.servlet.http.HttpServletRequest;
 import org.springframework.stereotype.Controller;
@@ -17,10 +14,6 @@
 public class LoginController {
     private final AuthenticationService authService;
-    private final UserProfileRepository userProfileRepository;
-    private final UserLogService userLogService;
-    public LoginController(AuthenticationService authService, UserProfileRepository userProfileRepository, UserLogService userLogService) {
+    public LoginController(AuthenticationService authService) {
         this.authService = authService;
-        this.userProfileRepository = userProfileRepository;
-        this.userLogService = userLogService;
     }
 
@@ -33,13 +26,7 @@
         String email = request.getParameter("username");
         String password = request.getParameter("password");
-        System.out.println("email: " + email);
-        System.out.println("password: " + password);
         ReportiumUser user = null;
         try {
             user = authService.login(email, password);
-            userProfileRepository.findByReportiumUser(user).ifPresent(userProfile -> {
-                System.out.println("userProfile = " + userProfile);
-                userLogService.createLog(userProfile.getProfileId(), LogType.LOGIN);
-            });
             request.getSession().setAttribute("user", user);
             return "redirect:/home";
Index: src/main/java/apps/spring/reportium/web/LogoutController.java
===================================================================
--- src/main/java/apps/spring/reportium/web/LogoutController.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/web/LogoutController.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -1,13 +1,7 @@
 package apps.spring.reportium.web;
 
-import apps.spring.reportium.entity.enumerations.LogType;
-import apps.spring.reportium.repository.ReportiumUserRepository;
-import apps.spring.reportium.repository.UserProfileRepository;
-import apps.spring.reportium.service.UserLogService;
 import jakarta.servlet.http.HttpServletRequest;
-import jakarta.servlet.http.HttpSession;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -16,31 +10,7 @@
 @RequestMapping("/logout")
 public class LogoutController {
-    private final ReportiumUserRepository userRepository;
-    private final UserProfileRepository userProfileRepository;
-    private final UserLogService userLogService;
-
-    public LogoutController(ReportiumUserRepository userRepository, UserProfileRepository userProfileRepository, UserLogService userLogService) {
-        this.userRepository = userRepository;
-        this.userProfileRepository = userProfileRepository;
-        this.userLogService = userLogService;
-    }
-
     @GetMapping
-    public String logout(HttpServletRequest request) {
-        Authentication auth = SecurityContextHolder.getContext().getAuthentication();
-        if (auth != null && auth.isAuthenticated()
-                && !"anonymousUser".equals(auth.getPrincipal())) {
-            System.out.println(auth.getName());
-            userRepository.findByEmail(auth.getName())
-                    .flatMap(userProfileRepository::findByReportiumUser)
-                    .ifPresent(profile -> {
-                        Integer userId = profile.getReportiumUser().getUserId();
-                        userLogService.createLog(userId, LogType.LOGOUT);
-                    });
-        }
-
-        HttpSession session = request.getSession(false);
-        if (session != null) session.invalidate();
-        SecurityContextHolder.clearContext();
+    public String logout(HttpServletRequest request, Model model) {
+        request.getSession().invalidate();
         return "redirect:/login";
     }
Index: src/main/java/apps/spring/reportium/web/ProfileManagerController.java
===================================================================
--- src/main/java/apps/spring/reportium/web/ProfileManagerController.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/web/ProfileManagerController.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -2,11 +2,7 @@
 
 import apps.spring.reportium.entity.ReportiumUser;
-import apps.spring.reportium.entity.UserProfile;
-import apps.spring.reportium.entity.enumerations.LogType;
-import apps.spring.reportium.repository.UserProfileRepository;
 import apps.spring.reportium.service.AuthenticationService;
 import apps.spring.reportium.service.ReportiumUserService;
 import apps.spring.reportium.service.RoleService;
-import apps.spring.reportium.service.UserLogService;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.security.core.context.SecurityContextHolder;
@@ -27,15 +23,9 @@
     private final RoleService roleService;
     private final AuthenticationService authenticationService;
-    private final UserLogService userLogService;
-    private final UserProfileRepository userProfileRepository;
-
-    public ProfileManagerController(ReportiumUserService userService, RoleService roleService, AuthenticationService authenticationService, UserLogService userLogService, UserProfileRepository userProfileRepository) {
+    public ProfileManagerController(ReportiumUserService userService, RoleService roleService, AuthenticationService authenticationService) {
         this.userService = userService;
         this.roleService = roleService;
         this.authenticationService = authenticationService;
-        this.userLogService = userLogService;
-        this.userProfileRepository = userProfileRepository;
     }
-
     @GetMapping
     public String userManager(Model model) {
@@ -47,11 +37,8 @@
         return "user_manager";
     }
-
     @PostMapping("/update-role")
     public String updateRole(@RequestParam("userId") Integer userId,
                              @RequestParam("roleId") Integer roleId) {
         userService.updateRole(userId, roleId);
-        userLogService.createLog(userProfileRepository.findByReportiumUserUserId(userId).getProfileId(),
-                LogType.CHANGE_ROLE);
         return "redirect:/profiles";
     }
Index: c/main/java/apps/spring/reportium/web/ReportViewController.java
===================================================================
--- src/main/java/apps/spring/reportium/web/ReportViewController.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,201 +1,0 @@
-package apps.spring.reportium.web;
-
-import apps.spring.reportium.entity.dto.view_fetching_dtos.AcademicReportViewFetchingDTO;
-import apps.spring.reportium.entity.dto.view_fetching_dtos.CrimeReportViewFetchingDTO;
-import apps.spring.reportium.entity.dto.view_fetching_dtos.EmploymentReportViewFetchingDTO;
-import apps.spring.reportium.entity.dto.view_fetching_dtos.MedicalReportViewFetchingDTO;
-import apps.spring.reportium.repository.ReportViewRepository;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import jakarta.servlet.http.HttpServletResponse;
-import org.springframework.stereotype.Controller;
-import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import java.awt.*;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-import com.lowagie.text.*;
-import com.lowagie.text.pdf.PdfPCell;
-import com.lowagie.text.pdf.PdfPTable;
-import com.lowagie.text.pdf.PdfWriter;
-
-@Controller
-public class ReportViewController {
-    private final ReportViewRepository reportViewRepository;
-    private final ObjectMapper objectMapper;
-
-    public ReportViewController(ReportViewRepository reportViewRepository, ObjectMapper objectMapper) {
-        this.reportViewRepository = reportViewRepository;
-        this.objectMapper = objectMapper;
-    }
-
-    /*
-     * Ova ustvari mapira sekoj mozen red shto go ima od string, vo objekti od toj string
-     * primer
-     * Sekoj dto ima svoi atributi i tie se vo redovi staveni vo edna lista od objekti
-     * 500, ass, 2002 ... site mozni atributi
-     * Epa, ova prai ustvari sekoja vakva vrednost ja mapira vo objekt odnosno, prvata deka e povrzana so reportID - > getReportId.value i taka za site
-     * Zatoa vrakja lista od mapi, kaj sto sekoj string e mapiran vo objekt od poveke atributi, a toj
-     * */
-    public List<Map<String, Object>> convertDtosToMapsOfObjects(List<?> dto_objects) {
-        return dto_objects
-                .stream()
-                .map(dto -> objectMapper.convertValue(dto, new TypeReference<Map<String, Object>>() {}))
-                .collect(Collectors.toList());
-    }
-
-    public Function<String, String> capitalize_first_letter = str -> str.substring(0, 1).toUpperCase() + str.substring(1);
-
-    @GetMapping("/view_reports")
-    public String showSelectedReportView(@RequestParam("reportView") String reportView, Model model) {
-        switch (reportView.toUpperCase()) {
-            case "EMPLOYMENT" -> {
-                List<EmploymentReportViewFetchingDTO> reports = reportViewRepository.getEmploymentReportViews();
-                List<Map<String, Object>> data = convertDtosToMapsOfObjects(reports);
-                List<String> columns = data.isEmpty() ? List.of() : new ArrayList<>(data.getFirst()
-                        .keySet()
-                        .stream()
-                        .map(capitalize_first_letter)
-                        .collect(Collectors.toList()));
-                model.addAttribute("reportType", "Employment");
-                model.addAttribute("columns", columns);
-                model.addAttribute("data", data);
-            }
-            case "CRIMINAL" -> {
-                List<CrimeReportViewFetchingDTO> reports = reportViewRepository.getCrimeReportViews();
-                List<Map<String, Object>> data = convertDtosToMapsOfObjects(reports);
-                List<String> columns = data.isEmpty() ? List.of() : new ArrayList<>(data.getFirst()
-                        .keySet()
-                        .stream()
-                        .map(capitalize_first_letter)
-                        .collect(Collectors.toList()));
-                model.addAttribute("reportType", "Criminal");
-                model.addAttribute("columns", columns);
-                model.addAttribute("data", data);
-            }
-            case "ACADEMIC" -> {
-                List<AcademicReportViewFetchingDTO> reports = reportViewRepository.getAcademicReportViews();
-                List<Map<String, Object>> data = convertDtosToMapsOfObjects(reports);
-                List<String> columns = data.isEmpty() ? List.of() : new ArrayList<>(data.getFirst()
-                        .keySet()
-                        .stream()
-                        .map(capitalize_first_letter)
-                        .collect(Collectors.toList()));
-                model.addAttribute("reportType", "Academic");
-                model.addAttribute("columns", columns);
-                model.addAttribute("data", data);
-            }
-            case "MEDICAL" -> {
-                List<MedicalReportViewFetchingDTO> reports = reportViewRepository.getMedicalReportViews();
-                List<Map<String, Object>> data = convertDtosToMapsOfObjects(reports);
-                List<String> columns = data.isEmpty() ? List.of() : new ArrayList<>(data.getFirst()
-                        .keySet()
-                        .stream()
-                        .map(capitalize_first_letter)
-                        .collect(Collectors.toList()));
-                model.addAttribute("reportType", "Medical");
-                model.addAttribute("columns", columns);
-                model.addAttribute("data", data);
-            }
-            default -> {
-                return "redirect:/reports";
-            }
-        }
-        return "different_report_views";
-    }
-
-    private String formatCsvValue(Object value) {
-        if (value == null) return "";
-        String s = value.toString();
-        if (s.contains(",") || s.contains("\"") || s.contains("\n")) {
-            s = s.replace("\"", "\"\"");
-            return "\"" + s + "\"";
-        }
-        return s;
-    }
-
-    @GetMapping("/download_as_csv")
-    public void downloadReportAsCsv(@RequestParam("reportView") String reportView, HttpServletResponse response) throws Exception {
-        response.setContentType("text/csv");
-        response.setHeader("Content-Disposition", "attachment; filename=" + reportView.toLowerCase() + "_report.csv");
-        List<?> reports;
-        switch (reportView.toUpperCase()) {
-            case "EMPLOYMENT" -> reports = reportViewRepository.getEmploymentReportViews();
-            case "CRIMINAL" -> reports = reportViewRepository.getCrimeReportViews();
-            case "ACADEMIC" -> reports = reportViewRepository.getAcademicReportViews();
-            case "MEDICAL" -> reports = reportViewRepository.getMedicalReportViews();
-            default -> {
-                response.sendError(HttpServletResponse.SC_BAD_REQUEST, "Invalid report view type.");
-                return;
-            }
-        }
-        List<Map<String, Object>> data = convertDtosToMapsOfObjects(reports);
-        if (data.isEmpty()) {
-            response.sendError(HttpServletResponse.SC_NO_CONTENT, "No data to export.");
-            return;
-        }
-        PrintWriter writer = response.getWriter();
-        List<String> headers = new ArrayList<>(data.getFirst().keySet());
-        writer.println(String.join(",", headers));
-        for (Map<String, Object> row : data) {
-            List<String> cells = headers.stream()
-                    .map(h -> formatCsvValue(row.get(h)))
-                    .collect(Collectors.toList());
-            writer.println(String.join(",", cells));
-        }
-        writer.flush();
-        writer.close();
-    }
-
-    public List<?> getReports(String reportView) {
-        List<?> reports;
-        switch (reportView.toUpperCase()) {
-            case "EMPLOYMENT" -> reports = reportViewRepository.getEmploymentReportViews();
-            case "CRIMINAL" -> reports = reportViewRepository.getCrimeReportViews();
-            case "ACADEMIC" -> reports = reportViewRepository.getAcademicReportViews();
-            case "MEDICAL" -> reports = reportViewRepository.getMedicalReportViews();
-            default -> reports = List.of();
-        }
-        return reports;
-    }
-
-    @GetMapping("/download_as_pdf")
-    public void downloadReportAsPdf(@RequestParam("reportView") String reportView, HttpServletResponse response) throws Exception {
-        response.setContentType("application/pdf");
-        response.setHeader("Content-Disposition", "attachment; filename=" + reportView.toLowerCase() + "_report.pdf");
-        List<?> reports = getReports(reportView);
-        List<Map<String, Object>> data = convertDtosToMapsOfObjects(reports);
-        Document document = new Document(PageSize.A4.rotate()); // to be landscape
-        PdfWriter.getInstance(document, response.getOutputStream());
-        document.open();
-        document.add(new Paragraph(reportView.toUpperCase() + " Report"));
-        document.add(new Paragraph(" "));
-
-        List<String> headers = new ArrayList<>(data.getFirst().keySet());
-        PdfPTable table = new PdfPTable(headers.size());
-        table.setWidthPercentage(100);
-
-        for (String header : headers) {
-            PdfPCell cell = new PdfPCell(new Phrase(header));
-            cell.setBackgroundColor(Color.LIGHT_GRAY);
-            table.addCell(cell);
-        }
-
-        for (Map<String, Object> row : data) {
-            for (String header : headers) {
-                Object value = row.get(header);
-                table.addCell(value != null ? value.toString() : "");
-            }
-        }
-
-        document.add(table);
-        document.close();
-    }
-}
Index: src/main/java/apps/spring/reportium/web/ReportsController.java
===================================================================
--- src/main/java/apps/spring/reportium/web/ReportsController.java	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/java/apps/spring/reportium/web/ReportsController.java	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -1,21 +1,12 @@
 package apps.spring.reportium.web;
-
-import apps.spring.reportium.entity.*;
-import apps.spring.reportium.entity.enumerations.PunishmentType;
-import apps.spring.reportium.entity.enumerations.ValueUnit;
-import apps.spring.reportium.repository.CrimeTypeRepository;
-import apps.spring.reportium.repository.DiagnosisRepository;
-import apps.spring.reportium.repository.DoctorRepository;
-import apps.spring.reportium.repository.InstitutionRepository;
-import apps.spring.reportium.service.InstitutionService;
-import apps.spring.reportium.service.PersonService;
+import apps.spring.reportium.entity.Report;
 import apps.spring.reportium.service.ReportService;
 import org.springframework.data.domain.Page;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.*;
-
-import java.math.BigDecimal;
-import java.time.LocalDate;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import java.util.List;
 
@@ -24,25 +15,12 @@
 public class ReportsController {
     private final ReportService reportService;
-    private final PersonService personService;
-    private final InstitutionRepository institutionRepository;
-    private final InstitutionService institutionService;
-    private final CrimeTypeRepository crimeTypeRepository;
-    private final DoctorRepository doctorRepository;
-    private final DiagnosisRepository diagnosisRepository;
 
-    public ReportsController(ReportService reportService, PersonService personService, InstitutionRepository institutionRepository, InstitutionService institutionService, CrimeTypeRepository crimeTypeRepository, DoctorRepository doctorRepository, DiagnosisRepository diagnosisRepository) {
+    public ReportsController(ReportService reportService) {
         this.reportService = reportService;
-        this.personService = personService;
-        this.institutionRepository = institutionRepository;
-        this.institutionService = institutionService;
-        this.crimeTypeRepository = crimeTypeRepository;
-        this.doctorRepository = doctorRepository;
-        this.diagnosisRepository = diagnosisRepository;
     }
-
     @GetMapping
     public String listReports(Model model,
                               @RequestParam(defaultValue = "0") int page,
-                              @RequestParam(defaultValue = "35") int size,
+                              @RequestParam(defaultValue = "20") int size,
                               @RequestParam(defaultValue = "reportId") String sortField,
                               @RequestParam(defaultValue = "asc") String sortDir) {
@@ -56,83 +34,6 @@
         model.addAttribute("sortDir", sortDir);
         model.addAttribute("reverseSortDir", sortDir.equals("asc") ? "desc" : "asc");
+
         return "reports";
     }
-
-    @GetMapping("/add/employment")
-    public String createEmploymentReport(@RequestParam Long personId, Model model) {
-        Person person = personService.findById(personId.intValue());
-        model.addAttribute("person", person);
-        return "new_employment_report";
-    }
-
-    @PostMapping("/add/employment")
-    public String submitEmploymentData(@RequestParam Long personId,
-                                       @RequestParam LocalDate startDate,
-                                       @RequestParam(required = false) LocalDate endDate,
-                                       @RequestParam String jobRole,
-                                       @RequestParam BigDecimal income,
-                                       @RequestParam String summary) {
-        reportService.saveNewEmploymentReport(personId, startDate, endDate, jobRole, income, summary);
-        return "redirect:/" + personId;
-    }
-
-
-    @GetMapping("/add/academic")
-    public String createAcademicReport(@RequestParam Long personId, Model model) {
-        Person person = personService.findById(personId.intValue());
-        model.addAttribute("person", person);
-        model.addAttribute("institutions", institutionService.getSuitableInstitutions(person));
-        return "new_academic_report";
-    }
-
-    @PostMapping("/add/academic")
-    public String submitAcademicData(@RequestParam Long personId,
-                                     @RequestParam Long institutionId,
-                                     @RequestParam String academicField,
-                                     @RequestParam String descriptionOfReport) {
-        reportService.saveNewAcademicReport(personId, institutionId, academicField, descriptionOfReport);
-        return "redirect:/" + personId;
-    }
-
-
-    @GetMapping("/add/criminal")
-    public String createCriminalReport(@RequestParam Long personId, Model model) {
-        Person person = personService.findById(personId.intValue());
-        model.addAttribute("person", person);
-        model.addAttribute("punishmentTypes", PunishmentType.values());
-        model.addAttribute("crimeTypes", crimeTypeRepository.findAll());
-        return "new_criminal_report";
-    }
-
-    @PostMapping("/add/criminal")
-    public String submitCriminalData(@RequestParam Long personId,
-                                     @RequestParam String caseSummary,
-                                     @RequestParam String location,
-                                     @RequestParam Boolean isResolved,
-                                     @RequestParam Long crimeTypeId,
-                                     @RequestParam PunishmentType punishmentType,
-                                     @RequestParam(required = false) Double fineToPay,
-                                     @RequestParam(required = false) LocalDate releaseDate) {
-        reportService.saveNewCriminalReport(personId, caseSummary, location, isResolved, crimeTypeId, punishmentType, fineToPay, releaseDate);
-        return "redirect:/" + personId;
-    }
-
-    @GetMapping("/add/medical")
-    public String createMedicalReport(@RequestParam Long personId, Model model) {
-        Person person = personService.findById(personId.intValue());
-        model.addAttribute("person", person);
-        model.addAttribute("doctors", doctorRepository.findAll());
-        model.addAttribute("diagnoses", diagnosisRepository.findAll());
-        return "new_medical_report";
-    }
-
-    @PostMapping("/add/medical")
-    public String submitMedicalData(@RequestParam Long personId,
-                                    @RequestParam String summary,
-                                    @RequestParam Long doctorId,
-                                    @RequestParam(required = false) LocalDate nextControlDate,
-                                    @RequestParam(required = false) List<Long> diagnosisIds) {
-        reportService.saveNewMedicalReport(personId, summary, doctorId, nextControlDate, diagnosisIds);
-        return "redirect:/" + personId;
-    }
 }
Index: src/main/resources/application-prod.properties
===================================================================
--- src/main/resources/application-prod.properties	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/resources/application-prod.properties	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -1,18 +1,9 @@
-#Properties for DB on EPRMS
-spring.datasource.url=jdbc:postgresql://localhost:5433/db_202425z_va_prj_reportium
-spring.datasource.username=db_202425z_va_prj_reportium_owner
-spring.datasource.password=32a9b546fe8
+spring.datasource.url=jdbc:postgresql://localhost:5432/Reportium
+spring.datasource.username=postgres
+spring.datasource.password=postgres
 spring.datasource.driver-class-name=org.postgresql.Driver
-
-
-#Properties for local DB
-#spring.datasource.url=jdbc:postgresql://localhost:5432/Reportium
-#spring.datasource.username=postgres
-#spring.datasource.password=postgres
-#spring.datasource.driver-class-name=org.postgresql.Driver
 
 # JPA settings
 spring.jpa.hibernate.ddl-auto=validate
-#spring.jpa.show-sql=true
+spring.jpa.show-sql=true
 spring.jpa.properties.hibernate.format_sql=true
-logging.level.org.hibernate.type.descriptor.sql=TRACE
Index: src/main/resources/application.properties
===================================================================
--- src/main/resources/application.properties	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/resources/application.properties	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -3,2 +3,6 @@
 spring.profiles.active=prod
 server.servlet.session.timeout=1200s
+
+server.error.include-message=always
+server.error.include-stacktrace=always
+logging.level.org.springframework=DEBUG
Index: c/main/resources/sql_queries/advanced_queries.sql
===================================================================
--- src/main/resources/sql_queries/advanced_queries.sql	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,22 +1,0 @@
--- Finds the list of persons with the most similar diagnosis
--- This functionality is part of the person report statistics in the app, in the section with stats, in medical report stats
-with selected_person_diagnosis as(
-    select distinct d.diagnosis_id as diagnosis_id, d.short_description as label
-    from person p
-             join report r on r.person_id = p.person_id
-             join medicalreport_diagnosis mrd on mrd.report_id = r.report_id
-             join diagnosis d on mrd.diagnosis_id = d.diagnosis_id
-    where p.person_id = 14 --parameter (the most of them are person_id = 1)
-)
-select cast(p2.person_id as bigint),
-       p2.name || ' ' || p2.surname as full_name,
-       cast(count(distinct spd.diagnosis_id) as bigint) as matching_diagnoses_count,
-       string_agg(distinct spd.label, ', ') as matching_labels
-from selected_person_diagnosis spd
-         join medicalreport_diagnosis mrd2 on mrd2.diagnosis_id = spd.diagnosis_id
-         join report r2 on r2.report_id = mrd2.report_id
-         join person p2 on p2.person_id = r2.person_id
-where p2.person_id != 14 --parameter of the person
-group by p2.person_id, p2.name, p2.surname
-having count(distinct spd.diagnosis_id) >=1
-order by matching_diagnoses_count desc;
Index: c/main/resources/sql_queries/get_statistics_for_person.sql
===================================================================
--- src/main/resources/sql_queries/get_statistics_for_person.sql	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,99 +1,0 @@
-WITH
-    selected_person_reports AS (
-        SELECT * FROM report WHERE person_id = :person_id
-    ),
-
-    academic AS (
-        SELECT r.created_at, ar.academic_field, ar.report_id
-        FROM report r
-                 JOIN academicreport ar ON r.report_id = ar.report_id
-                 JOIN institution i ON i.institution_id = ar.institution_id
-        WHERE r.person_id = :person_id
-    ),
-
-    employment AS (
-        SELECT e.start_date, COALESCE(e.end_date, CURRENT_DATE) AS end_date, e.income_per_month
-        FROM employmentreport e
-                 JOIN report r ON r.report_id = e.report_id
-        WHERE r.person_id = :person_id
-    ),
-
-    medical AS (
-        SELECT d.short_description, d.is_chronic
-        FROM report r
-                 JOIN medicalreport mr ON r.report_id = mr.report_id
-                 JOIN medicalreport_diagnosis mrd ON mrd.report_id = mr.report_id
-                 JOIN diagnosis d ON d.diagnosis_id = mrd.diagnosis_id
-        WHERE r.person_id = :person_id
-    ),
-
-    criminal AS (
-        SELECT cr.descriptive_punishment, cr.resolved as is_resolved
-        FROM report r
-                 JOIN criminalreport cr ON r.report_id = cr.report_id
-                 JOIN crimetype ct ON ct.crime_type_id = cr.crime_type_id
-        WHERE r.person_id = :person_id
-    ),
-
-    ordered_academic_reports_by_date AS (
-        SELECT
-            ar.academic_field,
-            r.created_at,
-            ROW_NUMBER() OVER (PARTITION BY ar.academic_field ORDER BY r.created_at) AS row_num
-        FROM report r
-                 JOIN academicreport ar ON ar.report_id = r.report_id
-        WHERE r.person_id = :person_id
-    ),
-
-    filtered_academic_pathway AS (
-        SELECT academic_field, MIN(created_at) AS started_on
-        FROM ordered_academic_reports_by_date
-        GROUP BY academic_field
-    ),
-
-    employment_report_stats AS (
-        SELECT
-            CAST(SUM(ABS(COALESCE(e.end_date, CURRENT_DATE) - e.start_date)) AS BIGINT) AS total_working_in_days,
-            CAST(CEIL(SUM(ABS(COALESCE(e.end_date, CURRENT_DATE) - e.start_date)) / 30.0) AS BIGINT) AS total_working_in_months,
-            CAST(CEIL(SUM(ABS(COALESCE(e.end_date, CURRENT_DATE) - e.start_date)) / 365.0) AS BIGINT) AS total_working_in_years,
-            CAST(MAX(COALESCE(e.end_date, CURRENT_DATE) - e.start_date) AS BIGINT) AS longest_job_days
-        FROM employmentreport e
-                 JOIN report r ON r.report_id = e.report_id
-        WHERE r.person_id = :person_id
-    )
-SELECT
-    -- General
-    CAST((SELECT COUNT(*) FROM selected_person_reports) AS BIGINT) AS total_reports_found,
-    CAST((SELECT created_at::date FROM selected_person_reports ORDER BY created_at ASC LIMIT 1) AS DATE) AS first_report_of_person,
-    CAST((SELECT created_at::date FROM selected_person_reports ORDER BY created_at DESC LIMIT 1) AS DATE) AS latest_report_of_person,
-    -- Academic
-    CAST((SELECT COUNT(*) FROM academic) AS BIGINT) AS academic_total,
-    CAST((SELECT academic_field
-          FROM academic
-          GROUP BY academic_field
-          ORDER BY COUNT(*) DESC
-        LIMIT 1) AS TEXT) AS most_common_field,
-    CAST((SELECT STRING_AGG(academic_field, ' → ' ORDER BY started_on)
-          FROM filtered_academic_pathway) AS TEXT) AS education_path,
-    -- Employment
-    CAST((SELECT COUNT(*) FROM employment) AS BIGINT) AS job_count,
-    (SELECT total_working_in_days FROM employment_report_stats),
-    (SELECT total_working_in_months FROM employment_report_stats),
-    (SELECT total_working_in_years FROM employment_report_stats),
-    (SELECT longest_job_days FROM employment_report_stats),
-    CAST((SELECT MAX(income_per_month) FROM employment) AS DOUBLE PRECISION) AS max_income_from_job,
-    -- Medical
-    CAST((SELECT COUNT(*) FROM medical) AS BIGINT) AS diagnosis_total,
-    CAST((SELECT ROUND(SUM(CASE WHEN is_chronic THEN 1 ELSE 0 END)::decimal / COUNT(*), 2)
-          FROM medical) AS DOUBLE PRECISION) AS chronic_ratio,
-    CAST((SELECT short_description
-          FROM medical
-          GROUP BY short_description
-          ORDER BY COUNT(*) DESC
-        LIMIT 1) AS TEXT) AS most_frequent_diagnosis,
-    -- Criminal
-    CAST((SELECT COUNT(*) FROM criminal) AS BIGINT) AS criminal_case_total,
-    CAST((SELECT ROUND(SUM(CASE WHEN is_resolved THEN 1 ELSE 0 END)::decimal / COUNT(*), 2)
-          FROM criminal) AS DOUBLE PRECISION) AS resolution_ratio;
-
---this is a complicated query with a chain of CTE used, so I can fetch some statistics from the reports for a person provided
Index: c/main/resources/sql_queries/procedure_new_academic_report.sql
===================================================================
--- src/main/resources/sql_queries/procedure_new_academic_report.sql	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,31 +1,0 @@
-CREATE OR REPLACE PROCEDURE insert_academic_report(
-    IN param_person_id INT,
-    IN param_institution_id INT,
-    IN param_academic_field TEXT,
-    IN param_description_of_report TEXT
-)
-    LANGUAGE plpgsql
-as
-$$
-DECLARE
-    new_report_id INT;
-BEGIN
-    IF NOT EXISTS (SELECT 1
-                   FROM person
-                   WHERE person_id = param_person_id) THEN
-        RAISE EXCEPTION 'Person with ID % does not exist', param_person_id;
-    END IF;
-    IF NOT EXISTS (SELECT 1
-                   FROM institution
-                   WHERE institution_id = param_institution_id) THEN
-        RAISE EXCEPTION 'Institution with ID % does not exist', param_institution_id;
-    END IF;
-
-    INSERT INTO report (report_type, summary, created_at, person_id)
-    VALUES ('Academic', param_description_of_report, CURRENT_TIMESTAMP, param_person_id)
-    RETURNING report_id INTO new_report_id;
-
-    INSERT INTO academicreport (report_id, institution_id, academic_field, description_of_report)
-    VALUES (new_report_id, param_institution_id, param_academic_field, param_description_of_report);
-END;
-$$;
Index: c/main/resources/sql_queries/procedure_new_criminal_report.sql
===================================================================
--- src/main/resources/sql_queries/procedure_new_criminal_report.sql	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,53 +1,0 @@
-CREATE OR REPLACE PROCEDURE insert_criminal_report(
-    IN param_person_id INT,
-    IN param_case_summary TEXT,
-    IN param_location TEXT,
-    IN param_is_resolved BOOLEAN,
-    IN param_crime_type_id INT,
-    IN param_punishment_type TEXT,
-    IN param_fine_to_pay NUMERIC,
-    IN param_release_date DATE
-)
-    LANGUAGE plpgsql
-AS
-$$
-DECLARE
-    new_report_id     INT;
-    new_punishment_id INT;
-BEGIN
-    IF NOT EXISTS (SELECT 1
-                   FROM person
-                   WHERE person_id = param_person_id) THEN
-        RAISE EXCEPTION 'Person with ID % does not exist', param_person_id;
-    END IF;
-
-    IF NOT EXISTS (SELECT 1
-                   FROM crimetype
-                   WHERE crime_type_id = param_crime_type_id) THEN
-        RAISE EXCEPTION 'CrimeType with ID % does not exist', param_crime_type_id;
-    END IF;
-
-    --insert report
-    INSERT INTO report (report_type, summary, created_at, person_id)
-    VALUES ('Criminal', param_case_summary, CURRENT_TIMESTAMP, param_person_id)
-    RETURNING report_id INTO new_report_id;
-
-    -- insert into criminalreport
-    INSERT INTO criminalreport (report_id, location, resolved, crime_type_id)
-    VALUES (new_report_id, param_location, param_is_resolved, param_crime_type_id);
-
-    --insertin punishment obj
-    IF param_punishment_type = 'PRISON' AND param_release_date IS NOT NULL THEN
-        INSERT INTO punishment (report_id, value_unit, punishment_type, fine_to_pay, release_date)
-        VALUES (new_report_id, 'years', LOWER(param_punishment_type), NULL, param_release_date)
-        RETURNING punishment_id INTO new_punishment_id;
-    END IF;
-
-    IF param_punishment_type = 'FINE' AND param_fine_to_pay IS NOT NULL THEN
-        INSERT INTO punishment (report_id, value_unit, punishment_type, fine_to_pay, release_date)
-        VALUES (new_report_id, 'euros', LOWER(param_punishment_type), param_fine_to_pay, NULL)
-        RETURNING punishment_id INTO new_punishment_id;
-    END IF;
-
-END;
-$$;
Index: c/main/resources/sql_queries/procedure_new_empl_report.sql
===================================================================
--- src/main/resources/sql_queries/procedure_new_empl_report.sql	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,42 +1,0 @@
-CREATE OR REPLACE PROCEDURE insert_employment_report(
-    IN param_person_id INT,
-    IN param_start_date DATE,
-    IN param_end_date DATE,
-    IN param_job_role TEXT,
-    IN param_income NUMERIC,
-    IN param_summary TEXT
-)
-    LANGUAGE plpgsql
-AS
-$$
-DECLARE
-    new_report_id INT;
-BEGIN
-    --check if the person exists in the database
-    IF NOT EXISTS (SELECT 1
-                   FROM person
-                   WHERE person_id = param_person_id) THEN
-        RAISE EXCEPTION 'Person with ID % does not exist', param_person_id;
-    END IF;
-    --check if end date is before start date
-    IF param_end_date is not null and param_end_date < param_start_date then
-        raise exception 'End date can not be before starting date';
-    end if;
-    --checks if the income is positive value
-    IF param_income is not null and param_income <= 0 then
-        raise exception 'Income must be greater than 0';
-    end if;
-    -- Insert into report (superclass)
-    INSERT INTO report (report_type, summary, created_at, person_id)
-    VALUES ('Employment', param_summary, CURRENT_TIMESTAMP, param_person_id)
-    RETURNING report_id INTO new_report_id;
-
-    -- Insert into employment_report (subclass)
-    INSERT INTO employmentreport (report_id, start_date, end_date, job_role, income_per_month)
-    VALUES (new_report_id,
-            param_start_date,
-            param_end_date,
-            param_job_role,
-            param_income);
-END;
-$$;
Index: c/main/resources/sql_queries/procedure_new_medical_report.sql
===================================================================
--- src/main/resources/sql_queries/procedure_new_medical_report.sql	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,48 +1,0 @@
-CREATE OR REPLACE PROCEDURE insert_medical_report(
-    IN param_person_id INT,
-    IN param_summary TEXT,
-    IN param_doctor_id INT,
-    IN param_next_control_date DATE,
-    IN param_diagnosis_ids INT[]
-)
-    LANGUAGE plpgsql
-AS
-$$
-DECLARE
-    new_report_id         INT;
-    variable_diagnosis_id INT;
-BEGIN
-    --check if person exists
-    IF NOT EXISTS (SELECT 1
-                   FROM person
-                   WHERE person_id = param_person_id) THEN
-        RAISE EXCEPTION 'Person with ID % does not exist', param_person_id;
-    END IF;
-    --check if doctor exists
-    IF NOT EXISTS (SELECT 1 FROM doctor WHERE doctor_id = param_doctor_id) THEN
-        RAISE EXCEPTION 'Doctor with ID % does not exist', param_doctor_id;
-    END IF;
-
-    --make the generic report first
-    INSERT INTO report (report_type, summary, created_at, person_id)
-    VALUES ('Medical', param_summary, CURRENT_TIMESTAMP, param_person_id)
-    RETURNING report_id INTO new_report_id;
-
-    --create the medical report
-    INSERT INTO medicalreport (report_id, doctor_id, next_control_date)
-    VALUES (new_report_id, param_doctor_id, param_next_control_date);
-
-    --add in the m to n relation now medical-report <-> diagnosis
-    IF param_diagnosis_ids IS NOT NULL THEN
-        FOREACH variable_diagnosis_id IN ARRAY param_diagnosis_ids
-            LOOP
-                IF NOT EXISTS (SELECT 1 FROM diagnosis WHERE variable_diagnosis_id = variable_diagnosis_id) THEN
-                    RAISE EXCEPTION 'Diagnosis ID % does not exist', variable_diagnosis_id;
-                END IF;
-                INSERT INTO medicalreport_diagnosis (report_id, diagnosis_id, added_on)
-                VALUES (new_report_id, variable_diagnosis_id, CURRENT_TIMESTAMP);
-            END LOOP;
-    END IF;
-
-END;
-$$;
Index: c/main/resources/templates/create_diagnosis.html
===================================================================
--- src/main/resources/templates/create_diagnosis.html	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,190 +1,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <title>Create Diagnosis</title>
-    <style>
-        * {
-            margin: 0;
-            padding: 0;
-            box-sizing: border-box;
-        }
-
-        body {
-            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
-            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-            min-height: 100vh;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            padding: 20px;
-        }
-
-        .form-container {
-            background: white;
-            padding: 40px;
-            border-radius: 15px;
-            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
-            max-width: 600px;
-            width: 100%;
-        }
-
-        h2 {
-            color: #333;
-            text-align: center;
-            margin-bottom: 30px;
-            font-size: 28px;
-            font-weight: 600;
-        }
-
-        .form-group {
-            margin-bottom: 25px;
-        }
-
-        .form-label {
-            display: block;
-            margin-bottom: 8px;
-            color: #555;
-            font-weight: 500;
-            font-size: 14px;
-        }
-
-        .form-control {
-            width: 100%;
-            padding: 12px 16px;
-            border: 2px solid #e1e5e9;
-            border-radius: 8px;
-            font-size: 14px;
-            font-family: inherit;
-            transition: border-color 0.3s ease, box-shadow 0.3s ease;
-            background-color: #fafbfc;
-        }
-
-        .form-control:focus {
-            outline: none;
-            border-color: #667eea;
-            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
-            background-color: white;
-        }
-
-        textarea.form-control {
-            resize: vertical;
-            min-height: 100px;
-        }
-
-        select.form-control {
-            cursor: pointer;
-        }
-
-        .buttons {
-            display: flex;
-            gap: 15px;
-            justify-content: center;
-            margin-top: 35px;
-        }
-
-        button {
-            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-            color: white;
-            border: none;
-            padding: 14px 30px;
-            border-radius: 8px;
-            font-size: 16px;
-            font-weight: 600;
-            cursor: pointer;
-            transition: transform 0.2s ease, box-shadow 0.2s ease;
-            min-width: 120px;
-        }
-
-        button:hover {
-            transform: translateY(-2px);
-            box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
-        }
-
-        button:active {
-            transform: translateY(0);
-        }
-
-        /* Responsive design */
-        @media (max-width: 768px) {
-            .form-container {
-                padding: 30px 20px;
-                margin: 10px;
-            }
-
-            h2 {
-                font-size: 24px;
-            }
-
-            .buttons {
-                flex-direction: column;
-                align-items: center;
-            }
-
-            button {
-                width: 100%;
-                max-width: 200px;
-            }
-        }
-
-        select.form-control {
-            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
-            background-position: right 12px center;
-            background-repeat: no-repeat;
-            background-size: 16px;
-            padding-right: 40px;
-            appearance: none;
-        }
-
-        /* Required field indicator */
-        .form-label::after {
-            content: " *";
-            color: #dc3545;
-        }
-    </style>
-</head>
-<body>
-<div class="form-container">
-    <h2>Create New Diagnosis</h2>
-    <form th:action="@{/diagnosis}" method="post">
-        <!--  Diagnosis Creation invoked while creating a medical report for the person with the following id -->
-        <input type="hidden" name="personId" th:value="${personId}"/>
-        <!--  Description-->
-        <div class="form-group">
-            <label for="description" class="form-label">Describe the Diagnosis</label>
-            <textarea id="description" name="description" class="form-control" rows="4" required
-                      maxlength="800" placeholder="Enter detailed description of the diagnosis..."></textarea>
-        </div>
-        <!--  Therapy-->
-        <div class="form-group">
-            <label for="therapy" class="form-label">Describe the Therapy for the Diagnosis</label>
-            <textarea id="therapy" name="therapy" class="form-control" rows="2" required
-                      maxlength="200" placeholder="Enter therapy recommendations..."></textarea>
-        </div>
-        <!--  Is Chronic-->
-        <div class="form-group">
-            <label for="isChronic" class="form-label">Is Diagnosis Chronic</label>
-            <select id="isChronic" name="isChronic" class="form-control" required>
-                <option value="">Select status</option>
-                <option value="true">Yes</option>
-                <option value="false">No</option>
-            </select>
-        </div>
-        <!--  Severity Level-->
-        <div class="form-group">
-            <label for="severityLevel" class="form-label">Severity Level</label>
-            <select id="severityLevel" name="severityLevel" class="form-control" required>
-                <option value="">Select severity of diagnosis</option>
-                <option th:each="severity : ${severityLevels}"
-                        th:value="${severity.name()}"
-                        th:text="${severity.name()}">
-                </option>
-            </select>
-        </div>
-        <div class="buttons">
-            <button type="submit">Create Diagnosis</button>
-        </div>
-    </form>
-</div>
-</body>
-</html>
Index: c/main/resources/templates/different_report_views.html
===================================================================
--- src/main/resources/templates/different_report_views.html	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,113 +1,0 @@
-<!DOCTYPE html>
-<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml">
-<head>
-    <meta charset="UTF-8">
-    <title th:text="${reportType} + ' Report Data Preview'">Report View</title>
-    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet"
-          integrity="sha384-LN+7fdVzj6u52u30Kp6M/trliBMCMKTyK833zpbD+pXdCLuTusPj697FH4R/5mcr" crossorigin="anonymous">
-    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js"
-            integrity="sha384-ndDqU0Gzau9qJ1lfW4pNLlhNTkCfHzAVBReH9diLvGRem5+R9g2FzA8ZGN954O5Q"
-            crossorigin="anonymous"></script>
-    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
-    <style>
-        body {
-            background: linear-gradient(to right, #020b49, #001e61, #00297e);
-            min-height: 100vh;
-            font-family: 'Segoe UI', sans-serif;
-            padding-top: 40px;
-        }
-
-        .container {
-            background-color: #fff;
-            border-radius: 12px;
-            padding: 30px;
-            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
-        }
-
-        h2 {
-            color: #00297e;
-            font-weight: bold;
-        }
-
-        .table thead {
-            background-color: #003366;
-            color: white;
-        }
-
-        .btn-back {
-            background-color: #6c757d;
-            color: white;
-        }
-    </style>
-</head>
-<body>
-
-<div class="container">
-    <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
-        <div class="container-fluid">
-            <a class="navbar-brand fw-bold px-3 py-2 rounded-2 text-white"
-               th:href="@{/}"
-               style="background: linear-gradient(to right, #003366, #004080);
-          border-left: 5px solid #FFD700;
-          font-size: 1.5rem;
-          box-shadow: 0 0 5px rgba(0,0,0,0.2);
-          letter-spacing: 1px;">
-                <span style="color: #FFD700;">R</span>eportium
-            </a>
-
-            <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
-                    data-bs-target="#navbarContent" aria-controls="navbarContent"
-                    aria-expanded="false" aria-label="Toggle navigation">
-                <span class="navbar-toggler-icon"></span>
-            </button>
-            <div class="collapse navbar-collapse justify-content-end" id="navbarContent">
-                <ul class="navbar-nav mb-2 mb-lg-0">
-                    <li class="nav-item">
-                        <a class="nav-link" th:href="@{/reports}">All Reports</a>
-                    </li>
-                    <li class="nav-item" sec:authorize="hasRole('ROLE_ADMIN')">
-                        <a class="nav-link text-info" th:href="@{/profiles}">Users</a>
-                    </li>
-                    <li class="nav-item">
-                        <a class="nav-link text-danger" th:href="@{/logout}">Logout</a>
-                    </li>
-                </ul>
-            </div>
-        </div>
-    </nav>
-    <h2 class="text-center mb-4" th:text="${reportType} + ' Report Details'">Report Details</h2>
-    <div th:if="${data != null and !data.isEmpty()}">
-        <div class="table-responsive">
-            <table class="table table-bordered table-hover table-striped">
-                <thead>
-                <tr>
-                    <th th:each="col : ${columns}" th:text="${col}">Column</th>
-                </tr>
-                </thead>
-                <tbody>
-                <tr th:each="row : ${data}">
-                    <td th:each="cell : ${row.values()}" th:text="${cell}">Value</td>
-                </tr>
-                </tbody>
-            </table>
-        </div>
-    </div>
-    <div th:if="${data == null or data.isEmpty()}" class="alert alert-info text-center">
-        No reports found for this category.
-    </div>
-    <div class="text-center mt-4">
-        <a th:href="@{/reports}" class="btn btn-outline-secondary">Back to All Reports</a>
-    </div>
-    <div class="d-flex justify-content-between gap-5 w-100 mt-4">
-        <a th:href="@{'/download_as_csv?reportView=' + ${reportType}}" class="btn btn-success mb-3">
-            <i class="bi bi-file-earmark-spreadsheet-fill me-2"></i> Export as CSV
-        </a>
-        <a th:href="@{'/download_as_pdf?reportView=' + ${reportType}}" class="btn btn-danger mb-3">
-            <i class="bi bi-file-earmark-pdf-fill me-2"></i> Export as PDF
-        </a>
-    </div>
-
-</div>
-
-</body>
-</html>
Index: c/main/resources/templates/filter_panel.html
===================================================================
--- src/main/resources/templates/filter_panel.html	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,409 +1,0 @@
-<!DOCTYPE html>
-<html lang="en" xmlns:sec="http://www.w3.org/1999/xhtml">
-<head>
-    <meta charset="UTF-8">
-    <title>Person Filter Panel</title>
-    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
-    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/js/bootstrap.bundle.min.js"></script>
-</head>
-<body style="background: linear-gradient(to bottom, #002195, #b39f24); min-height: 100vh;">
-<div class="container my-4 p-4 rounded shadow h-100" style="background-color: #f4f4f4">
-    <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
-        <div class="container-fluid">
-            <a class="navbar-brand fw-bold px-3 py-2 rounded-2 text-white"
-               th:href="@{/}"
-               style="background: linear-gradient(to right, #003366, #004080);
-          border-left: 5px solid #FFD700;
-          font-size: 1.5rem;
-          box-shadow: 0 0 5px rgba(0,0,0,0.2);
-          letter-spacing: 1px;">
-                <span style="color: #FFD700;">R</span>eportium
-            </a>
-
-            <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
-                    data-bs-target="#navbarContent" aria-controls="navbarContent"
-                    aria-expanded="false" aria-label="Toggle navigation">
-                <span class="navbar-toggler-icon"></span>
-            </button>
-            <div class="collapse navbar-collapse justify-content-end" id="navbarContent">
-                <ul class="navbar-nav mb-2 mb-lg-0">
-                    <li class="nav-item">
-                        <a class="nav-link" th:href="@{/reports}">All Reports</a>
-                    </li>
-                    <li class="nav-item" sec:authorize="hasRole('ROLE_ADMIN')">
-                        <a class="nav-link text-info" th:href="@{/profiles}">Users</a>
-                    </li>
-                    <li class="nav-item">
-                        <a class="nav-link text-danger" th:href="@{/logout}">Logout</a>
-                    </li>
-                </ul>
-            </div>
-        </div>
-    </nav>
-
-    <form class="mt-5" th:action="@{/advanced_filter_pt2}" method="get" th:object="${filter}">
-        <div class="mb-4">
-            <label for="filter_selected">Select a filter type:</label>
-            <select class="form-select" id="filter_selected" name="filter_selected" onchange="this.form.submit()">
-                <option th:each="fil : ${filter_types}"
-                        th:value="${fil}"
-                        th:text="${fil}"
-                        th:selected="${fil == filter.filter_selected}">
-                </option>
-            </select>
-        </div>
-    </form>
-    <form th:action="@{/advanced_filter_pt2}" th:method="post" th:object="${filter}">
-        <div id="person_filter" class="mb-4"
-             th:if="${choice == T(apps.spring.reportium.entity.enumerations.SelectedFilterSection).PERSON}">
-            <h3 class="text-center px-4 py-3 bg-dark text-white fw-bolder rounded">Advanced Filtering Page</h3>
-            <hr class="my-4 border-dark">
-            <h4 class="fw-bold mb-3">Person</h4>
-            <!-- Full Name -->
-            <div class="row d-flex justify-content-between">
-                <div class="col-6 mb-4">
-                    <label for="person_name_string" class="form-label fw-bold">Name</label>
-                    <input id="person_name_string" type="text" name="person_name_string"
-                           class="form-control"
-                           th:field="*{person_name_string}" placeholder="Enter name">
-                </div>
-                <div class="col-6 mb-4">
-                    <label for="person_surname_string" class="form-label fw-bold">Surname</label>
-                    <input id="person_surname_string" type="text" name="person_surname_string"
-                           class="form-control"
-                           th:field="*{person_surname_string}" placeholder="Enter surname">
-                </div>
-            </div>
-
-            <!-- Age Part -->
-            <div class="row mb-4 d-flex justify-content-center">
-                <!-- Age Range -->
-                <div class="col-9">
-                    <label class="form-label fw-bold">Age Range</label>
-                    <div class="row">
-                        <div class="col-md-6">
-                            <label for="age_start" class="form-label">Start Age</label>
-                            <input type="range" class="form-range" min="0" max="120" value="0" name="age_start"
-                                   th:field="*{age_start}" id="age_start"
-                                   oninput="updateAgeRange()">
-                        </div>
-                        <div class="col-md-6">
-                            <label for="age_end" class="form-label d-flex justify-content-end">End Age</label>
-                            <input type="range" class="form-range" min="0" max="120" value="120" id="age_end"
-                                   name="age_end"
-                                   th:field="*{age_end}" oninput="updateAgeRange()">
-                        </div>
-                    </div>
-                </div>
-                <!-- Correct Age -->
-                <div class="col-3 d-flex flex-column justify-content-center align-items-center">
-                    <label for="correct_age" class="form-label fw-bold text-center">Correct Age</label>
-                    <input type="number" id="correct_age" class="form-control text-center" name="correct_age"
-                           style="width: 80px;" min="0"
-                           max="120" value="0"
-                           th:field="*{correct_age}" oninput="updateAgeRange()">
-                </div>
-            </div>
-            <div class="alert alert-info py-2 text-center mt-2 w-25 m-auto" role="alert" id="age_label">
-                <strong><span id="ageRangeDisplay">0 - 120</span></strong>
-            </div>
-            <!-- Gender -->
-            <div class="mb-4">
-                <label class="form-label fw-bold">Gender</label>
-                <div class="form-check">
-                    <input class="form-check-input" type="radio" th:field="*{gender}" checked id="none" value="">
-                    <label class="form-check-label" for="none">Any</label>
-                </div>
-                <div class="form-check">
-                    <input class="form-check-input" type="radio" th:field="*{gender}" id="male" value="MALE">
-                    <label class="form-check-label" for="male">Male</label>
-                </div>
-                <div class="form-check">
-                    <input class="form-check-input" type="radio" th:field="*{gender}" id="female" value="FEMALE">
-                    <label class="form-check-label" for="female">Female</label>
-                </div>
-            </div>
-            <!-- Address -->
-            <div class="mb-4">
-                <label for="address_string" class="form-label fw-bold">Address</label>
-                <input type="text" id="address_string" name="address_string" class="form-control"
-                       th:field="*{address_string}" placeholder="Enter address">
-            </div>
-            <!-- Is Alive -->
-            <div class="mb-4 form-check">
-                <input class="form-check-input"
-                       type="checkbox"
-                       th:field="*{is_alive}"
-                       id="is_alive" onchange="disableAgeFilters()">
-                <label class="form-check-label fw-bold" for="is_alive">
-                    Is Alive
-                </label>
-            </div>
-        </div>
-
-        <div class="mb-4" id="academic_filter"
-             th:if="${choice == T(apps.spring.reportium.entity.enumerations.SelectedFilterSection).ACADEMIC}">
-            <hr class="my-4">
-            <div class="row d-flex">
-                <!-- Academic Report -->
-                <div class="col-6 border-end border-secondary-subtle">
-                    <h4 class="fw-bold mb-3">Academic Report</h4>
-                    <div class="mb-4">
-                        <label for="academic_field" class="form-label fw-bold">Field of Study</label>
-                        <input type="text" id="academic_field" class="form-control"
-                               placeholder="e.g. Computer Science, Biology..." th:field="*{academic_field}">
-                    </div>
-                    <div class="mb-4">
-                        <label for="institution_type">Institution type</label>
-                        <select class="form-select" id="institution_type" name="institution_type"
-                                th:field="*{institution_type}">
-                            <option value="" th:text="'Choose'"></option>
-                            <option th:each="inst : ${institutions}"
-                                    th:value="${inst}"
-                                    th:text="${inst}"></option>
-                        </select>
-                    </div>
-                </div>
-            </div>
-        </div>
-        <div class="mb-4" id="employment_filter"
-             th:if="${choice == T(apps.spring.reportium.entity.enumerations.SelectedFilterSection).EMPLOYMENT}">
-            <!-- Employment Report -->
-            <div class="col-6">
-                <h4 class="fw-bold mb-3">Employment Report</h4>
-                <div class="row mb-4 align-items-end">
-                    <div class="col-md-4">
-                        <label for="income_comparison">Income Comparison</label>
-                        <select class="form-select" id="income_comparison" name="income_comparison"
-                                th:field="*{income_comparison}">
-                            <option value="" th:text="'Choose'"></option>
-                            <option th:each="comp : ${comparisons}"
-                                    th:value="${comp}"
-                                    th:text="${comp}"></option>
-                        </select>
-
-                    </div>
-                    <div class="col-md-4">
-                        <label for="income_amount" class="form-label fw-bold">Income</label>
-                        <input type="number" step="0.01" class="form-control" name="income_amount"
-                               id="income_amount"
-                               min="0" th:field="*{income_amount}">
-                    </div>
-                    <div class="col-md-4">
-                        <span class="form-control-plaintext">euros</span>
-                    </div>
-                </div>
-                <div class="row mb-4 align-items-end">
-                    <div class="col-md-4">
-                        <label for="years_experience_comparison">Experience Comparison</label>
-                        <select class="form-select" id="years_experience_comparison"
-                                name="years_experience_comparison"
-                                th:field="*{years_experience_comparison}">
-                            <option value="" th:text="'Choose'"></option>
-                            <option th:each="comp : ${comparisons}"
-                                    th:value="${comp}"
-                                    th:text="${comp}"></option>
-                        </select>
-                    </div>
-                    <div class="col-md-4">
-                        <label for="years_experience" class="form-label fw-bold">Experience</label>
-                        <input type="number" class="form-control" name="years_experience" id="years_experience"
-                               min="0" th:field="*{years_experience}">
-                    </div>
-                    <div class="col-md-4">
-                        <span class="form-control-plaintext">years</span>
-                    </div>
-                </div>
-            </div>
-        </div>
-        <div class="mb-4" id="criminal_filter"
-             th:if="${choice == T(apps.spring.reportium.entity.enumerations.SelectedFilterSection).CRIMINAL}">
-            <!-- Criminal Report -->
-            <hr class="my-4">
-            <h4 class="fw-bold mb-3">Criminal Report</h4>
-
-            <div class="row mb-4 d-flex">
-                <div class="col-4 border-end border-secondary-subtle">
-                    <div class="col">
-                        <label for="crime_severity_level">Severity of Crime</label>
-                        <select class="form-select" id="crime_severity_level" name="crime_severity_level"
-                                th:field="*{crime_severity_level}">
-                            <option value="" th:text="'Choose'"></option>
-                            <option th:each="sev : ${severities}"
-                                    th:value="${sev}"
-                                    th:text="${sev}"></option>
-                        </select>
-                    </div>
-                    <!-- Is Resolved -->
-                    <div class="col- ms-3 mt-3 mb-4 form-check">
-                        <input class="form-check-input" type="checkbox" name="is_resolved" id="is_resolved"
-                               th:field="*{is_resolved}">
-                        <label class="form-check-label fw-bold" for="is_resolved">Is Resolved</label>
-                    </div>
-                </div>
-                <div class="col-4 d-flex justify-content-center border-end border-secondary-subtle">
-                    <!-- Punishment Type Radios -->
-                    <div class="col-6 mb-3">
-                        <label class="form-label fw-bold">Punishment Type</label>
-                        <!-- Fine Punishment -->
-                        <div class="form-check">
-                            <input class="form-check-input" type="radio" th:field="*{punishment_type}"
-                                   id="punishmentFineRadio"
-                                   value="FINE" onclick="togglePunishment()">
-                            <label class="form-check-label" for="punishmentFineRadio">Fine (euros)</label>
-                        </div>
-                        <!-- Years Punishment -->
-                        <div class="form-check">
-                            <input class="form-check-input" type="radio" th:field="*{punishment_type}"
-                                   id="punishmentYearsRadio"
-                                   value="PRISON" onclick="togglePunishment()">
-                            <label class="form-check-label" for="punishmentYearsRadio">Prison (years)</label>
-                        </div>
-                    </div>
-
-                    <!-- Fine input -->
-                    <div class="col-md-6" id="fineInput">
-                        <label for="punishment_fine" class="form-label fw-bold">Punishment Fine (euros)</label>
-                        <input type="number" id="punishment_fine" th:field="*{punishment_fine}" class="form-control"
-                               min="0" step="0.01">
-                    </div>
-
-                    <!-- Years input -->
-                    <div class="col-md-6 d-none" id="yearsInput">
-                        <label for="punishment_years" class="form-label fw-bold">Punishment Duration (years)</label>
-                        <input type="number" id="punishment_years" th:field="*{punishment_years}" class="form-control"
-                               min="0">
-                    </div>
-                </div>
-                <div class="col-4">
-                    <!-- Criminal Type -->
-                    <div class="mb-4">
-                        <label for="crime_type_label" class="form-label fw-bold">Criminal Type</label>
-                        <input type="text" id="crime_type_label" name="crime_type_label"
-                               th:field="*{crime_type_label}" class="form-control"
-                               placeholder="e.g. theft, fraud, fight, etc.">
-                    </div>
-                </div>
-            </div>
-        </div>
-        <div class="mb-4" id="medical_filter"
-             th:if="${choice == T(apps.spring.reportium.entity.enumerations.SelectedFilterSection).MEDICAL}">
-            <hr class="my-4">
-            <h4 class="fw-bold mb-3">Medical Report</h4>
-            <!-- Doctor Name + Surname -->
-            <div class="row mb-4">
-                <div class="col-6 d-flex justify-content-around">
-                    <div class="col-5">
-                        <label for="doctor_name_string" class="form-label fw-bold">Doctor Name</label>
-                        <input type="text" id="doctor_name_string" name="doctor_name_string" class="form-control"
-                               th:field="*{doctor_name_string}" placeholder="e.g. John">
-                    </div>
-                    <div class="col-5">
-                        <label for="doctor_surname_string" class="form-label fw-bold">Doctor Surname</label>
-                        <input type="text" id="doctor_surname_string" name="doctor_surname_string" class="form-control"
-                               th:field="*{doctor_surname_string}" placeholder="e.g. Smith">
-                    </div>
-                </div>
-                <div class="col-3">
-                    <label for="specialization">Doctor Specialization</label>
-                    <select class="form-select" id="specialization" name="specialization"
-                            th:field="*{specialization}">
-                        <option value="" th:text="'Choose'"></option>
-                        <option th:each="specs : ${specializations}"
-                                th:value="${specs}"
-                                th:text="${specs}"></option>
-                    </select>
-                </div>
-                <!-- Chronic Illness + Next Medical Control -->
-                <div class="col-md-3 d-flex flex-column gap-3">
-                    <div>
-                        <input class="form-check-input" type="checkbox" name="is_chronic"
-                               id="is_chronic" th:field="*{is_chronic}">
-                        <label class="form-check-label fw-bold me-2" for="is_chronic">Is Chronic Illness</label>
-                    </div>
-                    <div>
-                        <input class="form-check-input" type="checkbox" checked name="has_next_control"
-                               id="has_next_control" th:field="*{has_next_control}">
-                        <label class="form-check-label fw-bold" for="has_next_control">
-                            Has Next Medical Control Scheduled
-                        </label>
-                    </div>
-                </div>
-            </div>
-        </div>
-        <div class="mb-4 d-flex justify-content-center">
-            <button type="submit" class="btn btn-outline-primary fw-bolder text-center w-50">Search</button>
-        </div>
-    </form>
-    <div class="d-flex justify-content-center">
-        <a th:href="@{/reports}" class="btn btn-outline-danger w-25 text-center fw-bolder">Cancel Filtering</a>
-    </div>
-
-
-</div>
-
-<script>
-
-    function updateAgeRange() {
-        let start = parseInt(document.getElementById("age_start").value);
-        let end = parseInt(document.getElementById("age_end").value);
-        let correct = parseInt(document.getElementById("correct_age").value);
-        console.log(start, end, correct);
-        if (start > end) [start, end] = [end, start];
-        let displayText;
-        if (correct > 0) {
-            displayText = `Exact Age: ${correct}`;
-        } else {
-            displayText = `Age range between ${start} and ${end}`;
-        }
-        document.getElementById("ageRangeDisplay").textContent = displayText;
-    }
-
-    function togglePunishment() {
-        const fineInput = document.getElementById("fineInput");
-        const yearsInput = document.getElementById("yearsInput");
-        const isFine = document.getElementById("punishmentFineRadio").checked;
-
-        if (isFine) {
-            fineInput.classList.remove("d-none");
-            yearsInput.classList.add("d-none");
-            document.getElementById("punishment_years").value = "";
-        } else {
-            yearsInput.classList.remove("d-none");
-            fineInput.classList.add("d-none");
-            document.getElementById("punishment_fine").value = "";
-        }
-    }
-
-    function disableAgeFilters() {
-        const is_alive_button = document.getElementById("is_alive");
-        const age_end = document.getElementById("age_end");
-        const age_start = document.getElementById("age_start");
-        const correct_age = document.getElementById("correct_age");
-        if (!is_alive_button.checked) {
-            age_end.disabled = true;
-            age_start.disabled = true;
-            correct_age.disabled = true;
-        } else {
-            age_end.disabled = false;
-            age_start.disabled = false;
-            correct_age.disabled = false;
-        }
-    }
-
-    document.addEventListener("DOMContentLoaded", function () {
-        updateAgeRange();
-        togglePunishment();
-        disableAgeFilters();
-        document.getElementById("age_start").addEventListener("input", updateAgeRange);
-        document.getElementById("age_end").addEventListener("input", updateAgeRange);
-        document.getElementById("correct_age").addEventListener("input", updateAgeRange);
-        document.getElementById("punishmentFineRadio").addEventListener("click", togglePunishment);
-        document.getElementById("punishmentYearsRadio").addEventListener("click", togglePunishment);
-        document.getElementById("is_alive").addEventListener("change", disableAgeFilters);
-    });
-
-</script>
-
-</body>
-</html>
Index: c/main/resources/templates/filtered_results.html
===================================================================
--- src/main/resources/templates/filtered_results.html	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,70 +1,0 @@
-<!DOCTYPE html>
-<html lang="en" xmlns:sec="http://www.w3.org/1999/xhtml">
-<head>
-    <meta charset="UTF-8">
-    <title>Filtered Reports</title>
-    <meta name="viewport" content="width=device-width, initial-scale=1">
-    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
-    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
-</head>
-<body style="background: #f8f9fa;">
-
-<div class="container py-5">
-    <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top mb-4">
-        <div class="container-fluid">
-            <a class="navbar-brand fw-bold px-3 py-2 rounded-2 text-white"
-               th:href="@{/}"
-               style="background: linear-gradient(to right, #003366, #004080);
-          border-left: 5px solid #FFD700;
-          font-size: 1.5rem;
-          box-shadow: 0 0 5px rgba(0,0,0,0.2);
-          letter-spacing: 1px;">
-                <span style="color: #FFD700;">R</span>eportium
-            </a>
-
-            <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
-                    data-bs-target="#navbarContent" aria-controls="navbarContent"
-                    aria-expanded="false" aria-label="Toggle navigation">
-                <span class="navbar-toggler-icon"></span>
-            </button>
-            <div class="collapse navbar-collapse justify-content-end" id="navbarContent">
-                <ul class="navbar-nav mb-2 mb-lg-0">
-                    <li class="nav-item">
-                        <a class="nav-link" th:href="@{/reports}">All Reports</a>
-                    </li>
-                    <li class="nav-item" sec:authorize="hasRole('ROLE_ADMIN')">
-                        <a class="nav-link text-info" th:href="@{/profiles}">Users</a>
-                    </li>
-                    <li class="nav-item">
-                        <a class="nav-link text-danger" th:href="@{/logout}">Logout</a>
-                    </li>
-                </ul>
-            </div>
-        </div>
-    </nav>
-    <h2 class="text-center my-4 text-primary fw-bold">Filtered Reports</h2>
-    <div class="table-responsive shadow-sm rounded mt-5">
-        <table class="table table-striped table-bordered align-middle">
-            <thead class="table-dark text-center">
-            <tr>
-                <th>ID</th>
-                <th>Summary</th>
-                <th>Created At</th>
-                <th>Person Reference</th>
-            </tr>
-            </thead>
-            <tbody>
-            <tr th:each="report : ${results}">
-                <td th:text="${report.reportId}">1</td>
-                <td th:text="${report.summary}">Sample Summary</td>
-                <td th:text="${report.createdAt}">2024-01-01</td>
-                <td>
-                    <span th:text="${'{' + report.person.personId + '} → ' + report.person.name + ' ' + report.person.surname}">Person</span>
-                </td>
-            </tr>
-            </tbody>
-        </table>
-    </div>
-</div>
-</body>
-</html>
Index: src/main/resources/templates/home.html
===================================================================
--- src/main/resources/templates/home.html	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/resources/templates/home.html	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -43,9 +43,9 @@
 
         .badge-yes {
-            background-color: #36c634;
+            background-color: #27ae60;
         }
 
         .badge-no {
-            background-color: #d14040;
+            background-color: #ff3b3b;
         }
     </style>
@@ -104,5 +104,4 @@
         <tr>
             <th>#</th>
-            <th>PersonID</th>
             <th>Full Name</th>
             <th>Address</th>
@@ -114,5 +113,4 @@
             <th>Has Employment Report</th>
             <th>Has Medical Report</th>
-            <th>Delete Person</th>
         </tr>
         </thead>
@@ -121,5 +119,4 @@
             th:classappend="${!person.isAlive} ? 'table-dark' : ''">
             <td th:text="${stat.count}"></td>
-            <td class="fw-bolder text-success" th:text="${person.personId}"></td>
             <td>
                 <a th:href="@{/{id}(id=${person.getPersonId()})}"
@@ -151,10 +148,4 @@
           th:text="${person.hasMedicalReport} ? 'Yes' : 'No'"></span>
             </td>
-            <td>
-                <form th:action="@{/{id}/delete(id=${person.getPersonId()})}" method="post"
-                      class="text-decoration-none text-primary fw-semibold">
-                    <button type="submit">Delete</button>
-                </form>
-            </td>
         </tr>
         </tbody>
Index: src/main/resources/templates/login.html
===================================================================
--- src/main/resources/templates/login.html	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/resources/templates/login.html	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -79,12 +79,10 @@
     <form th:action="@{/login}" method="post">
         <div class="mb-3">
-            <input type="text" name="username" class="form-control" value="leonasanovski@gmail.com" placeholder="Email"
-                   required>
+            <input type="text" name="username" class="form-control" value="leonasanovski@gmail.com" placeholder="Email" required>
         </div>
         <div class="mb-3">
-            <input type="password" name="password" value="#Admin123" class="form-control" placeholder="Password"
-                   required>
+            <input type="password" name="password" value="#Admin123" class="form-control" placeholder="Password" required>
         </div>
-        <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
+        <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}" />
 
         <div class="d-grid">
@@ -92,4 +90,7 @@
         </div>
     </form>
+    <div th:if="${hasError}" class="alert alert-danger mt-3 text-center" role="alert">
+        <span th:text="${error}">Invalid credentials</span>
+    </div>
     <div class="footer-text mt-3">
         Don't have an account? <a href="/register">Register</a>
Index: c/main/resources/templates/new_academic_report.html
===================================================================
--- src/main/resources/templates/new_academic_report.html	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,255 +1,0 @@
-<!doctype html>
-<html lang="en" xmlns:th="http://www.thymeleaf.org">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1">
-    <title>Add New Academic Report</title>
-    <style>
-        :root {
-            --light-gray: #f8f9fa;
-            --blue: #007bff;
-            --yellow: #ffc107;
-            --dark-blue: #0056b3;
-            --light-blue: #e3f2fd;
-        }
-
-        body {
-            background: linear-gradient(135deg, var(--light-gray) 0%, #e9ecef 100%);
-            min-height: 100vh;
-            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
-            margin: 0;
-            padding: 20px;
-        }
-
-        .form-container {
-            background: white;
-            border-radius: 15px;
-            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
-            padding: 2.5rem;
-            margin: 2rem auto;
-            max-width: 600px;
-            position: relative;
-        }
-
-        .form-container::before {
-            content: '';
-            position: absolute;
-            top: 0;
-            left: 0;
-            right: 0;
-            height: 5px;
-            background: linear-gradient(90deg, var(--blue) 0%, var(--yellow) 100%);
-            border-radius: 15px 15px 0 0;
-        }
-
-        .form-title {
-            color: var(--dark-blue);
-            font-weight: 700;
-            margin-bottom: 2rem;
-            text-align: center;
-            font-size: 1.8rem;
-        }
-
-        .form-label {
-            color: var(--dark-blue);
-            font-weight: 600;
-            margin-bottom: 0.5rem;
-            font-size: 0.95rem;
-            display: block;
-        }
-
-        .form-control {
-            border: 2px solid #e9ecef;
-            border-radius: 10px;
-            padding: 0.75rem 1rem;
-            font-size: 1rem;
-            transition: all 0.3s ease;
-            background-color: var(--light-gray);
-            width: 100%;
-            box-sizing: border-box;
-        }
-
-        .form-control:focus {
-            border-color: var(--blue);
-            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
-            background-color: white;
-            outline: none;
-        }
-
-        .form-control::placeholder {
-            color: #6c757d;
-        }
-
-        .form-control:hover {
-            background-color: white;
-        }
-
-        select.form-control {
-            cursor: pointer;
-        }
-
-        textarea.form-control {
-            resize: vertical;
-            min-height: 100px;
-        }
-
-        .btn-primary {
-            background: linear-gradient(45deg, var(--blue) 0%, var(--dark-blue) 100%);
-            border: none;
-            border-radius: 10px;
-            padding: 0.75rem 2rem;
-            font-weight: 600;
-            text-transform: uppercase;
-            letter-spacing: 0.5px;
-            transition: all 0.3s ease;
-            box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
-            color: white;
-            cursor: pointer;
-            font-size: 1rem;
-        }
-
-        .btn-primary:hover {
-            background: linear-gradient(45deg, var(--dark-blue) 0%, var(--blue) 100%);
-        }
-
-        .btn-secondary {
-            background: linear-gradient(45deg, var(--yellow) 0%, #e0a800 100%);
-            border: none;
-            border-radius: 10px;
-            padding: 0.75rem 2rem;
-            font-weight: 600;
-            text-transform: uppercase;
-            letter-spacing: 0.5px;
-            color: #333;
-            transition: all 0.3s ease;
-            text-decoration: none;
-            display: inline-block;
-            box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
-            cursor: pointer;
-            font-size: 1rem;
-        }
-
-        .btn-secondary:hover {
-            background: linear-gradient(45deg, #e0a800 0%, var(--yellow) 100%);
-            color: #333;
-            text-decoration: none;
-        }
-
-        .form-group {
-            margin-bottom: 1.5rem;
-            position: relative;
-        }
-
-        .form-group::after {
-            content: '';
-            position: absolute;
-            bottom: -0.5rem;
-            left: 0;
-            width: 50px;
-            height: 2px;
-            background: var(--yellow);
-            border-radius: 1px;
-            opacity: 0.6;
-        }
-
-        .button-group {
-            display: flex;
-            gap: 1rem;
-            justify-content: center;
-            margin-top: 2rem;
-            flex-wrap: wrap;
-        }
-
-        .description-counter {
-            text-align: right;
-            font-size: 0.85rem;
-            color: #6c757d;
-            margin-top: 0.25rem;
-        }
-
-        @media (max-width: 576px) {
-            body {
-                padding: 10px;
-            }
-
-            .form-container {
-                margin: 1rem auto;
-                padding: 1.5rem;
-            }
-
-            .button-group {
-                flex-direction: column;
-            }
-
-            .btn-primary, .btn-secondary {
-                width: 100%;
-            }
-        }
-    </style>
-</head>
-<body>
-<div class="form-container">
-    <h2 class="form-title">Academic Report</h2>
-
-    <form th:action="@{/reports/add/academic}" method="post">
-        <!-- Hidden person ID -->
-        <input type="hidden" name="personId" th:value="${person.personId}" />
-
-        <!-- Institution -->
-        <div class="form-group">
-            <label for="institutionId" class="form-label">Institution</label>
-            <select name="institutionId" id="institutionId" class="form-control" required>
-                <option value="">Select an institution</option>
-                <option th:each="inst : ${institutions}"
-                        th:value="${inst.institutionId}"
-                        th:text="${inst.name}">
-                </option>
-            </select>
-        </div>
-
-        <!-- Academic Field -->
-        <div class="form-group">
-            <label for="academicField" class="form-label">Academic Field</label>
-            <input type="text" name="academicField" id="academicField" class="form-control" required
-                   placeholder="e.g., Computer Science, Mathematics, Psychology" />
-        </div>
-
-        <!-- Description -->
-        <div class="form-group">
-            <label for="descriptionOfReport" class="form-label">Description of Report</label>
-            <textarea name="descriptionOfReport" id="descriptionOfReport" class="form-control" rows="4" required
-                      placeholder="Provide a detailed description of the academic report, including key findings, methodology, or achievements..."
-                      maxlength="1000" oninput="updateCounter()"></textarea>
-            <div class="description-counter" id="charCounter">0 / 1000 characters</div>
-        </div>
-
-        <div class="button-group">
-            <button type="submit" class="btn-primary">Submit Report</button>
-            <a th:href="@{/{id}(id=${person.getPersonId()})}" class="btn btn-secondary">Cancel</a>
-        </div>
-    </form>
-</div>
-
-<script>
-    function updateCounter() {
-        const textarea = document.getElementById('descriptionOfReport');
-        const counter = document.getElementById('charCounter');
-        const current = textarea.value.length;
-        const max = textarea.getAttribute('maxlength');
-        counter.textContent = `${current} / ${max} characters`;
-
-        if (current > max * 0.9) {
-            counter.style.color = '#dc3545';
-        } else if (current > max * 0.7) {
-            counter.style.color = '#ffc107';
-        } else {
-            counter.style.color = '#6c757d';
-        }
-    }
-
-    document.addEventListener('DOMContentLoaded', function() {
-        updateCounter();
-    });
-</script>
-</body>
-</html>
Index: c/main/resources/templates/new_criminal_report.html
===================================================================
--- src/main/resources/templates/new_criminal_report.html	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,353 +1,0 @@
-<!doctype html>
-<html lang="en" xmlns:th="http://www.thymeleaf.org">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1">
-    <title>Add Criminal Report</title>
-    <style>
-        :root {
-            --light-gray: #f8f9fa;
-            --blue: #007bff;
-            --yellow: #ffc107;
-            --dark-blue: #0056b3;
-            --light-blue: #e3f2fd;
-        }
-
-        body {
-            background: linear-gradient(135deg, var(--light-gray) 0%, #e9ecef 100%);
-            min-height: 100vh;
-            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
-            margin: 0;
-            padding: 20px;
-        }
-
-        .form-container {
-            background: white;
-            border-radius: 15px;
-            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
-            padding: 2.5rem;
-            margin: 2rem auto;
-            max-width: 600px;
-            position: relative;
-        }
-
-        .form-container::before {
-            content: '';
-            position: absolute;
-            top: 0;
-            left: 0;
-            right: 0;
-            height: 5px;
-            background: linear-gradient(90deg, var(--blue) 0%, var(--yellow) 100%);
-            border-radius: 15px 15px 0 0;
-        }
-
-        .form-title {
-            color: var(--dark-blue);
-            font-weight: 700;
-            margin-bottom: 2rem;
-            text-align: center;
-            font-size: 1.8rem;
-        }
-
-        .form-label {
-            color: var(--dark-blue);
-            font-weight: 600;
-            margin-bottom: 0.5rem;
-            font-size: 0.95rem;
-            display: block;
-        }
-
-        .form-control {
-            border: 2px solid #e9ecef;
-            border-radius: 10px;
-            padding: 0.75rem 1rem;
-            font-size: 1rem;
-            transition: all 0.3s ease;
-            background-color: var(--light-gray);
-            width: 100%;
-            box-sizing: border-box;
-        }
-
-        .form-control:focus {
-            border-color: var(--blue);
-            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
-            background-color: white;
-            outline: none;
-        }
-
-        .form-control::placeholder {
-            color: #6c757d;
-        }
-
-        .form-control:hover {
-            background-color: white;
-        }
-
-        .form-control:disabled {
-            background-color: #f8f9fa;
-            color: #6c757d;
-            cursor: not-allowed;
-            opacity: 0.6;
-        }
-
-        select.form-control {
-            cursor: pointer;
-        }
-
-        select.form-control:disabled {
-            cursor: not-allowed;
-        }
-
-        textarea.form-control {
-            resize: vertical;
-            min-height: 100px;
-        }
-
-        .btn-primary {
-            background: linear-gradient(45deg, var(--blue) 0%, var(--dark-blue) 100%);
-            border: none;
-            border-radius: 10px;
-            padding: 0.75rem 2rem;
-            font-weight: 600;
-            text-transform: uppercase;
-            letter-spacing: 0.5px;
-            transition: all 0.3s ease;
-            box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
-            color: white;
-            cursor: pointer;
-            font-size: 1rem;
-        }
-
-        .btn-primary:hover {
-            background: linear-gradient(45deg, var(--dark-blue) 0%, var(--blue) 100%);
-        }
-
-        .btn-secondary {
-            background: linear-gradient(45deg, var(--yellow) 0%, #e0a800 100%);
-            border: none;
-            border-radius: 10px;
-            padding: 0.75rem 2rem;
-            font-weight: 600;
-            text-transform: uppercase;
-            letter-spacing: 0.5px;
-            color: #333;
-            transition: all 0.3s ease;
-            text-decoration: none;
-            display: inline-block;
-            box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
-            cursor: pointer;
-            font-size: 1rem;
-        }
-
-        .btn-secondary:hover {
-            background: linear-gradient(45deg, #e0a800 0%, var(--yellow) 100%);
-            color: #333;
-            text-decoration: none;
-        }
-
-        .form-group {
-            margin-bottom: 1.5rem;
-            position: relative;
-        }
-
-        .form-group::after {
-            content: '';
-            position: absolute;
-            bottom: -0.5rem;
-            left: 0;
-            width: 50px;
-            height: 2px;
-            background: var(--yellow);
-            border-radius: 1px;
-            opacity: 0.6;
-        }
-
-        .button-group {
-            display: flex;
-            gap: 1rem;
-            justify-content: center;
-            margin-top: 2rem;
-            flex-wrap: wrap;
-        }
-
-        .summary-counter {
-            text-align: right;
-            font-size: 0.85rem;
-            color: #6c757d;
-            margin-top: 0.25rem;
-        }
-
-        .help-text {
-            font-size: 0.85rem;
-            color: #6c757d;
-            margin-top: 0.25rem;
-        }
-
-        @media (max-width: 576px) {
-            body {
-                padding: 10px;
-            }
-
-            .form-container {
-                margin: 1rem auto;
-                padding: 1.5rem;
-            }
-
-            .button-group {
-                flex-direction: column;
-            }
-
-            .btn-primary, .btn-secondary {
-                width: 100%;
-            }
-        }
-    </style>
-    <script>
-        function toggleFields() {
-            const punishmentSelect = document.getElementById("punishmentType");
-            const fineField = document.getElementById("fineToPay");
-            const releaseDateField = document.getElementById("releaseDate");
-            console.log(punishmentSelect)
-            if (!punishmentSelect || !fineField || !releaseDateField) {
-                return;
-            }
-            const selected = punishmentSelect.value.toUpperCase();
-            console.log(selected)
-
-            if (selected === "FINE") {
-                fineField.disabled = false;
-                fineField.required = true;
-                releaseDateField.disabled = true;
-                releaseDateField.required = false;
-                releaseDateField.value = null;
-            } else if (selected === "PRISON") {
-                releaseDateField.disabled = false;
-                releaseDateField.required = true;
-                fineField.disabled = true;
-                fineField.required = false;
-                fineField.value = null;
-            } else {
-                fineField.disabled = true;
-                fineField.required = false;
-                releaseDateField.disabled = true;
-                releaseDateField.required = false;
-                fineField.value = null;
-                releaseDateField.value = null;
-            }
-        }
-
-        function updateCounter() {
-            const textarea = document.getElementById('caseSummary');
-            const counter = document.getElementById('charCounter');
-            const current = textarea.value.length;
-            const max = textarea.getAttribute('maxlength');
-            counter.textContent = `${current} / ${max} characters`;
-
-            if (current > max * 0.9) {
-                counter.style.color = '#dc3545';
-            } else if (current > max * 0.7) {
-                counter.style.color = '#ffc107';
-            } else {
-                counter.style.color = '#6c757d';
-            }
-        }
-
-        window.addEventListener('DOMContentLoaded', () => {
-            toggleFields(); // Run on load
-
-            // Bind change event
-            const punishmentSelect = document.getElementById("punishmentType");
-            if (punishmentSelect) {
-                punishmentSelect.addEventListener("change", toggleFields);
-            }
-
-            // Init counter
-            const summaryField = document.getElementById("caseSummary");
-            if (summaryField) {
-                summaryField.addEventListener("input", updateCounter);
-                updateCounter();
-            }
-        });
-    </script>
-</head>
-<body>
-<div class="form-container">
-    <h2 class="form-title">Criminal Report</h2>
-
-    <form th:action="@{/reports/add/criminal}" method="post">
-        <input type="hidden" name="personId" th:value="${person.personId}"/>
-
-        <!-- Case Summary -->
-        <div class="form-group">
-            <label for="caseSummary" class="form-label">Case Summary</label>
-            <textarea id="caseSummary" name="caseSummary" class="form-control" rows="3" required
-                      placeholder="Provide a brief summary of the criminal case, including key details and circumstances..."
-                      maxlength="800" oninput="updateCounter()"></textarea>
-            <div class="summary-counter" id="charCounter">0 / 800 characters</div>
-        </div>
-
-        <!-- Location -->
-        <div class="form-group">
-            <label for="location" class="form-label">Location</label>
-            <input type="text" id="location" name="location" class="form-control" required
-                   placeholder="e.g., New York, NY or 123 Main Street">
-        </div>
-
-        <!-- Is Resolved -->
-        <div class="form-group">
-            <label for="isResolved" class="form-label">Case Status</label>
-            <select id="isResolved" name="isResolved" class="form-control" required>
-                <option value="">Select case status</option>
-                <option value="true">Resolved</option>
-                <option value="false">Pending</option>
-            </select>
-        </div>
-
-        <!-- Crime Type -->
-        <div class="form-group">
-            <label for="crimeTypeId" class="form-label">Crime Type</label>
-            <select id="crimeTypeId" name="crimeTypeId" class="form-control" required>
-                <option value="">Select crime type</option>
-                <option th:each="crime : ${crimeTypes}"
-                        th:value="${crime.crimeTypeId}"
-                        th:text="${crime.label} + ' - ' + ${crime.severityLevel.toString()} + ' severity level'">
-                </option>
-            </select>
-        </div>
-
-        <!-- Punishment Type -->
-        <div class="form-group">
-            <label for="punishmentType" class="form-label">Punishment Type</label>
-            <select id="punishmentType" name="punishmentType" class="form-control" required>
-                <option value="">Select punishment type</option>
-                <option th:each="type : ${punishmentTypes}"
-                        th:value="${type.name()}"
-                        th:text="${type.name()}">
-                </option>
-            </select>
-        </div>
-
-        <!-- Fine to Pay -->
-        <div class="form-group fine-symbol">
-            <label for="fineToPay" class="form-label">Fine Amount</label>
-            <input type="number" step="0.01" id="fineToPay" name="fineToPay" class="form-control"
-                   placeholder="Enter fine amount" style="padding-right: 40px;">
-            <div class="help-text">Only applicable for fine-based punishments</div>
-        </div>
-
-        <!-- Release Date -->
-        <div class="form-group">
-            <label for="releaseDate" class="form-label">Release Date</label>
-            <input type="date" id="releaseDate" name="releaseDate" class="form-control">
-            <div class="help-text">Only applicable for prison sentences</div>
-        </div>
-
-        <div class="button-group">
-            <button type="submit" class="btn-primary">Submit Report</button>
-            <a th:href="@{/{id}(id=${person.getPersonId()})}" class="btn btn-secondary">Cancel</a>
-        </div>
-    </form>
-</div>
-</body>
-</html>
Index: c/main/resources/templates/new_employment_report.html
===================================================================
--- src/main/resources/templates/new_employment_report.html	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,242 +1,0 @@
-<!doctype html>
-<html lang="en" xmlns:th="http://www.thymeleaf.org">
-<head>
-    <meta charset="UTF-8">
-    <title>Add Employment Report</title>
-    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
-    <style>
-        :root {
-            --light-gray: #f8f9fa;
-            --blue: #007bff;
-            --yellow: #ffc107;
-            --dark-blue: #0056b3;
-            --light-blue: #e3f2fd;
-        }
-
-        body {
-            background: linear-gradient(135deg, var(--light-gray) 0%, #e9ecef 100%);
-            min-height: 100vh;
-            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
-        }
-
-        .form-container {
-            background: white;
-            border-radius: 15px;
-            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
-            padding: 2.5rem;
-            margin: 2rem auto;
-            max-width: 600px;
-            position: relative;
-        }
-
-        .form-container::before {
-            content: '';
-            position: absolute;
-            top: 0;
-            left: 0;
-            right: 0;
-            height: 5px;
-            background: linear-gradient(90deg, var(--blue) 0%, var(--yellow) 100%);
-            border-radius: 15px 15px 0 0;
-        }
-
-        .form-title {
-            color: var(--dark-blue);
-            font-weight: 700;
-            margin-bottom: 2rem;
-            text-align: center;
-            font-size: 1.8rem;
-        }
-
-        .form-label {
-            color: var(--dark-blue);
-            font-weight: 600;
-            margin-bottom: 0.5rem;
-            font-size: 0.95rem;
-        }
-
-        .form-control {
-            border: 2px solid #e9ecef;
-            border-radius: 10px;
-            padding: 0.75rem 1rem;
-            font-size: 1rem;
-            transition: all 0.3s ease;
-            background-color: var(--light-gray);
-        }
-
-        .form-control:focus {
-            border-color: var(--blue);
-            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
-            background-color: white;
-            outline: none;
-        }
-
-        .form-control::placeholder {
-            color: #6c757d;
-        }
-
-        .btn-primary {
-            color: white;
-            background: linear-gradient(45deg, var(--blue) 0%, var(--dark-blue) 100%);
-            border: none;
-            border-radius: 10px;
-            padding: 0.75rem 2rem;
-            font-weight: 600;
-            text-transform: uppercase;
-            letter-spacing: 1px;
-            transition: all 0.3s ease;
-            box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
-        }
-
-        .btn-primary:hover {
-            background: linear-gradient(45deg, var(--dark-blue) 0%, var(--blue) 100%);
-        }
-
-        .btn-secondary {
-            background: linear-gradient(45deg, var(--yellow) 0%, #e0a800 100%);
-            border: none;
-            border-radius: 10px;
-            padding: 0.75rem 2rem;
-            font-weight: 600;
-            text-transform: uppercase;
-            letter-spacing: 0.5px;
-            color: #222222;
-            transition: all 0.3s ease;
-            text-decoration: none;
-            display: inline-block;
-            box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
-        }
-
-        .btn-secondary:hover {
-            background: linear-gradient(45deg, #e0a800 0%, var(--yellow) 100%);
-            text-decoration: none;
-        }
-
-        .form-group {
-            margin-bottom: 1.5rem;
-            position: relative;
-        }
-
-        .form-group::after {
-            content: '';
-            position: absolute;
-            bottom: -0.5rem;
-            left: 0;
-            width: 50px;
-            height: 2px;
-            background: var(--yellow);
-            border-radius: 1px;
-            opacity: 0.6;
-        }
-
-        .button-group {
-            color: white;
-            display: flex;
-            gap: 1rem;
-            justify-content: center;
-            margin-top: 2rem;
-            flex-wrap: wrap;
-        }
-
-        .summary-counter {
-            text-align: right;
-            font-size: 0.85rem;
-            color: #6c757d;
-            margin-top: 0.25rem;
-        }
-
-        @media (max-width: 576px) {
-            .form-container {
-                margin: 1rem;
-                padding: 1.5rem;
-            }
-
-            .button-group {
-                flex-direction: column;
-            }
-
-            .btn-primary, .btn-secondary {
-                width: 100%;
-            }
-        }
-
-        .form-control:hover {
-            background-color: white;
-        }
-    </style>
-</head>
-<body class="container py-4">
-<div class="form-container">
-    <h1 class="form-title">Employment Report</h1>
-
-    <form th:action="@{/reports/add/employment}" method="post">
-        <!-- Hidden person ID -->
-        <input type="hidden" name="personId" th:value="${person.getPersonId()}"/>
-
-        <!-- Start Date -->
-        <div class="form-group">
-            <label for="startDate" class="form-label">Start Date</label>
-            <input type="date" class="form-control" name="startDate" id="startDate" required>
-        </div>
-
-        <!-- End Date -->
-        <div class="form-group">
-            <label for="endDate" class="form-label">End Date</label>
-            <input type="date" class="form-control" name="endDate" id="endDate">
-            <small class="text-muted">Leave empty if currently employed</small>
-        </div>
-
-        <!-- Job Role -->
-        <div class="form-group">
-            <label for="jobRole" class="form-label">Job Role</label>
-            <input type="text" class="form-control" name="jobRole" id="jobRole" required
-                   placeholder="e.g., Software Developer, Marketing Manager">
-        </div>
-
-        <!-- Income -->
-        <div class="form-group income-symbol">
-            <label for="income" class="form-label">Monthly Income (in euros)</label>
-            <input min="1" type="number" step="0.01" class="form-control" name="income" id="income" required
-                   placeholder="Enter amount" style="padding-right: 40px;">
-        </div>
-
-        <!-- Report Summary -->
-        <div class="form-group">
-            <label for="summary" class="form-label">Report Summary</label>
-            <textarea class="form-control" name="summary" id="summary" rows="4" required
-                      placeholder="Write a brief summary of the employment details, responsibilities, achievements, etc."
-                      maxlength="500" oninput="updateCounter()"></textarea>
-            <div class="summary-counter" id="charCounter">0 / 500 characters</div>
-        </div>
-
-        <div class="button-group">
-            <button type="submit" class="btn btn-primary">Submit Report</button>
-            <a th:href="@{/{id}(id=${person.getPersonId()})}" class="btn btn-secondary">Cancel</a>
-        </div>
-    </form>
-</div>
-
-<script>
-    function updateCounter() {
-        const textarea = document.getElementById('summary');
-        const counter = document.getElementById('charCounter');
-        const current = textarea.value.length;
-        const max = textarea.getAttribute('maxlength');
-        counter.textContent = `${current} / ${max} characters`;
-
-        if (current > max * 0.9) {
-            counter.style.color = '#dc3545';
-        } else if (current > max * 0.7) {
-            counter.style.color = '#ffc107';
-        } else {
-            counter.style.color = '#6c757d';
-        }
-    }
-
-    // Initialize counter on page load
-    document.addEventListener('DOMContentLoaded', function() {
-        updateCounter();
-    });
-</script>
-</body>
-</html>
Index: c/main/resources/templates/new_medical_report.html
===================================================================
--- src/main/resources/templates/new_medical_report.html	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ 	(revision )
@@ -1,346 +1,0 @@
-<!DOCTYPE html>
-<html lang="en" xmlns:th="http://www.thymeleaf.org">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1">
-    <title>Add New Medical Report</title>
-    <style>
-        :root {
-            --light-gray: #f8f9fa;
-            --blue: #007bff;
-            --yellow: #ffc107;
-            --dark-blue: #0056b3;
-            --light-blue: #e3f2fd;
-        }
-
-        body {
-            background: linear-gradient(135deg, var(--light-gray) 0%, #e9ecef 100%);
-            min-height: 100vh;
-            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
-            margin: 0;
-            padding: 20px;
-        }
-
-        .form-container {
-            background: white;
-            border-radius: 15px;
-            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
-            padding: 2.5rem;
-            margin: 2rem auto;
-            max-width: 600px;
-            position: relative;
-        }
-
-        .form-container::before {
-            content: '';
-            position: absolute;
-            top: 0;
-            left: 0;
-            right: 0;
-            height: 5px;
-            background: linear-gradient(90deg, var(--blue) 0%, var(--yellow) 100%);
-            border-radius: 15px 15px 0 0;
-        }
-
-        .form-title {
-            color: var(--dark-blue);
-            font-weight: 700;
-            margin-bottom: 2rem;
-            text-align: center;
-            font-size: 1.8rem;
-        }
-
-        .form-label {
-            color: var(--dark-blue);
-            font-weight: 600;
-            margin-bottom: 0.5rem;
-            font-size: 0.95rem;
-            display: block;
-        }
-
-        .form-control {
-            border: 2px solid #e9ecef;
-            border-radius: 10px;
-            padding: 0.75rem 1rem;
-            font-size: 1rem;
-            transition: all 0.3s ease;
-            background-color: var(--light-gray);
-            width: 100%;
-            box-sizing: border-box;
-        }
-
-        .form-control:focus {
-            border-color: var(--blue);
-            box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
-            background-color: white;
-            outline: none;
-        }
-
-        .form-control::placeholder {
-            color: #6c757d;
-        }
-
-        .form-control:hover {
-            background-color: white;
-        }
-
-        select.form-control {
-            cursor: pointer;
-        }
-
-        textarea.form-control {
-            resize: vertical;
-            min-height: 100px;
-        }
-
-        .btn-primary {
-            background: linear-gradient(45deg, var(--blue) 0%, var(--dark-blue) 100%);
-            border: none;
-            border-radius: 10px;
-            padding: 0.75rem 2rem;
-            font-weight: 600;
-            text-transform: uppercase;
-            letter-spacing: 0.5px;
-            transition: all 0.3s ease;
-            box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
-            color: white;
-            cursor: pointer;
-            font-size: 1rem;
-        }
-
-        .btn-primary:hover {
-            background: linear-gradient(45deg, var(--dark-blue) 0%, var(--blue) 100%);
-        }
-
-        .btn-secondary {
-            background: linear-gradient(45deg, var(--yellow) 0%, #e0a800 100%);
-            border: none;
-            border-radius: 10px;
-            padding: 0.75rem 2rem;
-            font-weight: 600;
-            text-transform: uppercase;
-            letter-spacing: 0.5px;
-            color: #333;
-            transition: all 0.3s ease;
-            text-decoration: none;
-            display: inline-block;
-            box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
-            cursor: pointer;
-            font-size: 1rem;
-        }
-
-        .btn-secondary:hover {
-            background: linear-gradient(45deg, #e0a800 0%, var(--yellow) 100%);
-            color: #333;
-            text-decoration: none;
-        }
-
-        .btn-outline {
-            background: transparent;
-            border: 2px solid var(--blue);
-            border-radius: 10px;
-            padding: 0.75rem 2rem;
-            font-weight: 600;
-            color: var(--blue);
-            transition: all 0.3s ease;
-            text-decoration: none;
-            display: inline-block;
-            cursor: pointer;
-            font-size: 1rem;
-        }
-
-        .btn-outline:hover {
-            background: var(--blue);
-            color: white;
-            text-decoration: none;
-        }
-
-        .form-group {
-            margin-bottom: 1.5rem;
-            position: relative;
-        }
-
-        .form-group::after {
-            content: '';
-            position: absolute;
-            bottom: -0.5rem;
-            left: 0;
-            width: 50px;
-            height: 2px;
-            background: var(--yellow);
-            border-radius: 1px;
-            opacity: 0.6;
-        }
-
-        .button-group {
-            display: flex;
-            gap: 1rem;
-            justify-content: center;
-            margin-top: 2rem;
-            flex-wrap: wrap;
-        }
-
-        .summary-counter {
-            text-align: right;
-            font-size: 0.85rem;
-            color: #6c757d;
-            margin-top: 0.25rem;
-        }
-
-        .help-text {
-            font-size: 0.85rem;
-            color: #6c757d;
-            margin-top: 0.25rem;
-        }
-
-        .checkbox-group {
-            background: var(--light-gray);
-            border-radius: 10px;
-            padding: 1rem;
-            margin-bottom: 1rem;
-        }
-
-        .checkbox-item {
-            display: flex;
-            align-items: center;
-            margin-bottom: 0.75rem;
-            padding: 0.5rem;
-            border-radius: 8px;
-            transition: background-color 0.2s ease;
-        }
-
-        .checkbox-item:hover {
-            background-color: white;
-        }
-
-        .checkbox-item:last-child {
-            margin-bottom: 0;
-        }
-
-        .checkbox-item input[type="checkbox"] {
-            width: 18px;
-            height: 18px;
-            margin-right: 0.75rem;
-            accent-color: var(--blue);
-            cursor: pointer;
-        }
-
-        .checkbox-item label {
-            color: var(--dark-blue);
-            font-weight: 500;
-            cursor: pointer;
-            margin: 0;
-            flex-grow: 1;
-        }
-
-        .section-title {
-            color: var(--dark-blue);
-            font-weight: 600;
-            font-size: 1.1rem;
-            margin-bottom: 1rem;
-        }
-
-        @media (max-width: 576px) {
-            body {
-                padding: 10px;
-            }
-
-            .form-container {
-                margin: 1rem auto;
-                padding: 1.5rem;
-            }
-
-            .button-group {
-                flex-direction: column;
-            }
-
-            .btn-primary, .btn-secondary, .btn-outline {
-                width: 100%;
-            }
-        }
-    </style>
-    <script>
-        function updateCounter() {
-            const textarea = document.getElementById('summary');
-            const counter = document.getElementById('charCounter');
-            const current = textarea.value.length;
-            const max = textarea.getAttribute('maxlength');
-            counter.textContent = `${current} / ${max} characters`;
-
-            if (current > max * 0.9) {
-                counter.style.color = '#dc3545';
-            } else if (current > max * 0.7) {
-                counter.style.color = '#ffc107';
-            } else {
-                counter.style.color = '#6c757d';
-            }
-        }
-
-        // Initialize counter on page load
-        document.addEventListener('DOMContentLoaded', function() {
-            updateCounter();
-        });
-    </script>
-</head>
-<body>
-<div class="form-container">
-    <h2 class="form-title">Medical Report</h2>
-
-    <form th:action="@{/reports/add/medical}" method="post">
-        <input type="hidden" name="personId" th:value="${person.personId}"/>
-
-        <!-- Summary -->
-        <div class="form-group">
-            <label for="summary" class="form-label">Medical Case Description</label>
-            <textarea id="summary" name="summary" class="form-control" rows="4" required
-                      maxlength="800" placeholder="Provide a detailed description of the medical case, symptoms, treatment, and any relevant medical history..."
-                      oninput="updateCounter()"></textarea>
-            <div class="summary-counter" id="charCounter">0 / 800 characters</div>
-        </div>
-
-        <!-- Next Appointment -->
-        <div class="form-group">
-            <label for="nextControlDate" class="form-label">Next Appointment Date</label>
-            <input type="date" id="nextControlDate" name="nextControlDate" class="form-control">
-            <div class="help-text">Optional: Schedule follow-up appointment</div>
-        </div>
-
-        <!-- Doctor -->
-        <div class="form-group">
-            <label for="doctorId" class="form-label">Attending Doctor</label>
-            <select name="doctorId" id="doctorId" class="form-control" required>
-                <option value="" disabled selected>Select a doctor</option>
-                <option th:each="doc : ${doctors}"
-                        th:value="${doc.doctorId}"
-                        th:text="${doc.name + ' ' + doc.surname + ' - ' + doc.specialization.toString()}"></option>
-            </select>
-        </div>
-
-        <!-- Diagnoses -->
-        <div class="form-group">
-            <div class="section-title">Select Diagnoses</div>
-            <div class="checkbox-group">
-                <div th:each="diag : ${diagnoses}" class="checkbox-item">
-                    <input type="checkbox"
-                           name="diagnosisIds"
-                           th:value="${diag.diagnosisId}"
-                           th:id="${'diag-' + diag.diagnosisId}"/>
-                    <label th:for="${'diag-' + diag.diagnosisId}" th:text="${diag.shortDescription}">Diagnosis</label>
-                </div>
-            </div>
-            <!-- Add Diagnosis Button -->
-            <div style="text-align: center; margin-top: 1rem;">
-                <a th:href="@{/diagnosis/create(personId=${person.getPersonId()})}" class="btn-outline">
-                    + Add New Diagnosis
-                </a>
-            </div>
-        </div>
-
-        <div class="button-group">
-            <button type="submit" class="btn-primary">Submit Medical Report</button>
-            <a th:href="@{/{id}(id=${person.getPersonId()})}" class="btn btn-secondary">Cancel</a>
-        </div>
-    </form>
-</div>
-</body>
-</html>
Index: src/main/resources/templates/person_reports.html
===================================================================
--- src/main/resources/templates/person_reports.html	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/resources/templates/person_reports.html	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -5,644 +5,85 @@
     <title th:text="'Reports for ' + ${person.name} + ' ' + ${person.surname}">Person Reports</title>
     <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
-    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
-    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css">
     <style>
-        * {
-            margin: 0;
-            padding: 0;
-            box-sizing: border-box;
-        }
-
         body {
-            background: #667eea;
+            background: linear-gradient(to right, #020b49, #001e61, #00297e); /* Night blue sky gradient */
             min-height: 100vh;
-            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
-            color: #2d3748;
+            padding-top: 60px;
+            font-family: 'Segoe UI', sans-serif;
+            color: #fff;
         }
 
         .container {
-            background: rgba(255, 255, 255, 0.95);
-            backdrop-filter: blur(20px);
-            border-radius: 24px;
-            padding: 40px;
-            margin-top: 100px;
-            margin-bottom: 40px;
-            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
-            border: 1px solid rgba(255, 255, 255, 0.18);
-        }
-
-        .navbar {
-            background: rgba(17, 24, 39, 0.95) !important;
-            backdrop-filter: blur(20px);
-            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
-        }
-
-        .navbar-brand {
-            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
-            padding: 12px 24px !important;
-            border-radius: 12px !important;
-            border: none !important;
-            font-weight: 700 !important;
-            font-size: 1.8rem !important;
-            text-transform: uppercase;
-            letter-spacing: 2px;
-        }
-
-        .nav-link {
-            font-weight: 500;
-            padding: 8px 16px !important;
+            background-color: #fff;
+            color: #000;
+            border-radius: 12px;
+            padding: 30px;
+            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
+        }
+
+        h2, h4 {
+            color: #2c3e50;
+        }
+
+        .report-section {
+            margin-bottom: 50px;
+        }
+
+        h5 {
+            color: #e74c3c;
+            font-style: italic;
+        }
+
+        table {
             border-radius: 8px;
-        }
-
-        .page-title {
-            font-size: 2.5rem;
-            font-weight: 700;
-            color: #667eea;
-            margin-bottom: 3rem;
-            text-align: center;
-            position: relative;
-        }
-
-        .page-title::after {
-            content: '';
-            position: absolute;
-            bottom: -10px;
-            left: 50%;
-            transform: translateX(-50%);
-            width: 100px;
-            height: 4px;
-            background: #667eea;
-            border-radius: 2px;
-        }
-
-        .report-section {
-            margin-bottom: 4rem;
-        }
-
-        .section-header {
-            display: flex;
-            align-items: center;
-            margin-bottom: 2rem;
-            padding: 20px;
-            border-radius: 16px;
-            border-left: 5px solid;
-        }
-
-        .criminal-header {
-            border-left-color: #ef4444;
-            background: rgba(239, 68, 68, 0.1);
-        }
-
-        .academic-header {
-            border-left-color: #10b981;
-            background: rgba(16, 185, 129, 0.1);
-        }
-
-        .employment-header {
-            border-left-color: #3b82f6;
-            background: rgba(59, 130, 246, 0.1);
-        }
-
-        .medical-header {
-            border-left-color: #f59e0b;
-            background: rgba(245, 158, 11, 0.1);
-        }
-
-        .section-icon {
-            font-size: 2rem;
-            margin-right: 1rem;
-            padding: 12px;
-            border-radius: 12px;
-            background: rgba(255, 255, 255, 0.9);
-            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
-        }
-
-        .criminal-icon {
-            color: #ef4444;
-        }
-
-        .academic-icon {
-            color: #10b981;
-        }
-
-        .employment-icon {
-            color: #3b82f6;
-        }
-
-        .medical-icon {
-            color: #f59e0b;
-        }
-
-        .section-title {
-            font-size: 1.8rem;
-            font-weight: 700;
-            color: #1f2937;
-        }
-
-        .fancy-table {
-            border-radius: 16px;
             overflow: hidden;
-            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
-            border: 1px solid rgba(0, 0, 0, 0.05);
-            background: white;
-            margin-bottom: 2rem;
-            border-collapse: separate;
-            border-spacing: 0;
-            width: 100%;
-        }
-
-        .fancy-table thead {
-            background: #1f2937;
-        }
-
-        .fancy-table thead th {
-            color: white !important;
-            font-weight: 600 !important;
-            padding: 16px !important;
-            border: none !important;
-            font-size: 0.9rem !important;
-            text-transform: uppercase !important;
-            letter-spacing: 0.5px !important;
-            text-align: left !important;
-            vertical-align: middle !important;
-            background: inherit !important;
-        }
-
-        .fancy-table tbody tr {
-            border-bottom: 1px solid #f3f4f6;
-            background: white;
-        }
-
-        .fancy-table tbody tr:nth-child(even) {
-            background: rgba(248, 249, 250, 0.5);
-        }
-
-        .fancy-table tbody td {
-            padding: 16px !important;
-            border: none !important;
-            vertical-align: middle !important;
-            background: inherit;
-        }
-
-        .criminal-table thead,
-        .criminal-table thead th {
-            background: #dc2626 !important;
-            color: white !important;
-        }
-
-        .academic-table thead,
-        .academic-table thead th {
-            background: #059669 !important;
-            color: white !important;
-        }
-
-        .employment-table thead,
-        .employment-table thead th {
-            background: #2563eb !important;
-            color: white !important;
-        }
-
-        .medical-table thead,
-        .medical-table thead th {
-            background: #d97706 !important;
-            color: white !important;
-        }
-
-        .no-data {
-            text-align: center;
-            padding: 3rem;
-            background: linear-gradient(135deg, rgba(156, 163, 175, 0.1) 0%, rgba(156, 163, 175, 0.05) 100%);
-            border-radius: 16px;
-            border: 2px dashed #d1d5db;
-        }
-
-        .no-data-icon {
-            font-size: 3rem;
-            color: #9ca3af;
-            margin-bottom: 1rem;
-        }
-
-        .no-data-text {
-            color: #6b7280;
-            font-size: 1.1rem;
-            font-style: italic;
-        }
-
-        .statistics-section {
-            background: rgba(102, 126, 234, 0.05);
-            border-radius: 20px;
-            padding: 3rem;
-            margin: 3rem 0;
-            border: 1px solid rgba(102, 126, 234, 0.1);
-        }
-
-        .statistics-title {
-            font-size: 2rem;
-            font-weight: 700;
-            text-align: center;
-            margin-bottom: 3rem;
-            color: #1f2937;
-        }
-
-        .stats-grid {
-            display: grid;
-            grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
-            gap: 2rem;
-        }
-
-        .stat-card {
-            background: white;
-            border-radius: 16px;
-            padding: 2rem;
-            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
-            border: 1px solid rgba(0, 0, 0, 0.05);
-            position: relative;
-            overflow: hidden;
-        }
-
-        .stat-card::before {
-            content: '';
-            position: absolute;
-            top: 0;
-            left: 0;
-            right: 0;
-            height: 4px;
-            background: #667eea;
-        }
-
-        .stat-card-title {
-            font-size: 1.2rem;
-            font-weight: 600;
-            color: #1f2937;
-            margin-bottom: 1.5rem;
-            text-align: center;
-        }
-
-        .stat-row {
-            display: flex;
-            justify-content: space-between;
-            align-items: center;
-            padding: 12px 0;
-            border-bottom: 1px solid #f3f4f6;
-        }
-
-        .stat-row:last-child {
-            border-bottom: none;
-        }
-
-        .stat-label {
-            font-weight: 500;
-            color: #6b7280;
-        }
-
-        .stat-value {
-            font-weight: 700;
-            color: #667eea;
-        }
-
-        .back-button {
-            background: #667eea;
-            border: none;
-            color: white;
-            padding: 12px 32px;
-            border-radius: 12px;
-            font-weight: 600;
-            text-decoration: none;
-            display: inline-flex;
-            align-items: center;
-            gap: 8px;
-            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
-        }
-
-        .back-button:hover {
-            color: white;
-        }
-
-        .container {
-            padding: 20px;
-            margin-top: 80px;
-        }
-
-        .page-title {
-            font-size: 2rem;
-        }
-
-        .section-title {
-            font-size: 1.5rem;
-        }
-
-        .stats-grid {
-            grid-template-columns: 1fr;
-        }
-
-        .section-header {
-            flex-direction: column;
-            text-align: center;
-        }
-
-        .section-icon {
-            margin-right: 0;
-            margin-bottom: 1rem;
-        }
-
-        .general-statistics {
-            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
-            border-radius: 20px;
-            padding: 3rem 2rem;
-            margin: 2rem 0;
-            border: 1px solid rgba(148, 163, 184, 0.2);
-        }
-
-        .general-statistics h4 {
-            font-size: 2rem;
-            font-weight: 700;
-            text-align: center;
-            margin-bottom: 3rem;
-            color: #1e293b;
-            position: relative;
-        }
-
-        .general-statistics h4::after {
-            content: '';
-            position: absolute;
-            bottom: -10px;
-            left: 50%;
-            transform: translateX(-50%);
-            width: 80px;
-            height: 4px;
-            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-            border-radius: 2px;
-        }
-
-        .institutions-podium {
-            display: flex;
-            justify-content: center;
-            align-items: flex-end;
-            gap: 1rem;
-            margin: 3rem 0;
-            perspective: 1000px;
-        }
-
-        .institution-rank {
-            position: relative;
-            padding: 2rem 1.5rem;
-            border-radius: 16px;
-            text-align: center;
-            box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
-            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
-            backdrop-filter: blur(10px);
-            border: 1px solid rgba(255, 255, 255, 0.2);
-            max-width: 280px;
-            min-height: 200px;
-            display: flex;
-            flex-direction: column;
-            justify-content: space-between;
-        }
-
-        .institution-gold {
-            background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #fbbf24 100%);
-            border: 3px solid #d97706;
-            transform: scale(1.1);
-            z-index: 3;
-        }
-
-        .institution-gold::before {
-            position: absolute;
-            top: -20px;
-            left: 50%;
-            transform: translateX(-50%);
-            font-size: 3rem;
-            background: white;
-            border-radius: 50%;
-            padding: 10px;
-            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
-        }
-
-        .institution-gold .rank-number {
-            color: #92400e;
-            font-size: 3rem;
-            font-weight: 900;
-            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
-        }
-
-        .institution-gold .rank-title {
-            color: #92400e;
-            font-weight: 700;
-            text-transform: uppercase;
-            letter-spacing: 1px;
-        }
-
-        .institution-silver {
-            background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 50%, #9ca3af 100%);
-            border: 3px solid #6b7280;
-            z-index: 2;
-        }
-
-        .institution-silver::before {
-            position: absolute;
-            top: -20px;
-            left: 50%;
-            transform: translateX(-50%);
-            font-size: 2.5rem;
-            background: white;
-            border-radius: 50%;
-            padding: 8px;
-            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
-        }
-
-        .institution-silver .rank-number {
-            color: #374151;
-            font-size: 2.5rem;
-            font-weight: 800;
-            text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
-        }
-
-        .institution-silver .rank-title {
-            color: #374151;
-            font-weight: 600;
-            text-transform: uppercase;
-            letter-spacing: 0.5px;
-        }
-
-        .institution-bronze {
-            background: linear-gradient(135deg, #cd7f32 0%, #b45309 50%, #92400e 100%);
-            border: 3px solid #78350f;
-            z-index: 1;
-        }
-
-        .institution-bronze::before {
-            position: absolute;
-            top: -20px;
-            left: 50%;
-            transform: translateX(-50%);
-            font-size: 2rem;
-            background: white;
-            border-radius: 50%;
-            padding: 6px;
-            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
-        }
-
-        .institution-bronze .rank-number {
-            color: #fbbf24;
-            font-size: 2rem;
-            font-weight: 700;
-            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
-        }
-
-        .institution-bronze .rank-title {
-            color: #fbbf24;
-            font-weight: 600;
-            text-transform: uppercase;
-        }
-
-        .rank-number {
-            display: block;
-            margin-bottom: 1rem;
-        }
-
-        .rank-title {
-            font-size: 1.1rem;
-            margin-bottom: 1rem;
-        }
-
-        .institution-name {
-            font-size: 1.2rem;
-            font-weight: 700;
-            margin-bottom: 0.5rem;
-            color: #1e293b;
-            line-height: 1.3;
-        }
-
-        .report-count {
-            font-size: 2rem;
-            font-weight: 900;
-            color: #667eea;
-            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
-        }
-
-        .report-label {
-            font-size: 0.9rem;
-            color: #64748b;
-            font-weight: 500;
-            margin-top: 0.25rem;
-        }
-
-        .no-institution-data {
-            text-align: center;
-            padding: 4rem 2rem;
-            background: linear-gradient(135deg, rgba(156, 163, 175, 0.1) 0%, rgba(156, 163, 175, 0.05) 100%);
-            border-radius: 16px;
-            border: 2px dashed #d1d5db;
-        }
-
-        .no-institution-data i {
-            font-size: 4rem;
-            color: #9ca3af;
-            margin-bottom: 1.5rem;
-        }
-
-        .no-institution-data h5 {
-            color: #6b7280;
-            font-size: 1.3rem;
-            margin-bottom: 1rem;
-        }
-
-        .no-institution-data p {
-            color: #9ca3af;
-            font-style: italic;
-            font-size: 1rem;
-        }
-
+        }
     </style>
 </head>
 <body>
-<nav class="navbar navbar-expand-lg fixed-top">
-    <div class="container-fluid">
-        <a class="navbar-brand" th:href="@{/}">
-            <i class="fas fa-chart-line me-2"></i>
-            Reportium
-        </a>
-        <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
-                data-bs-target="#navbarContent" aria-controls="navbarContent"
-                aria-expanded="false" aria-label="Toggle navigation">
-            <span class="navbar-toggler-icon"></span>
-        </button>
-        <div class="collapse navbar-collapse justify-content-end" id="navbarContent">
-            <ul class="navbar-nav">
-                <li class="nav-item">
-                    <a class="nav-link text-success" th:href="@{/reports}"><i class="bi bi-person-lines-fill"></i>All
-                        Reports</a>
-                </li>
-                <li class="nav-item" sec:authorize="hasRole('ROLE_ADMIN')">
-                    <a class="nav-link text-info" th:href="@{/profiles}"><i class="bi bi-people-fill"></i>Users</a>
-                </li>
-                <li class="nav-item">
-                    <a class="nav-link text-danger" th:href="@{/logout}"><i
-                            class="bi bi-door-closed-fill"></i>Logout</a>
-                </li>
-            </ul>
-        </div>
-    </div>
-</nav>
-
 <div class="container">
-    <h1 class="page-title" th:text="'Reports for ' + ${person.name} + ' ' + ${person.surname}">
-        Reports for Person
-    </h1>
-    <div class="px-2 py-3 rounded-2 border border-secondary-subtle mb-4">
-        <h4 class="text-secondary mb-3 text-center">Add a New Report</h4>
-        <div class="row row-cols-2 row-cols-md-4 g-3 w-100 py-3">
-            <div class="col">
-                <a class="btn btn-outline-warning fw-bolder w-100"
-                   th:href="@{/reports/add/medical(personId=${person.getPersonId()})}">
-                    <i class="bi bi-plus-lg"></i> New Medical Report
-                </a>
+    <nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
+        <div class="container-fluid">
+            <a class="navbar-brand fw-bold px-3 py-2 rounded-2 text-white"
+               th:href="@{/}"
+               style="background: linear-gradient(to right, #003366, #004080);
+          border-left: 5px solid #FFD700;
+          font-size: 1.5rem;
+          box-shadow: 0 0 5px rgba(0,0,0,0.2);
+          letter-spacing: 1px;">
+                <span style="color: #FFD700;">R</span>eportium
+            </a>
+            <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
+                    data-bs-target="#navbarContent" aria-controls="navbarContent"
+                    aria-expanded="false" aria-label="Toggle navigation">
+                <span class="navbar-toggler-icon"></span>
+            </button>
+            <div class="collapse navbar-collapse justify-content-end" id="navbarContent">
+                <ul class="navbar-nav mb-2 mb-lg-0">
+                    <li class="nav-item">
+                        <a class="nav-link" th:href="@{/reports}">All Reports</a>
+                    </li>
+                    <li class="nav-item" sec:authorize="hasRole('ROLE_ADMIN')">
+                        <a class="nav-link text-info" th:href="@{/profiles}">Users</a>
+                    </li>
+                    <li class="nav-item">
+                        <a class="nav-link text-danger" th:href="@{/logout}">Logout</a>
+                    </li>
+                </ul>
             </div>
-            <div class="col">
-                <a class="btn btn-outline-danger fw-bolder w-100"
-                   th:href="@{/reports/add/criminal(personId=${person.getPersonId()})}">
-                    <i class="bi bi-plus-lg"></i> New Criminal Report
-                </a>
-            </div>
-            <div class="col">
-                <a class="btn btn-outline-success fw-bolder w-100"
-                   th:href="@{/reports/add/academic(personId=${person.getPersonId()})}">
-                    <i class="bi bi-plus-lg"></i> New Academic Report
-                </a>
-            </div>
-            <div class="col">
-                <a class="btn btn-outline-primary fw-bolder w-100"
-                   th:href="@{/reports/add/employment(personId=${person.getPersonId()})}">
-                    <i class="bi bi-plus-lg"></i> New Employment Report
-                </a>
-            </div>
-        </div>
-    </div>
-
+        </div>
+    </nav>
+
+    <h2 th:text="'Reports for ' + ${person.name} + ' ' + ${person.surname}"></h2>
 
     <!-- Criminal Reports -->
     <div class="report-section">
-        <div class="section-header criminal-header">
-            <div class="section-icon criminal-icon">
-                <i class="fas fa-gavel"></i>
-            </div>
-            <div>
-                <h2 class="section-title">Criminal Reports</h2>
-                <p class="mb-0 text-muted">Legal proceedings and criminal activity records</p>
-            </div>
-        </div>
-
+        <h4>Criminal Reports—(total --> <span class="badge bg-secondary-subtle text-dark"
+                                              th:text="${criminal_reports.size()}"></span>)</h4>
         <div th:if="${#lists.isEmpty(criminal_reports)}">
-            <div class="no-data">
-                <i class="fas fa-shield-alt no-data-icon"></i>
-                <div class="no-data-text"
-                     th:text="'No criminal reports found for ' + ${person.name} + ' ' + ${person.surname}">
-                    No criminal reports found
-                </div>
-            </div>
-        </div>
-
+            <h5 th:text="'No criminal report exists for ' + ${person.name} + ' ' + ${person.surname}"></h5>
+        </div>
         <div th:unless="${#lists.isEmpty(criminal_reports)}">
-            <table class="table fancy-table criminal-table">
+            <table class="table table-bordered table-warning text-center">
                 <thead>
                 <tr>
@@ -651,19 +92,12 @@
                     <th>Resolved</th>
                     <th>Severity</th>
-                    <th>Punishment</th>
+                    <th>Description of Punishment</th>
                 </tr>
                 </thead>
                 <tbody>
                 <tr th:each="report : ${criminal_reports}">
-                    <td><strong th:text="${report.reportId}"></strong></td>
+                    <td th:text="${report.reportId}"></td>
                     <td th:text="${report.label}"></td>
-                    <td>
-                                <span th:if="${report.resolved}" class="badge bg-success">
-                                    <i class="fas fa-check me-1"></i>Yes
-                                </span>
-                        <span th:unless="${report.resolved}" class="badge bg-warning">
-                                    <i class="fas fa-clock me-1"></i>No
-                                </span>
-                    </td>
+                    <td th:text="${report.resolved} ? 'Yes' : 'No'"></td>
                     <td th:text="${report.severityLevel}"></td>
                     <td th:text="${report.descriptivePunishment}"></td>
@@ -676,26 +110,11 @@
     <!-- Academic Reports -->
     <div class="report-section">
-        <div class="section-header academic-header">
-            <div class="section-icon academic-icon">
-                <i class="fas fa-graduation-cap"></i>
-            </div>
-            <div>
-                <h2 class="section-title">Academic Reports</h2>
-                <p class="mb-0 text-muted">Educational achievements and academic history</p>
-            </div>
-        </div>
-
+        <h4>Academic Reports—(total --> <span class="badge bg-secondary-subtle text-dark"
+                                              th:text="${academic_reports.size()}"></span>)</h4>
         <div th:if="${#lists.isEmpty(academic_reports)}">
-            <div class="no-data">
-                <i class="fas fa-book no-data-icon"></i>
-                <div class="no-data-text"
-                     th:text="'No academic reports found for ' + ${person.name} + ' ' + ${person.surname}">
-                    No academic reports found
-                </div>
-            </div>
-        </div>
-
+            <h5 th:text="'No academic report exists for ' + ${person.name} + ' ' + ${person.surname}"></h5>
+        </div>
         <div th:unless="${#lists.isEmpty(academic_reports)}">
-            <table class="table fancy-table academic-table">
+            <table class="table table-bordered table-success">
                 <thead>
                 <tr>
@@ -704,15 +123,14 @@
                     <th>Field</th>
                     <th>Institution</th>
-                    <th>Address</th>
-                    <th>Established</th>
-                </tr>
-                </thead>
-                <tbody>
+                    <th>Institution Address</th>
+                    <th>Established At</th>
+                </tr>
+                </thead>
+                <tbody>
+
                 <tr th:each="report : ${academic_reports}">
-                    <td><strong th:text="${report.reportId}"></strong></td>
+                    <td th:text="${report.reportId}"></td>
                     <td th:text="${report.descriptionOfReport}"></td>
-                    <td>
-                        <span class="badge bg-primary" th:text="${report.academicField}"></span>
-                    </td>
+                    <td th:text="${report.academicField}"></td>
                     <td th:text="${report.institutionName} + ' - ' + ${report.institutionType}"></td>
                     <td th:text="${report.institutionAddress}"></td>
@@ -726,31 +144,16 @@
     <!-- Employment Reports -->
     <div class="report-section">
-        <div class="section-header employment-header">
-            <div class="section-icon employment-icon">
-                <i class="fas fa-briefcase"></i>
-            </div>
-            <div>
-                <h2 class="section-title">Employment Reports</h2>
-                <p class="mb-0 text-muted">Professional work history and employment records</p>
-            </div>
-        </div>
-
+        <h4>Employment Reports—(total --> <span class="badge bg-secondary-subtle text-dark"
+                                                th:text="${employment_reports.size()}"></span>)</h4>
         <div th:if="${#lists.isEmpty(employment_reports)}">
-            <div class="no-data">
-                <i class="fas fa-building no-data-icon"></i>
-                <div class="no-data-text"
-                     th:text="'No employment reports found for ' + ${person.name} + ' ' + ${person.surname}">
-                    No employment reports found
-                </div>
-            </div>
-        </div>
-
+            <h5 th:text="'No employment report exists for ' + ${person.name} + ' ' + ${person.surname}"></h5>
+        </div>
         <div th:unless="${#lists.isEmpty(employment_reports)}">
-            <table class="table fancy-table employment-table">
+            <table class="table table-bordered table-info">
                 <thead>
                 <tr>
                     <th>Report ID</th>
                     <th>Job Role</th>
-                    <th>Duration</th>
+                    <th>Start Date</th>
                     <th>Income</th>
                     <th>Summary</th>
@@ -759,11 +162,9 @@
                 <tbody>
                 <tr th:each="report : ${employment_reports}">
-                    <td><strong th:text="${report.reportId}"></strong></td>
+                    <td th:text="${report.reportId}"></td>
                     <td th:text="${report.jobRole}"></td>
-                    <td th:text="${#temporals.format(report.startDate, 'dd.MM.yyyy') + ' - ' + (report.endDate != null ? #temporals.format(report.endDate, 'dd.MM.yyyy') : 'Present')}"></td>
-                    <td>
-                        <div class="fw-bold text-success" th:text="${report.incomePerMonth} + ' €'"></div>
-                        <small class="text-muted"
-                               th:text="${#numbers.formatDecimal(report.incomePerMonth * 61.5, 0, 2)} + ' MKD'"></small>
+                    <td th:text="${#temporals.format(report.startDate, 'dd.MM.yyyy') + ' - ' + (report.endDate != null ? #temporals.format(report.endDate, 'dd.MM.yyyy') : 'Still working there')}"></td>
+                    <td><span class="fst-italic"
+                              th:text="|${report.incomePerMonth} euros (${#numbers.formatDecimal(report.incomePerMonth * 61.5, 0, 2)} denars)|"></span>
                     </td>
                     <td th:text="${report.summary}"></td>
@@ -776,26 +177,11 @@
     <!-- Medical Reports -->
     <div class="report-section">
-        <div class="section-header medical-header">
-            <div class="section-icon medical-icon">
-                <i class="fas fa-heartbeat"></i>
-            </div>
-            <div>
-                <h2 class="section-title">Medical Reports</h2>
-                <p class="mb-0 text-muted">Health records and medical history</p>
-            </div>
-        </div>
-
+        <h4>Medical Reports—(total --> <span class="badge bg-secondary-subtle text-dark"
+                                             th:text="${medical_reports.size()}"></span>)</h4>
         <div th:if="${#lists.isEmpty(medical_reports)}">
-            <div class="no-data">
-                <i class="fas fa-stethoscope no-data-icon"></i>
-                <div class="no-data-text"
-                     th:text="'No medical reports found for ' + ${person.name} + ' ' + ${person.surname}">
-                    No medical reports found
-                </div>
-            </div>
-        </div>
-
+            <h5 th:text="'No medical report exists for ' + ${person.name} + ' ' + ${person.surname}"></h5>
+        </div>
         <div th:unless="${#lists.isEmpty(medical_reports)}">
-            <table class="table fancy-table medical-table">
+            <table class="table table-bordered table-danger">
                 <thead>
                 <tr>
@@ -804,296 +190,27 @@
                     <th>Next Control</th>
                     <th>Summary</th>
-                    <th>Diagnosis</th>
+                    <th>Diagnosis Description</th>
                     <th>Therapy</th>
                     <th>Severity</th>
-                    <th>Chronic</th>
+                    <th>Is it Chronic</th>
                 </tr>
                 </thead>
                 <tbody>
                 <tr th:each="report : ${medical_reports}">
-                    <td><strong th:text="${report.reportId}"></strong></td>
-                    <td th:text="'Dr. ' + ${report.doctorName} + ' ' + ${report.doctorSurname}"></td>
+                    <td th:text="${report.reportId}"></td>
+                    <td th:text="${'Dr. ' + report.doctorName + ' ' + report.doctorSurname}">Doctor Name</td>
                     <td th:text="${report.nextControlDate != null ? #temporals.format(report.nextControlDate, 'dd.MM.yyyy') : 'Not scheduled'}"></td>
                     <td th:text="${report.summary}"></td>
-                    <td th:text="${report.shortDescription ?: 'No diagnosis given'}"></td>
-                    <td th:text="${report.therapy ?: 'No therapy prescribed'}"></td>
-                    <td>
-                        <span th:if="${report.severity}" class="badge bg-warning"
-                              th:text="${report.severity.name()}"></span>
-                        <span th:unless="${report.severity}" class="badge bg-secondary">Not specified</span>
-                    </td>
-                    <td>
-                                <span th:if="${report.isChronic}" class="badge bg-danger">
-                                    <i class="fas fa-exclamation-triangle me-1"></i>Yes
-                                </span>
-                        <span th:unless="${report.isChronic}" class="badge bg-success">
-                                    <i class="fas fa-check me-1"></i>No
-                                </span>
-                    </td>
-                </tr>
-                </tbody>
-            </table>
-        </div>
-    </div>
-
-    <!-- Statistics Section -->
-    <div class="statistics-section">
-        <h2 class="statistics-title">
-            <i class="fas fa-chart-bar me-3"></i>
-            Report Summary Statistics
-        </h2>
-
-        <div class="stats-grid">
-            <!-- General Statistics -->
-            <div class="stat-card">
-                <h3 class="stat-card-title">
-                    <i class="fas fa-chart-pie me-2"></i>General Overview
-                </h3>
-                <div class="stat-row">
-                    <span class="stat-label">Total Reports</span>
-                    <span class="stat-value" th:text="${statistics.totalReportsFound ?: 'N/A'}">0</span>
-                </div>
-                <div class="stat-row">
-                    <span class="stat-label">First Report Date</span>
-                    <span class="stat-value" th:text="${statistics.firstReportOfPerson ?: 'N/A'}">N/A</span>
-                </div>
-                <div class="stat-row">
-                    <span class="stat-label">Latest Report Date</span>
-                    <span class="stat-value" th:text="${statistics.latestReportOfPerson ?: 'N/A'}">N/A</span>
-                </div>
-            </div>
-
-            <!-- Academic Statistics -->
-            <div class="stat-card">
-                <h3 class="stat-card-title">
-                    <i class="fas fa-graduation-cap me-2"></i>Academic Summary
-                </h3>
-                <div class="stat-row">
-                    <span class="stat-label">Total Academic Reports</span>
-                    <span class="stat-value" th:text="${statistics.academicTotal ?: 'N/A'}">0</span>
-                </div>
-                <div class="stat-row">
-                    <span class="stat-label">Most Common Field</span>
-                    <span class="stat-value" th:text="${statistics.mostCommonField ?: 'N/A'}">N/A</span>
-                </div>
-                <div class="stat-row">
-                    <span class="stat-label">Education Path</span>
-                    <span class="stat-value" th:text="${statistics.educationPath ?: 'N/A'}">N/A</span>
-                </div>
-            </div>
-
-            <!-- Employment Statistics -->
-            <div class="stat-card">
-                <h3 class="stat-card-title">
-                    <i class="fas fa-briefcase me-2"></i>Employment Summary
-                </h3>
-                <div class="stat-row">
-                    <span class="stat-label">Total Jobs</span>
-                    <span class="stat-value" th:text="${statistics.jobCount ?: 'N/A'}">0</span>
-                </div>
-                <div class="stat-row">
-                    <span class="stat-label">Total Working Days</span>
-                    <span class="stat-value" th:text="${statistics.totalWorkingInDays ?: 'N/A'}">N/A</span>
-                </div>
-                <div class="stat-row">
-                    <span class="stat-label">Total Working Months</span>
-                    <span class="stat-value" th:text="${statistics.totalWorkingInMonths ?: 'N/A'}">N/A</span>
-                </div>
-                <div class="stat-row">
-                    <span class="stat-label">Total Working Years</span>
-                    <span class="stat-value" th:text="${statistics.totalWorkingInYears ?: 'N/A'}">N/A</span>
-                </div>
-                <div class="stat-row">
-                    <span class="stat-label">Longest Job (days)</span>
-                    <span class="stat-value" th:text="${statistics.longestJobDays ?: 'N/A'}">N/A</span>
-                </div>
-                <div class="stat-row">
-                    <span class="stat-label">Max Monthly Income</span>
-                    <span class="stat-value"
-                          th:text="${statistics.maxIncomeFromJob != null ? statistics.maxIncomeFromJob + ' €' : 'N/A'}">N/A</span>
-                </div>
-            </div>
-
-            <!-- Medical Statistics -->
-            <div class="stat-card">
-                <h3 class="stat-card-title">
-                    <i class="fas fa-heartbeat me-2"></i>Medical Summary
-                </h3>
-                <div class="stat-row">
-                    <span class="stat-label">Total Diagnoses</span>
-                    <span class="stat-value" th:text="${statistics.diagnosisTotal ?: 'N/A'}">0</span>
-                </div>
-                <div class="stat-row">
-                    <span class="stat-label">Chronic Condition Ratio</span>
-                    <span class="stat-value" th:text="${statistics.chronicRatio ?: 'N/A'}">N/A</span>
-                </div>
-                <div class="stat-row">
-                    <span class="stat-label">Most Frequent Diagnosis</span>
-                    <span class="stat-value" th:text="${statistics.mostFrequentDiagnosis ?: 'N/A'}">N/A</span>
-                </div>
-
-            </div>
-
-            <!-- Criminal Statistics -->
-            <div class="stat-card">
-                <h3 class="stat-card-title">
-                    <i class="fas fa-gavel me-2"></i>Criminal Summary
-                </h3>
-                <div class="stat-row">
-                    <span class="stat-label">Total Criminal Reports</span>
-                    <span class="stat-value" th:text="${statistics.criminalCaseTotal ?: 'N/A'}">0</span>
-                </div>
-                <div class="stat-row">
-                    <span class="stat-label">Resolution Ratio</span>
-                    <span class="stat-value" th:text="${statistics.resolutionRatio ?: 'N/A'}">N/A</span>
-                </div>
-            </div>
-        </div>
-        <div class="stats-grid">
-            <!-- Add this section after your existing Medical Summary card -->
-            <div class="stat-card mt-4">
-                <h3 class="stat-card-title">
-                    <i class="fas fa-users-medical me-2"></i>Similar Patient Diagnoses
-                </h3>
-                <!-- Check if diagnosis_similarity list has any items -->
-                <div th:if="${diagnosis_similarities != null}">
-                    <div class="alert alert-info mb-3"
-                         style="border-left: 4px solid #17a2b8; background-color: #f8f9fa;">
-                        <small class="text-muted">
-                            <i class="fas fa-info-circle me-1"></i>
-                            Found <span th:text="${diagnosis_similarities.size()}">0</span> patient(s) with similar
-                            diagnostic patterns
-                        </small>
-                    </div>
-                    <!-- Loop through similar patients -->
-                    <div th:each="similarity : ${diagnosis_similarities}" class="similarity-item mb-3 p-3"
-                         style="border: 1px solid #e9ecef; border-radius: 8px; background-color: #fdfdfe;">
-
-                        <div class="row align-items-center">
-                            <div class="col-md-4">
-                                <div class="patient-info">
-                                    <h6 class="mb-1 text-primary">
-                                        <i class="fas fa-user-circle me-2"></i>
-                                        <span th:text="${similarity.fullName}">Patient Name</span>
-                                    </h6>
-                                    <small class="text-muted">Patient ID: <span
-                                            th:text="${similarity.personId}">000</span></small>
-                                </div>
-                            </div>
-
-                            <div class="col-md-3">
-                                <div class="match-count text-center">
-                        <span class="badge bg-success fs-6 px-3 py-2">
-                            <i class="fas fa-check-circle me-1"></i>
-                            <span th:text="${similarity.matchingDiagnosesCount}">0</span>
-                            Match<span th:if="${similarity.matchingDiagnosesCount != 1}">es</span>
-                        </span>
-                                </div>
-                            </div>
-
-                            <div class="col-md-5">
-                                <div class="shared-diagnoses">
-                                    <small class="text-muted d-block mb-1">Shared Diagnoses:</small>
-                                    <div class="diagnosis-tags">
-                                            <span th:each="diagnosis : ${#strings.arraySplit(similarity.matchingLabels, ', ')}"
-                                                  class="badge bg-light text-dark me-1 mb-1"
-                                                  style="border: 1px solid #dee2e6;"
-                                                  th:text="${diagnosis}">
-                                Diagnosis
-                            </span>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                        <hr th:unless="${similarityStat.last}" class="mt-3 mb-0" style="border-color: #f1f3f4;">
-                    </div>
-
-                    <div class="text-center mt-3 pt-3" style="border-top: 1px solid #f1f3f4;">
-                        <small class="text-muted">
-                            <i class="fas fa-chart-line me-1"></i>
-                            This analysis helps identify patients with similar diagnostic patterns for comparative
-                            studies
-                        </small>
-                    </div>
-                </div>
-
-                <!-- Show when no similar patients found -->
-                <div th:if="${diagnosis_similarities == null}"
-                     class="no-similarities text-center py-4">
-
-                    <div class="mb-3">
-                        <i class="fas fa-search-minus text-muted" style="font-size: 3rem; opacity: 0.3;"></i>
-                    </div>
-
-                    <h6 class="text-muted mb-2">No Similar Diagnostic Patterns Found</h6>
-
-                    <p class="text-muted mb-0" style="font-size: 0.9rem; line-height: 1.5;">
-                        Currently, there are no other patients in the system with matching diagnostic profiles.
-                        This could indicate a unique clinical presentation or that similar cases have not yet been
-                        documented.
-                    </p>
-
-                    <div class="mt-3">
-                        <small class="text-muted">
-                            <i class="fas fa-lightbulb me-1"></i>
-                            <em>Similar patterns may emerge as more patient data becomes available</em>
-                        </small>
-                    </div>
-                </div>
-                <div class="general-statistics">
-                    <h4>
-                        <i class="fas fa-trophy me-3"></i>
-                        Top Performing Institutions (Last Year)
-                    </h4>
-
-
-                    <div class="institutions-podium" th:if="${!institutions.isEmpty()}">
-                        <div class="institution-rank institution-gold" th:if="${institutions.size() > 0}">
-                            <span class="rank-number">1st</span>
-                            <div class="rank-title">Champion</div>
-                            <div class="institution-name" th:text="${institutions.get(0).institutionName}">Institution
-                                Name
-                            </div>
-                            <div class="report-count" th:text="${institutions.get(0).numberOfReports}">0</div>
-                            <div class="report-label">Reports</div>
-                        </div>
-
-                        <div class="institution-rank institution-silver" th:if="${institutions.size() > 1}">
-                            <span class="rank-number">2nd</span>
-                            <div class="rank-title">Runner-up</div>
-                            <div class="institution-name" th:text="${institutions.get(1).institutionName}">Institution
-                                Name
-                            </div>
-                            <div class="report-count" th:text="${institutions.get(1).numberOfReports}">0</div>
-                            <div class="report-label">Reports</div>
-                        </div>
-
-                        <div class="institution-rank institution-bronze" th:if="${institutions.size() > 2}">
-                            <span class="rank-number">3rd</span>
-                            <div class="rank-title">Third Place</div>
-                            <div class="institution-name" th:text="${institutions.get(2).institutionName}">Institution
-                                Name
-                            </div>
-                            <div class="report-count" th:text="${institutions.get(2).numberOfReports}">0</div>
-                            <div class="report-label">Reports</div>
-                        </div>
-                    </div>
-
-                    <div class="no-institution-data" th:if="${institutions.isEmpty()}">
-                        <i class="fas fa-building"></i>
-                        <h5>No Institution Data Available</h5>
-                        <p>No reports have been filed with any institutions in the past year.</p>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
-
-    <div class="text-center mt-4">
-        <a th:href="@{/}" class="back-button">
-            <i class="fas fa-arrow-left"></i>
-            Back to Dashboard
-        </a>
-    </div>
+                    <td th:text="${report.shortDescription} ? ${report.shortDescription} : 'no diagnosis given'"></td>
+                    <td th:text="${report.therapy} ? ${report.therapy} : 'no diagnosis given'"></td>
+                    <td th:text="${report.severity} ? ${report.severity.name()} : 'no diagnosis given'"></td>
+                    <td th:text="${report.isChronic} ? 'Yes' : 'No'"></td>
+                </tr>
+                </tbody>
+            </table>
+        </div>
+    </div>
+    <a th:href="@{/}" class="btn btn-secondary">Back to Dashboard</a>
+
 </div>
 </body>
Index: src/main/resources/templates/reports.html
===================================================================
--- src/main/resources/templates/reports.html	(revision 827e7509892e8d111e4dbcd6c67b0828d9da4d37)
+++ src/main/resources/templates/reports.html	(revision b98d04941a98375610c7a5dc4c08cc28c31fb10f)
@@ -125,47 +125,5 @@
 <div class="container mt-5">
     <h2>All Reports</h2>
-    <div class="mb-4">
-        <div class="container mb-4">
-            <div class="border rounded p-3 bg-light">
-                <h5 class="fw-bold mb-3 text-center">Filter Mode Panel</h5>
-                <div class="row">
-                    <div class="col-9 border-end border-secondary-subtle">
-                        <form th:action="@{/view_reports}" method="get" id="differentReportForm"
-                              class="d-flex justify-content-between align-items-center">
-                            <div>
-                                <h4>Select one of the report types:</h4>
-                                <div class="d-flex justify-content-between gap-2">
-                                    <label id="employment" class="text-dark fw-bolder"><input type="radio"
-                                                                                              name="reportView"
-                                                                                              value="EMPLOYMENT">
-                                        Employment</label>
-                                    <label id="criminal" class="text-dark fw-bolder"><input type="radio"
-                                                                                            name="reportView"
-                                                                                            value="CRIMINAL">
-                                        Criminal</label>
-                                    <label id="academic" class="text-dark fw-bolder"><input type="radio"
-                                                                                            name="reportView"
-                                                                                            value="ACADEMIC">
-                                        Academic</label>
-                                    <label id="medical" class="text-dark fw-bolder"><input type="radio"
-                                                                                           name="reportView"
-                                                                                           value="MEDICAL">
-                                        Medical</label>
-                                </div>
-                            </div>
-                            <button type="submit" class="btn btn-outline-primary" id="joinButton" disabled
-                                    title="Click to view joined data from selected report types">
-                                View Selected Reports
-                            </button>
-                        </form>
-                    </div>
-                    <div class="col-3 d-flex align-items-center justify-content-center">
-                        <a th:href="@{/advanced_filter}" methods="get" class="btn btn-outline-secondary"
-                           id="advancedFilterBtn" title="Make your own advanced filtering">Use Advanced Filter</a>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </div>
+
     <table class="table table-striped table-hover table-bordered align-middle">
         <thead>
@@ -209,10 +167,24 @@
     <nav>
         <ul class="pagination justify-content-center">
+            <li class="page-item" th:classappend="${currentPage == 1} ? 'disabled'">
+                <a class="page-link"
+                   th:href="@{/reports(page=${currentPage - 1}, size=${reportsPage.size}, sortField=${sortField}, sortDir=${sortDir})}">
+                    Previous
+                </a>
+            </li>
+
             <li class="page-item"
-                th:each="i : ${#numbers.sequence(0, totalPages - 1)}"
-                th:classappend="${i == currentPage} ? (i == 0 ? ' first-page-active' : ' active') : ''">
+                th:each="i : ${#numbers.sequence(1, totalPages)}"
+                th:classappend="${i == currentPage} ? (i == 1 ? 'first-page-active' : 'active')">
                 <a class="page-link"
                    th:href="@{/reports(page=${i}, size=${reportsPage.size}, sortField=${sortField}, sortDir=${sortDir})}"
-                   th:text="${i + 1}">1</a>
+                   th:text="${i}">1</a>
+            </li>
+
+            <li class="page-item" th:classappend="${currentPage == totalPages} ? 'disabled'">
+                <a class="page-link"
+                   th:href="@{/reports(page=${currentPage + 1}, size=${reportsPage.size}, sortField=${sortField}, sortDir=${sortDir})}">
+                    Next
+                </a>
             </li>
         </ul>
@@ -221,19 +193,4 @@
 </div>
 
-<script>
-    const radioButtons = document.querySelectorAll("input[name='reportView']");
-    const joinButton = document.getElementById("joinButton");
-
-    function updateJoinButton() {
-        const selected = Array.from(radioButtons).some(r => r.checked);
-        joinButton.disabled = !selected;
-    }
-
-    radioButtons.forEach(rb => {
-        rb.addEventListener("change", updateJoinButton);
-    });
-    updateJoinButton();
-</script>
-
 </body>
 </html>
