@@ -175,7 +175,40 @@ def __init__(self, name=None):
175175 "sensitivity_of_diagnostic_device_for_other_adult_cancer_with_other_adult_ca_metastatic" : Parameter (
176176 Types .REAL , "sensitivity of diagnostic_device_for diagnosis of other_adult cancer for those with "
177177 "other_adult_ca metastatic"
178- )
178+ ),
179+ "odds_ratio_health_seeking_in_adults_early_other_adult_ca_symptom" : Parameter (
180+ Types .REAL , "odds ratio for health seeking in adults with early other adult cancer symptom"
181+ ),
182+ "post_treatment_check_months" : Parameter (
183+ Types .REAL , "months to first post-treatment check appointment"
184+ ),
185+ "follow_up_appt_months" : Parameter (
186+ Types .REAL , "months between follow-up appointments after treatment"
187+ ),
188+ "palliative_care_interval_months" : Parameter (
189+ Types .REAL , "months between palliative care appointments"
190+ ),
191+ "treatment_bed_days" : Parameter (
192+ Types .REAL , "number of bed days required for cancer treatment"
193+ ),
194+ "palliative_care_bed_days" : Parameter (
195+ Types .REAL , "number of bed days required for palliative care"
196+ ),
197+ "min_age_adult_cancer" : Parameter (
198+ Types .REAL , "minimum age for adult cancer"
199+ ),
200+ "initial_polling_start_months" : Parameter (
201+ Types .INT , "initial polling months delay"
202+ ),
203+ "initial_polling_start_months_palliative_care" : Parameter (
204+ Types .REAL , "initial polling months delay for pal care"
205+ ),
206+ "initial_polling_start_delay_weeks_palliative_care" : Parameter (
207+ Types .REAL , "week delay after initial_polling_start_months_palliative_care for initial pal care"
208+ ),
209+ "main_polling_event_frequency_months" : Parameter (
210+ Types .REAL , "frequency of main polling event"
211+ ),
179212 }
180213
181214 PROPERTIES = {
@@ -223,7 +256,7 @@ def read_parameters(self, resourcefilepath: Optional[Path] = None):
223256 # Register Symptom that this module will use
224257 self .sim .modules ['SymptomManager' ].register_symptom (
225258 Symptom (name = 'early_other_adult_ca_symptom' ,
226- odds_ratio_health_seeking_in_adults = 4.00 ,
259+ odds_ratio_health_seeking_in_adults = self . parameters [ 'odds_ratio_health_seeking_in_adults_early_other_adult_ca_symptom' ] ,
227260 no_healthcareseeking_in_children = True )
228261 )
229262
@@ -374,6 +407,7 @@ def initialise_simulation(self, sim):
374407 * Define the Disability-weights
375408 * Schedule the palliative care appointments for those that are on palliative care at initiation
376409 """
410+ p = self .parameters
377411 # We call the following function to store the required consumables for the simulation run within the appropriate
378412 # dictionary
379413 self .item_codes_other_can = get_consumable_item_codes_cancers (self )
@@ -384,7 +418,8 @@ def initialise_simulation(self, sim):
384418
385419 # ----- SCHEDULE MAIN POLLING EVENTS -----
386420 # Schedule main polling event to happen immediately
387- sim .schedule_event (OtherAdultCancerMainPollingEvent (self ), sim .date + DateOffset (months = 1 ))
421+ sim .schedule_event (OtherAdultCancerMainPollingEvent (self ), sim .date +
422+ DateOffset (months = p ['initial_polling_start_months' ]))
388423
389424 # ----- LINEAR MODELS -----
390425 # Define LinearModels for the progression of cancer, in each 3 month period
@@ -512,8 +547,9 @@ def initialise_simulation(self, sim):
512547 self .sim .modules ['HealthSystem' ].schedule_hsi_event (
513548 hsi_event = HSI_OtherAdultCancer_PalliativeCare (module = self , person_id = person_id ),
514549 priority = 0 ,
515- topen = self .sim .date + DateOffset (months = 1 ),
516- tclose = self .sim .date + DateOffset (months = 1 ) + DateOffset (weeks = 1 )
550+ topen = self .sim .date + DateOffset (months = p ['initial_polling_start_months_palliative_care' ]),
551+ tclose = self .sim .date + DateOffset (months = p ['initial_polling_start_months_palliative_care' ]) +
552+ DateOffset (weeks = p ['initial_polling_start_delay_weeks_palliative_care' ])
517553 )
518554
519555 def on_birth (self , mother_id , child_id ):
@@ -582,7 +618,10 @@ def do_at_generic_first_appt(
582618 schedule_hsi_event : HSIEventScheduler ,
583619 ** kwargs
584620 ) -> None :
585- if individual_properties ["age_years" ] > 5 and "early_other_adult_ca_symptom" in symptoms :
621+ p = self .parameters
622+
623+ if (individual_properties ["age_years" ] > p ["min_age_adult_cancer" ] and
624+ "early_other_adult_ca_symptom" in symptoms ):
586625 event = HSI_OtherAdultCancer_Investigation_Following_early_other_adult_ca_symptom (
587626 person_id = person_id ,
588627 module = self ,
@@ -603,7 +642,8 @@ class OtherAdultCancerMainPollingEvent(RegularEvent, PopulationScopeEventMixin):
603642 """
604643
605644 def __init__ (self , module ):
606- super ().__init__ (module , frequency = DateOffset (months = 1 ))
645+ p = module .parameters
646+ super ().__init__ (module , frequency = DateOffset (months = p ['main_polling_event_frequency_months' ]))
607647 # scheduled to run every 1 month : do not change as this is hard-wired into the values of all the parameters.
608648
609649 def apply (self , population ):
@@ -763,11 +803,13 @@ def __init__(self, module, person_id):
763803 self .TREATMENT_ID = "OtherAdultCancer_Treatment"
764804 self .EXPECTED_APPT_FOOTPRINT = self .make_appt_footprint ({"MajorSurg" : 1 })
765805 self .ACCEPTED_FACILITY_LEVEL = '3'
766- self .BEDDAYS_FOOTPRINT = self .make_beddays_footprint ({"general_bed" : 5 })
806+ self .BEDDAYS_FOOTPRINT = (
807+ self .make_beddays_footprint ({"general_bed" : int (self .module .parameters ['treatment_bed_days' ])}))
767808
768809 def apply (self , person_id , squeeze_factor ):
769810 df = self .sim .population .props
770811 hs = self .sim .modules ["HealthSystem" ]
812+ p = self .module .parameters
771813
772814 if not df .at [person_id , 'is_alive' ]:
773815 return hs .get_blank_appt_footprint ()
@@ -823,7 +865,7 @@ def apply(self, person_id, squeeze_factor):
823865 module = self .module ,
824866 person_id = person_id ,
825867 ),
826- topen = self .sim .date + DateOffset (months = 12 ),
868+ topen = self .sim .date + DateOffset (months = p [ 'post_treatment_check_months' ] ),
827869 tclose = None ,
828870 priority = 0
829871 )
@@ -890,7 +932,7 @@ def apply(self, person_id, squeeze_factor):
890932 module = self .module ,
891933 person_id = person_id
892934 ),
893- topen = self .sim .date + DateOffset (months = 3 ),
935+ topen = self .sim .date + DateOffset (months = self . module . parameters [ 'follow_up_appt_months' ] ),
894936 tclose = None ,
895937 priority = 0
896938 )
@@ -917,11 +959,13 @@ def __init__(self, module, person_id):
917959 self .TREATMENT_ID = "OtherAdultCancer_PalliativeCare"
918960 self .EXPECTED_APPT_FOOTPRINT = self .make_appt_footprint ({})
919961 self .ACCEPTED_FACILITY_LEVEL = '2'
920- self .BEDDAYS_FOOTPRINT = self .make_beddays_footprint ({'general_bed' : 15 })
962+ self .BEDDAYS_FOOTPRINT = (
963+ self .make_beddays_footprint ({'general_bed' : int (self .module .parameters ['palliative_care_bed_days' ])}))
921964
922965 def apply (self , person_id , squeeze_factor ):
923966 df = self .sim .population .props
924967 hs = self .sim .modules ["HealthSystem" ]
968+ p = self .module .parameters
925969
926970 if not df .at [person_id , 'is_alive' ]:
927971 return hs .get_blank_appt_footprint ()
@@ -950,13 +994,13 @@ def apply(self, person_id, squeeze_factor):
950994 if pd .isnull (df .at [person_id , "oac_date_palliative_care" ]):
951995 df .at [person_id , "oac_date_palliative_care" ] = self .sim .date
952996
953- # Schedule another instance of the event for one month
997+ # Schedule another instance of the event
954998 hs .schedule_hsi_event (
955999 hsi_event = HSI_OtherAdultCancer_PalliativeCare (
9561000 module = self .module ,
9571001 person_id = person_id
9581002 ),
959- topen = self .sim .date + DateOffset (months = 1 ),
1003+ topen = self .sim .date + DateOffset (months = p [ 'palliative_care_interval_months' ] ),
9601004 tclose = None ,
9611005 priority = 0
9621006 )
0 commit comments