VOOZH about

URL: https://www.geeksforgeeks.org/c/c-program-for-hospital-management-system/

⇱ Hospital Management System in C - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Hospital Management System in C

Last Updated : 25 Sep, 2023

A Hospital Management System is software that facilitates its users some basic operations that take place in a typical hospital. This Hospital Management System in C language is a project for Hospitals having the following functionalities:

  • Printing Hospital Data
  • Print Patients Data
  • Sort by Bed Price
  • Sort by Available Beds
  • Sort by Name
  • Sort by Rating and Reviews
  • Print the Hospital's Name in a Specific City

All the functions will be operated through switch cases in the main function. There will be a menu for users for easy navigation.

Components of the Project

1. Structure for Hospital and Patients Data

The Structure for Hospital's and patient's data is defined below:

2. Function to Print Hospital Data

This function prints all the hospital data.

3. Function to Print all Patients Data

This Function prints all patient data.

4. Function to Sort Hospitals by Bed's Price

This function sorts the bed prices of each hospital in ascending order.

5. Function to Sort Hospitals by Available Beds

This function sorts hospitals by number of available beds in descending order.

6. Function to Sort Hospitals by Name

This function sorts hospitals by name in alphabetical order.

7. Function to Sort Hospitals by Rating and Reviews

This function sorts hospitals by number of reviews.

The logic used here is: If the hospital A's rating*reviews < Hospital B's rating*reviews then swap them.

8. Function Print the Hospitals of any Specific City

This function takes input the name of city and returns the hospitals present in the specific city.

9. Main Function

This is the main function to operate the Hospital management system in c.

C Program for Hospital Management


Output:

Comment