2 Introduction

In this vignette, we will explore the OmopSketch functions designed to provide information about the number of counts of concepts in tables. Specifically, there are two key functions that facilitate this, summariseConceptIdCounts() and tableConceptIdCounts(). The former one creates a summary statistics results with the number of counts per each concept in the clinical table, and the latter one displays the result in a table.

2.1 Create a mock cdm

Let’s see an example of the previous functions. To start with, we will load essential packages and create a mock cdm using mockOmopSketch().

library(duckdb)
library(OmopSketch)
library(dplyr)


cdm <- mockOmopSketch()

cdm
#> 
#> ── # OMOP CDM reference (duckdb) of mockOmopSketch ─────────────────────────────
#> • omop tables: person, observation_period, cdm_source, concept, vocabulary,
#> concept_relationship, concept_synonym, concept_ancestor, drug_strength,
#> condition_occurrence, death, drug_exposure, measurement, observation,
#> procedure_occurrence, visit_occurrence, device_exposure
#> • cohort tables: -
#> • achilles tables: -
#> • other tables: -

3 Summarise concept id counts

We now use the summariseConceptIdCounts() function from the OmopSketch package to retrieve counts for each concept id and name, as well as for each source concept id and name, across the clinical tables.

summariseConceptIdCounts(cdm, omopTableName = "drug_exposure") |>
  select(group_level, variable_name, variable_level, estimate_name, estimate_value, additional_name, additional_level) |>
  glimpse()
#> Rows: 216
#> Columns: 7
#> $ group_level      <chr> "drug_exposure", "drug_exposure", "drug_exposure", "d…
#> $ variable_name    <chr> "Diclofenac Sodium 75 MG Delayed Release Oral Tablet"…
#> $ variable_level   <chr> "40162359", "40213227", "40213281", "782043", "111951…
#> $ estimate_name    <chr> "count_records", "count_records", "count_records", "c…
#> $ estimate_value   <chr> "100", "100", "100", "100", "100", "100", "100", "100…
#> $ additional_name  <chr> "source_concept_id &&& source_concept_name", "source_…
#> $ additional_level <chr> "0 &&& No matching concept", "0 &&& No matching conce…

By default, the function returns the number of records (estimate_name == "count_records") for each concept_id. To include counts by person, you can set the countBy argument to "person" or to c("record", "person") to obtain both record and person counts.

summariseConceptIdCounts(cdm,
  omopTableName = "drug_exposure",
  countBy = c("record", "person")
) |>
  select( variable_name, estimate_name, estimate_value) 
#> # A tibble: 432 × 3
#>    variable_name                                    estimate_name estimate_value
#>    <chr>                                            <chr>         <chr>         
#>  1 Diclofenac Sodium 75 MG Delayed Release Oral Ta… count_records 100           
#>  2 Diclofenac Sodium 75 MG Delayed Release Oral Ta… count_subjec… 65            
#>  3 tetanus and diphtheria toxoids, adsorbed, prese… count_records 100           
#>  4 tetanus and diphtheria toxoids, adsorbed, prese… count_subjec… 65            
#>  5 diphtheria, tetanus toxoids and acellular pertu… count_records 100           
#>  6 diphtheria, tetanus toxoids and acellular pertu… count_subjec… 66            
#>  7 Isoflurane                                       count_records 100           
#>  8 Isoflurane                                       count_subjec… 65            
#>  9 Dextromethorphan                                 count_records 100           
#> 10 Dextromethorphan                                 count_subjec… 64            
#> # ℹ 422 more rows

Further stratification can be applied using the interval, sex, and ageGroup arguments. The interval argument supports “overall” (no time stratification), “years”, “quarters”, or “months”.

summariseConceptIdCounts(cdm,
  omopTableName = "condition_occurrence",
  countBy = "person",
  interval = "years",
  sex = TRUE,
  ageGroup = list("<=50" = c(0, 50), ">50" = c(51, Inf))
) |>
  select(group_level, strata_level, variable_name, estimate_name, additional_level) |>
  glimpse()
