public static async Task <MicroservicePatientUserDto> GetPatientByIdAsync(int id) { var responseString = await client.GetAsync($"{usersServiceUrl}api/patientUser/getOneEventDto/{id}"); MicroservicePatientUserDto patient = await responseString.Content.ReadAsAsync <MicroservicePatientUserDto>(); return(patient); }
private static AppointmentEventWithPatientDto AppointmentSchedulingEventToAppointmentEventWithPatientDto(AppointmentSchedulingEvent appointmentSchedulingEvent) { MicroservicePatientUserDto patientUserDto = Utility.HttpRequests.GetPatientByIdAsync(appointmentSchedulingEvent.PatientId).Result; return(new AppointmentEventWithPatientDto(patientUserDto, appointmentSchedulingEvent.Step, appointmentSchedulingEvent.Action, appointmentSchedulingEvent.EndPoint, appointmentSchedulingEvent.Attempt)); }