Index: c/main/java/apps/spring/reportium/entity/DTOs/AcademicReportPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/DTOs/AcademicReportPerPersonDTO.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ 	(revision )
@@ -1,26 +1,0 @@
-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: c/main/java/apps/spring/reportium/entity/DTOs/CrimeReportPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/DTOs/CrimeReportPerPersonDTO.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ 	(revision )
@@ -1,26 +1,0 @@
-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: c/main/java/apps/spring/reportium/entity/DTOs/EmploymentReportPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/DTOs/EmploymentReportPerPersonDTO.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ 	(revision )
@@ -1,26 +1,0 @@
-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: c/main/java/apps/spring/reportium/entity/DTOs/MedicalReportPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/DTOs/MedicalReportPerPersonDTO.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ 	(revision )
@@ -1,45 +1,0 @@
-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: c/main/java/apps/spring/reportium/entity/DTOs/PersonReportSummaryDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/DTOs/PersonReportSummaryDTO.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ 	(revision )
@@ -1,22 +1,0 @@
-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: c/main/java/apps/spring/reportium/entity/DTOs/ReportFilterDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/DTOs/ReportFilterDTO.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ 	(revision )
@@ -1,82 +1,0 @@
-package apps.spring.reportium.entity.DTOs;
-
-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.Converter;
-import jakarta.persistence.EnumType;
-import jakarta.persistence.Enumerated;
-import lombok.Data;
-
-import java.math.BigDecimal;
-
-
-@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/DTOs/ReportStatisticsPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/DTOs/ReportStatisticsPerPersonDTO.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ 	(revision )
@@ -1,65 +1,0 @@
-package apps.spring.reportium.entity.DTOs;
-import lombok.Data;
-import java.math.BigDecimal;
-import java.sql.Date;
-//fixme
-@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/DTOs/view_fetching_dtos/AcademicReportViewFetchingDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/DTOs/view_fetching_dtos/AcademicReportViewFetchingDTO.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ 	(revision )
@@ -1,52 +1,0 @@
-package apps.spring.reportium.entity.DTOs.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/DTOs/view_fetching_dtos/CrimeReportViewFetchingDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/DTOs/view_fetching_dtos/CrimeReportViewFetchingDTO.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ 	(revision )
@@ -1,48 +1,0 @@
-package apps.spring.reportium.entity.DTOs.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/DTOs/view_fetching_dtos/EmploymentReportViewFetchingDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/DTOs/view_fetching_dtos/EmploymentReportViewFetchingDTO.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ 	(revision )
@@ -1,44 +1,0 @@
-package apps.spring.reportium.entity.DTOs.view_fetching_dtos;
-import lombok.Data;
-import java.math.BigDecimal;
-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/DTOs/view_fetching_dtos/MedicalReportViewFetchingDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/DTOs/view_fetching_dtos/MedicalReportViewFetchingDTO.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ 	(revision )
@@ -1,57 +1,0 @@
-package apps.spring.reportium.entity.DTOs.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: src/main/java/apps/spring/reportium/entity/Person.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/Person.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/entity/Person.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -61,4 +61,7 @@
     private String contactPhone;
 
