There is no simple answer. If it was elective surgery, or even necessary surgery but none-urgent, then the most likely should have done a pregnancy test if the anaesthesia, etc. posed a threat if you were pregnant. But if it was emergency or urgent surgery, or surgery where there was no reasonable alternative in any event, there would have been no need to do this--if you needed the surgery no matter what, there would have been no grounds to delay or deny it, and indeed, delaying or refusing it could have itself been malpractice. You need more medical information before asking the legal question: that is, you need to find out from reputable medical sources (e.g. doctors) whether for this surgery, this anaesthesia, and for the specific circumstances under which you had the procedures, it was medically negligent, or careless, to not adminster the pregnancy test. When you know that answer, then the next question becomes whether you would have a case.