#> Rows: 17,628
#> Columns: 5
#> $ group_level      <chr> "condition_occurrence", "condition_occurrence", "cond…
#> $ strata_level     <chr> "overall", "overall", "overall", "overall", "overall"…
#> $ variable_name    <chr> "Diverticular disease", "Injury of medial collateral …
#> $ estimate_name    <chr> "count_subjects", "count_subjects", "count_subjects",…
#> $ additional_level <chr> "0 &&& No matching concept", "0 &&& No matching conce…

We can also filter the clinical table to a specific time window by setting the dateRange argument.

summarisedResult <- summariseConceptIdCounts(cdm,
                                             omopTableName = "condition_occurrence",
                                             dateRange = as.Date(c("1990-01-01", "2010-01-01"))) 
summarisedResult |>
  omopgenerics::settings()|>
  glimpse()
#> Rows: 1
#> Columns: 10
#> $ result_id          <int> 1
#> $ result_type        <chr> "summarise_concept_id_counts"
#> $ package_name       <chr> "OmopSketch"
#> $ package_version    <chr> "0.5.1"
#> $ group              <chr> "omop_table"
#> $ strata             <chr> ""
#> $ additional         <chr> "source_concept_id &&& source_concept_name"
#> $ min_cell_count     <chr> "0"
#> $ study_period_end   <chr> "2010-01-01"
#> $ study_period_start <chr> "1990-01-01"

Finally, you can summarise concept counts on a subset of records by specifying the sample argument.

summariseConceptIdCounts(cdm,
                         omopTableName = "condition_occurrence",
                         sample = 50) |>
  select(group_level, variable_name, estimate_name) |>
  glimpse()
#> Rows: 36
#> Columns: 3
#> $ group_level   <chr> "condition_occurrence", "condition_occurrence", "conditi…
#> $ variable_name <chr> "Escherichia coli urinary tract infection", "First degre…
#> $ estimate_name <chr> "count_records", "count_records", "count_records", "coun…

3.1 Display the results

Finally, concept counts can be visualised using tableConceptIdCounts(). By default, it generates an interactive reactable table, but DT datatables are also supported.

result <- summariseConceptIdCounts(cdm,
  omopTableName = "measurement",
  countBy = "record"
) 
tableConceptIdCounts(result, type = "reactable")
Database name
OMOP table
Standard concept name
Standard concept id
Source concept name
Source concept id
N records
mockOmopSketch (1)
measurement (59)
Alanine aminotransferase serum/plasma
3006923
No matching concept
0
100
Albumin serum/plasma
3024561
No matching concept
0
100
Alkaline phosphatase serum/plasma
3035995
No matching concept
0
100
American house dust mite ige ab [units/volume] in serum
3036780
No matching concept
0
100
Anion gap serum/plasma
3045716
No matching concept
0
100
Are you covered by health insurance or some other kind of health care plan [phenx]
40766240
No matching concept
0
100
Aspartate aminotransferase serum/plasma
3013721
No matching concept
0
100
Bilirubin.total [mass/volume] in blood
3028833
No matching concept
0
100
Calcium serum/plasma serum/plasma
3006906
No matching concept
0
100
Carbon dioxide serum/plasma
3015632
No matching concept
0
100
Cat dander ige ab [units/volume] in serum
3023430
No matching concept
0
100
Chloride serum/plasma
3014576
No matching concept
0
100
Cladosporium herbarum ige ab [units/volume] in serum
3005136
No matching concept
0
100
Codfish ige ab [units/volume] in serum
3000876
No matching concept
0
100
Common ragweed ige ab [units/volume] in serum
3001247
No matching concept
0
100
Cow milk ige ab [units/volume] in serum
3001488
No matching concept
0
100
Creatinine serum/plasma
3016723
No matching concept
0
100
Cystic fibrosis 20 common mutation test
40478878
No matching concept
0
100
Cystic fibrosis sweat test
4314290
No matching concept
0
100
Dxa radius and ulna [t-score] bone density
3049273
No matching concept
0
100
Egg white ige ab [units/volume] in serum
3014599
No matching concept
0
100
Erythrocyte distribution width [ratio]
3002385
No matching concept
0
100
Fev1/fvc
3011505
No matching concept
0
100
Globulin [mass/volume] in serum by calculation
3027970
No matching concept
0
100
Glucose lab
3004501
No matching concept
0
100
Glucose tolerance test
4012477
No matching concept
0
100
Hiv status
40758406
No matching concept
0
100
Hematocrit
3009542
No matching concept
0
100
Hemoglobin
3000963
No matching concept
0
100
History of hospitalizations+outpatient visits narrative
3051031
No matching concept
0
100
Honey bee ige ab [units/volume] in serum
3020655
No matching concept
0
100
Latex ige ab [units/volume] in serum
3019406
No matching concept
0
100
Mcv
3024731
No matching concept
0
100
Measurement of respiratory function
4052083
No matching concept
0
100
Microbial culture of sputum
4015189
No matching concept
0
100
Oral temperature
3006322
No matching concept
0
100
Peanut ige ab [units/volume] in serum
3012494
No matching concept
0
100
Percentage area affected by eczema head and neck [phenx]
40769179
No matching concept
0
100
Percentage area affected by eczema lower extremity - bilateral [phenx]
40769194
No matching concept
0
100
Percentage area affected by eczema trunk [phenx]
40769189
No matching concept
0
100
Percentage area affected by eczema upper extremity - bilateral [phenx]
40769184
No matching concept
0
100
Physical findings of abdomen by palpation
21494966
No matching concept
0
100
Platelet count
3007461
No matching concept
0
100
Potassium serum/plasma
3023103
No matching concept
0
100
Protein serum/plasma
3020630
No matching concept
0
100
Red blood cell (rbc) count
3026361
No matching concept
0
100
Sexual orientation
46235214
No matching concept
0
100
Shrimp ige ab [units/volume] in serum
3021226
No matching concept
0
100
Sodium serum/plasma
3019550
No matching concept
0
100
Soybean ige ab [units/volume] in serum
3015076
No matching concept
0
100
Spirometry
4133840
No matching concept
0
100
Throat culture
4024958
No matching concept
0
100
Thyrotropin [units/volume] in serum or plasma
3009201
No matching concept
0
100
Thyroxine (t4) free [mass/volume] in serum or plasma
3008598
No matching concept
0
100
Urea nitrogen serum/plasma
3013682
No matching concept
0
100
Walnut ige ab [units/volume] in serum
3006451
No matching concept
0
100
Wheat ige ab [units/volume] in serum
3027231
No matching concept
0
100
White blood cell (wbc) count (leukocyte)
3010813
No matching concept
0
100
White oak ige ab [units/volume] in serum
3006734
No matching concept
0
100
tableConceptIdCounts(result, type = "datatable")
Standard concept nameStandard concept idmockOmopSketch
0
Showing 1 to 11 of 59 entries

The display argument in tableConceptIdCounts() controls which concept counts are shown. Available options include display = "overall". It is the default option and it shows both standard and source concept counts.

tableConceptIdCounts(result, display = "overall")
Database name
OMOP table
Standard concept name
Standard concept id
Source concept name
Source concept id
N records
mockOmopSketch (1)
measurement (59)
Alanine aminotransferase serum/plasma
3006923
No matching concept
0
100
Albumin serum/plasma
3024561
No matching concept
0
100
Alkaline phosphatase serum/plasma
3035995
No matching concept
0
100
American house dust mite ige ab [units/volume] in serum
3036780
No matching concept
0
100
Anion gap serum/plasma
3045716
No matching concept
0
100
Are you covered by health insurance or some other kind of health care plan [phenx]
40766240
No matching concept
0
100
Aspartate aminotransferase serum/plasma
3013721
No matching concept
0
100
Bilirubin.total [mass/volume] in blood
3028833
No matching concept
0
100
Calcium serum/plasma serum/plasma
3006906
No matching concept
0
100
Carbon dioxide serum/plasma
3015632
No matching concept
0
100
Cat dander ige ab [units/volume] in serum
3023430
No matching concept
0
100
Chloride serum/plasma
3014576
No matching concept
0
100
Cladosporium herbarum ige ab [units/volume] in serum
3005136
No matching concept
0
100
Codfish ige ab [units/volume] in serum
3000876
No matching concept
0
100
Common ragweed ige ab [units/volume] in serum
3001247
No matching concept
0
100
Cow milk ige ab [units/volume] in serum
3001488
No matching concept
0
100
Creatinine serum/plasma
3016723
No matching concept
0
100
Cystic fibrosis 20 common mutation test
40478878
No matching concept
0
100
Cystic fibrosis sweat test
4314290
No matching concept
0
100
Dxa radius and ulna [t-score] bone density
3049273
No matching concept
0
100
Egg white ige ab [units/volume] in serum
3014599
No matching concept
0
100
Erythrocyte distribution width [ratio]
3002385
No matching concept
0
100
Fev1/fvc
3011505
No matching concept
0
100
Globulin [mass/volume] in serum by calculation
3027970
No matching concept
0
100
Glucose lab
3004501
No matching concept
0
100
Glucose tolerance test
4012477
No matching concept
0
100
Hiv status
40758406
No matching concept
0
100
Hematocrit
3009542
No matching concept
0
100
Hemoglobin
3000963
No matching concept
0
100
History of hospitalizations+outpatient visits narrative
3051031
No matching concept
0
100
Honey bee ige ab [units/volume] in serum
3020655
No matching concept
0
100
Latex ige ab [units/volume] in serum
3019406
No matching concept
0
100
Mcv
3024731
No matching concept
0
100
Measurement of respiratory function
4052083
No matching concept
0
100
Microbial culture of sputum
4015189
No matching concept
0
100
Oral temperature
3006322
No matching concept
0
100
Peanut ige ab [units/volume] in serum
3012494
No matching concept
0
100
Percentage area affected by eczema head and neck [phenx]
40769179
No matching concept
0
100
Percentage area affected by eczema lower extremity - bilateral [phenx]
40769194
No matching concept
0
100
Percentage area affected by eczema trunk [phenx]
40769189
No matching concept
0
100
Percentage area affected by eczema upper extremity - bilateral [phenx]
40769184
No matching concept
0
100
Physical findings of abdomen by palpation
21494966
No matching concept
0
100
Platelet count
3007461
No matching concept
0
100
Potassium serum/plasma
3023103
No matching concept
0
100
Protein serum/plasma
3020630
No matching concept
0
100
Red blood cell (rbc) count
3026361
No matching concept
0
100
Sexual orientation
46235214
No matching concept
0
100
Shrimp ige ab [units/volume] in serum
3021226
No matching concept
0
100
Sodium serum/plasma
3019550
No matching concept
0
100
Soybean ige ab [units/volume] in serum
3015076
No matching concept
0
100
Spirometry
4133840
No matching concept
0
100
Throat culture
4024958
No matching concept
0
100
Thyrotropin [units/volume] in serum or plasma
3009201
No matching concept
0
100
Thyroxine (t4) free [mass/volume] in serum or plasma
3008598
No matching concept
0
100
Urea nitrogen serum/plasma
3013682
No matching concept
0
100
Walnut ige ab [units/volume] in serum
3006451
No matching concept
0
100
Wheat ige ab [units/volume] in serum
3027231
No matching concept
0
100
White blood cell (wbc) count (leukocyte)
3010813
No matching concept
0
100
White oak ige ab [units/volume] in serum
3006734
No matching concept
0
100

