Ujjain Simhastha is a Hindu religious mela held every 12 years in the Ujjain city of Madhya Pradesh, India. This time 50 million people were expected to attend. Managing such an extraordinary event is a task with extraordinary scale.
To manage Medical emergencies, Medical department has trained several volunteers in First-Aid, CPR, etc and then Doctors from various specialties will be on field. It is to ensure right medical attention arrives in-time at the site. However, it is more important that this be managed efficiently such that not all rush to the spot or none in case of confusion.
We solved this problem by writing a Phone App that installs on Volunteers, Staff and Doctors phone, updates their current location in the Cloud and then a Control Panel app from which the nearest available attention can be called for.
Control Panel also lets filter Doctor, Volunteer and Staff and show on City map by radius from point of emergency. A message can be composed and queued in Cloud.
Components1. Phone App
The App used by the medical staff accepts user details as in Doctor, Staff, CPR and Specialization, if any. It connects with cloud service and updates its Geo location. The app subscribes for location change notification and only when user moves a certain radius the location is updated in cloud.
For certain devices with bad/no GPS, current location can be statically provided from the app.
- Pre-req to be able to use the app is to register on the web-site which generates a code that can be used on one device for registration. This is to prevent DoS attacks and the app can be downloaded through the URL alone.
- In case a user attention is required, user receives a phone notification as well as an SMS. In case of phone notification, the user can acknowledge from the app to inform others that he is attending. In case of SMS, a reply to SMS will register.
For eg, a case where a CPR is required at a location, whoever responds to the call first gets an acknowledgement back, while others who confirmed will get a Hold notification.
This workflow covers for larger workforce and multiple spots requirements too.
- App also has ability to report a medical emergency situation from ground zero by the push of a button to which the reporter can add a text/image context. Report can be cancelled from within the app as well.
2. IoT Devices
2.1 Camera
IoT camera are controlled and managed through the Control Panel. They can be asked to provide a live feed or a snap through the Azure blob storage. We do not have access to commercial quality camera, thus we used USB HD WebCam connected to Raspberry Pi.
#python
call(["fswebcam", "-r 1280x768", "-s Gamma=50%", "/home/pi/image.jpg"])
call(["pkill", "fbi"])
call(["/home/pi/ttyecho", "-n", "/dev/tty1", "fbi -a -noverbose -d /dev/fb0 /home/pi/image.jpg"])
post_cloud("/home/pi/image.jpg")
2.2 Kiosks
IoT enabled Kiosks are small booths where people can walk-in and get connected to an agent through a Skype driven call center.
if
skype.Client.Start()
skype.Attach()
skype.PlaceCall(callParam)
3. Control Panel
Control Panel is a desktop app which is used to keep track of the workforce in the event. It uses maps from various map providers and plots each type of registered user on the map.
- In case of an emergency, the operator gets a notification of a situation from the ground staff (reported by the app). In response, the operator can confirm the situation by calling back from the app itself or rely on the context message included in the notification.
- Operator can query for camera feeds from the location. These are IoT cameras which are controlled and managed from the control panel app. These cameras uploads a feed or snap to Azure blob storage.
- Operator can click on the notification pin on map or click anywhere on the map to set a new pin for attention and select a radius and type of workforce from the list to search for nearest available workforce. If no personnel is found, the radius can be increased. This searches for last and latest reported location in cloud and plots pins for each type of workforce. A context message can be associated and notification is sent via Azure mobile services notification hub and GSM SMS service.
In case of multiple reports from a location, they can be merged by dragging and dropping the pins over other. Similarly, they can be discarded through right click context menu.
- Workflow of assignment of ground staff (conflict resolution) is taken care by the cloud service on first-come-first-serve logic and no operator intervention is needed.
On a separate instance of the application, Kiosk traffic is handled.
4. Cloud Service
Cloud Service uses Azure services to enable Volunteer and Situation management. While multimedia content like feeds and images are handled through blob storage and stream analytics, we use Azure service bus and table storage for communication and inventory.
A notification is sent through Azure mobile service hub / push-notification service and GSM requests are queued to a service bus, from there (in absence of direct integration with SMS Web API) it is picked by a mobile app which uses a local SIM card/number to send message.
We also let multiple of these apps to subscribe to the service bus to be able to load balance in-case operator has put a cap on number of messages per day.
Although the whole zone was Wifi enabled, we relied on GSM SMS service for reliability and phone notifications to backup.
We could have used Transactional SMS with Web API but due to TRAI norms and limited time, we couldn't get ourselves registered. Thus, local SMS route.
Messages queued to service bus are picked by another phone app that send using local SIM/number. The phone app can be installed on multiple devices to load balance and ensure SMS limit is not reached.
End result: Medics carried a phone with our App for a month and emergency management team kept them informed and routed to all emergencies efficiently. It was a well managed event at the end.
This solution can be further generalized to be used with various use cases, eg. blood requirement, women security, even with services like Plumber, Electrician, Car repair on the go...
Comments