1. Introduction
In recent years, the Internet of Things (IoT) has expanded into diverse sectors of society. Its connectivity, data exchange capabilities, and integration of wireless networks and sensors into processes enable applications across multiple domains. The “smart” concept has evolved from personal devices to involve entire industries, including smart restaurants, smart cities, smart agriculture, smart hospitals, and smart banks.
In the food industry, IoT supports processes from food preparation to operational management. Mobile applications have transformed ordering, while kitchens employ sensor networks to monitor equipment such as refrigerators, ovens, and stoves, enabling predictive maintenance. Inventory management and environmental monitoring in warehouses are also critical [
1]. These tools ensure quality in food and restaurant services.
Hospital food service management faces multiple challenges, including high levels of waste, estimated at between 30% and 65% of meals served [
2], manual recording errors, and limitations in hygiene and traceability [
3]. Although recent advances in quality monitoring through IoT and data analytics have been reported [
4], integration with clinical diet management remains limited. In this context, the Food is Medicine initiative demonstrates that nutrition is essential to reducing hospital readmissions and healthcare costs [
5].
In hospitals, catering services handle diet personalization, menu planning, coordination with nutritionists, and meal distribution. Operations may be managed by in-house staff or outsourced companies. Along with advanced medical equipment and skilled personnel, technology integration is essential for service innovation. However, research on IoT in hospital catering is scarce compared to sectors like tourism or commerce. As highlighted by [
6], the pandemic accelerated the urgency of technological adoption in catering services, where digital tools and innovation models improved efficiency, hygiene, and sustainability. This reinforces the need to extend such innovations into the hospital context, where operational efficiency directly impacts patient safety and clinical outcomes.
Technological adoption in healthcare aims to enhance service quality and patient outcomes. Nutritional care is critical, as [
7] reports higher rates of postoperative complications and mortality in patients at nutritional risk. Proper food management—supported by hygiene and safe preparation—can prevent illness. Food quality depends on the production chain from field to table [
8], while transportation, facilities, equipment, and personnel also influence outcomes. Hygiene must be controlled throughout the process [
9], and monitoring should include data collection for traceability and continuous improvement. As noted by [
10], hospital accreditation standards in Latin America and the Caribbean require diet lists tailored to pathologies, designed and supervised by nutritionists.
Personalized nutritional care is integral to treatment, and IoT can address operational issues in patient feeding. In [
3], meal delivery waiting times are identified as a key factor in perceived service quality. Digital technologies can improve patient care [
11], and investment in catering innovation enhances service efficiency. Logistics are essential to hospital performance, influencing competitiveness beyond medical care quality.
Related works show IoT applied to hospital catering and restaurants. In restaurants, digital transformation impacts products, processes, and business models, but technology adoption must be strategic [
12]. In [
11], an application was developed for hospital catering hygiene management, automating patient data access, food ordering, inventory management, and hygiene reminders to optimize production processes, minimize total flow time, and improve resource allocation. Ref. [
11] highlights the relevance of logistics and operational efficiency in catering, but it does not address patient-centered aspects such as diet personalization or data security, which are the focus of our proposed IoT system.
Ref. [
13] presents an IoT-based temperature monitoring system for hospital food transport carts using Raspberry Pi, MQTT, and Wi-Fi, reducing delivery time and labor. Ref. [
14] introduces ADCATER, a platform integrating farmer, supplier, and nutrition information, applying IoT, computer vision, and AI to analyze food delivery, waste, and nutrition profiles. ADCATER addresses sustainability and nutrition accuracy across sectors such as hospitals, schools, and senior care centers, but this work does not integrate clinical diet management and patient-centered catering, which are the contributions of our IoT-based system.
In fast food settings, Ref. [
15] proposes an edge-oriented IoT architecture with wireless nodes and cameras to monitor environmental conditions, diner count, waste, orders, and pending tasks, enabling alerts, predictions, and waste reduction. This example demonstrates the potential of digital tools to enhance efficiency and sustainability in catering. Our article extends this approach to the hospital context, integrating IoT-based monitoring with personalized diet management, inventory control, and data security to directly support patient health outcomes. Ref. [
16] reviews IoT trends in restaurants, highlighting sensors, cloud platforms, and mobile apps, along with devices for chef assistance and kitchen monitoring. These trends demonstrate the potential of IoT for monitoring food conditions and service quality, which is especially critical in hospitals where diet safety and traceability directly affect patient recovery.
Given the lack of studies on IoT in hospital catering, related research extends to restaurants. Ref. [
17] presents an IoT food traceability system for transportation, monitoring safety, hygiene, environmental conditions, and routes, scalable to multiple vehicles. Ref. [
18] describes a self-ordering system where diners use tablets or smartphones to place orders, chefs prepare them, and delivery occurs via conveyor belts with alerts. It reduces waiting times and human errors, but its application is limited to restaurant automation, without considering dietary restrictions or medical requirements. Ref. [
19] implements a smart table ordering system, sending orders directly to kitchen displays and verifying dish accuracy on delivery. Ref. [
20] develops a sodium monitoring system for therapeutic diets, integrating a smart dispenser and desktop application. Ref. [
21] proposes a decentralized food delivery system using LoRa and blockchain to track location, temperature, and vibrations in real time. These works demonstrate IoT’s potential in food safety, logistics, and automation, but they approach the problem in fragmented ways. Our research contributes by integrating the dimensions of traceability, automation, and nutrient monitoring into a hospital-centered IoT system that directly supports clinical diet personalization and patient recovery outcomes.
This work addresses the technological gap in hospital catering by designing and implementing an IoT system in a hospital in Ecuador. The research is guided by three objectives:
Analyze catering service workflows and roles of staff involved in patient feeding.
Design an IoT architecture for technological integration into catering operations.
Implement technological tools across catering service stages.
Section 2 details the methodology,
Section 3 presents the implementation results, and
Section 4 provides the Discussion and Conclusions.
2. Materials and Methods
2.1. Catering Services’ Procedures
Hospital catering services play an important role as they are directly related to patients. The quality of food and its nutritional value are fundamental for successful recovery. The present study was conducted in the catering service provided by a private company to an Oncological Hospital in the city of Ambato, Ecuador. This hospital provides specialized medical care for cancer control. In their quest to provide quality care with high service standards to their patients, they rely on an external catering service. This catering service, called Mercedes Restaurant, has become an ally in the fight against cancer. Its activities can be summarized in the preparation of diets prescribed by the hospital nutritionist, as well as the distribution and delivery of dishes to patients according to scheduled mealtimes.
Figure 1 details the catering service process in a multi-level diagram. There are five meals to be delivered: breakfast, mid-morning snack, lunch, afternoon snack, and dinner. The menu is prepared according to the details provided by the hospital nutritionist. The catering staff coordinates the preparation, distribution, and delivery of food according to patient lists for each scheduled meal. Diet and patient lists are manually prepared on a spreadsheet and delivered to the record keeper in printed form. Once the dishes are ready, the catering staff distributes the food according to the patient list, where they must manually annotate whether the patient has received the food or rejected it, with any other observations.
The hospital has a spacious kitchen suitable for food preparation, as well as warehouses to store provisions. Inventory control is manually conducted through ingredient lists and inventories. Although the warehouses are kept clean and organized, they do not have a monitoring system for the environmental conditions of the spaces, so it is unknown whether the food is stored within appropriate temperature and humidity ranges to preserve its properties.
While the catering service handles the distribution of food to patients, processes such as diet and patient registration, checklists, planning, and pantry inventories are carried out manually, leading to potential errors, confusion, and misinterpretation during catering staff shift changes. These inconveniences result in resource loss and process delays, leading to errors in food distribution. Considering this, a catering service committed to continuous improvement may seek to automate and digitize its processes. IoT technology stands out as a tool with high potential for success when integrated into the daily tasks of hospital catering services.
2.2. System Architecture
For the IoT system applied to the catering service of the Oncological Hospital, a 3-tier architecture is utilized, and detailed below.
Data Acquisition Layer: This layer consists of devices that gather data. The input data includes diets planned by the nutritionist for each patient and the inventory of products in the warehouses. Sensors measuring temperature and humidity in the storage warehouses monitor the storage conditions of ingredients and pantry items.
Fog Processing Layer: Microcontrollers within the sensor nodes are located in this layer. Initial data analysis takes place here, eliminating redundant information and reducing data volume. This simplifies storage and enables swift data tabulation.
Cloud Layer: This layer resides on cloud servers. Processed information from the fog layer is stored here. Historical data from records can be analyzed and queried for operational analysis and informed decision-making. Additionally, a graphical interface was developed in this stage, where application users can upload or retrieve information for their operations.
2.3. Monitoring of Environmental Conditions in Warehouses
At the hospital, there are two warehouses for food storage:
Dry storage rooms, where canned goods, flour, rice, dry grains, oil, and disposable products such as cups, plates, and cutlery are stored. This warehouse is maintained at room temperature.
Cold room, where fruits, vegetables, dairy products, desserts, and Tetra Pak containers are stored. This warehouse is maintained at a temperature ranging from −15° to 10° Celsius.
For each of the warehouses, a sensor node is required to measure temperature and ambient humidity. These sensors were placed on the third shelf of each warehouse. The NodeMCU development board (Amica, Shenzhen, China) is used for the sensor node, which receives signals from the DHT22 sensor. The NodeMCU board features a Wi-Fi module used for the wireless transmission of sensor data via an HTTP protocol using the POST method. The data is sent to the cloud layer, where it is stored in a MySQL non-relational database. The electrical connection of the NodeMCU board and the sensor is shown in
Figure 2a. Each node was implemented on a printed circuit board (PCB) and installed in a protective plastic box to be placed in the corresponding warehouse.
Figure 2b illustrates the flow diagram of the sensor data reading routine programmed in the NodeMCU, where signal conditioning is performed and measurements are wirelessly communicated via Wi-Fi to the cloud database.
2.4. Diet Registration and Warehouse Inventory
For storing patient registration data and available products in the warehouse, different unrelated data tables were created in a MySQL database. The table named “patients” is the main one, as it stores patient data such as names, surnames, medical history, and dietary information. The patient data recorded includes ID number, name, surname, diet, room, and bed number.
Figure 3 depicts the flowchart of the “Patient Feeding Queries” function, which is executed when a system user wishes to access the information. Furthermore, the “Data Reading” function outlines the steps taken to extract information from a request made through the application, such as patient data or the scheduled diet.
2.5. Interface for Diet Management and Control
A web-based graphical interface was developed, considering the three users who will have access to the web application, namely:
Catering service administrator: Has access to the main dashboard, where they can navigate through options such as diet listings, diet types, patient registration, environmental conditions in warehouses, inventory, and bulk upload.
Nutritionist: Has access to the main dashboard, diet listings, and patient registration. Can upload patient and diet data.
Food distribution staff: Has access to the main dashboard and diet listings.
2.6. Data Security
The protection of information stored in the database and accessed through the web application is ensured by two key mechanisms: encryption and access control. Encryption provides cryptographic safeguards that are considered a cornerstone of hospital data security, implemented at three levels [
22].
Encryption in transit: MySQL is configured with mandatory TLS/SSL (require_secure_transport = ON), ensuring that communications between applications, clients, and the database engine are securely transmitted.
Encryption at rest: InnoDB Data-at-Rest Encryption is enabled, allowing tables, transaction logs, and entire tablespaces to be encrypted with AES-256 algorithms.
Granular encryption: For columns containing sensitive identifiers, the AES_ENCRYPT() function can be applied at the application level, adding an additional layer of protection.
The assignment of users to different functionalities in the web application provides data security mechanisms based on access control and privilege management within MySQL [
23]:
Roles and privileges: MySQL allows the definition of specific roles (e.g., kitchen supervisor, dietitian, doctor), centralizing privilege assignment and enforcing the principle of least privilege.
Segregation of duties: User profiles are differentiated between application users, operational staff, and database administrators, preventing any single role from concentrating excessive privileges and thereby reducing security risks.
3. Results
The implementation result of the IoT system in the catering service is evident in the web application that various users utilize to carry out tasks within the service process. For any user to access, a login screen is presented for entering credentials. Once the user type is validated, authorized information and options for data modification are displayed. Once access to the main dashboard is gained, a vertical menu is displayed for navigating between the different screens of the application, as shown in
Figure 4.
Figure 5 depicts the main dashboard of the application, where each diet is displayed according to the meal schedule (breakfast, mid-morning snack, lunch, afternoon snack, and dinner), along with the total number of hospitalized patients.
Patient information and diets can be entered into the web application. An Excel spreadsheet was printed and handed to the catering staff beforehand, with manual records kept.
Figure 6 displays the section for general patient entry, where the patient list is uploaded in an Excel spreadsheet along with their respective dietary information, which is then stored in the database for future reference.
Real-time monitoring of environmental conditions is presented in the web application, providing data of interest for the administrator. If temperature and humidity measurements outside the established ranges are detected in each warehouse, an alert is issued to take corrective actions.
In the inventory section of the application, the number of products available in the warehouse and the minimum stock that should be maintained are shown. When products from stock are used, the operator can decrease the quantity of the product in the application.
Figure 7 displays the stock visualization table in the web application.
The bulk product upload section is designed to facilitate the incorporation of multiple records by loading an Excel file. This feature enables the simultaneous inclusion of all fields related to the products in a single file, allowing for efficient visualization and registration in the system.
To evaluate the web application in its daily use by the hospital catering and nutritionist staff, a survey based on the ISO/IEC 25010 standard was conducted [
24]. This standard establishes quality characteristics to be considered and evaluated in software products. The quality of a software product is defined as the degree to which it meets user requirements and provides value. These requirements, including functionality, performance, security, and maintainability, are represented in the quality model, which categorizes the characteristics and sub-characteristics of the product. According to the responses obtained in the surveys, 83% of users positively evaluated the application’s characteristics, such as speed, meeting expectations in terms of functionalities, user needs satisfaction, intuitive interface, and portability across different devices. However, a minority indicated a slow adaptation.
4. Discussion and Conclusions
This work implemented a three-layer IoT architecture—covering data acquisition, processing, and application—applied to the catering service of an Oncological Hospital in Ecuador. The system enables real-time monitoring and management via a cross-platform web interface with role-based access control, ensuring that sensitive patient dietary data is only accessible to authorized personnel, as recommended in hospital accreditation guidelines [
10]. For example, catering staff engaged in food distribution have restricted access, while nutritionists and administrators can review patient-specific nutritional plans and operational metrics, supporting decision-making aligned with hospital quality standards [
9].
The results obtained are consistent with previous findings that IoT enhances service quality by optimizing processes [
1]. The system allows administrators to mitigate risks such as delivery delays, incorrect diet allocation, food waste, and misdirected meals, echoing the importance of minimizing waiting times for meal delivery, a key quality indicator highlighted in [
1,
3].
The environmental monitoring of storage areas supports compliance with hygiene protocols [
9], which are essential for preventing foodborne diseases and maintaining patient safety [
7]. The system triggers alerts when temperature or humidity deviate from set thresholds and retains historical data for analysis, enabling improved food arrangement and preservation. This capability mirrors IoT applications in restaurants and catering logistics described in [
13,
14], where sensor networks and automated alerts are used for continuous quality control.
Inventory management features allow administrators to maintain accurate stock records, identify high-consumption products, and plan timely replenishment, preventing operational disruptions. These functionalities align with the operational improvements proposed in [
15,
17], where IoT-based data collection supports predictive resource planning and waste reduction.
The novelty of this system lies in its hospital-centered integration [
3], with emphasized digitalization of catering logistics with a focus on hygiene, but without clinical data integration. In [
2], quantified reductions in waste (19.7%) and costs (32.6%) through mathematical optimization were achieved, yet their approach did not involve real-time monitoring or patient-specific diets. Ref. [
25] reviewed operational strategies to reduce hospital food waste, such as portion control and menu adjustments, which remain limited without digital support. Similarly, Ref. [
4] applied IoT to monitor food quality parameters like temperature, pH, and humidity, but did not address the personalization of therapeutic diets. Ref. [
5] reinforced the paradigm of Food is Medicine, evidencing that nutrition directly impacts patient recovery and hospital costs; our system aligns with this vision by ensuring that prescribed diets are digitally managed and accurately delivered. Finally, Ref. [
6] showed how IoT and innovation methodologies can improve sustainability and efficiency in commercial catering, while our contribution extends these insights to the hospital domain, where service quality has direct clinical implications.
Regarding data security, the system implements encryption and role-based access control. However, to ensure full compliance with medical data protection regulations, the MySQL infrastructure must be aligned with international frameworks such as HIPAA and ISO/IEC 27001 and 27799. HIPAA [
26] requires technical safeguards including the encryption of data in transit and at rest, strong authentication mechanisms, and access logging to guarantee traceability. Meanwhile, ISO/IEC 27001 and 27799 [
27,
28] provide additional guidelines for comprehensive information security management in hospital environments, reinforcing the confidentiality, integrity, and availability of clinical data.
User feedback indicates a positive acceptance of the web application, though adaptation is ongoing due to early-stage implementation. The architecture is modular and scalable, supporting continuous improvement, a strategy emphasized in digital transformation studies [
12,
16]. As a first-generation deployment, it is subject to iterative updates based on operational feedback, with planned enhancements including AI-assisted diet formulation and computer vision for automated inventory management—approaches aligned with the innovative systems proposed in [
18,
19,
20].
From a broader perspective, technological innovation in healthcare typically prioritizes patient monitoring and diagnostics, yet catering services—critical for delivering personalized nutrition—often receive less attention [
8]. By integrating IoT into this service, the system addresses a gap identified in the literature and aligns with the need for strategic technology adoption in food service operations [
12].
The proposed system validates the applicability of IoT architectures to hospital catering, delivering transparency, traceability, and operational control. Its main contributions include:
Role-based access control to ensure information security.
Environmental condition monitoring to maintain hygiene and food safety.
Inventory analytics for proactive supply chain management.
Scalable and modular design enabling AI and computer vision integration.
In conclusion, this work demonstrates that IoT systems can significantly enhance hospital catering operations, contributing to service efficiency, patient safety, and overall hospital performance. By linking environmental, inventory, and operational data to decision-making processes, the system not only aligns with best practices identified in related works [
1,
11,
13,
17,
21] but also establishes a foundation for future technological advancements in healthcare food services.