During the testing of the Read Clinical Codes in general practice medical records in Australia, it became apparent that the pharmaceutical section of the codes was not applicable in a country with different brand names, pack sizes and forms. For pharmacoepidemiological studies, structured classification of both morbidity and pharmaceuticals is required for meaningful analysis. The search for a suitable pharmaceutical classification proved fruitless. While the Australian Government has recently adopted the Anatomical Therapeutic Chemical (ATC) Classification as the national standard, this only classifies drugs to the generic level. None of the extended coding systems used in hospital pharmacies, by community pharmacists, or by Government are hierarchically structured. The extension code we have developed, is an analytical algorithm comprising independent fields for: dosage; strength; manufacturer and brand; and pack size. The codes within each field are also structured in a hierarchical manner. The result is an extension code of 21 digits, each digit or group of digits having a meaning. The structure of this classification will allow analysis of any aspect of the drug prescribed. This system is designed for computerised entry of text and transparent coding of the data--not for manual coding on paper nor manual code entry to the computer.