## 2 Materials and Methods
### Method
#### 2.6.6 Patient Registration in the Mobile Application  
For the registration of patients, a mobile application is designed through which monitoring can be accessed in the IoMT system. For this development, a mobile application development platform is selected, such as Android Studio or Xcode. The functional and non-functional requirements of the application are defined. The application's user interface is designed, and the corresponding prototypes are created. Subsequently, the application is developed using the selected programming language and frameworks. Integration and unit tests are performed to ensure the application works correctly [35]. Performance and stress tests are carried out to evaluate the application's ability to handle many users simultaneously. Necessary security features such as data encryption and user authentication are implemented. The specific functionalities of the mobile application for patient registration include the following:  
* The registration of new patients in the IoMT system.
* The capturing of personal patient information, such as her name, age, gender, and address.
* The recording of IoMT devices used by the patient.
* The capturing of relevant medical information, such as medical history and current medications.
* The configuration of alerts to remind the patient to take medication or perform medical examinations.
* The display of patient vital signs monitoring data.
* The ability to make consultations and medical appointments online.  
Java is used as the programming language to develop this work. It is necessary to have an integrated development environment (IDE) installed, such as Android Studio, which is the official IDE for developing mobile applications on Android. Once Android Studio is installed, you can create a new mobile app project and start coding. The code for the patient registration record is presented in Appendix A.  
This code uses the AppCompatActivity class as the base for the app's main activity. The text fields and the registration button are defined on the screen and assigned an ID in the layout file (activity_main.xml). In the onCreate() method, you obtain the references to these interface elements and add a listener to the register button so that it will execute an action when it is pressed [30]. When the registration button is clicked, it checks that all of the fields are complete, and if so, a confirmation message is displayed, and the text fields are cleared. At this point, a code must be added to save the patient data to a database or the cloud. This code only develops user registration. Of course, you can customize the user interface and add more functionality according to the needs of the IoMT system.  
The process for registering patients in the mobile application follows the following steps:  
* Validacion de la informacion ingresada: se deben realizar validaciones en los campos para asegurarse de que se ingresen datos validos y completos. Por ejemplo, se puede verificar que el numero de identificacion tenga el formato correcto y que la fecha de nacimiento sea una fecha valida.
* Envio de la informacion a la plataforma de analisis de datos en la nube: una vez validada la informacion, se debe enviar al servidor en la nube para su almacenamiento y posterior analisis.  
Tools such as Android Studio are used for mobile app development, including an integrated development environment (IDE) for Java and many pre-built graphical user interfaces (GUI) components. It is also possible to use a framework like React Native to develop cross-platform mobile applications with Java.