Proc_LOS | Set length of stay for patient for current area. If ED, based on next destination. If CDU, based on admitted or discharged. If wards, based on age, NEWs and next destination. Set LOS as mean LOS if there is no SD. If there is SD, sample from distribution. |
Proc_NEWS | Change NEWS score based on current location and next destination. Updates lbl_NEWS and lbl_casemix. |
Proc_PreAdmRoute | Decide if admitted patients go to CDU or ward and if discharged go to ambulatory AMU or discharge locations. Decides what ward or discharge location as necessary. Counts number of admissions and gives patient an admitted patient number. |
Proc_quarter of year | Sets quarter of the year based on day of year in simulation. Changes number of arrival per week distribution based on quarter of year, which is in turn sampled from to generate the number of attendances at the start of each week. |
Proc_route | Sets next destination based on case mix, current location and direct/subsequent admission sets lbl_direct to show next wards are subsequent stays. Used by inpatient wards. |
Proc_set_index | Sets index number of work stations and queues from ssActivityInformation (spreadsheet of each workstation and queue within the model and the desired index number to make them identifiable in code). |
Proc_BedDrop | Called when exiting bed. Calculates length of stay and applies cost for bed used. |
Proc_BedPickUp | Called when entering bed. Records type of bed (e.g. AMU) and attaches to lbl_BedHeld |
Proc_DecisionRules | Called when wait time expires in queue/decision rule needs to be implemented. Carries out decision rules (outlined elsewhere) |
Proc_Discharge | Called when patient being discharged. Records results relating to discharge: discharge location, ward discharged from, discharge case mix. |
Proc_DischargeProfile | Called when patient being discharged. Recalculates what time the patient should be discharged to fit with the discharge distribution from data. |
Proc_End | Called as patient leaves model. Records all key variables into results spread sheet. |
Proc_Longterm | Called as patient leaves model. Calculates post hospital mortality, QALYs and cost. |