# Report-specific parameters
template:  plotTemplate.Rmd
templatePackage: clinDataReview
reportTitle: "Hepatoxicity (eDISH)"
reportTitleLevel: 2

# Dataset of interest
dataFileName: lb.xpt
dataProcessing:
  - annotate:
    - dataset: dm
      vars: ["RFXSTDTC"]
    - vars: 'ULN_ratio'
      varFct: 'LBSTRESN / LBSTNRHI'
      varLabel: "ULN ratio"
    - vars: VISIT
      varFct: 'reorder(VISIT, VISITNUM)'
  - filter:
    # safety analysis set: treated-patients
    - var: "RFXSTDTC" 
      value: ""
      rev: true
    - var: "LBTESTCD"
      value: ["ALT", "BILI"]
  - transform:
     - type: "pivot_wider"
       varsID: ["USUBJID", "VISIT"]
       varPivot: "LBTESTCD"
       varsValue: "ULN_ratio"
       
# Plot parameters
plotFunction: "scatterplotClinData"
plotParams:
  title: "Hy's Law evaluation"
  xVar: "ULN_ratio.ALT"
  yVar: "ULN_ratio.BILI"
  xTrans: "log10"
  yTrans: "log10"
  xLab: "ALT in multiples of ULN"
  yLab: "Bilirubin in multiples of ULN"
  aesPointVar:
    colour: "VISIT"
    fill: "VISIT"
  refLinePars:
    - xintercept: 3
      linetype: "dashed"
      colour:  "red"
    - yintercept: 2
      linetype: "dashed"
      colour: "red"
  themePars:
    legend.position: "right"
  hoverVars: ["USUBJID", "VISIT", "ULN_ratio.ALT", "ULN_ratio.BILI"]
