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

Closes #2484 Used restrict_derivation() with AVISITN > 0 to restrict CHG and PCHG to post-baseline records #2488

Conversation

steventing12
Copy link
Contributor

@steventing12 steventing12 commented Aug 6, 2024

…derivations to post-baseline observations. Note that NA visit changes are also not derived.

Thank you for your Pull Request! We 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 admiral 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 main 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, which should consider realistic data scenarios and edge cases, e.g. empty datasets, errors, boundary cases etc. - See Unit Test Guide
  • If you removed/replaced any function and/or function parameters, did you fully follow the deprecation guidance?
  • Review the Cheat Sheet. Make any required updates to it by editing the file inst/cheatsheet/admiral_cheatsheet.pptx and re-upload a PDF and a PNG version of it to the same folder. (The PNG version can be created by taking a screenshot of the PDF version.)
  • Update to all relevant roxygen headers and examples, including keywords and families. Refer to the categorization of functions to tag appropriate keyword/family.
  • 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 under the header # admiral (development version) if the changes pertain to a user-facing function (i.e. it has an @export tag) or documentation aimed at users (rather than developers). A Developer Notes section is available in NEWS.md for tracking developer-facing issues.
  • Build admiral 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!

…derivations to post-baseline observations. Note that NA visit changes are also not derived.
…r-baseline-and-pre-baseline-records-in-the-templates
Copy link

github-actions bot commented Aug 6, 2024

Code Coverage

Package Line Rate Health
admiral 97%
Summary 97% (4881 / 5043)

@bms63
Copy link
Collaborator

bms63 commented Aug 7, 2024

Do any of the vignettes need to be updated as well?

@Fanny-Gautier do you mind looking at this as well?

@Fanny-Gautier
Copy link
Collaborator

As commented by Nancy, maybe the update of the comment only in the template would be sufficient to clarify as per ADaM IG that "The decision on how to populate pre-baseline and baseline values of CHG is left to producer choice." / "The decision on how to populate pre-baseline and baseline values of PCHG is left to producer choice."

…and-pre-baseline-records-in-the-templates' of github.com:pharmaverse/admiral into 2484-general-issue-chg-and-pchg-populated-for-baseline-and-pre-baseline-records-in-the-templates
@Fanny-Gautier
Copy link
Collaborator

@steventing12, it has been discussed during the {admiral} core dev team meeting:

  • Please update the corresponding comment to notify that as per ADaM IG "The decision on how to populate pre-baseline and baseline values of CHG is left to producer choice." / "The decision on how to populate pre-baseline and baseline values of PCHG is left to producer choice."

  • same update restrict_derivation() + the comment must be applied in:

    • inst/templates/ ad_adeg.R, ad_adlb.R, ad_adpc.R
    • vignettes/ bds_finding.Rmd, pk_adnca.Rmd, questionnaries.Rmd

Copy link
Collaborator

@Fanny-Gautier Fanny-Gautier left a comment

Choose a reason for hiding this comment

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

Further updates needed as per previous comment

@steventing12
Copy link
Contributor Author

@Fanny-Gautier Thanks for the update Fanny, I will apply the requested changes.

… notify that as per ADaM IG, the decision on how to populate pre-baseline and baseline values of CHG/PCHG is left to producer choice.
…r-baseline-and-pre-baseline-records-in-the-templates
# Calculate PCHG
derive_var_pchg()
# Calculate CHG for post-baseline records
# The decision on how to populate pre-baseline and baseline values of CHG is left to producer choice
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
# The decision on how to populate pre-baseline and baseline values of CHG is left to producer choice
# The decision on how to populate pre-baseline and baseline values of CHG is left to the sponsor.
We have chosen to not populate pre-baseline records.

I think sponsor rather than producer should be used. What do you think? If agree can you update the other comments.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think producer is a more inclusive term (e.g. CROs are typically vendors, not sponsors) but happy to change if all agree.

Copy link
Collaborator

Choose a reason for hiding this comment

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

sure producer sounds good.

Suggested change
# The decision on how to populate pre-baseline and baseline values of CHG is left to producer choice
# The decision on how to populate pre-baseline and baseline values of CHG is left to the producer.

@bms63
Copy link
Collaborator

bms63 commented Aug 26, 2024

Can you check the vignettes as well? I believe some updates will be needed there as well. We try and keep them aligned as much as possible.

@steventing12
Copy link
Contributor Author

Can you check the vignettes as well? I believe some updates will be needed there as well. We try and keep them aligned as much as possible.

Sure, will do.

@steventing12
Copy link
Contributor Author

steventing12 commented Aug 28, 2024

Can you check the vignettes as well? I believe some updates will be needed there as well. We try and keep them aligned as much as possible.

Sure, will do.

Following up, there was one other instance of 'sponsor' used in inst/templates/ad_adcm.R, line 92. The term 'producer' does not appear in the vignettes. I can change in ad_adcm.R to producer as well.

@bms63
Copy link
Collaborator

bms63 commented Aug 28, 2024

Can you check the vignettes as well? I believe some updates will be needed there as well. We try and keep them aligned as much as possible.

Sure, will do.

Following up, there was one other instance of 'sponsor' used in inst/templates/ad_adcm.R, line 92. The term 'producer' does not appear in the vignettes. I can change in ad_adcm.R to producer as well.

Sounds good!!

@bms63
Copy link
Collaborator

bms63 commented Aug 28, 2024

The Links issue is being fixed in another PR FYI

Copy link
Contributor Author

@steventing12 steventing12 left a comment

Choose a reason for hiding this comment

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

Updated CHG and PCHG derivations with restrict_derivation() for only post-baseline records with corresponding comment: "The decision on how to populate pre-baseline and baseline values of CHG is left to producer choice." / "The decision on how to populate pre-baseline and baseline values of PCHG is left to producer choice."

Applied to
o inst/templates/ ad_advs.R, ad_adeg.R, ad_adlb.R, ad_adpc.R
o vignettes/ bds_finding.Rmd, pk_adnca.Rmd, questionnaries.Rmd

Also changed 'sponsor' comment to 'producer' in ad_adcm

Copy link
Collaborator

@bms63 bms63 left a comment

Choose a reason for hiding this comment

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

Thanks again @steventing12 !

@bms63 bms63 merged commit f126ce8 into main Sep 3, 2024
15 of 16 checks passed
@bms63 bms63 deleted the 2484-general-issue-chg-and-pchg-populated-for-baseline-and-pre-baseline-records-in-the-templates branch September 3, 2024 12:56
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.

General Issue: CHG and PCHG populated for Baseline and pre-baseline records in the templates
3 participants