## 6 Patient Transfer Logistics
### System Architecture  
This section discusses the overall system architecture of our proposed smart transport system. Figure 6 shows the proposed system architecture. Each public bus is attached with an IoT smart transport kit which comprises a variety of modules including the GPS module and two sets of laser lights with light dependent resistors (LDRs) positioned at the back and front entryway of the bus, respectively, and a smart phone that acts as a mobile hotspot. Both the GPS and the laser light with an LDR read and feed real-time data to an Arduino Uno microcontroller. The Arduino Uno connects to the Internet via NodeMCU, which sends the collected data to an MQTT broker on the cloud using the Wi-Fi provided by the mobile hotspot that provides the Internet connection. Since the smart buses will also be servicing patients, the system will need to be reliable. The patients need to accurately know the arrival time of the bus at a bus stop and the time it will reach the destination and also the status of the capacity of the bus (whether it is full or there are vacant seats in the bus). Using the real time location of buses, it is possible to calculate the approximate time for the bus to reach a particular position. This is possible since a bus's location data can be saved on the server together with corresponding timestamps. To count the number of passengers alighting and boarding, we make use of the laser beam. The choice of the laser is motivated by the fact that it does not scatter and is invisible. Since passengers queue and enter or exit the bus one by one, with the laser, the system will not miss any passenger. Hence the counter will be reliable. As pointed out above, each of the public buses will be tagged with an IoT-based smart bus system. Figure 7 shows the framework of the developed IoT kit. We briefly describe the function of each of the components of the system. Arduino Uno: This is the heart of our framework. It works as a CPU unit. Arduino Uno will generate sensor data that will have to be sent to the server. This data will include the location data of the bus, time and distance approximation of departure and arrival and also information about the capacity of the bus. Arduino will take these data and send them to NodeMCU over a serial connection. Laser: A laser is a device emitting light through optical amplification based on the stimulated emission of electromagnetic radiation. The term \"laser\" originated as \"light amplification by stimulated emission of radiation\" [90]. The primary wavelengths of laser radiation for most current applications include the ultraviolet, visible and infrared regions of the spectrum. Ultraviolet radiation for lasers consists of 180 and 400 nm wavelengths. The visible region lies between 400 and 700 nm wavelengths. The infrared region of the spectrum consists of radiation with 700 nm and 1 mm wavelengths. When the intensity of the radiation is sufficiently high, damage to the absorbing tissue may happen [91]. In the  
Figure 6: System architecture. Figure 7: Framework of developed smart bus system  
proposed system, the primary functionality of the laser technology is to detect motion (i.e., entry and exist of passengers) and serve as a counter to determine the number of vacant seats in the bus. The counting starts when there is a discontinuity in the laser beam falling on the sensor. The discontinuity is detected at the entrance (or exit) of the door of the public buses at the instant of time where the laser beam is not being felt on the sensor. Here we utilize the laser technology whose path is invisible. NodeMCU: NodeMCU is a development board that incorporates the ESP8266 Wi-Fi chip. The ESP8266 is programmable like any other microcontroller. Since Arduino Uno does not have network capabilities, the NodeMCU interfaces the Arduino Uno microcontroller, connects the system to the Internet and drives the output for the GPS and the lasers. The Wi-Fi connection is provided by the mobile hotspot that is fixed in each bus.