run_setup: Load LOINC Complete Package

View source: R/run_setup.R

run_setupR Documentation

Load LOINC Complete Package

Description

The CSV files unpacked from "LOINC and Relma Complete Download" (https://loinc.org/downloads/) zip are loaded into Postgres.The file version and release dates are taken along with the table names and row counts are logged to a separate table after the loading is completed.

Usage

run_setup(
  conn,
  conn_fun = "pg13::local_connect()",
  schema = "loinc",
  path_to_csvs,
  include_linguistic_variants = FALSE,
  verbose = TRUE,
  render_sql = TRUE,
  render_only = FALSE,
  log_schema = "public",
  log_table_name = "setup_loinc_log",
  log_csv_version,
  log_release_date
)

Arguments

conn

Connection to a Postgres database.

conn_fun

Connection expression.

schema

Target schema for the LOINC load, Default: 'loinc'

path_to_csvs

Path to the unpacked LOINC download.

include_linguistic_variants

Include LinguisticVariant tables?

log_schema

Schema for the table that logs the process, Default: 'public'

log_table_name

Name of log table, Default: 'setup_loinc_log'

log_csv_version

(Required) Version number povided in the download page and source zip file name.

log_release_date

(Required) Release date provided in the download page.


meerapatelmd/setupLOINC documentation built on Jan. 30, 2024, 2:33 a.m.