Skip to content

In patient Bed Days

Tim Hallett edited this page Nov 26, 2020 · 19 revisions

BEDDAYS_FOOTPRINT HSI may require in-patient care to be delivered and this is specified as a number of “Bed Days”. There are three types of ‘Bed Days’ – “non_bed_space”, “general_bed”, “high_dependancy_bed”

An HSI declares requirements of in-patient bed-days, in a ‘footprint’:

BEDDAYS_FOOTPRINT = hsi_nobd.make_beddays_footprint({'non_bed_space': 0, 'general_bed': 4, 'high_dependency_bed': 1})

NB. You can drop any of the terms and an implicit value 0 is assumed. NB. You do not need to specify any footprint, in which case it is assumed that 0 bed-days are needed.

The health-system keeps track of usage of bed-days. The first day on which a bed-day is consumed is the day on which the HSI is run. If two types of bed-days are specified, then it assumed that then run sequentially and in order of decreasing intensity (i.e. ‘high_dependancy_bed > general_bed > non_bed_space). The number of bed-days is given in terms of ‘whole days’.

The HIS will be run irrespective of the number of the bed-days available. The property of the HSI_Event, self.bed_days_allocated_to_this_event, informs on the bed-days that have been allocated to the HSI_Event. For each type of bed, this will range between 0 and the number specified in the footprint.

It can then be determined if the outcomes of the patients will be affected by the days of in-patient care that are available.

See here for a basic example:

    class HSI_Dummy(HSI_Event, IndividualScopeEventMixin):
        def __init__(self, module, person_id):
            super().__init__(module, person_id=person_id)
            self.TREATMENT_ID = 'Dummy'
            self.EXPECTED_APPT_FOOTPRINT = self.make_appt_footprint({'Over5OPD': 1})
            self.ACCEPTED_FACILITY_LEVEL = 1
            self.ALERT_OTHER_DISEASES = []
            self.BEDDAYS_FOOTPRINT = self.make_beddays_footprint({
                'high_dependency_bed': 10,
                'general_bed': 5,
                'non_bed_space': 2})

        def apply(self, person_id, squeeze_factor):
            print(f'squeeze-factor is {squeeze_factor}')
            print(f'Fraction of bed-days in footprint that is available is {self.bed_days_allocated_to_this_event}')

            # check if the entire footprint requested is allocated
            if all([self.bed_days_allocated_to_this_event[k] == self.BEDDAYS_FOOTPRINT[k] for k in self.BEDDAYS_FOOTPRINT]):
                print('The entire footprint is allocated')

            # equivalently, use the helper function (provided for consistency for other helper function
            if self.is_all_beddays_allocated()
                print('The entire footprint is allocated')
Clone this wiki locally