A system for optimizing a patient's insulin dosage regimen over time,comprising at least a first memory for storingdata inputs corresponding at least to one or more components in a patient'spresent insulin dosage regimen, and data inputscorresponding at least to the patient's blood-glucose-level measurementsdetermined at a plurality of times, and a processor operativelyconnected to the at least first memory. The processor is programmed at leastto determine from the data inputs corresponding tothe patient's blood-glucose-level measurements determined at a plurality oftimes whether and by how much to vary at least one ofthe one or more components in the patient's present insulin dosage regimen inorder to maintain the patient's futureblood-glucose-level measurements within a predefined range.