Inspiration
In countries like Brazil, there is no logistical system to allocate patients in hospitals, so that patients have their residence as close as possible to the hospital, without having to travel long distances and further increase the risk of contamination. In addition, use the maximum resources a hospital has to solve this problem by removing those who have little patient allocation. And even more countries with economic problems could have the maximum number of people being served in a smaller number of hospitals in order to reduce costs and reduce the level of contamination with other people. And even more freeing up opportunities for other hospitals to treat patients who have not been infected or who are undergoing tests to validate the contamination.
What it does
It is an API(Application Programming Interface) that can be used by customers, such as governments and hospitals, which in its main objective seeks to find the best logistical solution for patient allocation in hospitals, and that each hospital has a limited number of slots. Knowing this the algorithm seeks a result so that all patients can be located as close as possible to their home, respecting the hospital's slots limitations. As input, the API can receive a CSV(Comma-separated values) file with patients as rows and hospitals as columns and filled with the distance of each patient to the hospital. As a result, he returns a stable match attempt in which we will have each patient allocated to his due hospital as close as possible. However, the api tb can be used for other contexts where you need the logistics of people in places, such as redirecting people to supermarkets, for example.
Data
The data must be pre-calculated using the "haversine distance" algorithm as the core for each distance calculation, as it provides the distances using two points in a sphere from their latitudes and longitudes. These algorithms must be developed so that each distance is given in kilometers from each patient to each hospital, however other units of measurement are welcome to be used.
How I built it
The algorithm was developed in C ++ using the Armadillo library which will provide us with a high quality linear algebra library with excellent speedup. In addition to avoiding the use of all data in RAM memory, since it has limitations and to avoid computers with infinite RAM, volatile memory is used as a mapping of data stored in HDD/SDD. As soon as it will limit the maximum size of the number of people and hospitals it will be non-volatile storage.
Challenges I ran into
In addition to the lack of computational resources, such as greater storage and a more powerful predecessor, there are problems related to location and distance data. So that tests could be performed, fictional data of a size limited to 20 hospitals and 70 patients was used in a machine with this configurations:
- Memory of 7,7 GiB
- Intel® Core™ i5-7300HQ CPU @ 2.50GHz × 4
- GeForce GTX 1050/PCIe/SSE2
- Ubuntu 18.04.4 LST
- Gnome 3.28.2
- System type 64 bits
- Storage of 363,6 GB
What's next for Covid19 HLA
Take into account whether the hospital has accessibility and whether the hospital location helps in the patient's evacuation. Thus avoiding that wheelchair users have to move to hill areas. In addition, use the power of the GPU to calculate the distance of patients, obtaining only the geographical coordinates of the patients' hospitals, in order to automate the allocation pipeline. And finally, use all the real power of the armadillo library.
Built With
- armadillo
- c++

Log in or sign up for Devpost to join the conversation.