|
| 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.
|
|
◆ DocAppointmentService()
com.hospital.portal.service.DocAppointmentService.DocAppointmentService |
( |
AppointmentRepository |
appointmentRepository, |
|
|
DoctorRepository |
doctorRepository, |
|
|
PatientRepository |
patientRepository |
|
) |
| |
|
inline |
Constructor of the DocAppointmentService.
- Parameters
-
AppointmentRepository | |
DoctorRepository | |
PatientRepository | |
◆ createAppointment()
Appointment com.hospital.portal.service.DocAppointmentService.createAppointment |
( |
String |
dni, |
|
|
Appointment |
appointmentRequest |
|
) |
| |
|
inline |
Creates the appointment as doctor.
- Parameters
-
DNI | of the doctor who is creating the new citation |
An | appointment 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
-
Id | of 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
-
- 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
-
DNI | of the doctor |
From | what date is wanted to retrieve appointments |
To | what 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
-
Id | of the appointment to be updated |
An | appointment 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: