Artificial Intelligence for Public Health - University of Calgary 2021

The University of Calgary Artificial Intelligence for Public Health program aims to create practical solutions to problems within the public health sector. A cohort of 14 individuals from various academic backgrounds worked together over the course of 6 weeks to ideate and develop impactful solutions. Students become involved with an NGO that provides medical aid to various communities. Through working with them, the students develop solutions to the issues posed by the NGO. Through our close communication with Medic Mobile, we were able to identify that one of the areas of improvement they were targeting was the efficiency of their community health care workers while delivering optimal treatment and interacting with the community they serve. The AI4PH team split into three separate groups, GIS/Mapping, Routing, and VR, to develop a holistic solution.


The first group, GIS/Mapping, worked to create visualizations and algorithms to support Medic Mobile’s Community Healthcare Workers. This group decided that creating an automated priority assigning system for cases could be useful. This priority system would take various health-related factors such as disability count or smoking status and integrate them into a priority based on perceived health. We used three levels of manipulation in terms of the number of priority outcomes with 5 levels, 3 levels, and 2 levels of priority. To do this, a machine learning algorithm was used to see patterns in the data and create a predictive system for the priority level. Multiple health determinants were used as inputs with the output being the perceived health of the individual. In order to determine which health factors were most closely related to perceived health, we used both LASSO (regression analysis) and heatmap methods on a large set of factors and narrowed down the results to isolate the factors with the highest correlation to perceived health.

The first machine learning algorithms used were decision trees and random forests. A random forest is many decision trees working together to provide increased accuracy. These supervised machine learning methods train an algorithm on a part of the data to detect patterns and test the learning on the remaining portion of the data set. While our resulting accuracy in the random forest models from these tests was not necessarily the best (45-70% accuracy depending on the number of priority outcomes used), it did give us a good starting place to test other methods to increase the accuracy. Thus, our next step was to run a confusion matrix on each priority level to see how many of the priorities were assigned correctly or to other groups. During this we found that our 3-priority group did not assign any individuals with a priority of 2, due to this we eliminated the 3-priority group as a candidate for an Artificial Neural Network (ANN) trial. The 5-priority group model was similarly eliminated due to its low accuracy score in the random forest tests; thus, an ANN was run with the 2 priority group data set. In this iterative process, we were able to achieve a high prediction accuracy of priority level in our ANN model.

Our hope for developing this algorithm was that Medic Mobile may be able to use their own health data in order to determine the health priorities of their patients and not only maximize efficiency but also the quality of care by seeing the patients most in need first. A further application of this priority algorithm would be to integrate it into a routing algorithm and have the routes be generated by least distance as well as a priority assignment. While we were not able to communicate directly with the community health care workers directly on the ground and gain their perspective on their needs, we sincerely hope that our work may be able to help Medic Mobile serve their communities even better than they are now.


The routing team worked to develop an algorithm that would tell the CHW the order in which they should visit different houses and the routes they should take when visiting these houses, so that CHWs can spend less time travelling between houses they need to visit, therefore completing their designated tasks in a shorter amount of time due to less travel time. This would allow the CHWs to potentially see more patients in need of care, ultimately improving equity of access to healthcare for patients especially those in regions that were previously less accessible. This group took a geospatial approach and incorporated factors like surface conditions and elevation into their algorithm. They also utilized the priority scores created by the GIS/Mapping group to develop an algorithm that would maximize patient priorities and travel time between different houses in a way that accounts for both factors.

The data utilized by this group was acquired from the Humanitarian Data exchange for Building AND road data in Malawi, The world bank for Mzuzu vector data, the RCMDR (Regional centre for mapping of resources for development in Africa) for elevation, and Overpass API for road intersections. These data sets were visualized using QGIS. Data was then condensed and then processed using python to only obtain the Longitude, Latitude, Elevation, and Condition of buildings and roads.

Then, this group utilized three routing algorithm approaches: A*, Prim’s algorithm, and Branch and Bound. A* is a search algorithm that was used to predict the best route based on the Euclidean distance between A and B. This algorithm was used three times for each house to approximate the shortest path. The Prims algorithm uses a minimum spanning tree which allows us to essentially visit every house using the shortest and most easily transversable roads. Prims is quite efficient and yields an overall travel cost that is near the optimal solution. The only limitation of Prim’s algorithm is that it does not include round routes. Lastly, the Branch and Bound mitigate the travelling salesperson problem by determining the most efficient path from all possible paths from a collection of nodes. This algorithm uses a matrix as a heuristic and creates round routes. This team embedded Prim’s Algorithm within Branch and Bound, to incorporate the strengths of both.

