Table of Contents

Class HospitalCapacitySlotFactory

Namespace
XENBIT.ResQueServe.Core.Models
Assembly
RQS.Core.dll
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

hospitalId long
department PoiHospitalDepartment
maxCapacity int
start DateTimeOffset
end DateTimeOffset
bookings IEnumerable<HospitalBooking>
thresholds HospitalCapacityThresholds
baseOccupied int

Returns

HospitalCapacitySlot

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

bookings IEnumerable<HospitalBooking>
hospitalId long
department PoiHospitalDepartment
start DateTimeOffset
end DateTimeOffset

Returns

int

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

bookings IEnumerable<HospitalBooking>
hospitalId long
department PoiHospitalDepartment
moment DateTimeOffset

Returns

int