Exemplo n.º 1
0
        //--------------------------------------------------------------------------------------------------
        // Constructing
        //--------------------------------------------------------------------------------------------------

        #region Constructor

        /// <summary>
        /// Basic constructor of emergency department controls
        /// </summary>
        /// <param name="name">String identifier of control unit</param>
        /// <param name="parentControlUnit">Parent management control unit</param>
        /// <param name="parentSimulationModel">Parent simulation model</param>
        /// <param name="inputData">Outpatient input data</param>
        /// <param name="handledOutpatientAdmissionTypes">Outpatient admission types that are handled by the control unit</param>
        /// <param name="waitinListControlUnit">Corresponding waiting list control unit</param>
        public ControlUnitOutpatient(string name,
                                     ControlUnit parentControlUnit,
                                     OutpatientAdmissionTypes[] handledOutpatientAdmissionTypes,
                                     SimulationModel parentSimulationModel,
                                     ControlUnit waitinListControlUnit,
                                     IInputOutpatient inputData)
            : base(ControlUnitType.Outpatient,
                   name,
                   parentControlUnit,
                   parentSimulationModel,
                   inputData)
        {
            if (handledOutpatientAdmissionTypes != null)
            {
                _handledOutpatientAdmissionTypes = handledOutpatientAdmissionTypes.ToArray();
            }
            else
            {
                _handledOutpatientAdmissionTypes = Helpers <OutpatientAdmissionTypes> .EmptyArray();
            }

            _waitingListControlUnit = waitinListControlUnit;
            _inputData = inputData;

            _delegateHandlingMethods.Add(typeof(DelegateAvailabilitiesForRequest), DefaultDelegateHandling.HandleImmediateSpecialServiceRequest);
        } // end of ControlUnitOutpatient
Exemplo n.º 2
0
        //--------------------------------------------------------------------------------------------------
        // Constructor
        //--------------------------------------------------------------------------------------------------

        #region Constructor

        /// <summary>
        /// Basic constructor.
        /// </summary>
        /// <param name="parentControlUnit">Parent outpatient control</param>
        /// <param name="patient">Arriving patient</param>
        /// <param name="inputData">Corresponding input data</param>
        public EventOutpatientWalkInPatientArrival(ControlUnit parentControlUnit,
                                                   IInputOutpatient inputData,
                                                   EntityPatient patient)
            : base(EventType.Standalone, parentControlUnit)
        {
            _patient   = patient;
            _inputData = inputData;
        } // end of EventOutpatientWalkInPatientArrival
 /// <summary>
 /// Basic constructor
 /// </summary>
 /// <param name="parentControlUnit">Parent waiting list control</param>
 /// <param name="waitingListSchedule">Waiting list schedule for slot booking</param>
 /// <param name="inputData">Outpatient input data</param>
 public EventOutpatientStartDispatching(ControlUnit parentControlUnit,
                                        EntityWaitingListSchedule waitingListSchedule,
                                        IInputOutpatient inputData)
     : base(EventType.Standalone, parentControlUnit)
 {
     _waitingListSchedule = waitingListSchedule;
     _inputData           = inputData;
 } // end of Event
 /// <summary>
 /// Basic constructor
 /// </summary>
 /// <param name="name">String identifier of control unit</param>
 /// <param name="parentControlUnit">Parent outpatient control</param>
 /// <param name="parentSimulationModel">Parent simulation model</param>
 /// <param name="input">Corresponding outpatient input data</param>
 /// <param name="assigningAtEvents">Flag if slots are assigned at events only, or immediately</param>
 public OutpatientWaitingListSingleScheduleControl(string name,
                                                   ControlUnit parentControlUnit,
                                                   SimulationModel parentSimulationModel,
                                                   IInputOutpatient input,
                                                   bool assigningAtTimes)
     : base(name, parentControlUnit, parentSimulationModel, input, assigningAtTimes)
 {
 }
