The analysis of organizational structures of healthcare organizations such as University teaching hospitals is a fundamental step toward improving health care services and making more efficient use of available resources. In this study, discharge abstract data from the University of Cagliari teaching hospital was analysed by using techniques borrowed from the theory of complex networks. A bipartite network was constructed by linking the physician and diagnosis fields of the discharge abstract data. The unipartite projection network was then constructed by quantifying the number of diagnoses the connected physicians had in common in one year. Community detection algorithms were then used to identify the 'best' community structure (i.e. organizational subdivisions) for the hospital organization. The identified community structure could lead to improved efficiency with respect to existing departmental divisions. Results show how the theory of complex networks can be a very powerful data mining tool with very promising implications for research in the fields of health care organizations and social networks.