# Application of Machine Learning Techniques to Predict a Patient's No-Show in the Healthcare Sector
## 2 Materials and Methods
### Data Preprocessing
#### 2.2.3 Data Enrichment  
In order to add more information to the collected data, some other databases were combined with the current database. Furthermore, new columns were created based on the existing ones. The following items describe this process. 1. Disease Data: As the initial database only contained the patient's disease code, a new database with the names of related diseases was combined. With the inclusion of the disease names, data visualization and interpretation became more objective. The database with the International Classification of Diseases (ICD) was extracted from a file in PDF format on the government portal [26], and transcribed to a file in JSON format. Initially, we adjusted the ICD registered in the database to the disease codes--extracted from the government portal--for the data merging. After the code standardization and data merging, we identified 37 diseases with different ICDs, and 1662 medical records without the registered disease code. According to the graph in Figure 2, we could check that some diseases stand out to the number of appointments. _Global Developmental Disorders_, _Other General Symptoms and Signs_, and _Child Autism_ together, corresponded to 66.31% of consultations carried out at the CER in 2019. 2. Weather Conditions Data: With the purpose of identifying whether weather conditions could influence patient absenteeism, we entered precipitation and temperature data into the dataset. We extracted the historical data with regard to the year 2019, from the National Institute of Meteorology (Inmet) [27]. INMET's database is feeding every 1 h and for each day presents 24 measurements of temperature and precipitation. Another relevant factor regarding the obtained data, the measurements are carried out only in the city of the meteorological centre. Since that Univali's CER serves the region with eleven cities of AMFRI (Association of Cities of Foz do Rio Itajai) [28], only Itajai has meteorological data from this data source. The measurement dates from the INMET dataset have converted to day/month/year format--they were in the  
Figure 2: Higher incidence diseases. US format, month/day/year--for data standardizing. Atmospheric pressure, speed and direction of the wind and air humidity data were discarded from the original dataset, keeping only the temperature and precipitation data. After data validation and standardization, the mean and maximum temperature and precipitation for each day were calculated and merged with the dataset of the medical records. The highest average temperature found was during April and November, remaining around 25 degrees. The temperatures registered were highest in April and October, approaching 34 degrees. Finally, a qualitative value has been assigned to represent the temperature and precipitation range. For temperatures, five classifications had considered: very cold, cold, mild, warm, and very warm. These classes represent temperatures less than or equal to 15 degrees, greater than 15 degrees, greater than 22 degrees, greater than 27 degrees and greater than 32 degrees, respectively. As for precipitation, we entered the following values: no rain, weak, moderate, strong, and very strong. This classification refers to the maximum precipitation of the day that has been less than 1 mm, greater than 1 mm, greater than 2.5 mm, greater than 10 mm and greater than 50 mm, respectively. Other Related Attributes: We have created new attributes for the dataset based on the existing ones. From the date of birth included in the data, we derived the patients' ages. In the same way, we extracted the month of the appointment from the date of the registration. Finally, we obtained the appointment shift based on the scheduled appointment time. The age attribute allowed us to analyse whether there is a relationship between the patient's age and the rate of abstention from appointments. The month of consultation helped us identify a correlation with the level of abstentions being severity in the months in which there is a drop in temperatures.