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

173 fix refactor adex@main #183

Merged
merged 13 commits into from
Jul 28, 2022
Merged

173 fix refactor adex@main #183

merged 13 commits into from
Jul 28, 2022

Conversation

Melkiades
Copy link
Contributor

Pull Request

This PR needs a lot of care in its review. The execution gives an error in tests that I can not reproduce. It is potentially necessary to reconvert the date formats into simple characters or system base date, it depends on how adex is used downstream. I was just checking the difference in the cache and the new data set seems way too distant from the original cashed-data. I will explore these better tomorrow morning! I want to highlight that this is a hotfix and I will tomorrow write down some new issues to fix ADSL times before this one (which is only modified at the last stage). I am sure there are better ways to modify the data set, and any idea is super welcome!

For some background on the new variables, I copy here my notes, that I took from talking with @malexthorpe.

# VAR 1: EXDOSFRQ --------------------------------------------------------------
# For the EXDOSFRQ that should be just set to 'ONCE' whenever the PARCAT1 is 'INDIVIDUAL' and NA for the 'OVERALL'
# We use to build ADEX contains each individual dose as one row per dose, we then also add OVERALL rows for each of the paramcd 
# values and for each drug but these OVERALL contains NAs for all the dose information as they're just summaries

# VAR 2: EXROUTE ------------------------------------------------------
# For the EXROUTE we can just set them all to INTRAVAEOUS as that is very common 
# for all the INDIVIDUAL doses (I kept 10% of INTRAVENOUS)

# VAR 3: EXENDY ----------------------------------------------------------------
# to add EXENDY we also need to add other columns like: VISIT, VISITDY, EXSTDTC, EXENDTC, EXSTDY.

# So the Exposure start date and end date should be the same with a small hour long 
# time gap between them while the patients is being dosed and then the EXSTDY and EXENDY can be set to the same values

# Yeah although also I guess also on the TRTSTDT, it should be the EXENDTC - TRTSDT rounded up in days

# I think after adding the other variables we also need to update the ASTDTM and AENDTM variables as they should be 
# using EXSTDTC and EXENDTC (intermediate) rather than the TRTSTM and TRTEDTM (general) that they are currently set on

# add VISIT column, the same as AVISIT (also with weeks)

# screening and baseline before the treatment start day/time

# ADSL should have treatment times bound to AVISIT (blocker)

# ASTDTM is from ADEX 

Fixes #173

@github-actions
Copy link
Contributor

github-actions bot commented Jul 28, 2022

Unit Tests Summary

  1 files    1 suites   19s ⏱️
23 tests 23 ✔️ 0 💤 0
56 runs  56 ✔️ 0 💤 0

Results for commit 39e4f1e.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 28, 2022

Code Coverage Summary

Filename         Stmts    Miss  Cover    Missing
-------------  -------  ------  -------  --------------------------------------------------------------------------------------
R/radab.R          215     215  0.00%    51-293
R/radae.R          173       3  98.27%   82, 101, 143
R/radaette.R       211       4  98.10%   52, 73, 79, 243
R/radcm.R          151      27  82.12%   53, 87, 173-199
R/raddv.R           91       3  96.70%   41, 56, 140
R/radeg.R          269       1  99.63%   185
R/radex.R          232       1  99.57%   226
R/radhy.R          136       1  99.26%   197
R/radlb.R          253       1  99.60%   221
R/radmh.R           94       2  97.87%   48, 87
R/radpc.R           60       1  98.33%   100
R/radpp.R           80       1  98.75%   141
R/radqs.R          107       1  99.07%   132
R/radrs.R          121       3  97.52%   49, 56, 156
R/radsaftte.R        1       1  0.00%    17
R/radsl.R          166       1  99.40%   238
R/radsub.R         142       1  99.30%   159
R/radtr.R          126       0  100.00%
R/radtte.R         144       4  97.22%   53, 73, 85, 128
R/radvs.R          160       1  99.38%   174
R/utils.R          154      59  61.69%   9-12, 56-59, 111-112, 117-118, 155-156, 214, 264, 266, 295-301, 305, 338-408, 466, 470
TOTAL             3086     331  89.27%

Results for commit: 18df990

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

Copy link
Contributor

@ayogasekaram ayogasekaram left a comment

Choose a reason for hiding this comment

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

lgtm @Melkiades
I would double check the -1 relative date. Other than that, everything appears to work well.

@edelarua edelarua merged commit 6a09baf into main Jul 28, 2022
@edelarua edelarua deleted the 173_fix_refactor_ADEX@main branch July 28, 2022 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add EXDOSFRQ, EXROUTE and EXENDY to ADEX data
3 participants