View source: R/addOutpatientVisits.R
| addOutpatientVisits | R Documentation |
Add Outpatient and Emergency Visits to a Cohort
addOutpatientVisits(
x,
indexDate = "cohort_start_date",
censorDate = NULL,
window = list(c(-365, -1), c(0, 365)),
stratifySpecialty = TRUE,
gpSpecialtyConceptIds = c(38004446L),
specialties = NULL,
includeEmergency = TRUE,
nameStyle = "{setting}_visits_{window_name}",
name = NULL
)
x |
A cohort table or cdm_table. |
indexDate |
Date variable in |
censorDate |
Optional date variable in |
window |
A named or unnamed list of 2-element numeric vectors. Default: |
stratifySpecialty |
Logical; whether to partition visits by GP vs Specialist vs ED. Default: |
gpSpecialtyConceptIds |
OMOP provider specialty concept IDs for General Practice. Default: |
specialties |
Optional named list of integer vectors of OMOP specialty concept IDs for granular specialty breakdown. Default: |
includeEmergency |
Logical; whether to include emergency visits. Default: |
nameStyle |
Column naming pattern. Default: |
name |
Name of the new table in the write schema. If NULL, a temporary table is returned. |
The cohort table x with added outpatient visit metric columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.