derive_fever_records {admiralvaccine}R Documentation

Creating Fever Records

Description

Creating Fever records from the VS SDTM dataset.

Usage

derive_fever_records(dataset, dataset_source, filter_source, faobj)

Arguments

dataset

Input Dataset Input dataset is expected to have variables USUBJID and FAOBJ.

dataset_source

Source Dataset - SDTM Vital Sign (VS) Source Dataset (VS) is expected to have temperature records.

filter_source

Filter condition for Source dataset.

faobj

FAOBJ Value for fever records in output dataset.

Details

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.

Value

The output dataset contains records with FATESTCD = "OCCUR" for FAOBJ = FEVER records.

Author(s)

Dhivya Kanagaraj

See Also

Other der_rec: derive_diam_to_sev_records()

Examples

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"
)


[Package admiralvaccine version 0.2.0 Index]