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

0058 domain example #80

Merged
merged 5 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 4 additions & 23 deletions R/domain_example.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,10 @@
#'
#' ### Example SDTM domains
#'
#' \describe{
#' \item{`"ae_ophtha"`}{Ophthalmology Adverse Events Dataset.}
#' \item{`"ae"`}{Adverse Events Dataset-updated.}
#' \item{`"ce_vaccine"`}{Clinical Events Dataset for Vaccine Studies.}
#' \item{`"cm"`}{Concomitant Medication Dataset.}
#' \item{`"dm_vaccine"`}{Demographics Dataset for Vaccine Studies.}
#' \item{`"dm"`}{Demography Dataset.}
#' \item{`"ds"`}{Disposition Dataset-updated.}
#' \item{`"eg"`}{ Electrocardiogram Dataset.}
#' \item{`"ex_ophtha"`}{Ophthalmology Exposure Dataset.}
#' \item{`"ex_vaccine"`}{Exposures Dataset for Vaccine Studies.}
#' \item{`"ex"`}{Exposure Dataset.}
#' \item{`"face_vaccine"`}{Findings About Clinical Events Dataset for Vaccine Studies.}
#' \item{`"is_vaccine"`}{Immunogenicity Specimen Assessments Dataset for Vaccine Studies.}
#' \item{`"lb"`}{Laboratory Measurements Dataset.}
#' \item{`"mh"`}{Medical History Dataset-updated.}
#' \item{`"oe_ophtha"`}{Ophthalmology Adverse Events Dataset.}
#' \item{`"pc"`}{Pharmacokinetics Concentrations Dataset.}
#' \item{`"pp"`}{Pharmacokinetics Parameters Dataset.}
#' \item{`"qs_ophtha"`}{Ophthalmology Questionnaire Dataset.}
#' \item{`"rs_onco_irecist"`}{Disease Response Dataset (iRECIST).}
#' \item{`"rs_onco"`}{Disease Response Dataset.}
#' }
#' - `"ae"`: Adverse Events (AE) data set.
#' - `"apsc"`: Associated Persons Subject Characteristics (APSC) data set.
#' - `"cm"`: Concomitant Medications (CM) data set.
#' - `"vs"`: Vital Signs (VS) data set.
#'
#' @param example A string with either the basename, file name, or relative path
#' to a SDTM domain example file bundled with `{stdm.oak}`, e.g. `"cm"`
Expand Down
1 change: 1 addition & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ reference:
- condition_add
- ctl_new_rowid_pillar.cnd_df
- tbl_sum.cnd_df
- mutate.cnd_df

- title: SDTM examples
desc: SDTM domain file examples
Expand Down
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ RFSTDTC
RFXSTDTC
TPT
xxTPT
APSC
28 changes: 5 additions & 23 deletions man/domain_example.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/mutate.cnd_df.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions tests/testthat/_snaps/derive_blfl.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,33 +80,33 @@

# derive_blfl sdmt_in validations work

Required variable `DOMAIN` is missing
Required variable `DOMAIN` is missing in `sdtm_in`

---

Required variables `oak_id`, `raw_source` and `patient_number` are missing
Required variables `oak_id`, `raw_source`, and `patient_number` are missing in `sdtm_in`

---

Required variables `VSORRES`, `VSSTAT`, `VSTESTCD` and `VSDTC` are missing
Required variables `VSORRES`, `VSSTAT`, `VSTESTCD`, and `VSDTC` are missing in `sdtm_in`

# derive_blfl dm_domain validations work

Required variables `USUBJID` and `RFXSTDTC` are missing
Required variables `USUBJID` and `RFXSTDTC` are missing in `dm_domain`

# derive_blfl tgt_var and ref_var validations work

`tgt_var` must be a character scalar but is a list
Argument `tgt_var` must be a scalar of class <character>, but is a list.

---

`ref_var` must be a character scalar but is a data frame
Argument `ref_var` must be a scalar of class <character>, but is a tibble.

---

`tgt_var` must be one of 'VSBLFL' or 'VSLOBXFL' but is 'DMLOBXFL'
Argument `tgt_var` must be equal to one of "VSBLFL" or "VSLOBXFL".

# derive_blfl DOMAIN validation works

`domain` must be a character scalar but is `4`
Argument `domain` must be a scalar of class <character>, but is an integer.

Loading