Add new columns with drug use related information
addDrugUtilisation(
cohort,
gapEra,
conceptSet = NULL,
ingredientConceptId = NULL,
indexDate = "cohort_start_date",
censorDate = "cohort_end_date",
restrictIncident = TRUE,
numberExposures = TRUE,
numberEras = TRUE,
daysExposed = TRUE,
daysPrescribed = TRUE,
timeToExposure = TRUE,
initialExposureDuration = TRUE,
initialQuantity = TRUE,
cumulativeQuantity = TRUE,
initialDailyDose = TRUE,
cumulativeDose = TRUE,
nameStyle = "{value}_{concept_name}_{ingredient}",
name = NULL
)
The same cohort with the added columns.
A cohort_table object.
Number of days between two continuous exposures to be considered in the same era.
List of concepts to be included.
Ingredient OMOP concept that we are interested for the study.
Name of a column that indicates the date to start the analysis.
Name of a column that indicates the date to stop the analysis, if NULL end of individuals observation is used.
Whether to include only incident prescriptions in the analysis. If FALSE all prescriptions that overlap with the study period will be included.
Whether to include 'number_exposures' (number of drug exposure records between indexDate and censorDate).
Whether to include 'number_eras' (number of continuous exposure episodes between indexDate and censorDate).
Whether to include 'days_exposed' (number of days that the individual is in a continuous exposure episode, including allowed treatment gaps, between indexDate and censorDate; sum of the length of the different drug eras).
Whether to include 'days_prescribed' (sum of the number of days for each prescription that contribute in the analysis).
Whether to include 'time_to_exposure' (number of days between indexDate and the first episode).
Whether to include 'initial_exposure_duration' (number of prescribed days of the first drug exposure record).
Whether to include 'initial_quantity' (quantity of the first drug exposure record).
Whether to include 'cumulative_quantity' (sum of the quantity of the different exposures considered in the analysis).
Whether to include 'initial_daily_dose_{unit}' (daily dose of the first considered prescription).
Whether to include 'cumulative_dose_{unit}' (sum of the cumulative dose of the analysed drug exposure records).
Character string to specify the nameStyle of the new columns.
Name of the new computed cohort table, if NULL a temporary table will be created.
# \donttest{
cdm <- mockDrugUtilisation()
codelist <- CodelistGenerator::getDrugIngredientCodes(
cdm,
name = "acetaminophen"
)
cdm <- generateDrugUtilisationCohortSet(cdm, "dus_cohort", codelist)
cdm[["dus_cohort"]] |>
addDrugUtilisation(ingredientConceptId = 1125315, gapEra = 30)
# }
Run the code above in your browser using DataLab