tlo.methods.rti module

Road traffic injury module.

class RTI(name=None, resourcefilepath=None)

The road traffic injuries module for the TLO model, handling all injuries related to road traffic accidents.

Construct a new disease module ready to be included in a simulation.

Initialises an empty parameters dictionary and module-specific random number generator.

Parameters:

name – the name to use for this module. Defaults to the concrete subclass’ name.

Bases: tlo.core.Module, tlo.methods.hsi_generic_first_appts.GenericFirstAppointmentsMixin

PARAMETERS:

Item

Type

Description

base_rate_injrti

REAL

Base rate of RTI per year

rr_injrti_age04

REAL

risk ratio of RTI in age 0-4 compared to base rate of RTI

rr_injrti_age59

REAL

risk ratio of RTI in age 5-9 compared to base rate of RTI

rr_injrti_age1017

REAL

risk ratio of RTI in age 10-17 compared to base rate of RTI

rr_injrti_age1829

REAL

risk ratio of RTI in age 18-29 compared to base rate of RTI

rr_injrti_age3039

REAL

risk ratio of RTI in age 30-39 compared to base rate of RTI

rr_injrti_age4049

REAL

risk ratio of RTI in age 40-49 compared to base rate of RTI

rr_injrti_age5059

REAL

risk ratio of RTI in age 50-59 compared to base rate of RTI

rr_injrti_age6069

REAL

risk ratio of RTI in age 60-69 compared to base rate of RTI

rr_injrti_age7079

REAL

risk ratio of RTI in age 70-79 compared to base rate of RTI

rr_injrti_male

REAL

risk ratio of RTI when male compared to females

rr_injrti_excessalcohol

REAL

risk ratio of RTI in those that consume excess alcohol compared to those who do not

imm_death_proportion_rti

REAL

Proportion of those involved in an RTI that die at site of accident or die before seeking medical intervention

prob_bleeding_leads_to_shock

REAL

The proportion of those with heavily bleeding injuries who go into shock

prob_death_iss_less_than_9

REAL

Proportion of people who pass away in the following month after medical treatment for injuries with an ISSscore less than or equal to 9

prob_death_iss_10_15

REAL

Proportion of people who pass away in the following month after medical treatment for injuries with an ISSscore from 10 to 15

prob_death_iss_16_24

REAL

Proportion of people who pass away in the following month after medical treatment for injuries with an ISSscore from 16 to 24

prob_death_iss_25_35

REAL

Proportion of people who pass away in the following month after medical treatment for injuries with an ISSscore from 25 to 34

prob_death_iss_35_plus

REAL

Proportion of people who pass away in the following month after medical treatment for injuries with an ISSscore 35 and above

prob_perm_disability_with_treatment_severe_TBI

REAL

probability that someone with a treated severe TBI is permanently disabled

prob_death_TBI_SCI_no_treatment

REAL

probability that someone with a spinal cord injury will die without treatment

prop_death_burns_no_treatment

REAL

probability that someone with a burn injury will die without treatment

prob_death_fractures_no_treatment

REAL

probability that someone with a fracture injury will die without treatment

prob_TBI_require_craniotomy

REAL

probability that someone with a traumatic brain injury will require a craniotomy surgery

prob_exploratory_laparotomy

REAL

probability that someone with an internal organ injury will require a exploratory_laparotomy

prob_depressed_skull_fracture

REAL

Probability that a skull fracture will be depressed and therefore require surgery

prob_mild_burns

REAL

Probability that a burn within a region will result in < 10% total body surface area

prob_dislocation_requires_surgery

REAL

Probability that a dislocation will require surgery to relocate the joint.

number_of_injured_body_regions_distribution

LIST

The distribution of number of injured AIS body regions, used to decide how many injuries a person has

injury_location_distribution

LIST

The distribution of where injuries are located in the body, based on the AIS body region definition

mean_los_ISS_less_than_4

REAL

Mean length of stay for someone with an ISS score < 4

sd_los_ISS_less_than_4

REAL

Standard deviation in length of stay for someone with an ISS score < 4

mean_los_ISS_4_to_8

REAL

Mean length of stay for someone with an ISS score between 4 and 8

sd_los_ISS_4_to_8

REAL

Standard deviation in length of stay for someone with an ISS score between 4 and 8

mean_los_ISS_9_to_15

REAL

Mean length of stay for someone with an ISS score between 9 and 15

sd_los_ISS_9_to_15

REAL

Standard deviation in length of stay for someone with an ISS score between 9 and 15

mean_los_ISS_16_to_24

REAL

Mean length of stay for someone with an ISS score between 16 and 24

sd_los_ISS_16_to_24

REAL

Standard deviation in length of stay for someone with an ISS score between 16 and 24

mean_los_ISS_more_than_25

REAL

Mean length of stay for someone with an ISS score between 16 and 24

sd_los_ISS_more_that_25

REAL

Standard deviation in length of stay for someone with an ISS score between 16 and 24

daly_wt_unspecified_skull_fracture

REAL

daly_wt_unspecified_skull_fracture - code 1674

daly_wt_basilar_skull_fracture

REAL

daly_wt_basilar_skull_fracture - code 1675

daly_wt_epidural_hematoma

REAL

daly_wt_epidural_hematoma - code 1676

daly_wt_subdural_hematoma

REAL

daly_wt_subdural_hematoma - code 1677

daly_wt_subarachnoid_hematoma

REAL

daly_wt_subarachnoid_hematoma - code 1678

daly_wt_brain_contusion

REAL

daly_wt_brain_contusion - code 1679

daly_wt_intraventricular_haemorrhage

REAL

daly_wt_intraventricular_haemorrhage - code 1680

daly_wt_diffuse_axonal_injury

REAL

daly_wt_diffuse_axonal_injury - code 1681

daly_wt_subgaleal_hematoma

REAL

daly_wt_subgaleal_hematoma - code 1682

daly_wt_midline_shift

REAL

daly_wt_midline_shift - code 1683

daly_wt_facial_fracture

REAL

daly_wt_facial_fracture - code 1684

daly_wt_facial_soft_tissue_injury

REAL

daly_wt_facial_soft_tissue_injury - code 1685

daly_wt_eye_injury

REAL

daly_wt_eye_injury - code 1686

daly_wt_neck_soft_tissue_injury

REAL

daly_wt_neck_soft_tissue_injury - code 1687

daly_wt_neck_internal_bleeding

REAL

daly_wt_neck_internal_bleeding - code 1688

daly_wt_neck_dislocation

REAL

daly_wt_neck_dislocation - code 1689

daly_wt_chest_wall_bruises_hematoma

REAL

daly_wt_chest_wall_bruises_hematoma - code 1690

daly_wt_hemothorax

REAL

daly_wt_hemothorax - code 1691

daly_wt_lung_contusion

REAL

daly_wt_lung_contusion - code 1692

daly_wt_diaphragm_rupture

REAL

daly_wt_diaphragm_rupture - code 1693

daly_wt_rib_fracture

REAL

daly_wt_rib_fracture - code 1694

daly_wt_flail_chest

REAL

daly_wt_flail_chest - code 1695

daly_wt_chest_wall_laceration

REAL

daly_wt_chest_wall_laceration - code 1696

daly_wt_closed_pneumothorax

REAL

daly_wt_closed_pneumothorax - code 1697

daly_wt_open_pneumothorax

REAL

daly_wt_open_pneumothorax - code 1698

daly_wt_surgical_emphysema

REAL

daly_wt_surgical_emphysema aka subcuteal emphysema - code 1699

daly_wt_abd_internal_organ_injury

REAL

daly_wt_abd_internal_organ_injury - code 1700

daly_wt_spinal_cord_lesion_neck_with_treatment

REAL

daly_wt_spinal_cord_lesion_neck_with_treatment - code 1701

daly_wt_spinal_cord_lesion_neck_without_treatment

REAL

daly_wt_spinal_cord_lesion_neck_without_treatment - code 1702

daly_wt_spinal_cord_lesion_below_neck_with_treatment

REAL

daly_wt_spinal_cord_lesion_below_neck_with_treatment - code 1703

daly_wt_spinal_cord_lesion_below_neck_without_treatment

REAL

daly_wt_spinal_cord_lesion_below_neck_without_treatment - code 1704

daly_wt_vertebrae_fracture

REAL

daly_wt_vertebrae_fracture - code 1705

daly_wt_clavicle_scapula_humerus_fracture

REAL

daly_wt_clavicle_scapula_humerus_fracture - code 1706

daly_wt_hand_wrist_fracture_with_treatment

REAL

daly_wt_hand_wrist_fracture_with_treatment - code 1707

daly_wt_hand_wrist_fracture_without_treatment

REAL

daly_wt_hand_wrist_fracture_without_treatment - code 1708

daly_wt_radius_ulna_fracture_short_term_with_without_treatment

REAL

daly_wt_radius_ulna_fracture_short_term_with_without_treatment - code 1709

daly_wt_radius_ulna_fracture_long_term_without_treatment

REAL

daly_wt_radius_ulna_fracture_long_term_without_treatment - code 1710

daly_wt_dislocated_shoulder

REAL

daly_wt_dislocated_shoulder - code 1711

daly_wt_amputated_finger

REAL

daly_wt_amputated_finger - code 1712

daly_wt_amputated_thumb

REAL

daly_wt_amputated_thumb - code 1713

daly_wt_unilateral_arm_amputation_with_treatment

REAL

daly_wt_unilateral_arm_amputation_with_treatment - code 1714

daly_wt_unilateral_arm_amputation_without_treatment

REAL

daly_wt_unilateral_arm_amputation_without_treatment - code 1715

daly_wt_bilateral_arm_amputation_with_treatment

REAL

daly_wt_bilateral_arm_amputation_with_treatment - code 1716

daly_wt_bilateral_arm_amputation_without_treatment

REAL

daly_wt_bilateral_arm_amputation_without_treatment - code 1717

daly_wt_foot_fracture_short_term_with_without_treatment

REAL

daly_wt_foot_fracture_short_term_with_without_treatment - code 1718

daly_wt_foot_fracture_long_term_without_treatment

REAL

