public async Task <AppointmentDto> GetByIdAsync(Guid scheduleId, Guid appointmentId) { string route = GetByIdAppointmentRequest.Route.Replace($"{{{nameof(GetByIdAppointmentRequest.ScheduleId)}}}", scheduleId.ToString()); route = route.Replace("{AppointmentId}", appointmentId.ToString()); return((await _httpService.HttpGetAsync <GetByIdAppointmentResponse>(route)).Appointment); }
public async Task <List <ScheduleDto> > ListAsync() { _logger.LogInformation("Fetching schedules from API."); var route = ListScheduleRequest.Route; return((await _httpService.HttpGetAsync <ListScheduleResponse>(route)).Schedules); }
public async Task <string> ReadPicture(string pictureName) { if (string.IsNullOrEmpty(pictureName)) { return(null); } var fileItem = await _httpService.HttpGetAsync <FileItem>($"files/{pictureName}"); return(fileItem == null ? null : fileItem.DataBase64); }
public async Task <PatientDto> GetByIdAsync(int patientId) { return((await _httpService.HttpGetAsync <GetByIdPatientResponse>($"patients/{patientId}")).Patient); }
public async Task <List <AppointmentTypeDto> > ListPagedAsync(int pageSize) { _logger.LogInformation("Fetching appointment types from API."); return((await _httpService.HttpGetAsync <ListAppointmentTypeResponse>($"appointment-types")).AppointmentTypes); }
public async Task <DateTime> ReadAsync() { _logger.LogInformation("Read today date/time from configuration."); return(Convert.ToDateTime(await _httpService.HttpGetAsync($"api/configurations"))); }
public async Task <RoomDto> GetByIdAsync(int roomId) { return((await _httpService.HttpGetAsync <GetByIdRoomResponse>($"rooms/{roomId}")).Room); }
public async Task <DoctorDto> GetByIdAsync(int doctorId) { return((await _httpService.HttpGetAsync <GetByIdDoctorResponse>($"doctors/{doctorId}")).Doctor); }
public async Task <ClientDto> GetByIdAsync(int clientId) { return((await _httpService.HttpGetAsync <GetByIdClientResponse>($"clients/{clientId}")).Client); }
public async Task <AppointmentDto> GetByIdAsync(Guid appointmentId) { return((await _httpService.HttpGetAsync <GetByIdAppointmentResponse>($"appointments/{appointmentId}")).Appointment); }