Makes reports for LTMV typically used for auto reports such as subscriptions, dispatchments and bulletins. As such, please be warned that any changes to this function might render existing auto reports nonfunctional as they are based on static calls based on any previous version of this function. Changes should therefore be thoroughly tested against existing auto reports. Altering the names of the arguments will likely be a breaking change. Adding new arguments should be safe as long as they are provided a default value.

report_processor(
  report,
  output_type = "pdf",
  title = "",
  author = "unknown author",
  org_name = "unknown organization",
  org_id = 999999,
  registry_name = "ltmv",
  user_full_name = "unknown person name",
  user_role = "unknown role"
)

Arguments

report

Character string identifying the report to be processed by this function.

output_type

Character string with output format. Must be one of c("html", "pdf"). Defaults to "pdf".

title

Character string giving the report title. Empty string by default.

author

Character string providing the report author. Default value is "unknown author".

org_name

Character string with the name of the organization/hospital. Default is "unknown organization".

org_id

Integer (?) with the id of the organization/hospital. Default is 999999.

registry_name

Character string with registry name. Default is "ltmv".

user_full_name

Character string giving the person name, normally the user requesting the report. Default is "unknown person name".

user_role

Character string giving a user role, normally the one of the user requesting the report. Default is "unknown role".

Value

A character string with a path to where the produced file is located.

Examples

## Make the start page for LTMV
report_file_path = report_processor(
  report = "guide",
  output_type = "html",
  title = "Example report"
)
#> 
#> 
#> processing file: guide.Rmd
#> 1/1
#> output file: guide.knit.md
#> /usr/local/bin/pandoc +RTS -K512m -RTS guide.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output /var/folders/2s/h6hvv9ps03xgz_krkkstvq_r0000gn/T//Rtmp0HsSyk/14da107b77bc.html --lua-filter /Users/runner/work/_temp/Library/bookdown/rmarkdown/lua/custom-environment.lua --lua-filter /Users/runner/work/_temp/Library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Users/runner/work/_temp/Library/rmarkdown/rmarkdown/lua/latex-div.lua --metadata-file /var/folders/2s/h6hvv9ps03xgz_krkkstvq_r0000gn/T//Rtmp0HsSyk/file14da277d420d --embed-resources --standalone --wrap preserve --variable bs3=TRUE --section-divs --template /Users/runner/work/_temp/Library/rmarkdown/rmd/h/default.html --no-highlight --variable highlightjs=1 --number-sections --variable theme=bootstrap --mathjax --variable 'mathjax-url=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --include-in-header /var/folders/2s/h6hvv9ps03xgz_krkkstvq_r0000gn/T//Rtmp0HsSyk/rmarkdown-str14da56af54f6.html 
#> 
#> Output created: /var/folders/2s/h6hvv9ps03xgz_krkkstvq_r0000gn/T//Rtmp0HsSyk/14da107b77bc.html