Medical history, drug exposure and the risk of psoriasis