## 4 IoT-Enabled Traffic-Aware Telemedicine Architecture (ITTA)
### Wearable-Device-based Monitoring Algorithm for Edge Device (WDMA-Edge)
```
1: Activate sensing module
2: Initiate value of time instance \(i=1\)
3: Record BP
4:switch systolic do
5:case (>=119 <=123) : syscore = 0
6:case ((>=109 <=118) | (>=124 <=129)): syscore = 1
7:case ((>=99 <=108) | (>=130 <=139)): syscore = 2
8:case ((>=79 <=98) | (>=140 <=149)): syscore = 3
9:case ((>=70 <=78) | (>=150 <=159)): syscore = 4
10:case ((>=60 <=69) | (>=160 <=169)): syscore = 5
11:case ((>=50 <=69) | (>=170)): syscore = 6
12:switch diastolic do
13:case (>=75 <=79) : diascore = 0
14:case ((>=70 <=74) | | (>=80 <=89)): diascore = 1
15:case ((>=50 <=69) | (>=90 <=99)): diascore = 2
16:case ((>=40 <=49) | | (>=100 <=109)): diascore = 3
17:case ((>=30 <=39) | (>=110 <=119)): diascore = 4
18:case ((>=20 <=29) | (>=120 <=129)): diascore = 5
19:case ((<=20) | (>=130)): diascore = 6
20:Record BP
21:if PR > 0 then
22:switch PR  do
23:case (>=70 <=99) : prscore = 0
24:case (>=100 <=119) | (>=55 <=69)): prscore = 2
25:case (>=120 <=139) | (>=40 <=54)): prscore = 3
26:case ((>=140 <=159) | (<40)): prscore = 4
27:case ((>=160 <=200)): prscore = 5
28:else
29:alert: \"Check the equipment status\"
30:endif
31:Record \(SpO_{2}\)
32:switch Oxygen do
33:case (>=95) : oxygen = 0
34:case (>=91 <=94) : oxygen = 1
35:case (>=84 <=90) : oxygen = 3
36:case (<=84) : oxygen = 4
37:syscore = \(Sys_{i}\)
38:discore = \(Dai_{i}\)
39:prscore = \(PR_{i}\)
40:oxygen = \(\Omega xy_{i}\)
41:\(i=i+1\)
42:\(RS_{tot_{i}}=Sys_{i}+Dia_{i}+PR_{i}+\Omega xy_{i}\)
43:Transmit \(RS_{tot_{i}}\) to hospital
44:Record the next set of values : GOTO step 3
45:\(RS_{tot}=\frac{\sum_{i=1}^{i}R_{S_{tot_{i}}}}{\sum_{i=1}^{i}R_{S_{tot_{i}}}}\)

### Algorithm

Table 2 provides the list of notations used in the Algorithm 1. The patient's risk score in the ambulance is recorded at every instance of time and the mean risk score of all the instances is transmitted to the hospital where the ambulance is headed. The risk scores are judged by the hospital as (a) 0-1 is low risk, (b) 2-4 is medium risk, and (c) 5 and above is high risk. ### Adaptive QoS-Aware Packet Transmission for Fog (AQPT-Fog)

In mobile telemedicine systems, prime importance is given to delivering emergency patients' vital biosignals within the QoS requirements of the medical data. Based on the detailed study and interviews with doctors and technicians from multiple hospitals QoS requirements as shown in Table 3(46,47) have been framed. The vital signs such as BP, PR and ECG, along with voice, which are important in the case of COVID-affected patients, have been considered. For each of these data types, packet data rate, end-to-end latency and packet loss ratio are considered as major QoS parameters. Algorithm 2, AQPT-Fog, was established with respect to the bit error rate in the transmission of the packets. Each packet is inspected for the data flow rate and the error that occurs during transmission. \(A\) denotes the received power and \(I\) approximates the fading effect of each transmission channel. The power required to transmit each packet is

\begin{table}
\begin{tabular}{l



given by C. Each data instance is denoted by \(i\). \(A_{ij},C_{j}\) denotes the received signal strength. To approximate the data transmission in a channel, the total received signal strength is estimated per transmission channel.