# stdnum.it.aic

AIC (Italian code for identification of drugs).

AIC codes are used to identify drugs allowed to be sold in Italy. Codes are issued by the Italian Drugs Agency (AIFA, Agenzia Italiana del Farmaco), the government authority responsible for drugs regulation in Italy.

The number consists of 9 digits and includes a check digit.

More information:

- https://www.gazzettaufficiale.it/do/atto/serie_generale/caricaPdf?cdimg=14A0566800100010110001&dgu=2014-07-18&art.dataPubblicazioneGazzetta=2014-07-18&art.codiceRedazionale=14A05668&art.num=1&art.tiposerie=SG

    >>> validate('000307052')  # BASE10 format
    '000307052'
    >>> validate('009CVD')  # BASE32 format is converted
    '000307052'
    >>> validate_base10('000307052')
    '000307052'
    >>> validate_base32('009CVD')
    '000307052'
    >>> to_base32('000307052')
    '009CVD'
    >>> from_base32('009CVD')
    '000307052'

stdnum.it.aic.calc_check_digit(number: str) → str

  Calculate the check digit for the BASE10 AIC code.

stdnum.it.aic.compact(number: str) → str

  Convert the number to the minimal representation.

stdnum.it.aic.from_base32(number: str) → str

  Convert a BASE32 representation of an AIC to a BASE10 one.

stdnum.it.aic.is_valid(number: str) → bool

  Check if the given string is a valid AIC code.

stdnum.it.aic.to_base32(number: str) → str

  Convert a BASE10 representation of an AIC to a BASE32 one.

stdnum.it.aic.validate(number: str) → str

  Check if a string is a valid AIC. BASE10 is the canonical form and is 9 chars long, while BASE32 is 6 chars.

stdnum.it.aic.validate_base10(number: str) → str

  Check if a string is a valid BASE10 representation of an AIC.

stdnum.it.aic.validate_base32(number: str) → str

  Check if a string is a valid BASE32 representation of an AIC.