get_concept: OMOP Get Concept

View source: R/database_tables_omop.R

get_conceptR Documentation

OMOP Get Concept

Description

This function assists with transforming OMOP concept_ids to interpretable strings by retrieving the requested concepts from the appropriate OMOP concept table.

Usage

get_concept(
  table_map,
  db_connection,
  concept_table,
  concept_id,
  concept_name,
  table,
  joinable_id,
  table_concept_id,
  col_name,
  subject_id_field = NULL,
  selected_subject = NULL
)

Arguments

table_map

A dplyr::tibble containing a mapping between the CDM standard tables and fields to the user connected tables and fields.

db_connection

A DBI::dbConnect object.

concept_table

A string, containing the standard CDM concept table name.

concept_id

A string, containing the standard CDM concept id field.

concept_name

A string, containing the standard CDM concept name field.

table

A string, containing the table name that requires OMOP concepts.

joinable_id

A string, indicating what variable is "joinable" between the concept table and the desired table.

table_concept_id

A string, containing the the table concept id

col_name

A string, containing the desired name for the retrieved concept.

subject_id_field

A string, identifying which table field contains the subject id.

selected_subject

A numeric, or coercible to numeric containing the desired subject id.

Value

The desired OMOP concept based on the user data model for all subjects


ReviewR documentation built on Sept. 1, 2023, 5:08 p.m.