pharmaverse / admiral

ADaM in R Asset Library
https://pharmaverse.github.io/admiral
Apache License 2.0
224 stars 63 forks source link

Closes #2302 New parameter, group_var added #2362

Closed ashachakma closed 5 months ago

ashachakma commented 8 months ago

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.

github-actions[bot] commented 8 months ago

Code Coverage

Package Line Rate Health
admiral 96%
Summary 96% (4859 / 5058)
bms63 commented 7 months ago

@kaz462 do you have some time this week to review this update?

bms63 commented 7 months ago

Hi @kaz462 - does this PR's core code meet your expectations for your issue? I think we need some more tests

nbrucken17 commented 7 months ago

For what it's worth, there is some discussion happening right now over how AEs should be collected, and thus how TEAE flagging should work. There are 2 PHUSE WGs developing white papers; the AE Collection Recommendations WG (https://advance.phuse.global/display/WEL/Adverse+Event+Collection+Recommendations) is currently incorporating public review comments, while the TE Definitions Recommendations (https://advance.phuse.global/display/WEL/Treatment+Emergent+Definitions+Recommendations) WG should have their white paper out for public review sometime in the next few months. However, both WGs have found considerable variation across sponsors both in how AEs are collected (single event at max severity, every time severity worsens, every time severity changes, etc.), and how TEs are defined/determined. So there's definitely a need for flexibility in how this function handles various scenarios- or maybe even multiple functions to handle the current variety of approaches.

kaz462 commented 7 months ago

For what it's worth, there is some discussion happening right now over how AEs should be collected, and thus how TEAE flagging should work. There are 2 PHUSE WGs developing white papers; the AE Collection Recommendations WG (https://advance.phuse.global/display/WEL/Adverse+Event+Collection+Recommendations) is currently incorporating public review comments, while the TE Definitions Recommendations (https://advance.phuse.global/display/WEL/Treatment+Emergent+Definitions+Recommendations) WG should have their white paper out for public review sometime in the next few months. However, both WGs have found considerable variation across sponsors both in how AEs are collected (single event at max severity, every time severity worsens, every time severity changes, etc.), and how TEs are defined/determined. So there's definitely a need for flexibility in how this function handles various scenarios- or maybe even multiple functions to handle the current variety of approaches.

@nbrucken17 Thanks for your information and connecting the dots here! A summary of different AE collection methods and TEAE scenarios across sponsors would be very helpful. Maybe we can revisit this topic after the white paper is out?

bms63 commented 7 months ago

For what it's worth, there is some discussion happening right now over how AEs should be collected, and thus how TEAE flagging should work. There are 2 PHUSE WGs developing white papers; the AE Collection Recommendations WG (https://advance.phuse.global/display/WEL/Adverse+Event+Collection+Recommendations) is currently incorporating public review comments, while the TE Definitions Recommendations (https://advance.phuse.global/display/WEL/Treatment+Emergent+Definitions+Recommendations) WG should have their white paper out for public review sometime in the next few months. However, both WGs have found considerable variation across sponsors both in how AEs are collected (single event at max severity, every time severity worsens, every time severity changes, etc.), and how TEs are defined/determined. So there's definitely a need for flexibility in how this function handles various scenarios- or maybe even multiple functions to handle the current variety of approaches.

@nbrucken17 Thanks for your information and connecting the dots here! A summary of different AE collection methods and TEAE scenarios across sponsors would be very helpful. Maybe we can revisit this topic after the white paper is out?

This is great @nbrucken17 thank you for chiming in. @kaz462 I would still be interested in implementing if it doesn't impact the original functionality - my understanding is that this is the case. However, maybe a separate function(s) could be explored?

bms63 commented 6 months ago

Hi @ashachakma - Is Option 1 already implemented?

ashachakma commented 6 months ago

Hi @ashachakma - Is Option 1 already implemented?

Hi Ben, I've been holding off on implementing the updates for option 1 until receiving this confirmation. I will work on those updates by this weekend.

github-actions[bot] commented 5 months ago

This Pull Request is stale because it has not been worked on in 15 days.

bms63 commented 5 months ago

@ashachakma we need you! Can you complete this soon! EOW?

image

ashachakma commented 5 months ago

@ashachakma we need you! Can you complete this soon! EOW?

