-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
108 lines (80 loc) · 3.17 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
library(sdtm.terminology)
```
# sdtm.terminology <img src="man/figures/logo.svg" align="right" height="139" alt="" />
<!-- badges: start -->
[![R-CMD-check](https://github.com/patterninstitute/sdtm.terminology/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/patterninstitute/sdtm.terminology/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->
`{sdtm.terminology}` is an R data package providing CDISC SDTM terminology
(release 2023-12-15).
[CDISC SDTM Controlled
Terminology](https://www.cdisc.org/standards/terminology/controlled-terminology)
refers to a standardized set of terms developed by the [Clinical Data
Interchange Standards Consortium (CDISC)](https://www.cdisc.org/) specifically
for use with the [Standard Data Tabulation Model
(SDTM)](https://www.cdisc.org/standards/foundational/sdtm). Controlled
terminology provides a consistent vocabulary for coding various types of data
that are collected during clinical trials. This standardization is crucial for
ensuring that data from different studies, sponsors, and sites can be
understood, compared, and analyzed in a consistent manner.
In addition to supplying SDTM terminology data, this package includes several
utility functions designed to facilitate the conversion between codes and terms,
as well as to verify the association of terms with specific code lists.
## Installation
``` r
# install.packages("devtools")
devtools::install_github("patterninstitute/sdtm.terminology")
```
## Quick usage example
Convert terms to codes and codes to terms, and determine if a term is included
in a terminology code list:
```{r}
# Convert a code list term to respective C-code and back again
cl_term_to_code("UNIT")
cl_code_to_term("C71620")
# Are "%" and "%/s" terms from the UNIT code list?
is_term(c("%", "%/s"), cl_term_to_code("UNIT"))
# Find "%" and "%/s" codes within C71620 code list.
term_to_code(c("%", "%/s"), "C71620")
# It seems "%" is also a term in the VSRESU code list but not "%/s".
is_term(c("%", "%/s"), cl_term_to_code("VSRESU"))
# Or, equivalently, query using codes instead...
is_code(c("C25613", "C163560"), cl_term_to_code("VSRESU"))
# Find which code lists contain the terms "DNA" or "RNA"
match_code_list_from_term(c("DNA", "RNA"))
```
## Data
`{sdtm.terminology}` bundles three data sets:
- `sdtm_terminology`: This is the same data set as provided upstream by CDISC,
except for variable renaming and conversion of "Yes"/"No" values to
`TRUE`/`FALSE` values in the `is_extensible` column.
- `sdtm_code_lists`: A subset of `sdtm_terminology` containing only code lists.
- `sdtm_code_terms`: A subset of `sdtm_terminology` containing terms other than
code lists.
## `sdtm_terminology`
```{r}
# SDTM controlled terminology version
sdtm_ct_version()
# SDTM terminology main data set
sdtm_terminology
```
## `sdtm_code_lists`
```{r}
# SDTM code lists
sdtm_code_lists
```
## `sdtm_code_terms`
```{r}
# SDTM terms (other than code lists)
sdtm_code_terms
```