write_reports: Write NSSP BioSense Platform Data Quality Summary Reports

Description Usage Arguments

View source: R/write_reports.R

Description

This function calls upon all of the other functions in the package to write a large number of Excel workbooks. First, it generates a state summary workbook that shows percents and counts of nulls and invalids at both the facility and statewide level, as well as message delivery lag (i.e., timeliness reports). Second, it generates a summary workbook for every single facility that includes only information for that facility. Third, it generates an example workbook for every single facility, including detailed information on records and visits that are null or invalid. These example workbooks make the function longer to run, so by default this function does not generate them (see 'nexamples' input below).

Usage

1
2
write_reports(username, password, table, mft, start, end, directory = "",
  nexamples = 0, offset)

Arguments

username

Your BioSense username, as a string. This is the same username you may use to log into RStudio or Adminer.

password

Your BioSense password, as a string. This is the same password you may use to log into RStudio or Adminer.

table

The table that you want to retrieve the data from, as a string.

mft

The MFT (master facilities table) from where the facility names will be retrieved, as a string.

start

The start date time that you wish to begin pulling data from, as a string.

end

The end data time that you wish to stop pulling data from, as a string.

directory

The directory where you would like to write the reports to (i.e., "~/Documents/MyReports"), as a string.

nexamples

An integer number of examples you would like for each type of invalid or null field in the examples workbooks for each facility. This defaults to 0, which will not generate these example workbooks.

offset

The number of hours you wish to offset Arrived_Date_Time (which is in UTC). The offset value is how far off your local time zone is from UTC. For example, the Central Time Zone would set this to 5 or 6, depending on if it is daylight savings or not. This value should be an integer. This is used for timeliness reports using the 'va_lag' function.


SophiaLC/IHI_DQ documentation built on Oct. 23, 2020, 2:35 a.m.