Interface PatientService
- All Known Implementing Classes:
PatientServiceImpl
public interface PatientService
Patient service interface for managing patient information.
- Version:
- 1.0
- Author:
- Mirna Gama
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionaddPatient(PatientDTO patientDTO) Adds a new patient to the repository.findPatientById(Long id) Finds a stored patient by id.org.springframework.data.domain.Page<PatientPublicDataDTO>findPatients(org.springframework.data.domain.Pageable pageable) Retrieves a paginated sublist of doctors.updatePatient(PatientUpdatedDataDTO patientUpdatedDataDTO) Updates an existing patient record
-
Method Details
-
addPatient
Adds a new patient to the repository.- Parameters:
patientDTO- A data transfer object representing a patient to add.- Returns:
- The saved patient if successful, or null if there is an error.
-
findPatientById
Finds a stored patient by id.- Parameters:
id- A long representing the patient's unique identifier- Returns:
- The corresponding patient if successful, or null if it is non-existent.
-
findPatients
org.springframework.data.domain.Page<PatientPublicDataDTO> findPatients(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 patients public information in the repository
-
updatePatient
Updates an existing patient record- Parameters:
patientUpdatedDataDTO- Data transfer object containing the patient updated data along with their corresponding id- Returns:
- The updated patient if successful, or null if there is an error.
-