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

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

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

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

            result.Where(appointment => ids.Contains(appointment.Id));
            return(result);
        }
Example #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);
        }
Example #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);
        }
Example #7
0
        public static AppointmentSpecification ForTodayDivesWithoutPayment()
        {
            var result = new AppointmentSpecification();

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