daly_wt_foot_fracture_long_term_without_treatment - code 1719

daly_wt_patella_tibia_fibula_fracture_with_treatment

REAL

daly_wt_patella_tibia_fibula_fracture_with_treatment - code 1720

daly_wt_patella_tibia_fibula_fracture_without_treatment

REAL

daly_wt_patella_tibia_fibula_fracture_without_treatment - code 1721

daly_wt_hip_fracture_short_term_with_without_treatment

REAL

daly_wt_hip_fracture_short_term_with_without_treatment - code 1722

daly_wt_hip_fracture_long_term_with_treatment

REAL

daly_wt_hip_fracture_long_term_with_treatment - code 1723

daly_wt_hip_fracture_long_term_without_treatment

REAL

daly_wt_hip_fracture_long_term_without_treatment - code 1724

daly_wt_pelvis_fracture_short_term

REAL

daly_wt_pelvis_fracture_short_term - code 1725

daly_wt_pelvis_fracture_long_term

REAL

daly_wt_pelvis_fracture_long_term - code 1726

daly_wt_femur_fracture_short_term

REAL

daly_wt_femur_fracture_short_term - code 1727

daly_wt_femur_fracture_long_term_without_treatment

REAL

daly_wt_femur_fracture_long_term_without_treatment - code 1728

daly_wt_dislocated_hip

REAL

daly_wt_dislocated_hip - code 1729

daly_wt_dislocated_knee

REAL

daly_wt_dislocated_knee - code 1730

daly_wt_amputated_toes

REAL

daly_wt_amputated_toes - code 1731

daly_wt_unilateral_lower_limb_amputation_with_treatment

REAL

daly_wt_unilateral_lower_limb_amputation_with_treatment - code 1732

daly_wt_unilateral_lower_limb_amputation_without_treatment

REAL

daly_wt_unilateral_lower_limb_amputation_without_treatment - code 1733

daly_wt_bilateral_lower_limb_amputation_with_treatment

REAL

daly_wt_bilateral_lower_limb_amputation_with_treatment - code 1734

daly_wt_bilateral_lower_limb_amputation_without_treatment

REAL

daly_wt_bilateral_lower_limb_amputation_without_treatment - code 1735

rt_emergency_care_ISS_score_cut_off

INT

A parameter to determine which level of injury severity corresponds to the emergency health care seeking symptom and which to the non-emergency generic injury symptom

prob_death_MAIS3

REAL

A parameter to determine the probability of death without medical intervention with a military AISscore of 3

prob_death_MAIS4

REAL

A parameter to determine the probability of death without medical intervention with a military AISscore of 4

prob_death_MAIS5

REAL

A parameter to determine the probability of death without medical intervention with a military AISscore of 5

prob_death_MAIS6

REAL

A parameter to determine the probability of death without medical intervention with a military AISscore of 6

femur_fracture_skeletal_traction_mean_los

INT

The mean length of stay for a person with a femur fracture being treated with skeletal traction

other_skeletal_traction_los

INT

The mean length of stay for a person with a non-femur fracture being treated with skeletal traction

prob_foot_frac_require_cast

REAL

The probability that a person with a foot fracture will be treated with a plaster cast

prob_foot_frac_require_maj_surg

REAL

The probability that a person with a foot fracture will be treated with a major surgery

prob_foot_frac_require_min_surg

REAL

The probability that a person with a foot fracture will be treated with a major surgery

prob_foot_frac_require_amp

REAL

The probability that a person with a foot fracture will be treated with amputation via a major surgery

prob_tib_fib_frac_require_cast

REAL

The probability that a person with a tibia/fibula fracture will be treated with a plaster cast

prob_tib_fib_frac_require_maj_surg

REAL

The probability that a person with a tibia/fibula fracture will be treated with a major surgery

prob_tib_fib_frac_require_min_surg

REAL

The probability that a person with a tibia/fibula fracture will be treated with a minor surgery

prob_tib_fib_frac_require_amp

REAL

The probability that a person with a tibia/fibula fracture will be treated with an amputation via major surgery

prob_tib_fib_frac_require_traction

REAL

The probability that a person with a tibia/fibula fracture will be treated with skeletal traction

prob_femural_fracture_require_major_surgery

REAL

The probability that a person with a femur fracture will be treated with major surgery

prob_femural_fracture_require_minor_surgery

REAL

The probability that a person with a femur fracture will be treated with minor surgery

prob_femural_fracture_require_cast

REAL

The probability that a person with a femur fracture will be treated with a plaster cast

prob_femural_fracture_require_amputation

REAL

The probability that a person with a femur fracture will be treated with amputation via major surgery

prob_femural_fracture_require_traction

REAL

The probability that a person with a femur fracture will be treated with skeletal traction

prob_pelvis_fracture_traction

REAL

The probability that a person with a pelvis fracture will be treated with skeletal traction

prob_pelvis_frac_major_surgery

REAL

The probability that a person with a pelvis fracture will be treated with major surgery

prob_pelvis_frac_minor_surgery

REAL

The probability that a person with a pelvis fracture will be treated with minor surgery

prob_pelvis_frac_cast

REAL

The probability that a person with a pelvis fracture will be treated with a cast

prob_dis_hip_require_maj_surg

REAL

The probability that a person with a dislocated hip will be treated with a major surgery

prob_dis_hip_require_cast

REAL

The probability that a person with a dislocated hip will be treated with a plaster cast

prob_hip_dis_require_traction

REAL

The probability that a person with a dislocated hip will be treated with skeletal traction

hdu_cut_off_iss_score

INT

The ISS score used as a criteria to admit patients to the HDU/ICU units

mean_icu_days

REAL

The mean length of stay in the ICUfor those without TBI

sd_icu_days

REAL

The standard deviation in length of stay in the ICU for those without TBI

mean_tbi_icu_days

REAL

The mean length of stay in the ICU for those with TBI

sd_tbi_icu_days

REAL

The standard deviation in length of stay in the ICU for those with TBI

prob_open_fracture_contaminated

REAL

The probability that an open fracture will be contaminated

allowed_interventions

LIST

List of additional interventions that can be included when performing model analysis

head_prob_112

REAL

The probability that this person’s head injury is a skull fracture

head_prob_113

REAL

The probability that this person’s head injury is a basilar skull fracture

head_prob_133a

REAL

The probability that this person’s head injury is a Subarachnoid hematoma

head_prob_133b

REAL

The probability that this person’s head injury is a Brain contusion

head_prob_133c

REAL

The probability that this person’s head injury is an Intraventricular haemorrhage

head_prob_133d

REAL

The probability that this person’s head injury is a Subgaleal hematoma

head_prob_134a

REAL

The probability that this person’s head injury is an Epidural hematoma

head_prob_134b

REAL

The probability that this person’s head injury is a Subdural hematoma

head_prob_135

REAL

The probability that this person’s head injury is a Diffuse axonal injury/midline shift

head_prob_1101

REAL

The probability that this person’s head injury is a laceration

head_prob_1114

REAL

The probability that this person’s head injury is a burn

face_prob_211

REAL

The probability that this person’s face injury is a Facial fracture (nasal/unspecified)

face_prob_212

REAL

The probability that this person’s face injury is a Facial fracture (mandible/zygomatic)

face_prob_241

REAL

The probability that this person’s face injury is a soft tissue injury

face_prob_2101

REAL

The probability that this person’s face injury is a laceration

face_prob_2114

REAL

The probability that this person’s face injury is a burn

face_prob_291

REAL

The probability that this person’s face injury is an eye injury

neck_prob_3101

REAL

The probability that this person’s neck injury is a laceration

neck_prob_3113

REAL

The probability that this person’s neck injury is a burn

neck_prob_342

REAL

The probability that this person’s neck injury is a Soft tissue injury in neck (vertebral artery laceration)

neck_prob_343

REAL

The probability that this person’s neck injury is a Soft tissue injury in neck (pharynx contusion)

neck_prob_361

REAL

The probability that this person’s neck injury is a Sternomastoid m. hemorrhage/ Hemorrhage, supraclavicular triangle/Hemorrhage, posterior triangle/Anterior vertebral vessel hemorrhage/ Neck muscle hemorrhage

neck_prob_363

REAL

The probability that this person’s neck injury is a Hematoma in carotid sheath/Carotid sheath hemorrhage

neck_prob_322

REAL

The probability that this person’s neck injury is an Atlanto-occipital subluxation

neck_prob_323

REAL

The probability that this person’s neck injury is an Atlanto-axial subluxation

thorax_prob_4101

REAL

The probability that this person’s thorax injury is a laceration

thorax_prob_4113

REAL

The probability that this person’s thorax injury is a burn

thorax_prob_461

REAL

The probability that this person’s thorax injury is Chest wall bruises/haematoma

thorax_prob_463

REAL

The probability that this person’s thorax injury is Haemothorax

thorax_prob_453a

REAL

The probability that this person’s thorax injury is a Lung contusion

thorax_prob_453b

REAL

The probability that this person’s thorax injury is a Diaphragm rupture

thorax_prob_412

REAL

The probability that this person’s thorax injury is a rib fracture

thorax_prob_414

REAL

The probability that this person’s thorax injury is flail chest

thorax_prob_441

REAL

The probability that this person’s thorax injury is a Chest wall lacerations/avulsions

thorax_prob_442

REAL

The probability that this person’s thorax injury is a Surgical emphysema

thorax_prob_443

REAL

The probability that this person’s thorax injury is a Closed pneumothorax/ open pneumothorax

abdomen_prob_5101

REAL

The probability that this person’s abdomen injury is a laceration

abdomen_prob_5113

REAL

The probability that this person’s thorax injury is a burn

abdomen_prob_552

REAL

The probability that this person’s thorax injury is a skull fracture

abdomen_prob_553

REAL

The probability that this person’s thorax injury is an Injury to stomach/intestines/colon

abdomen_prob_554

REAL

The probability that this person’s thorax injury is an Injury to spleen/Urinary bladder/Liver/Urethra/Diaphragm

spine_prob_612

REAL

The probability that this person’s spine injury is a vertabrae fracture

spine_prob_673a

REAL

