Post-stroke cognitive impairment is a common complication of stroke. It reduces the rehabilitation efficacy and disease prognosis of patients. Many factors may be related to cognitive impairment after stroke, including demographic (e.g. age, gender and educational level), history (e.g. hypertension, diabetes, hyperlipidaemia, smoking and drinking) and examination characteristics (e.g. lesion nature, location, side and inflammatory markers). However, most existing methods are qualitative evaluations of independent factors, which ignore the interaction amongst various factors. In addition, no further research on the risk prediction of cognitive impairment after stroke has been conducted. We use a hybrid deep learning model of XGBoost and deep neural network to predict the risk of cognitive impairment in stroke patients for studying the effects of physiological and psychological factors on such a risk. We firstly consider 46 original input features and their cross-product transformation as the interaction amongst binary features, and then, we compare the proposed model with several benchmarks on the basis of various indicators to prove its effectiveness. Lastly, we identify the first 36 factors that affect the risk of fracture in diabetic patients.