If display = "standard" the table shows only standard concept_id and concept_name counts.

tableConceptIdCounts(result, display = "standard")
Database name
OMOP table
Standard concept name
Standard concept id
N records
mockOmopSketch (1)
measurement (59)
Alanine aminotransferase serum/plasma
3006923
100
Albumin serum/plasma
3024561
100
Alkaline phosphatase serum/plasma
3035995
100
American house dust mite ige ab [units/volume] in serum
3036780
100
Anion gap serum/plasma
3045716
100
Are you covered by health insurance or some other kind of health care plan [phenx]
40766240
100
Aspartate aminotransferase serum/plasma
3013721
100
Bilirubin.total [mass/volume] in blood
3028833
100
Calcium serum/plasma serum/plasma
3006906
100
Carbon dioxide serum/plasma
3015632
100
Cat dander ige ab [units/volume] in serum
3023430
100
Chloride serum/plasma
3014576
100
Cladosporium herbarum ige ab [units/volume] in serum
3005136
100
Codfish ige ab [units/volume] in serum
3000876
100
Common ragweed ige ab [units/volume] in serum
3001247
100
Cow milk ige ab [units/volume] in serum
3001488
100
Creatinine serum/plasma
3016723
100
Cystic fibrosis 20 common mutation test
40478878
100
Cystic fibrosis sweat test
4314290
100
Dxa radius and ulna [t-score] bone density
3049273
100
Egg white ige ab [units/volume] in serum
3014599
100
Erythrocyte distribution width [ratio]
3002385
100
Fev1/fvc
3011505
100
Globulin [mass/volume] in serum by calculation
3027970
100
Glucose lab
3004501
100
Glucose tolerance test
4012477
100
Hiv status
40758406
100
Hematocrit
3009542
100
Hemoglobin
3000963
100
History of hospitalizations+outpatient visits narrative
3051031
100
Honey bee ige ab [units/volume] in serum
3020655
100
Latex ige ab [units/volume] in serum
3019406
100
Mcv
3024731
100
Measurement of respiratory function
4052083
100
Microbial culture of sputum
4015189
100
Oral temperature
3006322
100
Peanut ige ab [units/volume] in serum
3012494
100
Percentage area affected by eczema head and neck [phenx]
40769179
100
Percentage area affected by eczema lower extremity - bilateral [phenx]
40769194
100
Percentage area affected by eczema trunk [phenx]
40769189
100
Percentage area affected by eczema upper extremity - bilateral [phenx]
40769184
100
Physical findings of abdomen by palpation
21494966
100
Platelet count
3007461
100
Potassium serum/plasma
3023103
100
Protein serum/plasma
3020630
100
Red blood cell (rbc) count
3026361
100
Sexual orientation
46235214
100
Shrimp ige ab [units/volume] in serum
3021226
100
Sodium serum/plasma
3019550
100
Soybean ige ab [units/volume] in serum
3015076
100
Spirometry
4133840
100
Throat culture
4024958
100
Thyrotropin [units/volume] in serum or plasma
3009201
100
Thyroxine (t4) free [mass/volume] in serum or plasma
3008598
100
Urea nitrogen serum/plasma
3013682
100
Walnut ige ab [units/volume] in serum
3006451
100
Wheat ige ab [units/volume] in serum
3027231
100
White blood cell (wbc) count (leukocyte)
3010813
100
White oak ige ab [units/volume] in serum
3006734
100

If display = "source" the table shows only source concept_id and concept_name counts.

