Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
cf5ed0f
Dummy resource file for clinics and additional param in healthsystems
sangeetabhatia03 May 5, 2025
dd0a193
Necessary edits to docstring
sangeetabhatia03 May 5, 2025
909e069
Conditional read in new resource file
sangeetabhatia03 May 7, 2025
371ac5e
WIP; read and rescale clinic time
sangeetabhatia03 May 7, 2025
ab18c46
Update column name
sangeetabhatia03 May 14, 2025
d5b690d
Redefine daily capabilities down to non-fungible
sangeetabhatia03 May 14, 2025
d576369
Update daily capabilities based on fungible and non-fungible proportions
sangeetabhatia03 May 14, 2025
f5402f2
First pass at getting clinic eligibility
sangeetabhatia03 May 28, 2025
4c82733
Fix syntax errors
sangeetabhatia03 May 28, 2025
2936a15
WIP; setter needs to be moved
sangeetabhatia03 May 29, 2025
d6b43eb
Moved getters and setters to healthsystem
sangeetabhatia03 May 29, 2025
23163e2
Fix typo
sangeetabhatia03 Jun 6, 2025
f9c9297
Do not rescale if fractions don't add up to 1
sangeetabhatia03 Jun 6, 2025
b809fd8
Updated structure of Resource file
sangeetabhatia03 Jun 9, 2025
224352e
Modified Resource File and function to fill it out
sangeetabhatia03 Jun 9, 2025
4e337cb
Setup daily clinic capabilities for facility/cadre/module combination
sangeetabhatia03 Jun 9, 2025
1eb5fd0
Return fungible if module name not in Resource file
sangeetabhatia03 Jun 9, 2025
e069635
Clinic capabilities counter
sangeetabhatia03 Jun 9, 2025
6361f32
Use appropriate counters
sangeetabhatia03 Jun 10, 2025
7c21176
Fix indentation error and add test (wip)
sangeetabhatia03 Jun 19, 2025
41cceeb
Fix typos and further edits to test
sangeetabhatia03 Jun 19, 2025
838dba9
Fix more typos while reading in resource file
sangeetabhatia03 Jun 19, 2025
e1ce587
Update column name in resource file for consistency. Fix typos
sangeetabhatia03 Jun 20, 2025
329055d
Fix erroneous parens
sangeetabhatia03 Jun 20, 2025
f3f77ff
Retrieve module columns from Resource file before formatting it
sangeetabhatia03 Jun 20, 2025
822e492
Use self.parameters not PARAMETERS
sangeetabhatia03 Jun 20, 2025
812f569
Allow setter to accept an argument
sangeetabhatia03 Jun 20, 2025
f00f882
clinic eligibility is a property of the queue item, not healthsystem
sangeetabhatia03 Jun 20, 2025
877b475
update instance object to make dummy module eligible for clinic time
sangeetabhatia03 Jun 26, 2025
814ad5d
Cleanly create clinic capabilities monitor
sangeetabhatia03 Jun 26, 2025
1e55208
clinic eligibility belongs to queue item; not HSIEvent
sangeetabhatia03 Jun 26, 2025
e691217
reformat clinic capabilities
sangeetabhatia03 Jun 27, 2025
0f0d122
Fix structure of capabilities still available
sangeetabhatia03 Jun 30, 2025
9e69a62
Assign population to one district
sangeetabhatia03 Jun 30, 2025
5627c02
Remove debugging
sangeetabhatia03 Jun 30, 2025
ce90095
Log clinic name when setting is DEBUG
sangeetabhatia03 Jul 1, 2025
4a7905b
Test on number of clinic events; run ok
sangeetabhatia03 Jul 1, 2025
5a0c0f3
Test fungible runs if capabilities available
sangeetabhatia03 Jul 1, 2025
d23f272
Fungible/non-fungible/fungible runs ok
sangeetabhatia03 Jul 3, 2025
272e756
Set defaults for new arguments to ensure backward compatibility
sangeetabhatia03 Jul 8, 2025
1640ec1
Renaming variables for consistency
sangeetabhatia03 Jul 9, 2025
16fbba4
Test splitting of capabilities
sangeetabhatia03 Jul 10, 2025
e015c2c
DRY test for clinics
sangeetabhatia03 Jul 30, 2025
f699cad
Clinics tests run ok
sangeetabhatia03 Jul 31, 2025
66bff12
Raise error if level 2 facilities are assigned clinic capabilities
sangeetabhatia03 Jul 31, 2025
80e7edc
WIP
sangeetabhatia03 Jul 31, 2025
d40eaf4
Consistent variables names; expansion of clinic capabilities
sangeetabhatia03 Jul 31, 2025
d515a35
Update docstring
sangeetabhatia03 Jul 31, 2025
84068e2
Rename variable in test and iterate over clinic capabilities
sangeetabhatia03 Aug 1, 2025
9a2d754
Merge branch 'master' into fix-1608
sangeetabhatia03 Aug 1, 2025
52e7c7d
Merge branch 'master' into fix-1608
tbhallett Aug 5, 2025
cff8a4b
fix test (provide resourcefilepath as argument to simulation not module)
tbhallett Aug 5, 2025
58d5707
Include parameter in HealthSystem resource file
sangeetabhatia03 Sep 4, 2025
a7e6c98
Getters/Setters for include_clinics
sangeetabhatia03 Sep 4, 2025
5e4a591
Ingest include_clinics if passed via init
sangeetabhatia03 Sep 4, 2025
a327635
use include_clinics from parameters
sangeetabhatia03 Sep 4, 2025
71e1ea0
Define member method for adjusting capabilities
sangeetabhatia03 Sep 11, 2025
73a1e66
Preserve datatype of districts of residence, and update include_clini…
sangeetabhatia03 Sep 11, 2025
1973dc7
Set modules eligible for clinics and update test for 60/40 split
sangeetabhatia03 Sep 12, 2025
010949a
Use objects already in the module instead of MFL
sangeetabhatia03 Sep 12, 2025
68ce059
Create linked resource files
sangeetabhatia03 Sep 25, 2025
184dfb2
Resource files mapping clinics to treatment-id
sangeetabhatia03 Sep 26, 2025
67029ec
WIP
sangeetabhatia03 Sep 30, 2025
1527cef
Reuse old variable names except this is now a dictionary
sangeetabhatia03 Sep 30, 2025
b5cbc1d
Single logical strand for using non-other and other clinics in mode2
sangeetabhatia03 Sep 30, 2025
de8d3fe
Update tests
sangeetabhatia03 Oct 1, 2025
8e45d23
Fix typos and remove redundant variable
sangeetabhatia03 Oct 1, 2025
8cba450
Edits to deal with nested dictionary of daily capabilities
sangeetabhatia03 Oct 1, 2025
86e76ed
Clinic capabilities split test works
sangeetabhatia03 Oct 2, 2025
ed44504
Update scaling functions and tests to deal with nested dict
sangeetabhatia03 Oct 3, 2025
6155911
Update test to adjust per staff capabilities
sangeetabhatia03 Oct 3, 2025
3d259cb
All clinics tests pass ok
sangeetabhatia03 Oct 4, 2025
21b3443
Default empty config
sangeetabhatia03 Oct 4, 2025
b2cc86a
Update config in tests
sangeetabhatia03 Oct 4, 2025
1302433
Replace fungible with the old variable name
sangeetabhatia03 Oct 4, 2025
b70678b
Build capabilities monitor from daily capabilities
sangeetabhatia03 Oct 6, 2025
9b17f30
Calculate sequeeze factors per clinic
sangeetabhatia03 Oct 6, 2025
71493c3
Create a single element dictionary for mode 0 processing
sangeetabhatia03 Oct 6, 2025
b24f007
Turn capabilities back into Sesries for tests only
sangeetabhatia03 Oct 6, 2025
676aa02
Update clinics test to NOT use an empty dict
sangeetabhatia03 Oct 7, 2025
ac14311
Merge master
sangeetabhatia03 Oct 7, 2025
1afe44e
Add Clinic to expected fields
sangeetabhatia03 Oct 7, 2025
3e2436e
Consistent datatypes to avoid Inconsistent logger warning
sangeetabhatia03 Oct 8, 2025
a6c6fda
Remove check about level 2 facilities
sangeetabhatia03 Oct 9, 2025
d1d24d7
Modify setup to split capabilities BEFORE pooling across levels
sangeetabhatia03 Oct 13, 2025
1e61285
Pool capabilities and drop index
sangeetabhatia03 Oct 14, 2025
c790680
Merge branch 'master' into fix-1608
sangeetabhatia03 Oct 14, 2025
f95cfd7
Remove fungible terminology
sangeetabhatia03 Oct 14, 2025
090c000
Re-add files via LFS
tamuri Nov 3, 2025
99b0b24
Remove file with wildcard in name (unused)
tamuri Nov 3, 2025
664e884
Fix names of healthsystem resources subdirectory
tamuri Nov 3, 2025
cc9a676
Fix typo in variable name
sangeetabhatia03 Nov 5, 2025
e233df1
Rename OtherClinic to GenericClinic
sangeetabhatia03 Nov 11, 2025
1d31f1f
Rename OtherClinic to GenericClinic in resource files
sangeetabhatia03 Nov 11, 2025
89ab2f6
Check that clinic names across the two configuration files are consis…
sangeetabhatia03 Nov 12, 2025
9e9c9d7
Remove eligible_clinic property from hsi_event
sangeetabhatia03 Nov 13, 2025
823efad
Changes to ensure clinic eligibility is set and retrieved for HSIEven…
sangeetabhatia03 Nov 13, 2025
81ca231
Fix indentation
sangeetabhatia03 Nov 13, 2025
88ae07e
Merge from master
sangeetabhatia03 Nov 24, 2025
83b4615
Use rescaling factor by facility id and clinic
sangeetabhatia03 Nov 24, 2025
e161778
Iterate over clinics to get rescaling factor for each facility-id
sangeetabhatia03 Nov 24, 2025
6e52d97
Run through ruff
sangeetabhatia03 Nov 24, 2025
c1ee2fe
Some more formatting
sangeetabhatia03 Nov 24, 2025
62d8dcc
Initialise squeeze factor store in pre_initialise_population
sangeetabhatia03 Nov 24, 2025
247c39c
Make clinic_configuration and clinic_mapping an attribute
sangeetabhatia03 Dec 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Git LFS file not shown
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Facility_ID,Officer_Type_Code,GenericClinic
Git LFS file not shown
1,858 changes: 1,045 additions & 813 deletions src/tlo/methods/healthsystem.py

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/tlo/methods/hsi_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ class HSIEventQueueItem(NamedTuple):

Ensure priority is above topen in order for held-over events with low priority not
to jump ahead higher priority ones which were opened later.


"""

clinic_eligibility: str
priority: int
topen: Date
rand_queue_counter: (
Expand Down
Loading
Loading