Calculate last dosis working fine.