There's a prosecution going on in Texas that sounds so corrupt, and could have such a chilling influence on the pursuit of quackery nationwide, that it cannot be ignored. I urge you to read the story in the Times, but here's a brief recap.
In Kermit, a small Texas town, two nurses at local hospital became concerned about the practices of one of the physicians, Dr. Rolando G. Arafiles, Jr. Among the alleged practices were the improper peddling of herbal medicines to hospital patients, and the performance of (sometimes unorthodox) surgical procedures without the appropriate privileges to do so. Anne Mitchell, RN, the nurse against whom charges are still filed, went to the hospital with her concerns and was fired, an act for which state reprimanded the hospital. Given the lack of response from the hospital, she went to the state medical board. When Dr. Arafiles found out that there was a complaint against him, he went to a local sheriff buddy of his, who tracked down the confidential report to the state medical board, and used the information in it to deduce the identity of the filers.
And then he charged them with a crime.
The alleged crime was a trumped up bullshit charge for misuse of state data---which is impossible, since the nurse used the hospital data to refer cases to the state medical board. I'm not a lawyer, but it's hard to see what could possibly be wrong with what Mitchell did.
In fact, the nursing code of ethics specifically requires nurses to advocate for patients, including going to higher authorities when necessary.
There is no "rule" that a code of ethics must square with all laws. In this case the ethical code probably does agree with the law, at least the spirit, and probably the letter.
Reading about the actions of these local officials is like watching Blazing Saddles---it's a small town, with a few people in control of everything, and willing to contort the meaning of the law into any shape they wish. If it weren't for the real people involved, it would almost be funny.