# Report-specific parameters
template: summaryPlotTemplate.Rmd
templatePackage: clinDataReview
reportTitleLevel: 2
reportTitle: "Laboratory abnormalities summary"

# Dataset of interest
dataFileName: lb.xpt
dataProcessing:
  - annotate:
    - dataset: dm
      vars: ["RFXSTDTC"]
    # combine parameter name and unit
    - vars: LBTESTSP
      varLabel: "Lab Test (Standard Units)"
      varFct: paste0(LBTEST, " (", LBSTRESU, ")")
  - filter:
    # safety analysis set: treated-patients
    - var: "RFXSTDTC" 
      value: ""
      rev: true
    - var: "LBDY"
      value: 1
      op: ">="
    - var: 'LBNRIND'
      value: ''
      rev: TRUE

# Table parameters
tableParams:
  rowVar: ['LBTESTSP', 'LBNRIND']
  stats: 'getStats("count")' 
  
# Plot parameters
plotFunction: barplotClinData
plotParams:
  xVar: "LBTESTSP"
  xLab: 'Laboratory parameter'
  yVar: "statN"
  yLab: 'Number of patients with (ab)normality'
  colorVar: 'LBNRIND'
  barmode: 'stack'
  width: 1000
  height: 700