The probability that this person’s spine injury is a Spinal cord injury at neck level

spine_prob_673b

REAL

The probability that this person’s spine injury is a Spinal cord injury below neck level

spine_prob_674a

REAL

The probability that this person’s spine injury is a Spinal cord injury at neck level

spine_prob_674b

REAL

The probability that this person’s spine injury is a Spinal cord injury below neck level

spine_prob_675a

REAL

The probability that this person’s spine injury is a Spinal cord injury at neck level

spine_prob_675b

REAL

The probability that this person’s spine injury is a Spinal cord injury below neck level

spine_prob_676

REAL

The probability that this person’s spine injury is a Spinal cord injury at neck level

upper_ex_prob_7101

REAL

The probability that this person’s upper extremity injury is a laceration

upper_ex_prob_7113

REAL

The probability that this person’s upper extremity injury is a burn

upper_ex_prob_712a

REAL

The probability that this person’s upper extremity injury is a Fracture to Clavicle, scapula, humerus

upper_ex_prob_712b

REAL

The probability that this person’s upper extremity injury is a Fracture to Hand/wrist

upper_ex_prob_712c

REAL

The probability that this person’s upper extremity injury is a Fracture to Radius/ulna

upper_ex_prob_722

REAL

The probability that this person’s upper extremity injury is a dislocated shoulder

upper_ex_prob_782a

REAL

The probability that this person’s upper extremity injury is an Amputated finger

upper_ex_prob_782b

REAL

The probability that this person’s upper extremity injury is a Unilateral arm amputation

upper_ex_prob_782c

REAL

The probability that this person’s upper extremity injury is a Thumb amputation

upper_ex_prob_783

REAL

The probability that this person’s upper extremity injury is a bilateral arm amputation

lower_ex_prob_8101

REAL

The probability that this person’s lower extremity injury is a laceration

lower_ex_prob_8113

REAL

The probability that this person’s lower extremity injury is a burn

lower_ex_prob_811

REAL

The probability that this person’s lower extremity injury is a foot fracture

lower_ex_prob_813do

REAL

The probability that this person’s lower extremity injury is an open foot fracture

lower_ex_prob_812

REAL

The probability that this person’s lower extremity injury is a Fracture to patella, tibia, fibula, ankle

lower_ex_prob_813eo

REAL

The probability that this person’s lower extremity injury is an open Fracture to patella, tibia, fibula, ankle

lower_ex_prob_813a

REAL

The probability that this person’s lower extremity injury is a Hip fracture

lower_ex_prob_813b

REAL

The probability that this person’s lower extremity injury is a Pelvis fracture

lower_ex_prob_813bo

REAL

The probability that this person’s lower extremity injury is an open Pelvis fracture

lower_ex_prob_813c

REAL

The probability that this person’s lower extremity injury is a Femur fracture

lower_ex_prob_813co

REAL

The probability that this person’s lower extremity injury is an open Femur fracture

lower_ex_prob_822a

REAL

The probability that this person’s lower extremity injury is a Dislocated hip

lower_ex_prob_822b

REAL

The probability that this person’s lower extremity injury is a Dislocated knee

lower_ex_prob_882

REAL

The probability that this person’s lower extremity injury is an Amputation of toes

lower_ex_prob_883

REAL

The probability that this person’s lower extremity injury is a Unilateral leg amputation

lower_ex_prob_884

REAL

The probability that this person’s lower extremity injury is a Bilateral leg amputation

blocked_interventions

LIST

A list of interventions that are blocked in a simulation

unavailable_treatment_mortality_mais_cutoff

INT

A cut-off score above which an injury will result in additional mortality if the person has sought healthcare and not received it.

consider_death_no_treatment_ISS_cut_off

INT

A cut-off score above which an injuries will be considered severe enough to cause mortality in those whohave not sought care.

maximum_number_of_times_HSI_events_should_run

INT

limit on the number of times an HSI event can run

PROPERTIES:

Item

Type

Description

rt_road_traffic_inc

BOOL

involved in a road traffic injury

rt_inj_severity

CATEGORICAL

Injury status relating to road traffic injury: none, mild, severe. Possible values are: [none, mild, severe, ]

rt_injury_1

CATEGORICAL

Codes for injury 1 from RTI. Possible values are: [none, 112, 113, 133a, 133b, 133c, 133d, 134a, 134b, 135, 1101, 1114, 211, 212, 241, 2101, 2114, 291, 342, 343, 361, 363, 322, 323, 3101, 3113, 412, 414, 461, 463, 453a, 453b, 441, 442, 443, 4101, 4113, 552, 553, 554, 5101, 5113, 612, 673a, 673b, 674a, 674b, 675a, 675b, 676, 712a, 712b, 712c, 722, 782a, 782b, 782c, 783, 7101, 7113, 811, 813do, 812, 813eo, 813a, 813b, 813bo, 813c, 813co, 822a, 822b, 882, 883, 884, 8101, 8113, P133a, P133b, P133c, P133d, P134a, P134b, P135, P673a, P673b, P674a, P674b, P675a, P675b, P676, P782a, P782b, P782c, P783, P882, P883, P884, ]

rt_injury_2

CATEGORICAL

Codes for injury 2 from RTI. Possible values are: [none, 112, 113, 133a, 133b, 133c, 133d, 134a, 134b, 135, 1101, 1114, 211, 212, 241, 2101, 2114, 291, 342, 343, 361, 363, 322, 323, 3101, 3113, 412, 414, 461, 463, 453a, 453b, 441, 442, 443, 4101, 4113, 552, 553, 554, 5101, 5113, 612, 673a, 673b, 674a, 674b, 675a, 675b, 676, 712a, 712b, 712c, 722, 782a, 782b, 782c, 783, 7101, 7113, 811, 813do, 812, 813eo, 813a, 813b, 813bo, 813c, 813co, 822a, 822b, 882, 883, 884, 8101, 8113, P133a, P133b, P133c, P133d, P134a, P134b, P135, P673a, P673b, P674a, P674b, P675a, P675b, P676, P782a, P782b, P782c, P783, P882, P883, P884, ]

rt_injury_3

CATEGORICAL

Codes for injury 3 from RTI. Possible values are: [none, 112, 113, 133a, 133b, 133c, 133d, 134a, 134b, 135, 1101, 1114, 211, 212, 241, 2101, 2114, 291, 342, 343, 361, 363, 322, 323, 3101, 3113, 412, 414, 461, 463, 453a, 453b, 441, 442, 443, 4101, 4113, 552, 553, 554, 5101, 5113, 612, 673a, 673b, 674a, 674b, 675a, 675b, 676, 712a, 712b, 712c, 722, 782a, 782b, 782c, 783, 7101, 7113, 811, 813do, 812, 813eo, 813a, 813b, 813bo, 813c, 813co, 822a, 822b, 882, 883, 884, 8101, 8113, P133a, P133b, P133c, P133d, P134a, P134b, P135, P673a, P673b, P674a, P674b, P675a, P675b, P676, P782a, P782b, P782c, P783, P882, P883, P884, ]

rt_injury_4

CATEGORICAL

Codes for injury 4 from RTI. Possible values are: [none, 112, 113, 133a, 133b, 133c, 133d, 134a, 134b, 135, 1101, 1114, 211, 212, 241, 2101, 2114, 291, 342, 343, 361, 363, 322, 323, 3101, 3113, 412, 414, 461, 463, 453a, 453b, 441, 442, 443, 4101, 4113, 552, 553, 554, 5101, 5113, 612, 673a, 673b, 674a, 674b, 675a, 675b, 676, 712a, 712b, 712c, 722, 782a, 782b, 782c, 783, 7101, 7113, 811, 813do, 812, 813eo, 813a, 813b, 813bo, 813c, 813co, 822a, 822b, 882, 883, 884, 8101, 8113, P133a, P133b, P133c, P133d, P134a, P134b, P135, P673a, P673b, P674a, P674b, P675a, P675b, P676, P782a, P782b, P782c, P783, P882, P883, P884, ]

rt_injury_5

CATEGORICAL

Codes for injury 5 from RTI. Possible values are: [none, 112, 113, 133a, 133b, 133c, 133d, 134a, 134b, 135, 1101, 1114, 211, 212, 241, 2101, 2114, 291, 342, 343, 361, 363, 322, 323, 3101, 3113, 412, 414, 461, 463, 453a, 453b, 441, 442, 443, 4101, 4113, 552, 553, 554, 5101, 5113, 612, 673a, 673b, 674a, 674b, 675a, 675b, 676, 712a, 712b, 712c, 722, 782a, 782b, 782c, 783, 7101, 7113, 811, 813do, 812, 813eo, 813a, 813b, 813bo, 813c, 813co, 822a, 822b, 882, 883, 884, 8101, 8113, P133a, P133b, P133c, P133d, P134a, P134b, P135, P673a, P673b, P674a, P674b, P675a, P675b, P676, P782a, P782b, P782c, P783, P882, P883, P884, ]

rt_injury_6

CATEGORICAL

Codes for injury 6 from RTI. Possible values are: [none, 112, 113, 133a, 133b, 133c, 133d, 134a, 134b, 135, 1101, 1114, 211, 212, 241, 2101, 2114, 291, 342, 343, 361, 363, 322, 323, 3101, 3113, 412, 414, 461, 463, 453a, 453b, 441, 442, 443, 4101, 4113, 552, 553, 554, 5101, 5113, 612, 673a, 673b, 674a, 674b, 675a, 675b, 676, 712a, 712b, 712c, 722, 782a, 782b, 782c, 783, 7101, 7113, 811, 813do, 812, 813eo, 813a, 813b, 813bo, 813c, 813co, 822a, 822b, 882, 883, 884, 8101, 8113, P133a, P133b, P133c, P133d, P134a, P134b, P135, P673a, P673b, P674a, P674b, P675a, P675b, P676, P782a, P782b, P782c, P783, P882, P883, P884, ]

rt_injury_7

CATEGORICAL

