# User Utility Maximization in Narrowband Internet of Things for Prioritized Healthcare Applications
## 4 Design of the PAUM System
### Event Influenced Prioritized Data Transmission Access Scheduling
\(d\) : Set of delay-deadlines of all UEs
0:\(P\): Set of Priorities, \(Q\) : Transmission Queue
0:Initialization: counting variable, \(t\gets 1\)
1:for each \(n\in N\)do
2:\(P_{n}\leftarrow\) PRIORITY(\(V_{n}\)) ; \(Q_{t}\gets n\);
3:if (\(|s_{n}-s_{n+1}|\leq\epsilon\)&& \(d_{n}>d_{n+1}\)) then
4:\(P_{n}\leftarrow\) PRIORITY(\(V_{n+1}\)); \(Q_{t}\gets n\); \(t\gets t+1\) ;
5:else
6:\(t\gets t+1\);
7:endif
8:endfor
9:return\(Q,P\);
```  
**Algorithm 2** Prioritized Data Transmission Queue Scheduling Algorithm. Let us look at an example situation in which three vital signs are used to promote a better understanding of algorithms. Assume a smart BP (Blood Pressure) sensor sends data in a single channel from multiple places (OPD, Emergency, Ward, Cabin) during a time slot, \(t\in T\), such as \(V_{t}^{BP}\) = ((80, 120), (45, 120), (82, 115), (80,185)). A smart blood sugar monitor collects data \(V_{t}^{BS}\) = {4.2, 5.6, 6.7, 7.5} and a smart pulse oximeter collects data \(V_{t}^{PO}\) = { 97, 96.5, 98, 99} in the same time frame and channel. The Bayes Theorem thus aids in assessing the likelihood of a forthcoming event based on its vital sign record collection across multiple sites combine as a hypothesis. Both the second and fourth BP recordings in our example exceed the threshold, suggesting they are critical events. A chest X-ray/ECG is a significant relevant diagnosis in this circumstance to support the identified critical event. Then, both blood sugar and oxygen saturation levels are within acceptable limits, indicating that the occurrence is normal. Finally, the UE for blood pressure is given top priority, \(P\), and is positioned first in Queue, followed by the UEs for chest X-ray, blood sugar, and pulse-oximeter. This is how the eNB categorizes the UEs according to the event. Multilevel Queue with Preemptive Round Robin Scheduling  
Algorithm 2 returns the transmission queue result, which reflects the data transmission priority. Because this queue uses a preemptive RR (Round Robin) algorithm, transmission begins with a higher priority data packet and ends with a lower priority. We examine the suggested method in this part, taking into account changes in location inside the smart hospital. As a result, we investigate how other UEs obtain a schedule from the base station during the transmission of a queue that has already been scheduled. If any unscheduled higher priority events desire to join the eNB during the current transmission queue process, they must be handled by an eNB for effective scheduling and prioritized access. In this case, Figure 3 shows that the ready queue is divided into a multilevel queue approach, with the first queue \(Q1\) having the highest priority and containing all critical events, the second queue \(Q2\) having the next higher priority and representing all relative events, and the third queue \(Q3\) having a lower priority and holding normal events. Preemptive queue scheduling assigns a spot in Q1, Q2, or Q3 according to the priority of any new UE joining this access scheduling mechanism. When multilevel queuing is used, there is a significant risk of starvation [28]. To mitigate data transmission starvation, the aging algorithm [31] is used.