Healthcare Project (the coding)
Using SQL, I was able to determine which medical specialties are doing the greatest number of procedures on average. When determining the top 5 procedures. I omitted the procedures that only had one patient. I filtered to only show specialties that had a count of 50 or more using the HAVING count feature. Additionally, I used the same feature to filter on any specialty that has more than 2.5 average procedures. This gave me a clean list of 10 specialties.
In order to determine if race played a factor in, I used the JOIN function of SQL to add the demographics to the table containing the treatment and health results. Using the code below, I received the following results. There does not appear to be any significant gaps between races.
Next, I wanted to determine if lab procedures correlated to days in hospital. Did those who got more lab procedures stay in the hospital longer? I used the CASE WHEN function to create a column to group our patients into having “few”, “average”, or “many” procedures. Once that was done, I used the code below to determine if there was a correlation. According to my findings, it appears there is a correlation between procedures and average time in the hospital.
Although when many think of data we think numbers. SQL also has a function that will merge strings together in order to tell us a story. In this case I used the CONCAT function to provide a written summary of the top 20 patients.