A computer-based apparatus for dispensing a medication, including: at least one specially programmed computer; and a medication device. The at least one computer is arranged to automatically generate a medication regimen for a patient, the medication regimen including designation of a measure for an orally-administered or injectable medication; or automatically modify a medication regimen for a patient, by modifying a designation of a measure for an orally-administered or injectable medication. The medication device is arranged to: extract the orally-administered or injectable medication from a medication storage element; and non-intravenously dispense an amount of the orally-administered or injectable medication equal to the designated measure or the modified designated measure into a container. The at least one specially programmed computer is part of the medication device, is attached to the medication storage element, or is located remote from the medication device.