Render a parameterized clinical report (PDF / DOCX / HTML)
Source:R/report-render.R
renderClinicalReport.RdRenders a one-page, bilingual, colorblind-safe clinical report for a gait,
HRV or EMG assessment. PDF and HTML are produced from a parameterized Quarto
template (quarto + the Quarto CLI); DOCX is produced by an editable
officer path that needs no LaTeX toolchain
(buildDocxReport).
Arguments
- data
A report payload list. Recognized elements:
subject(a label),figures(a named list ofggplotpanels — build them with the colorblind-safe primitives, e.g.plotNormativeBand/clinicalGaitReport),change(an optionalannotateChangeresult rendered as an MDC/MCID table) andprovenance(an optional named list for the footer, e.g. frommetadata(pe)).- template
Report template:
"gait"(default),"hrv"or"emg".- format
Output format:
"pdf"(default),"docx"or"html".- lang
"en"(default) or"ja"; drives the localized headings viaphysioLabel.- out
Output file path; defaults to a temp file named for the template and format.
Examples
if (FALSE) { # \dontrun{
fig <- plotNormativeBand(NULL,
NormativeModel(sin(seq(0, pi, length.out = 101)), rep(0.1, 101), time = 0:100))
renderClinicalReport(list(subject = "P01", figures = list(gait_cycle = fig)),
template = "gait", format = "docx", lang = "ja")
} # }