Factors affecting patient satisfaction in hospitals