Esempio n. 1
0
        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);
        }
Esempio n. 3
0
        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);
 }
Esempio n. 5
0
        public async Task <List <AppointmentTypeDto> > ListPagedAsync(int pageSize)
        {
            _logger.LogInformation("Fetching appointment types from API.");

            return((await _httpService.HttpGetAsync <ListAppointmentTypeResponse>($"appointment-types")).AppointmentTypes);
        }
Esempio n. 6
0
        public async Task <DateTime> ReadAsync()
        {
            _logger.LogInformation("Read today date/time from configuration.");

            return(Convert.ToDateTime(await _httpService.HttpGetAsync($"api/configurations")));
        }
Esempio n. 7
0
 public async Task <RoomDto> GetByIdAsync(int roomId)
 {
     return((await _httpService.HttpGetAsync <GetByIdRoomResponse>($"rooms/{roomId}")).Room);
 }
Esempio n. 8
0
 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);
 }