Codes for injury 7 from RTI. Possible values are: [none, 112, 113, 133a, 133b, 133c, 133d, 134a, 134b, 135, 1101, 1114, 211, 212, 241, 2101, 2114, 291, 342, 343, 361, 363, 322, 323, 3101, 3113, 412, 414, 461, 463, 453a, 453b, 441, 442, 443, 4101, 4113, 552, 553, 554, 5101, 5113, 612, 673a, 673b, 674a, 674b, 675a, 675b, 676, 712a, 712b, 712c, 722, 782a, 782b, 782c, 783, 7101, 7113, 811, 813do, 812, 813eo, 813a, 813b, 813bo, 813c, 813co, 822a, 822b, 882, 883, 884, 8101, 8113, P133a, P133b, P133c, P133d, P134a, P134b, P135, P673a, P673b, P674a, P674b, P675a, P675b, P676, P782a, P782b, P782c, P783, P882, P883, P884, ]

rt_injury_8

CATEGORICAL

Codes for injury 8 from RTI. Possible values are: [none, 112, 113, 133a, 133b, 133c, 133d, 134a, 134b, 135, 1101, 1114, 211, 212, 241, 2101, 2114, 291, 342, 343, 361, 363, 322, 323, 3101, 3113, 412, 414, 461, 463, 453a, 453b, 441, 442, 443, 4101, 4113, 552, 553, 554, 5101, 5113, 612, 673a, 673b, 674a, 674b, 675a, 675b, 676, 712a, 712b, 712c, 722, 782a, 782b, 782c, 783, 7101, 7113, 811, 813do, 812, 813eo, 813a, 813b, 813bo, 813c, 813co, 822a, 822b, 882, 883, 884, 8101, 8113, P133a, P133b, P133c, P133d, P134a, P134b, P135, P673a, P673b, P674a, P674b, P675a, P675b, P676, P782a, P782b, P782c, P783, P882, P883, P884, ]

rt_date_to_remove_daly_1

DATE

Date to remove the daly weight for injury 1

rt_date_to_remove_daly_2

DATE

Date to remove the daly weight for injury 2

rt_date_to_remove_daly_3

DATE

Date to remove the daly weight for injury 3

rt_date_to_remove_daly_4

DATE

Date to remove the daly weight for injury 4

rt_date_to_remove_daly_5

DATE

Date to remove the daly weight for injury 5

rt_date_to_remove_daly_6

DATE

Date to remove the daly weight for injury 6

rt_date_to_remove_daly_7

DATE

Date to remove the daly weight for injury 7

rt_date_to_remove_daly_8

DATE

Date to remove the daly weight for injury 8

rt_in_shock

BOOL

A property determining if this person is in shock

rt_death_from_shock

BOOL

whether this person died from shock

rt_injuries_to_cast

LIST

A list of injuries that are to be treated with casts

rt_injuries_for_minor_surgery

LIST

A list of injuries that are to be treated with a minorsurgery

rt_injuries_for_major_surgery

LIST

A list of injuries that are to be treated with a minorsurgery

rt_injuries_to_heal_with_time

LIST

A list of injuries that heal without further treatment

rt_injuries_for_open_fracture_treatment

LIST

A list of injuries that with open fracture treatment

rt_ISS_score

INT

The ISS score associated with the injuries resulting from a road trafficaccident

rt_perm_disability

BOOL

whether the injuries from an RTI result in permanent disability

rt_polytrauma

BOOL

polytrauma from RTI

rt_imm_death

BOOL

death at scene True/False

rt_diagnosed

BOOL

Person has had their injuries diagnosed

rt_post_med_death

BOOL

death in following month despite medical intervention True/False

rt_no_med_death

BOOL

death in following month without medical intervention True/False

rt_unavailable_med_death

BOOL

death in the following month without medical intervention being able to be provided

rt_recovery_no_med

BOOL

recovery without medical intervention True/False

rt_disability

REAL

disability weight for current month

rt_date_inj

DATE

date of latest injury

rt_med_int

BOOL

whether this person is currently undergoing medical treatment

rt_in_icu_or_hdu

BOOL

whether this person is currently in ICU for RTI

rt_MAIS_military_score

INT

the maximum AIS-military score, used as a proxy to calculate theprobability of mortality without medical intervention

rt_date_death_no_med

DATE

the date which the person has is scheduled to die without medicalintervention

rt_debugging_DALY_wt

REAL

The true value of the DALY weight burden

rt_injuries_left_untreated

LIST

A list of injuries that have been left untreated due to a blocked intervention

Class attributes:

ADDITIONAL_DEPENDENCIES : {‘Lifestyle’, ‘HealthSystem’, ‘Demography’}

CAUSES_OF_DEATH : {‘RTI_death_without_med’: <tlo.methods.causes.Cause object at 0x33f710390>, ‘RTI_death_with_med’: <tlo.methods.causes.Cause object at 0x33f711f10>, ‘RTI_unavailable_med’: <tlo.methods.causes.Cause object at 0x33f712510>, ‘RTI_imm_death’: <tlo.methods.causes.Cause object at 0x33f711e90>, ‘RTI_death_shock’: <tlo.methods.causes.Cause object at 0x33f713bd0>}

CAUSES_OF_DISABILITY : {‘RTI’: <tlo.methods.causes.Cause object at 0x33f713b90>}

DATE_TO_REMOVE_DALY_COLUMNS : [‘rt_date_to_remove_daly_1’, ‘rt_date_to_remove_daly_2’, ‘rt_date_to_remove_daly_3’, ‘rt_date_to_remove_daly_4’, ‘rt_date_to_remove_daly_5’, ‘rt_date_to_remove_daly_6’, ‘rt_date_to_remove_daly_7’, ‘rt_date_to_remove_daly_8’]

FRACTURE_CODES : [‘112’, ‘113’, ‘211’, ‘212’, ‘412’, ‘414’, ‘612’, ‘712’, ‘811’, ‘812’, ‘813’]

INIT_DEPENDENCIES : {‘HealthBurden’, ‘SymptomManager’}

INJURIES_REQ_IMAGING : [‘112’, ‘113’, ‘211’, ‘212’, ‘412’, ‘414’, ‘612’, ‘712a’, ‘712b’, ‘712c’, ‘811’, ‘812’, ‘813a’, ‘813b’, ‘813c’, ‘822a’, ‘822b’, ‘813bo’, ‘813co’, ‘813do’, ‘813eo’, ‘673’, ‘674’, ‘675’, ‘676’, ‘322’, ‘323’, ‘722’, ‘342’, ‘343’, ‘441’, ‘443’, ‘453’, ‘133’, ‘134’, ‘135’, ‘552’, ‘553’, ‘554’, ‘342’, ‘343’, ‘441’, ‘443’, ‘453’, ‘361’, ‘363’, ‘461’, ‘463’]

INJURY_CODES : [‘none’, ‘112’, ‘113’, ‘133a’, ‘133b’, ‘133c’, ‘133d’, ‘134a’, ‘134b’, ‘135’, ‘1101’, ‘1114’, ‘211’, ‘212’, ‘241’, ‘2101’, ‘2114’, ‘291’, ‘342’, ‘343’, ‘361’, ‘363’, ‘322’, ‘323’, ‘3101’, ‘3113’, ‘412’, ‘414’, ‘461’, ‘463’, ‘453a’, ‘453b’, ‘441’, ‘442’, ‘443’, ‘4101’, ‘4113’, ‘552’, ‘553’, ‘554’, ‘5101’, ‘5113’, ‘612’, ‘673a’, ‘673b’, ‘674a’, ‘674b’, ‘675a’, ‘675b’, ‘676’, ‘712a’, ‘712b’, ‘712c’, ‘722’, ‘782a’, ‘782b’, ‘782c’, ‘783’, ‘7101’, ‘7113’, ‘811’, ‘813do’, ‘812’, ‘813eo’, ‘813a’, ‘813b’, ‘813bo’, ‘813c’, ‘813co’, ‘822a’, ‘822b’, ‘882’, ‘883’, ‘884’, ‘8101’, ‘8113’, ‘P133a’, ‘P133b’, ‘P133c’, ‘P133d’, ‘P134a’, ‘P134b’, ‘P135’, ‘P673a’, ‘P673b’, ‘P674a’, ‘P674b’, ‘P675a’, ‘P675b’, ‘P676’, ‘P782a’, ‘P782b’, ‘P782c’, ‘P783’, ‘P882’, ‘P883’, ‘P884’]

INJURY_COLUMNS : [‘rt_injury_1’, ‘rt_injury_2’, ‘rt_injury_3’, ‘rt_injury_4’, ‘rt_injury_5’, ‘rt_injury_6’, ‘rt_injury_7’, ‘rt_injury_8’]

INJURY_DATE_COLUMN_MAP : {‘rt_injury_1’: ‘rt_date_to_remove_daly_1’, ‘rt_injury_2’: ‘rt_date_to_remove_daly_2’, ‘rt_injury_3’: ‘rt_date_to_remove_daly_3’, ‘rt_injury_4’: ‘rt_date_to_remove_daly_4’, ‘rt_injury_5’: ‘rt_date_to_remove_daly_5’, ‘rt_injury_6’: ‘rt_date_to_remove_daly_6’, ‘rt_injury_7’: ‘rt_date_to_remove_daly_7’, ‘rt_injury_8’: ‘rt_date_to_remove_daly_8’, ‘rt_date_to_remove_daly_1’: ‘rt_injury_1’, ‘rt_date_to_remove_daly_2’: ‘rt_injury_2’, ‘rt_date_to_remove_daly_3’: ‘rt_injury_3’, ‘rt_date_to_remove_daly_4’: ‘rt_injury_4’, ‘rt_date_to_remove_daly_5’: ‘rt_injury_5’, ‘rt_date_to_remove_daly_6’: ‘rt_injury_6’, ‘rt_date_to_remove_daly_7’: ‘rt_injury_7’, ‘rt_date_to_remove_daly_8’: ‘rt_injury_8’}

INJURY_INDICES : range(1, 9)

METADATA : {<Metadata.USES_HEALTHBURDEN: 4>, <Metadata.DISEASE_MODULE: 1>, <Metadata.USES_SYMPTOMMANAGER: 2>, <Metadata.USES_HEALTHSYSTEM: 3>}

