This paper describes the application of computer-based techniques within an intelligent, knowledge-based framework to the management of diabetes. The objectives are to structure data collection and storage so that the relevant patient-specific data are collected and made accessible as needed, and to provide clinical decision support on either a day-by-day or longer timescale as appropriate; these objectives relating to both hospital clinic and general practice. For longer-term management, a prototype rule set (greater than 500 rules) has been developed (coded in Sigma PROLOG), validated and tested on patient data. The data collection programs (written in SCULPTOR) to feed the ruleset have been tested in the hospital clinic and compared with the resident data collection system for usability, and impact on the running of the clinic. Links between the data collection programs and the ruleset program have been written and tested. The computer system will also incorporate a module, combining knowledge-based advisory system and glucose/insulin model as patient simulator, that can be tested as a potential decision aid for adjusting insulin dosage on a daily basis.