addIndication {DrugUtilisation} | R Documentation |
Get indication for a target cohort
addIndication(
x,
cdm = lifecycle::deprecated(),
indicationCohortName,
indicationGap = 0,
unknownIndicationTable = NULL,
indicationDate = "cohort_start_date"
)
x |
Table in the cdm |
cdm |
A cdm reference created using CDMConnector |
indicationCohortName |
Name of indication cohort table |
indicationGap |
Gap between the event and the indication |
unknownIndicationTable |
Tables to search unknown indications |
indicationDate |
Date of the indication |
Same cohort adding the indications
library(DrugUtilisation)
library(CodelistGenerator)
cdm <- mockDrugUtilisation()
indications <- list("headache" = 378253, "asthma" = 317009)
cdm <- generateConceptCohortSet(
cdm, indications, "indication_cohorts"
)
acetaminophen <- getDrugIngredientCodes(cdm, "acetaminophen")
cdm <- generateDrugUtilisationCohortSet(cdm, "drug_cohort", acetaminophen)
cdm[["drug_cohort"]] %>%
addIndication(
indicationCohortName = "indication_cohorts",
indicationGap = c(0, 30, 365)
)