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:
>>> 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)¶
Calculate the check digit for the BASE10 AIC code.
- stdnum.it.aic.compact(number)¶
Convert the number to the minimal representation.
- stdnum.it.aic.from_base32(number)¶
Convert a BASE32 representation of an AIC to a BASE10 one.
- stdnum.it.aic.is_valid(number)¶
Check if the given string is a valid AIC code.
- stdnum.it.aic.to_base32(number)¶
Convert a BASE10 representation of an AIC to a BASE32 one.
- stdnum.it.aic.validate(number)¶
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)¶
Check if a string is a valid BASE10 representation of an AIC.
- stdnum.it.aic.validate_base32(number)¶
Check if a string is a valid BASE32 representation of an AIC.