public void CreateAnAppointmentForPatient(string patient) { _patientSteps.GetThePatientForPatientValue(patient); _patientSteps.StoreThePatient(); _searchForFreeSlotsSteps.GetAvailableFreeSlots(); _searchForFreeSlotsSteps.StoreTheFreeSlotsBundle(); _httpSteps.ConfigureRequest(GpConnectInteraction.AppointmentCreate); CreateAnAppointmentFromTheStoredPatientAndStoredSchedule(); _httpSteps.MakeRequest(GpConnectInteraction.AppointmentCreate); }
private static List <Appointment> GetAppointments(string key, string nhsNumber) { try { _patientSteps.GetThePatientForPatientValue(key); _patientSteps.StoreThePatient(); _appointmentRetrieveSteps.RetrieveAppoinmentsForNhsNumber(nhsNumber); return(_httpContext.FhirResponse.Appointments.Where(app => app.Status != Appointment.AppointmentStatus.Cancelled).ToList()); } catch { Logger.Log.WriteLine($"Could not retrieve Appointments for config Patient ({key}) with NHS Number = {nhsNumber}."); return(new List <Appointment>()); } }