Do hospital test work

Andrea
Went to the ER today for my kidney and they want to do a P test to see if I was pregnant and they said no I was not pregnant can those test be wrong if it's too early