tableConceptIdCounts(result, display = "source")
#> Warning: Values from `estimate_value` are not uniquely identified; output will contain
#> list-cols.
#> • Use `values_fn = list` to suppress this warning.
#> • Use `values_fn = {summary_fun}` to summarise duplicates.
#> • Use the following dplyr code to identify duplicates.
#>   {data} |>
#>   dplyr::summarise(n = dplyr::n(), .by = c(cdm_name, group_level,
#>   source_concept_name, source_concept_id, result_id, group_name, estimate_type,
#>   estimate_name)) |>
#>   dplyr::filter(n > 1L)
Database name
OMOP table
Source concept name
Source concept id
N records
mockOmopSketch (1)
measurement (1)
No matching concept
0
100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100

If display = "missing source" the table shows only counts for concept ids that are missing a corresponding source concept id.

tableConceptIdCounts(result, display = "missing source")
Database name
OMOP table
Standard concept name
Standard concept id
N records
mockOmopSketch (1)
measurement (59)
Alanine aminotransferase serum/plasma
3006923
100
Albumin serum/plasma
3024561
100
Alkaline phosphatase serum/plasma
3035995
100
American house dust mite ige ab [units/volume] in serum
3036780
100
Anion gap serum/plasma
3045716
100
Are you covered by health insurance or some other kind of health care plan [phenx]
40766240
100
Aspartate aminotransferase serum/plasma
3013721
100
Bilirubin.total [mass/volume] in blood
3028833
100
Calcium serum/plasma serum/plasma
3006906
100
Carbon dioxide serum/plasma
3015632
100
Cat dander ige ab [units/volume] in serum
3023430
100
Chloride serum/plasma
3014576
100
Cladosporium herbarum ige ab [units/volume] in serum
3005136
100
Codfish ige ab [units/volume] in serum
3000876
100
Common ragweed ige ab [units/volume] in serum
3001247
100
Cow milk ige ab [units/volume] in serum
3001488
100
Creatinine serum/plasma
3016723
100
Cystic fibrosis 20 common mutation test
40478878
100
Cystic fibrosis sweat test
4314290
100
Dxa radius and ulna [t-score] bone density
3049273
100
Egg white ige ab [units/volume] in serum
3014599
100
Erythrocyte distribution width [ratio]
3002385
100
Fev1/fvc
3011505
100
Globulin [mass/volume] in serum by calculation
3027970
100
Glucose lab
3004501
100
Glucose tolerance test
4012477
100
Hiv status
40758406
100
Hematocrit
3009542
100
Hemoglobin
3000963
100
History of hospitalizations+outpatient visits narrative
3051031
100
Honey bee ige ab [units/volume] in serum
3020655
100
Latex ige ab [units/volume] in serum
3019406
100
Mcv
3024731
100
Measurement of respiratory function
4052083
100
Microbial culture of sputum
4015189
100
Oral temperature
3006322
100
Peanut ige ab [units/volume] in serum
3012494
100
Percentage area affected by eczema head and neck [phenx]
40769179
100
Percentage area affected by eczema lower extremity - bilateral [phenx]
40769194
100
Percentage area affected by eczema trunk [phenx]
40769189
100
Percentage area affected by eczema upper extremity - bilateral [phenx]
40769184
100
Physical findings of abdomen by palpation
21494966
100
Platelet count
3007461
100
Potassium serum/plasma
3023103
100
Protein serum/plasma
3020630
100
Red blood cell (rbc) count
3026361
100
Sexual orientation
46235214
100
Shrimp ige ab [units/volume] in serum
3021226
100
Sodium serum/plasma
3019550
100
Soybean ige ab [units/volume] in serum
3015076
100
Spirometry
4133840
100
Throat culture
4024958
100
Thyrotropin [units/volume] in serum or plasma
3009201
100
Thyroxine (t4) free [mass/volume] in serum or plasma
3008598
100
Urea nitrogen serum/plasma
3013682
100
Walnut ige ab [units/volume] in serum
3006451
100
Wheat ige ab [units/volume] in serum
3027231
100
White blood cell (wbc) count (leukocyte)
3010813
100
White oak ige ab [units/volume] in serum
3006734
100

If display = "missing standard" the table shows only counts for source concept ids that are missing a mapped standard concept id.

