It is true that Data was designed to mimic human sentience and the Doctor was not.
And it's clear that in Caretaker, the Doctor was not sentient. However, if you accept sentience of mechanical creatures in episodes like Evolution and Emergence gained sentience, then it follows that a program that is able to rewrite its own wiring according to new situations it comes across is capable of gaining sentience. (At least in the Trek universe)
It would have been cool if at some point The Doctor cited the precedent of Data vs Maddox to make the claim to treatment as a sentient being.