getATCCodes: Get descendant codes for ATC levels

View source: R/drugCodes.R

getATCCodesR Documentation

Get descendant codes for ATC levels

Description

Get descendant codes for ATC levels

Usage

getATCCodes(
  cdm,
  level = c("ATC 1st"),
  name = NULL,
  doseForm = NULL,
  withConceptDetails = FALSE
)

Arguments

cdm

cdm_reference via CDMConnector

level

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

name

ATC name of interest. For example, c("Dermatologicals", "Nervous System"), would result in a list of length two with the descendant concepts for these two particular ATC groups.

doseForm

Only descendants codes with the specified dose form will be returned. If NULL, descendant codes will be returned regardless of dose form.

withConceptDetails

If FALSE, each item in the list of results (one per ATC group) will contain a vector of concept IDs for each ingredient. If TRUE each item in the list of results will contain a tibble with additional information on the identified concepts.

Value

A named list, with each item containing a vector of descendant concepts of an ATC group (if withConceptDetails was set as FALSE) or a tibble with the descendant concepts along with additional details about them (if withConceptDetails was set as TRUE).

Examples

## Not run: 
cdm <- mockVocabRef()
getATCCodes(cdm = cdm, level = "ATC 1st")
CDMConnector::cdmDisconnect(cdm)

## End(Not run)

oxford-pharmacoepi/CodelistGenerator documentation built on April 12, 2024, 9:30 a.m.