extract_rxclass_graph: Extract RxClass Graph

View source: R/extract_rxclass_graph.R

extract_rxclass_graphR Documentation

Extract RxClass Graph

Description

Extract RxClass Graph

Usage

extract_rxclass_graph(
  class_types = c("MESHPA", "EPC", "MOA", "PE", "PK", "TC", "VA", "DISEASE", "CHEM",
    "SCHEDULE", "STRUCT", "DISPOS"),
  prior_version = NULL,
  prior_api_version = "3.1.174"
)

Details

Some class types such as DISEASE follow a cyclical hierarchical pattern that can recurse into infinity if a limit is imposed when writing the Concept Ancestor csv file. Concept Ancestor processing is completed when a subsequent level of parent and children is a dataframe that is a duplicate of a previous level's.

Other class types such as SCHEDULE do not have multiple levels.

The response from the RxNav RxClass API is a set of nodes and edges for a given class_type. Both are saved as csvs to the 'raw' folder.

The edge.csv is then processed into a Concept Ancestor format as 'CONCEPT_ANCESTOR.csv' under the 'processed' folder.

Value

For each class_type, the following csvs are returned to the installation dir: RxClass API / RxClass Version / extracted / graph / raw / node.csv edge.csv processed / CONCEPT_ANCESTOR.csv

The CONCEPT_ANCESTOR.csv is processed to include levels of separation with the source edge.csv fields classId1 and classId2 translated to child and parent, respectively.


meerapatelmd/setupRxNorm documentation built on Sept. 15, 2022, 9:25 a.m.