Upper respiratory infections are usually caused by viruses which are of no consequence. It's the bacterial infections that are a hazard. This includes almost any bacterial infection but specifically
Dental abscesses, throat abscesses like quinsy or tonsillitis, pharyngitis but rarely laryngitis which tends to be viral
Urinary tract infections from cystitis (bladder) to kidney infections
Pneumonia, bronchitis, pleurisy and lung abscesses
Any other abscesses on the body
Dental work and or cleaning is a problem because the mouth is dirty and such work dumps a large quantity of bacteria into the blood stream. This can circulate for some days and if it settles in or around the joint/prosthesis can be almost impossible for the body's natural immune system to take care. This is due to the presence of the foreign body which tends to encourage the bacteria growth. Therefore, an absolute minimum of 14 days prophylactic broad spectrum antibiotics is essential.