From dc2c9af2dbf88bc2e6633212345ce56fc26f20fc Mon Sep 17 00:00:00 2001 From: MATSUNAGA Date: Mon, 21 Aug 2023 15:41:49 +0200 Subject: [PATCH 1/4] git commit for 138_Add_OECAT_OESCAT@devel --- inst/templates/ad_adbcva.R | 43 ++++++++++++++++++-------------------- inst/templates/ad_adoe.R | 28 +++++++++++++------------ 2 files changed, 35 insertions(+), 36 deletions(-) diff --git a/inst/templates/ad_adbcva.R b/inst/templates/ad_adbcva.R index 00074b10..ab385ec8 100644 --- a/inst/templates/ad_adbcva.R +++ b/inst/templates/ad_adbcva.R @@ -5,7 +5,7 @@ # Input: adsl, oe library(admiral) -library(pharmaversesdtm) +library(admiral.test) # Contains example datasets from the CDISC pilot project library(admiralophtha) library(dplyr) library(lubridate) @@ -17,7 +17,7 @@ library(stringr) # as needed and assign to the variables below. # For illustration purposes read in admiral test data -data("oe_ophtha") +data("admiral_oe") data("admiral_adsl") # Add STUDYEYE to ADSL to simulate an ophtha dataset @@ -26,16 +26,18 @@ adsl <- admiral_adsl %>% mutate(STUDYEYE = sample(c("LEFT", "RIGHT"), n(), replace = TRUE)) %>% convert_blanks_to_na() -oe <- convert_blanks_to_na(oe_ophtha) %>% +oe <- convert_blanks_to_na(admiral_oe) %>% ungroup() # ---- Lookup tables ---- # Assign PARAMCD, PARAM, and PARAMN param_lookup <- tibble::tribble( - ~OETESTCD, ~AFEYE, ~PARAMCD, ~PARAM, ~PARAMN, - "VACSCORE", "Study Eye", "SBCVA", "Study Eye Visual Acuity Score (letters)", 1, - "VACSCORE", "Fellow Eye", "FBCVA", "Fellow Eye Visual Acuity Score (letters)", 2, + ~OETESTCD, ~OECAT, ~OESCAT, ~OELAT, ~STUDYEYE, ~PARAMCD, ~PARAM, ~PARAMN, + "VACSCORE", "BEST CORRECTED VISUAL ACUITY", "OVERALL EVALUATION", "RIGHT", "RIGHT", "SBCVA", "Study Eye Visual Acuity Score (letters)", 1, + "VACSCORE", "BEST CORRECTED VISUAL ACUITY", "OVERALL EVALUATION", "LEFT", "LEFT", "SBCVA", "Study Eye Visual Acuity Score (letters)", 1, + "VACSCORE", "BEST CORRECTED VISUAL ACUITY", "OVERALL EVALUATION", "RIGHT", "LEFT", "FBCVA", "Fellow Eye Visual Acuity Score (letters)", 2, + "VACSCORE", "BEST CORRECTED VISUAL ACUITY", "OVERALL EVALUATION", "LEFT", "RIGHT", "FBCVA", "Fellow Eye Visual Acuity Score (letters)", 2 ) # Assign AVALCAT1 @@ -108,7 +110,7 @@ adbcva_adslvar <- oe %>% filter( OETESTCD %in% c("VACSCORE") ) %>% - # Join ADSL with OE (need TRTSDT and STUDYEYE for ADY, AFEYE, and PARAMCD derivation) + # Join ADSL with OE (need TRTSDT and STUDYEYE for ADY and PARAMCD derivation) derive_vars_merged( dataset_add = adsl, new_vars = adsl_vars, @@ -121,23 +123,21 @@ adbcva_aval <- adbcva_adslvar %>% AVAL = OESTRESN, AVALU = "letters", DTYPE = NA_character_ - ) %>% - # Derive AFEYE needed for PARAMCD derivation - derive_var_afeye(OELOC, OELAT) + ) adbcva_nlogparam <- adbcva_aval %>% # Add PARAM, PARAMCD for non log parameters derive_vars_merged( dataset_add = param_lookup, new_vars = exprs(PARAM, PARAMCD), - by_vars = exprs(OETESTCD, AFEYE), + by_vars = exprs(OETESTCD, OELAT, STUDYEYE), filter_add = PARAMCD %in% c("SBCVA", "FBCVA") ) adbcva_logparam <- adbcva_nlogparam %>% # Add derived log parameters derive_param_computed( - by_vars = c(exprs(STUDYID, USUBJID, VISIT, VISITNUM, OEDY, OEDTC, AFEYE), adsl_vars), + by_vars = c(exprs(STUDYID, USUBJID, VISIT, VISITNUM, OEDY, OEDTC), adsl_vars), parameters = c("SBCVA"), analysis_value = convert_etdrs_to_logmar(AVAL.SBCVA), set_values_to = exprs( @@ -148,7 +148,7 @@ adbcva_logparam <- adbcva_nlogparam %>% ) ) %>% derive_param_computed( - by_vars = c(exprs(STUDYID, USUBJID, VISIT, OEDY, OEDTC, AFEYE), adsl_vars), + by_vars = c(exprs(STUDYID, USUBJID, VISIT, OEDY, OEDTC), adsl_vars), parameters = c("FBCVA"), analysis_value = convert_etdrs_to_logmar(AVAL.FBCVA), set_values_to = exprs( @@ -276,16 +276,13 @@ adbcva_adsl <- adbcva_aseq %>% adbcva_crtflag <- adbcva_adsl %>% # Add criterion flags for BCVA endpoints - restrict_derivation( - derivation = derive_var_bcvacritxfl, - args = params( - crit_var = exprs(CHG), - bcva_ranges = list(c(0, 5), c(-5, -1), c(10, 15)), - bcva_uplims = list(-20, 5, 10), - bcva_lowlims = list(-15, 15), - additional_text = "" - ), - filter = PARAMCD %in% c("SBCVA", "FBCVA") + derive_var_bcvacritxfl( + paramcds = c("SBCVA", "FBCVA"), + basetype = NULL, + bcva_ranges = list(c(0, 5), c(-5, -1), c(10, 15)), + bcva_uplims = list(-20, 5, 10), + bcva_lowlims = list(-15, 15), + additional_text = "" ) %>% # Add AVALCATx variables mutate(AVALCA1N = format_avalcat1n(param = PARAMCD, aval = AVAL)) %>% diff --git a/inst/templates/ad_adoe.R b/inst/templates/ad_adoe.R index 6318ee7e..9ccc6b7e 100644 --- a/inst/templates/ad_adoe.R +++ b/inst/templates/ad_adoe.R @@ -5,7 +5,7 @@ # Input: adsl, oe library(admiral) -library(pharmaversesdtm) +library(admiral.test) # Contains example datasets from the CDISC pilot project library(admiralophtha) library(dplyr) library(lubridate) @@ -17,7 +17,7 @@ library(stringr) # as needed and assign to the variables below. # For illustration purposes read in admiral test data -data("oe_ophtha") +data("admiral_oe") data("admiral_adsl") # Add STUDYEYE to ADSL to simulate an ophtha dataset @@ -26,18 +26,22 @@ adsl <- admiral_adsl %>% mutate(STUDYEYE = sample(c("LEFT", "RIGHT"), n(), replace = TRUE)) %>% convert_blanks_to_na() -oe <- convert_blanks_to_na(oe_ophtha) %>% +oe <- convert_blanks_to_na(admiral_oe) %>% ungroup() # ---- Lookup tables ---- # Assign PARAMCD, PARAM, and PARAMN param_lookup <- tibble::tribble( - ~OETESTCD, ~AFEYE, ~PARAMCD, ~PARAM, ~PARAMN, - "CSUBTH", "Study Eye", "SCSUBTH", "Study Eye Center Subfield Thickness (um)", 1, - "CSUBTH", "Fellow Eye", "FCSUBTH", "Fellow Eye Center Subfield Thickness (um)", 2, - "DRSSR", "Study Eye", "SDRSSR", "Study Eye Diabetic Retinopathy Severity", 3, - "DRSSR", "Fellow Eye", "FDRSSR", "Fellow Eye Diabetic Retinopathy Severity", 4 + ~OETESTCD, ~OECAT, ~OESCAT, ~OELAT, ~STUDYEYE, ~PARAMCD, ~PARAM, ~PARAMN, + "CSUBTH", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "RIGHT", "RIGHT", "SCSUBTH", "Study Eye Center Subfield Thickness (um)", 1, + "CSUBTH", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "LEFT", "LEFT", "SCSUBTH", "Study Eye Center Subfield Thickness (um)", 1, + "CSUBTH", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "RIGHT", "LEFT", "FCSUBTH", "Fellow Eye Center Subfield Thickness (um)", 2, + "CSUBTH", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "LEFT", "RIGHT", "FCSUBTH", "Fellow Eye Center Subfield Thickness (um)", 2, + "DRSSR", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "RIGHT", "RIGHT", "SDRSSR", "Study Eye Diabetic Retinopathy Severity", 3, + "DRSSR", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "LEFT", "LEFT", "SDRSSR", "Study Eye Diabetic Retinopathy Severity", 3, + "DRSSR", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "RIGHT", "LEFT", "FDRSSR", "Fellow Eye Diabetic Retinopathy Severity", 4, + "DRSSR", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "LEFT", "RIGHT", "FDRSSR", "Fellow Eye Diabetic Retinopathy Severity", 4 ) # ---- Derivations ---- @@ -50,7 +54,7 @@ adoe_adslvar <- oe %>% filter( OETESTCD %in% c("CSUBTH", "DRSSR") ) %>% - # Join ADSL with OE (need TRTSDT and STUDYEYE for ADY, AFEYE, and PARAMCD derivation) + # Join ADSL with OE (need TRTSDT and STUDYEYE for ADY and PARAMCD derivation) derive_vars_merged( dataset_add = adsl, new_vars = adsl_vars, @@ -64,16 +68,14 @@ adoe_aval <- adoe_adslvar %>% AVALC = OESTRESC, AVALU = OESTRESU, DTYPE = NA_character_ - ) %>% - # Derive AFEYE needed for PARAMCD derivation - derive_var_afeye(OELOC, OELAT, loc_vals = c("EYE", "RETINA")) + ) adoe_param <- adoe_aval %>% # Add PARAM, PARAMCD derive_vars_merged( dataset_add = param_lookup, new_vars = exprs(PARAM, PARAMCD), - by_vars = exprs(OETESTCD, AFEYE) + by_vars = exprs(OETESTCD, OELAT, STUDYEYE) ) %>% # Calculate ADT, ADY derive_vars_dt( From 253e071fe862a376bc9ad29774d3ee33c12db865 Mon Sep 17 00:00:00 2001 From: MATSUNAGA Date: Wed, 23 Aug 2023 06:15:11 +0200 Subject: [PATCH 2/4] update ADBCVA --- inst/templates/ad_adbcva.R | 43 ++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/inst/templates/ad_adbcva.R b/inst/templates/ad_adbcva.R index ab385ec8..fbf551a9 100644 --- a/inst/templates/ad_adbcva.R +++ b/inst/templates/ad_adbcva.R @@ -5,7 +5,7 @@ # Input: adsl, oe library(admiral) -library(admiral.test) # Contains example datasets from the CDISC pilot project +library(pharmaversesdtm) library(admiralophtha) library(dplyr) library(lubridate) @@ -17,7 +17,7 @@ library(stringr) # as needed and assign to the variables below. # For illustration purposes read in admiral test data -data("admiral_oe") +data("oe_ophtha") data("admiral_adsl") # Add STUDYEYE to ADSL to simulate an ophtha dataset @@ -26,18 +26,16 @@ adsl <- admiral_adsl %>% mutate(STUDYEYE = sample(c("LEFT", "RIGHT"), n(), replace = TRUE)) %>% convert_blanks_to_na() -oe <- convert_blanks_to_na(admiral_oe) %>% +oe <- convert_blanks_to_na(oe_ophtha) %>% ungroup() # ---- Lookup tables ---- # Assign PARAMCD, PARAM, and PARAMN param_lookup <- tibble::tribble( - ~OETESTCD, ~OECAT, ~OESCAT, ~OELAT, ~STUDYEYE, ~PARAMCD, ~PARAM, ~PARAMN, - "VACSCORE", "BEST CORRECTED VISUAL ACUITY", "OVERALL EVALUATION", "RIGHT", "RIGHT", "SBCVA", "Study Eye Visual Acuity Score (letters)", 1, - "VACSCORE", "BEST CORRECTED VISUAL ACUITY", "OVERALL EVALUATION", "LEFT", "LEFT", "SBCVA", "Study Eye Visual Acuity Score (letters)", 1, - "VACSCORE", "BEST CORRECTED VISUAL ACUITY", "OVERALL EVALUATION", "RIGHT", "LEFT", "FBCVA", "Fellow Eye Visual Acuity Score (letters)", 2, - "VACSCORE", "BEST CORRECTED VISUAL ACUITY", "OVERALL EVALUATION", "LEFT", "RIGHT", "FBCVA", "Fellow Eye Visual Acuity Score (letters)", 2 + ~OETESTCD, ~OECAT, ~OESCAT, ~AFEYE, ~PARAMCD, ~PARAM, ~PARAMN, + "VACSCORE", "BEST CORRECTED VISUAL ACUITY", "OVERALL EVALUATION", "Study Eye", "SBCVA", "Study Eye Visual Acuity Score (letters)", 1, + "VACSCORE", "BEST CORRECTED VISUAL ACUITY", "OVERALL EVALUATION", "Fellow Eye", "FBCVA", "Fellow Eye Visual Acuity Score (letters)", 2, ) # Assign AVALCAT1 @@ -110,7 +108,7 @@ adbcva_adslvar <- oe %>% filter( OETESTCD %in% c("VACSCORE") ) %>% - # Join ADSL with OE (need TRTSDT and STUDYEYE for ADY and PARAMCD derivation) + # Join ADSL with OE (need TRTSDT and STUDYEYE for ADY, AFEYE, and PARAMCD derivation) derive_vars_merged( dataset_add = adsl, new_vars = adsl_vars, @@ -123,21 +121,23 @@ adbcva_aval <- adbcva_adslvar %>% AVAL = OESTRESN, AVALU = "letters", DTYPE = NA_character_ - ) + ) %>% + # Derive AFEYE needed for PARAMCD derivation + derive_var_afeye(OELOC, OELAT) adbcva_nlogparam <- adbcva_aval %>% # Add PARAM, PARAMCD for non log parameters derive_vars_merged( dataset_add = param_lookup, new_vars = exprs(PARAM, PARAMCD), - by_vars = exprs(OETESTCD, OELAT, STUDYEYE), + by_vars = exprs(OETESTCD, AFEYE), filter_add = PARAMCD %in% c("SBCVA", "FBCVA") ) adbcva_logparam <- adbcva_nlogparam %>% # Add derived log parameters derive_param_computed( - by_vars = c(exprs(STUDYID, USUBJID, VISIT, VISITNUM, OEDY, OEDTC), adsl_vars), + by_vars = c(exprs(STUDYID, USUBJID, VISIT, VISITNUM, OEDY, OEDTC, AFEYE), adsl_vars), parameters = c("SBCVA"), analysis_value = convert_etdrs_to_logmar(AVAL.SBCVA), set_values_to = exprs( @@ -148,7 +148,7 @@ adbcva_logparam <- adbcva_nlogparam %>% ) ) %>% derive_param_computed( - by_vars = c(exprs(STUDYID, USUBJID, VISIT, OEDY, OEDTC), adsl_vars), + by_vars = c(exprs(STUDYID, USUBJID, VISIT, OEDY, OEDTC, AFEYE), adsl_vars), parameters = c("FBCVA"), analysis_value = convert_etdrs_to_logmar(AVAL.FBCVA), set_values_to = exprs( @@ -276,13 +276,16 @@ adbcva_adsl <- adbcva_aseq %>% adbcva_crtflag <- adbcva_adsl %>% # Add criterion flags for BCVA endpoints - derive_var_bcvacritxfl( - paramcds = c("SBCVA", "FBCVA"), - basetype = NULL, - bcva_ranges = list(c(0, 5), c(-5, -1), c(10, 15)), - bcva_uplims = list(-20, 5, 10), - bcva_lowlims = list(-15, 15), - additional_text = "" + restrict_derivation( + derivation = derive_var_bcvacritxfl, + args = params( + crit_var = exprs(CHG), + bcva_ranges = list(c(0, 5), c(-5, -1), c(10, 15)), + bcva_uplims = list(-20, 5, 10), + bcva_lowlims = list(-15, 15), + additional_text = "" + ), + filter = PARAMCD %in% c("SBCVA", "FBCVA") ) %>% # Add AVALCATx variables mutate(AVALCA1N = format_avalcat1n(param = PARAMCD, aval = AVAL)) %>% From fed16bf975250861b4f1f3282ed4aded3f6cb45c Mon Sep 17 00:00:00 2001 From: MATSUNAGA Date: Wed, 23 Aug 2023 06:23:07 +0200 Subject: [PATCH 3/4] update ADOE --- inst/templates/ad_adoe.R | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/inst/templates/ad_adoe.R b/inst/templates/ad_adoe.R index 9ccc6b7e..af3ef251 100644 --- a/inst/templates/ad_adoe.R +++ b/inst/templates/ad_adoe.R @@ -5,7 +5,7 @@ # Input: adsl, oe library(admiral) -library(admiral.test) # Contains example datasets from the CDISC pilot project +library(pharmaversesdtm) library(admiralophtha) library(dplyr) library(lubridate) @@ -17,7 +17,7 @@ library(stringr) # as needed and assign to the variables below. # For illustration purposes read in admiral test data -data("admiral_oe") +data("oe_ophtha") data("admiral_adsl") # Add STUDYEYE to ADSL to simulate an ophtha dataset @@ -26,22 +26,18 @@ adsl <- admiral_adsl %>% mutate(STUDYEYE = sample(c("LEFT", "RIGHT"), n(), replace = TRUE)) %>% convert_blanks_to_na() -oe <- convert_blanks_to_na(admiral_oe) %>% +oe <- convert_blanks_to_na(oe_ophtha) %>% ungroup() # ---- Lookup tables ---- # Assign PARAMCD, PARAM, and PARAMN param_lookup <- tibble::tribble( - ~OETESTCD, ~OECAT, ~OESCAT, ~OELAT, ~STUDYEYE, ~PARAMCD, ~PARAM, ~PARAMN, - "CSUBTH", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "RIGHT", "RIGHT", "SCSUBTH", "Study Eye Center Subfield Thickness (um)", 1, - "CSUBTH", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "LEFT", "LEFT", "SCSUBTH", "Study Eye Center Subfield Thickness (um)", 1, - "CSUBTH", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "RIGHT", "LEFT", "FCSUBTH", "Fellow Eye Center Subfield Thickness (um)", 2, - "CSUBTH", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "LEFT", "RIGHT", "FCSUBTH", "Fellow Eye Center Subfield Thickness (um)", 2, - "DRSSR", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "RIGHT", "RIGHT", "SDRSSR", "Study Eye Diabetic Retinopathy Severity", 3, - "DRSSR", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "LEFT", "LEFT", "SDRSSR", "Study Eye Diabetic Retinopathy Severity", 3, - "DRSSR", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "RIGHT", "LEFT", "FDRSSR", "Fellow Eye Diabetic Retinopathy Severity", 4, - "DRSSR", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "LEFT", "RIGHT", "FDRSSR", "Fellow Eye Diabetic Retinopathy Severity", 4 + ~OETESTCD, ~OECAT, ~OESCAT, ~AFEYE, ~PARAMCD, ~PARAM, ~PARAMN, + "CSUBTH", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "Study Eye", "SCSUBTH", "Study Eye Center Subfield Thickness (um)", 1, + "CSUBTH", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "Fellow Eye", "FCSUBTH", "Fellow Eye Center Subfield Thickness (um)", 2, + "DRSSR", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "Study Eye", "SDRSSR", "Study Eye Diabetic Retinopathy Severity", 3, + "DRSSR", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "Fellow Eye", "FDRSSR", "Fellow Eye Diabetic Retinopathy Severity", 4 ) # ---- Derivations ---- @@ -54,7 +50,7 @@ adoe_adslvar <- oe %>% filter( OETESTCD %in% c("CSUBTH", "DRSSR") ) %>% - # Join ADSL with OE (need TRTSDT and STUDYEYE for ADY and PARAMCD derivation) + # Join ADSL with OE (need TRTSDT and STUDYEYE for ADY, AFEYE, and PARAMCD derivation) derive_vars_merged( dataset_add = adsl, new_vars = adsl_vars, @@ -68,14 +64,16 @@ adoe_aval <- adoe_adslvar %>% AVALC = OESTRESC, AVALU = OESTRESU, DTYPE = NA_character_ - ) + ) %>% + # Derive AFEYE needed for PARAMCD derivation + derive_var_afeye(OELOC, OELAT, loc_vals = c("EYE", "RETINA")) adoe_param <- adoe_aval %>% # Add PARAM, PARAMCD derive_vars_merged( dataset_add = param_lookup, new_vars = exprs(PARAM, PARAMCD), - by_vars = exprs(OETESTCD, OELAT, STUDYEYE) + by_vars = exprs(OETESTCD, AFEYE) ) %>% # Calculate ADT, ADY derive_vars_dt( From 1df6d6389372689de6fc045bd588a961b989975d Mon Sep 17 00:00:00 2001 From: MATSUNAGA Date: Thu, 31 Aug 2023 16:42:37 +0200 Subject: [PATCH 4/4] update to fix errors --- inst/templates/ad_adbcva.R | 6 +++--- inst/templates/ad_adoe.R | 8 ++++---- vignettes/adbcva.Rmd | 6 +++--- vignettes/adoe.Rmd | 10 +++++----- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/inst/templates/ad_adbcva.R b/inst/templates/ad_adbcva.R index fbf551a9..641253cc 100644 --- a/inst/templates/ad_adbcva.R +++ b/inst/templates/ad_adbcva.R @@ -33,9 +33,9 @@ oe <- convert_blanks_to_na(oe_ophtha) %>% # Assign PARAMCD, PARAM, and PARAMN param_lookup <- tibble::tribble( - ~OETESTCD, ~OECAT, ~OESCAT, ~AFEYE, ~PARAMCD, ~PARAM, ~PARAMN, - "VACSCORE", "BEST CORRECTED VISUAL ACUITY", "OVERALL EVALUATION", "Study Eye", "SBCVA", "Study Eye Visual Acuity Score (letters)", 1, - "VACSCORE", "BEST CORRECTED VISUAL ACUITY", "OVERALL EVALUATION", "Fellow Eye", "FBCVA", "Fellow Eye Visual Acuity Score (letters)", 2, + ~OETESTCD, ~OECAT, ~OESCAT, ~AFEYE, ~PARAMCD, ~PARAM, ~PARAMN, + "VACSCORE", "BEST CORRECTED VISUAL ACUITY", "OVERALL EVALUATION", "Study Eye", "SBCVA", "Study Eye Visual Acuity Score (letters)", 1, # nolint + "VACSCORE", "BEST CORRECTED VISUAL ACUITY", "OVERALL EVALUATION", "Fellow Eye", "FBCVA", "Fellow Eye Visual Acuity Score (letters)", 2, # nolint ) # Assign AVALCAT1 diff --git a/inst/templates/ad_adoe.R b/inst/templates/ad_adoe.R index af3ef251..416f3332 100644 --- a/inst/templates/ad_adoe.R +++ b/inst/templates/ad_adoe.R @@ -34,10 +34,10 @@ oe <- convert_blanks_to_na(oe_ophtha) %>% # Assign PARAMCD, PARAM, and PARAMN param_lookup <- tibble::tribble( ~OETESTCD, ~OECAT, ~OESCAT, ~AFEYE, ~PARAMCD, ~PARAM, ~PARAMN, - "CSUBTH", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "Study Eye", "SCSUBTH", "Study Eye Center Subfield Thickness (um)", 1, - "CSUBTH", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "Fellow Eye", "FCSUBTH", "Fellow Eye Center Subfield Thickness (um)", 2, - "DRSSR", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "Study Eye", "SDRSSR", "Study Eye Diabetic Retinopathy Severity", 3, - "DRSSR", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "Fellow Eye", "FDRSSR", "Fellow Eye Diabetic Retinopathy Severity", 4 + "CSUBTH", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "Study Eye", "SCSUBTH", "Study Eye Center Subfield Thickness (um)", 1, # nolint + "CSUBTH", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "Fellow Eye", "FCSUBTH", "Fellow Eye Center Subfield Thickness (um)", 2, # nolint + "DRSSR", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "Study Eye", "SDRSSR", "Study Eye Diabetic Retinopathy Severity", 3, # nolint + "DRSSR", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "Fellow Eye", "FDRSSR", "Fellow Eye Diabetic Retinopathy Severity", 4 # nolint ) # ---- Derivations ---- diff --git a/vignettes/adbcva.Rmd b/vignettes/adbcva.Rmd index 3fa2fb0a..62a2400b 100644 --- a/vignettes/adbcva.Rmd +++ b/vignettes/adbcva.Rmd @@ -97,9 +97,9 @@ oe <- convert_blanks_to_na(oe_ophtha) %>% # ---- Lookup table ---- param_lookup <- tibble::tribble( - ~OETESTCD, ~AFEYE, ~PARAMCD, ~PARAM, ~PARAMN, - "VACSCORE", "Study Eye", "SBCVA", "Study Eye Visual Acuity Score (letters)", 1, - "VACSCORE", "Fellow Eye", "FBCVA", "Fellow Eye Visual Acuity Score (letters)", 2, + ~OETESTCD, ~OECAT, ~OESCAT, ~AFEYE, ~PARAMCD, ~PARAM, ~PARAMN, + "VACSCORE", "BEST CORRECTED VISUAL ACUITY", "OVERALL EVALUATION", "Study Eye", "SBCVA", "Study Eye Visual Acuity Score (letters)", 1, # nolint + "VACSCORE", "BEST CORRECTED VISUAL ACUITY", "OVERALL EVALUATION", "Fellow Eye", "FBCVA", "Fellow Eye Visual Acuity Score (letters)", 2, # nolint ) ``` diff --git a/vignettes/adoe.Rmd b/vignettes/adoe.Rmd index 9f5591f5..51292174 100644 --- a/vignettes/adoe.Rmd +++ b/vignettes/adoe.Rmd @@ -97,11 +97,11 @@ oe <- convert_blanks_to_na(oe_ophtha) %>% # Assign PARAMCD, PARAM, and PARAMN param_lookup <- tibble::tribble( - ~OETESTCD, ~AFEYE, ~PARAMCD, ~PARAM, ~PARAMN, - "CSUBTH", "Study Eye", "SCSUBTH", "Study Eye Center Subfield Thickness (um)", 1, - "CSUBTH", "Fellow Eye", "FCSUBTH", "Fellow Eye Center Subfield Thickness (um)", 2, - "DRSSR", "Study Eye", "SDRSSR", "Study Eye Diabetic Retinopathy Severity", 3, - "DRSSR", "Fellow Eye", "FDRSSR", "Fellow Eye Diabetic Retinopathy Severity", 4, + ~OETESTCD, ~OECAT, ~OESCAT, ~AFEYE, ~PARAMCD, ~PARAM, ~PARAMN, + "CSUBTH", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "Study Eye", "SCSUBTH", "Study Eye Center Subfield Thickness (um)", 1, # nolint + "CSUBTH", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "Fellow Eye", "FCSUBTH", "Fellow Eye Center Subfield Thickness (um)", 2, # nolint + "DRSSR", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "Study Eye", "SDRSSR", "Study Eye Diabetic Retinopathy Severity", 3, # nolint + "DRSSR", "OPHTHALMIC ASSESSMENTS", "SD-OCT CST SINGLE FORM", "Fellow Eye", "FDRSSR", "Fellow Eye Diabetic Retinopathy Severity", 4, # nolint ) ```