NO_TREATMENT_RECOVERY_TIMES_IN_DAYS : {‘112’: 49, ‘113’: 49, ‘1101’: 7, ‘211’: 49, ‘212’: 49, ‘241’: 7, ‘2101’: 7, ‘291’: 7, ‘342’: 42, ‘343’: 42, ‘361’: 7, ‘363’: 14, ‘322’: 42, ‘323’: 42, ‘3101’: 7, ‘3113’: 56, ‘412’: 35, ‘414’: 365, ‘461’: 7, ‘463’: 14, ‘453a’: 84, ‘453b’: 84, ‘441’: 14, ‘442’: 14, ‘4101’: 7, ‘552’: 90, ‘553’: 90, ‘554’: 90, ‘5101’: 7, ‘5113’: 56, ‘612’: 63, ‘712a’: 70, ‘712b’: 70, ‘722’: 84, ‘7101’: 7, ‘7113’: 56, ‘813do’: 240, ‘811’: 70, ‘812’: 70, ‘813eo’: 240, ‘813bo’: 240, ‘813co’: 240, ‘822a’: 60, ‘822b’: 180, ‘8101’: 7, ‘8113’: 56}

SWAPPING_CODES : [‘712b’, ‘812’, ‘3113’, ‘4113’, ‘5113’, ‘7113’, ‘8113’, ‘813a’, ‘813b’, ‘P673a’, ‘P673b’, ‘P674a’, ‘P674b’, ‘P675a’, ‘P675b’, ‘P676’, ‘P782b’, ‘P783’, ‘P883’, ‘P884’, ‘813bo’, ‘813co’, ‘813do’, ‘813eo’]

__annotations__ : {}

Functions (defined or overridden in class RTI):

__init__(name=None, resourcefilepath=None)

Construct a new disease module ready to be included in a simulation.

Initialises an empty parameters dictionary and module-specific random number generator.

Parameters:

name – the name to use for this module. Defaults to the concrete subclass’ name.

read_parameters(data_folder)

Reads the parameters used in the RTI module

rti_injury_diagnosis(person_id, the_appt_footprint)

A function used to alter the appointment footprint of the generic first appointments, based on the needs of the patient to be properly diagnosed. Specifically, this function will assign x-rays/ct-scans for injuries that require those diagnosis tools. :param person_id: the person in a generic appointment with an injury :param the_appt_footprint: the current appointment footprint to be altered :return: the altered appointment footprint

initialise_population(population)

Sets up the default properties used in the RTI module and applies them to the dataframe. The default state for the RTI module is that people haven’t been involved in a road traffic accident and are therefor alive and healthy.

initialise_simulation(sim)

At the start of the simulation we schedule a logging event, which records the relevant information regarding road traffic injuries in the last month.

Afterwards, we schedule three RTI events, the first is the main RTI event which takes parts of the population and assigns them to be involved in road traffic injuries and providing they survived will begin the interaction with the healthcare system. This event runs monthly.

The second is the begin scheduling the RTI recovery event, which looks at those in the population who have been injured in a road traffic accident, checking every day whether enough time has passed for their injuries to have healed. When the injury has healed the associated daly weight is removed.

The final event is one which checks if this person has not sought sought care or been given care, if they haven’t then it asks whether they should die away from their injuries

rti_do_when_diagnosed(person_id)

This function is called by the generic first appointments when an injured person has been diagnosed in A&E and needs to progress further in the health system. The injured person will then be scheduled a generic ‘medical intervention’ appointment which serves three purposes. The first is to determine what treatments they require for their injuries and shedule those, the second is to contain them in the health care system with inpatient days and finally, the appointment treats injuries that heal over time without further need for resources in the health system.

Parameters:

person_id – the person requesting medical care

Returns:

n/a

rti_do_for_major_surgeries(person_id, count)

Function called in HSI_RTI_MedicalIntervention to schedule a major surgery if required. In HSI_RTI_MedicalIntervention, we determine that they need a surgery. In this function, further to scheduling the surgery, we double check that they do meet the conditions for needing a surgery. The conditions for needing a surgery is that they are alive, currently seeking medical intervention and have an injury that is treated by surgery. :param person_id: The person requesting major surgeries :param count: The amount of major surgeries required, used when scheduling surgeries to ensure that two major

surgeries aren’t scheduled on the same day

Returns:

n/a

rti_do_for_minor_surgeries(person_id, count)

Function called in HSI_RTI_MedicalIntervention to schedule a minor surgery if required. In HSI_RTI_MedicalIntervention, we determine that they need a surgery. In this function, further to scheduling the surgery, we double check that they do meet the conditions for needing a surgery. The conditions for needing a surgery is that they are alive, currently seeking medical intervention and have an injury that is treated by surgery. :param person_id: The person requesting major surgeries :param count: The amount of major surgeries required, used when scheduling surgeries to ensure that two minor

surgeries aren’t scheduled on the same day

Returns:

rti_acute_pain_management(person_id)

Function called in HSI_RTI_MedicalIntervention to request pain management. This should be called for every alive injured person, regardless of what their injuries are. In this function we test whether they meet the requirements to recieve for pain relief, that is they are alive and currently receiving medical treatment. :param person_id: The person requesting pain management :return: n/a

rti_ask_for_suture_kit(person_id)

Function called by HSI_RTI_MedicalIntervention to centralise all suture kit requests. This function checks that the person asking for a suture kit meets the requirements to get one. That is they are alive, currently being treated for their injuries and that they have a laceration which needs stitching. :param person_id: The person asking for a suture kit :return: n/a

rti_ask_for_shock_treatment(person_id)

A function called by the generic emergency appointment to treat the onset of hypovolemic shock :param person_id: :return:

rti_ask_for_burn_treatment(person_id)

Function called by HSI_RTI_MedicalIntervention to centralise all burn treatment requests. This function schedules burn treatments for the person if they meet the requirements, that is they are alive, currently being treated, and they have a burn which needs to be treated. :param person_id: The person requesting burn treatment :return: n/a

rti_ask_for_fracture_casts(person_id)

Function called by HSI_RTI_MedicalIntervention to centralise all fracture casting. This function schedules the fracture cast treatment if they meet the requirements to ask for it. That is they are alive, currently being treated and they have a fracture that needs casting (Note that this also handles slings for upper arm/shoulder fractures). :param person_id: The person asking for fracture cast/sling :return: n/a

rti_ask_for_open_fracture_treatment(person_id, counts)

Function called by HSI_RTI_MedicalIntervention to centralise open fracture treatment requests. This function schedules an open fracture event, conditional on whether they are alive, being treated and have an appropriate injury.

Parameters:
  • person_id – the person requesting a tetanus jab

  • counts – the number of open fractures that requires a treatment

Returns:

n/a

rti_ask_for_tetanus(person_id)

Function called by HSI_RTI_MedicalIntervention to centralise all tetanus requests. This function schedules a tetanus event, conditional on whether they are alive, being treated and have an injury that requires a tetanus vaccine, i.e. a burn or a laceration.

Parameters:

person_id – the person requesting a tetanus jab

Returns:

n/a

schedule_hsi_event_for_tomorrow(hsi_event: HSI_Event = None)

A function to reschedule requested events for the following day if they have failed to run :return:

rti_find_injury_column(person_id, codes)

This function is a tool to find the injury column an injury code occurs in, when calling this funtion you will need to guarentee that the person has at least one of the code you are searching for, else this function will raise an assertion error. To call this function you need to provide the person who you want to perform the search on and the injury codes which you want to find the corresponding injury column for. The function/search will return the injury code which the person has from the list of codes you supplied, and which injury column from rt_injury_1 through to rt_injury_8, the code appears in.

Parameters:
  • person_id – The person the search is being performed for

  • codes – The injury codes being searched for

Returns:

which column out of rt_injury_1 to rt_injury_8 the injury code occurs in, and the injury code itself

rti_find_all_columns_of_treated_injuries(person_id, codes)

This function searches for treated injuries (supplied by the parameter codes) for a specific person, finding and returning all the columns with treated injuries and all the injury codes for the treated injuries.

Parameters:
  • person_id – The person the search is being performed on

  • codes – The treated injury codes

Returns:

All columns and codes of the successfully treated injuries

rti_assign_daly_weights(injured_index)

This function assigns DALY weights associated with each injury when they happen.

By default this function gives the DALY weight for each condition without treatment, this will then be swapped for the DALY weight associated with the injury with treatment when treatment occurs.

The properties that this function alters are rt_disability, which is the property used to report the disability burden that this person has and rt_debugging_DALY_wt, which stores the true value of the the disability.

Parameters:

injured_index – The people who have been involved in a road traffic accident for the current month and did not die on the scene of the crash

Returns:

n/a

rti_alter_daly_post_treatment(person_id, codes)

This function removes the DALY weight associated with each injury code after treatment is complete. This function is called by RTI_Recovery_event which removes asks to remove the DALY weight when the injury has healed

The properties that this function alters are rt_disability, which is the property used to report the disability burden that this person has and rt_debugging_DALY_wt, which stores the true value of the the disability.

Parameters:
  • person_id – The person who needs a daly weight removed as their injury has healed

  • codes – The injury codes for the healed injury/injuries

Returns:

n/a

rti_swap_injury_daly_upon_treatment(person_id, codes)

This function swaps certain DALY weight codes upon when a person receives treatment(s). Some injuries have a different daly weight associated with them for the treated and untreated injuries. If an injury is ‘swap-able’ then this function removes the old daly weight for the untreated injury and gives the daly weight for the treated injury.

The properties that this function alters are rt_disability, which is the property used to report the disability burden that this person has and rt_debugging_DALY_wt, which stores the true value of the the disability.

Parameters:
  • person_id – The person who has received treatment

  • codes – the ‘swap-able’ injury code

Returns:

n/a

rti_determine_LOS(person_id)

This function determines the length of stay a person sent to the health care system will require, based on how severe their injuries are (determined by the person’s ISS score). Currently I use data from China, but once a more appropriate source of data is found I can swap this over. :param person_id: The person who needs their LOS determined :return: the inpatient days required to treat this person (Their LOS)

