View source: R/summariseIntersect.R
summariseIndication | R Documentation |
Summarise the observed indications of patients in a drug cohort based on their presence in an indication cohort in a specified time window. If an individual is not in one of the indication cohorts, they will be considered to have an unknown indication if they are present in one of the specified OMOP CDM clinical tables. Otherwise, if they are neither in an indication cohort or a clinical table they will be considered as having no observed indication.
summariseIndication(
cohort,
strata = list(),
indicationCohortName,
cohortId = NULL,
indicationCohortId = NULL,
indicationWindow = list(c(0, 0)),
unknownIndicationTable = NULL,
indexDate = "cohort_start_date",
mutuallyExclusive = TRUE,
censorDate = NULL
)
cohort |
A cohort_table object. |
strata |
A list of variables to stratify results. These variables must have been added as additional columns in the cohort table. |
indicationCohortName |
Name of the cohort table with potential indications. |
cohortId |
A cohort definition id to restrict by. If NULL, all cohorts will be included. |
indicationCohortId |
The target cohort ID to add indication. If NULL all cohorts will be considered. |
indicationWindow |
The time window over which to identify indications. |
unknownIndicationTable |
Tables in the OMOP CDM to search for unknown indications. |
indexDate |
Name of a column that indicates the date to start the analysis. |
mutuallyExclusive |
Whether to report indications as mutually exclusive or report them as independent results. |
censorDate |
Name of a column that indicates the date to stop the analysis, if NULL end of individuals observation is used. |
A summarised result
library(DrugUtilisation)
library(CDMConnector)
library(dplyr, warn.conflicts = FALSE)
cdm <- mockDrugUtilisation()
indications <- list(headache = 378253, asthma = 317009)
cdm <- generateConceptCohortSet(cdm = cdm,
conceptSet = indications,
name = "indication_cohorts")
cdm <- generateIngredientCohortSet(cdm = cdm,
name = "drug_cohort",
ingredient = "acetaminophen")
cdm$drug_cohort |>
summariseIndication(
indicationCohortName = "indication_cohorts",
unknownIndicationTable = "condition_occurrence",
indicationWindow = list(c(-Inf, 0))
) |>
glimpse()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.