in 1838 , david reid , an english scientist , provided the british house of commons with a system to ventilate and humidify the air , and in the mid-1800s , john gorrie , the doctor you mention , invented a cold-air machine for hospital rooms .