Skip to contents

Generate a set of drug cohorts

Generate a set of drug cohorts using given concepts or vocabulary hierarchies

generateDrugUtilisationCohortSet()
Generate a set of drug cohorts based on given concepts
generateIngredientCohortSet()
Generate a set of drug cohorts based on drug ingredients
generateAtcCohortSet()
Generate a set of drug cohorts based on ATC classification
erafyCohort()
Erafy a cohort_table collapsing records separated gapEra days or less.
cohortGapEra()
Get the gapEra used to create a cohort

Apply inclusion criteria to drug cohorts

Apply inclusion criteria that filter drug cohort entries based on specified rules.

requireDrugInDateRange()
Restrict cohort to only cohort records within a certain date range
requireIsFirstDrugEntry()
Restrict cohort to only the first cohort record per subject
requireObservationBeforeDrug()
Restrict cohort to only cohort records with the given amount of prior observation time in the database
requirePriorDrugWashout()
Restrict cohort to only cohort records with a given amount of time since the last cohort record ended

Identify and summarise indications for patients in drug cohorts

Indications identified based on their presence in indication cohorts or OMOP CDM clinical tabes.

addIndication()
Add a variable indicating individuals indications
summariseIndication()
Summarise the indications of individuals in a drug cohort
tableIndication() experimental
Create a table showing indication results
plotIndication()
Generate a plot visualisation (ggplot2) from the output of summariseIndication

Drug use functions

Drug use functions are used to summarise and obtain the drug use information

addDrugUtilisation()
Add new columns with drug use related information
summariseDrugUtilisation()
This function is used to summarise the dose utilisation table over multiple cohorts.
tableDrugUtilisation() experimental
Format a drug_utilisation object into a visual table.
plotDrugUtilisation()
Plot the results of summariseDrugUtilisation

Drug use individual functions

Drug use functions can be used to add a single estimates

addNumberExposures()
To add a new column with the number of exposures. To add multiple columns use addDrugUtilisation() for efficiency.
addNumberEras()
To add a new column with the number of eras. To add multiple columns use addDrugUtilisation() for efficiency.
addTimeToExposure()
To add a new column with the time to exposure. To add multiple columns use addDrugUtilisation() for efficiency.
addDaysExposed()
To add a new column with the days exposed. To add multiple columns use addDrugUtilisation() for efficiency.
addDaysPrescribed()
To add a new column with the days prescribed. To add multiple columns use addDrugUtilisation() for efficiency.
addInitialExposureDuration()
To add a new column with the duratio of the first exposure. To add multiple columns use addDrugUtilisation() for efficiency.
addInitialQuantity()
To add a new column with the initial quantity. To add multiple columns use addDrugUtilisation() for efficiency.
addCumulativeQuantity()
To add a new column with the cumulative quantity. To add multiple columns use addDrugUtilisation() for efficiency.
addInitialDailyDose()
To add a new column with the initial daily dose. To add multiple columns use addDrugUtilisation() for efficiency.
addCumulativeDose()
To add a new column with the cumulative dose. To add multiple columns use addDrugUtilisation() for efficiency.

Summarise treatment persistence using proportion of patients covered (PPC)

Summarise the proportion of patients in the drug cohort over time.

summariseProportionOfPatientsCovered()
Summarise proportion Of patients covered
tableProportionOfPatientsCovered() experimental
Create a table with proportion of patients covered results
plotProportionOfPatientsCovered()
Plot proportion of patients covered

Summarise treatments during certain windows

Summarise the use of different treatments during certain windows

addTreatment()
Add a variable indicating individuals medications
summariseTreatment()
This function is used to summarise treatments received
tableTreatment() experimental
Format a summarised_treatment result into a visual table.
plotTreatment()
Generate a custom ggplot2 from a summarised_result object generated with summariseTreatment function.

Summarise treatment restart or switch during certain time

Summarise the restart of a treatment, or switch to another, during certain time

addDrugRestart() experimental
Summarise the drug restart per window.
summariseDrugRestart() experimental
Summarise the drug restart per window.
tableDrugRestart() experimental
Format a drug_restart object into a visual table.
plotDrugRestart()
Generate a custom ggplot2 from a summarised_result object generated with summariseDrugRestart() function.

Daily dose documentation

Functions to assess coverage for the diferent ingredients and document how daily dose is calculated

patternsWithFormula
Patterns valid to compute daily dose with the associated formula.
patternTable()
Function to create a tibble with the patterns from current drug strength table
summariseDoseCoverage()
Check coverage of daily dose computation in a sample of the cdm for selected concept sets and ingredient
tableDoseCoverage() experimental
Format a dose_coverage object into a visual table.

Complementary functions

Complementary functions

benchmarkDrugUtilisation()
Run benchmark of drug utilisation cohort generation
mockDrugUtilisation()
It creates a mock database for testing DrugUtilisation package

Deprecated functions

This functions has been deprecated

addExposedTime()
To add a new column with the exposed time. To add multiple columns use addDrugUtilisation() for efficiency.
addDailyDose() deprecated
add daily dose information to a drug_exposure table
addRoute() deprecated
add route column to a table containing drug_exposure information
addDrugUse() defunct
Add new columns with drug use related information
summariseDrugUse() defunct
This function is used to summarise the dose table over multiple cohorts.
dailyDoseCoverage() deprecated
Check coverage of daily dose computation in a sample of the cdm for selected concept sets and ingredient
stratifyByUnit() deprecated
Function to stratify a conceptSet by unit
readConceptList() deprecated
Get concept ids from a provided path to json files