june.policy.medical_care_policies

class june.policy.medical_care_policies.Hospitalisation(start_time='1900-01-01', end_time='2500-01-01', probability_of_care_home_resident_admission=0.3)

Hospitalisation policy. When applied to a sick person, allocates that person to a hospital, if the symptoms are severe enough. When the person recovers, releases the person from the hospital.

Template for a general policy.

start_time:

date at which to start applying the policy

end_time:

date from which the policy won’t apply

__init__(start_time='1900-01-01', end_time='2500-01-01', probability_of_care_home_resident_admission=0.3)

Template for a general policy.

start_time:

date at which to start applying the policy

end_time:

date from which the policy won’t apply

apply(person: june.demography.person.Person, hospitals: june.groups.hospital.Hospitals, record: Optional[Record] = None)
get_spec() → str

Returns the speciailization of the policy.

is_active(date: datetime.datetime) → bool

Returns true if the policy is active, false otherwise

date:

date to check

static read_date(date: Union[str, datetime.datetime]) → datetime.datetime

Read date in two possible formats, either string or datetime.date, both are translated into datetime.datetime to be used by the simulator

date:

date to translate into datetime.datetime

date in datetime format

_abc_impl = <_abc_data object>
class june.policy.medical_care_policies.MedicalCarePolicies(policies: List[june.policy.policy.Policy])

A collection of like policies active on the same date

__init__(policies: List[june.policy.policy.Policy])

A collection of like policies active on the same date

apply(person: june.demography.person.Person, medical_facilities, record: Optional[Record])
classmethod from_policies(policies: june.policy.policy.Policies)
get_active(date: <module 'datetime' from '/home/sadie/anaconda3/envs/june/lib/python3.8/datetime.py'>)
policy_type = 'medical_care'
class june.policy.medical_care_policies.MedicalCarePolicy(start_time='1900-01-01', end_time='2500-01-01')

Template for a general policy.

start_time:

date at which to start applying the policy

end_time:

date from which the policy won’t apply

__init__(start_time='1900-01-01', end_time='2500-01-01')

Template for a general policy.

start_time:

date at which to start applying the policy

end_time:

date from which the policy won’t apply

get_spec() → str

Returns the speciailization of the policy.

is_active(date: datetime.datetime) → bool

Returns true if the policy is active, false otherwise

date:

date to check

static read_date(date: Union[str, datetime.datetime]) → datetime.datetime

Read date in two possible formats, either string or datetime.date, both are translated into datetime.datetime to be used by the simulator

date:

date to translate into datetime.datetime

date in datetime format

_abc_impl = <_abc_data object>