Get Concept Strip
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 )
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()
#> [2021-05-26 16:00:56] Connected to 'athena'# Get a strip for an aspirin concept get_strip(concept_id = 1112807, vocab_schema = "omop_vocabulary", conn = conn)#> [2021-05-26 16:00:56] Loading Cache... #> [2021-05-26 16:00:56] Cached SQL: SELECT * FROM omop_vocabulary.concept c WHERE c.concept_id IN (1112807) #> [2021-05-26 16:00:56] Cached resultset found...#> [1] "[V] [S] 1112807 aspirin [RxNorm 1191] [Drug] [Ingredient]"# 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)#> # A tibble: 1 x 8 #> concept_id concept_name domain_id vocabulary_id concept_class_id #> <chr> <chr> <chr> <chr> <chr> #> 1 1112807 aspirin Drug RxNorm Ingredient #> # … with 3 more variables: standard_concept <chr>, concept_code <chr>, #> # invalid_reason <chr># Merge a dataframe of concepts into stris test_data <- queryAthena("SELECT * FROM omop_vocabulary.concept ORDER BY RANDOM() LIMIT 20;", conn = conn)#> [2021-05-26 16:00:57] Loading Cache... #> [2021-05-26 16:00:57] Cached SQL: SELECT * FROM omop_vocabulary.concept ORDER BY RANDOM() LIMIT 20; #> [2021-05-26 16:00:57] Cached resultset found...#> # A tibble: 20 x 2 #> concept_id concept #> <int> <chr> #> 1 37083718 [V] [N] 37083718 Disorders of autonomic nervous system [ICD10GM G… #> 2 3414550 [V] [N] 3414550 Traumatic brachial plexus lesion [Nebraska Lexico… #> 3 45110479 [V] [N] 45110479 GNP CHLD IBUPROFEN 100 MG/5 ML [NDC 87701030771]… #> 4 45071768 [V] [N] 45071768 metoprolol tartrate 50 MG Oral Tablet [NDC 55289… #> 5 44104843 [V] [S] 44104843 ECHINACEA ANGUSTIFOLIA Extract 1 X [RxNorm Exten… #> 6 44799086 [U] [N] 44799086 [X]Victim of avalanche, landslide and other eart… #> 7 3051772 [V] [S] 3051772 MR Lower extremity joint - right WO and W contras… #> 8 19123243 [U] [N] 19123243 Levobupivacaine 0.625 MG/ML Injectable Solution … #> 9 3652026 [D] [N] 3652026 MIDODRINE HYDROCHLORIDE 2.5mg tablets [SNOMED 126… #> 10 42743213 [V] [N] 42743213 Operations on other bone: bone grafting and -tra… #> 11 4326268 [V] [S] 4326268 Infection by Oesophagostomum apiostomum [SNOMED 7… #> 12 36240133 [V] [C] 36240133 Noctesed Oral Product [RxNorm 1184488] [Drug] [B… #> 13 3234609 [V] [N] 3234609 Finding of movement of uvula [Nebraska Lexicon 36… #> 14 42061633 [V] [S] 42061633 Bogalusa [OSM 132196] [Geography] [8th level] #> 15 37513931 [V] [N] 37513931 oxcarbazepine 150 MG Oral Tablet [NDC 7051808940… #> 16 43569515 [V] [N] 43569515 Ginkgo Sandoz [RxNorm Extension OMOP888148] [Dru… #> 17 46290886 [V] [C] 46290886 LEG CRAMPS PM - oyster shell calcium carbonate, … #> 18 46289483 [V] [C] 46289483 TORK FOAM ANTIBACTERIAL - chloroxylenol soap [SP… #> 19 19118814 [D] [N] 19118814 Mitomycin 0.5 MG/ML [Mutamycin] [RxNorm 569802] … #> 20 21136931 [V] [S] 21136931 5 ML Regular Insulin, Human 100 UNT/ML Prefilled…#> [2021-05-26 16:00:57] Postgres connection to 'athena' closed