Skip to contents

[Experimental]

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{
library(DrugUtilisation)

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 2024-12-19 13:21:50.181432
#>  Summary finished, at 2024-12-19 13:21:50.460441

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 12 0 (0.0 %) 381.33 (632.28) 95.86 (30.86 - 396.57)
milligram overall overall 12 0 (0.0 %) 381.33 (632.28) 95.86 (30.86 - 396.57)
milligram oral overall 6 0 (0.0 %) 370.61 (799.48) 48.40 (11.86 - 106.75)
milligram topical overall 6 0 (0.0 %) 392.05 (489.97) 251.99 (68.90 - 420.48)
milligram oral 9 6 0 (0.0 %) 370.61 (799.48) 48.40 (11.86 - 106.75)
milligram topical 18 3 0 (0.0 %) 598.75 (664.15) 432.43 (233.00 - 881.34)
milligram topical 9 3 0 (0.0 %) 185.35 (175.81) 119.36 (85.72 - 251.99)
# }