The public health system has restricted economic resources. Because of that, it is necessary to know how the resources are being used and if they are properly distributed. Several works have applied classical approaches based in Data Envelopment Analysis (DEA) and Stochastic Frontier Analysis (SFA) for this purpose. However, if we have hospitals with different casemix, this is not the best approach. In order to avoid biases in the comparisons, other works have recommended the use of hospital production data corrected by the weights from Diagnosis Related Groups (DRGs), to adjust the casemix of hospitals. However, not all countries have this tool fully implemented, which limits the efficiency evaluation. This paper proposes a new approach for evaluating the efficiency of hospitals. It uses a graph-based clustering algorithm to find groups of hospitals that have similar production profiles. Then, DEA is used to evaluate the technical efficiency of each group. The proposed approach is tested using the production data from 2014 of 193 Chilean public hospitals. The results allowed to identify different performance profiles of each group, that differs from other studies that employs data from partially implemented DRGs. Our results are able to deliver a better description of the resource management of the different groups of hospitals. We have created a website with the results (bioinformatic.diinf.usach.cl/publichealth). Data can be requested to the authors. © 2016, Springer Science+Business Media New York.