In order to study the clustering algorithm based on density grid, the performance evaluation index system of hospital economic management under the application of electronic health management system is constructed. Firstly, this work designs the basic architecture of electronic health management system, classifies and screens the process of index system of electronic health management system, compares the clustering algorithm based on density grid with the simple clustering algorithm based on density or grid, and then applies it to the performance evaluation index system of hospital economic management. According to the principle of Mitchell scoring method, the expert questionnaire of hospital economic management performance evaluation index system was designed, and Delphi method was used to evaluate the candidate indexes from the three dimensions of right, legitimacy, and urgency. The results show that, compared with simple network clustering algorithm and density clustering algorithm, the clustering algorithm based on density network produces higher purity (94% VS 73% VS 67%) and lower entropy (0.9 VS 1.4 VS 1.54), which effectively saves memory consumption, and the difference is statistically significant (P < 0.05). The core indicators with scores above 4.5 in both dimensions include budget revenue implementation rate, budget expenditure implementation rate, implementation rate of special financial appropriation, asset-liability ratio, hospitalization income cost rate, medical insurance settlement rate, average cost of discharged patients, and drug proportion. The coefficient of variation of the first grade index is between 0.05 and 0.14 and that of the second grade index is between 0.05 and 0.15. Clustering algorithm based on density network has higher purity and lower entropy, which can effectively save memory consumption. The performance evaluation index system of hospital economic management finally determines 6 first-level indexes: budget management, financial fund management, cost management, medical expense management, medical efficiency, medical quality, and 25 second-level indexes.