Makes reports for SmerteReg 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.

reportProcessor(
  report,
  outputType = "pdf",
  title = "",
  author = "unknown author",
  orgName = "unknown organization",
  orgId = 999999,
  registryName = "unknown registry",
  userFullName = "unknown person name",
  userRole = "unknown role",
  year = format(Sys.Date(), "%Y"),
  startDate = paste(year, "01", "01", sep = "-"),
  endDate = paste(year, "12", "31", sep = "-")
)

Arguments

report

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

outputType

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".

orgName

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

orgId

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

registryName

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

userFullName

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

userRole

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

year

Integer year most likely for selecting data for the report. Defaults to the current year.

startDate

Character string with the format "YYYY-MM-DD" providing the start of a period. Defaults to January 1st of of the year given in year.

endDate

Character string with the format "YYYY-MM-DD" providing the end of a period. Defaults to December 31st of of the year given in year.

Value

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