Lookup a Source Vocabulary's Relationships

vocab_lookup_relationships(
  vocabulary_id,
  conn,
  conn_fun = "connectAthena()",
  vocab_schema = "omop_vocabulary",
  cache_only = FALSE,
  skip_cache = FALSE,
  override_cache = FALSE,
  render_sql = FALSE,
  render_only = FALSE,
  verbose = FALSE,
  sleepTime = 1
)

Arguments

vocabulary_id

Vector of 1 or more `vocabulary_id` from the OMOP Vocabulary

conn

Connection object. If provided, diverts queries to the connection instead of the local Athena instance without caching features.

cache_only

Loads from the cache and does not query the database. A NULL object is returned if a resultset was not cached.

skip_cache

Skip the caching altogether and directly query the database.

override_cache

If TRUE, the cache will not be loaded and will be overwritten by a new query. For override_cache to take effect, skip_cache should be FALSE.

render_sql

If TRUE, the SQL will be printed back in the console prior to execution. Default: FALSE

verbose

If TRUE, prints loading and querying operations messages to the console. Default: FALSE

sleepTime

Argument for `Sys.sleep()` in between queries to allow for halting function execution, especially in cases where other chariot functions are executing multiple queries in succession and require cancellation.

Details

Lookup all of a Source Vocabulary's non-null relationships in the Concept Relationship Table.

See also

Examples

library(chariot) library(tidyverse) # Lookup relationships on the Vocabulary-Concept Class Id axis vocab_lookup_relationships(vocabulary_id = "HemOnc")
#> [2021-05-26 16:08:01] Connected to 'athena' #> [2021-05-26 16:08:01] Postgres connection to 'athena' closed
#> # A tibble: 96 x 5 #> vocabulary_id_1 concept_class_id_1 relationship_id vocabulary_id_2 #> <chr> <chr> <chr> <chr> #> 1 HemOnc Brand Name Brand name of HemOnc #> 2 HemOnc Brand Name NA NA #> 3 HemOnc Component Antineoplastic of HemOnc #> 4 HemOnc Component Biosimilar of HemOnc #> 5 HemOnc Component Concept replaces HemOnc #> 6 HemOnc Component Has FDA indication HemOnc #> 7 HemOnc Component Has accepted use HemOnc #> 8 HemOnc Component Has biosimilar HemOnc #> 9 HemOnc Component Has brand name HemOnc #> 10 HemOnc Component Has route HemOnc #> # … with 86 more rows, and 1 more variable: concept_class_id_2 <chr>
# Relationships between HemOnc concepts only can also be looked up vocab_lookup_intrarelation(vocabulary_id = "HemOnc")
#> [2021-05-26 16:08:01] Connected to 'athena' #> [2021-05-26 16:08:01] Postgres connection to 'athena' closed
#> # A tibble: 68 x 5 #> vocabulary_id_1 concept_class_id_1 relationship_id vocabulary_id_2 #> <chr> <chr> <chr> <chr> #> 1 HemOnc Brand Name Brand name of HemOnc #> 2 HemOnc Component Antineoplastic of HemOnc #> 3 HemOnc Component Biosimilar of HemOnc #> 4 HemOnc Component Has FDA indication HemOnc #> 5 HemOnc Component Has accepted use HemOnc #> 6 HemOnc Component Has biosimilar HemOnc #> 7 HemOnc Component Has brand name HemOnc #> 8 HemOnc Component Has route HemOnc #> 9 HemOnc Component Immunosuppressor of HemOnc #> 10 HemOnc Component Is a HemOnc #> # … with 58 more rows, and 1 more variable: concept_class_id_2 <chr>
# Relationships between HemOnc and non-Hemonc Concepts vocab_lookup_interrelation(vocabulary_id = "HemOnc")
#> [2021-05-26 16:08:01] Connected to 'athena' #> [2021-05-26 16:08:01] Postgres connection to 'athena' closed
#> # A tibble: 20 x 5 #> vocabulary_id_1 concept_class_id_1 relationship_id vocabulary_id_2 #> <chr> <chr> <chr> <chr> #> 1 HemOnc Component Maps to RxNorm #> 2 HemOnc Component Maps to RxNorm #> 3 HemOnc Component Maps to RxNorm #> 4 HemOnc Component Maps to RxNorm Extension #> 5 HemOnc Component Class Subsumes RxNorm #> 6 HemOnc Component Class Subsumes RxNorm #> 7 HemOnc Component Class Subsumes RxNorm #> 8 HemOnc Component Class Subsumes RxNorm Extension #> 9 HemOnc Component Class Subsumes RxNorm Extension #> 10 HemOnc Condition Maps to ICDO3 #> 11 HemOnc Condition Maps to SNOMED #> 12 HemOnc Regimen Has antineopl Rx RxNorm #> 13 HemOnc Regimen Has antineopl Rx RxNorm #> 14 HemOnc Regimen Has antineopl Rx RxNorm #> 15 HemOnc Regimen Has antineopl Rx RxNorm Extension #> 16 HemOnc Regimen Has antineopl Rx RxNorm Extension #> 17 HemOnc Regimen Has immunosuppr Rx RxNorm #> 18 HemOnc Regimen Has local therap Rx RxNorm #> 19 HemOnc Regimen Has local therap Rx RxNorm Extension #> 20 HemOnc Regimen Has support med Rx RxNorm #> # … with 1 more variable: concept_class_id_2 <chr>