AtcDb-class: Anatomical Therapeutic Chemical Data

AtcDb-classR Documentation

Anatomical Therapeutic Chemical Data

Description

The AtcDb provides the data from the Anatomical Therapeutic Chemical (ATC) Classification System as defined by the WHOCC (WHO Collaborating Centre for Drug Statistics Methodology).

In this system, drugs are classified into groups at 5 different levels:

First level

Indicates the anatomical main group and consists of one letter (e.g. C for cardiovascular system).

Second level

Indicates the therapeutic main group and consists of two digits (e.g. C03 for diuretic drugs. Note that the digits 03 have another meaning in another level, i.e. D03 stands for Treatment of wounds and ulcers).

Third level

Indicates the therapeutic/pharmacological subgroup and consists of one letter (e.g. C03C for High-ceiling diuretics).

Fourth level

indicates the chemical/therapeutic/pharmacological subgroup and consists of one letter (e.g. C03CA for Sulfonamides).

Fifth level

The fifth level indicates the chemical substance and consists of two digits (e.g. C03CA01 for Furosemide).

Usage


## S4 method for signature 'AtcDb'
as.data.frame(x, row.names=NULL, optional=FALSE, ...)



## S4 method for signature 'AtcDb'
atcs(x, columns=listColumns(x), filter=AnnotationFilterList(),
order.by="key", ...)

## S4 method for signature 'AtcDb'
columns(x)

## S4 method for signature 'AtcDb'
dbconn(x)

## S4 method for signature 'AtcDb'
keys(x, level, ...)

## S4 method for signature 'AtcDb'
listColumns(x)

## S4 method for signature 'AtcDb'
listTables(x, ...)

Arguments

(in alphabetic order)

columns

A character vector specifying the columns that should be returned. Use the columns or listColumns method to list all allowed column names.

filter

Either a single filter object or a list of filter object to filter the results retrieved from the database. See KeyFilter for a list of supported filters.

key

A character vector of ATC code(s). Use method keys to retrieve all ATC codes stored in the database.

level

A numeric vector specifying the ATC code level(s) (from 1 to 5) that should be retrieved from the database.

optional

For as.data.frame: not used.

order.by

For atcs: the column by which the results should be ordered.

row.names

For as.data.frame: not used.

x

The AtcDb object.

...

Presently not used.

Details

For details on the database tables and the columns please refer to the Vignette. Note that the defined daily dose (ddd) is only available for level 5 codes, and that each of these can have several different ddds.

The main columns are:

key

The ATC code of the entry.

name

The english name of the entry.

level

The ATC level of the entry (1 to 5).

ddd

(Only for level 5 entries): the defined daily doses. This may not be defined for all drugs.

unit

The unit of the dose in ddd.

administration_route

The route of administration for the drug.

note

Eventual additional information related to the ddd.

Value

Refer to the method and function description above for detailed information on the returned result object.

Objects of the class

AtcDb objects are created by the constructor function AtcDb. The database is automatically loaded on package startup and the AtcDb object providing access to the data is available through the atc variable. Thus, there should be no need to load or instatiate such an object manually.

Slots

atcdb

The connection to the internal SQLite database.

.properties

Internal list to be used to set/specify properties. Not used at present.

tables

list providing the available column names in each table (names being the table names, elements the column/attribute names).

Basic usage

(in alphabetic order)

as.data.frame

Extract the full ATC data from the database and return it as data.frame.

atcData

This method is deprecated; please use atcs instead which provides much more flexibility.

Retrieve data from the database. This method allows to query either the full data from the database (if called without additional arguments) or allows to search and retrieve specific information, e.g. ATC data from specified ATC levels or ATC data where the name matches the supplied pattern. The method returns a data.frame with the columns specified by the argument columns or (by default) all columns.

atcs

Retrieve data from the database. Arguments columns and filter allow to specify which columns and entries should be fetched from the database.

columns

Returns a character vector with the column names of the database tables.

dbconn

Returns the connection to the internal (RSQLite) database.

keys

Returns a character vector of all ATC codes in the database, or ATC codes of the level(s) that was/were specified with argument level.

listTables

Returns a list of column names in each table. The names of the list correspond to the table names.

Author(s)

Johannes Rainer.

References

The WHO Collaborating Centre for Drug Statistics Methodology, Oslo, Norway (http://www.whocc.no).

Examples


## Display some information on the database.
atc

## List all columns in the database.
columns(atc)

## List tables and columns.
listTables(atc)

## Extract the full data as data.frame.
tmp <- as.data.frame(atc)
head(tmp)

## Get all the ATC codes of level 1.
keys(atc, level=1)

## Get all data for ATC codes of level 1
atcs(atc, filter=LevelFilter(1))
##atcData(atc, level=1)

## Get all data for ATC codes of level 2:4
## tmp <- atcData(atc, level=2:4)
atcs(atc, filter=LevelFilter(2:4))

## Get all data containing "cardio" or "kidney" in the name
##atcData(atc, pattern=c("cardio", "renal"), level=1:3)


## Use filters instead.
atcs(atc, filter=LevelFilter(1:3))

## See the vignette for more examples.



jotsetung/atc documentation built on July 29, 2022, 6:57 p.m.