I have pneumonia and scheduled for a bronchoscopy and lung biopsy, please advise?

I have been going through many tests, x-rays, etc to determine if I have an autoimmune disease. In the midst of this, it was discovered that I had pneumonia and small nodules in lungs and am now scheduled for a bronchoscopy and lung biopsy. I have smoked marijuana moderately for four years, but didn’t divulge this to my dr because my wife would be devastated to learn this and because of the nature of my job. I should have let my dr know this, but am completely scared to have my wife find out or to lose my livelihood. I haven’t smoked any in two weeks and my bronchoscopy is upcoming. My question is will the dr definitively know that I smoke marijuana and will this info be shared in front of my wife? Again, I realize that my dishonesty with my wife and my doctor is not good, but I am frightened for her to find out and of losing my livelihood.

Age:
Male
Medications: Rabeprozole
General Information: Unexpected weight loss, anemia, gastrointestinal issues, mild pneumonia, small lung nodules, aching joints, mild pain in rib cage and chest, extreme fatigue, dizziness