Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figures for Bingling's paper on Healthcare Workforce #436

Draft
wants to merge 145 commits into
base: master
Choose a base branch
from

Conversation

tbhallett
Copy link
Collaborator

@BinglingICL, we can use this PR to bring in the scripts being used to make the figures in your manuscript.

I would recommend placing them in src/scripts/healthsystem/descriptions_of_input_data and have them run off the files in resources.

I've also created some files in a folder called src/scripts/healthsystem/hsi_in_typical_run, which we can use to run
the model and analyse the HSI that are actually occuring. The file scenario_hsi_in_typical_run.py defines the model run and the file analysis_hsi_in_typical_run.py
extracts the data from that run and produces some simple descriptions of it. I think you will be able to do a very nice job of describing these results for the paper.

@BinglingICL
Copy link
Collaborator

@BinglingICL, we can use this PR to bring in the scripts being used to make the figures in your manuscript.

I would recommend placing them in src/scripts/healthsystem/descriptions_of_input_data and have them run off the files in resources.

I've also created some files in a folder called src/scripts/healthsystem/hsi_in_typical_run, which we can use to run the model and analyse the HSI that are actually occuring. The file scenario_hsi_in_typical_run.py defines the model run and the file analysis_hsi_in_typical_run.py extracts the data from that run and produces some simple descriptions of it. I think you will be able to do a very nice job of describing these results for the paper.

Thanks for this @tbhallett. I am planning to first draw the HSI figure that is needed by the current draft, then move files that produce histograms and sankey diagrams to the folder you recommend.

A quick question: how do I work on the branch "hallett/figure-to-describe-hsi" that you created for producing the figures? I tried to merge it to my local master but it does not show?

@tbhallett
Copy link
Collaborator Author

@BinglingICL, we can use this PR to bring in the scripts being used to make the figures in your manuscript.
I would recommend placing them in src/scripts/healthsystem/descriptions_of_input_data and have them run off the files in resources.
I've also created some files in a folder called src/scripts/healthsystem/hsi_in_typical_run, which we can use to run the model and analyse the HSI that are actually occuring. The file scenario_hsi_in_typical_run.py defines the model run and the file analysis_hsi_in_typical_run.py extracts the data from that run and produces some simple descriptions of it. I think you will be able to do a very nice job of describing these results for the paper.

Thanks for this @tbhallett. I am planning to first draw the HSI figure that is needed by the current draft, then move files that produce histograms and sankey diagrams to the folder you recommend.

Sounds perfect.

A quick question: how do I work on the branch "hallett/figure-to-describe-hsi" that you created for producing the figures? I tried to merge it to my local master but it does not show?

Check out this branch locally. Then you can work on it and push commits onto this branch,

@BinglingICL
Copy link
Collaborator

Check out this branch locally. Then you can work on it and push commits onto this branch,

Thanks. Check out is working!

@tbhallett
Copy link
Collaborator Author

I should also have said.... with this I am also aiming to introduce you to using our remote compute resource (Azure). We can discuss tomorrow in detail but hopefully you'll get the gist. Have you installed the things needed for using that yet?

@BinglingICL
Copy link
Collaborator

I should also have said.... with this I am also aiming to introduce you to using our remote compute resource (Azure). We can discuss tomorrow in detail but hopefully you'll get the gist. Have you installed the things needed for using that yet?

Sorry that I have no idea about the things needed to use Azure. Thanks for this arrangement. Looking forward to discussing with you tomorrow. Any time slot would be fine for me.

@BinglingICL
Copy link
Collaborator

@BinglingICL, we can use this PR to bring in the scripts being used to make the figures in your manuscript.
I would recommend placing them in src/scripts/healthsystem/descriptions_of_input_data and have them run off the files in resources.
I've also created some files in a folder called src/scripts/healthsystem/hsi_in_typical_run, which we can use to run the model and analyse the HSI that are actually occuring. The file scenario_hsi_in_typical_run.py defines the model run and the file analysis_hsi_in_typical_run.py extracts the data from that run and produces some simple descriptions of it. I think you will be able to do a very nice job of describing these results for the paper.

Thanks for this @tbhallett. I am planning to first draw the HSI figure that is needed by the current draft, then move files that produce histograms and sankey diagrams to the folder you recommend.

Sounds perfect.

Sorry @tbhallett, another quick question: for the generated figures, we aim to put them in the TLOmodel/outputs folder? And since there a quite a few figures for different measures and scenarios, do you mind if I create folders inside 'outputs' to store them separately?

@BinglingICL
Copy link
Collaborator

Note the latest failing tests should relate to commit cffd1ea, which reverted the merge of level 1b and 2 in master.

Will leave these issues for now, as no need to re-submit scale run to update current results in HCW paper.

@BinglingICL
Copy link
Collaborator

BinglingICL commented Aug 19, 2023

Hi Tim @tbhallett, I have updated the appt-hsi sankey for our HCW paper as below:

old - subsets of appts and HSIs, no facility levels, based on very old scale run results (perhaps in the first submission)
Fig6

new - all appts and HSIs that are run, facility levels included, based on latest scale run
image

Although the new is quite long, but I think it includes all the appts, facility levels and HSIs in TLO and provides a full picture of how each HSI is assigned to one or more appts, at one or more facility levels, thus providing a good illustration of HSIs and the linking to appts that using HCW capabilities at different levels. I wonder how you think of it? Is there any concern or comment? Many thanks.

@BinglingICL
Copy link
Collaborator

BinglingICL commented Aug 19, 2023

And thanks so much for the quick check and merging of PR #1072. I have merged in latest master. Will submit another scale run once all tests passed. Would be happy to update our HCW paper results subsequently, if the hsi calibration is improved as expected.

