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

[WIP] plot_age_pyramid: add the possibility to have one datetime_ref that differs for each patient #18

Closed

Conversation

strayMat
Copy link
Contributor

@strayMat strayMat commented Dec 8, 2022

The previous plot_age_pyramid function only allow for one fixed datetime reference for all persons.

In some case studies , we would like to have a different datetime of reference for each person.
Eg. the date of their inclusion in the study. The objective is to draw the pyramid of ages of patient at inclusion. (Very useful and more pertinent when we have cohorts over a long time period).

Description

Add to plot_age_pyramid the possibility to give the datetime_ref argument as a column name.

Checklist

  • Changes were documented in the changelog (pending section).
  • If necessary, changes were made to the documentation (eg new pipeline).

…iffers for each patient: eg. the date of their inclusion in the study.
@strayMat strayMat changed the title plot_age_pyramid: add the possibility to have one datetime_ref that differs for each patient [WIP] plot_age_pyramid: add the possibility to have one datetime_ref that differs for each patient Dec 8, 2022
Copy link
Collaborator

@Vincent-Maladiere Vincent-Maladiere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, @strayMat thank you for this PR! Below are some comments before merging.

eds_scikit/plot/data_quality.py Outdated Show resolved Hide resolved
eds_scikit/plot/data_quality.py Outdated Show resolved Hide resolved
eds_scikit/plot/data_quality.py Outdated Show resolved Hide resolved
eds_scikit/plot/data_quality.py Outdated Show resolved Hide resolved
tests/test_age_pyramid.py Outdated Show resolved Hide resolved
tests/test_age_pyramid.py Show resolved Hide resolved
- add a new test for pytest.raise
- add a parsable datetime string
- add better error messages when bad value or bad type
changelog.md Outdated Show resolved Hide resolved
Co-authored-by: Thomas Petit-Jean <[email protected]>
@Vincent-Maladiere
Copy link
Collaborator

Looks good! We need to merge #20 before we merge this PR as well.

@codecov-commenter
Copy link

codecov-commenter commented Jan 12, 2023

Codecov Report

Base: 95.08% // Head: 94.94% // Decreases project coverage by -0.13% ⚠️

Coverage data is based on head (1b4f6a7) compared to base (2ad6ec3).
Patch coverage: 87.17% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #18      +/-   ##
==========================================
- Coverage   95.08%   94.94%   -0.14%     
==========================================
  Files          65       65              
  Lines        2034     2057      +23     
==========================================
+ Hits         1934     1953      +19     
- Misses        100      104       +4     
Impacted Files Coverage Δ
eds_scikit/utils/custom_implem/custom_implem.py 75.00% <44.44%> (-12.50%) ⬇️
eds_scikit/plot/data_quality.py 100.00% <100.00%> (ø)
eds_scikit/utils/custom_implem/cut.py 100.00% <100.00%> (ø)
eds_scikit/icu/icu_care_site.py 100.00% <0.00%> (ø)
eds_scikit/structures/description.py 100.00% <0.00%> (ø)
eds_scikit/emergency/emergency_visit.py 100.00% <0.00%> (ø)
eds_scikit/emergency/emergency_care_site.py 90.32% <0.00%> (+0.32%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@strayMat
Copy link
Contributor Author

Where are we for this PR ? I am not sure to see what is missing before merging ?

@Vincent-Maladiere
Copy link
Collaborator

Close in favor of #43 to avoid nested merging conflicts.

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.

4 participants