prepare_cpt4: Reconstitute CPT4 Concepts

View source: R/prepare_cpt4.R

prepare_cpt4R Documentation

Reconstitute CPT4 Concepts

Description

Run the java script that reconstitutes CPT4 concepts directly from the R console. CPT4 will not be loaded into Postgres If this is not run beforehand.

Usage

prepare_cpt4(
  path_to_csvs,
  umls_api_key = Sys.getenv("UMLS_API_KEY"),
  verbose = TRUE
)

Arguments

path_to_csvs

Path to folder containing the unpacked vocabularies as csv files, downloaded as a zip from athena.ohdsi.org.

umls_api_key

API Key given at UMLS Licensee Profile.

verbose

If TRUE, prints back activity in the R console as it is occurring.

Details

A copy of the CONCEPT.csv file is made to CONCEPT_WITHOUT_CPT4.csv for safekeeping. If the function exits early, the CONCEPT.csv file is replaced with CONCEPT_WITHOUT_CPT4.csv and the logs directory is unlinked recursively. If the function completes, the CONCEPT_WITHOUT_CPT4.csv is removed instead. This way, the file would not need to be redownloaded in case something goes wrong during processing.

See Also

cat_line typewrite, map


patelm9/setupAthena documentation built on June 11, 2024, 4:23 a.m.