addCumulativeDose {DrugUtilisation} | R Documentation |
To add a new column with the cumulative dose. To add multiple columns use
addDrugUtilisation()
for efficiency.
Description
To add a new column with the cumulative dose. To add multiple columns use
addDrugUtilisation()
for efficiency.
Usage
addCumulativeDose(
cohort,
ingredientConceptId,
conceptSet = NULL,
indexDate = "cohort_start_date",
censorDate = "cohort_end_date",
restrictIncident = TRUE,
nameStyle = "cumulative_dose_{concept_name}_{ingredient}",
name = NULL
)
Arguments
cohort |
Cohort in the cdm. |
ingredientConceptId |
Ingredient OMOP concept that we are interested for the study. It is a compulsory input, no default value is provided. |
conceptSet |
List of concepts to be included. If NULL all the descendants of ingredient concept id will be used. |
indexDate |
Name of a column that indicates the date to start the analysis. |
censorDate |
Name of a column that indicates the date to stop the analysis, if NULL end of individuals observation is used. |
restrictIncident |
Whether to include only incident prescriptions in the analysis. If FALSE all prescriptions that overlap with the study period will be included. |
nameStyle |
Character string to specify the nameStyle of the new columns. |
name |
Name of the new computed cohort table, if NULL a temporary tables is created. |
Value
The same cohort with the added column.
Examples
library(DrugUtilisation)
cdm <- mockDrugUtilisation()
cdm$cohort1 |>
addCumulativeDose(ingredientConceptId = 1125315)