Class DoctorServiceImpl

java.lang.Object
com.mirna.hospitalmanagementapi.application.services.DoctorServiceImpl
All Implemented Interfaces:
DoctorService

@Service public class DoctorServiceImpl extends Object implements DoctorService
This class is an implementation of the DoctorService interface. This class provides methods to perform operations on doctors
Version:
1.0
Author:
Mirna Gama
  • Constructor Details

    • DoctorServiceImpl

      public DoctorServiceImpl()
  • Method Details

    • addDoctor

      public Doctor addDoctor(DoctorDTO doctorDTO)
      Adds a new doctor to the database.
      Specified by:
      addDoctor in interface DoctorService
      Parameters:
      doctorDTO - A data transfer object containing the data for Doctor entity.
      Returns:
      The saved doctor if successful, or null if there is an error.
    • findDoctors

      public org.springframework.data.domain.Page<DoctorPublicDataDTO> findDoctors(org.springframework.data.domain.Pageable pageable)
      Finds doctors from the database.
      Specified by:
      findDoctors in interface DoctorService
      Parameters:
      pageable - Pagination information, such as size and page number
      Returns:
      A paginated sublist containing data transfer objects with doctors public information in the repository
    • updateDoctor

      public Doctor updateDoctor(DoctorUpdatedDataDTO doctorUpdatedDataDTO)
      Updates an existing doctor record
      Specified by:
      updateDoctor in interface DoctorService
      Parameters:
      doctorUpdatedDataDTO - Data transfer object containing the doctor updated data along with their corresponding id
      Returns:
      The updated doctor if successful, or null if there is an error.