Exemplo n.º 5
0
 // <summary>
 /// Basic constructor
 /// </summary>
 /// <param name="ID">Entity ID</param>
 /// <param name="input">Required input for the booking model</param>
 /// <param name="bookingModelsPerType">A Dictionary of instances of the specified type and booking mdeols</param>
 /// <param name="extractBookingReferenceFromRequest">A method that finds a booking model specifier for a request</param>
 public EntityMultipleBookingWaitingListSchedule(
     int ID,
     IInputOutpatient input,
     Dictionary <T, IBookingModel> bookingModelsPerType,
     FindBookingModelForRequest extractBookingReferenceFromRequest)
     : base(ID, input)
 {
     _bookingModelsPerType = bookingModelsPerType;
     BookingModelReference = extractBookingReferenceFromRequest;
 } // end of EntityMultipleBookingWaitingListSchedule
Exemplo n.º 6
0
 /// <summary>
 /// Basic constructor
 /// </summary>
 /// <param name="parentControlUnit">Parent waiting list conrol</param>
 /// <param name="outpatientControlUnit">Parent outpatient department control</param>
 /// <param name="patient">Arriving patient</param>
 /// <param name="admissionType">Admission type of arriving patient</param>
 /// <param name="input">Corresponding outpatient input data</param>
 public EventOutpatientWaitingListPatientArrival(ControlUnit parentControlUnit,
                                                 ControlUnitOutpatient outpatientControlUnit,
                                                 EntityPatient patient,
                                                 Admission admissionType,
                                                 IInputOutpatient input)
     : base(EventType.Standalone, parentControlUnit)
 {
     _patient               = patient;
     _admissionType         = admissionType;
     _outpatientControlUnit = outpatientControlUnit;
     _inputData             = input;
 } // end of Event
Exemplo n.º 7
0
 /// <summary>
 /// Basic constructor.
 /// </summary>
 /// <param name="parentControlUnit">Parent outpatient control</param>
 /// <param name="patient">Arriving patient</param>
 /// <param name="scheduledTime">Scheduled time of arrival</param>
 /// <param name="inputData">Corresponding input data</param>
 /// <param name="admission">Corresponding admission of arrival</param>
 public EventOutpatientArrival(ControlUnit parentControlUnit,
                               EntityPatient patient,
                               DateTime scheduledTime,
                               IInputOutpatient inputData,
                               Admission admission)
     : base(EventType.Standalone, parentControlUnit)
 {
     _scheduledTime = scheduledTime;
     _patient       = patient;
     _inputData     = inputData;
     _admission     = admission;
 } // end of Event
 /// <summary>
 /// Basic constructor
 /// </summary>
 /// <param name="name">String identifier of control unit</param>
 /// <param name="parentControlUnit">Parent outpatient control</param>
 /// <param name="parentSimulationModel">Parent simulation model</param>
 /// <param name="input">Corresponding outpatient input data</param>
 /// <param name="assigningAtEvents">Flag if slots are assigned at events only, or immediately</param>
 public OutpatientWaitingListControlUnit(string name,
                                         ControlUnit parentControlUnit,
                                         SimulationModel parentSimulationModel,
                                         IInputOutpatient input,
                                         bool assigningAtEvents)
     : base(ControlUnitType.OutpatientWaitingList, name, parentControlUnit, parentSimulationModel)
 {
     _inputData             = input;
     _assigningSlotAtEvents = assigningAtEvents;
     _doDispatching         = false;
     _waitingListSchedule   = input.GetWaitingListSchedule();
 }
 /// <summary>
 /// Basic constructor just calls base constructor
 /// </summary>
 /// <param name="name">String identifier of control unit</param>
 /// <param name="parentControlUnit">Parent management control unit</param>
 /// <param name="parentSimulationModel">Parent simulation model</param>
 /// <param name="inputData">Outpatient input data</param>
 /// <param name="handledOutpatientAdmissionTypes">Outpatient admission types that are handled by the control unit</param>
 /// <param name="waitinListControlUnit">Corresponding waiting list control unit</param>
 public ControlUnitOutpatientMedium(string name,
                                    ControlUnit parentControlUnit,
                                    SimulationModel parentSimulationModel,
                                    IInputOutpatient inputData,
                                    ControlUnit waitingListControlUnit)
     : base(name,
            parentControlUnit,
            inputData.GetAdmissionTypes(),
            parentSimulationModel,
            waitingListControlUnit, inputData)
 {
 } // end of OutpatientControlUnit