open a reference to omop concept relationship file from provided location
Source:R/omop_concept_relationship.R
omop_concept_relationship.Rd
defaults to package cache used by omop_vocab_table_save()
Usage
omop_concept_relationship(
location = tools::R_user_dir("omopcept", which = "cache")
)
ocr(location = tools::R_user_dir("omopcept", which = "cache"))
Examples
# open reference, query and collect data to dataframe
omop_concept_relationship() |> head() |> dplyr::collect()
#> Warning: downloading a subset of omop vocab files, pre-processed.
#> If you want to make sure you have the vocabs you need, download from Athena, save locally & call `omop_vocabs_preprocess()`
#> downloading concept_relationship file, may take a few minutes, this only needs to be repeated if the package is re-installed
#> # A tibble: 6 × 6
#> concept_id_1 concept_id_2 relationship_id valid_start_date valid_end_date
#> <int> <int> <chr> <date> <date>
#> 1 1970397 1970398 Available as box 2022-01-28 2099-12-31
#> 2 1970401 1970304 Available as box 2022-01-28 2099-12-31
#> 3 1970450 1973231 Has quantified form 2022-01-28 2099-12-31
#> 4 1970453 1970454 Constitutes 2022-01-28 2099-12-31
#> 5 42616294 42616296 Subsumes 2016-12-01 2099-12-31
#> 6 42616296 42616294 Is a 2016-12-01 2099-12-31
#> # ℹ 1 more variable: invalid_reason <chr>
ocr() |> head() |> dplyr::collect()
#> # A tibble: 6 × 6
#> concept_id_1 concept_id_2 relationship_id valid_start_date valid_end_date
#> <int> <int> <chr> <date> <date>
#> 1 1970397 1970398 Available as box 2022-01-28 2099-12-31
#> 2 1970401 1970304 Available as box 2022-01-28 2099-12-31
#> 3 1970450 1973231 Has quantified form 2022-01-28 2099-12-31
#> 4 1970453 1970454 Constitutes 2022-01-28 2099-12-31
#> 5 42616294 42616296 Subsumes 2016-12-01 2099-12-31
#> 6 42616296 42616294 Is a 2016-12-01 2099-12-31
#> # ℹ 1 more variable: invalid_reason <chr>