It is reasonable to assume that the rash and the pneumonia are related. The distribution of the rash may provide some clues as to what has caused the pneumonia. For example one can have a widespread rash with
measlesMeasles
Measles on the back
Measles virus vaccine
Measles, koplik spots - close-up
Measles/mumps/rubella virus vaccine
Measles/mumps/rubella/varicella virus vaccine
Mmr - vaccine
Rubella, chicken pox, herpes or strep. The result of the biopsies might also provide the answer. You should contact the dermatologist and ask both questions:
1) what did the biopsies show and could it cause pneumonia; and
2) what disease gives the kind of rash you have and can it also cause pneumonia.
One does not have to have an underlying medical problem to get pneumonia. Healthy people can get pneumonia. If you took any medicine, especially an antibiotic before the rash appeared, that would be the likely cause.
If you are still sick, the infection might still be found in, either, your phlegm or your blood.
Good luck.