I agree with Eugene Volokh and Glenn Reynolds that this Virginia bill (forbidding doctors from asking patients whether they have firearms in the house) is an unconstitutional infringement on the doctors’ free speech. I also think it interferes unduly with the practice of medicine, although I worry that a “guide on safety counseling for pediatricians” might also do that, especially if this were to become a canon of medical ethics.
I notice the NRA supports this legislation. (As I’ve said before, I’m a Life Member of the NRA, but I think this is a good time to disclose that again.) I haven’t read the text of the law, but I’m wondering (just wondering, mind you) whether or not the prohibition on talking about guns would also prevent doctors from recommending in favor of firearms ownership. Patients in high crime neighborhoods would be well advised to protect their families, and a doctor might point that out in the interest of the patients’ health.
Professor Volokh touches on this very subject:

…it’s certainly quite possible that some doctors’ political prejudices lead them to give unsound advice, for instance exaggerating the risks to health of keeping firearms in the home, or ignoring the possible benefits (including to the owners’ health) of keeping firearms in the home.

I mean, isn’t protecting your life a health issue too?
There’s that old saying, “an ounce of prevention beats a pound of cure.”
What? Firearms weigh more than an ounce, you say?
That’s true. The average pistol weighs three pounds.
But consider that the alternative might be a burial casket! Even a cursory cost benefit analysis reveals that in contrast to guns, coffins weigh — and cost — far more.
Such grave and weighty decisions should be matters of choice.