diff --git a/404.html b/404.html index f28efd0f..cdb9559a 100644 --- a/404.html +++ b/404.html @@ -36,7 +36,7 @@ AMR (for R) - 1.8.2.9047 + 1.8.2.9049 + + + + + +
+
+
+ +
+

Use this function to determine the antiviral agent code of one or more antiviral agents. The data set antivirals will be searched for abbreviations, official names and synonyms (brand names).

+
+ +
+

Usage

+
as.av(x, flag_multiple_results = TRUE, info = interactive(), ...)
+
+is.av(x)
+
+ +
+

Arguments

+
x
+

a character vector to determine to antiviral agent ID

+ + +
flag_multiple_results
+

a logical to indicate whether a note should be printed to the console that probably more than one antiviral agent code or name can be retrieved from a single input value.

+ + +
info
+

a logical to indicate whether a progress bar should be printed, defaults to TRUE only in interactive mode

+ + +
...
+

arguments passed on to internal functions

+ +
+
+

Value

+ + +

A character

+

+

vector with additional class ab

+ + +
+
+

Details

+

All entries in the antivirals data set have three different identifiers: a human readable EARS-Net code (column ab, used by ECDC and WHONET), an ATC code (column atc, used by WHO), and a CID code (column cid, Compound ID, used by PubChem). The data set contains more than 5,000 official brand names from many different countries, as found in PubChem. Not that some drugs contain multiple ATC codes.

+

