Doctors can often tell if someone is going to have difficulty with breathing by examining the upper body. If the rib cage is small or fixed in such a way that it can't expand on breathing, this can compromise respirations and the amount of oxygen that is taken in. This evaluation can be done with x-rays and with imaging such as computed tomography imaging, or CT scans.
Tests called pulmonary function tests evaluate how much air a person can hold in their lungs when they take a deep breath. Finally, if doctors are concerned about the amount of oxygen actually in the blood, an arterial blood gas, can measure this. This is a sample of blood that is taken from the artery, the blood vessels leaving the heart and lungs, carrying oxygenated blood, as opposed to the blood from the veins, where samples are usually taken. The blood in the veins is "used" and is returning to the heart and lungs for oxygen.