If we are going to be name calling, I have one that fits you better than 'anarchist' fits me: LIBERAL.
You are right about political speech vs. professional speech. However, the question is asked in conjunction with others about safety hazards and child development. It is part of the American Academy of Pediatrics plan to promote the lie that homes are safer without guns.
The group suggests doctors ask about guns: "To promote public safety, health professionals and health systems should ask about firearm ownership when taking a medical history or engaging in preventive counseling." . . ." Patients should be provided with information about the risks of having a firearm in the home, as well as methods to reduce the risk, should they continue to choose to keep them."
This is a breach of traditional medical ethics, and as such, has insurance companies worried. Most will not cover a doctor for liability from advice they give about gun safety even if he has training and certifications in it. They do cover them for advice about nutrition, medication, exercise, etc.; because these are areas the doctor is trained in and there is not much chance the doctor will make the patient and his family less safe by his advice.
I doubt that it is ethical for a doctor to campaign for a political point in a regular checkup, but doubt that could be banned. However, it is unethical for doctors to involve themselves in gun safety questions if they are not trained and certified in the field. It is a serious boundary violation.
Almost all states will pull a doctors license to practice for repeated boundary violations. This law just makes what is already unethical, unlawful as well. It will make it easier to keep the nut jobs from making families unsafe.
The best thing to do, however, is to report any doctor who asks the question in the context of safety issues. If he is in an HMO or a PPO, etc., report him there too. If you can find who carries his malpractice insurance report him there as well.
Also carry one of the Physician Qualifications forms with you and ask the Doctor to fill it out and sign it before you will discuss gun safety with him. If he refuses to sign it, initial it and hold it for evidence.
By getting the word out we can stop the anti-civil rights doctors from making people and their homes less safe.