This study aims to determine the influence of selected social and health factors on the quality of inpatient treatments when regional health organizations use stacking ensemble model. The proposed procedure is based on the logistic regression method, which is used for direct prediction in the case of good fitting data and impossibility of including aggregation of classification algorithms but also in the opposite case, for fine calibration to obtain prediction. In opposite case, the procedure uses classification algorithms and several filter methods which initially rank individual factors according to their importance to reduce the dimensionality of problem and, in such way. obtaining one optimized classification prediction. The proposed procedure is trained using one part and tested using another part of dataset from case study which enables the generalization of the solution to the set goal and is verified by the Kaggle dataset Brest cancer. Case study was conducted using the real data acquired in the region connected to the city of Nis, Republic of Serbia. The obtained results show that the proposed model achieves better results that each of methods included in this stacking ensemble-regression and classification used individually.