## 3 Materials and Methods
### Server Architecture
#### 3.3.1 Web Application: Employee Registration  
Monitoring devices were designed to receive arbitrarily generated four-digit unique identification codes when they were produced. To register an employee who will use a device, the employer must choose a device from the list shown on the web page and create a unique four-digit code to identify the employee. An employee ID with more digits is not suitable to avoid direct association with document numbers. The uniqueness of this ID is verified and, if the record already exists, an error is shown and it will be necessary to choose another ID. Similarly, it is not possible to register more than one employee with the same device. The employee ID must be stored by the company in a safe place so that the employee's personal data can be retrieved later.  
Once the ID is validated, the following information must be provided to proceed with the registration: gender, date of birth, disease history and symptoms, subsidiary, sector, job, job start date, other positions the employee may have at the company (if any), and total time worked in other companies in similar positions. This information is important to consider the total time that the worker has been exposed to the monitored agents. The job must be chosen from a predefined list that was prepared considering professional activities related to civil construction and building maintenance. Fourteen jobs were included: air conditioning technician; bricklayer; carpenter; construction cleaning worker; construction general worker; ditcher; drain man; electrician; gardener; gutter installer; painter; plasterer; plumber; and roofer. The worker's data are stored in MongoDB.  
Concerning disease and symptom history, three lists were prepared considering the quantities measured by the monitoring device (temperature, humidity, dust, noise, and UV radiation). The illuminance level was not considered because its data will be used only by the machine learning module to alert the company about abrupt changes in illuminance, as explained earlier. Flammable gases were also not considered because they are monitored to avoid accidents by indicating immediately that the worker must leave the place when the volume is dangerous.  
The first list presents the more common diseases that can be worsened by exposure to the monitored agents. The second one presents the more common occupational diseases that can be caused by exposure to the monitored agents. The third list, in turn, presents the more common symptoms that may result from those exposures. When registering a worker, all of the applicable options must be marked. In respect to pre-diagnosed diseases, only those that have been diagnosed by a physician should be marked. The symptoms must be recorded by the worker if they are persistent and/or occur often.  
To choose the diseases and symptoms mentioned in this work, appropriate studies were consulted, together with the collaboration of two physicians. The presence of physicians in the system development was useful in selecting the data most relevant to the worker's health care. This assistance was also necessary to validate the relationship between the collected variables and the most relevant diseases to each one of them. The monitoring system should not only be of interest to the worker's self-monitoring but can be a useful tool for health care. In this regard, the interaction between developers and the specialists that potentially will use the application is fundamental.  
The diseases and symptoms, as well as their correlations with the monitored agents, are shown in Table 2.  
Details concerning the use of these correlations to generate alerts and suggestions are presented in the next section.