Manong Flor, I think what you had was a Work Visa, but there's a 3-months called an "entry visa" to Qatar and this is still transferable to another company so long it's not stamp in your passport. This 3-months entry visa will give you enough time to undergo processing in the Philippines like Medical, PDOS & POEA prior to coming to Qatar and then go for medical again at Medical Commission & finger printing then visa stamping in your passport-> RP

all in all, that is legal!