Learn R Programming

CodelistGenerator (version 4.0.0)

availableATC: Get the names of all available Anatomical Therapeutic Chemical (ATC) classification codes

Description

Get the names of all available Anatomical Therapeutic Chemical (ATC) classification codes

Usage

availableATC(cdm, level = c("ATC 1st"))

Value

A vector containing the names of ATC codes for the chosen level(s) found in the concept table of cdm.

Arguments

cdm

A cdm reference to an OMOP CDM dataset. If data is held within a database, the vocabulary tables should be in the same schema as the clinical tables (person, observation period, and so on).

level

ATC level. Can be one or more of "ATC 1st", "ATC 2nd", "ATC 3rd", "ATC 4th", and "ATC 5th".

Examples

Run this code
# \donttest{
library(CodelistGenerator)
library(omock)

# Create CDM object
cdm <- mockCdmReference()

# Get ATC 1st level classification codes
availableATC(cdm, level = "ATC 1st")

# Get all ATC classification codes
availableATC(cdm, level = c("ATC 1st", "ATC 2nd", "ATC 3rd", "ATC 4th", "ATC 5th"))
# }

Run the code above in your browser using DataLab