Skip to contents

Load Hierarchical Rollup from a CSV File

Usage

hierarchical_rollup_from_csv(
  path,
  name = NULL,
  code_col = "RXNORM_CUI",
  class_col = NULL,
  vocabulary_col = NULL,
  vocabulary_id = NULL,
  root_vocabulary = NULL,
  domain = "Drug",
  target_vocabulary = NULL,
  expand = "descendants",
  expansion_direction = NULL,
  include_retired_maps_to = TRUE,
  exclude_dose_forms = NULL,
  combination_policy = "attribute_all",
  header = TRUE,
  ...
)

Arguments

path

Path to CSV file.

name

Name of the rollup. If NULL, derived from file name stem.

code_col

Column name or index for concept code / CUI.

class_col

Optional column name or index for class filtering.

vocabulary_col

Optional column name or index for vocabulary ID.

vocabulary_id

Default vocabulary ID.

root_vocabulary

Alias for vocabulary_id.

domain

Domain ID (default 'Drug').

target_vocabulary

Target vocabulary ID (default 'RxNorm' for Drug).

expand

Hierarchy expansion ('descendants' | 'ancestors' | NULL).

expansion_direction

Alias for expand.

include_retired_maps_to

Logical. Include backward 'Maps to' mappings for retired codes.

exclude_dose_forms

Character vector of dose forms to exclude.

combination_policy

Combination attribution policy.

header

Logical. Whether the CSV has a header row.

...

Additional arguments passed to utils::read.csv.

Value

A hierarchical_rollup object.