derive_diam_to_sev_records {admiralvaccine} | R Documentation |
Creating Severity Records From Diameter
Description
To derive the severity records from the diameter records.
Usage
derive_diam_to_sev_records(
dataset,
diam_code = "DIAMETER",
faobj_values = c("REDNESS", "SWELLING"),
testcd_sev = "SEV",
test_sev = "Severity/Intensity",
none = 0,
mild = 2,
mod = 5,
sev = 10
)
Arguments
dataset |
Input data set The variables |
diam_code |
Diameter record filter Permitted Value: A character vector or scalar. Helps to filter the diameter records to derive the severity records by
passing the |
faobj_values |
Event filter Permitted Value: A character vector or Scalar. Helps to filter the events ( |
testcd_sev |
To assign Permitted Value: A character scalar Assign the value for |
test_sev |
Permitted Value: A Character scalar Assign the value for |
none |
Pass the lower limit for grade Permitted Value: A numeric vector The Assign the lower limit to derive the Severity Grade ( Note: Use the limit reference to pass the values to these arguments |
mild |
Pass the lower limit for grade Permitted Value: A numeric vector |
mod |
Pass the lower limit for grade Permitted Value: A numeric vector |
sev |
Pass the lower limit for grade Permitted Value: A numeric vector |
Value
The Input data with the new severity records for Redness and swelling which
is specified in faobj_values
and AVAL, AVALC will be derived and FATESTCD
,
FATEST
will be changed as per the values.
Note
Basically, This function will derive and create the severity records from the
diameter record for the particular events specified in the faobj_values
that user wants.
If you want to derive the Severity from diameter, even though you have the severity in SDTM data.
This function will re-derive the severity and remove the derived SDTM severity records.
Author(s)
Arjun Rubalingam
See Also
Other der_rec:
derive_fever_records()
Examples
library(dplyr)
library(admiral)
library(tibble)
input <- tribble(
~USUBJID, ~FAOBJ, ~AVAL, ~AVALC, ~ATPTREF, ~FATEST, ~FATESTCD,
"XYZ1001", "REDNESS", 7.5, "7.5", "VACCINATION 1", "Diameter", "DIAMETER",
"XYZ1001", "REDNESS", 3.5, "3.5", "VACCINATION 1", "Diameter", "DIAMETER",
"XYZ1001", "REDNESS", 2, "2", "VACCINATION 1", "Diameter", "DIAMETER",
"XYZ1001", "REDNESS", 1.8, "1.8", "VACCINATION 1", "Diameter", "DIAMETER",
"XYZ1001", "REDNESS", 1.4, "1.4", "VACCINATION 1", "Diameter", "DIAMETER",
"XYZ1002", "REDNESS", 11.1, "11.1", "VACCINATION 2", "Diameter", "DIAMETER",
"XYZ1002", "REDNESS", 7.4, "7.4", "VACCINATION 2", "Diameter", "DIAMETER",
"XYZ1002", "REDNESS", 6, "6", "VACCINATION 2", "Diameter", "DIAMETER",
"XYZ1002", "REDNESS", 2.1, "2.1", "VACCINATION 2", "Diameter", "DIAMETER",
"XYZ1002", "REDNESS", 1.1, "1.1", "VACCINATION 2", "Diameter", "DIAMETER",
"XYZ1001", "SWELLING", 5.5, "5.5", "VACCINATION 1", "Diameter", "DIAMETER",
"XYZ1001", "SWELLING", 2.5, "2.5", "VACCINATION 1", "Diameter", "DIAMETER",
"XYZ1001", "SWELLING", 2, "2", "VACCINATION 1", "Diameter", "DIAMETER",
"XYZ1001", "SWELLING", 1.8, "1.8", "VACCINATION 1", "Diameter", "DIAMETER",
"XYZ1001", "SWELLING", 1.4, "1.4", "VACCINATION 1", "Diameter", "DIAMETER",
"XYZ1002", "SWELLING", 10.1, "10.1", "VACCINATION 2", "Diameter", "DIAMETER",
"XYZ1002", "SWELLING", 7.1, "7.1", "VACCINATION 2", "Diameter", "DIAMETER",
"XYZ1002", "SWELLING", 5, "5", "VACCINATION 2", "Diameter", "DIAMETER",
"XYZ1002", "SWELLING", 1.8, "1.8", "VACCINATION 2", "Diameter", "DIAMETER",
"XYZ1002", "SWELLING", 1.4, "1.4", "VACCINATION 2", "Diameter", "DIAMETER"
)
derive_diam_to_sev_records(
dataset = input,
faobj_values = c("REDNESS", "SWELLING"),
diam_code = "DIAMETER",
testcd_sev = "SEV",
test_sev = "Severity"
)