Sorry Ben, this week I've a planned holiday starting from Friday till next Tuesday 🫣 image

I was working on this issue intermittently but due to study work, not been able to finish it yet. I am at the testing stage but issues are there as well. I will prioritize this task next week for sure!

ashachakma commented 5 months ago

Just FYI - I am still working on this PR.

ashachakma commented 5 months ago

Hi, I am getting this issue while running devtools::check(). These are not from the tests that I have updated, can anyone help me with this? image

manciniedoardo commented 5 months ago

Hi, I am getting this issue while running devtools::check(). These are not from the tests that I have updated, can anyone help me with this? image

@ashachakma what is your installed version of admiraldev? `packageVersion("admiraldev")

bundfussr commented 5 months ago

Hi, I am getting this issue while running devtools::check(). These are not from the tests that I have updated, can anyone help me with this? image

This should be resolved by merging main into your feature branch.

ashachakma commented 5 months ago

packageVersion("admiraldev") [1] ‘1.0.0.9027’

ashachakma commented 5 months ago

Hi @ashachakma - Is Option 1 already implemented?

@bms63 @kaz462 It is ready for review now :)

bms63 commented 5 months ago

Hi @ashachakma are you able to finish by the EOD Friday? @kaz462 is on west coast of US so should have time to review and we can work together to do any final minor updates.

ashachakma commented 5 months ago

Hi @ashachakma are you able to finish by the EOD Friday? @kaz462 is on west coast of US so should have time to review and we can work together to do any final minor updates.

Hi Ben, discussions are ongoing and I will need some time to implement the new changes. I don't think today EOD is possible given my study dry run is also running in parallel.

bms63 commented 5 months ago

Totally understand @ashachakma !! You have gotten us this far!!

@kaz462 are you able to complete this for @ashachakma today? Please let me know ASAP

bms63 commented 5 months ago

Ohhh - this is making me pause. Is this necessary as you are just grabbing USUBJID? Is there a scenario where a user will need something more and should we give them so much leeway? If it is needed, can we recommend for them to check out set_admiral_opiton() and get_admiral_option() in the argument documentation.

image

bms63 commented 5 months ago

wheew...my head hurts. I saw a diagram floating around. Perhaps in 1.2.0 we could publish the diagram in inst folder for folks to reference to? Would that be useful for the users? IT would be for me, but I'm a bit dull!! If useful, do you mind making an issue and placing the diagram in the issue. We can clean it up or remake but just as a placeholder for now.

So close to being done!! yay!!

bms63 commented 5 months ago

Should we add ability to suppress the warning message if a user wants this? Or should it just be a message to the user instead of a warning?

image

bundfussr commented 5 months ago

Should we add ability to suppress the warning message if a user wants this? Or should it just be a message to the user instead of a warning?

image

I don't think we need an extra argument for this. To avoid the warning initial_intensity shouldn't be specified.

We should update the example.

bms63 commented 5 months ago

Should we add ability to suppress the warning message if a user wants this? Or should it just be a message to the user instead of a warning? image

I don't think we need an extra argument for this. To avoid the warning initial_intensity shouldn't be specified.

We should update the example.

Good point!! - should the warning message tell the user to remove initial_intensity

bundfussr commented 5 months ago

Should we add ability to suppress the warning message if a user wants this? Or should it just be a message to the user instead of a warning? image

I don't think we need an extra argument for this. To avoid the warning initial_intensity shouldn't be specified. We should update the example.

Good point!! - should the warning message tell the user to remove initial_intensity

We don't know if initial_intensity or group_var should be removed. Thus we could add "Please only specify one of them." to the message.

bms63 commented 5 months ago

@kaz462 do you some time? Just a few minor tweaks.

kaz462 commented 5 months ago

@kaz462 do you some time? Just a few minor tweaks.

Yes, will update later today

kaz462 commented 5 months ago

@ashachakma @bms63 @bundfussr Thanks for your review! I've addressed the new comments, please let me know if I missed anything.

@bms63 Issue created to improve the documentation: https://github.com/pharmaverse/admiral/issues/2455

bms63 commented 5 months ago

@kaz462 Stefan tweaked the code a bit. Do you mind doing quick review (if you have time) and then I will look over as well and we can merge in.

bms63 commented 5 months ago

Yes!!!

image