It is usually considered offensive to pass gas intentionally in public. Whether intentional or not, however, passing gas can cause embarrassment. You can always communicate your apologies in advance when you are visiting a doctor in the case that you pass gas during an examination. A medical professional should understand and pardon a need to release yourself.