+    @Column(name = "is_stub", nullable = false)
+    private boolean stub = false;
+
     @Override
     public String toString() {
Index: src/main/java/apps/spring/reportium/entity/dto/AcademicReportPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/AcademicReportPerPersonDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
+++ src/main/java/apps/spring/reportium/entity/dto/AcademicReportPerPersonDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -0,0 +1,26 @@
+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: src/main/java/apps/spring/reportium/entity/dto/CrimeReportPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/CrimeReportPerPersonDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
+++ src/main/java/apps/spring/reportium/entity/dto/CrimeReportPerPersonDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -0,0 +1,24 @@
+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: src/main/java/apps/spring/reportium/entity/dto/DiagnosisSimilarityPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/DiagnosisSimilarityPerPersonDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
+++ src/main/java/apps/spring/reportium/entity/dto/DiagnosisSimilarityPerPersonDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -0,0 +1,22 @@
+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: src/main/java/apps/spring/reportium/entity/dto/EmploymentReportPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/EmploymentReportPerPersonDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
+++ src/main/java/apps/spring/reportium/entity/dto/EmploymentReportPerPersonDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -0,0 +1,26 @@
+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: src/main/java/apps/spring/reportium/entity/dto/MedicalReportPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/MedicalReportPerPersonDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
+++ src/main/java/apps/spring/reportium/entity/dto/MedicalReportPerPersonDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -0,0 +1,45 @@
+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: src/main/java/apps/spring/reportium/entity/dto/PersonReportSummaryDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/PersonReportSummaryDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
+++ src/main/java/apps/spring/reportium/entity/dto/PersonReportSummaryDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -0,0 +1,22 @@
+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: src/main/java/apps/spring/reportium/entity/dto/ReportFilterDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/ReportFilterDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
+++ src/main/java/apps/spring/reportium/entity/dto/ReportFilterDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -0,0 +1,79 @@
+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: src/main/java/apps/spring/reportium/entity/dto/ReportStatisticsPerPersonDTO.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/dto/ReportStatisticsPerPersonDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
+++ src/main/java/apps/spring/reportium/entity/dto/ReportStatisticsPerPersonDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -0,0 +1,65 @@
+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: src/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 70207fa53282caa128ef9b08ca647420e0a9e85d)
+++ src/main/java/apps/spring/reportium/entity/dto/view_fetching_dtos/AcademicReportViewFetchingDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -0,0 +1,52 @@
+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: src/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 70207fa53282caa128ef9b08ca647420e0a9e85d)
+++ src/main/java/apps/spring/reportium/entity/dto/view_fetching_dtos/CrimeReportViewFetchingDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -0,0 +1,48 @@
+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: src/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 70207fa53282caa128ef9b08ca647420e0a9e85d)
+++ src/main/java/apps/spring/reportium/entity/dto/view_fetching_dtos/EmploymentReportViewFetchingDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -0,0 +1,44 @@
+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: src/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 70207fa53282caa128ef9b08ca647420e0a9e85d)
+++ src/main/java/apps/spring/reportium/entity/dto/view_fetching_dtos/MedicalReportViewFetchingDTO.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -0,0 +1,57 @@
+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: src/main/java/apps/spring/reportium/entity/enumerations/LogType.java
===================================================================
--- src/main/java/apps/spring/reportium/entity/enumerations/LogType.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
+++ src/main/java/apps/spring/reportium/entity/enumerations/LogType.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -0,0 +1,9 @@
+package apps.spring.reportium.entity.enumerations;
+
+public enum LogType {
+    REGISTRATION,
+    LOGIN,
+    LOGOUT,
+    CHANGE_ROLE,
+    CHANGE_PASSWORD
+}
Index: src/main/java/apps/spring/reportium/repository/PersonRepository.java
===================================================================
--- src/main/java/apps/spring/reportium/repository/PersonRepository.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/repository/PersonRepository.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -2,8 +2,12 @@
 
 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 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/repository/ReportRepository.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -1,5 +1,5 @@
 package apps.spring.reportium.repository;
 
-import apps.spring.reportium.entity.DTOs.*;
+import apps.spring.reportium.entity.dto.*;
 import apps.spring.reportium.entity.Report;
 import org.springframework.data.domain.Page;
@@ -7,4 +7,5 @@
 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;
@@ -155,8 +156,41 @@
     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);
 
     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: src/main/java/apps/spring/reportium/repository/ReportViewRepository.java
===================================================================
--- src/main/java/apps/spring/reportium/repository/ReportViewRepository.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/repository/ReportViewRepository.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -1,10 +1,8 @@
 package apps.spring.reportium.repository;
 
