# Clustering of a Health Dataset Using Diagnosis Co-Occurrences
## 2 Materials and Methods
### Study Design, Setting and Population  
The population under study in this paper is the whole population of patients attending the ED of Troyes hospital from 1 May 2017 to 28 April 2019. Troyes hospital is the largest hospital in the Aube Department of Eastern France, with a population of 310,000 inhabitants and a medical density of 234.1 physicians per 100,000 inhabitants, placing it in the lowest quarter of all the Departments in France. The hospital has 442 medical beds, 127 surgical beds, and 63 beds dedicated to gynecology/obstetrics. In 2018, there were a total of 62,082 ED visits, and an average rate of use of 250 to 330 visits per 1000 inhabitants within the hospital's catchment area. With annual ED visits higher than 45,000, according to national statistics [25], the ED of Troyes hospital is classed as having a very high volume of activity. During the 2-year study period, 120,718 visits to the ED were recorded, involving 75,279 patients; 114,391 of these visits (94.76%), involving 72,666 patients (96.53%), are retained for the present analysis based on the presence of at least one diagnosis. A total of 6199 visits (5.16%), involving 5459 patients (7.25%), were excluded from the clustering analysis due to missing diagnostic codes, and a further 208 (0.17%) because of an insufficient number of diagnosis occurrences, defined here as a minimum of 10 to minimize sampling bias. The study focuses on the general population without stratification, to keep the assessment as general as possible. ED visits are described according to the characteristics of the patient, i.e., their age, gender, visit frequency, visit prescription, triage circuit followed at arrival, hospital admission and visit diagnosis. The triage circuit can be either the long circuit (normal evaluation and management), or the short (fast-track) circuit, which is a pathway for assessment and treatment of low-severity patients (usually minor injuries or benign medical conditions). Thus, the characteristics of the 114,391 ED visits can be described with a mean age of 39.84 years (with a large standard deviation of 27.40 years), 50.86% females, a mean number of visits per patient of 1.57, a mean number of medications per visit of 1.45 (with a large standard deviation of 2.87), a probability of biological exams of 42.9%, of radiological exams of 31.7%, a ratio of short circuit to long circuit of 1.81, and a 22% hospitalization rate. The diagnosis, used here as a central active variable for clustering, is represented using the International Classification of Diseases 10 th revision (ICD10), which is a classification documented by the World Health Organization (WHO) that uses an alphanumerical representation with a letter followed by a series of 2 to 6 numbers depending on the level of precision of the diagnosis. Its hierarchical representation can be divided into 22 chapters (accounting) with blocks of categories which are subsets of chapters, categories of 3 characters, sub-categories of 4 and 5 characters, and complete codes [26]. For example, the block A00-A09 is a block from the chapter A00-B99 _Certain infectious and parasitic diseases_ and it contains _Intestinal infectious diseases_ diagnoses, which begin with A0 followed by a number between 0 and 9 and any number series after that (of 0 to 4 numbers). The number of existing ICD-10 codes at several hierarchical levels is not well referenced as the manual provided by the WHO does not indicate them [27]. The number of complete codes is above 155,000 [26], the number of categories is limited to 2600, and the number of block of categories varies based on how the categories are grouped, but a possible set with 263 blockshas already been used in the literature [21]. For the ED dataset used in this 2-year study, 2890 complete codes were found, with 1017 categories and 162 blocks of categories. An appropriate description level of the diagnosis is required to ensure adequate statistical power with enough occurrences of each diagnostic label, while enabling precise identification of the health problem.