Checking numbers in the CSR text against the TFL outputs in R

Hi all,

I am working on a learning project about quality control of clinical study reports (CSRs). Most teams I have talked to validate ADaM datasets and TFLs with double programming, but the step after that, checking that the numbers quoted in the synopsis and results text match the tables, still seems to be done by eye in a medical writing review.

I would like to automate that last step in R and would value input from anyone who has tried something similar:

  1. Do you check CSR text against the TFL outputs programmatically? For example by reading the Word report with {officer} and the RTF or PDF tables with {striprtf} or {pdftools}, or by generating the in-text numbers from the same ARS metadata as the tables?
  2. If you tried it, what made it hard: number formats, rounding rules, populations, or matching a sentence to the right table cell?
  3. Is there an existing package or pharmaverse effort for this that I have missed?

For context: I recomputed the numbers in the public CDISC pilot report (CDISCPILOT01) from the ADaM data and compared them with the text. I found 19 differences. All but one disappear once you apply a "last value up to week 24" rule for end of treatment, which the report does not state. The remaining one is a percentage in the synopsis that differs by 0.1 from the table. Happy to share the details if that is useful.

Thanks,
Joona

1 Like