I had published an article in a journal about an invention I was working on with my co-author. Now that we have been able to finish our project and came up with the drug, we want to apply for a patent on it in India. Can that article be regarded as a prior publication, and in that case can prior art by the same inventors be used to refuse a patent?
Generally speaking, it does not matter who the authors of a prior art document are. If a prior publication was made by the inventors applying for a patent themselves, it is generally just as novelty-destroying as somebody else's relevant publication.
In some countries, notably the US, a "grace period" of 6-12 months exists, during which inventors may still apply for a patent on subject-matter previously disclosed by themselves: http://en.wikipedia.org/wiki/Novelty_%28patent%29#Grace_period
However, most countries do not have such a grace period. I do not know what the specific rules are in India.
So, unfortunately, I think your own prior publication of your invention will preclude you from obtaining a patent on it in most jurisdictions.
If your journal publication was within the last 6-12 months, your best course of action might be to apply for a patent in those jurisdictions which offer a grace period. Also, frankly, given the mistake which has already been made, seeking professional representation would probably also be advisable.
Unfortunately, the patent game does not provide the room to wait and see how a project turns out in the long run. You invent, you file, then you publish.
Additional remark: However, you might want to consider whether any substantial improvements over the published subject-matter were necessary to actually realize the drug during the later stages of the project (i.e., any practical aspects or non-disclosed modifications, even if they may seem "minor" at first glance). If these were not described in the journal publication, you might still be able to obtain a patent by claiming these additional, non-published aspects.
Yes, this analysis is correct.
Our published article would be prior art against yourself, but there is an important regulator: the way you disclosed your invention in your published articles. If it is not detailed enough or if it is not enough to make other parties able to know what the invention is and be able to make the invention, then you can still file your invention and this publication would not deprive your invention it's novelty.
It's important to remember that a patent is the how-to part -- "the present invention teaches ..." -- not the what-we're-doing part, which could be "investigating how such-and-such might be done" which might even include "so far we've tried 27 things and failed."
What a disclosure cannot include, and not run afoul of the various grace periods, is a descripton what worked and how you actually did the what-worked.
If you look at a collection of disclosures I did for a while they related to simulating rotating masses using software to make the electric grid more stable with non-rotating sources of generation as well as loads which did not demonstrate some form of angular momentum. If I opined ("wrote a paper about") "the problem with modern generating sources is that many of them lack angular momentum" that's just words and the problem to be solved -- the "the present invention teaches ... how to implement angular momentum in a non-rotating generator" part -- isn't disclosed.
All that said, consult competent legal advice. As inventors we're too predisposed to think in our own favor for you to answer this question for yourself.
Finally, when working on something which may be patentable it really is best to not say anything. It doesn't feel as good as talking about your work, but unless you're very good about not disclosing anything that may hurt you in the future, it feels a lot better in the long run.