示例#1
0
        public static AppointmentSpecification ByDay(DateTime day)
        {
            var result = new AppointmentSpecification();

            result.Where(appointment => appointment.TherapySession.DateTime.Date == day);
            return(result);
        }
示例#2
0
        public static AppointmentSpecification ByPatientOrRelative(Guid patientId)
        {
            var result = new AppointmentSpecification();

            result.Where(HasPatientOrRelative(patientId));
            return(result);
        }
示例#3
0
        public static AppointmentSpecification ById(Guid id)
        {
            var result = new AppointmentSpecification();

            result.Where(appointment => appointment.Id == id);
            return(result);
        }
示例#4
0
        public static AppointmentSpecification ByIds(IEnumerable <Guid> ids)
        {
            var result = new AppointmentSpecification();

            result.Where(appointment => ids.Contains(appointment.Id));
            return(result);
        }
示例#5
0
        public static AppointmentSpecification BySeats(IEnumerable <Guid> seatIds)
        {
            var result = new AppointmentSpecification();

            result.Where(appointment =>
                         appointment.AppointmentChamberSeats
                         .Any(chamberSeat => seatIds.Contains(chamberSeat.ChamberSeat.Id)));
            return(result);
        }
示例#6
0
        public static AppointmentSpecification ByTherapySessionAndPatient(Guid therapySessionId, Guid patientId)
        {
            var result = new AppointmentSpecification();

            result.Where(appointment =>
                         appointment.TherapySession.Id == therapySessionId &&
                         appointment.Patient.Id == patientId);
            return(result);
        }
示例#7
0
        public static AppointmentSpecification ForTodayDivesWithoutPayment()
        {
            var result = new AppointmentSpecification();

            result
            .Where(IsDive())
            .Where(OccursToday())
            .Where(HasNoPayment());
            return(result);
        }