UCL / TLOmodel

Epidemiology modelling framework for the Thanzi la Onse project
https://www.tlomodel.org/
MIT License
12 stars 5 forks source link

IPAdmission usage remains high #982

Open BinglingICL opened 1 year ago

BinglingICL commented 1 year ago

Our latest scale run, as attached, shows that our IPAdmission usage called by the treatment of inpatient care is still a little bit high. We are seeking advice and help from Joe and Ines to find any possibility to reduce its usage in maternity and alri modules, which are ranking top.

image image

joehcollins commented 1 year ago

PR #981 linked to this issue. Once merged Bingling is happy to recheck the calibration to see if further action is needed in relation to ANC modules

BinglingICL commented 1 year ago

PR #981 linked to this issue. Once merged Bingling is happy to recheck the calibration to see if further action is needed in relation to ANC modules

Thanks Joe! Will share the output here.

joehcollins commented 1 year ago

Other actions that could be taken to improve calibration relating to treatment_id 'Antenatal_Inpatient':

BinglingICL commented 1 year ago

Hi Joe @joehcollins (cc @inesll @tbhallett ), would like to share with you the IPAdmission usage before and after PR #981 as below. There seems no obvious change, unfortunately.

image image

BinglingICL commented 1 year ago

Other actions that could be taken to improve calibration relating to treatment_id 'Antenatal_Inpatient':

  • Move treatment of less severe complications outside of inpatient HSI and into ANC HSI. For example, currently all new cases of anaemia are scheduled for admission to ANC (prevalence during pregnancy is approx 40%). This may be a more realistic reflection of clinical practice and would not lead to lots of additional OPD appointments which are already too high
  • Remove HSI_PresentsForInduction and instead funnel these women straight into the delivery HSI as currently this is double counting IP appointments. Not sure how many that would affect though.

Just paste here Tim's suggestion in PR #981: https://github.com/UCL/TLOmodel/pull/981#issuecomment-1563183939

BinglingICL commented 1 year ago

And I know Ines is thinking about reducing IPAdmission via updating Alri_Pneumonia_Treatment_Inpatient_Followup service.

Thanks so much all. Let's keep discussions.

inesll commented 1 year ago

Hi @BinglingICL I create a branch called alri_IPadmission_fix_issue_982. I made a small fix in alri.py. Do you want to check if that made any differnce on the outputs, please?

I just changed line 2661 to: if treatment_outcome == 'failure':

apply 30% chance of following-up

                if self.module.rng.random_sample < 0.3:
                    self._schedule_follow_up_following_treatment_failure()
joehcollins commented 1 year ago

Also wondering if we can get the information broken down by HSI name as opposed to treatment id which is shared by multiple HSIs?

BinglingICL commented 1 year ago

Hi @BinglingICL I create a branch called alri_IPadmission_fix_issue_982. I made a small fix in alri.py. Do you want to check if that made any differnce on the outputs, please?

I just changed line 2661 to: if treatment_outcome == 'failure': # apply 30% chance of following-up if self.module.rng.random_sample < 0.3: self._schedule_follow_up_following_treatment_failure()

Hi @inesll, thanks so much for this. Sure, I can do a check on the outputs. Could you please push the branch so that I can access it?

Also, would you mind if I create a parameter for this 30% chance, e.g. prob_of_followup_treatment? In this way, we could set it to any value if necessary.

BinglingICL commented 1 year ago

Also wondering if we can get the information broken down by HSI name as opposed to treatment id which is shared by multiple HSIs?

Hi @joehcollins, I think we can, although currently we have only scripts to count by treatment id. Would need to update the logger in healthsystem.summary and create the function for counting appts (by hsi event name). Will check with Tim @tbhallett what would be the most efficient way to do this.

tbhallett commented 1 year ago

Also wondering if we can get the information broken down by HSI name as opposed to treatment id which is shared by multiple HSIs?

Hi @joehcollins, I think we can, although currently we have only scripts to count by treatment id. Would need to update the logger in healthsystem.summary and create the function for counting appts (by hsi event name). Will check with Tim @tbhallett what would be the most efficient way to do this.

It's possible but would be hard to adapt the logger to do it. The best way would be to use the outputs that exists in the DEBUG logger, which includes a record of each and every HSI that is run (or not run). That's cumbersome to handle, but I can give you the scripts. A quicker solution would be to temporarily change the TREATMENT_IDs, to distinguish the ones you want to distinguish... and then the existing logger will work immediately (though some plotting scripts may complain a little bit!).

BinglingICL commented 1 year ago

Also wondering if we can get the information broken down by HSI name as opposed to treatment id which is shared by multiple HSIs?