static rti_find_and_count_injuries(persons_injury_properties: DataFrame, injury_codes: list)

A function that searches a user given dataframe for a list of injuries (injury_codes). If the injury code is found in the dataframe, this function returns the index for who has the injury/injuries and the number of injuries found. This function works much faster if the dataframe is smaller, hence why the searched dataframe is a parameter in the function.

Parameters:
  • persons_injury_properties – The dataframe to search for the tlo injury codes in

  • injury_codes – The injury codes to search for in the data frame

Returns:

the df index of who has the injuries and how many injuries in the search were found.

rti_treated_injuries(person_id, tlo_injury_codes)

A function that takes a person with treated injuries and removes the injury code from the properties rt_injury_1 to rt_injury_8

The properties that this function alters are rt_injury_1 through rt_injury_8 and the symptoms properties

Parameters:
  • person_id – The person who needs an injury code removed

  • tlo_injury_codes – the injury code(s) to be removed

Returns:

n/a

on_birth(mother_id, child_id)

When a person is born this function sets up the default properties for the road traffic injuries module :param mother_id: The mother :param child_id: The newborn :return: n/a

look_up_consumable_item_codes()

Look up the item codes that used in the HSI in the module

on_hsi_alert(person_id, treatment_id)

This is called whenever there is an HSI event commissioned by one of the other disease modules.

report_daly_values()
rti_assign_injuries(number)
A function that can be called specifying the number of people affected by RTI injuries

and provides outputs for the number of injuries each person experiences from a RTI event, the location of the injury, the TLO injury categories and the severity of the injuries. The severity of the injuries will then be used to calculate the injury severity score (ISS), which will then inform mortality and disability from road traffic injuries with treatment and the military abreviated injury score (MAIS) which will be used to predict mortality without medical intervention.

Parameters:

number – The number of people who need injuries assigned to them

Returns:

injurydescription - a dataframe for the injury/injuries summarised in the TLO injury code form along with data on their ISS score, used for calculating mortality and whether they have polytrauma or not.

Todo: see if we can include the following factors for injury severity (taken from a preprint sent to me after

MOH meeting): - The setting of the patient (rural/urban) as rural location was a predictor for severe injury AOR 2.41 (1.49-3.90) - Seatbelt use (none compared to using AOR 4.49 (1.47-13.76)) - Role of person in crash (Different risk for different type, see paper) - Alcohol use (AOR 1.74 (1.11-2.74) compared to none)

_common_first_appt_steps(person_id: int, individual_properties: IndividualProperties, schedule_hsi_event: HSIEventScheduler) None

Shared logic steps that are used by the RTI module when a generic HSI event is to be scheduled.

do_at_generic_first_appt(person_id: int, individual_properties: IndividualProperties, symptoms: List[str], schedule_hsi_event: HSIEventScheduler, **kwargs) None

Actions to take during a non-emergency generic health system interaction (HSI).

Derived classes should overwrite this method so that they are compatible with the HealthSystem module, and can schedule HSI events when a individual presents symptoms indicative of the corresponding illness or condition.

When overwriting, arguments that are not required can be left out of the definition. If done so, the method must take a **kwargs input to avoid errors when looping over all disease modules and running their generic HSI methods.

HSI events should be scheduled by the Module subclass implementing this method using the schedule_hsi_event argument.

Implementations of this method should not make any updates to the population dataframe directly - if the target individuals properties need to be updated this should be performed by updating the individual_properties argument.

Parameters:
  • person_id – Row index (ID) of the individual target of the HSI event in the population dataframe.

  • individual_properties – Properties of individual target as provided in the population dataframe. Updates to individual properties may be written to this object.

  • symptoms – List of symptoms the patient is experiencing.

  • schedule_hsi_event – A function that can schedule subsequent HSI events.

  • diagnosis_function – A function that can run diagnosis tests based on the patient’s symptoms.

  • consumables_checker – A function that can query the health system to check for available consumables.

  • facility_level – The level of the facility that the patient presented at.

  • treatment_id – The treatment id of the HSI event triggering the generic appointment.

do_at_generic_first_appt_emergency(person_id: int, individual_properties: IndividualProperties, symptoms: List[str], schedule_hsi_event: HSIEventScheduler, **kwargs) None

Actions to take during an emergency generic health system interaction (HSI).

Call signature is identical to the do_at_generic_first_appt() method.

Derived classes should overwrite this method so that they are compatible with the :py:class`~.HealthSystem` module, and can schedule HSI events when a individual presents symptoms indicative of the corresponding illness or condition.

class RTIPollingEvent(module)
The regular RTI event which handles all the initial RTI related changes to the dataframe. It can be thought of

as the actual road traffic accident occurring. Specifically the event decides who is involved in a road traffic accident every month (via the linear model helper class), whether those involved in a road traffic accident die on scene or are given injuries (via the assign_injuries function) which they will attempt to interact with the health system with for treatment.

Those who don’t die on scene and are injured then attempt to go to an emergency generic first appointment

This event will change the rt_ properties: 1) rt_road_traffic_inc - False when not involved in a collision, True when RTI_Event decides they are in a collision

  1. rt_date_inj - Change to current date if the person has been involved in a road traffic accident

  2. rt_imm_death - True if they die on the scene of the crash, false otherwise

  3. rt_injury_1 through to rt_injury_8 - a series of 8 properties which stores the injuries that need treating as a

    code

  4. rt_ISS_score - The metric used to calculate the probability of mortality from the person’s injuries

  5. rt_MAIS_military_score - The metric used to calculate the probability of mortality without medical intervention

  6. rt_disability - after injuries are assigned to a person, RTI_event calls rti_assign_daly_weights to match the

    person’s injury codes in rt_injury_1 through 8 to their corresponding DALY weights

  7. rt_polytrauma - If the person’s injuries fit the definition for polytrauma we keep track of this here and use it

    to calculate the probability for mortality later on.

  8. rt_date_death_no_med - the projected date to determine mortality for those who haven’t sought medical care

  9. rt_inj_severity - The qualitative description of the severity of this person’s injuries

  10. the symptoms this person has

Schedule to take place every month

Bases: tlo.events.RegularEvent, tlo.events.Event, tlo.events.PopulationScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class RTIPollingEvent):

__init__(module)

Schedule to take place every month

apply(population)

Apply this event to the population.

Parameters:

population – the current population

class RTI_Check_Death_No_Med(module)

A regular event which organises whether a person who has not received medical treatment should die as a result of their injuries. This even makes use of the maximum AIS-military score, a trauma scoring system developed for injuries in a military environment, assumed here to be an indicator of the probability of mortality without access to a medical system.

The properties this function changes are: 1) rt_no_med_death - the boolean property tracking who dies from road traffic injuries without medical intervention

  1. rt_date_death_no_med - resetting the date to check the person’s mortality without medical intervention if

    they survive

  2. rt_disability - if the person survives a non-fatal injury then this injury may heal and therefore the disability

    burden is changed

  3. rt_debugging_DALY_wt - if the person survives a non-fatal injury then this injury may heal and therefore the

    disability burden is changed, this property keeping track of the true disability burden

  4. rt_date_to_remove_daly_{injury_index} - In the event of recovering from a non-fatal injury without medical

    intervention a recovery date will scheduled for the relevant injury index

If the person is sent here and they don’t die, we need to correctly model the level of disability they experience from their untreated injuries, some injuries that are left untreated will have an associated daly weight for long term disability without treatment, others don’t.

# todo: consult with a doctor about the likelihood of survival without medical treatment

Currently I am assuming that anyone with an injury severity score of 9 or higher will seek care and have an emergency symptom, that means that I have to decide what to do with the following injuries:

Lacerations - [1101, 2101, 3101, 4101, 5101, 7101, 8101] What would a laceration do without stitching? Take longer to heal most likely Fractures - [‘112’, ‘211’, ‘212, ‘412’, ‘612’, ‘712’, ‘712a’, ‘712b’, ‘712c’, ‘811’, ‘812’]

Some fractures have an associated level of disability to them, others do not. So things like fractured radius/ulna have a code to swap, but others don’t. Some are of the no treatment type, such as fractured skulls, fractured ribs or fractured vertebrae, so we can just add the same recovery time for these injuries. So ‘112’, ‘412’ and ‘612’ will need to have recovery events checked and recovered. Dislocations will presumably be popped back into place, the injury will feasably be able to heal but most likely with more pain and probably with more time Amputations - [‘782’,’782a’, ‘782b’, ‘782c’, ‘882’] Amputations will presumably trigger emergency health seeking behaviour so they shouldn’t turn up here really soft tissue injuries - [‘241’, ‘342’, ‘441’, ‘442’] Presumably soft tissue injuries that turn up here will heal over time but with more pain Internal organ injury - [‘552’] Injury to the gastrointestinal organs can result in complications later on, but Internal bleedings - [‘361’, ‘461’] Surviving internal bleeding is concievably possible, these are comparitively minor bleeds

Create a new regular event.

Parameters:
  • module – the module that created this event

  • frequency (pandas.tseries.offsets.DateOffset) – the interval from one occurrence to the next (must be supplied as a keyword argument)

Bases: tlo.events.RegularEvent, tlo.events.Event, tlo.events.PopulationScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class RTI_Check_Death_No_Med):

__init__(module)

Create a new regular event.

Parameters:
  • module – the module that created this event

  • frequency (pandas.tseries.offsets.DateOffset) – the interval from one occurrence to the next (must be supplied as a keyword argument)

apply(population)

Apply this event to the given target.

This is a no-op; subclasses should override this method.

Parameters:

target – the target of the event

class RTI_Recovery_Event(module)

A regular event which checks the recovery date determined by each injury in columns rt_injury_1 through rt_injury_8, which is stored in columns rt_date_to_remove_daly_1, through rt_date_to_remove_daly_8 respectively. This event checks the dates stored in the rt_date_to_remove_daly_* columns, when the date matches one of the entries, the daly weight is removed and the injury is fully healed.