All these properties will be searched for the user input. The as.av() can correct for different forms of misspelling:

  • Wrong spelling of drug names (such as "acyclovir"), which corrects for most audible similarities such as f/ph, x/ks, c/z/s, t/th, etc.

  • +
  • Too few or too many vowels or consonants

  • +
  • Switching two characters (such as "aycclovir", often the case in clinical data, when doctors typed too fast)

  • +
  • Digitalised paper records, leaving artefacts like 0/o/O (zero and O's), B/8, n/r, etc.

  • +

Use the av_* functions to get properties based on the returned antiviral agent ID, see Examples.

+

Note: the as.av() and av_* functions may use very long regular expression to match brand names of antimicrobial agents. This may fail on some systems.

+
+
+

Source

+ + +

World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: https://www.whocc.no/atc_ddd_index/

+

European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm

+
+
+

WHOCC

+ + +


+This package contains all ~550 antibiotic, antimycotic and antiviral drugs and their Anatomical Therapeutic Chemical (ATC) codes, ATC groups and Defined Daily Dose (DDD) from the World Health Organization Collaborating Centre for Drug Statistics Methodology (WHOCC, https://www.whocc.no) and the Pharmaceuticals Community Register of the European Commission (https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm).

+

These have become the gold standard for international drug utilisation monitoring and research.

+

The WHOCC is located in Oslo at the Norwegian Institute of Public Health and funded by the Norwegian government. The European Commission is the executive of the European Union and promotes its general interest.

+

NOTE: The WHOCC copyright does not allow use for commercial purposes, unlike any other info from this package. See https://www.whocc.no/copyright_disclaimer/.

+
+
+

Reference Data Publicly Available

+ + +

All data sets in this AMR package (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) are publicly and freely available for download in the following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, SAS, and Stata. We also provide tab-separated plain text files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please visit our website for the download links. The actual files are of course available on our GitHub repository.

+
+
+

See also

+
+
  • antivirals for the data.frame that is being used to determine ATCs

  • +
  • av_from_text() for a function to retrieve antimicrobial drugs from clinical text (from health care records)

  • +
+
+ +
+

Examples

+
# these examples all return "ACI", the ID of aciclovir:
+as.av("J05AB01")
+#> Class 'av'
+#> [1] ACI
+as.av("J 05 AB 01")
+#> Class 'av'
+#> [1] ACI
+as.av("Aciclovir")
+#> Class 'av'
+#> [1] ACI
+as.av("aciclo")
+#> Class 'av'
+#> [1] ACI
+as.av("   aciclo 123")
+#> Class 'av'
+#> [1] ACI
+as.av("ACICL")
+#> Class 'av'
+#> [1] ACI
+as.av("ACI")
+#> Class 'av'
+#> [1] ACI
+as.av("Virorax") # trade name
+#> Class 'av'
+#> [1] ACI
+as.av("Zovirax") # trade name
+#> Class 'av'
+#> [1] ACI
+
+as.av("acyklofir") # severe spelling error, yet works
+#> Class 'av'
+#> [1] ACI
+
+# use av_* functions to get a specific properties (see ?av_property);
+# they use as.av() internally:
+av_name("J05AB01")
+#> [1] "Aciclovir"
+av_name("acicl")
+#> [1] "Aciclovir"
+
+
+
+ + +
+ + + + + + + diff --git a/reference/as.disk.html b/reference/as.disk.html index 8c9f7d2d..0e9bca45 100644 --- a/reference/as.disk.html +++ b/reference/as.disk.html @@ -10,7 +10,7 @@ AMR (for R) - 1.8.2.9047 + 1.8.2.9049 + + + + + +
+
+
+ +
+

Use this function on e.g. clinical texts from health care records. It returns a list with all antiviral drugs, doses and forms of administration found in the texts.

+
+ +
+

Usage

+
av_from_text(
+  text,
+  type = c("drug", "dose", "administration"),
+  collapse = NULL,
+  translate_av = FALSE,
+  thorough_search = NULL,
+  info = interactive(),
+  ...
+)
+
+ +
+

Arguments

+
text
+

text to analyse

+ + +
type
+

type of property to search for, either "drug", "dose" or "administration", see Examples

+ + +
collapse
+

a character to pass on to paste(, collapse = ...) to only return one character per element of text, see Examples

+ + +
translate_av
+

if type = "drug": a column name of the antivirals data set to translate the antibiotic abbreviations to, using av_property(). Defaults to FALSE. Using TRUE is equal to using "name".

+ + +
thorough_search
+

a logical to indicate whether the input must be extensively searched for misspelling and other faulty input values. Setting this to TRUE will take considerably more time than when using FALSE. At default, it will turn TRUE when all input elements contain a maximum of three words.

+ + +
info
+

a logical to indicate whether a progress bar should be printed, defaults to TRUE only in interactive mode

+ + +
...
+

arguments passed on to as.av()

+ +
+
+

Value

+ + +

A list, or a character if collapse is not NULL

+ + +
+
+

Details

+

This function is also internally used by as.av(), although it then only searches for the first drug name and will throw a note if more drug names could have been returned. Note: the as.av() function may use very long regular expression to match brand names of antiviral agents. This may fail on some systems.

+

Argument type

+ + +

At default, the function will search for antiviral drug names. All text elements will be searched for official names, ATC codes and brand names. As it uses as.av() internally, it will correct for misspelling.

+

With type = "dose" (or similar, like "dosing", "doses"), all text elements will be searched for numeric values that are higher than 100 and do not resemble years. The output will be numeric. It supports any unit (g, mg, IE, etc.) and multiple values in one clinical text, see Examples.

+

With type = "administration" (or abbreviations, like "admin", "adm"), all text elements will be searched for a form of drug administration. It supports the following forms (including common abbreviations): buccal, implant, inhalation, instillation, intravenous, nasal, oral, parenteral, rectal, sublingual, transdermal and vaginal. Abbreviations for oral (such as 'po', 'per os') will become "oral", all values for intravenous (such as 'iv', 'intraven') will become "iv". It supports multiple values in one clinical text, see Examples.

+
+ +
+

Argument collapse

+ + +

Without using collapse, this function will return a list. This can be convenient to use e.g. inside a mutate()):
df %>% mutate(avx = av_from_text(clinical_text))

+

The returned AV codes can be transformed to official names, groups, etc. with all av_* functions such as av_name() and av_group(), or by using the translate_av argument.

+

With using collapse, this function will return a character:
df %>% mutate(avx = av_from_text(clinical_text, collapse = "|"))

+
+ +
+ +
+

Examples

+
av_from_text("28/03/2020 valaciclovir po tid")
+#> [[1]]
+#> Class 'av'
+#> [1] VALA
+#> 
+av_from_text("28/03/2020 valaciclovir po tid", type = "admin")
+#> [[1]]
+#> [1] "oral"
+#> 
+
+
+
+ + +
+ + + + + + + diff --git a/reference/av_property.html b/reference/av_property.html new file mode 100644 index 00000000..db063e26 --- /dev/null +++ b/reference/av_property.html @@ -0,0 +1,359 @@ + +Get Properties of an Antiviral Agent — av_property • AMR (for R) + Skip to contents + + +
+
+
+ +
+

Use these functions to return a specific property of an antiviral agent from the antivirals data set. All input values will be evaluated internally with as.av().

+
+ +
+

Usage

+
av_name(x, language = get_AMR_locale(), tolower = FALSE, ...)
+
+av_cid(x, ...)
+
+av_synonyms(x, ...)
+
+av_tradenames(x, ...)
+
+av_group(x, language = get_AMR_locale(), ...)
+
+av_atc(x, ...)
+
+av_loinc(x, ...)
+
+av_ddd(x, administration = "oral", ...)
+
+av_ddd_units(x, administration = "oral", ...)
+
+av_info(x, language = get_AMR_locale(), ...)
+
+av_url(x, open = FALSE, ...)
+
+av_property(x, property = "name", language = get_AMR_locale(), ...)
+
+ +
+

Arguments

+
x
+

any (vector of) text that can be coerced to a valid antiviral agent code with as.av()

+ + +
language
+

language of the returned text, defaults to system language (see get_AMR_locale()) and can also be set with getOption("AMR_locale"). Use language = NULL or language = "" to prevent translation.

+ + +
tolower
+

a logical to indicate whether the first character of every output should be transformed to a lower case character.

+ + +
...
+

other arguments passed on to as.av()

+ + +
administration
+

way of administration, either "oral" or "iv"

+ + +
open
+

browse the URL using utils::browseURL()

+ + +
property
+

one of the column names of one of the antivirals data set: vector_or(colnames(antivirals), sort = FALSE).

+ +
+
+

Value

+ + +
  • An integer in case of av_cid()

  • +
  • A named list in case of av_info() and multiple av_atc()/av_synonyms()/av_tradenames()

  • +
  • A double in case of av_ddd()

  • +
  • A character in all other cases

  • +
+
+

Details

+

All output will be translated where possible.

+

The function av_url() will return the direct URL to the official WHO website. A warning will be returned if the required ATC code is not available.

+
+
+

Source

+ + +

World Health Organization (WHO) Collaborating Centre for Drug Statistics Methodology: https://www.whocc.no/atc_ddd_index/

+

European Commission Public Health PHARMACEUTICALS - COMMUNITY REGISTER: https://ec.europa.eu/health/documents/community-register/html/reg_hum_atc.htm

+
+
+

Reference Data Publicly Available

+ + +

All data sets in this AMR package (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) are publicly and freely available for download in the following formats: R, MS Excel, Apache Feather, Apache Parquet, SPSS, SAS, and Stata. We also provide tab-separated plain text files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please visit our website for the download links. The actual files are of course available on our GitHub repository.

+
+
+

See also

+ +
+ +
+

Examples

+
# all properties:
+av_name("ACI")
+#> [1] "Aciclovir"
+av_atc("ACI")
+#> [1] "J05AB01"
+av_cid("ACI")
+#> [1] 135398513
+av_synonyms("ACI")
+#>  [1] "acicloftal"        "aciclovier"        "aciclovirum"      
+#>  [4] "activir"           "acyclofoam"        "acycloguanosine"  
+#>  [7] "acyclovir"         "acyclovir lauriad" "avaclyr"          
+#> [10] "cargosil"          "cyclovir"          "genvir"           
+#> [13] "gerpevir"          "hascovir"          "maynar"           
+#> [16] "novirus"           "poviral"           "sitavig"          
+#> [19] "sitavir"           "vipral"            "viropump"         
+#> [22] "virorax"           "zovirax"           "zyclir"           
+av_tradenames("ACI")
+#>  [1] "acicloftal"        "aciclovier"        "aciclovirum"      
+#>  [4] "activir"           "acyclofoam"        "acycloguanosine"  
+#>  [7] "acyclovir"         "acyclovir lauriad" "avaclyr"          
+#> [10] "cargosil"          "cyclovir"          "genvir"           
+#> [13] "gerpevir"          "hascovir"          "maynar"           
+#> [16] "novirus"           "poviral"           "sitavig"          
+#> [19] "sitavir"           "vipral"            "viropump"         
+#> [22] "virorax"           "zovirax"           "zyclir"           
+av_group("ACI")
+#> [1] "Nucleosides and nucleotides excl. reverse transcriptase inhibitors"
+av_url("ACI")
+#>                                                             Aciclovir 
+#> "https://www.whocc.no/atc_ddd_index/?code=J05AB01&showdescription=no" 
+
+# smart lowercase tranformation
+av_name(x = c("ACI", "VALA"))
+#> [1] "Aciclovir"    "Valaciclovir"
+av_name(x = c("ACI", "VALA"), tolower = TRUE)
+#> [1] "aciclovir"    "valaciclovir"
+
+# defined daily doses (DDD)
+av_ddd("ACI", "oral")
+#> [1] 4
+av_ddd_units("ACI", "oral")
+#> [1] "g"
+av_ddd("ACI", "iv")
+#> [1] 4
+av_ddd_units("ACI", "iv")
+#> [1] "g"
+
+av_info("ACI") # all properties as a list
+#> $av
+#> [1] "ACI"
+#> 
+#> $cid
+#> [1] 135398513
+#> 
+#> $name
+#> [1] "Aciclovir"
+#> 
+#> $group
+#> [1] "Nucleosides and nucleotides excl. reverse transcriptase inhibitors"
+#> 
+#> $atc
+#> [1] "J05AB01"
+#> 
+#> $tradenames
+#>  [1] "acicloftal"        "aciclovier"        "aciclovirum"      
+#>  [4] "activir"           "acyclofoam"        "acycloguanosine"  
+#>  [7] "acyclovir"         "acyclovir lauriad" "avaclyr"          
+#> [10] "cargosil"          "cyclovir"          "genvir"           
+#> [13] "gerpevir"          "hascovir"          "maynar"           
+#> [16] "novirus"           "poviral"           "sitavig"          
+#> [19] "sitavir"           "vipral"            "viropump"         
+#> [22] "virorax"           "zovirax"           "zyclir"           
+#> 
+#> $loinc
+#> [1] ""
+#> 
+#> $ddd
+#> $ddd$oral
+#> $ddd$oral$amount
+#> [1] 4
+#> 
+#> $ddd$oral$units
+#> [1] "g"
+#> 
+#> 
+#> $ddd$iv
+#> $ddd$iv$amount
+#> [1] 4
+#> 
+#> $ddd$iv$units
+#> [1] "g"
+#> 
+#> 
+#> 
+
+# all av_* functions use as.av() internally, so you can go from 'any' to 'any':
+av_atc("ACI")
+#> [1] "J05AB01"
+av_group("J05AB01")
+#> [1] "Nucleosides and nucleotides excl. reverse transcriptase inhibitors"
+av_loinc("abacavir")
+#> [1] "29113-8" "78772-1" "78773-9" "79134-3" "80118-3"
+av_name("29113-8")
+#> [1] "Abacavir"
+av_name(135398513)
+#> [1] "Aciclovir"
+av_name("J05AB01")
+#> [1] "Aciclovir"
+
+
+
+ + +
+ + + + + + + diff --git a/reference/availability.html b/reference/availability.html index d776b19c..3ecb18c8 100644 --- a/reference/availability.html +++ b/reference/availability.html @@ -10,7 +10,7 @@ AMR (for R) - 1.8.2.9047 + 1.8.2.9049