Hi @joehcollins, I think we can, although currently we have only scripts to count by treatment id. Would need to update the logger in healthsystem.summary and create the function for counting appts (by hsi event name). Will check with Tim @tbhallett what would be the most efficient way to do this.

It's possible but would be hard to adapt the logger to do it. The best way would be to use the outputs that exists in the DEBUG logger, which includes a record of each and every HSI that is run (or not run). That's cumbersome to handle, but I can give you the scripts. A quicker solution would be to temporarily change the TREATMENT_IDs, to distinguish the ones you want to distinguish... and then the existing logger will work immediately (though some plotting scripts may complain a little bit!).

Thanks very much @tbhallett. The quicker solution sounds nice. Hi @joehcollins, do let me know which hsi usage you want to check and I will change the treatment ids in a temporary branch, where I would do a scale run to also check Ines's change on IPAmission @inesll and my own change on Csection (for issue #983).

inesll commented 1 year ago

would do a scale run to also check Ines's change

Hi @BinglingICL! I already had pushed it... how odd, I pushed it again now but there wasn't any commit to push. Let me know if you find it, otherwise just try that little code change :) Of course you can add the new parameter! Thanks very much!

BinglingICL commented 1 year ago

would do a scale run to also check Ines's change

Hi @BinglingICL! I already had pushed it... how odd, I pushed it again now but there wasn't any commit to push. Let me know if you find it, otherwise just try that little code change :) Of course you can add the new parameter! Thanks very much!

Hi @inesll, thanks very much for retrying. I still cannot find the branch in tlo repo. I wonder if you have created a pull request for this branch? No worries at all if you would like to me create a branch to implement your changes.

joehcollins commented 1 year ago

Hi @BinglingICL - looking at the code i'm now not sure if it will be worth while as there are only 2 HSIs which share the Antenatal_Inpatient treatment ID and i'm sure the majority are related to the main ANC inpatient HSI.

We probably need to think then on how to reduce the instances of the HSI HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare.

inesll commented 1 year ago

would do a scale run to also check Ines's change

Hi @BinglingICL! I already had pushed it... how odd, I pushed it again now but there wasn't any commit to push. Let me know if you find it, otherwise just try that little code change :) Of course you can add the new parameter! Thanks very much!

Hi @inesll, thanks very much for retrying. I still cannot find the branch in tlo repo. I wonder if you have created a pull request for this branch? No worries at all if you would like to me create a branch to implement your changes.

https://github.com/UCL/TLOmodel/blob/33efcea90fa6536642c48c96a369b563f479a48d/src/tlo/methods/alri.py#L2661

BinglingICL commented 1 year ago

would do a scale run to also check Ines's change

Hi @BinglingICL! I already had pushed it... how odd, I pushed it again now but there wasn't any commit to push. Let me know if you find it, otherwise just try that little code change :) Of course you can add the new parameter! Thanks very much!

Hi @inesll, thanks very much for retrying. I still cannot find the branch in tlo repo. I wonder if you have created a pull request for this branch? No worries at all if you would like to me create a branch to implement your changes.

https://github.com/UCL/TLOmodel/blob/33efcea90fa6536642c48c96a369b563f479a48d/src/tlo/methods/alri.py#L2661

Thanks @inesll. Will implement this change to my working branch.

BinglingICL commented 1 year ago

HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare

Thanks @joehcollins. Will read the route of this HSI and let us discuss how to improve if possible.

BinglingICL commented 1 year ago

The latest results (from master that merged in pr #995 and from pr #994) are: image image

BinglingICL commented 1 year ago

HSI_CareOfWomenDuringPregnancy_AntenatalWardInpatientCare

Thanks @joehcollins. Will read the route of this HSI and let us discuss how to improve if possible.

Hi @joehcollins, I have read your modules to learn the routes of this HSI, which are drafted in the attached figure. Would be grateful if we could further discuss to how to reduce its usage. But let us wait for Tara's PR #965 merging in and see if it is necessary to further reduce IPAdmission usage. Hopefully, this will be before 1 July : )

IMG_0130

joehcollins commented 1 year ago

Hi @BinglingICL this looks like you've got the pathways mapped correctly here (theres no overlap for the FocusedANC visits that you need to worry about).

Let me know what happens after Taras PR and then we can go from there!!

BinglingICL commented 1 year ago

Hi @BinglingICL this looks like you've got the pathways mapped correctly here (theres no overlap for the FocusedANC visits that you need to worry about).

Let me know what happens after Taras PR and then we can go from there!!

This is our newest hsi calibration results: image image image

I think currently we are satisfied with these results? (@tbhallett @tdm32 @marghe-molaro). But absolutely will be happy to discuss with Joe and you all for any further improvement.