Example #1
0
        public async Task <ActionResult <CreateDoctorRequest> > CreateDoctor(CreateDoctorRequest request)
        {
            await _schedulerModule.ExecuteCommandAsync(
                new CreateDoctorCommand(
                    request.ClinicId,
                    request.Firstname,
                    request.Lastname,
                    request.DateOfBirth,
                    request.NursesIds));

            return(Ok());
        }
Example #2
0
        public async Task <ActionResult <CreateClinicRequest> > CreateClinic(CreateClinicRequest request)
        {
            await _schedulerModule.ExecuteCommandAsync(
                new CreateClinicCommand(
                    request.Name,
                    request.Location));

            return(Ok());
        }
Example #3
0
        public async Task <ActionResult <AddAccesToCalendarRequest> > AddAccesToCalendar(AddAccesToCalendarRequest request)
        {
            await _schedulerModule.ExecuteCommandAsync(
                new AddNurseToCalendarCommand(
                    request.DoctorId,
                    request.NurseId));

            return(Ok());
        }
        public async Task <ActionResult <AddAppoitmentRequest> > AddAppoitment(AddAppoitmentRequest request)
        {
            await _schedulerModule.ExecuteCommandAsync(
                new CreateAppointmentCommand(
                    request.CalendarId,
                    request.PatientId,
                    request.StartAppoitment,
                    request.EndAppoitment));

            return(Ok());
        }