before refact the medication model