You can convert tourist visa to family visit visa if the current sponsor (Hotel I guess) provides you NOC. I have done it for my mother in last month. Now she is on my sponsorship and on family visit visa.

If the current sponsor can not provide the NOC (travel agent case) then you have to exit. But still you can apply for family visit visa before leaving the Qatar, in this case your application will be on hold as the applicant is already in the country on different sponsorship. Then make a exit and the sponsor (you) should go to immigration office to convey them that the person is already left the country and please issue the visa. They will do it in same or in two days. There are people sitting on the last counters and you can to them to do it fast. Others will not understand.

If you need any information, you can call me on 55403347. I hope this helps.