Computer-assisted prescription or delivery of medication