## 3 Design and Implementation of the Solution  
The primary step in the design process was to determine the requirements to be fulfilled--particularly to ensure the correct transfer of selected information from the mobile device to the database in real-time and display the progress of communication. The requirements were set as follows:  
* Selection of a suitable NFC reader;
* Picking a suitable microcomputer to implement communication between the mobile device, the database, and the display;
* Choosing a proper display that can display the required information;
* Schematic design, PCB design, and implementation for NFC module;
* Design of a suitable box for the implemented NFC module. The hardware part of the solution is focused on the implementation of the NFC module, which will facilitate patient movement in the department of clinical and radiation oncology using wireless NFC communication. The implementation used a module with an integrated circuit ESP8266, PN532, and a TFT display. The design of the module is based on theoretical knowledge of NFC communication, carried on between a mobile device and an NFC reader. An essential part is the communication of the NFC module prototype with the database in real-time, which will be used to display patient arrivals to the department. Subsequently, the database will be able to work with the data it has about the patient and will be able to provide further improvements for the department and, of course, for the patients. The ESP8266 module includes a set of TCP/IP communication protocols that enable communication over a Wi-Fi network. The module includes a separate processor and memory, allowing it to function as a stand-alone unit. The Arduino IDE was used to program the gadget. The PN532 is a highly integrated transmission module enabling contactless communication at 13.56 MHz. It allows communication via I2C, SPI, and HSU. The reader meets our requirements primarily because of the possibility of implementing communication with devices containing Android with support for card emulation. We use the I2C bus for the communication between the PN532 and the ESP8266 in the NFC module. The TFT colour display (1.44\", 128 \(\times\) 128 pixels) is a type of LCD that we chose primarily for its ease of use. The display provides options to plot or display individual information using TFT and Adafruit libraries. The operating voltage is equal to \(V=3.3\) V. The proposed block diagram of the NFC device is shown in Figure 4.  
The block diagram shows the information flow, based on the principle of card emulation by a mobile device (HCE). The NFC reader broadcasts the AID, which is received by the mobile device, based on the active mode of operation. The mobile device sends selected data as part of NFC communication to the reader using the application. The received data is then sent to the ESP8266 via the I2C bus for processing. The data is processed by ESP8266 programmed by us and then sent to the database in real-time. The ESP3266 waits for the correct assignment of a value to the record and then shows the result of the operation on the display. The display, which cooperates via the SPI bus, shows the entire progress of data acquisition. After the correct setting and verification of the functionality of the selected components, the printed circuit board itself was designed. The circuit is powered by a unified micro-USB connector that works with a voltage of \(V=5\) V. The location of the individual components was conditional on the NFC reader being close to the display. The condition was set to prevent the patient from connecting their mobile device incorrectly. The resulting NFC module was implemented in a plastic box that was designed and printed using 3D printing technology. The final product is shown in Figure 5. The software part of the NFC module prototype was developed and debugged using the Arduino IDE. Control of the NFC counter is provided by the libraries PN532.h, PN532_I2C.h, and wire.h. The primary step was to create a PN532_I2C class object with the Wire attribute.