Use this function to determine the ATC code of one or more antibiotics. The data set antibiotics will be searched for abbreviations, official names and trade names.

as.atc(x)

guess_atc(x)

is.atc(x)

Arguments

x

character vector to determine ATC code

Value

Character (vector) with class "act". Unknown values will return NA.

Details

Use the ab_property functions to get properties based on the returned ATC code, see Examples.

In the ATC classification system, the active substances are classified in a hierarchy with five different levels. The system has fourteen main anatomical/pharmacological groups or 1st levels. Each ATC main group is divided into 2nd levels which could be either pharmacological or therapeutic groups. The 3rd and 4th levels are chemical, pharmacological or therapeutic subgroups and the 5th level is the chemical substance. The 2nd, 3rd and 4th levels are often used to identify pharmacological subgroups when that is considered more appropriate than therapeutic or chemical subgroups. Source: https://www.whocc.no/atc/structure_and_principles/

See also

antibiotics for the dataframe that is being used to determine ATCs.

Examples

# These examples all return "J01FA01", the ATC code of Erythromycin: as.atc("J01FA01")
#> Class 'atc' #> [1] J01FA01
as.atc("Erythromycin")
#> Class 'atc' #> [1] J01FA01
as.atc("eryt")
#> Class 'atc' #> [1] J01FA01
as.atc(" eryt 123")
#> Class 'atc' #> [1] J01FA01
as.atc("ERYT")
#> Class 'atc' #> [1] J01FA01
as.atc("ERY")
#> Class 'atc' #> [1] J01FA01
as.atc("Erythrocin") # Trade name
#> Class 'atc' #> [1] J01FA01
as.atc("Eryzole") # Trade name
#> Class 'atc' #> [1] J01FA01
as.atc("Pediamycin") # Trade name
#> Class 'atc' #> [1] J01FA01
# Use ab_* functions to get a specific property based on an ATC code Cipro <- as.atc("cipro") # returns `J01MA02` ab_official(Cipro) # returns "Ciprofloxacin"
#> [1] "Ciprofloxacin"
ab_umcg(Cipro) # returns "CIPR", the code used in the UMCG
#> [1] "CIPR"