Skip to contents

[Experimental]

Usage

tableDrugUtilisation(
  result,
  header = c("cdm_name"),
  groupColumn = c("cohort_name", strataColumns(result)),
  type = "gt",
  hide = "variable_level"
)

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 summariseIndication() results.

Examples

# \donttest{

library(DrugUtilisation)
library(CodelistGenerator)

cdm <- mockDrugUtilisation()
codelist <- CodelistGenerator::getDrugIngredientCodes(cdm, "acetaminophen")
cdm <- generateDrugUtilisationCohortSet(cdm, "dus_cohort", codelist)
#>  Subsetting drug_exposure table
#>  Checking whether any record needs to be dropped.
#>  Collapsing overlaping records.
#>  Collapsing records with gapEra = 1 days.

drugUse <- cdm$dus_cohort |>
  summariseDrugUtilisation(ingredientConceptId = 1125315)

tableDrugUtilisation(drugUse)
censor_date cohort_table_name gap_era index_date restrict_incident concept_set ingredient variable_name estimate_name
cdm_name
DUS MOCK
161_acetaminophen
cohort_end_date dus_cohort 1 cohort_start_date TRUE overall overall number records N 3
cohort_end_date dus_cohort 1 cohort_start_date TRUE overall overall number subjects N 3
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall number exposures missing N (%) 0 (0.0 %)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall number exposures Mean (SD) 1.67 (1.15)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall number exposures Median (Q25 - Q75) 1 (1 - 2)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall time to exposure missing N (%) 0 (0.0 %)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall time to exposure Mean (SD) 0.00 (0.00)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall time to exposure Median (Q25 - Q75) 0 (0 - 0)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall cumulative quantity missing N (%) 0 (0.0 %)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall cumulative quantity Mean (SD) 111.67 (89.49)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall cumulative quantity Median (Q25 - Q75) 90.00 (62.50 - 150.00)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall initial quantity missing N (%) 0 (0.0 %)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall initial quantity Mean (SD) 51.67 (33.29)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall initial quantity Median (Q25 - Q75) 35.00 (32.50 - 62.50)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall initial exposure duration missing N (%) 0 (0.0 %)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall initial exposure duration Mean (SD) 490.33 (171.83)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall initial exposure duration Median (Q25 - Q75) 478 (402 - 573)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall number eras missing N (%) 0 (0.0 %)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall number eras Mean (SD) 1.00 (0.00)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall number eras Median (Q25 - Q75) 1 (1 - 1)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall days exposed missing N (%) 0 (0.0 %)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall days exposed Mean (SD) 775.33 (650.28)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall days exposed Median (Q25 - Q75) 479 (402 - 1,000)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall days prescribed missing N (%) 0 (0.0 %)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall days prescribed Mean (SD) 805.00 (701.34)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants overall days prescribed Median (Q25 - Q75) 479 (402 - 1,044)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants acetaminophen cumulative dose milligram missing N (%) 0 (0.0 %)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants acetaminophen cumulative dose milligram Mean (SD) 137,833.33 (192,624.20)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants acetaminophen cumulative dose milligram Median (Q25 - Q75) 36,000.00 (26,750.00 - 198,000.00)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants acetaminophen initial daily dose milligram missing N (%) 0 (0.0 %)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants acetaminophen initial daily dose milligram Mean (SD) 186.44 (211.63)
cohort_end_date dus_cohort 1 cohort_start_date TRUE ingredient_1125315_descendants acetaminophen initial daily dose milligram Median (Q25 - Q75) 75.16 (64.42 - 252.82)
# }