A computer-based apparatus for dispensing a medication, including: at least one specially programmed computer; and, a medication device. The at least one specially programmed computer is arranged to calculate or modify, for a patient, a dosage for a first orally-administered or injectable medication and a constraint related to administration of the dosage by using a current point in time, a point in time at which a previous dosage of the first orally-administered or injectable medication was administered, information regarding a second medication prescribed for the patient, or real time physiological data for a patient. The medication device is arranged to: extract the first orally-administered or injectable medication from a medication storage element; and non-intravenously dispense the first orally-administered or injectable medication in accordance with the dosage and the constraint.