View source: R/derive_fever_records.R
derive_fever_records | R Documentation |
Creating Fever records from the VS
SDTM dataset.
derive_fever_records(dataset, dataset_source, filter_source, faobj)
dataset |
Input Dataset
Input dataset is expected to have variables |
dataset_source |
Source Dataset - SDTM Vital Sign ( |
filter_source |
Filter condition for Source dataset. |
faobj |
FAOBJ Value for fever records in output dataset. |
Check if FAOBJ = FEVER
record is present in input dataset,
if not then use SDTM.VS
to get FEVER records.
With temperature values from VSSTRESN
we decide if FEVER has
occurred or not (FAORRES = "Y"/"N"
).
Since records are derived, these FEVER records are considered DTYPE = "DERIVED"
if FAOBJ = FEVER
record is present, then input dataset will be made as output with no further
analysis.
The temperature value greater or equal 38° C will be considered as FEVER records.
The output dataset contains records with FATESTCD = "OCCUR"
for
FAOBJ = FEVER
records.
Dhivya Kanagaraj
Other der_rec:
derive_diam_to_sev_records()
library(tibble)
library(dplyr)
library(admiraldev)
library(admiral)
input <- tribble(
~USUBJID, ~FAOBJ, ~FATESTCD, ~FACAT, ~FASCAT, ~FATPT,
"ABC101", "REDNESS", "SEV", "REACTOGENICITY", "ADMINISTRATIVE SITE", "DAY 1",
"ABC101", "REDNESS", "DIAM", "REACTOGENICITY", "ADMINISTRATIVE SITE", "DAY 2",
"ABC101", "VOMITTING", "SEV", "REACTOGENICITY", "SYSTEMIC", "DAY 1",
"ABC101", "FATIQUE", "OCCUR", "REACTOGENICITY", "SYSTEMIC", "DAY 3"
)
vs <- tribble(
~USUBJID, ~VSTESTCD, ~VSCAT, ~VSSTRESN, ~VSSTRESU, ~VSTPT,
"ABC101", "TEMP", "REACTOGENICITY", 38.3, "C", "DAY 1",
"ABC101", "TEMP", "REACTOGENICITY", 38, "C", "DAY 2",
"ABC101", "TEMP", "REACTOGENICITY", 36, "C", "DAY 3",
"ABC101", "TEMP", "REACTOGENICITY", 37, "C", "DAY 4",
"ABC101", "TEMP", "REACTOGENICITY", 39, "C", "DAY 5",
"ABC101", "TEMP", "REACTOGENICITY", 39, "C", "DAY 6",
"ABC101", "TEMP", "REACTOGENICITY", 38, "C", "DAY 7"
)
derive_fever_records(
dataset = input,
dataset_source = vs,
filter_source = VSCAT == "REACTOGENICITY" & VSTESTCD == "TEMP",
faobj = "FEVER"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.