tableConceptIdCounts(result, display = "missing standard")
#> Warning: `result` does not contain any `summarise_concept_id_counts` data.
Table has no data
No rows found

3.2 Display the most frequent concepts

You can use the tableTopConceptCounts() function to display the most frequent concepts in a OMOP CDM table in formatted table. By default, the function returns a gt table, but you can also choose from other output formats, including flextable, datatable, and reactable.

result <- summariseConceptIdCounts(cdm,
  omopTableName = "drug_exposure",
  countBy = "record"
) 
tableTopConceptCounts(result, type = "gt")
Top
Cdm name
mockOmopSketch
drug_exposure
1 Standard: celecoxib 200 MG Oral Capsule [Celebrex] (1118088)
Source: No matching concept (0)
100
2 Standard: meningococcal polysaccharide (groups A, C, Y and W-135) diphtheria toxoid conjugate vaccine (MCV4P) (40213180)
Source: No matching concept (0)
100
3 Standard: hepatitis A vaccine, adult dosage (40213296)
Source: No matching concept (0)
100
4 Standard: Phenazopyridine (933724)
Source: No matching concept (0)
100
5 Standard: Meperidine (1102527)
Source: No matching concept (0)
100
6 Standard: Dornase Alfa (1125443)
Source: No matching concept (0)
100
7 Standard: salmeterol (1137529)
Source: No matching concept (0)
100
8 Standard: Galantamine (757627)
Source: No matching concept (0)
100
9 Standard: NITROFURANTOIN, MACROCRYSTALS 50 MG Oral Capsule (920334)
Source: No matching concept (0)
100
10 Standard: Amlodipine 5 MG Oral Tablet (1332419)
Source: No matching concept (0)
100

3.2.1 Customising the number of top concepts

By default, the function shows the top 10 concepts. You can change this using the top argument:

tableTopConceptCounts(result, top = 5)
Top
Cdm name
mockOmopSketch
drug_exposure
1 Standard: celecoxib 200 MG Oral Capsule [Celebrex] (1118088)
Source: No matching concept (0)
100
2 Standard: meningococcal polysaccharide (groups A, C, Y and W-135) diphtheria toxoid conjugate vaccine (MCV4P) (40213180)
Source: No matching concept (0)
100
3 Standard: hepatitis A vaccine, adult dosage (40213296)
Source: No matching concept (0)
100
4 Standard: Phenazopyridine (933724)
Source: No matching concept (0)
100
5 Standard: Meperidine (1102527)
Source: No matching concept (0)
100

3.2.2 Choosing the count type

If your summary includes both record and person counts, you must specify which type to display using the countBy argument:

result <- summariseConceptIdCounts(cdm,
  omopTableName = "drug_exposure",
  countBy = c("record", "person")
) 
tableTopConceptCounts(result, countBy = "person")
Top
Cdm name
mockOmopSketch
drug_exposure
1 Standard: Amlodipine 5 MG Oral Tablet (1332419)
Source: No matching concept (0)
72
2 Standard: norelgestromin (1518198)
Source: No matching concept (0)
72
3 Standard: Warfarin Sodium 5 MG Oral Tablet (40163554)
Source: No matching concept (0)
71
4 Standard: Influenza, seasonal, injectable, preservative free (40213154)
Source: No matching concept (0)
70
5 Standard: 1 ML Epinephrine 1 MG/ML Injection (46275916)
Source: No matching concept (0)
70
6 Standard: celecoxib (1118084)
Source: No matching concept (0)
70
7 Standard: Albuterol (1154343)
Source: No matching concept (0)
69
8 Standard: sevoflurane (19039298)
Source: No matching concept (0)
69
9 Standard: Loratadine 5 MG Chewable Tablet (19125062)
Source: No matching concept (0)
69
10 Standard: Midazolam 1 MG/ML Injectable Solution (19078924)
Source: No matching concept (0)
69