The properties changed in this functions is:

  1. rt_date_to_remove_daly - resetting the date to remove the daly weight for each injury once the date is

    reached in the sim

  2. rt_inj_severity - resetting the person’s injury severity once and injury is healed

  3. rt_injuries_to_heal_with_time - resetting the list of injuries that are due to heal over time once healed

  4. rt_injuries_for_minor_surgery - resetting the list of injuries that are treated with minor surgery once

    healed

  5. rt_injuries_for_major_surgery - resetting the list of injuries that are treated with major surgery once

    healed

  6. rt_injuries_for_open_fracture_treatment - resetting the list of injuries that are treated with open fracture

    treatment once healed

  7. rt_injuries_to_cast - resetting the list of injuries that are treated with fracture cast treatment once healed

Create a new regular event.

Parameters:
  • module – the module that created this event

  • frequency (pandas.tseries.offsets.DateOffset) – the interval from one occurrence to the next (must be supplied as a keyword argument)

Bases: tlo.events.RegularEvent, tlo.events.Event, tlo.events.PopulationScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class RTI_Recovery_Event):

__init__(module)

Create a new regular event.

Parameters:
  • module – the module that created this event

  • frequency (pandas.tseries.offsets.DateOffset) – the interval from one occurrence to the next (must be supplied as a keyword argument)

apply(population)

Apply this event to the given target.

This is a no-op; subclasses should override this method.

Parameters:

target – the target of the event

class HSI_RTI_Imaging_Event(module, person_id)

This HSI event is triggered by the generic first appointments. After first arriving into the health system at either level 0 or level 1, should the injured person require a imaging to diagnose their injuries this HSI event is caused and x-ray or ct scans are provided as needed

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

Bases: tlo.methods.hsi_event.HSI_Event, tlo.events.IndividualScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class HSI_RTI_Imaging_Event):

__init__(module, person_id)

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)

Apply this event to the population.

Must be implemented by subclasses.

did_not_run(*args, **kwargs)

Called when this event is due but it is not run. Return False to prevent the event being rescheduled, or True to allow the rescheduling. This is called each time that the event is tried to be run but it cannot be.

class HSI_RTI_Medical_Intervention(module, person_id)

This is a Health System Interaction Event. An appointment of a person who has experienced a road traffic injury, had their injuries diagnosed through A&E and now needs treatment.

This appointment is designed to organise the treatments needed. In the __init__ section the appointment footprint is altered to fit the requirements of the person’s treatment need. In this section we count the number of minor/major surgeries required and determine how long they will be in the health system for. For some injuries, the treatment plan is not entirely set into stone and may vary, for example, some skull fractures will need surgery whilst some will not. The treatment plan in its entirety is designed here.

In the apply section, we send those who need surgeries to either HSI_RTI_Major_Surgery or HSI_RTI_Minor_Surgery, those who need stitches to HSI_RTI_Suture, those who need burn treatment to HSI_RTI_Burn_Management and those who need fracture casts to HSI_RTI_Casting.

Pain medication is also requested here with HSI_RTI_Acute_Pain_Management.

The properties changed in this event are:

rt_injuries_for_major_surgery - the injuries that are determined to be treated by major surgery are stored in

this list property

rt_injuries_for_minor_surgery - the injuries that are determined to be treated by minor surgery are stored in

this list property

rt_injuries_to_cast - the injuries that are determined to be treated with fracture casts are stored in this list

property

rt_injuries_for_open_fracture_treatment - the injuries that are determined to be treated with open fractre treatment

are stored in this list property

rt_injuries_to_heal_with_time - the injuries that are determined to heal with time are stored in this list property

rt_date_to_remove_daly - recovery dates for the heal with time injuries are set here

rt_date_death_no_med - the date to check mortality without medical intervention is removed as this person has

sought medical care

rt_med_int - the bool property that shows whether a person has sought medical care or not

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

Bases: tlo.methods.hsi_event.HSI_Event, tlo.events.IndividualScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class HSI_RTI_Medical_Intervention):

__init__(module, person_id)

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)

Apply this event to the population.

Must be implemented by subclasses.

did_not_run()

Called when this event is due but it is not run. Return False to prevent the event being rescheduled, or True to allow the rescheduling. This is called each time that the event is tried to be run but it cannot be.

class HSI_RTI_Shock_Treatment(module, person_id)

This HSI event handles the process of treating hypovolemic shock, as recommended by the pediatric handbook for Malawi and (TODO: FIND ADULT REFERENCE)

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

Bases: tlo.methods.hsi_event.HSI_Event, tlo.events.IndividualScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class HSI_RTI_Shock_Treatment):

__init__(module, person_id)

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)

Apply this event to the population.

Must be implemented by subclasses.

did_not_run()

Called when this event is due but it is not run. Return False to prevent the event being rescheduled, or True to allow the rescheduling. This is called each time that the event is tried to be run but it cannot be.

class HSI_RTI_Fracture_Cast(module, person_id)

This HSI event handles fracture casts/giving slings for those who need it. The HSI event tests whether the injured person has an appropriate injury code, determines how many fractures the person and then requests fracture treatment as required.

The injury codes dealt with in this HSI event are: ‘712a’ - broken clavicle, scapula, humerus ‘712b’ - broken hand/wrist ‘712c’ - broken radius/ulna ‘811’ - Fractured foot ‘812’ - broken tibia/fibula ‘813a’ - Broken hip ‘813b’ - broken pelvis ‘813c’ - broken femur

‘822a’ - dislocated hip ‘822b’ - dislocated knee

The properties altered by this function are rt_date_to_remove_daly - setting recovery dates for injuries treated with fracture casts rt_injuries_to_cast - once treated the codes used to denote injuries to be treated by fracture casts are removed

from the list of injuries due to be treated with fracture casts

rt_med_int - the property used to denote whether a person getting treatment for road traffic injuries

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

Bases: tlo.methods.hsi_event.HSI_Event, tlo.events.IndividualScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class HSI_RTI_Fracture_Cast):

__init__(module, person_id)

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)

Apply this event to the population.

Must be implemented by subclasses.

did_not_run()

Called when this event is due but it is not run. Return False to prevent the event being rescheduled, or True to allow the rescheduling. This is called each time that the event is tried to be run but it cannot be.

class HSI_RTI_Open_Fracture_Treatment(module, person_id)

This HSI event handles fracture casts/giving slings for those who need it. The HSI event tests whether the injured person has an appropriate injury code, determines how many fractures the person and then requests fracture treatment as required.

The injury codes dealt with in this HSI event are: ‘813bo’ - Open fracture of the pelvis ‘813co’ - Open fracture of the femur ‘813do’ - Open fracture of the foot ‘813eo’ - Open fracture of the tibia/fibula/ankle/patella

The properties altered by this function are: rt_med_int - to denote that this person is recieving treatment rt_injuries_for_open_fracture_treatment - removing codes that have been treated by open fracture treatment rt_date_to_remove_daly - to schedule recovery dates for open fractures that have recieved treatment

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

Bases: tlo.methods.hsi_event.HSI_Event, tlo.events.IndividualScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class HSI_RTI_Open_Fracture_Treatment):

__init__(module, person_id)

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)

Apply this event to the population.

Must be implemented by subclasses.

did_not_run()

Called when this event is due but it is not run. Return False to prevent the event being rescheduled, or True to allow the rescheduling. This is called each time that the event is tried to be run but it cannot be.

class HSI_RTI_Suture(module, person_id)

This HSI event handles lacerations giving suture kits for those who need it. The HSI event tests whether the injured person has an appropriate injury code, determines how many lacerations the person and then requests suture kits

as required.

The codes dealt with are: ‘1101’ - Laceration to the head ‘2101’ - Laceration to the face ‘3101’ - Laceration to the neck ‘4101’ - Laceration to the thorax ‘5101’ - Laceration to the abdomen ‘7101’ - Laceration to the upper extremity ‘8101’ - Laceration to the lower extremity

The properties altered by this function are: rt_med_int - to denote that this person is recieving treatment rt_date_to_remove_daly - to schedule recovery dates for lacerations treated in this hsi

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

Bases: tlo.methods.hsi_event.HSI_Event, tlo.events.IndividualScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class HSI_RTI_Suture):

__init__(module, person_id)

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)

Apply this event to the population.

Must be implemented by subclasses.

did_not_run()

Called when this event is due but it is not run. Return False to prevent the event being rescheduled, or True to allow the rescheduling. This is called each time that the event is tried to be run but it cannot be.

class HSI_RTI_Burn_Management(module, person_id)

This HSI event handles burns giving treatment for those who need it. The HSI event tests whether the injured person has an appropriate injury code, determines how many burns the person and then requests appropriate treatment

as required.

The codes dealt with in this HSI event are: ‘1114’ - Burns to the head ‘2114’ - Burns to the face ‘3113’ - Burns to the neck ‘4113’ - Burns to the thorax ‘5113’ - Burns to the abdomen ‘7113’ - Burns to the upper extremities ‘8113’ - Burns to the lower extremities

The properties treated by this module are: rt_med_int - to denote that this person is recieving treatment for their injuries rt_date_to_remove_daly - to schedule recovery dates for injuries treated here

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

Bases: tlo.methods.hsi_event.HSI_Event, tlo.events.IndividualScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class HSI_RTI_Burn_Management):

__init__(module, person_id)

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)

Apply this event to the population.

Must be implemented by subclasses.

did_not_run()

Called when this event is due but it is not run. Return False to prevent the event being rescheduled, or True to allow the rescheduling. This is called each time that the event is tried to be run but it cannot be.

class HSI_RTI_Tetanus_Vaccine(module, person_id)

This HSI event handles tetanus vaccine requests, the idea being that by separating these from the burn and laceration and burn treatments, those treatments can go ahead without the availability of tetanus stopping the event

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

Bases: tlo.methods.hsi_event.HSI_Event, tlo.events.IndividualScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class HSI_RTI_Tetanus_Vaccine):

__init__(module, person_id)

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)

Apply this event to the population.

Must be implemented by subclasses.

did_not_run()

Called when this event is due but it is not run. Return False to prevent the event being rescheduled, or True to allow the rescheduling. This is called each time that the event is tried to be run but it cannot be.

