get_strip: Get Concept Strip

Description Usage See Also Examples

View source: R/format.R

Description

Get Concept Strip

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
get_strip(
  concept_id,
  vocab_schema = "omop_vocabulary",
  conn,
  conn_fun = "connectAthena()",
  cache_only = FALSE,
  skip_cache = FALSE,
  override_cache = FALSE,
  render_sql = TRUE,
  verbose = TRUE,
  sleepTime = 1
)

See Also

select

Other concept format functions: filter_at_all_strip(), filter_at_any_strip(), filter_strip(), label_to_strip(), merge_label(), merge_strip(), unbox_label(), unbox_strip(), unmerge_label(), unmerge_strip()

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
library(tidyverse)
library(chariot)

conn <- connectAthena()
# Get a strip for an aspirin concept
get_strip(concept_id = 1112807,
         vocab_schema = "omop_vocabulary",
         conn = conn)

# Unmerge the Strip to get each attribute back
test_strip <-
        tibble::tibble(
                concept = "[V] [S] 1112807 aspirin [RxNorm 1191] [Drug] [Ingredient]"
                )
unmerge_strip(test_strip,
              strip_col = concept)

# Merge a dataframe of concepts into stris
test_data <-
        queryAthena("SELECT * FROM omop_vocabulary.concept ORDER BY RANDOM() LIMIT 20;",
                    conn = conn)
merge_strip(test_data,
            into = "concept")


dcAthena(conn = conn)

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