Skip to contents

Format a dose_coverage object into a visual table.

Usage

tableDoseCoverage(
  result,
  header = c("variable_name", "estimate_name"),
  groupColumn = c("cdm_name", "ingredient_name"),
  type = "gt",
  hide = c("variable_level", "sample_size")
)

Arguments

result

A summarised_result object.

header

Columns to use as header. See options with availableTableColumns(result).

groupColumn

Columns to group by. See options with availableTableColumns(result).

type

Type of table. Check supported types with visOmopResults::tableType().

hide

Columns to hide from the visualisation. See options with availableTableColumns(result).

Value

A table with a formatted version of summariseDrugCoverage() results.

Examples

# \donttest{
cdm <- mockDrugUtilisation()

result <- summariseDoseCoverage(cdm, 1125315)
#>  The following estimates will be computed:
#>  daily_dose: count_missing, percentage_missing, mean, sd, q25, median, q75
#> ! Table is collected to memory as not all requested estimates are supported on
#>   the database side
#> → Start summary of data, at 2025-03-27 14:42:57.277837
#>  Summary finished, at 2025-03-27 14:42:57.727238

tableDoseCoverage(result)
variable_name
number records
Missing dose
daily_dose
unit route pattern_id
estimate_name
N N (%) Mean (SD) Median (Q25 - Q75)
DUS MOCK; acetaminophen
overall overall overall 9 0 (0.0 %) 4,146.25 (7,944.63) 222.22 (25.17 - 5,000.00)
milligram overall overall 9 0 (0.0 %) 4,146.25 (7,944.63) 222.22 (25.17 - 5,000.00)
milligram oral overall 1 0 (0.0 %) - 34.30 (34.30 - 34.30)
milligram topical overall 8 0 (0.0 %) 4,660.24 (8,331.65) 302.35 (20.04 - 5,661.50)
milligram oral 9 1 0 (0.0 %) - 34.30 (34.30 - 34.30)
milligram topical 18 3 0 (0.0 %) 10,676.16 (12,096.83) 7,646.02 (4,014.24 - 15,823.01)
milligram topical 9 5 0 (0.0 %) 1,050.69 (2,209.66) 25.17 (4.67 - 222.22)
# }