Healthcare Portal
 
Loading...
Searching...
No Matches
com.hospital.portal.service.DocAppointmentService Class Reference

Public Member Functions

 DocAppointmentService (AppointmentRepository appointmentRepository, DoctorRepository doctorRepository, PatientRepository patientRepository)
 Constructor of the DocAppointmentService.
 
List< Doctor > getAllDoctors ()
 Looks for all the doctors as a Doctor.
 
List< Patient > getAllPatients ()
 Looks for all the patients as a Doctor.
 
List< Appointment > getAppointmentsByDoctor (String dni)
 Looks for all the appointments the doctor logged in has.
 
Appointment createAppointment (String dni, Appointment appointmentRequest)
 Creates the appointment as doctor.
 
Appointment updateAppointment (String id, Appointment newAppointmentData)
 Updates the appointment with new data as doctor.
 
void deleteAppointment (String id)
 Delete an appointment as doctor.
 
List< Appointment > getAppointmentsByDoctorAndDateRange (String dni, LocalDate startDate, LocalDate endDate)
 List all the appointments the specified doctor has in a range of dates.
 

Constructor & Destructor Documentation

◆ DocAppointmentService()

com.hospital.portal.service.DocAppointmentService.DocAppointmentService ( AppointmentRepository  appointmentRepository,
DoctorRepository  doctorRepository,
PatientRepository  patientRepository 
)
inline

Constructor of the DocAppointmentService.

Parameters
AppointmentRepository
DoctorRepository
PatientRepository

Member Function Documentation

◆ createAppointment()

Appointment com.hospital.portal.service.DocAppointmentService.createAppointment ( String  dni,
Appointment  appointmentRequest 
)
inline

Creates the appointment as doctor.

Parameters
DNIof the doctor who is creating the new citation
Anappointment request received from the controller
Returns
A new appointment or an error (doctor not found)

◆ deleteAppointment()

void com.hospital.portal.service.DocAppointmentService.deleteAppointment ( String  id)
inline

Delete an appointment as doctor.

Parameters
Idof the appointment to be deleted

◆ getAllDoctors()

List< Doctor > com.hospital.portal.service.DocAppointmentService.getAllDoctors ( )
inline

Looks for all the doctors as a Doctor.

Returns
List of all the doctors

◆ getAllPatients()

List< Patient > com.hospital.portal.service.DocAppointmentService.getAllPatients ( )
inline

Looks for all the patients as a Doctor.

Returns
List of all the patients

◆ getAppointmentsByDoctor()

List< Appointment > com.hospital.portal.service.DocAppointmentService.getAppointmentsByDoctor ( String  dni)
inline

Looks for all the appointments the doctor logged in has.

Parameters
DNIof the doctor
Returns
List of all the appointments

◆ getAppointmentsByDoctorAndDateRange()

List< Appointment > com.hospital.portal.service.DocAppointmentService.getAppointmentsByDoctorAndDateRange ( String  dni,
LocalDate  startDate,
LocalDate  endDate 
)
inline

List all the appointments the specified doctor has in a range of dates.

Parameters
DNIof the doctor
Fromwhat date is wanted to retrieve appointments
Towhat date is wanted to retrieve appointments
Returns
List of appointments between the dates specified

◆ updateAppointment()

Appointment com.hospital.portal.service.DocAppointmentService.updateAppointment ( String  id,
Appointment  newAppointmentData 
)
inline

Updates the appointment with new data as doctor.

Parameters
Idof the appointment to be updated
Anappointment with the updated data
Returns
The updated appointment or error (apppointment not found). Saves the changed appointment

The documentation for this class was generated from the following file: