If the baby is born in Qatar, first of all you have to get Birth Certificate from NHA then get Passport from embassy then Resident permit from Immigration.

You can search the old thread of QL for details.