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

Public Member Functions

 AdminAppointmentService (AppointmentRepository appointmentRepository, DoctorRepository doctorRepository, PatientRepository patientRepository)
 Constructor of the AdminAppointmentService.
 
Appointment createAppointment (Appointment appointmentRequest)
 Creates the appointment as admin.
 
Appointment updateAppointment (String id, Appointment updatedData)
 Updates the appointment with new data as admin.
 
void deleteAppointment (String id)
 Delete an appointment as admin.
 
List< Doctor > getAllDoctors ()
 Looks for all the doctors as admin.
 
List< Patient > getAllPatients ()
 Looks for all the patients as admin.
 
List< Appointment > getAllAppointments ()
 Looks for all the existing appointments as admin.
 

Constructor & Destructor Documentation

◆ AdminAppointmentService()

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

Constructor of the AdminAppointmentService.

Parameters
AppointmentRepository
DoctorRepository
PatientRepository

Member Function Documentation

◆ createAppointment()

Appointment com.hospital.portal.service.AdminAppointmentService.createAppointment ( Appointment  appointmentRequest)
inline

Creates the appointment as admin.

Parameters
Anappointment request received from the controller
Returns
A new appointment or an error (doctor or patient not found)

◆ deleteAppointment()

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

Delete an appointment as admin.

Parameters
Idof the appointment to be deleted

◆ getAllAppointments()

List< Appointment > com.hospital.portal.service.AdminAppointmentService.getAllAppointments ( )
inline

Looks for all the existing appointments as admin.

Returns
List of all the appointments

◆ getAllDoctors()

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

Looks for all the doctors as admin.

Returns
List of all the doctors

◆ getAllPatients()

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

Looks for all the patients as admin.

Returns
List of all the patients

◆ updateAppointment()

Appointment com.hospital.portal.service.AdminAppointmentService.updateAppointment ( String  id,
Appointment  updatedData 
)
inline

Updates the appointment with new data as admin.

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

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