Search in sources :

Example 6 with ScheduleDetail

use of uk.gov.hscic.model.appointment.ScheduleDetail in project gpconnect-demonstrator by nhsconnect.

the class ScheduleResourceProvider method getSchedulesForLocationId.

public List<Schedule> getSchedulesForLocationId(String locationId, Date startDateTime, Date endDateTime) {
    ArrayList<Schedule> schedules = new ArrayList<>();
    List<ScheduleDetail> scheduleDetails = scheduleSearch.findScheduleForLocationId(Long.valueOf(locationId), startDateTime, endDateTime);
    if (scheduleDetails != null && !scheduleDetails.isEmpty()) {
        for (ScheduleDetail scheduleDetail : scheduleDetails) {
            schedules.add(scheduleDetailToScheduleResourceConverter(scheduleDetail));
        }
    }
    return schedules;
}
Also used : Schedule(org.hl7.fhir.dstu3.model.Schedule) ArrayList(java.util.ArrayList) ScheduleDetail(uk.gov.hscic.model.appointment.ScheduleDetail)

Aggregations

ScheduleDetail (uk.gov.hscic.model.appointment.ScheduleDetail)6 AppointmentDetail (uk.gov.hscic.model.appointment.AppointmentDetail)3 SlotDetail (uk.gov.hscic.model.appointment.SlotDetail)3 IdDt (ca.uhn.fhir.model.primitive.IdDt)2 MethodOutcome (ca.uhn.fhir.rest.api.MethodOutcome)2 AppointmentParticipantComponent (org.hl7.fhir.dstu3.model.Appointment.AppointmentParticipantComponent)2 VC (uk.gov.hscic.common.validators.VC)2 BookingOrgDetail (uk.gov.hscic.model.appointment.BookingOrgDetail)2 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 Schedule (org.hl7.fhir.dstu3.model.Schedule)1 FHIRException (org.hl7.fhir.exceptions.FHIRException)1 PatientEntity (uk.gov.hscic.patient.details.PatientEntity)1