Inspiration

I was inspired to make a COVID-19 related program because many members of my family have been negatively impacted by the pandemic. Some extended family members have suffered a lot due to the virus itself, too. Aside from the pandemic, I have also been taking a python course online. In this course, I learned a lot about OOP and how to make databases OOP. So I thought, why not create something using the knowledge I've learned to potentially come up with a product that can help those in need? The final product was HomeMed, which did in fact turn out to be a combination of the two.

What it does

HomeMed is a program that gives the user a survey and, depending on the results of the survey, stores information about the user in a database that medical professionals/providers can access later to offer online, at-home medical consultations regarding the user's symptoms and whether or not it could be COVID-19, and if it is, how to deal with recovery. Only those at risk for COVID-19--who display symptoms of it as per the survey--are prompted to enter their contact information. HomeMed itself gives the survey and stores contact information in a database. It also has other features. Users can remove their information from the database, update their contact information, or simply access it so that they can see the information for themselves.

How we built it

First, I had to code the class which would have all the functions for making and maintaining the database. The Database Class would have 4 functions (minus the constructor), add, delete, select, and update. Assuming a file is already for information input, (I used a .txt file in this case) add will add the user's information from the survey. Select allows the user to enter their name to see their phone number (contact information). Delete will allow the user to delete their data from the database, in case they incorrectly entered their contact information after the survey. And in the case of a change in contact information, I added an update function so that the user can update their contact information. Obviously, I had to use OOP for the class-oriented part of the program. For the update and delete functions, I created a new file and copied the information into it, minus the part deleted for delete and with an updated version of the information for update, before replacing it with the old file. For select and add, I opened the file and used .write() for add and a for loop for select so that the proper key:value pair can be detected before closing the file for both. Next, I had to write the code for the survey. The survey included 7 different questions regarding the 7 critical symptoms which I chose from the CDC website of COVID-19 symptoms (source link is in the code and the video slideshow). I had to implement user input validation for every question (and for every single user response area in the entire program) in the case that the user accidentally made a typo. I did this using for loops. After collecting the data for the survey using a counter variable, which would tally how many critical symptoms the user is facing, I would use that counter to determine whether or not the user should include their data in the database. If the user faced anything more than 1 symptom, they would be prompted to enter their information for a future medical consultation. For this step, I used multiple conditionals and comparison operators. For the input of contact information, I had to create a new Database object under the conditionals where contact information was to be given, and I would use the method .add() for that object to input whatever the user desired. After that, I used a while loop (while True) to prompt the user for the removal, updating, or accessing of information. For all, I had to implement user-input validation by adding to the class Database functions so that they would scan every line of the database to see if the information inputed was valid. Also for all three, I asked the user for the information they would like to remove, update, or access using conditionals, print statements, input(), and loops for the user-input validation. Then, I had to code the quit statements. If at any time did the user forget their information while updating, removing, or accessing, they could type "quit" or "q" in other places to exit the program. I did this by using conditionals, print statements, and input(). At the very end, I put a print() statement which thanked the user for using the program!

Challenges we ran into

There were quite a few... The first of many was making the Database class functions work properly. I had trouble getting the class functions to do what they were supposed to, and even modifying them to scan every line of the database upon use for user-input validation took a lot of thinking. All four functions were unique too, so I had to find a way to return values used to indicate whether or not the user's input was valid in four different ways, one per each function. Another really hard thing for me was (this is kinda embarrassing) figuring out how to use GitHub. It was my first time using GitHub, and whenever you use anything for the first time, it seems complicated and hard to use (or maybe it's just me lol). I had trouble navigating the site, and I didn't know what a lot of the terms meant. It took a bit of messing around to finally create my repo and get rid of the mess of a README which I had accidentally made to go with it. Finally, I completely lost my voice a couple days ago, so making the video with no voiceover, but with text on top of the video instead, took forever to make and it was definitely a challenge.

Accomplishments that we're proud of

One accomplishment I'm proud of is finally creating the GitHub repo and creating the video (both of which took an embarrassing amount of time. On the more technical side, I was proud of myself for making the user-input validation work for every question and for making the actual database functions work pretty nicely.

What we learned

I learned a lot of things. I learned how to manipulate OOP in python to make things which I otherwise thought I couldn't. I learned more about the structure and behaviors of databases, including the different ways they can be made. I also learned more about how to be a more efficient coder. For example, placing 50 and statements in a conditional can be completely avoided if you know how to efficiently convey a conditional statement. But the most important thing to me was learning how to use GitHub. It seems like a very powerful tool, and this was my first time using it, so I'm glad that I was able to learn how to use it for the future.

What's next for HomeMed

Hopefully, HomeMed will leave preliminary stages and will be able to become more advanced. I hope that eventually it can be used by medical professionals to offer online, at-home medical consultations regarding those experiencing the symptoms of COVID-19. After all, half of the purpose depends on medical providers who will use the information HomeMed gathers to offer consultations. I also hope that eventually, HomeMed will collect information for future consultations for other illnesses, not just COVID-19 and will be a guiding force in helping others by collaborating with those in other industries.

Built With

Share this project:

Updates