In summary, the Routing team sought to support Medic Mobile’s public health problem of identified health inequities experienced in rural areas of Malawi. The proposed solution is a routing algorithm that will improve service delivery by increasing the efficiency of CHW travel routes and incorporating a prioritization of health needs. Considering the limitations of our solution, adaptations will be required prior to deployment, and stakeholder engagement will likely be important to support the successful implementation of this technology.

Virtual Reality (VR)

The VR group was tasked with integrating the work completed by GIS/Mapping and Routing teams and creating a virtual reality solution to support medic mobile’s community health workers. This solution would help Medic Mobil identify the best routes when supporting healthcare initiatives in the area. The impact of our solution will allow us to support CHWs of Medic Mobile to better navigate the communities they serve, effectively enhancing efficiencies and the quality of support.

First, QGIS was utilized to view and analyze the geospatial data which was pulled from OpenStreetMap. CityEngine was then used to visualize roads and build footprints to construct a map. This allowed the team to build an interactive urban environment that would be exportable to Unity. OpenStreetMap and satellite data were pulled along with a Digital Elevation Model of Mzuzu to construct roads and buildings with accurate heightmap data and distances to scale. This data was put into QGIS to create shapefiles that could be imported into city engine for 3D modelling. The resulting models were exported and placed in a singular scene in unity, with cameras positioned to capture a Birds Eye View of the Map to best support optimal views of interaction with the scene

Unity is a leading game development software with VR integrations with built-in functionalities for everything from in-game physics to AI-based pathfinding and route pathing, as well as hundreds of free assets. In Unity, the group designed and coded scripts to control the routes, UI, and traffic system, and pulled free car assets from the unity store. Then, they had to implement VR compatibility with the project itself. Artificial Intelligence was used to simulate traffic by implementing navigation, traffic, and collision prevention systems. For navigation, Unity was used to build navigation mesh filters onto terrain data which defined movable paths for players and traffic. Regarding traffic, the cars utilized the built-in navigation mesh feature to move around the map and spawned in random locations around the map and were given random destinations to go towards. Furthermore, for collision prevention, the navigation mesh agent offers automatic collision avoidance and automatically adjusts its path when it senses another navigation mesh agent or obstacle.

To ensure a smooth and seamless user experience, a user interface was created for our project using Unity’s built-in user interface integrations and C# scripts for functioning and interactable buttons. This allows for the user to take control of their experience and understand the simulation that they see through the headset. The buttons in the user interface are “pressed” by clicking on them with a mouse. For this project, 4 buttons were created: Restart, Regenerate, Map View, and Street View. The user interface created works both on two-dimensional displays as well as in virtual reality headsets so that the user as well as anyone with the user can control the simulation. The user can see in real-time the AI-generated traffic on the roads that they will have to navigate around in virtual reality. Ultimately, this VR will allow users to visualize traffic and experience firsthand a CHW’s commute to and from different houses.

In summary, this VR solution provides a method of visualizing a planning tool that will help identify the safest, time-efficient, and most convenient route a community health worker can take. The VR system also allows for the testing of a higher number of routes compared to if they had to be explored in person to understand and experience the terrain. Additionally, this tool has training applications and can assist Medic Mobile in streamlining and increasing the flexibility of training initiatives that can be provided for the CHWs. Finally, with the increased understanding of the routes and the environments that the CHWs will face, Medic mobile will be able to improve efficiencies that lead to positive impacts in the communities they serve, and will allow them to save on time, route testing resources, training, and could help free up personale to support other initiatives that Medic is invested in.

Thank you to the 2021 Artificial Intelligence for Public Health program Cohort: Dr. Ryan Burns, Subasthika Thangadurai, Egi Vasil, Adly Azim, Jocelyn Brady, Raisa Chowdhury, Irene Daniel, Beverly Dong, Mina Fahim, Gurveer Gill, Alhedo Goc, Shanna Hollingworth, Eugene Lok, Rachel Ralph, Kevin Vibat, Tanya Yeomans, and Cooper Davies.


Thanks all, for this wonderful summary of the summer’s collaboration. It was a pleasure to work with and learn from you all. Would you be willing to share the presentations you presented at the end of the program? I’m sure folks in the CHT community would also love to see them!

Thank you for all your support, David! We really enjoyed working with you- it was a fantastic learning opportunity for all of us. I’ve linked our presentation material below, hopefully this helps the CHT community! Cheers!

Folder containing AI4PH presentations: AI4PH Presentations - Google Drive