Input
There are two ways to provide the data necessary for the forecast engine. The engine can directly connect to a database source (MySQL and SQL) or the data can be send through the API as CSV file.
Input using database
Two tables are required. One with hospitalization data and one with hospitalization parts. The description of each table is below.
Field name | Field type | Description |
---|---|---|
hospitalization_id | int | string | The hospitalization ID of the patient who was/is/will be admitted to the hospital. |
plan_date | datetime | null | The date and time at which the patient got a planned admission date and time or null in case this is not known or null in case of an emergency arrival. |
planned_hospitalization_date | datetime | null | The date and time at which the patient was expected to be hospitalized or null in case this is not known or null in case of an emergency arrival. |
VOD | datetime | null | User provided estimated dismissal date and time at which the patient is planned to leave the hospital or null is case this is not known. |
has_OR | boolean | null | A Boolean value (0/1) representing whether the patient have had a surgery or is expected to have a surgery, or null if not available. |
Field name | Field type | Description |
---|---|---|
hospitalization_id | int | string | The hospitalization ID of the patient. |
start_datetime | datetime | The date and time at which the patient occupies a bed on the department, or an expected date and time for an planned future arrival. |
end_datetime | datetime | null | The date and time at which the patient ended his stay on the department or null in case the patient is still occupying the department. |
department | string | The name of the department for this hospitalization part. The forecasts are made for this dimension. If you want to make forecasts for department groups instead of departments, then please provide the names of department groups in this field. |
estimated_transfer_datetime | datetime | null | The estimated date and time at which the patient was/is expected to be transferred to another department as expected by the doctor or null is not available. Note this is null in case of leaving the hospital (for that, use the VOD in Hospitalization table). |
destination_department | string | null | The name of the department where the patient was/is routed to after his current department or null in case this is unknown. |
specialty | string | The specialty that the patient was assigned to during this part of the stay. |
admission_urgency | char(2) (‘el’ = elective, ’em’ = emergency) | How to patient entered this part of the stay. Either as elective (planned) admission, or as unplanned (emergency). |
admission_type | char(1) (‘d’ = day, ‘c’ = clinical) | Whether the patient was admitted for this part of the stay as a day patient (entering and leaving the department on the same day), or as a clinical admission. |
Input using CSV file
Field name | Field type | Description |
---|---|---|
hospitalization_id | int | string | The hospitalization ID of the patient. |
start_datetime | datetime | The date and time at which the patient occupies a bed on the department, or an expected date and time for an planned future arrival. |
end_datetime | datetime | null | The date and time at which the patient ended his stay on the department or null in case the patient is still occupying the department. |
department | string | The name of the department for this hospitalization part. The forecasts are made for this dimension. If you want to make forecasts for department groups instead of departments, then please provide the names of department groups in this field. |
estimated_transfer_datetime | datetime | null | The estimated date and time at which the patient was/is expected to be transferred to another department as expected by the doctor or null is not available. Note this is null in case of leaving the hospital (for that, use the VOD in Hospitalization table). |
destination_department | string | null | The name of the department where the patient was/is routed to after his current department or null in case this is unknown. |
specialty | string | The specialty that the patient was assigned to during this part of the stay. |
admission_urgency | char(2) (‘el’ = elective, ’em’ = emergency) | How to patient entered this part of the stay. Either as elective (planned) admission, or as unplanned (emergency). |
admission_type | char(1) (‘d’ = day, ‘c’ = clinical) | Whether the patient was admitted for this part of the stay as a day patient (entering and leaving the department on the same day), or as a clinical admission. |
plan_date | datetime | null | The date and time at which the patient got a planned admission date and time or null in case this is not known or null in case of an emergency arrival. |
planned_hospitalization_date | datetime | null | The date and time at which the patient was expected to be hospitalized or null in case this is not known or null in case of an emergency arrival. |
VOD | datetime | null | User provided estimated dismissal date and time at which the patient is planned to leave the hospital or null is case this is not known. |
Output
There are two ways to provide the output of forecast engine. The engine can directly write to a database destination (MySQL and SQL) or the output can be send as json response.
Output using database
Two tables are required or created by the engine if they do not already exist. The description of each table is below.
Field name | Field type | Description |
---|---|---|
department | string | The name of the department. |
forecast_datetime | datetime | The date and time for the prediction. |
expected_occupancy | float | The expected occupancy at the department on the date and time. |
lowerbound_occupancy | float | The lowerbound of the confidence interval of the predicted occupancy. |
upperbound_occupancy | float | The upperbound of the confidence interval of the predicted occupancy. |
Field name | Field type | Description |
---|---|---|
department | string | The name of the department. |
forecast_date | date | The date for the prediction. |
emergency_arrivals | float | The expected number of emergency arrivals to happen at the department on the date. |
elective_arrivals | float | The expected number of elective arrivals (which is the number of already planned arrivals and the expected number of patient that will be planned in the period from now to the prediction date) to happen at the department on the date. |
unplanned_arrivals | float | The expected number of patient that will be planned in the period from now to the prediction date. |
Output using json
The json response contains both the hourly and daily forecasts. Refer to the two tables mentioned in the section ‘Output using database’ for the interpretation of the fields in the json response. Click here to see a sample response. Note that the response will be returned in plain text, and not as a file.