Interface DoctorService
- All Known Implementing Classes:
DoctorServiceImpl
public interface DoctorService
Doctor service interface for managing doctor information.
- Version:
- 1.0
- Author:
- Mirna Gama
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionAdds a new doctor to the repository.deactivateDoctor(Long id) Deactivates an existing doctor record by provided idfindDoctorById(Long id) Finds a stored doctor by id.org.springframework.data.domain.Page<DoctorPublicDataDTO>findDoctors(org.springframework.data.domain.Pageable pageable) Retrieves a paginated sublist of doctors.updateDoctor(DoctorUpdatedDataDTO doctorUpdatedDataDTO) Updates an existing doctor record
-
Method Details
-
addDoctor
Adds a new doctor to the repository.- Parameters:
doctorDTO- A data transfer object representing a doctor to add.- Returns:
- The saved doctor if successful, or null if there is an error.
-
findDoctorById
Finds a stored doctor by id.- Parameters:
id- A long representing the doctor's unique identifier- Returns:
- The corresponding doctor if successful, or null if it is non-existent.
-
findDoctors
org.springframework.data.domain.Page<DoctorPublicDataDTO> findDoctors(org.springframework.data.domain.Pageable pageable) Retrieves a paginated sublist of doctors.- 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
Updates an existing doctor record- 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.
-
deactivateDoctor
Deactivates an existing doctor record by provided id- Parameters:
id- Long that represents the doctor's unique identifier- Returns:
- The deactivated doctor if successful, or null if there is an error.
-