Miniature pump for drug delivery