@tbhallett
Copy link
Collaborator Author

Although the new is quite long, but I think it includes all the appts, facility levels and HSIs in TLO and provides a full picture of how each HSI is assigned to one or more appts, at one or more facility levels, thus providing a good illustration of HSIs and the linking to appts that using HCW capabilities at different levels. I wonder how you think of it? Is there any concern or comment? Many thanks.

WOW -- I think the new large one is beautiful ..... but that, unfortunately, people are not going to be able to read it and interpret it.

However, I agree that that it's good to have one that shows all the HSI. Maybe taking out the 'stage' of facility level would make it more manageable!? Otherwise, I think it'd be OK to stick with the original smaller one, as it provides the "example" of the point we wish to make.

@BinglingICL
Copy link
Collaborator

BinglingICL commented Aug 21, 2023

Although the new is quite long, but I think it includes all the appts, facility levels and HSIs in TLO and provides a full picture of how each HSI is assigned to one or more appts, at one or more facility levels, thus providing a good illustration of HSIs and the linking to appts that using HCW capabilities at different levels. I wonder how you think of it? Is there any concern or comment? Many thanks.

WOW -- I think the new large one is beautiful ..... but that, unfortunately, people are not going to be able to read it and interpret it.

However, I agree that that it's good to have one that shows all the HSI. Maybe taking out the 'stage' of facility level would make it more manageable!? Otherwise, I think it'd be OK to stick with the original smaller one, as it provides the "example" of the point we wish to make.

Thanks Tim. Yeah, the long and complex figure is not good for reading. I have used latest scale run results to plot two more sankeys of the purpose of illustrating HSI and their call for appts.
(1) The one included all appts and HSIs but no facility level info: still long, but clearer; each flow has the same thickness, as the diagram only shows each hsi’s appt footprint as the definition of hsi, not the counts of hsi per appt as the simulated usage of hsi. (which I think is fine, because our hcw time sankey plots in the end have shown how much hcw time is used by which hsi through which appt, derived from the usage of hsi.)
image
(2) The one include only Over5OPD and all HSIs that have it as an appt footprint at different levels: not long, clearer, easier to explain; each flow has the same thickness, too.
image

The tricky thing about the very old sankey (0, as below) is that it was from a scale run very long time ago. I could not find the results now, thus not able to reproduce it. Thus, I am not very sure what does the thickness of each flow exactly mean (should be the count of that HSIs though). Besides, I think the HSIs and healthsystem logger has been updated since I had produced that plot; also considering our hsi calibration efforts, the results in that run might not be reliable anymore.
(0) The old one
image

Therefore, I do hope we could use an updated plot there. I think (1) or (2) could do the illustration for HSIs and how they use/compete for hcw time through a common currency of appts (at different levels). How do you think? If alright, we could also consider to move it to earlier results section of Part I, as the fundamental definition result for hsi, immediately after Fig 4. (I might prefer (2) as well as this reorganisation, as we had missed the definition result for hsi, although it is one of the core components of the hcw model. The long sankey covers all appts, all hsis and all levels could be in the appendix if necessary.)

If you might suggest to use (0) or something similar that represents the hsi, the appt footprint and the count of hsi per appt, I would like to spend some more time to reproduce it using our latest results and make sure it captures some HSIs, some appts, and the thickness of flow reflecting the count of HSI per appt. And I think its position should remain then in Result Part II.

@BinglingICL
Copy link
Collaborator

BinglingICL commented Aug 23, 2023

The tricky thing about the very old sankey (0, as below) is that it was from a scale run very long time ago. I could not find the results now, thus not able to reproduce it. Thus, I am not very sure what does the thickness of each flow exactly mean (should be the count of that HSIs though). Besided, I think the HSIs and healthsystem logger has been updated since I had produced that plot; also considering our hsi calibration efforts, the results in that run might not be reliable anymore.
(0) The old one
image

The new plot (0) based on latest scale run as below. I am confident to use this one now, as it uses the latest results and it is clear to illustrate that the all relevant HSI events (that have appointment footprints on the left at level 1a) are using and competing for HCW capabilities through the currency of appointment types; also, the flow thickness reflects the relative proportions of HSI counts per appointment. (The one that covers all HSIs in TLO is very long and unclear for understanding; thus, we might not use it. However, I think it is fine as in our m/s we have referred to our tlo-HSI website for all HSI details: https://www.tlomodel.org/hsi_events.html)
image

@tbhallett
Copy link
Collaborator Author

Thanks @BinglingICL. I'm very happy with that. I do like the long one and I'll put it on the website, as you suggest.

…tes and better match with latest Model usage
@BinglingICL
Copy link
Collaborator

Hi Tim, as I am updating the results, I noticed that PR #1027 has changed our hsi calibration results on MentalAll model/data ratio: now reduced to 0.4 as attached.
image

The quick fix is in commit 32d317d, which could improve the ratio to 0.9 as below.
image

I am using this fixed results (not much difference overall though) in the paper. Would be happy to raise a small PR to make the above commit to update the server tlo output, after I finished the current editing of the paper, if you think it would be helpful.

@tbhallett
Copy link
Collaborator Author

Hi Tim, as I am updating the results, I noticed that PR #1027 has changed our hsi calibration results on MentalAll model/data ratio: now reduced to 0.4 as attached. image

The quick fix is in commit 32d317d, which could improve the ratio to 0.9 as below. image

I am using this fixed results (not much difference overall though) in the paper. Would be happy to raise a small PR to make the above commit to update the server tlo output, after I finished the current editing of the paper, if you think it would be helpful.

Thanks. Yes, please do raise a PR for that change then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants