Class HospitalCapacitySlotFactory
public static class HospitalCapacitySlotFactory
- Inheritance
-
HospitalCapacitySlotFactory
- Inherited Members
Methods
FromBookings(long, PoiHospitalDepartment, int, DateTimeOffset, DateTimeOffset, IEnumerable<HospitalBooking>, HospitalCapacityThresholds?, int)
public static HospitalCapacitySlot FromBookings(long hospitalId, PoiHospitalDepartment department, int maxCapacity, DateTimeOffset start, DateTimeOffset end, IEnumerable<HospitalBooking> bookings, HospitalCapacityThresholds? thresholds = null, int baseOccupied = 0)
Parameters
hospitalIdlongdepartmentPoiHospitalDepartmentmaxCapacityintstartDateTimeOffsetendDateTimeOffsetbookingsIEnumerable<HospitalBooking>thresholdsHospitalCapacityThresholdsbaseOccupiedint
Returns
MaxOccupied(IEnumerable<HospitalBooking>, long, PoiHospitalDepartment, DateTimeOffset, DateTimeOffset)
The most patients the department of the hospital treats at the same time within the interval (the bookings overlap only partly, so the highest count at any moment).
public static int MaxOccupied(IEnumerable<HospitalBooking> bookings, long hospitalId, PoiHospitalDepartment department, DateTimeOffset start, DateTimeOffset end)
Parameters
bookingsIEnumerable<HospitalBooking>hospitalIdlongdepartmentPoiHospitalDepartmentstartDateTimeOffsetendDateTimeOffset
Returns
Taken(IEnumerable<HospitalBooking>, long, PoiHospitalDepartment, DateTimeOffset)
The places of the department taken at moment: a booking takes its place from when the
form was sent (CreatedOn) until the end of the treatment, as the hospital
keeps the place free for the announced patient.
public static int Taken(IEnumerable<HospitalBooking> bookings, long hospitalId, PoiHospitalDepartment department, DateTimeOffset moment)
Parameters
bookingsIEnumerable<HospitalBooking>hospitalIdlongdepartmentPoiHospitalDepartmentmomentDateTimeOffset