Several months ago I nearly collided with one of my patients at the subway entrance. She was so busy lighting a cigarette that she didn’t even notice me. I, on the other hand, was shocked to see her mid-drag. A mere two days earlier she had been sitting in my office telling me how she hadn't smoked in more than six months.

My first thought was that she must have fallen off the wagon in the intervening 48 hours. But then I considered a more unsettling explanation: This patient had handed me a big fat lie. As I entered the subway, I began to wonder what could have gone wrong during our last visit. After all, shouldn’t your doctor’s office be the one place where you really want to be honest about any harmful habits?

There is very little research on why or how often patients keep secrets that might help a doctor recognize what’s going on. As one colleague put it: “Isn’t that the whole point? To deceive me? So how am I supposed to know when it is happening?”

I found myself running through in my head the possibilities for this particular patient’s deception.

Maybe she had hidden her ongoing tobacco use to circumvent what she expected would be my disapproval or, worse, wrath. I try hard to make my office a safe haven where anyone can feel comfortable disclosing anything. But perhaps an errant forehead crease or raised eyebrow had given her the impression that this was not so.

Or maybe we had discussed her smoking too many times and she had grown tired of talking about it. Recently, a patient told me that since I had first warned him five years ago that his sexual behavior put him at risk for contracting HIV or another sexually transmitted disease and he was still fine, he would prefer that we drop the subject altogether.

It was possible that my patient’s untruth was a byproduct of a messed-up insurance system. It is not uncommon for patients to request that I keep a particular piece of health information out of their medical record. Could it be that her concern about being closed out or priced out of a plan had motivated her to not share an important fact?

Finally, her response could have been pure and simple denial, a case of altered reality brought on by an intense desire to have things be different.

What little research does exist shows that the greater the social stigma connected with a behavior, the less likely patients are to disclose it to their doctors.

For example, in a survey of pregnant women, urine tests for tobacco byproducts revealed that 34 percent of women who said they didn’t smoke actually did. And people checking into a coronary care unit are more likely to underreport smoking than people at a routine doctor's visit. Similarly, alcoholics — especially those who relapse — often underestimate their drinking, whereas numerous studies show that moderate drinkers accurately report, or even exaggerate, their weekly alcohol intake.

Teens have the highest rates of deceiving their health providers, which makes sense because there is probably no phase of life where one is more fearful of judgment or persecution. A recent study of low-income teens showed that they were 35 times as likely to use illegal drugs (as proved by hair analysis) as to report using them.

I asked my 55-year-old friend Mark, a Type 1 diabetic, whether he ever kept secrets from his doctor. On occasion, I see him eat or drink things that would probably cause his doctor some consternation.

Mark replied: “You know, I used to sometimes not tell my doctor things because there is an implicit judgment. I would think: I really shouldn’t tell him or her that I am eating or doing X, Y or Z because it is so lame and it is bad and stupid. But then I realized the irony of it: I was there precisely to keep myself alive.”

Barbara Bishop, a seasoned family physician and the chair of her department at the local hospital, offered an example of how patients’ secrets can vex doctors and potentially harm those who harbor them.

A diabetic woman in her practice had blood sugars that suddenly veered out of control. Bishop wasted weeks trying to change her medications, to no avail.

Eventually the woman told her that her husband, who had been the family cook, had become so abusive that she was skipping meals to avoid him. When she finally learned about the domestic violence, Bishop was able to offer her patient the help she really needed.

Bishop is not sure whether fear of losing insurance coverage affects patients’ truthfulness, but she told me that her safeguard is to put sensitive information in a confidential area of the chart that cannot be seen by insurers or office staff. The other doctors in her practice do the same.

Mark has not given the insurance issue much thought. “What I need to be honest is to have a doctor who does not feel judgmental and who gives me facts and information. If there is a hazard related to what I am doing, I want to hear about it without moral implication. Then I can make my own educated decision. I now realize that if I don’t tell my doctor, I am taking a risk without knowing fully what that risk is.”

Studies support Mark’s comments: When people clearly see a benefit to disclosure, they will tell all. In a lung cancer screening program where the medical staff clearly explained the increased risk of lung cancer in smokers and the advantages of more intensive screening in this group, 100 percent of participants were truthful about whether they smoked.

I thought again about the patient I had nearly run into in the subway entrance. Many times in the past I had “framed the question” (to borrow a term from the behavior change literature) and explained, from a medical perspective, why it mattered whether she smoked.

But maybe, after a while, I stopped doing this and just started asking her for an update. Had we gotten to a point where she was forgetting why the question was being asked — or why an honest answer really mattered?

For her next visit, I resolved to do things differently. And the next time a doctor asks you for some sensitive information, maybe you can help him or her out by asking: “What’s it to you, anyways?”

Miller is a primary-care physician based in San Francisco and the author of “The Jungle Effect.”