class HSI_RTI_Acute_Pain_Management(module, person_id)

This HSI event handles all requests for pain management here, all injuries will pass through here and the pain medicine required will be set to manage the level of pain they are experiencing, with mild pain being managed with paracetamol/NSAIDS, moderate pain being managed with tramadol and severe pain being managed with morphine.

“There is a mismatch between the burden of musculoskeletal pain conditions and appropriate health policy response and planning internationally that can be addressed with an integrated research and policy agenda.” SEE doi: 10.2105/AJPH.2018.304747

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

Bases: tlo.methods.hsi_event.HSI_Event, tlo.events.IndividualScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class HSI_RTI_Acute_Pain_Management):

__init__(module, person_id)

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)

Apply this event to the population.

Must be implemented by subclasses.

did_not_run()

Called when this event is due but it is not run. Return False to prevent the event being rescheduled, or True to allow the rescheduling. This is called each time that the event is tried to be run but it cannot be.

class HSI_RTI_Major_Surgeries(module, person_id)

This is a Health System Interaction Event. An appointment of a person who has experienced a road traffic injury, had their injuries diagnosed through A and E and requires major surgery.

Major surgeries are defined here as surgeries that include extensive work such as entering a body cavity, removing an organ or altering the body’s anatomy

The injuries treated in this module are as follows:

FRACTURES: While district hospitals can provide some emergency trauma care and surgeries, only central hospitals are equipped to provide advanced orthopaedic surgery. - Lavy et al. 2007

‘112’ - Depressed skull fracture - reported use of surgery in Eaton et al. 2017 ‘811’ - fractured foot - reported use of surgery in Chagomerana et al. 2017 ‘812’ - fracture tibia/fibula - reported use of surgery in Chagomerana et al. 2017 ‘813a’ - Fractured hip - reported use of surgery and Lavy et al. 2007 ‘813b’ - Fractured pelvis - reported use of surgery and Lavy et al. 2007 ‘813c’ - Fractured femur - reported use of surgery and Lavy et al. 2007 ‘414’ - Flail chest - https://www.sciencedirect.com/science/article/abs/pii/S0020138303002900

SOFT TISSUE INJURIES: ‘342’ - Soft tissue injury of the neck ‘343’ - Soft tissue injury of the neck

Thoroscopy treated injuries: https://www.ncbi.nlm.nih.gov/nlmcatalog/101549743 Ref from pediatric handbook for Malawi ‘441’ - Closed pneumothorax ‘443’ - Open pneumothorax ‘463’ - Haemothorax ‘453a’ - Diaphragm rupture ‘453b’ - Lung contusion

INTERNAL BLEEDING: ‘361’ - Internal bleeding in neck ‘363’ - Internal bleeding in neck

TRAUMATIC BRAIN INJURIES THAT REQUIRE A CRANIOTOMOY - reported use of surgery in Eaton et al 2017 and Lavy et al. 2007

‘133a’ - Subarachnoid hematoma ‘133b’ - Brain contusion ‘133c’ - Intraventricular haemorrhage ‘133d’ - Subgaleal hematoma ‘134a’ - Epidural hematoma ‘134b’ - Subdural hematoma ‘135’ - diffuse axonal injury

Laparotomy - Recorded in Lavy et al. 2007 and here: https://www.ajol.info/index.php/mmj/article/view/174378

‘552’ - Injury to Intestine, stomach and colon ‘553’ - Injury to Spleen, Urinary bladder, Liver, Urethra, Diaphragm ‘554’ - Injury to kidney

SPINAL CORD LESIONS, REQUIRING LAMINOTOMY/FORAMINOTOMY/INTERSPINOUS PROCESS SPACER Quote from Eaton et al. 2019: “No patients received thoracolumbar braces or underwent spinal surgery.” https://journals.sagepub.com/doi/pdf/10.1177/0049475518808969 So those with spinal cord injuries are not likely to be treated here in RTI_Major_Surgeries..

‘673a’ - Spinal cord lesion at neck level ‘673b’ - Spinal cord lesion below neck level ‘674a’ - Spinal cord lesion at neck level ‘674b’ - Spinal cord lesion below neck level ‘675a’ - Spinal cord lesion at neck level ‘675b’ - Spinal cord lesion below neck level ‘676’ - Spinal cord lesion at neck level

AMPUTATIONS - Reported in Crudziak et al. 2019 ‘782a’ - Amputated finger ‘782b’ - Unilateral arm amputation ‘782c’ - Amputated thumb ‘783’ - Bilateral arm amputation ‘882’ - Amputated toe ‘883’ - Unilateral lower limb amputation ‘884’ - Bilateral lower limb amputation

Dislocations - Reported in Chagomerana et al. 2017 ‘822a’ Hip dislocation

The properties altered in this function are: rt_injury_1 through rt_injury_8 - in the incidence that despite treatment the person treated is left

permanently disabled we need to update the injury code to inform the model that the disability burden associated with the permanently disabling injury shouldn’t be removed

rt_perm_disability - when a person is decided to be permanently disabled we update this property to reflect this rt_date_to_remove_daly - assign recovery dates for the injuries treated with the surgery rt_injuries_for_major_surgery - to remove codes due to be treated by major surgery when that injury recieves

a treatment.

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

Bases: tlo.methods.hsi_event.HSI_Event, tlo.events.IndividualScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class HSI_RTI_Major_Surgeries):

__init__(module, person_id)

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)

Apply this event to the population.

Must be implemented by subclasses.

did_not_run()

Called when this event is due but it is not run. Return False to prevent the event being rescheduled, or True to allow the rescheduling. This is called each time that the event is tried to be run but it cannot be.

class HSI_RTI_Minor_Surgeries(module, person_id)

This is a Health System Interaction Event. An appointment of a person who has experienced a road traffic injury, had their injuries diagnosed through A and E, treatment plan organised by RTI_MedInt and requires minor surgery.

Minor surgeries are defined here as surgeries are generally superficial and do not require penetration of a body cavity. They do not involve assisted breathing or anesthesia and are usually performed by a single doctor.

The injuries treated in this module are as follows:

Evidence for all from Mkandawire et al. 2008: https://link.springer.com/article/10.1007%2Fs11999-008-0366-5 ‘211’ - Facial fractures ‘212’ - Facial fractures ‘291’ - Injury to the eye ‘241’ - Soft tissue injury of the face

‘322’ - Dislocation in the neck ‘323’ - Dislocation in the neck

‘722’ - Dislocated shoulder

External fixation of fractures ‘811’ - fractured foot ‘812’ - fractures tibia/fibula ‘813a’ - Fractured hip ‘813b’ - Fractured pelvis ‘813C’ - Fractured femur The properties altered in this function are: rt_med_int - update to show this person is being treated for their injuries. rt_date_to_remove_daly - assign recovery dates for the injuries treated with the surgery rt_injuries_for_minor_surgery - to remove codes due to be treated by minor surgery when that injury recieves

a treatment.

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

Bases: tlo.methods.hsi_event.HSI_Event, tlo.events.IndividualScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class HSI_RTI_Minor_Surgeries):

__init__(module, person_id)

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:

module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

apply(person_id, squeeze_factor)

Apply this event to the population.

Must be implemented by subclasses.

did_not_run()

Called when this event is due but it is not run. Return False to prevent the event being rescheduled, or True to allow the rescheduling. This is called each time that the event is tried to be run but it cannot be.

class RTI_Medical_Intervention_Death_Event(module, person_id)

This is the MedicalInterventionDeathEvent. It is scheduled by the MedicalInterventionEvent to occur at the end of the person’s determined length of stay. The risk of mortality for the person wil medical intervention is determined by the persons ISS score and whether they have polytrauma.

The properties altered by this event are: rt_post_med_death - updated to reflect when a person dies from their injuries

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:
  • module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

  • priority – a keyword-argument to set the priority (see Priority enum)

Bases: tlo.events.Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class RTI_Medical_Intervention_Death_Event):

__init__(module, person_id)

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:
  • module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

  • priority – a keyword-argument to set the priority (see Priority enum)

apply(person_id)

Apply this event to the given target.

Must be implemented by subclasses.

Parameters:

target – the target of the event

class RTI_No_Lifesaving_Medical_Intervention_Death_Event(module, person_id)

This is the NoMedicalInterventionDeathEvent. It is scheduled by the MedicalInterventionEvent which determines the resources required to treat that person and if they aren’t present, the person is sent here. This function is also called by the did not run function for rti_major_surgeries for certain injuries, implying that if life saving surgery is not available for the person, then we have to ask the probability of them dying without having this life saving surgery.

some information on time to craniotomy here: https://thejns.org/focus/view/journals/neurosurg-focus/45/6/article-pE2.xml?body=pdf-10653

The properties altered by this event are: rt_unavailable_med_death - to denote that this person has died due to medical interventions not being available

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:
  • module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

  • priority – a keyword-argument to set the priority (see Priority enum)

Bases: tlo.events.Event, tlo.events.IndividualScopeEventMixin

Functions (defined or overridden in class RTI_No_Lifesaving_Medical_Intervention_Death_Event):

__init__(module, person_id)

Create a new event.

Note that just creating an event does not schedule it to happen; that must be done by calling Simulation.schedule_event.

Parameters:
  • module – the module that created this event. All subclasses of Event take this as the first argument in their constructor, but may also take further keyword arguments.

  • priority – a keyword-argument to set the priority (see Priority enum)

apply(person_id)

Apply this event to the given target.

Must be implemented by subclasses.

Parameters:

target – the target of the event

class RTI_Logging_Event(module)

Produce a summary of the numbers of people with respect to the action of this module. This is a regular event that can output current states of people or cumulative events since last logging event.

Bases: tlo.events.RegularEvent, tlo.events.Event, tlo.events.PopulationScopeEventMixin

Class attributes:

__annotations__ : {}

Functions (defined or overridden in class RTI_Logging_Event):

__init__(module)

Produce a summary of the numbers of people with respect to the action of this module. This is a regular event that can output current states of people or cumulative events since last logging event.

apply(population)

Apply this event to the given target.

This is a no-op; subclasses should override this method.

Parameters:

target – the target of the event