class_patient
1from math import floor 2 3class Patient: 4 5 def __init__(self, p_id: int): 6 7 # Unique ID for patient 8 self.id = p_id 9 10 # Incident specific data 11 12 # Allocate triage code to patient 13 # This might vary by time of day/year etc. so lookup table might be more complicated 14 # or could use a simple regression? 15 self.ampds_card = "" 16 17 # Likely to be postcode sector i.e. BS1 9 of BS1 9HJ 18 self.postcode = "" 19 20 # incident location - latitude (2 decimal places) 21 self.lat = "" 22 self.long = "" 23 24 # ? Include incident times here ? 25 26 27 # Demographic data 28 29 self.age = 0 30 self.sex = "female" 31 32 #print(f"AMPDS code is {self.triage_code} and prop_female is {prop_female} and sex is {self.sex}") 33 34 # Keep track of cumulatative time 35 self.time_in_sim = 0 36 37 # Variables to keep track of time as the patient progresses through the model 38 # These are updated at every step 39 self.hour = 0 40 self.day = "Mon" 41 self.month = 1 42 self.qtr = 1 43 self.weekday = "weekday" 44 self.current_dt = None # TODO: Initialise as a dt? 45 46 # HEMS/critical care specific items 47 self.time_to_cc = 0 48 self.cc_conveyed = 0 49 self.cc_flown = 0 50 self.cc_travelled_with = 0 51 # Binary flag to indicate whether it is a 'HEMS job' whether they attend or not 52 self.hems_case = -1 53 # Binary flag to indicate whether patient cared for by HEMS or not 54 self.hems = -1 55 self.hems_result = "" 56 self.hems_pref_vehicle_type = "" 57 self.hems_pref_callsign_group = "" 58 # Strings relating to allocated vehicle 59 self.hems_vehicle_type = "" 60 self.hems_callsign_group = "" 61 self.hems_registration = "" 62 self.hems_category = "" # allocated vehicle registration 63 self.callsign = "" # allocated vehicle callsign 64 65 self.pt_outcome = "" 66 67 # Category to denote need for EC/CC or REG (regular) care 68 self.hems_cc_or_ec = "REG" 69 70 # Is the helicopter beneficial for this job? 71 self.hems_helicopter_benefit = "" 72 73 # Critical care desk staffed 74 self.cc_desk = 0 75 76 # Despatched by EOC outside of criteria 77 # 0 = no, 1 = P1, 2 = P2, 3 = P3 maybe? 78 self.dispatcher_intervention = 0 79 80 self.time_to_first_respone = 0
class
Patient:
5class Patient: 6 7 def __init__(self, p_id: int): 8 9 # Unique ID for patient 10 self.id = p_id 11 12 # Incident specific data 13 14 # Allocate triage code to patient 15 # This might vary by time of day/year etc. so lookup table might be more complicated 16 # or could use a simple regression? 17 self.ampds_card = "" 18 19 # Likely to be postcode sector i.e. BS1 9 of BS1 9HJ 20 self.postcode = "" 21 22 # incident location - latitude (2 decimal places) 23 self.lat = "" 24 self.long = "" 25 26 # ? Include incident times here ? 27 28 29 # Demographic data 30 31 self.age = 0 32 self.sex = "female" 33 34 #print(f"AMPDS code is {self.triage_code} and prop_female is {prop_female} and sex is {self.sex}") 35 36 # Keep track of cumulatative time 37 self.time_in_sim = 0 38 39 # Variables to keep track of time as the patient progresses through the model 40 # These are updated at every step 41 self.hour = 0 42 self.day = "Mon" 43 self.month = 1 44 self.qtr = 1 45 self.weekday = "weekday" 46 self.current_dt = None # TODO: Initialise as a dt? 47 48 # HEMS/critical care specific items 49 self.time_to_cc = 0 50 self.cc_conveyed = 0 51 self.cc_flown = 0 52 self.cc_travelled_with = 0 53 # Binary flag to indicate whether it is a 'HEMS job' whether they attend or not 54 self.hems_case = -1 55 # Binary flag to indicate whether patient cared for by HEMS or not 56 self.hems = -1 57 self.hems_result = "" 58 self.hems_pref_vehicle_type = "" 59 self.hems_pref_callsign_group = "" 60 # Strings relating to allocated vehicle 61 self.hems_vehicle_type = "" 62 self.hems_callsign_group = "" 63 self.hems_registration = "" 64 self.hems_category = "" # allocated vehicle registration 65 self.callsign = "" # allocated vehicle callsign 66 67 self.pt_outcome = "" 68 69 # Category to denote need for EC/CC or REG (regular) care 70 self.hems_cc_or_ec = "REG" 71 72 # Is the helicopter beneficial for this job? 73 self.hems_helicopter_benefit = "" 74 75 # Critical care desk staffed 76 self.cc_desk = 0 77 78 # Despatched by EOC outside of criteria 79 # 0 = no, 1 = P1, 2 = P2, 3 = P3 maybe? 80 self.dispatcher_intervention = 0 81 82 self.time_to_first_respone = 0
Patient(p_id: int)
7 def __init__(self, p_id: int): 8 9 # Unique ID for patient 10 self.id = p_id 11 12 # Incident specific data 13 14 # Allocate triage code to patient 15 # This might vary by time of day/year etc. so lookup table might be more complicated 16 # or could use a simple regression? 17 self.ampds_card = "" 18 19 # Likely to be postcode sector i.e. BS1 9 of BS1 9HJ 20 self.postcode = "" 21 22 # incident location - latitude (2 decimal places) 23 self.lat = "" 24 self.long = "" 25 26 # ? Include incident times here ? 27 28 29 # Demographic data 30 31 self.age = 0 32 self.sex = "female" 33 34 #print(f"AMPDS code is {self.triage_code} and prop_female is {prop_female} and sex is {self.sex}") 35 36 # Keep track of cumulatative time 37 self.time_in_sim = 0 38 39 # Variables to keep track of time as the patient progresses through the model 40 # These are updated at every step 41 self.hour = 0 42 self.day = "Mon" 43 self.month = 1 44 self.qtr = 1 45 self.weekday = "weekday" 46 self.current_dt = None # TODO: Initialise as a dt? 47 48 # HEMS/critical care specific items 49 self.time_to_cc = 0 50 self.cc_conveyed = 0 51 self.cc_flown = 0 52 self.cc_travelled_with = 0 53 # Binary flag to indicate whether it is a 'HEMS job' whether they attend or not 54 self.hems_case = -1 55 # Binary flag to indicate whether patient cared for by HEMS or not 56 self.hems = -1 57 self.hems_result = "" 58 self.hems_pref_vehicle_type = "" 59 self.hems_pref_callsign_group = "" 60 # Strings relating to allocated vehicle 61 self.hems_vehicle_type = "" 62 self.hems_callsign_group = "" 63 self.hems_registration = "" 64 self.hems_category = "" # allocated vehicle registration 65 self.callsign = "" # allocated vehicle callsign 66 67 self.pt_outcome = "" 68 69 # Category to denote need for EC/CC or REG (regular) care 70 self.hems_cc_or_ec = "REG" 71 72 # Is the helicopter beneficial for this job? 73 self.hems_helicopter_benefit = "" 74 75 # Critical care desk staffed 76 self.cc_desk = 0 77 78 # Despatched by EOC outside of criteria 79 # 0 = no, 1 = P1, 2 = P2, 3 = P3 maybe? 80 self.dispatcher_intervention = 0 81 82 self.time_to_first_respone = 0