AMR/man/atc_online.Rd

86 lines
3.1 KiB
Plaintext
Raw Normal View History

2019-01-26 23:22:56 +01:00
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/atc_online.R
\name{atc_online_property}
\alias{atc_online_property}
\alias{atc_online_groups}
\alias{atc_online_ddd}
2021-08-19 23:43:02 +02:00
\alias{atc_online_ddd_units}
\title{Get ATC Properties from WHOCC Website}
2019-01-26 23:22:56 +01:00
\source{
2024-03-03 23:24:57 +01:00
\url{https://atcddd.fhi.no/atc_ddd_alterations__cumulative/ddd_alterations/abbrevations/}
2019-01-26 23:22:56 +01:00
}
\usage{
atc_online_property(
atc_code,
property,
administration = "O",
2024-03-03 23:24:57 +01:00
url = "https://atcddd.fhi.no/atc_ddd_index/?code=\%s&showdescription=no",
url_vet = "https://atcddd.fhi.no/atcvet/atcvet_index/?code=\%s&showdescription=no"
)
2019-01-26 23:22:56 +01:00
atc_online_groups(atc_code, ...)
atc_online_ddd(atc_code, ...)
2021-08-19 23:43:02 +02:00
atc_online_ddd_units(atc_code, ...)
2019-01-26 23:22:56 +01:00
}
\arguments{
2021-08-19 23:43:02 +02:00
\item{atc_code}{a \link{character} (vector) with ATC code(s) of antibiotics, will be coerced with \code{\link[=as.ab]{as.ab()}} and \code{\link[=ab_atc]{ab_atc()}} internally if not a valid ATC code}
2019-01-26 23:22:56 +01:00
\item{property}{property of an ATC code. Valid values are \code{"ATC"}, \code{"Name"}, \code{"DDD"}, \code{"U"} (\code{"unit"}), \code{"Adm.R"}, \code{"Note"} and \code{groups}. For this last option, all hierarchical groups of an ATC code will be returned, see \emph{Examples}.}
2019-01-26 23:22:56 +01:00
\item{administration}{type of administration when using \code{property = "Adm.R"}, see \emph{Details}}
2019-01-26 23:22:56 +01:00
\item{url}{url of website of the WHOCC. The sign \verb{\%s} can be used as a placeholder for ATC codes.}
\item{url_vet}{url of website of the WHOCC for veterinary medicine. The sign \verb{\%s} can be used as a placeholder for ATC_vet codes (that all start with "Q").}
2019-01-26 23:22:56 +01:00
2020-12-22 00:51:17 +01:00
\item{...}{arguments to pass on to \code{atc_property}}
2019-01-26 23:22:56 +01:00
}
\description{
2021-08-19 23:43:02 +02:00
Gets data from the WHOCC website to determine properties of an Anatomical Therapeutic Chemical (ATC) (e.g. an antibiotic), such as the name, defined daily dose (DDD) or standard unit.
2019-01-26 23:22:56 +01:00
}
\details{
2020-12-22 00:51:17 +01:00
Options for argument \code{administration}:
2019-01-26 23:22:56 +01:00
\itemize{
\item \code{"Implant"} = Implant
\item \code{"Inhal"} = Inhalation
\item \code{"Instill"} = Instillation
\item \code{"N"} = nasal
\item \code{"O"} = oral
\item \code{"P"} = parenteral
\item \code{"R"} = rectal
\item \code{"SL"} = sublingual/buccal
\item \code{"TD"} = transdermal
\item \code{"V"} = vaginal
2019-01-26 23:22:56 +01:00
}
Abbreviations of return values when using \code{property = "U"} (unit):
\itemize{
\item \code{"g"} = gram
\item \code{"mg"} = milligram
\item \code{"mcg"} = microgram
\item \code{"U"} = unit
\item \code{"TU"} = thousand units
\item \code{"MU"} = million units
\item \code{"mmol"} = millimole
\item \code{"ml"} = millilitre (e.g. eyedrops)
2019-01-26 23:22:56 +01:00
}
\strong{N.B. This function requires an internet connection and only works if the following packages are installed: \code{curl}, \code{rvest}, \code{xml2}.}
2019-01-26 23:22:56 +01:00
}
\examples{
2021-05-24 09:34:08 +02:00
\donttest{
2022-08-28 10:31:50 +02:00
if (requireNamespace("curl") && requireNamespace("rvest") && requireNamespace("xml2")) {
2021-05-24 09:34:08 +02:00
# oral DDD (Defined Daily Dose) of amoxicillin
atc_online_property("J01CA04", "DDD", "O")
2021-08-19 23:43:02 +02:00
atc_online_ddd(ab_atc("amox"))
2021-05-24 09:34:08 +02:00
# parenteral DDD (Defined Daily Dose) of amoxicillin
atc_online_property("J01CA04", "DDD", "P")
2019-01-26 23:22:56 +01:00
2021-05-24 09:34:08 +02:00
atc_online_property("J01CA04", property = "groups") # search hierarchical groups of amoxicillin
}
2019-01-26 23:22:56 +01:00
}
}