Skip to contents

Records a structured derivation specification linking an ADaM analysis variable back to its SDTM source. These specs are the basis for the variable derivation section of the CDISC Reviewer's Guide, auto-generated by lg_report().

Usage

lg_spec(
  adam_dataset,
  adam_var,
  label,
  source_domain,
  source_var,
  derivation,
  conditions = NULL
)

Arguments

adam_dataset

Character. ADaM dataset name (e.g. "ADLB").

adam_var

Character. ADaM variable name (e.g. "AVAL").

label

Character. Variable label.

source_domain

Character. Source SDTM domain (e.g. "LB").

source_var

Character. Source SDTM variable (e.g. "LBSTRESN").

derivation

Character. Plain-English description of how the ADaM variable is derived from the source.

conditions

Character vector or NULL. Conditions under which this derivation applies. NULL means it applies unconditionally.

Value

Invisibly NULL.

Examples

lg_start()
#> lineager: session started

lg_spec(
  adam_dataset = "ADLB",
  adam_var     = "AVAL",
  label        = "Analysis Value",
  source_domain = "LB",
  source_var    = "LBSTRESN",
  derivation   = "LBSTRESN; numeric conversion of LBORRES where LBSTRESN is missing",
  conditions   = "LBSTAT != 'NOT DONE'"
)