OK,I would like to tell you,generally speaking, they shares the same meaning. But, they differ from each other in feelings.The following answers based on my comprehension:
你吃药了吗? this is a pure quention which shows no emotion.
你吃没吃药?can be taken as a question ,or as a teasing"are you ok,there must be some errors in your mind"
你有没有吃药?somehow implies that I am going to give you some pills
你吃药了没有?shows my concern on you(if you really had a disease )