Class AppointmentsController
- Namespace
- API.CliniCore.Controllers
- Assembly
- API.CliniCore.dll
[ApiController]
[Route("api/appointments")]
public class AppointmentsController : ControllerBase
- Inheritance
-
AppointmentsController
- Inherited Members
Constructors
AppointmentsController(SchedulerService, ProfileService)
public AppointmentsController(SchedulerService schedulerService, ProfileService profileService)
Parameters
schedulerServiceSchedulerServiceprofileServiceProfileService
Methods
Cancel(Guid, CancelAppointmentRequest?)
Cancel an appointment
[HttpPost("{id}/cancel")]
public ActionResult<AppointmentDto> Cancel(Guid id, CancelAppointmentRequest? request = null)
Parameters
idGuidrequestCancelAppointmentRequest
Returns
Create(CreateAppointmentRequest)
Create a new appointment
[HttpPost]
public ActionResult<AppointmentDto> Create(CreateAppointmentRequest request)
Parameters
requestCreateAppointmentRequest
Returns
Delete(Guid)
Delete an appointment
[HttpDelete("{id}")]
public IActionResult Delete(Guid id)
Parameters
idGuid
Returns
GetAll(string?, DateTime?, DateTime?)
Get all appointments
[HttpGet]
public ActionResult<IEnumerable<AppointmentDto>> GetAll(string? status = null, DateTime? fromDate = null, DateTime? toDate = null)
Parameters
Returns
GetAvailableSlots(Guid, int, DateTime?, int)
Get available time slots for a physician
[HttpGet("physician/{physicianId}/available-slots")]
public ActionResult<IEnumerable<object>> GetAvailableSlots(Guid physicianId, int durationMinutes = 30, DateTime? afterDate = null, int maxSlots = 10)
Parameters
Returns
GetById(Guid)
Get an appointment by ID
[HttpGet("{id}")]
public ActionResult<AppointmentDto> GetById(Guid id)
Parameters
idGuid
Returns
GetByPatient(Guid, string?)
Get appointments for a patient
[HttpGet("patient/{patientId}")]
public ActionResult<IEnumerable<AppointmentDto>> GetByPatient(Guid patientId, string? status = null)
Parameters
Returns
GetByPhysician(Guid, DateTime?, DateTime?, DateTime?)
Get appointments for a physician
[HttpGet("physician/{physicianId}")]
public ActionResult<IEnumerable<AppointmentDto>> GetByPhysician(Guid physicianId, DateTime? date = null, DateTime? fromDate = null, DateTime? toDate = null)
Parameters
Returns
GetStatuses()
Get appointment status values
[HttpGet("statuses")]
public ActionResult<IEnumerable<string>> GetStatuses()
Returns
Update(Guid, UpdateAppointmentRequest)
Update an existing appointment
[HttpPut("{id}")]
public ActionResult<AppointmentDto> Update(Guid id, UpdateAppointmentRequest request)
Parameters
idGuidrequestUpdateAppointmentRequest