-import apps.spring.reportium.entity.DTOs.ReportStatisticsPerPersonDTO;
-import apps.spring.reportium.entity.DTOs.view_fetching_dtos.*;
+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 org.springframework.data.repository.query.Param;
 
 import java.util.List;
Index: src/main/java/apps/spring/reportium/repository/UserProfileRepository.java
===================================================================
--- src/main/java/apps/spring/reportium/repository/UserProfileRepository.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/repository/UserProfileRepository.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -13,3 +13,5 @@
 public interface UserProfileRepository extends JpaRepository<UserProfile, Integer> {
     Optional<UserProfile> findByReportiumUser(ReportiumUser reportiumUser);
+
+    UserProfile findByReportiumUserUserId(int reportiumUserUserId);
 }
Index: src/main/java/apps/spring/reportium/service/FilterSessionService.java
===================================================================
--- src/main/java/apps/spring/reportium/service/FilterSessionService.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/service/FilterSessionService.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -1,5 +1,5 @@
 package apps.spring.reportium.service;
 
-import apps.spring.reportium.entity.DTOs.ReportFilterDTO;
+import apps.spring.reportium.entity.dto.ReportFilterDTO;
 
 public interface FilterSessionService {
Index: src/main/java/apps/spring/reportium/service/PersonService.java
===================================================================
--- src/main/java/apps/spring/reportium/service/PersonService.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/service/PersonService.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -2,9 +2,10 @@
 
 import apps.spring.reportium.entity.*;
-import apps.spring.reportium.entity.DTOs.PersonReportSummaryDTO;
+import apps.spring.reportium.entity.dto.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 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/service/ReportService.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -1,11 +1,7 @@
 package apps.spring.reportium.service;
 
-import apps.spring.reportium.entity.DTOs.*;
-import apps.spring.reportium.entity.EmploymentReport;
-import apps.spring.reportium.entity.Institution;
+import apps.spring.reportium.entity.dto.*;
 import apps.spring.reportium.entity.Report;
 import apps.spring.reportium.entity.enumerations.PunishmentType;
-import apps.spring.reportium.entity.enumerations.ValueUnit;
-import org.springframework.cglib.core.Local;
 import org.springframework.data.domain.Page;
 
Index: src/main/java/apps/spring/reportium/service/UserLogService.java
===================================================================
--- src/main/java/apps/spring/reportium/service/UserLogService.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
+++ src/main/java/apps/spring/reportium/service/UserLogService.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -0,0 +1,8 @@
+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 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/service/impl/AuthenticateServiceImplementation.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -2,4 +2,5 @@
 
 import apps.spring.reportium.entity.UserProfileLog;
+import apps.spring.reportium.entity.enumerations.LogType;
 import apps.spring.reportium.repository.UserProfileLogRepository;
 import apps.spring.reportium.entity.ReportiumUser;
@@ -11,4 +12,5 @@
 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;
@@ -25,10 +27,16 @@
     private final PasswordEncoder passwordEncoder;
     private final UserProfileLogRepository profileLogRepository;
+    private final UserLogService userProfileLogService;
 
-    public AuthenticateServiceImplementation(ReportiumUserRepository reportiumUserRepository, UserProfileRepository userProfileRepository, PasswordEncoder passwordEncoder, UserProfileLogRepository profileLogRepository) {
+    public AuthenticateServiceImplementation(ReportiumUserRepository reportiumUserRepository,
+                                             UserProfileRepository userProfileRepository,
+                                             PasswordEncoder passwordEncoder,
+                                             UserProfileLogRepository profileLogRepository,
+                                             UserLogService userProfileLogService) {
         this.reportiumUserRepository = reportiumUserRepository;
         this.userProfileRepository = userProfileRepository;
         this.passwordEncoder = passwordEncoder;
         this.profileLogRepository = profileLogRepository;
+        this.userProfileLogService = userProfileLogService;
     }
 
@@ -53,15 +61,12 @@
         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();
-        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);
+
+        userProfileLogService.createLog(user_profile.getProfileId(), LogType.REGISTRATION);
     }
 
