Very interesting actually.
Right now there is a law that if a doctor prescribes a controlled substance, they have to check the state database of controlled substance prescriptions which lists every controlled substance you've been prescribed.
This is easy to check - did the doctor precribe something and if they did, is there a record of them accessing the database the day prescription was written. So, if the state thinks some doctors are not doing their due diligence, all they need is to run a database check.
Now how are they going to enforce the gun law?
Obviously this will be yet another checkbox in the electronic medical record system, very likely it will be asked even before you see the doctor by the medical assistant or the nurse, the usual million questions they type and click before each visit now (do you drink, do you smoke crack, are you being abused, etc).
Most doctors are employed by large organizations like Partners, UMass, etc, etc.
So, state passes the law.
Partners CEO says, ok, eh, new law, we got to put in one more checkbox for you guys to click on.
End of the year they run reports on all doctors.
After that, who knows.
The organization will probably deal with it the way they deal with other "quality metrics" - punish doctors who fail them. You failed the gun violence metric - get fined $5000.
Of course if they are really hardcore they could do whatever they want - they could pull a few medical licenses just to scare everyone else.