Already in deep distress, the patient was rushed last week to a hospital in Northern California, severely ill and unable to breathe on her own.

Doctors at the University of California, Davis Medical Center, near Sacramento, provided the woman with critical care but also considered an unlikely diagnosis: infection with the coronavirus.

Hospital administrators said they immediately requested diagnostic testing from the Centers for Disease Control and Prevention, but the procedure was not carried out because the case did not qualify under strict federal criteria: She had not traveled to China and had not been in contact with anyone known to be infected.

The announcement on Wednesday that the woman was indeed infected left health officials in California searching for people she may have exposed to the virus and testing the medical workers who have treated her. The case has raised difficult questions about whom to test and whether the nation is prepared to keep the virus under control.