Pneumonia is an infection of the lungs caused by bacteria, viruses, or fungi, the severity of the condition varies. It is possible for pneumonia to develop as a complication of another infection, such as influenza or COVID-19. Your entire lungs may be affected or only certain areas may be affected.   There are five lobes in your lungs: an upper, middle, and the lower lobe on the right and an upper and lower lobe on the left.   In spite of the fact that pneumonia has many types based on the organism causing it, the disease is generally divided into two groups based on how much of the lungs are affected. The bronchi and bronchioles are the most common sites of bronchopneumonia. Air is brought into your lungs through these tubes. In the absence of effective treatment, this type of pneumonia often spreads to other parts of the lungs. Known as consolidation, lobular pneumonia affects an entire lung lobe and causes congestion or inflammation.   The doctor will begin by asking about your medical history and performing a physical exam, including listening to your lungs for abnormal bubbling or crackling sounds.   The purpose of a blood test is to identify the type of organism causing an infection and to confirm the infection. Nevertheless, precise identification isn't always possible. X-rays help your doctor diagnose pneumonia and determine the extent and location of the infection. However, it cannot tell your doctor what kind of germ is causing pneumonia. Your blood oxygen level is measured by pulse oximetry. You may not be able to take enough oxygen into your bloodstream when you have pneumonia. During a sputum test, a sample of fluid from your lungs (sputum) is taken and analyzed to determine the cause of your illness. Other tests may be ordered as necessary to confirm the pneumonia diagnosis.