
Codelist diagnostics
a09_RunCodelistDiagnostics.RmdThis vignette presents a set of functions to explore the use of codes in a codelist. We will cover the following key functions:
-
summariseAchillesCodeUse(): Summarises the code use using ACHILLES tables. -
summariseCodeUse(): Summarises the code use in patient-level data. -
summariseOrphanCodes(): Identifies orphan codes related to a codelist using ACHILLES tables. -
summariseCohortCodeUse(): Evaluates codelist usage within a cohort.
Let’s start by loading the required packages, connecting to a mock
database, and generating a codelist for example purposes. We’ll use
getCandidateCodes() to find our codes.
library(DBI)
library(duckdb)
library(dplyr)
library(CDMConnector)
library(CodelistGenerator)
library(CohortConstructor)
library(omopgenerics)
# Connect to the database and create the cdm object
con <- dbConnect(duckdb(),
eunomiaDir("synpuf-1k", "5.3"))
cdm <- cdmFromCon(con = con,
cdmName = "Eunomia Synpuf",
cdmSchema = "main",
writeSchema = "main",
achillesSchema = "main")
# Create a codelist for depression
depression <- getCandidateCodes(cdm,
keywords = "depression")
depression <- newCodelist(list("depression" = depression$concept_id))Running diagnostics for a codelist
Summarise code use using ACHILLES tables
This function uses ACHILLES summary tables to count the number of records and persons associated with each concept in a codelist. Notice that it requires that ACHILLES tables are available in the CDM.
achilles_code_use <- summariseAchillesCodeUse(depression,
cdm,
countBy = c("record", "person"))From this, we will obtain a summarised
result object. We can easily visualise the results using
tableAchillesCodeUse():
tableAchillesCodeUse(achilles_code_use,
type = "gt")|
Database name
|
|||||||||
|---|---|---|---|---|---|---|---|---|---|
|
Eunomia Synpuf
|
|||||||||
| Codelist name | Domain ID | Standard concept name | Standard concept ID | Vocabulary ID | Source concept name | Source concept ID | Source concept value |
Estimate name
|
|
| Record count | Person count | ||||||||
| depression | condition | Arteriosclerotic dementia with depression | 374326 | SNOMED | Vascular dementia, with depressed mood | 44829914 | 29043 | 19 | 11 |
| Presenile dementia with depression | 377527 | SNOMED | Presenile dementia with depressive features | 44836954 | 29013 | 10 | 10 | ||
| Senile dementia with depression | 379784 | SNOMED | Senile dementia with depressive features | 44819534 | 29021 | 21 | 18 | ||
| Severe bipolar II disorder, most recent episode major depressive, in partial remission | 4283219 | SNOMED | Bipolar I disorder, most recent episode (or current) depressed, in partial or unspecified remission | 44820721 | 29655 | 10 | 10 | ||
| Recurrent major depressive episodes | 432285 | SNOMED | Major depressive affective disorder, recurrent episode, unspecified | 44831089 | 29630 | 60 | 41 | ||
| Recurrent major depressive episodes, moderate | 432883 | SNOMED | Major depressive affective disorder, recurrent episode, severe, without mention of psychotic behavior | 44835785 | 29633 | 203 | 88 | ||
| Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 203 | 88 | |||||
| Recurrent major depressive episodes, severe, with psychosis | 434911 | SNOMED | Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior | 44827655 | 29634 | 61 | 31 | ||
| Bipolar affective disorder, currently depressed, moderate | 437528 | SNOMED | Bipolar I disorder, most recent episode (or current) depressed, moderate | 44835786 | 29652 | 11 | 9 | ||
| Severe major depression, single episode, with psychotic features | 438406 | SNOMED | Major depressive affective disorder, single episode, severe, specified as with psychotic behavior | 44820717 | 29624 | 10 | 9 | ||
| Recurrent major depressive episodes, mild | 438998 | SNOMED | Major depressive affective disorder, recurrent episode, mild | 44829923 | 29631 | 27 | 24 | ||
| Bipolar affective disorder, currently depressed, in full remission | 439251 | SNOMED | Bipolar I disorder, most recent episode (or current) depressed, in full remission | 44822977 | 29656 | 13 | 13 | ||
| Bipolar affective disorder, currently depressed, mild | 439253 | SNOMED | Bipolar I disorder, most recent episode (or current) depressed, mild | 44826500 | 29651 | 16 | 16 | ||
| Severe major depression, single episode, without psychotic features | 441534 | SNOMED | Major depressive affective disorder, single episode, severe, without mention of psychotic behavior | 44835784 | 29623 | 25 | 18 | ||
Notice that concepts with zero counts will not appear in the result table.
Summarise code use using patient-level data
This function performs a similar task as above but directly queries
patient-level data, making it usable even if ACHILLES tables are not
available. It can be configured to stratify results by concept
(byConcept), by year (byYear), by sex
(bySex), or by age group (byAgeGroup). We can
further specify a specific time period (dateRange).
code_use <- summariseCodeUse(depression,
cdm,
countBy = c("record", "person"),
byYear = FALSE,
bySex = FALSE,
ageGroup = list("<=50" = c(0,50), ">50" = c(51,Inf)),
dateRange = as.Date(c("2010-01-01", "2020-01-01")))
tableCodeUse(code_use, type = "gt")|
Database name
|
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Eunomia Synpuf
|
||||||||||||
| Codelist name | Age group | Standard concept name | Standard concept ID | Source concept name | Source concept ID | Source concept value | Type concept id | Type concept name | Domain ID | Table |
Estimate name
|
|
| Record count | Person count | |||||||||||
| depression | overall | overall | – | NA | NA | NA | NA | NA | NA | NA | 92 | 58 |
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 15 | 14 | ||
| Major depressive affective disorder, recurrent episode, severe, without mention of psychotic behavior | 44835785 | 29633 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 13 | 12 | ||||
| Recurrent major depressive episodes, mild | 438998 | Major depressive affective disorder, recurrent episode, mild | 44829923 | 29631 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 5 | 5 | ||
| Recurrent major depressive episodes, severe, with psychosis | 434911 | Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior | 44827655 | 29634 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 4 | 4 | ||
| Arteriosclerotic dementia with depression | 374326 | Vascular dementia, with depressed mood | 44829914 | 29043 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 3 | 2 | ||
| Severe major depression, single episode, with psychotic features | 438406 | Major depressive affective disorder, single episode, severe, specified as with psychotic behavior | 44820717 | 29624 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 3 | 3 | ||
| Bipolar affective disorder, currently depressed, in full remission | 439251 | Bipolar I disorder, most recent episode (or current) depressed, in full remission | 44822977 | 29656 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 3 | 3 | ||
| Recurrent major depressive episodes | 432285 | Major depressive affective disorder, recurrent episode, unspecified | 44831089 | 29630 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 3 | 2 | ||
| Severe major depression, single episode, without psychotic features | 441534 | Major depressive affective disorder, single episode, severe, without mention of psychotic behavior | 44835784 | 29623 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 3 | 3 | ||
| Recurrent major depressive episodes, severe, with psychosis | 434911 | Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior | 44827655 | 29634 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 2 | 2 | ||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 2 | 2 | ||
| Recurrent major depressive episodes, severe, with psychosis | 434911 | Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior | 44827655 | 29634 | 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 2 | 2 | ||
| Recurrent major depressive episodes | 432285 | Major depressive affective disorder, recurrent episode, unspecified | 44831089 | 29630 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 2 | 2 | ||
| Recurrent major depressive episodes, severe, with psychosis | 434911 | Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior | 44827655 | 29634 | 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 2 | 2 | ||
| Presenile dementia with depression | 377527 | Presenile dementia with depressive features | 44836954 | 29013 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 2 | 2 | ||
| Senile dementia with depression | 379784 | Senile dementia with depressive features | 44819534 | 29021 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 2 | 2 | ||
| Recurrent major depressive episodes, severe, with psychosis | 434911 | Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior | 44827655 | 29634 | 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 2 | 2 | ||
| Severe major depression, single episode, without psychotic features | 441534 | Major depressive affective disorder, single episode, severe, without mention of psychotic behavior | 44835784 | 29623 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 38000234 | Outpatient header - 5th position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes | 432285 | Major depressive affective disorder, recurrent episode, unspecified | 44831089 | 29630 | 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 1 | 1 | ||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 1 | 1 | |||||||
| Bipolar affective disorder, currently depressed, mild | 439253 | Bipolar I disorder, most recent episode (or current) depressed, mild | 44826500 | 29651 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Severe bipolar II disorder, most recent episode major depressive, in partial remission | 4283219 | Bipolar I disorder, most recent episode (or current) depressed, in partial or unspecified remission | 44820721 | 29655 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, severe, without mention of psychotic behavior | 44835785 | 29633 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Senile dementia with depression | 379784 | Senile dementia with depressive features | 44819534 | 29021 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes | 432285 | Major depressive affective disorder, recurrent episode, unspecified | 44831089 | 29630 | 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes, mild | 438998 | Major depressive affective disorder, recurrent episode, mild | 44829923 | 29631 | 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 1 | 1 | ||
| Bipolar affective disorder, currently depressed, moderate | 437528 | Bipolar I disorder, most recent episode (or current) depressed, moderate | 44835786 | 29652 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes, mild | 438998 | Major depressive affective disorder, recurrent episode, mild | 44829923 | 29631 | 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | ||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 1 | |||||||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes, severe, with psychosis | 434911 | Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior | 44827655 | 29634 | 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 1 | 1 | ||
| Severe major depression, single episode, without psychotic features | 441534 | Major depressive affective disorder, single episode, severe, without mention of psychotic behavior | 44835784 | 29623 | 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 1 | 1 | ||
| Arteriosclerotic dementia with depression | 374326 | Vascular dementia, with depressed mood | 44829914 | 29043 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Presenile dementia with depression | 377527 | Presenile dementia with depressive features | 44836954 | 29013 | 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | ||
| Bipolar affective disorder, currently depressed, moderate | 437528 | Bipolar I disorder, most recent episode (or current) depressed, moderate | 44835786 | 29652 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, severe, without mention of psychotic behavior | 44835785 | 29633 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Bipolar affective disorder, currently depressed, mild | 439253 | Bipolar I disorder, most recent episode (or current) depressed, mild | 44826500 | 29651 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 45756848 | Carrier claim detail - 6th position | condition | condition_occurrence | 1 | 1 | ||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 1 | 1 | |||||||
| >50 | overall | – | NA | NA | NA | NA | NA | NA | NA | 82 | 51 | |
| <=50 | overall | – | NA | NA | NA | NA | NA | NA | NA | 10 | 7 | |
| >50 | Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 12 | 12 | |
| Major depressive affective disorder, recurrent episode, severe, without mention of psychotic behavior | 44835785 | 29633 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 11 | 10 | ||||
| Recurrent major depressive episodes, mild | 438998 | Major depressive affective disorder, recurrent episode, mild | 44829923 | 29631 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 5 | 5 | ||
| Recurrent major depressive episodes, severe, with psychosis | 434911 | Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior | 44827655 | 29634 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 4 | 4 | ||
| Severe major depression, single episode, with psychotic features | 438406 | Major depressive affective disorder, single episode, severe, specified as with psychotic behavior | 44820717 | 29624 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 3 | 3 | ||
| Severe major depression, single episode, without psychotic features | 441534 | Major depressive affective disorder, single episode, severe, without mention of psychotic behavior | 44835784 | 29623 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 3 | 3 | ||
| <=50 | Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 3 | 2 | |
| >50 | Recurrent major depressive episodes | 432285 | Major depressive affective disorder, recurrent episode, unspecified | 44831089 | 29630 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 3 | 2 | |
| Recurrent major depressive episodes, severe, with psychosis | 434911 | Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior | 44827655 | 29634 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 2 | 2 | ||
| Presenile dementia with depression | 377527 | Presenile dementia with depressive features | 44836954 | 29013 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 2 | 2 | ||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 2 | 2 | ||
| <=50 | Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, severe, without mention of psychotic behavior | 44835785 | 29633 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 2 | 2 | |
| >50 | Bipolar affective disorder, currently depressed, in full remission | 439251 | Bipolar I disorder, most recent episode (or current) depressed, in full remission | 44822977 | 29656 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 2 | 2 | |
| Recurrent major depressive episodes | 432285 | Major depressive affective disorder, recurrent episode, unspecified | 44831089 | 29630 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 2 | 2 | ||
| Senile dementia with depression | 379784 | Senile dementia with depressive features | 44819534 | 29021 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 2 | 2 | ||
| <=50 | Arteriosclerotic dementia with depression | 374326 | Vascular dementia, with depressed mood | 44829914 | 29043 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 2 | 1 | |
| >50 | Recurrent major depressive episodes, severe, with psychosis | 434911 | Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior | 44827655 | 29634 | 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 2 | 2 | |
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 2 | 2 | |||||||
| Senile dementia with depression | 379784 | Senile dementia with depressive features | 44819534 | 29021 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Severe bipolar II disorder, most recent episode major depressive, in partial remission | 4283219 | Bipolar I disorder, most recent episode (or current) depressed, in partial or unspecified remission | 44820721 | 29655 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Severe major depression, single episode, without psychotic features | 441534 | Major depressive affective disorder, single episode, severe, without mention of psychotic behavior | 44835784 | 29623 | 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 1 | 1 | ||
| <=50 | Severe major depression, single episode, without psychotic features | 441534 | Major depressive affective disorder, single episode, severe, without mention of psychotic behavior | 44835784 | 29623 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 1 | 1 | |
| >50 | Presenile dementia with depression | 377527 | Presenile dementia with depressive features | 44836954 | 29013 | 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | |
| Recurrent major depressive episodes, mild | 438998 | Major depressive affective disorder, recurrent episode, mild | 44829923 | 29631 | 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 1 | 1 | ||
| Bipolar affective disorder, currently depressed, moderate | 437528 | Bipolar I disorder, most recent episode (or current) depressed, moderate | 44835786 | 29652 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes | 432285 | Major depressive affective disorder, recurrent episode, unspecified | 44831089 | 29630 | 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | ||
| Major depressive affective disorder, recurrent episode, severe, without mention of psychotic behavior | 44835785 | 29633 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | ||||
| Recurrent major depressive episodes, mild | 438998 | Major depressive affective disorder, recurrent episode, mild | 44829923 | 29631 | 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, severe, without mention of psychotic behavior | 44835785 | 29633 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 1 | 1 | ||||
| Bipolar affective disorder, currently depressed, mild | 439253 | Bipolar I disorder, most recent episode (or current) depressed, mild | 44826500 | 29651 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Arteriosclerotic dementia with depression | 374326 | Vascular dementia, with depressed mood | 44829914 | 29043 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 38000234 | Outpatient header - 5th position | condition | condition_occurrence | 1 | 1 | ||
| <=50 | Bipolar affective disorder, currently depressed, in full remission | 439251 | Bipolar I disorder, most recent episode (or current) depressed, in full remission | 44822977 | 29656 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 1 | 1 | |
| >50 | Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 45756848 | Carrier claim detail - 6th position | condition | condition_occurrence | 1 | 1 | |
| <=50 | Recurrent major depressive episodes | 432285 | Major depressive affective disorder, recurrent episode, unspecified | 44831089 | 29630 | 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | |
| >50 | Bipolar affective disorder, currently depressed, moderate | 437528 | Bipolar I disorder, most recent episode (or current) depressed, moderate | 44835786 | 29652 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 1 | 1 | |
| Bipolar affective disorder, currently depressed, mild | 439253 | Bipolar I disorder, most recent episode (or current) depressed, mild | 44826500 | 29651 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Arteriosclerotic dementia with depression | 374326 | Vascular dementia, with depressed mood | 44829914 | 29043 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes, mild | 438998 | Major depressive affective disorder, recurrent episode, mild | 44829923 | 29631 | 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes, severe, with psychosis | 434911 | Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior | 44827655 | 29634 | 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 1 | 1 | ||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 1 | 1 | ||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 1 | 1 | |||||||
Identify orphan codes
Orphan codes are concepts that might be related to our codelist but that have not been included. It can be used to ensure that we have not missed any important concepts. Notice that this function uses ACHILLES tables.
summariseOrphanCodes() will look for descendants (via
concept_descendants table), ancestors (via
concept_ancestor table), and concepts related to the codes
included in the codelist (via concept_relationship table).
Additionally, if the cdm contains PHOEBE tables
(concept_recommended table), they will also be used.
orphan <- summariseOrphanCodes(depression, cdm)
tableOrphanCodes(orphan, type = "gt")|
Database name
|
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
Eunomia Synpuf
|
||||||||||
| Codelist name | Domain ID | Standard concept name | Standard concept ID | Vocabulary ID | Source concept name | Source concept ID | Source concept value | Relationship |
Estimate name
|
|
| Record count | Person count | |||||||||
| depression | condition | Electrocardiogram abnormal | 320536 | SNOMED | overall | overall | overall | Ancestor, Subsumes | 106 | 95 |
| Disorder of brain | 372887 | SNOMED | Other conditions of brain | 44831134 | 3488 | Ancestor, Subsumes | 82 | 61 | ||
| 44819597 | 34889 | Ancestor, Subsumes | 82 | 61 | ||||||
| Encephalopathy, unspecified | 44819596 | 34830 | Ancestor, Subsumes | 82 | 61 | |||||
| Other encephalopathy | 44821858 | 34839 | Ancestor, Subsumes | 82 | 61 | |||||
| Encephalopathy, not elsewhere classified | 44831133 | 3483 | Ancestor, Subsumes | 82 | 61 | |||||
| Central nervous system complication | 373087 | SNOMED | Nervous system complication, unspecified | 44836490 | 99700 | Ancestor, Subsumes | 3 | 3 | ||
| Other nervous system complications | 44826034 | 99709 | Ancestor, Subsumes | 3 | 3 | |||||
| Central nervous system complication | 44824849 | 99701 | Ancestor, Subsumes | 3 | 3 | |||||
| Disorder of the central nervous system | 376106 | SNOMED | Other symptoms involving nervous and musculoskeletal systems | 44837428 | 7819 | Ancestor, Subsumes | 19 | 17 | ||
| Unspecified condition of brain | 44832282 | 3489 | Ancestor, Subsumes | 19 | 17 | |||||
| Presenile dementia | 378125 | SNOMED | Presenile dementia with delusional features | 44834581 | 29012 | Ancestor, Subsumes, Is a | 13 | 12 | ||
| Cerebrovascular disease | 381591 | SNOMED | Other ill-defined cerebrovascular disease | 44833578 | 4378 | Due to of, Has due to | 47 | 44 | ||
| Unspecified cerebrovascular disease | 44827802 | 4379 | Due to of, Has due to | 47 | 44 | |||||
| Emotional state finding | 4025215 | SNOMED | Other signs and symptoms involving emotional state | 44820076 | 79929 | Ancestor, Subsumes | 4 | 4 | ||
| General finding of observation of patient | 4041283 | SNOMED | overall | overall | overall | Ancestor, Subsumes | 4 | 4 | ||
| Mental disorders during pregnancy, childbirth and the puerperium | 4060424 | SNOMED | Mental disorders of mother, postpartum condition or complication | 44836085 | 64844 | Ancestor, Subsumes | 1 | 1 | ||
| procedure | Surgical procedure | 4301351 | SNOMED | overall | overall | overall | Occurs before, Follows | 2 | 2 | |
| condition | Single major depressive episode | 432284 | SNOMED | Major depressive affective disorder, single episode, in partial or unspecified remission | 44822976 | 29625 | Subsumes, Is a, Concept same_as to, Maps to | 64 | 45 | |
| Major depressive affective disorder, single episode, unspecified | 44822975 | 29620 | Subsumes, Is a, Concept same_as to, Maps to | 64 | 45 | |||||
| Bipolar I disorder | 432876 | SNOMED | Bipolar I disorder, most recent episode (or current) unspecified | 44827657 | 2967 | Ancestor, Subsumes | 28 | 22 | ||
| Single major depressive episode, in full remission | 433750 | SNOMED | Major depressive affective disorder, single episode, in full remission | 44832232 | 29626 | Concept same_as to, Maps to | 7 | 7 | ||
| Schizophrenia | 435783 | SNOMED | Unspecified schizophrenia, unspecified | 44829921 | 29590 | Occurs before, Follows | 52 | 42 | ||
| Other specified types of schizophrenia, unspecified | 44831085 | 29580 | Occurs before, Follows | 52 | 42 | |||||
| Psychotic disorder | 436073 | SNOMED | Unspecified psychosis | 44832238 | 2989 | Ancestor, Subsumes | 110 | 79 | ||
| Bipolar disorder | 436665 | SNOMED | Other bipolar disorders | 44829925 | 29689 | Ancestor, Subsumes | 129 | 83 | ||
| Bipolar disorder, unspecified | 44822981 | 29680 | Ancestor, Subsumes | 129 | 83 | |||||
| Single major depressive episode, mild | 436945 | SNOMED | Major depressive affective disorder, single episode, mild | 44824114 | 29621 | Concept same_as to, Maps to | 14 | 12 | ||
| Single major depressive episode, moderate | 437837 | SNOMED | Major depressive affective disorder, single episode, moderate | 44827654 | 29622 | Concept same_as to, Maps to | 27 | 24 | ||
| Atypical depressive disorder | 438727 | SNOMED | Atypical depressive disorder | 44832235 | 29682 | Ancestor, Subsumes | 9 | 9 | ||
| Viral disease | 440029 | SNOMED | Unspecified viral infection | 44822836 | 07999 | Follows, Occurs before | 25 | 20 | ||
| Unspecified viral and chlamydial infection in conditions classified elsewhere and of unspecified site | 44834444 | 0799 | Follows, Occurs before | 25 | 20 | |||||
| Recurrent major depressive episodes, in full remission | 440075 | SNOMED | Major depressive affective disorder, recurrent episode, in full remission | 44827656 | 29636 | Is a, Concept same_as to, Maps to, Subsumes | 32 | 20 | ||
| Major depressive affective disorder, recurrent episode, in partial or unspecified remission | 44834589 | 29635 | Is a, Concept same_as to, Maps to, Subsumes | 32 | 20 | |||||
| Depressive disorder | 440383 | SNOMED | Depressive disorder, not elsewhere classified | 44833421 | 311 | Ancestor, Subsumes | 440 | 288 | ||
| Anxiety disorder | 442077 | SNOMED | Anxiety state, unspecified | 44832239 | 30000 | Ancestor, Subsumes | 257 | 189 | ||
| Other anxiety states | 44831093 | 30009 | Ancestor, Subsumes | 257 | 189 | |||||
Run diagnostics within a cohort
You can also evaluate how the codelist is used within a specific
cohort. First, we will define a cohort using the
conceptCohort() function from CohortConstructor
package.
cdm[["depression"]] <- conceptCohort(cdm,
conceptSet = depression,
name = "depression")Then, we can summarise the code use within this cohort:
cohort_code_use <- summariseCohortCodeUse(cdm,
cohortTable = "depression",
countBy = c("record", "person"))
tableCohortCodeUse(cohort_code_use)|
Database name
|
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Eunomia Synpuf
|
||||||||||||
| Cohort name | Codelist name | Standard concept name | Standard concept ID | Source concept name | Source concept ID | Source concept value | Type concept id | Type concept name | Domain ID | Table |
Estimate name
|
|
| Person count | Record count | |||||||||||
| depression | depression | Arteriosclerotic dementia with depression | 374326 | Vascular dementia, with depressed mood | 44829914 | 29043 | 38000204 | Inpatient header - 5th position | condition | condition_occurrence | 1 | 1 |
| 38000238 | Outpatient header - 9th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 5 | 5 | |||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756838 | Carrier claim header - 4th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 5 | 6 | |||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 1 | 1 | |||||||
| Bipolar affective disorder, currently depressed, in full remission | 439251 | Bipolar I disorder, most recent episode (or current) depressed, in full remission | 44822977 | 29656 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 2 | 2 | ||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 11 | 11 | |||||||
| Bipolar affective disorder, currently depressed, mild | 439253 | Bipolar I disorder, most recent episode (or current) depressed, mild | 44826500 | 29651 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 12 | 12 | |||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 2 | 2 | |||||||
| Bipolar affective disorder, currently depressed, moderate | 437528 | Bipolar I disorder, most recent episode (or current) depressed, moderate | 44835786 | 29652 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 8 | 8 | ||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 3 | |||||||
| Presenile dementia with depression | 377527 | Presenile dementia with depressive features | 44836954 | 29013 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 8 | 8 | ||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 1 | |||||||
| Recurrent major depressive episodes | 432285 | Major depressive affective disorder, recurrent episode, unspecified | 44831089 | 29630 | 38000206 | Inpatient header - 7th position | condition | condition_occurrence | 1 | 1 | ||
| 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | |||||||
| 38000232 | Outpatient header - 3rd position | condition | condition_occurrence | 1 | 1 | |||||||
| 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 11 | 11 | |||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 6 | 6 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 21 | 23 | |||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756848 | Carrier claim detail - 6th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756849 | Carrier claim detail - 7th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756850 | Carrier claim detail - 8th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756851 | Carrier claim detail - 9th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756852 | Carrier claim detail - 10th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756853 | Carrier claim detail - 11th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756854 | Carrier claim detail - 12th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756855 | Carrier claim detail - 13th position | condition | condition_occurrence | 1 | 1 | |||||||
| Recurrent major depressive episodes, mild | 438998 | Major depressive affective disorder, recurrent episode, mild | 44829923 | 29631 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 12 | 12 | |||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 10 | 11 | |||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 1 | 1 | |||||||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| 38000234 | Outpatient header - 5th position | condition | condition_occurrence | 1 | 1 | |||||||
| 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 6 | 6 | |||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 4 | 4 | |||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 37 | 47 | |||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 8 | 9 | |||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 4 | 5 | |||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 2 | 3 | |||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 2 | 3 | |||||||
| 45756848 | Carrier claim detail - 6th position | condition | condition_occurrence | 2 | 3 | |||||||
| 45756849 | Carrier claim detail - 7th position | condition | condition_occurrence | 1 | 1 | |||||||
| Major depressive affective disorder, recurrent episode, severe, without mention of psychotic behavior | 44835785 | 29633 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 2 | 2 | ||||
| 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 8 | 8 | |||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756838 | Carrier claim header - 4th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756840 | Carrier claim header - 6th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 43 | 60 | |||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 10 | 10 | |||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 8 | 8 | |||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 7 | 7 | |||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 6 | 6 | |||||||
| 45756848 | Carrier claim detail - 6th position | condition | condition_occurrence | 3 | 3 | |||||||
| 45756849 | Carrier claim detail - 7th position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756850 | Carrier claim detail - 8th position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756851 | Carrier claim detail - 9th position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756852 | Carrier claim detail - 10th position | condition | condition_occurrence | 2 | 2 | |||||||
| Recurrent major depressive episodes, severe, with psychosis | 434911 | Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior | 44827655 | 29634 | 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 1 | 1 | ||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 9 | 9 | |||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 22 | 26 | |||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 7 | 8 | |||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 6 | 7 | |||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 4 | 5 | |||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 3 | 4 | |||||||
| Senile dementia with depression | 379784 | Senile dementia with depressive features | 44819534 | 29021 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 5 | 5 | ||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 12 | 14 | |||||||
| Severe bipolar II disorder, most recent episode major depressive, in partial remission | 4283219 | Bipolar I disorder, most recent episode (or current) depressed, in partial or unspecified remission | 44820721 | 29655 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 7 | 7 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 2 | 2 | |||||||
| Severe major depression, single episode, with psychotic features | 438406 | Major depressive affective disorder, single episode, severe, specified as with psychotic behavior | 44820717 | 29624 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 8 | 9 | |||||||
| Severe major depression, single episode, without psychotic features | 441534 | Major depressive affective disorder, single episode, severe, without mention of psychotic behavior | 44835784 | 29623 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 6 | 6 | ||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756838 | Carrier claim header - 4th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 11 | 15 | |||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| overall | – | NA | NA | NA | NA | NA | NA | NA | 182 | 486 | ||
Summarise code use at cohort entry
Use the timing argument to restrict diagnostics to codes
used at the entry date of the cohort.
cohort_code_use <- summariseCohortCodeUse(cdm,
cohortTable = "depression",
countBy = c("record", "person"),
timing = "entry")
tableCohortCodeUse(cohort_code_use)|
Database name
|
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Eunomia Synpuf
|
||||||||||||
| Cohort name | Codelist name | Standard concept name | Standard concept ID | Source concept name | Source concept ID | Source concept value | Type concept id | Type concept name | Domain ID | Table |
Estimate name
|
|
| Person count | Record count | |||||||||||
| depression | depression | Arteriosclerotic dementia with depression | 374326 | Vascular dementia, with depressed mood | 44829914 | 29043 | 38000204 | Inpatient header - 5th position | condition | condition_occurrence | 1 | 1 |
| 38000238 | Outpatient header - 9th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 5 | 5 | |||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756838 | Carrier claim header - 4th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 5 | 6 | |||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 1 | 1 | |||||||
| Bipolar affective disorder, currently depressed, in full remission | 439251 | Bipolar I disorder, most recent episode (or current) depressed, in full remission | 44822977 | 29656 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 2 | 2 | ||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 11 | 11 | |||||||
| Bipolar affective disorder, currently depressed, mild | 439253 | Bipolar I disorder, most recent episode (or current) depressed, mild | 44826500 | 29651 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 12 | 12 | |||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 2 | 2 | |||||||
| Bipolar affective disorder, currently depressed, moderate | 437528 | Bipolar I disorder, most recent episode (or current) depressed, moderate | 44835786 | 29652 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 8 | 8 | ||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 3 | |||||||
| Presenile dementia with depression | 377527 | Presenile dementia with depressive features | 44836954 | 29013 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 8 | 8 | ||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 1 | |||||||
| Recurrent major depressive episodes | 432285 | Major depressive affective disorder, recurrent episode, unspecified | 44831089 | 29630 | 38000206 | Inpatient header - 7th position | condition | condition_occurrence | 1 | 1 | ||
| 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | |||||||
| 38000232 | Outpatient header - 3rd position | condition | condition_occurrence | 1 | 1 | |||||||
| 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 11 | 11 | |||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 6 | 6 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 21 | 23 | |||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756848 | Carrier claim detail - 6th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756849 | Carrier claim detail - 7th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756850 | Carrier claim detail - 8th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756851 | Carrier claim detail - 9th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756852 | Carrier claim detail - 10th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756853 | Carrier claim detail - 11th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756854 | Carrier claim detail - 12th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756855 | Carrier claim detail - 13th position | condition | condition_occurrence | 1 | 1 | |||||||
| Recurrent major depressive episodes, mild | 438998 | Major depressive affective disorder, recurrent episode, mild | 44829923 | 29631 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 12 | 12 | |||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 10 | 11 | |||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 1 | 1 | |||||||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| 38000234 | Outpatient header - 5th position | condition | condition_occurrence | 1 | 1 | |||||||
| 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 6 | 6 | |||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 4 | 4 | |||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 37 | 47 | |||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 8 | 9 | |||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 4 | 5 | |||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 2 | 3 | |||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 2 | 3 | |||||||
| 45756848 | Carrier claim detail - 6th position | condition | condition_occurrence | 2 | 3 | |||||||
| 45756849 | Carrier claim detail - 7th position | condition | condition_occurrence | 1 | 1 | |||||||
| Major depressive affective disorder, recurrent episode, severe, without mention of psychotic behavior | 44835785 | 29633 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 2 | 2 | ||||
| 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 8 | 8 | |||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756838 | Carrier claim header - 4th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756840 | Carrier claim header - 6th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 43 | 60 | |||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 10 | 10 | |||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 8 | 8 | |||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 7 | 7 | |||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 6 | 6 | |||||||
| 45756848 | Carrier claim detail - 6th position | condition | condition_occurrence | 3 | 3 | |||||||
| 45756849 | Carrier claim detail - 7th position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756850 | Carrier claim detail - 8th position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756851 | Carrier claim detail - 9th position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756852 | Carrier claim detail - 10th position | condition | condition_occurrence | 2 | 2 | |||||||
| Recurrent major depressive episodes, severe, with psychosis | 434911 | Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior | 44827655 | 29634 | 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 1 | 1 | ||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 9 | 9 | |||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 22 | 26 | |||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 7 | 8 | |||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 6 | 7 | |||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 4 | 5 | |||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 3 | 4 | |||||||
| Senile dementia with depression | 379784 | Senile dementia with depressive features | 44819534 | 29021 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 5 | 5 | ||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 12 | 14 | |||||||
| Severe bipolar II disorder, most recent episode major depressive, in partial remission | 4283219 | Bipolar I disorder, most recent episode (or current) depressed, in partial or unspecified remission | 44820721 | 29655 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 7 | 7 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 2 | 2 | |||||||
| Severe major depression, single episode, with psychotic features | 438406 | Major depressive affective disorder, single episode, severe, specified as with psychotic behavior | 44820717 | 29624 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | ||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 8 | 9 | |||||||
| Severe major depression, single episode, without psychotic features | 441534 | Major depressive affective disorder, single episode, severe, without mention of psychotic behavior | 44835784 | 29623 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 6 | 6 | ||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756838 | Carrier claim header - 4th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 11 | 15 | |||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | |||||||
| overall | – | NA | NA | NA | NA | NA | NA | NA | 182 | 486 | ||
Cohort code use with a different codelist
By default we’ll get cohort code use for the codes that were used for creating the cohort. But we could change this to another cohort. Here we’d get counts for anxiety codes that occur on the same day as entry into the depression cohort.
anxiety <- getCandidateCodes(cdm,
keywords = "anxiety")
anxiety <- newCodelist(list("anxiety" = anxiety$concept_id))
cohort_code_use <- summariseCohortCodeUse(cdm,
cohortTable = "depression",
x = anxiety,
countBy = c("record", "person"),
timing = "entry")
tableCohortCodeUse(cohort_code_use)|
Database name
|
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Eunomia Synpuf
|
||||||||||||
| Cohort name | Codelist name | Standard concept name | Standard concept ID | Source concept name | Source concept ID | Source concept value | Type concept id | Type concept name | Domain ID | Table |
Estimate name
|
|
| Person count | Record count | |||||||||||
| depression | anxiety | Acute stress disorder | 440083 | Other acute reactions to stress | 44820738 | 3083 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 1 | 1 |
| Unspecified acute reaction to stress | 44819559 | 3089 | 38000232 | Outpatient header - 3rd position | condition | condition_occurrence | 1 | 1 | ||||
| Anxiety disorder | 442077 | Anxiety state, unspecified | 44832239 | 30000 | 38000231 | Outpatient header - 2nd position | condition | condition_occurrence | 1 | 1 | ||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 4 | 4 | |||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756838 | Carrier claim header - 4th position | condition | condition_occurrence | 1 | 1 | |||||||
| Generalized anxiety disorder | 434613 | Generalized anxiety disorder | 44829926 | 30002 | 38000233 | Outpatient header - 4th position | condition | condition_occurrence | 1 | 1 | ||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 2 | 2 | |||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 3 | 3 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 1 | |||||||
| Obsessive-compulsive disorder | 440374 | Obsessive-compulsive disorders | 44822985 | 3003 | 38000236 | Outpatient header - 7th position | condition | condition_occurrence | 1 | 1 | ||
| Panic disorder without agoraphobia | 4211231 | Panic disorder without agoraphobia | 44826503 | 30001 | 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | ||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 1 | 1 | |||||||
| Posttraumatic stress disorder | 436676 | Posttraumatic stress disorder | 44836990 | 30981 | 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 3 | 3 | ||
| 45756838 | Carrier claim header - 4th position | condition | condition_occurrence | 1 | 1 | |||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 2 | 2 | |||||||
| overall | – | NA | NA | NA | NA | NA | NA | NA | 20 | 25 | ||
Stratify cohort code use
You can also stratify cohort code use results by year
(byYear), by sex (bySex), or by age group
(byAgeGroup):
cohort_code_use <- summariseCohortCodeUse(cdm = cdm,
cohortTable = "depression",
countBy = c("record", "person"),
byYear = FALSE,
bySex = TRUE,
ageGroup = NULL)
tableCohortCodeUse(cohort_code_use)|
Database name
|
|||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Eunomia Synpuf
|
|||||||||||||
| Cohort name | Codelist name | Sex | Standard concept name | Standard concept ID | Source concept name | Source concept ID | Source concept value | Type concept id | Type concept name | Domain ID | Table |
Estimate name
|
|
| Person count | Record count | ||||||||||||
| depression | depression | overall | Arteriosclerotic dementia with depression | 374326 | Vascular dementia, with depressed mood | 44829914 | 29043 | 38000204 | Inpatient header - 5th position | condition | condition_occurrence | 1 | 1 |
| 38000238 | Outpatient header - 9th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 5 | 5 | ||||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756838 | Carrier claim header - 4th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 5 | 6 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 1 | 1 | ||||||||
| Bipolar affective disorder, currently depressed, in full remission | 439251 | Bipolar I disorder, most recent episode (or current) depressed, in full remission | 44822977 | 29656 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 2 | 2 | |||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 11 | 11 | ||||||||
| Bipolar affective disorder, currently depressed, mild | 439253 | Bipolar I disorder, most recent episode (or current) depressed, mild | 44826500 | 29651 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | |||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 12 | 12 | ||||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 2 | 2 | ||||||||
| Bipolar affective disorder, currently depressed, moderate | 437528 | Bipolar I disorder, most recent episode (or current) depressed, moderate | 44835786 | 29652 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 8 | 8 | |||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 3 | ||||||||
| Presenile dementia with depression | 377527 | Presenile dementia with depressive features | 44836954 | 29013 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 8 | 8 | |||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 1 | ||||||||
| Recurrent major depressive episodes | 432285 | Major depressive affective disorder, recurrent episode, unspecified | 44831089 | 29630 | 38000206 | Inpatient header - 7th position | condition | condition_occurrence | 1 | 1 | |||
| 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | ||||||||
| 38000232 | Outpatient header - 3rd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 11 | 11 | ||||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 6 | 6 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 21 | 23 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756848 | Carrier claim detail - 6th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756849 | Carrier claim detail - 7th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756850 | Carrier claim detail - 8th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756851 | Carrier claim detail - 9th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756852 | Carrier claim detail - 10th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756853 | Carrier claim detail - 11th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756854 | Carrier claim detail - 12th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756855 | Carrier claim detail - 13th position | condition | condition_occurrence | 1 | 1 | ||||||||
| Recurrent major depressive episodes, mild | 438998 | Major depressive affective disorder, recurrent episode, mild | 44829923 | 29631 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | |||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 12 | 12 | ||||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 10 | 11 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 1 | 1 | ||||||||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | |||
| 38000234 | Outpatient header - 5th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 6 | 6 | ||||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 4 | 4 | ||||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 37 | 47 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 8 | 9 | ||||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 4 | 5 | ||||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 2 | 3 | ||||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 2 | 3 | ||||||||
| 45756848 | Carrier claim detail - 6th position | condition | condition_occurrence | 2 | 3 | ||||||||
| 45756849 | Carrier claim detail - 7th position | condition | condition_occurrence | 1 | 1 | ||||||||
| Major depressive affective disorder, recurrent episode, severe, without mention of psychotic behavior | 44835785 | 29633 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 2 | 2 | |||||
| 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 8 | 8 | ||||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756838 | Carrier claim header - 4th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756840 | Carrier claim header - 6th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 43 | 60 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 10 | 10 | ||||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 8 | 8 | ||||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 7 | 7 | ||||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 6 | 6 | ||||||||
| 45756848 | Carrier claim detail - 6th position | condition | condition_occurrence | 3 | 3 | ||||||||
| 45756849 | Carrier claim detail - 7th position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756850 | Carrier claim detail - 8th position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756851 | Carrier claim detail - 9th position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756852 | Carrier claim detail - 10th position | condition | condition_occurrence | 2 | 2 | ||||||||
| Recurrent major depressive episodes, severe, with psychosis | 434911 | Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior | 44827655 | 29634 | 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 1 | 1 | |||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 9 | 9 | ||||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 22 | 26 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 7 | 8 | ||||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 6 | 7 | ||||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 4 | 5 | ||||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 3 | 4 | ||||||||
| Senile dementia with depression | 379784 | Senile dementia with depressive features | 44819534 | 29021 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 5 | 5 | |||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 12 | 14 | ||||||||
| Severe bipolar II disorder, most recent episode major depressive, in partial remission | 4283219 | Bipolar I disorder, most recent episode (or current) depressed, in partial or unspecified remission | 44820721 | 29655 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | |||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 7 | 7 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 2 | 2 | ||||||||
| Severe major depression, single episode, with psychotic features | 438406 | Major depressive affective disorder, single episode, severe, specified as with psychotic behavior | 44820717 | 29624 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | |||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 8 | 9 | ||||||||
| Severe major depression, single episode, without psychotic features | 441534 | Major depressive affective disorder, single episode, severe, without mention of psychotic behavior | 44835784 | 29623 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 6 | 6 | |||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756838 | Carrier claim header - 4th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 11 | 15 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| overall | – | NA | NA | NA | NA | NA | NA | NA | 182 | 486 | |||
| Female | Arteriosclerotic dementia with depression | 374326 | Vascular dementia, with depressed mood | 44829914 | 29043 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 2 | 2 | ||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 3 | 4 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 1 | 1 | ||||||||
| Bipolar affective disorder, currently depressed, in full remission | 439251 | Bipolar I disorder, most recent episode (or current) depressed, in full remission | 44822977 | 29656 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 7 | 7 | |||
| Bipolar affective disorder, currently depressed, mild | 439253 | Bipolar I disorder, most recent episode (or current) depressed, mild | 44826500 | 29651 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | |||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 3 | 3 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 1 | ||||||||
| Bipolar affective disorder, currently depressed, moderate | 437528 | Bipolar I disorder, most recent episode (or current) depressed, moderate | 44835786 | 29652 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 5 | 5 | |||
| Presenile dementia with depression | 377527 | Presenile dementia with depressive features | 44836954 | 29013 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 2 | 2 | |||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| Recurrent major depressive episodes | 432285 | Major depressive affective disorder, recurrent episode, unspecified | 44831089 | 29630 | 38000206 | Inpatient header - 7th position | condition | condition_occurrence | 1 | 1 | |||
| 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | ||||||||
| 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 6 | 6 | ||||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 3 | 3 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 14 | 16 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 1 | 1 | ||||||||
| Recurrent major depressive episodes, mild | 438998 | Major depressive affective disorder, recurrent episode, mild | 44829923 | 29631 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 6 | 6 | |||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 3 | 3 | ||||||||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | |||
| 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 3 | 3 | ||||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 23 | 27 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 5 | 5 | ||||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 3 | 3 | ||||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756848 | Carrier claim detail - 6th position | condition | condition_occurrence | 1 | 1 | ||||||||
| Major depressive affective disorder, recurrent episode, severe, without mention of psychotic behavior | 44835785 | 29633 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | |||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 4 | 4 | ||||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756840 | Carrier claim header - 6th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 19 | 26 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 3 | 3 | ||||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756848 | Carrier claim detail - 6th position | condition | condition_occurrence | 1 | 1 | ||||||||
| Recurrent major depressive episodes, severe, with psychosis | 434911 | Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior | 44827655 | 29634 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 5 | 5 | |||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 11 | 12 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 4 | 4 | ||||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 3 | 3 | ||||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 1 | 1 | ||||||||
| Senile dementia with depression | 379784 | Senile dementia with depressive features | 44819534 | 29021 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 4 | 4 | |||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 5 | 5 | ||||||||
| Severe bipolar II disorder, most recent episode major depressive, in partial remission | 4283219 | Bipolar I disorder, most recent episode (or current) depressed, in partial or unspecified remission | 44820721 | 29655 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | |||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 3 | 3 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 2 | 2 | ||||||||
| Severe major depression, single episode, with psychotic features | 438406 | Major depressive affective disorder, single episode, severe, specified as with psychotic behavior | 44820717 | 29624 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | |||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 5 | 6 | ||||||||
| Severe major depression, single episode, without psychotic features | 441534 | Major depressive affective disorder, single episode, severe, without mention of psychotic behavior | 44835784 | 29623 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 4 | 4 | |||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 9 | 13 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| overall | – | NA | NA | NA | NA | NA | NA | NA | 97 | 228 | |||
| Male | Arteriosclerotic dementia with depression | 374326 | Vascular dementia, with depressed mood | 44829914 | 29043 | 38000204 | Inpatient header - 5th position | condition | condition_occurrence | 1 | 1 | ||
| 38000238 | Outpatient header - 9th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 3 | 3 | ||||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756838 | Carrier claim header - 4th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 2 | 2 | ||||||||
| Bipolar affective disorder, currently depressed, in full remission | 439251 | Bipolar I disorder, most recent episode (or current) depressed, in full remission | 44822977 | 29656 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 2 | 2 | |||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 4 | 4 | ||||||||
| Bipolar affective disorder, currently depressed, mild | 439253 | Bipolar I disorder, most recent episode (or current) depressed, mild | 44826500 | 29651 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 9 | 9 | |||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 1 | ||||||||
| Bipolar affective disorder, currently depressed, moderate | 437528 | Bipolar I disorder, most recent episode (or current) depressed, moderate | 44835786 | 29652 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 3 | 3 | |||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 3 | ||||||||
| Presenile dementia with depression | 377527 | Presenile dementia with depressive features | 44836954 | 29013 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 6 | 6 | |||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 1 | 1 | ||||||||
| Recurrent major depressive episodes | 432285 | Major depressive affective disorder, recurrent episode, unspecified | 44831089 | 29630 | 38000232 | Outpatient header - 3rd position | condition | condition_occurrence | 1 | 1 | |||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 5 | 5 | ||||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 3 | 3 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 7 | 7 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756848 | Carrier claim detail - 6th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756849 | Carrier claim detail - 7th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756850 | Carrier claim detail - 8th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756851 | Carrier claim detail - 9th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756852 | Carrier claim detail - 10th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756853 | Carrier claim detail - 11th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756854 | Carrier claim detail - 12th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756855 | Carrier claim detail - 13th position | condition | condition_occurrence | 1 | 1 | ||||||||
| Recurrent major depressive episodes, mild | 438998 | Major depressive affective disorder, recurrent episode, mild | 44829923 | 29631 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | |||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 6 | 6 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 7 | 8 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 1 | 1 | ||||||||
| Recurrent major depressive episodes, moderate | 432883 | Major depressive affective disorder, recurrent episode, moderate | 44831090 | 29632 | 38000234 | Outpatient header - 5th position | condition | condition_occurrence | 1 | 1 | |||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 3 | 3 | ||||||||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 3 | 3 | ||||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 14 | 20 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 3 | 4 | ||||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 1 | 2 | ||||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 1 | 2 | ||||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 1 | 2 | ||||||||
| 45756848 | Carrier claim detail - 6th position | condition | condition_occurrence | 1 | 2 | ||||||||
| 45756849 | Carrier claim detail - 7th position | condition | condition_occurrence | 1 | 1 | ||||||||
| Major depressive affective disorder, recurrent episode, severe, without mention of psychotic behavior | 44835785 | 29633 | 38000230 | Outpatient header - 1st position | condition | condition_occurrence | 1 | 1 | |||||
| 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 4 | 4 | ||||||||
| 45756837 | Carrier claim header - 3rd position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756838 | Carrier claim header - 4th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 24 | 34 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 7 | 7 | ||||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 6 | 6 | ||||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 5 | 5 | ||||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 5 | 5 | ||||||||
| 45756848 | Carrier claim detail - 6th position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756849 | Carrier claim detail - 7th position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756850 | Carrier claim detail - 8th position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756851 | Carrier claim detail - 9th position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756852 | Carrier claim detail - 10th position | condition | condition_occurrence | 2 | 2 | ||||||||
| Recurrent major depressive episodes, severe, with psychosis | 434911 | Major depressive affective disorder, recurrent episode, severe, specified as with psychotic behavior | 44827655 | 29634 | 38000240 | Outpatient header - 11th position | condition | condition_occurrence | 1 | 1 | |||
| 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 4 | 4 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 11 | 14 | ||||||||
| 45756844 | Carrier claim detail - 2nd position | condition | condition_occurrence | 3 | 4 | ||||||||
| 45756845 | Carrier claim detail - 3rd position | condition | condition_occurrence | 3 | 4 | ||||||||
| 45756846 | Carrier claim detail - 4th position | condition | condition_occurrence | 2 | 3 | ||||||||
| 45756847 | Carrier claim detail - 5th position | condition | condition_occurrence | 2 | 3 | ||||||||
| Senile dementia with depression | 379784 | Senile dementia with depressive features | 44819534 | 29021 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 1 | 1 | |||
| 45756836 | Carrier claim header - 2nd position | condition | condition_occurrence | 2 | 2 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 7 | 9 | ||||||||
| Severe bipolar II disorder, most recent episode major depressive, in partial remission | 4283219 | Bipolar I disorder, most recent episode (or current) depressed, in partial or unspecified remission | 44820721 | 29655 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 4 | 4 | |||
| Severe major depression, single episode, with psychotic features | 438406 | Major depressive affective disorder, single episode, severe, specified as with psychotic behavior | 44820717 | 29624 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 3 | 3 | |||
| Severe major depression, single episode, without psychotic features | 441534 | Major depressive affective disorder, single episode, severe, without mention of psychotic behavior | 44835784 | 29623 | 45756835 | Carrier claim header - 1st position | condition | condition_occurrence | 2 | 2 | |||
| 45756838 | Carrier claim header - 4th position | condition | condition_occurrence | 1 | 1 | ||||||||
| 45756843 | Carrier claim detail - 1st position | condition | condition_occurrence | 2 | 2 | ||||||||
| overall | – | NA | NA | NA | NA | NA | NA | NA | 85 | 258 | |||