+    @Override
     public ReportiumUser login(String email, String password) {
         if (email == null || email.isEmpty() || password == null || password.isEmpty()) {
@@ -70,17 +75,8 @@
         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;
-
     }
 
Index: src/main/java/apps/spring/reportium/service/impl/FilterSessionServiceImplementation.java
===================================================================
--- src/main/java/apps/spring/reportium/service/impl/FilterSessionServiceImplementation.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/service/impl/FilterSessionServiceImplementation.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -1,5 +1,5 @@
 package apps.spring.reportium.service.impl;
 
-import apps.spring.reportium.entity.DTOs.ReportFilterDTO;
+import apps.spring.reportium.entity.dto.ReportFilterDTO;
 import apps.spring.reportium.entity.FilterSession;
 import apps.spring.reportium.repository.FilterSessionRepository;
Index: src/main/java/apps/spring/reportium/service/impl/PersonServiceImplementation.java
===================================================================
--- src/main/java/apps/spring/reportium/service/impl/PersonServiceImplementation.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/service/impl/PersonServiceImplementation.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -2,9 +2,16 @@
 
 import apps.spring.reportium.entity.*;
-import apps.spring.reportium.entity.DTOs.PersonReportSummaryDTO;
+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.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;
@@ -14,19 +21,65 @@
 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;
-    public PersonServiceImplementation(PersonRepository personRepository,
+    private final ReportiumUserRepository reportiumUserRepository;
+    private final UserProfileLogRepository userProfileLogRepository;
+
+    public PersonServiceImplementation(PersonRepository personRepository, ReportRepository reportRepository,
                                        CriminalReportRepository criminalReportRepository,
                                        AcademicReportRepository academicReportRepository,
                                        MedicalReportRepository medicalReportRepository,
-                                       EmploymentReportRepository employmentReportRepository) {
+                                       EmploymentReportRepository employmentReportRepository,
+                                       ReportiumUserRepository reportiumUserRepository,
+                                       UserProfileLogRepository userProfileLogRepository) {
         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 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/service/impl/ReportServiceImplementation.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -1,8 +1,7 @@
 package apps.spring.reportium.service.impl;
 
-import apps.spring.reportium.entity.DTOs.*;
+import apps.spring.reportium.entity.dto.*;
 import apps.spring.reportium.entity.Report;
 import apps.spring.reportium.entity.enumerations.PunishmentType;
-import apps.spring.reportium.entity.enumerations.ValueUnit;
 import apps.spring.reportium.repository.ReportRepository;
 import apps.spring.reportium.service.ReportService;
Index: src/main/java/apps/spring/reportium/service/impl/UserLogServiceImplementation.java
===================================================================
--- src/main/java/apps/spring/reportium/service/impl/UserLogServiceImplementation.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
+++ src/main/java/apps/spring/reportium/service/impl/UserLogServiceImplementation.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -0,0 +1,59 @@
+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: src/main/java/apps/spring/reportium/specifications/ReportFilterSpecificationBuilder.java
===================================================================
--- src/main/java/apps/spring/reportium/specifications/ReportFilterSpecificationBuilder.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/specifications/ReportFilterSpecificationBuilder.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -2,29 +2,17 @@
 
 import apps.spring.reportium.entity.*;
-import apps.spring.reportium.entity.DTOs.ReportFilterDTO;
+import apps.spring.reportium.entity.dto.ReportFilterDTO;
 import apps.spring.reportium.entity.enumerations.PunishmentType;
 import apps.spring.reportium.entity.enumerations.SelectedFilterSection;
-import apps.spring.reportium.entity.exceptions.AgeFilterOnNotAlivePeopleException;
-import apps.spring.reportium.repository.PersonRepository;
-import apps.spring.reportium.repository.ReportRepository;
-import org.springframework.cglib.core.Local;
 import org.springframework.data.jpa.domain.Specification;
 
 import java.time.LocalDate;
-import java.time.Period;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.List;
 
-import org.springframework.data.jpa.domain.Specification;
-import jakarta.persistence.criteria.CriteriaBuilder;
-import jakarta.persistence.criteria.CriteriaQuery;
 import jakarta.persistence.criteria.Join;
 import jakarta.persistence.criteria.JoinType;
 import jakarta.persistence.criteria.Predicate;
-import jakarta.persistence.criteria.Root;
 import jakarta.persistence.criteria.Expression;
-
-import static apps.spring.reportium.entity.enumerations.ComparisonDTOEnum.*;
 
 public class ReportFilterSpecificationBuilder {
Index: src/main/java/apps/spring/reportium/web/AdvancedFilterController.java
===================================================================
--- src/main/java/apps/spring/reportium/web/AdvancedFilterController.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/web/AdvancedFilterController.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -1,17 +1,9 @@
 package apps.spring.reportium.web;
 
-import apps.spring.reportium.entity.DTOs.MedicalReportPerPersonDTO;
-import apps.spring.reportium.entity.DTOs.ReportFilterDTO;
-import apps.spring.reportium.entity.DTOs.view_fetching_dtos.CrimeReportViewFetchingDTO;
-import apps.spring.reportium.entity.DTOs.view_fetching_dtos.MedicalReportViewFetchingDTO;
-import apps.spring.reportium.entity.FilterSession;
+import apps.spring.reportium.entity.dto.ReportFilterDTO;
 import apps.spring.reportium.entity.Report;
 import apps.spring.reportium.entity.enumerations.*;
-import apps.spring.reportium.repository.ReportViewRepository;
 import apps.spring.reportium.service.FilterSessionService;
 import apps.spring.reportium.service.ReportService;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-import org.springframework.data.web.PageableDefault;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
Index: src/main/java/apps/spring/reportium/web/HomeController.java
===================================================================
--- src/main/java/apps/spring/reportium/web/HomeController.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/web/HomeController.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -2,13 +2,12 @@
 
 import apps.spring.reportium.entity.*;
-import apps.spring.reportium.entity.DTOs.*;
+import apps.spring.reportium.entity.dto.*;
 import apps.spring.reportium.entity.exceptions.PersonNotFoundException;
 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.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
@@ -31,4 +30,12 @@
         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) {
@@ -42,5 +49,5 @@
         List<EmploymentReportPerPersonDTO> person_er = reportRepository.getEmploymentReportsByPersonId(personId);
         ReportStatisticsPerPersonDTO statistics_per_person = reportRepository.getStatisticsForPerson(personId);
-        System.out.println(statistics_per_person);
+        List<DiagnosisSimilarityPerPersonDTO> diagnosis_similarity = reportRepository.getSimilarDiagnosesForPerson(personId);
         model.addAttribute("medical_reports", person_mr);
         model.addAttribute("criminal_reports", person_cr);
@@ -48,4 +55,5 @@
         model.addAttribute("employment_reports", person_er);
         model.addAttribute("statistics", statistics_per_person);
+        model.addAttribute("diagnosis_similarities", diagnosis_similarity);
         model.addAttribute("person", person);
         return "person_reports";
Index: src/main/java/apps/spring/reportium/web/LoginController.java
===================================================================
--- src/main/java/apps/spring/reportium/web/LoginController.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/web/LoginController.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -2,5 +2,8 @@
 
 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;
@@ -14,6 +17,10 @@
 public class LoginController {
     private final AuthenticationService authService;
-    public LoginController(AuthenticationService authService) {
+    private final UserProfileRepository userProfileRepository;
+    private final UserLogService userLogService;
+    public LoginController(AuthenticationService authService, UserProfileRepository userProfileRepository, UserLogService userLogService) {
         this.authService = authService;
+        this.userProfileRepository = userProfileRepository;
+        this.userLogService = userLogService;
     }
 
@@ -26,7 +33,13 @@
         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 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/web/LogoutController.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -1,7 +1,13 @@
 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;
@@ -10,7 +16,31 @@
 @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, Model model) {
-        request.getSession().invalidate();
+    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();
         return "redirect:/login";
     }
Index: src/main/java/apps/spring/reportium/web/ProfileManagerController.java
===================================================================
--- src/main/java/apps/spring/reportium/web/ProfileManagerController.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/web/ProfileManagerController.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -2,7 +2,11 @@
 
 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;
@@ -23,9 +27,15 @@
     private final RoleService roleService;
     private final AuthenticationService authenticationService;
-    public ProfileManagerController(ReportiumUserService userService, RoleService roleService, AuthenticationService authenticationService) {
+    private final UserLogService userLogService;
+    private final UserProfileRepository userProfileRepository;
+
+    public ProfileManagerController(ReportiumUserService userService, RoleService roleService, AuthenticationService authenticationService, UserLogService userLogService, UserProfileRepository userProfileRepository) {
         this.userService = userService;
         this.roleService = roleService;
         this.authenticationService = authenticationService;
+        this.userLogService = userLogService;
+        this.userProfileRepository = userProfileRepository;
     }
+
     @GetMapping
     public String userManager(Model model) {
@@ -37,8 +47,11 @@
         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: src/main/java/apps/spring/reportium/web/ReportViewController.java
===================================================================
--- src/main/java/apps/spring/reportium/web/ReportViewController.java	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/java/apps/spring/reportium/web/ReportViewController.java	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -1,8 +1,8 @@
 package apps.spring.reportium.web;
 
-import apps.spring.reportium.entity.DTOs.view_fetching_dtos.AcademicReportViewFetchingDTO;
-import apps.spring.reportium.entity.DTOs.view_fetching_dtos.CrimeReportViewFetchingDTO;
-import apps.spring.reportium.entity.DTOs.view_fetching_dtos.EmploymentReportViewFetchingDTO;
-import apps.spring.reportium.entity.DTOs.view_fetching_dtos.MedicalReportViewFetchingDTO;
+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;
Index: src/main/resources/application-prod.properties
===================================================================
--- src/main/resources/application-prod.properties	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/resources/application-prod.properties	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -6,5 +6,5 @@
 # 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 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/resources/application.properties	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -3,7 +3,2 @@
 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: src/main/resources/sql_queries/advanced_queries.sql
===================================================================
--- src/main/resources/sql_queries/advanced_queries.sql	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
+++ src/main/resources/sql_queries/advanced_queries.sql	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -0,0 +1,22 @@
+-- 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: src/main/resources/templates/home.html
===================================================================
--- src/main/resources/templates/home.html	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/resources/templates/home.html	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -41,8 +41,10 @@
             text-align: center;
         }
-        .badge-yes{
+
+        .badge-yes {
             background-color: #36c634;
         }
-        .badge-no{
+
+        .badge-no {
             background-color: #d14040;
         }
@@ -102,4 +104,5 @@
         <tr>
             <th>#</th>
+            <td>PersonID</td>
             <th>Full Name</th>
             <th>Address</th>
@@ -111,4 +114,5 @@
             <th>Has Employment Report</th>
             <th>Has Medical Report</th>
+            <th>Delete Person</th>
         </tr>
         </thead>
@@ -117,4 +121,5 @@
             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()})}"
@@ -146,4 +151,10 @@
           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/person_reports.html
===================================================================
--- src/main/resources/templates/person_reports.html	(revision 6f1747cfff7e46842571377b2d66216744ec1774)
+++ src/main/resources/templates/person_reports.html	(revision 70207fa53282caa128ef9b08ca647420e0a9e85d)
@@ -725,4 +725,5 @@
                     <span class="stat-value" th:text="${statistics.mostFrequentDiagnosis ?: 'N/A'}">N/A</span>
                 </div>
+
             </div>
 
@@ -739,4 +740,98 @@
                     <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>
+
+                    <!-- Summary footer -->
+                    <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>
