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

Updating special_dm_cut and date_cut to account for the case that DCU… #187

Merged
merged 16 commits into from
Dec 11, 2023

Conversation

alanaharris22
Copy link
Collaborator

@alanaharris22 alanaharris22 commented Oct 2, 2023

…TDTM (datacut date) is null.

Thank you for your Pull Request! admiraldev have developed this task checklist from the Development Process Guide to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the datacutr codebase remains robust and consistent.

Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the devel branch until you have checked off each task.

  • Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
  • Code is formatted according to the tidyverse style guide. Run styler::style_file() to style R and Rmd files
  • Updated relevant unit tests or have written new unit tests - See Unit Test Guide
  • If you removed/replaced any function and/or function parameters, did you fully follow the deprecation guidance?
  • Update to all relevant roxygen headers and examples
  • Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately
  • Address any updates needed for vignettes and/or templates
  • Update NEWS.md if the changes pertain to a user-facing function (i.e. it has an @export tag) or documentation aimed at users (rather than developers)
  • Build datacutr site pkgdown::build_site() and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page.
  • Address or fix all lintr warnings and errors - lintr::lint_package()
  • Run R CMD check locally and address all errors and warnings - devtools::check()
  • Link the issue in the Development Section on the right hand side.
  • Address all merge conflicts and resolve appropriately
  • Pat yourself on the back for a job well done! Much love to your accomplishment!

@alanaharris22 alanaharris22 self-assigned this Oct 2, 2023
@alanaharris22
Copy link
Collaborator Author

FYI @barnett11 and @reesnj, I had a look through and made a couple of minor changes to special_dm_cut() and date_cut to account for DCUTDTC being null. I've put in some temporary code to add a message to the console if any records of DCUTDTC are null, but it'd be good to see what you both think. Anyway, can discuss more when we meet tomorrow. Thanks!

@github-actions
Copy link

github-actions bot commented Oct 2, 2023

Code Coverage

Package Line Rate Health
datacutr 100%
Summary 100% (379 / 379)

Copy link
Collaborator

@barnett11 barnett11 left a comment

Choose a reason for hiding this comment

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

Have tested and is working well @alanaharris22 thanks!
Small feedback, the warning message seems to have an odd wrap character within it?
[1] "At least one patient with missing datacut date (cut_var) in the DCUT\n (dataset_cut) dataset, all records for this/these patient(s) will be kept."

Copy link
Collaborator

@reesnj reesnj left a comment

Choose a reason for hiding this comment

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

Reviewed and both functions appear to work as expected, thanks @alanaharris22. However, I just wanted to highlight that these aren't the only two functions that need updating in order for the entire workflow to work as expected with a missing data cut date. For example, the create_dcut function currently errors if we use a missing data cut date. Does it make sense to update all functions inside one update or should we update each of our functions individually? Including @barnett11 here for his thoughts too.

@alanaharris22
Copy link
Collaborator Author

alanaharris22 commented Oct 31, 2023

Thanks @reesnj, I didn't think about create_dcut actually, although would they use this function if they were creating a DCUT dataset with a missing cut date, as we're comparing to a condition on the DS dataset?

@barnett11 barnett11 self-requested a review December 11, 2023 11:47
@barnett11 barnett11 merged commit 6de4ef3 into devel Dec 11, 2023
21 checks passed
@barnett11 barnett11 deleted the 179-allow-dcutdcutdtc-to-be-missing branch December 11, 2023 13:09
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.

Feature Request: More verbose/detailed error message when cut_date is fed into create_dcut incorrectly
3 participants