Based on the information it seems that you are probably having "Pneumonia"
Here are some details about Pneumonia.
Pneumonia is an inflammation of the lungs that is usually caused by infection, and the inflammation (swelling,due to gathering of fluid) will cause decrease space in lungs for air hence fourth you will feel short of breath, the nail are bluish means your lung is not able to get enough oxygen
to blood and lack of oxygen makes the nail bed appear blue as well as the chills
are associated with infection.
Causes are mainly
PLEASE TAKE MEDICAL CARE AS SOON AS POSSIBLE
here is mostly physician will do
1) physical exam
2) check OXYGEN in blood by pulseoxymeter and will put you on oxygen if seems necessary
2) will ask for X-RAY
3) will do sputum culture
& sensitivity (to find out causative agent like kind of bacteria)
4) will do some blood test
as well as culture and sensitivity.
5) Based on the scenario , may be need for intravenous drug / may prescribe the antibiotic which have broad coverage in terms of bugs/ bacteria it can fights.
6) Once the culture and sensitivity test arrives physician may need to change the drug to be more specific protection of that agent.