Miller later fled from the hospital and spent several days on the run before police again took him into custody. Police also found at his house the ritalin tablets with a street value of $2000.
A probation report showed that Miller had 50 prior convictions and had been sentenced to prison on six previous occasions.
Lawyer Doug Taffs asked Judge Raoul Neave to step back from a jail term, saying that Miller came from a background of deprivation, with a drug addict father and an alcoholic mother.
"It was a dysfunctional family, he was in foster homes more often than not and it's not surprising that he drifted into offending," Mr Taffs said.
"However, he is now committed to kicking a habit that he picked up when he was only 10 years old. We have a person here who is really at a turning point, and the court can have some faith in his ability to comply with a community-based sentence."
Judge Neave accepted that Miller had a poor start to life. "But, at the age of 32 you have pretty much used up all the court's sympathy in that regard," he said.
Setting a starting point at three and a half years, but discounting a full year, the judge said imprisonment was inevitable.
"It's very clear that you have a significant and long-standing drug problem, but it is equally clear that you have been supplementing your habit by supplying others. Those who involve themselves in drug dealing must be aware that they face significant terms of imprisonment."
- The Greymouth Star