__STYLES__
Tools used in this project
Healthcare

About this project

The inspiration behind this analysis is for the need of practical and diverse healthcare data for educational and research purposes to gain insights into the health care domain.

Each column provides specific information about the patient, their admission, and the healthcare services provided, making this dataset suitable for various data analysis and modeling tasks in the healthcare domain. Here’s a brief explanation of each column in the dataset -

  • Name: This column represents the name of the patient associated with the healthcare record.
  • Age: The age of the patient at the time of admission, expressed in years.
  • Gender: Indicates the gender of the patient, either “Male” or “Female.”
  • Blood Type: The patient’s blood type, which can be one of the common blood types (e.g., “A+”, “O-”, etc.).
  • Medical Condition: This column specifies the primary medical condition or diagnosis associated with the patient, such as “Diabetes,” “Hypertension,” “Asthma,” and more.
  • Date of Admission: The date on which the patient was admitted to the healthcare facility.
  • Doctor: The name of the doctor responsible for the patient’s care during their admission.
  • Hospital: Identifies the healthcare facility or hospital where the patient was admitted.
  • Insurance Provider: This column indicates the patient’s insurance provider, which can be one of several options, including “Aetna,” “Blue Cross,” “Cigna,” “UnitedHealthcare,” and “Medicare.”
  • Billing Amount: The amount of money billed for the patient’s healthcare services during their admission. This is expressed as a floating-point number.
  • Room Number: The room number where the patient was accommodated during their admission.
  • Admission Type: Specifies the type of admission, which can be “Emergency,” “Elective,” or “Urgent,” reflecting the circumstances of the admission.
  • Discharge Date: The date on which the patient was discharged from the healthcare facility, based on the admission date and a random number of days within a realistic range.
  • Medication: Identifies a medication prescribed or administered to the patient during their admission. Examples include “Aspirin,” “Ibuprofen,” “Penicillin,” “Paracetamol,” and “Lipitor.”
  • Test Results: Describes the results of a medical test conducted during the patient’s admission. Possible values include “Normal,” “Abnormal,” or “Inconclusive,” indicating the outcome of the test.

Key questions:

a. Retrieve the most frequent medical condition.

b. Retrieve the higest madical condition and the gender.

c. At what state are the patient admited and ages.

d. Are there medical trends over time?

e. Retrieve blood type with the worst medical condition.

Steps taking;

Firstly, cleaned the dataset using excel,

Secondly, created a table as shown below and, lastly imported the dataset with the copy statement.

Tool used: PostgressSQL

CREATE TABLE Healthcare_dataset(Name VARCHAR(200), Age INTEGER, Gender VARCHAR(50), Blood_Type VARCHAR(50), Medical_Condition VARCHAR(200), Date_of_Admission DATE, Doctor VARCHAR(100), Hospital VARCHAR(200), Insurance_Provider VARCHAR(200), Billing_Amount DECIMAL(10,2), Room_Number INTEGER, Admission_Type VARCHAR(200), Discharge_Date DATE, Medication VARCHAR(50), Test_Results VARCHAR(100));

COPY healthcare_dataset FROM ‘C:\Program Files\PostgreSQL\15\healthcare_dataset.csv ‘ WITH (FORMAT CSV, HEADER true, ENCODING ‘ISO-8859–1’);

(1) Retrieve the most frequent medical condition.

SELECT gender,COUNT(medical_condition) AS Frequentcondition FROM Healthcare_dataset GROUP BY gender ORDER BY Frequentcondition DESC LIMIT 1;

/*Above is the most frequent medical condition, which happened to be the female gender. */

(2) Retrieve the highest medical condition and the gender.

SELECT gender,MAX(medical_condition) AS Highest FROM Healthcare_dataset GROUP BY medical_condition,gender ORDER BY highest DESC LIMIT 1;

/*The highest medical condition from this dataset is Obesity and it’s still the female gender. */

(3) At what state are the patient admitted and ages.

SELECT gender,admission_type,age,hospital FROM healthcare_dataset;

/*The state at which patient were admitted showed at this table, emphasis importance of health care in society. */

(4) Are there medical trends over time?

SELECT admission_type,date_of_admission,discharge_date, (SELECT COUNT(name) AS patient FROM Healthcare_dataset)AS numberof_patient

FROM Healthcare_dataset ORDER BY numberof_patient DESC;

/*The table shows the medical trend over time, with the number of patients on display for each year and the admission type. */

(5) Retrieve blood type with the worst medical condition.

SELECT blood_type, age, medical_condition, MAX(medical_condition) AS Worst_condition FROM Healthcare_dataset GROUP BY medical_condition,blood_type,age ORDER BY Worst_condition DESC LIMIT 5;

/* The table above displays the worst medical condition with their age and blood type */

CONCLUSION:

Like I said earlier, this analysis is for the need of practical and diverse healthcare for educational and research purposes to gain insights into the health care domain using the key questions above and being able to achieve the results needed for decision making.

Recommendations:

I recommend public awareness of the importance of using the health care facility immediately one starts getting symptoms that persist longer than usual for diagnosis and treatment before the situation gets out of hand.

Dataset from Kaggle.

Discussion and feedback(0 comments)
2000 characters remaining
Cookie SettingsWe use cookies to enhance your experience, analyze site traffic and deliver personalized content. Read our Privacy Policy.