In the final season of Voyager, the EMH is forced to undergo a hearing where his personhood (for the purposes of authorship of a holonovel) is questioned. Ultimately, the arbitrator declined to decide on the question of personhood but did grant the EMH the authorship of the holonovel.
I'm curious why there was even a hearing on this? Wasn't Data already considered a sentient being by the Federation? If so, then they had no problem with the notion of an artificial intelligence being sentient.
Was it because the EMH was a "photonic" -- if so then his critique of the oppression of "organics" over "photonics" was quite prescient.
What's also confusing is that in the final season,
"Joe" gets married to an organic (woman no less, since many suspected he was gay)
which seems to indicate that he is viewed as a sentient/sapient being by the Federation.