print_concept_hierarchy: Print a Concept's Hierarchy to the Console

Description Usage Arguments See Also Examples

View source: R/x_print_concept_hierarchy.R

Description

If a level of the hierarchy has more than 10 concepts, the first 10 are printed with an ellipses is included to indicate only the first 10 rows are shown.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
print_concept_hierarchy(
  concept_obj,
  level_of_separation_type = c("max", "min"),
  write_schema = "patelm9",
  vocab_schema = "omop_vocabulary",
  conn,
  conn_fun = "connectAthena()",
  cache_only = FALSE,
  skip_cache = FALSE,
  override_cache = FALSE,
  verbose = TRUE,
  render_sql = TRUE,
  render_only = FALSE
)

Arguments

concept_obj

Concept class object or a concept id.

See Also

character(0) tibble split_by map arrange

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
library(chariot)
library(tidyverse)

conn <- connectAthena()
# Drug Domain
concept_obj <- get_concept(conn = conn,
                           concept_id = 1308216)
concept_obj
print_concept_hierarchy(conn = conn,
                        concept_obj = concept_obj)
print_concept_hierarchy(conn = conn,
                        concept_obj = concept_obj,
                        level_of_separation_type = "min")


# Cancer Condition Domain
concept_obj <- get_concept(conn = conn,
                           concept_id = 4187868)
concept_obj
print_concept_hierarchy(conn = conn,
                        concept_obj = concept_obj)
print_concept_hierarchy(conn = conn,
                        concept_obj = concept_obj,
                        level_of_separation_type = "min")

# Chronic Disease Domain
concept_obj <- get_concept(conn = conn,
                           concept_id = 319835)
concept_obj
print_concept_hierarchy(conn = conn,
                        concept_obj = concept_obj)
print_concept_hierarchy(conn = conn,
                        concept_obj = concept_obj,
                        level_of_separation_type = "min")

# Measurement Domain
concept_obj <- get_concept(conn = conn, concept_id = 4298431)
concept_obj
print_concept_hierarchy(conn = conn,
                        concept_obj = concept_obj)
print_concept_hierarchy(conn = conn,
                        concept_obj = concept_obj,
                        level_of_separation_type = "min")

patelm9/chariot documentation built on Feb. 19, 2022, 11:29 a.m.