Skip to content

Commit df3dbfe

Browse files
committed
#36 minor updates for presentability and reorder articles to match ADaM order
1 parent 7ded1f1 commit df3dbfe

File tree

3 files changed

+27
-26
lines changed

3 files changed

+27
-26
lines changed

sdtm/ae.qmd

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ source("functions/print_df.R")
1414

1515
# Introduction
1616

17-
This article describes how to create an events SDTM domain using the {sdtm.oak} package. Examples are currently presented and tested in the context of the AE domain.
17+
This article describes how to create an events SDTM domain using the `{sdtm.oak}` package. Examples are currently presented and tested in the context of the `AE` domain.
1818

19-
Before reading this article, it is recommended that users review some of the articles in the package documentation of {sdtm.oak} to understand some of the key concepts:
19+
Before reading this article, it is recommended that users review some of the articles in the package documentation of `{sdtm.oak}` to understand some of the key concepts:
2020
[Algorithms & Sub-Algorithms](https://pharmaverse.github.io/sdtm.oak/articles/algorithms.html),
21-
[Creating an Interventions Domain](https://pharmaverse.github.io/sdtm.oak/articles/interventions_domain.html), which provides a detailed explanation of various concepts in {sdtm.oak}, such as `oak_id_vars`, `condition_add`, etc. It also offers guidance on which mapping algorithms or functions to use for different mappings and provides a more detailed explanation of how these mapping algorithms or functions work.
21+
[Creating an Interventions Domain](https://pharmaverse.github.io/sdtm.oak/articles/interventions_domain.html), which provides a detailed explanation of various concepts in `{sdtm.oak}`, such as `oak_id_vars`, `condition_add`, etc. It also offers guidance on which mapping algorithms or functions to use for different mappings and provides a more detailed explanation of how these mapping algorithms or functions work.
2222

2323
In this article, we will dive directly into programming and provide further explanation only where it is required.
2424

@@ -48,7 +48,7 @@ library(dplyr)
4848
ae_raw <- pharmaverseraw::ae_raw
4949
```
5050

51-
Adverse Events Raw dataset.
51+
Adverse Events Raw dataset
5252
```{r eval=TRUE, echo=FALSE, purl=FALSE}
5353
print_df(ae_raw, n = 5)
5454
```
@@ -93,7 +93,7 @@ print_df(study_ct, n = 10)
9393

9494
The topic variable is mapped as a first step in the mapping process. It is the primary variable in the SDTM domain. The rest of the variables add further definition to the topic variable. In this example, the topic variable is `AETERM`. It is mapped from the raw dataset column `IT.AETERM`. The mapping logic is `Map the collected value in the ae_raw dataset IT.AETERM variable to AE.AETERM`.
9595

96-
This mapping does not involve any controlled terminology. The `assign_no_ct` function is used for mapping. Once the topic variable is mapped, the Qualifier, Identifier, and Timing variables can be mapped.
96+
This mapping does not involve any controlled terminology. The `sdtm.oak::assign_no_ct()` function is used for mapping. Once the topic variable is mapped, the Qualifier, Identifier, and Timing variables can be mapped.
9797

9898
```{r}
9999
ae <-
@@ -313,4 +313,4 @@ print_df(ae, n = 10)
313313

314314
## Add Labels and Attributes {#attributes}
315315

316-
Yet to be developed.
316+
Yet to be developed. Please refer to `{metatools}` package to investigate options.

sdtm/dm.qmd

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "DM"
3-
order: 2
3+
order: 1
44
---
55

66
```{r setup script, include=FALSE, purl=FALSE}
@@ -14,9 +14,9 @@ source("functions/print_df.R")
1414

1515
# Introduction
1616

17-
This article describes how to create a demographics(DM) domain using the {sdtm.oak} package.
17+
This article describes how to create a demographics (`DM`) domain using the `{sdtm.oak}` package.
1818

19-
Before reading this article, it is recommended that users review some of the articles in the package documentation of {sdtm.oak} to understand some of the key concepts:
19+
Before reading this article, it is recommended that users review some of the articles in the package documentation of `{sdtm.oak}` to understand some of the key concepts:
2020
[Algorithms & Sub-Algorithms](https://pharmaverse.github.io/sdtm.oak/articles/algorithms.html),
2121
[Creating an Interventions Domain](https://pharmaverse.github.io/sdtm.oak/articles/interventions_domain.html), which provides a detailed explanation of various concepts in {sdtm.oak}, such as `oak_id_vars`, `condition_add`, etc. It also offers guidance on which mapping algorithms or functions to use for different mappings and provides a more detailed explanation of how these mapping algorithms or functions work.
2222

@@ -118,12 +118,13 @@ print_df(study_ct, n = 10)
118118
## Create reference dates configuration file {#refdates}
119119

120120
Create reference date configuration file, a data frame which has the details of the variables to be used for the calculation of reference dates. The data frame should have columns listed below:
121+
121122
- **`raw_dataset_name`**: Name of the raw dataset.
122123
- **`date_var`**: Date variable name from the raw dataset.
123124
- **`time_var`**: Time variable name from the raw dataset.
124125
- **`dformat`**: Format of the date collected in raw data.
125126
- **`tformat`**: Format of the time collected in raw data.
126-
- **`sdtm_var_name`**: Reference date variable name in DM domain where the raw variable is used.
127+
- **`sdtm_var_name`**: Reference date variable name in `DM` domain where the raw variable is used.
127128

128129
```{r}
129130
ref_date_conf_df <- tibble::tribble(
@@ -144,7 +145,7 @@ print_df(ref_date_conf_df)
144145

145146
## Map Topic Variable {#maptopic}
146147

147-
In DM domain SUBJID is the topic variable and it can be mapped from PATNUM using a simple mutate statement.
148+
In `DM` domain, `SUBJID` is the topic variable and it can be mapped from `PATNUM` using a simple `dplyr::mutate()` statement.
148149

149150
```{r}
150151
dm <- dm_raw %>%
@@ -160,7 +161,7 @@ print_df(dm, n = 10)
160161

161162
## Map Rest of the Variables {#maprest}
162163

163-
Map rest of the variables in DM domain using either `assign_no_ct` or `assign_ct` depending
164+
Map rest of the variables in `DM` domain using either `sdtm.oak::assign_no_ct()` or `sdtm.oak::assign_ct()` depending
164165
on if the variable has controlled terminologies associated.
165166

166167
```{r}
@@ -249,11 +250,11 @@ print_df(dm, n = 10)
249250

250251
## Map Reference Date Variables {#mapvars}
251252

252-
Use `oak_cal_ref_dates` to calculate reference dates variables in ISO8601 format.
253+
Use `sdtm.oak::oak_cal_ref_dates()` to calculate reference dates variables in ISO 8601 format.
253254
The function takes the raw variable names from reference date configuration file,
254255
and calculated the minimum or maximum dates based upon the `min_max` parameter.
255256

256-
Variable `RFSTDTC` is the reference Start Date/time for the subject in ISO 8601 character format. Usually equivalent to date/time when subject was first exposed to study treatment. So as specified in the reference date configuration file, we need to calculate the minumum date of the `IT.ECSTDAT` for each subject from the `ec_raw` dataset. Therefore, in `min_max` parameter, "min" is selected for the calculation.
257+
Variable `RFSTDTC` is the reference Start Date/time for the subject in ISO 8601 character format. Usually equivalent to date/time when subject was first exposed to study treatment. So as specified in the reference date configuration file, we need to calculate the minimum date of the `IT.ECSTDAT` for each subject from the `ec_raw` dataset. Therefore, in `min_max` parameter, "min" is selected for the calculation.
257258

258259
```{r eval=TRUE}
259260
dm <- dm %>%
@@ -395,4 +396,4 @@ print_df(dm, n = 10)
395396

396397
## Add Labels and Attributes {#attributes}
397398

398-
Yet to be developed.
399+
Yet to be developed. Please refer to `{metatools}` package to investigate options.

sdtm/vs.qmd

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "VS"
3-
order: 1
3+
order: 2
44
---
55

66
```{r setup script, include=FALSE, purl=FALSE}
@@ -14,17 +14,17 @@ source("functions/print_df.R")
1414

1515
# Introduction
1616

17-
This article describes how to create a Findings SDTM domain using the {sdtm.oak} package. Examples are currently presented and tested in the context of the VS domain.
17+
This article describes how to create a Findings SDTM domain using the `{sdtm.oak}` package. Examples are currently presented and tested in the context of the `VS` domain.
1818

19-
Before reading this article, it is recommended that users review some of the articles in the package documentation of {sdtm.oak} to understand some of the key concepts:
19+
Before reading this article, it is recommended that users review some of the articles in the package documentation of `{sdtm.oak}` to understand some of the key concepts:
2020
[Algorithms & Sub-Algorithms](https://pharmaverse.github.io/sdtm.oak/articles/algorithms.html),
21-
[Creating an Interventions Domain](https://pharmaverse.github.io/sdtm.oak/articles/interventions_domain.html), which provides a detailed explanation of various concepts in {sdtm.oak}, such as `oak_id_vars`, `condition_add`, etc. It also offers guidance on which mapping algorithms or functions to use for different mappings and provides a more detailed explanation of how these mapping algorithms or functions work.
21+
[Creating an Interventions Domain](https://pharmaverse.github.io/sdtm.oak/articles/interventions_domain.html), which provides a detailed explanation of various concepts in `{sdtm.oak}`, such as `oak_id_vars`, `condition_add`, etc. It also offers guidance on which mapping algorithms or functions to use for different mappings and provides a more detailed explanation of how these mapping algorithms or functions work.
2222

2323
In this article, we will dive directly into programming and provide further explanation only where it is required.
2424

2525
# Programming workflow
2626

27-
In {sdtm.oak} we process one raw dataset at a time. Similar raw datasets (example Vital Signs - Screening (vs_raw), Vital Signs - Treatment (vs_t_raw)) can be stacked together before processing or can be processed separately.
27+
In `{sdtm.oak}` we process one raw dataset at a time. Similar raw datasets (example Vital Signs - Screening (`vs_raw`), Vital Signs - Treatment (`vs_t_raw`)) can be stacked together before processing or can be processed separately.
2828

2929
- [Read in data](#readdata)
3030
- [Create oak_id_vars](#oakidvars)
@@ -52,13 +52,13 @@ vs_raw <- pharmaverseraw::vs_raw
5252
dm <- pharmaversesdtm::dm
5353
```
5454

55-
Vital Signs Raw dataset.
55+
Vital Signs Raw dataset
5656
```{r eval=TRUE, echo=FALSE, purl=FALSE}
5757
print_df(vs_raw, n = 5)
5858
```
5959

6060
### SDTM aCRF
61-
SDTM annotated CRF for the vs_raw can be viewed [here](https://github.com/pharmaverse/pharmaverseraw/blob/main/vignettes/articles/aCRFs/VitalSigns_aCRF.pdf):
61+
SDTM annotated CRF for the `vs_raw` can be viewed [here](https://github.com/pharmaverse/pharmaverseraw/blob/main/vignettes/articles/aCRFs/VitalSigns_aCRF.pdf):
6262

6363
## Create oak_id_vars {#oakidvars}
6464

@@ -84,7 +84,7 @@ print_df(study_ct, n = 10)
8484

8585
## Map Topic Variable {#maptopic}
8686

87-
This raw dataset has multiple topic variables. Lets start with SYSBP. Map topic variable SYSBP from the raw variable SYS_BP.
87+
This raw dataset has multiple topic variables. Lets start with `SYSBP`. Map topic variable `SYSBP` from the raw variable `SYS_BP`.
8888

8989
```{r}
9090
# Map topic variable SYSBP
@@ -108,7 +108,7 @@ print_df(vs_sysbp, n = 10)
108108

109109
## Map Rest of the Variables {#maprest}
110110

111-
Map rest of the variables applicable to the topic variable SYSBP. This can include qualifiers, identifier and timing variables.
111+
Map rest of the variables applicable to the topic variable `SYSBP`. This can include qualifiers, identifier and timing variables.
112112

113113
```{r}
114114
## Map Rest of the Variables
@@ -157,7 +157,7 @@ print_df(vs_sysbp, n = 10)
157157

158158
## Repeat Map Topic and Map Rest {#repeatsteps}
159159

160-
This raw data source has other topic variables DIABP, PULSE, HEIGHT, WEIGHT, TEMP and its corresponding qualifiers. Repeat mapping topic and qualifiers for each topic variable.
160+
This raw data source has other topic variables `DIABP`, `PULSE`, `HEIGHT`, `WEIGHT`, `TEMP` and its corresponding qualifiers. Repeat mapping topic and qualifiers for each topic variable.
161161

162162
```{r}
163163
# Repeat Map Topic and Map Rest
@@ -519,4 +519,4 @@ print_df(vs)
519519

520520
## Add Labels and Attributes {#attributes}
521521

522-
Yet to be developed.
522+
Yet to be developed. Please refer to `{metatools}` package to investigate options.

0 commit comments

Comments
 (0)