addIndication {DrugUtilisation}R Documentation

Get indication for a target cohort

Description

Get indication for a target cohort

Usage

addIndication(
  x,
  cdm = lifecycle::deprecated(),
  indicationCohortName,
  indicationGap = 0,
  unknownIndicationTable = NULL,
  indicationDate = "cohort_start_date"
)

Arguments

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

Value

Same cohort adding the indications

Examples


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)
  )



[Package DrugUtilisation version 0.6.0 Index]