Skip to contents

Import an OMOP vocabulary and save it in app database

Usage

import_vocabulary_table(
  output,
  ns = character(),
  i18n = character(),
  r = shiny::reactiveValues(),
  m = shiny::reactiveValues(),
  table_name = character(),
  data = tibble::tibble(),
  add_vocabulary = FALSE
)

Arguments

output

variable from Shiny, used to render messages on the message bar

ns

Shiny namespace

i18n

shiny.i18n object for translations

r

A shiny::reactiveValues object, used to communicate between modules

m

A shiny::reactiveValues object, used to communicate between modules

table_name

Name of the vocabulary table we import (concept, concept_relationship or other) (character)

data

A tibble containing the data

add_vocabulary

If concepts are imported, should the corresponding terminologies be added? (logical)

Details

The function is used in a vocabulary code, it is launched only when you click on "Run code" on the vocabulary page.

See OMOP common data model for more information.

Examples

if (FALSE) {
concept <- tibble::tibble(concept_id = 3027018, concept_name = "Heart rate", domain_id = "Measurement",
  concept_class_id = "Clinical Observation", standard_concept = "S", concept_code = "8867-4",
  valid_start_date = "1970-01-01", valid_end_date = "2099-12-31", invalid_reason = NA_character_)
  
import_vocabulary_table(output = output, ns = ns, i18n = i18n, r = r, m = m,
  table_name = "concept", data = concept)
}