PROJECT REPORT (CSN101)
A report submitted in partial fulfilment of the requirement for the course
PROGRAMMING FOR PROBLEM SOLVING
Part of the degree of
BACHELOR OF COMPUTER SCIENCE AND ENGINEERING
Submitted to
Ms. Preeti gupta
Assistant Professor
Submitted by:
Name- Atharv Gupta
Roll no /SAP ID - 1000024967
Section:-‘E’
Name- Bhavya Shah
Roll no /SAP ID - 1000025964
Section:-‘E’
Name- Priyanshu Padaliya
Roll no /SAP ID - 1000025448
Section:-‘E’
Name- Aparna Negi
Roll no /SAP ID - 1000024670
Section:-‘E’
Group No.:-7
SCHOOL OF COMPUTING
DIT UNIVERSITY, DEHRADUN
(State Private University through State Legislature Act No. 10 of 2013 of Uttarakhand and approved by UGC)
Mussoorie Diversion Road, Dehradun, Uttarakhand - 248009, India.
November, 2024
CANDIDATES DECLARATION
I hereby certify that the work, which is being presented in the Report, entitled “project title”,
in partial fulfilment of the requirement as part of the course Programming for Problem
Solving of the Degree of Bachelor of Computer Science and Engineering and submitted to
the DIT University is an authentic record of my work carried out during the period 12/10/2024
to 07/11/2024 under the guidance of Ms. Preeti gupta.
Date:
Signature of the Candidate
Student Name SAP ID Branch
TABLE OF CONTENT
[Link] TOPICS PAGE NO.
1 INTRODUCTION
2 PROJECT DESCRIPTION
3 DISCUSSION ABOUT ALL THE MODULES
4 PSEUDO CODE
5 FLOWCHART
6 FUNCTION
7 DATA STRUCTURE USED TO SOLVE THIS PROBLEM
8 CODE FOR EACH MODULE
Student Name SAP ID Branch
9 SCREEN SHOT OF CODE AND OUTPUT
10 METHODS AND IMPLEMENTATION
11 CONCLUSION
12 BIBLIOGRAPHY
Student Name SAP ID Branch
Introduction
Hospital Management System
Healthcare facilities require an efficient system to manage essential information
related to doctors, patients, hospital facilities, and billing. The challenge lies in
organizing and maintaining accurate records for a medium-sized hospital that
can handle multiple doctors, patients, and facilities. Managing the information
manually can be time-consuming, prone to errors, and inefficient.
The objective of this project is to develop a Hospital Management System using
the C programming language, allowing hospital staff to effectively manage and
organize data. The system should provide functionalities to store and retrieve
information on doctors, their specializations, years of experience, and
consultation fees. Additionally, it should allow tracking patient details, including
personal data, assigned doctors, diseases, appointment times, and billing.
The system also needs to include the ability to manage hospital facilities like
medicines, surgeries, lab tests, and ICU charges with corresponding costs. An
easy-to-navigate, menu-driven interface should enable users to view hospital
details, add new doctors, register patients, assign them to relevant doctors, and
generate accurate bills.
Key challenges addressed by this system include:
Maintaining an up-to-date record of doctors and their specializations.
Managing patient data efficiently, linking them to appropriate doctors based on their
medical needs.
Keeping track of appointments and ensuring clear billing that includes bed charges,
doctor fees, and facility usage.
Student Name SAP ID Branch
Providing a simple and user-friendly interface to hospital staff, reducing the complexity
of manual record-keeping.
This solution aims to create a reliable, accurate, and easy-to-use management
system to improve hospital operations, thereby enhancing the quality of
healthcare delivery and patient management.
Student Name SAP ID Branch
Project Description
Purpose:
The purpose of the provided code is to create a Hospital Management System that
efficiently manages essential information within a hospital. It enables the storage and
retrieval of details about doctors, including their specializations, experience, and
consultation fees. The system also allows for the registration of patients, capturing their
names, ages, genders, diseases, assigned doctors, appointment times, and billing details.
Additionally, it maintains information about hospital facilities and their costs, facilitating
transparent billing for services rendered. The user-friendly, menu-driven interface enables
hospital staff to easily navigate the system, ensuring efficient management of records. By
streamlining doctor and patient management, the code aims to improve the overall
efficiency of hospital operations, enhance record accuracy, and ultimately elevate the
quality of healthcare delivery. This foundational tool helps reduce administrative burdens,
making it easier for healthcare providers to focus on patient care.
Problem statement:
Develop a Hospital Management System in C to efficiently manage doctor and patient
information. The system should enable the storage of doctor details, patient records,
appointment scheduling, and billing. It aims to streamline hospital operations, improve
record accuracy, and enhance the quality of healthcare delivery for better patient
management.
System Requirements:
Hardware Requirements
Student Name SAP ID Branch
1. Computer System: A desktop or laptop with the following minimum
specifications:
o Processor: Intel i3 or equivalent
o RAM: 4 GB or higher
o Storage: At least 100 MB of free disk space for the code and any required
data files.
2. Input Devices:
o Keyboard for data entry.
o Mouse (optional) for easier navigation.
3. Display:
o Monitor capable of displaying standard resolution (1366 x 768 or higher).
Software Requirements
1. Operating System:
o Windows, macOS, or Linux, as the code can be compiled and run on any of
these platforms.
2. Compiler/IDE:
o A C compiler or Integrated Development Environment (IDE) such as:
GCC (GNU Compiler Collection): A widely used compiler for C
programs.
Code::Blocks: An open-source IDE that supports C/C++
programming.
Dev-C++: Another popular IDE for C/C++ programming.
Visual Studio: A robust IDE that supports C/C++ development.
3. Text Editor:
o Any text editor (e.g., Notepad++, Sublime Text, or Visual Studio Code) can
be used for editing the source code.
Additional Software (Optional)
Student Name SAP ID Branch
Database Software: For larger implementations, a database management system
like MySQL or SQLite could be integrated to store doctor and patient records
persistently.
Version Control System: Software like Git to manage code versions and collaborate
with other developers.
These hardware and software requirements will support the development, execution, and
management of the Hospital Management System effectively.
Student Name SAP ID Branch
The Hospital Management System can be broken down into several
key modules, each responsible for different functionalities within the
system. Below is a discussion of each module:
1. Doctor Management Module
Purpose: To manage information related to doctors in the hospital.
Functionality:
o Store and retrieve details about doctors, including names, specializations,
years of experience, and consultation fees.
o Add new doctors to the system.
o Display the list of available doctors along with their details for patient
assignments.
Importance: Ensures that the hospital has an up-to-date record of all doctors and
their qualifications, aiding in efficient patient-doctor assignments.
2. Patient Management Module
Purpose: To manage patient information and interactions.
Functionality:
o Register new patients by capturing their personal details such as name, age,
gender, and medical history.
o Assign patients to doctors based on their diseases and required treatments.
o Store appointment times for consultations.
o Calculate and display billing information for patients.
Importance: Streamlines the process of patient registration and management,
facilitating better healthcare delivery and record-keeping.
3. Facility Management Module
Purpose: To manage information about the hospital's facilities.
Functionality:
o Maintain a list of available facilities (e.g., medicine, surgery, lab tests) along
with their costs.
Student Name SAP ID Branch
o Display facilities and their prices when needed.
Importance: Provides transparency regarding hospital services and helps in
billing patients accurately for the facilities used.
4. Billing Module
Purpose: To handle all financial transactions related to patient care.
Functionality:
o Calculate total bills based on bed prices, doctor fees, and facility usage.
o Generate billing statements for patients.
o Store billing records for future reference.
Importance: Ensures that all financial aspects of patient care are accurately
tracked, improving revenue management for the hospital.
5. User Interface Module
Purpose: To provide an interactive interface for hospital staff.
Functionality:
o Implement a menu-driven interface for users to navigate through different
functionalities (e.g., adding doctors, registering patients).
o Provide easy access to view and manage records.
Importance: Enhances user experience by making the system accessible and
straightforward for hospital staff, allowing them to focus on their core tasks.
6. Data Storage Module
Purpose: To manage data storage and retrieval.
Functionality:
o Use in-memory structures (e.g., arrays) to temporarily store data while the
program runs.
o Optionally, implement file handling to persist data between program runs.
Importance: Ensures data is organized and readily accessible, improving the
efficiency of operations and the accuracy of records.
Student Name SAP ID Branch
7. Reporting Module
Purpose: To generate reports on various aspects of hospital management.
Functionality:
o Provide reports on doctor availability, patient statistics, and financial
summaries.
o Generate lists of appointments and billing statements for administrative use.
Importance: Facilitates decision-making by providing insights into hospital
operations and performance metrics.
Integration of Modules
Each module interacts with others to form a cohesive system. For example:
The Patient Management Module relies on the Doctor Management Module for assigning doctors to
patients.
The Billing Module uses information from both the Patient Management and Facility Management
Modules to calculate accurate bills.
The User Interface Module allows hospital staff to seamlessly navigate through these functionalities,
ensuring a smooth user experience.
By breaking down the project into these modules, the Hospital Management System can be developed in a
structured manner, making it easier to manage, update, and maintain over time.
4o mini
Student Name SAP ID Branch
PSEUDO CODE
DEFINE MAX_DOCTORS = 20
DEFINE MAX_PATIENTS = 50
DEFINE MAX_FACILITIES = 5
STRUCT Doctor:
STRING name
STRING specialization
INTEGER experience
FLOAT fee
STRUCT Facility:
STRING name
FLOAT price
STRUCT Patient:
STRING name
INTEGER age
CHAR gender
STRING disease
FLOAT bill
INTEGER doctorIndex
STRING appointmentTime
STRUCT Hospital:
STRING name
STRING city
INTEGER beds
FLOAT bedPrice
ARRAY of Doctor doctors[MAX_DOCTORS]
INTEGER doctorCount
ARRAY of Facility facilities[MAX_FACILITIES]
ARRAY of Patient patients[MAX_PATIENTS]
INTEGER patientCount
FUNCTION printDoctor(Doctor doc):
PRINT "Doctor Name: Dr.", [Link]
PRINT "Specialization:", [Link]
PRINT "Experience:", [Link], "years"
PRINT "Consultation Fee: $", [Link]
FUNCTION printPatient(Patient patient, ARRAY of Doctor doctors):
PRINT "Patient Name:", [Link]
PRINT "Age:", [Link]
PRINT "Gender:", [Link]
PRINT "Disease:", [Link]
PRINT "Assigned Doctor: Dr.", doctors[[Link]].name
Student Name SAP ID Branch
PRINT "Appointment Time:", [Link]
PRINT "Total Bill: $", [Link]
FUNCTION printFacility(Facility fac):
PRINT "Facility:", [Link], "Price: $", [Link]
FUNCTION addDoctor(Hospital hosp):
IF [Link] >= MAX_DOCTORS THEN
PRINT "Cannot add more doctors. Maximum limit reached."
RETURN
ENDIF
Doctor newDoctor
PRINT "Enter doctor's name:"
INPUT [Link]
PRINT "Enter specialization:"
INPUT [Link]
PRINT "Enter years of experience:"
INPUT [Link]
PRINT "Enter consultation fee:"
INPUT [Link]
[Link][[Link]] = newDoctor
[Link]++
PRINT "Doctor added successfully!"
FUNCTION addPatient(Hospital hosp):
IF [Link] >= MAX_PATIENTS THEN
PRINT "Cannot add more patients. Maximum limit reached."
RETURN
ENDIF
Patient newPatient
PRINT "Enter patient name:"
INPUT [Link]
PRINT "Enter age:"
INPUT [Link]
PRINT "Enter gender (M/F):"
INPUT [Link]
PRINT "Enter disease:"
INPUT [Link]
PRINT "Available Doctors:"
FOR i FROM 0 TO [Link] - 1 DO
PRINT i + 1, ". Dr.", [Link][i].name, "(", [Link][i].specialization, ")"
ENDFOR
Student Name SAP ID Branch
INTEGER doctorChoice
PRINT "Enter doctor number for consultation:"
INPUT doctorChoice
IF doctorChoice < 1 OR doctorChoice > [Link] THEN
PRINT "Invalid doctor choice."
RETURN
ENDIF
[Link] = doctorChoice - 1
PRINT "Enter appointment time (e.g., 10:30 AM):"
INPUT [Link]
[Link] = [Link] + [Link][[Link]].fee
[Link][[Link]] = newPatient
[Link]++
PRINT "Patient added successfully!"
FUNCTION printHospitalDetails(Hospital hosp):
PRINT "Hospital Name:", [Link]
PRINT "City:", [Link]
PRINT "Total Beds:", [Link]
PRINT "Bed Price: $", [Link]
PRINT "Available Doctors:"
FOR i FROM 0 TO [Link] - 1 DO
PRINT i + 1
CALL printDoctor([Link][i])
ENDFOR
PRINT "Facilities Available:"
FOR i FROM 0 TO MAX_FACILITIES - 1 DO
CALL printFacility([Link][i])
ENDFOR
FUNCTION printPatients(Hospital hosp):
IF [Link] == 0 THEN
PRINT "No patients in the hospital."
RETURN
ENDIF
PRINT "Patient Details:"
FOR i FROM 0 TO [Link] - 1 DO
CALL printPatient([Link][i], [Link])
ENDFOR
FUNCTION main:
Student Name SAP ID Branch
Hospital hospital
[Link] = "APOLLO HOSPITAL"
[Link] = "DEHRADUN"
[Link] = 150
[Link] = 100.0
[Link] = 0
[Link] = 0
INTEGER choice
DO
PRINT "*********** Hospital Management System Menu ************"
PRINT "1. Print Hospital Details"
PRINT "2. Add Doctor"
PRINT "3. Add Patient"
PRINT "4. View Patient Details"
PRINT "5. Exit"
PRINT "Enter your choice:"
INPUT choice
SWITCH choice:
CASE 1:
CALL printHospitalDetails(hospital)
CASE 2:
CALL addDoctor(hospital)
CASE 3:
CALL addPatient(hospital)
CASE 4:
CALL printPatients(hospital)
CASE 5:
PRINT "Exiting the program."
BREAK
DEFAULT:
PRINT "Invalid choice. Please enter a valid option."
END SWITCH
WHILE choice != 5
END FUNCTION
Student Name SAP ID Branch
FLOW CHART
START PROGRAM
DISPLAY MAIN MENU
USER INPUT CHOICE
CHOICE HANDLING
(NAVAGATING MODULE)
END PROGRAM
Student Name SAP ID Branch
PRINT HOSPITAL DETAILS
DISPLAY HOSPITAL INFO
NAME, CITY, BEDS, BED
PRICE,
FACILITIES AND DOCTORS
RETURN TO MENU
Student Name SAP ID Branch
ADD DOCTOR MODULE
YES NO
CHECK IF MAX
DOCTORS LIMIT IS
REACHED
PROMPT FOR DOCTOR
DETAILS:NAME,
SPECIALIZATION, EXPERIENCE,
FEE
ADD DOCTOR LIST
RETURN TO MENU
ADD PATIENT MODULE
Student Name SAP ID Branch
YES NO
CHECK IF MAX
PATIENTS
LIMIT IS
REACHED
PROMPT FOR PATIENT
DETAILS:NAME, AGE,
GENDER, DISEASE,
APPOINTMENT TIME
DISPLAY AVAILABLE
DOCTORS AND SELECT
CALCULATE BILL
(BED PRICE +CONSULTATION
FEE)
RETURN TO MENU
Student Name SAP ID Branch
VIEW PATIENT DETAILS
NO YES
CHECK IF PATIENT
EXIST
DISPLAY EACH PATIENT INFO:
NAME, AGE, GENDER, DISEASE,
DOCTOR,
APPOINTMENT TIME
RETURN TO MENU
Student Name SAP ID Branch
FUNCTION
Here’s a breakdown of the function of each module in the Hospital
Management System:
1. Main Menu Module
Purpose: This module acts as the primary navigation hub for the system. It
presents options to the user and directs them to the corresponding modules based on
their choice.
Functionality:
o Displays a menu with options to view hospital details, add a doctor, add a
patient, view patient details, or exit the program.
o Accepts user input to determine which action to take.
o Directs the user to the selected module or exits the program.
2. Print Hospital Details Module
Purpose: To provide a comprehensive overview of the hospital's information,
including staff and available facilities.
Functionality:
o Displays the hospital's name, location (city), number of beds, and the price
per bed.
o Lists all available doctors, including their specializations, experience, and
consultation fees.
o Shows the facilities offered by the hospital, such as lab tests, surgery, X-rays,
etc., with their associated costs.
3. Add Doctor Module
Purpose: This module allows the user to add new doctors to the hospital's roster.
Functionality:
Student Name SAP ID Branch
o Checks if the maximum number of doctors (20) has been reached. If so, it
restricts adding more.
o Prompts the user to input details for a new doctor, including:
Doctor's name
Specialization
Years of experience
Consultation fee
o Adds the doctor’s information to the hospital’s list of doctors if the details
are valid.
o Confirms successful addition to the user.
4. Add Patient Module
Purpose: To register a new patient in the hospital system and calculate their initial
bill based on the chosen doctor and bed price.
Functionality:
o Checks if the maximum number of patients (50) has been reached. If so, it
restricts adding more.
o Prompts the user to input details for a new patient, including:
Patient’s name
Age
Gender
Disease
Desired appointment time
o Displays a list of available doctors and their specializations for selection.
o The user selects a doctor, and the module calculates the initial bill, which
includes:
The consultation fee of the selected doctor.
The hospital's standard bed price.
o Adds the patient’s information to the hospital’s list of patients and confirms
the addition.
5. View Patient Details Module
Student Name SAP ID Branch
Purpose: To provide a detailed view of all the patients currently registered in the
hospital system.
Functionality:
o Checks if any patients are registered in the system.
o If patients are present, it displays the details of each patient:
Name
Age
Gender
Disease
Assigned doctor’s name
Appointment time
Current bill amount
o If no patients are present, it informs the user that no records are available.
Each module plays a crucial role in managing the hospital's operations efficiently, ensuring
data about doctors, patients, and facilities is well-organized and accessible.
Student Name SAP ID Branch
DATA STRUCTURE USED TO SOLVE THIS PROBLEM
To implement the Hospital Management System described, the primary data structure
used is the struct (structure) in C programming. The struct data type allows grouping
different types of data under a single name, which is particularly useful when handling
complex entities like doctors, patients, and facilities within a hospital system. Below is a
breakdown of how the data structures were utilized to solve the problem:
1. Structs for Data Organization
The main data structures used are:
struct Doctor:
o Represents individual doctor information.
o Fields include:
name: A string (character array) for the doctor's name.
specialization: A string representing the field of expertise.
experience: An integer representing the years of experience.
fee: A float representing the consultation fee.
struct Patient:
o Represents individual patient information.
o Fields include:
name: A string for the patient's name.
age: An integer for the patient's age.
gender: A character for gender (e.g., 'M' or 'F').
disease: A string indicating the disease or condition.
bill: A float representing the patient's total bill.
doctorIndex: An integer representing the index of the assigned doctor in the
doctors' array.
appointmentTime: A string for the appointment time.
struct Facility:
o Represents each hospital facility.
o Fields include:
Student Name SAP ID Branch
name: A string for the facility's name (e.g., X-ray, Lab Tests).
price: A float indicating the cost of using that facility.
struct Hospital:
o The central data structure that holds all the relevant information about the hospital.
o Fields include:
name: A string for the hospital's name.
city: A string indicating the location.
beds: An integer for the number of beds available.
bedPrice: A float for the cost of a hospital bed.
doctors: An array of Doctor structs to store a list of doctors.
doctorCount: An integer indicating the current count of doctors.
facilities: An array of Facility structs for available facilities.
patients: An array of Patient structs for storing patient information.
patientCount: An integer representing the number of currently registered patients.
2. Use of Arrays for Managing Collections
Arrays are used to store collections of similar data types (e.g., lists of doctors, patients, and facilities):
o doctors[MAX_DOCTORS]: An array to store up to 20 doctor structures.
o patients[MAX_PATIENTS]: An array to store up to 50 patient structures.
o facilities[MAX_FACILITIES]: An array to store 5 different hospital facilities.
Arrays are a suitable choice here because:
o They provide easy, direct access using an index.
o The data is stored contiguously in memory, ensuring faster access.
o The number of doctors, patients, and facilities is known and has a predefined limit, making
fixed-size arrays a practical choice.
3. Advantages of Using struct and Arrays
Data Encapsulation:
o Each struct encapsulates related fields together, making the code more organized and
modular.
o It simplifies handling complex entities like patients or doctors by allowing them to be treated
as a single unit.
Ease of Access:
o Arrays combined with structs allow easy indexing, which simplifies operations like adding,
viewing, or modifying doctors, patients, or facilities.
o The doctorIndex in the Patient struct allows linking a patient to a specific doctor efficiently.
4. Potential Alternatives
Student Name SAP ID Branch
If a more complex system was required (e.g., dynamic lists, frequent additions/removals,
large data), other data structures could be used:
Linked Lists: To allow dynamic resizing, making it easy to add or remove doctors, patients, and
facilities without worrying about a fixed size.
Hash Tables: For faster searching and retrieval based on keys (like doctor name or patient ID).
Binary Trees: If the system required hierarchical data or faster searching, a tree structure could
be implemented.
However, for this problem:
The use of struct with fixed-size arrays is efficient and straightforward.
It simplifies data management for a hospital with a limited number of doctors, patients, and facilities.
5. Limitations of the Current Data Structure
Fixed Size: The arrays for doctors, patients, and facilities have a predefined size, limiting the
number of entries.
Insertion and Deletion: Operations involving insertion or deletion are not as flexible as dynamic
structures (like linked lists).
Memory Waste: If the array is not fully utilized, it can result in wasted memory space.
In summary, the choice of using structs and arrays provides a good balance between simplicity and
functionality for a small to mid-sized hospital management system, aligning well with the fixed requirements
given.
Student Name SAP ID Branch
Code for each module
Here's a modular breakdown of the C code provided, organized by each major function.
Each module is implemented as a separate function with descriptions to clarify what each
module accomplishes.
1. Data Structure Definitions
Define structs for Doctor, Facility, Patient, and Hospital.
Student Name SAP ID Branch
2. Print Doctor Details Module
Prints details of a doctor, using a single Doctor struct instance.
3. Print Patient Details Module
Prints details of a patient, using a Patient struct and an array of Doctor structs to retrieve
the assigned doctor.
4. Print Facility Details Module
Prints details of a single facility.
Student Name SAP ID Branch
5. Add Doctor Module
Adds a doctor to the hospital’s list, ensuring it doesn’t exceed MAX_DOCTORS.
6. Add Patient Module
Adds a patient to the hospital’s list, linking them to a doctor and calculating the bill.
Student Name SAP ID Branch
7. Print Hospital Details Module
Prints comprehensive details of the hospital, including doctors and facilities.
Student Name SAP ID Branch
8. Print All Patients Module
Prints details of all patients currently registered in the hospital.
9. Main Function Module
Initializes the hospital data and provides a menu-driven interface.
Student Name SAP ID Branch
Student Name SAP ID Branch
Methods and Implementation
The Hospital Management System employs various methods to perform specific
tasks such as managing doctors, patients, facilities, and hospital details. Here is a
detailed breakdown of the methods and their implementation:
1. Initialization
The program begins with predefined hospital data (doctors, facilities, and patients) for
demonstration purposes.
Initialization ensures the system is usable without requiring the user to add all data
manually.
2. Printing Details
Methods print formatted details for hospital components, such as doctors, patients, or
facilities.
3. Adding a Doctor
Allows users to add a new doctor to the hospital if the maximum limit is not reached.
4. Adding a Patient
Adds a new patient, assigns a doctor, schedules an appointment, and calculates the bill.
5. Printing All Patients
Student Name SAP ID Branch
Displays the details of all patients in the hospital.
6. Menu-Driven Execution
Provides a menu for the user to navigate through various functionalities.
Uses a do-while loop to repeatedly display the menu until the user chooses to exit.
Key Considerations for Implementation:
Input Validation:
Ensure valid data is entered for doctors, patients, and menu choices.
Check bounds for indices when selecting doctors or facilities.
Scalability:
Use dynamic memory allocation (e.g., malloc) for arrays if scalability beyond fixed sizes
is required.
Code Reusability:
Encapsulate commonly used code blocks (e.g., printing doctor or patient details) in
dedicated functions.
Error Handling:
Handle invalid inputs gracefully to avoid program crashes.
This implementation is modular, easy to understand, and extensible, making it suitable
for small to medium-scale hospital management systems.
Student Name SAP ID Branch
Screen shots of code and outputs
Student Name SAP ID Branch
Student Name SAP ID Branch
Student Name SAP ID Branch
Student Name SAP ID Branch
Student Name SAP ID Branch
Result Analysis:
Hospital Management System
The Hospital Management System presented demonstrates a modular and efficient
implementation for managing a hospital's essential functions, including doctors, patients,
and facilities. Here's an analysis of its results based on the code functionality and
potential real-world applications:
Strengths
1. Comprehensive Functionality:
o Manages doctors, patients, and hospital facilities effectively.
o Allows adding and viewing records with well-organized menu-driven options.
2. Ease of Use:
o User-friendly interface with a clear menu.
o Simplified input process for adding doctors and patients.
o Preloaded data ensures the system is usable immediately.
3. Accurate Information Management:
o Each patient is assigned a doctor, and their bill is calculated automatically,
ensuring consistency.
o Facilities and charges are clearly defined.
4. Reusability:
o Functions like printDoctor(), printPatient(), and addPatient() are modular and
reusable.
o Simplifies updates or expansions of the system.
5. Scalability:
o The structure supports expansion by allowing more doctors, patients, or facilities
to be added (limited by MAX_DOCTORS, MAX_PATIENTS, and
MAX_FACILITIES).
Weaknesses
Student Name SAP ID Branch
1. Limited Data Storage:
o The system relies on runtime memory only. Restarting the program resets all data.
o Suggestion: Use file I/O to store and retrieve hospital data persistently.
2. Input Validation:
o Limited input validation, e.g., invalid doctor index or improper formatting of
names and times can cause errors or inconsistencies.
o Suggestion: Validate all inputs (e.g., integer ranges, correct formats for time).
3. Scalability Constraints:
o Fixed sizes for arrays (MAX_DOCTORS, MAX_PATIENTS,
MAX_FACILITIES) may limit the system in a larger setup.
o Suggestion: Use dynamic memory allocation (e.g., malloc in C) for more
flexibility.
4. Basic Billing System:
o The bill calculation only includes bed charges and doctor fees.
o Suggestion: Add additional charges for facilities used, medicines, or other
treatments.
5. Limited Reporting Capabilities:
o No summary reports (e.g., total revenue, bed occupancy, doctor workload).
o Suggestion: Add functionality to generate reports for analysis.
6. Lack of Security:
o No user authentication or role-based access (e.g., admin vs. doctor vs.
receptionist).
o Suggestion: Implement a basic login system for secure access.
Performance
Execution: Runs smoothly for small datasets. Adding and printing operations are quick
and responsive.
Accuracy: Handles patient-doctor assignments and bill calculations accurately.
Errors: Lacks robust error handling for invalid input, which may cause unexpected
behaviors.
Student Name SAP ID Branch
Real-World Application
1. Small-Scale Hospitals:
o Ideal for small clinics or hospitals with limited staff and resources.
o Easy to manage without requiring advanced hardware or software.
2. Learning Tool:
o Useful for beginners in programming or hospital management to understand
system implementation.
Suggested Enhancements
1. Persistent Data Storage:
o Add file storage to save and retrieve data.
o Example: Write patient details to a file and read them back on program start.
2. Dynamic Data Structures:
o Replace fixed-size arrays with dynamic structures to handle variable-sized data
efficiently.
3. Enhanced UI:
o Replace text-based interface with a graphical user interface (GUI) for better
usability.
o Alternatively, use command-line color-coding for improved readability.
4. Reports and Analytics:
o Generate hospital reports such as revenue, patient demographics, or popular
facilities.
5. Integration with Real Systems:
o Allow integration with external databases or APIs for real-time updates.
Conclusion
The Hospital Management System is a functional prototype for small-scale medical
facilities. It is modular, easy to use, and provides a foundation for expanding to larger,
more sophisticated systems. Incorporating the suggested enhancements would
significantly improve its usability, scalability, and real-world applicability.
4o
Student Name SAP ID Branch
Conclusion
The Hospital Management System is a well-structured and functional prototype designed
to streamline the operations of a hospital or medical facility. Its modular approach
effectively manages key elements such as doctor records, patient details, and available
facilities, making it a practical tool for small-scale healthcare setups. The preloaded data
enhances usability, while the straightforward interface ensures accessibility for users with
minimal technical expertise.
Despite its strengths, the system has some limitations, such as the lack of persistent data
storage, minimal error handling, and fixed data structure sizes, which restrict its
scalability. Addressing these shortcomings by integrating dynamic data structures,
implementing file I/O for persistent storage, and enhancing reporting capabilities can
significantly increase its utility in real-world scenarios.
Overall, this system serves as a solid foundation for understanding and implementing
hospital management software. With further development and refinement, it could evolve
into a robust solution capable of meeting the demands of larger healthcare facilities.
Summary of the Project
The Hospital Management System project is a software prototype developed to assist in
the efficient administration of a hospital's daily operations. The system focuses on
managing doctors, patients, and facilities while streamlining key functions such as adding
records, viewing details, and handling patient-doctor assignments. Here's a detailed
summary of the project's key elements:
Objective
The primary goal of the project was to create a simple, user-friendly system to:
1. Organize hospital operations.
2. Automate repetitive tasks like calculating bills and managing records.
3. Serve as a foundation for understanding the complexities of healthcare management
systems.
Key Features
Student Name SAP ID Branch
1. Doctor Management:
o The system can store information about doctors, including their name,
specialization, years of experience, and consultation fees.
o Doctors can be added dynamically up to the predefined maximum limit.
2. Patient Management:
o Records patient information such as name, age, gender, disease, assigned doctor,
appointment time, and bill.
o Allows the user to assign patients to doctors and automatically calculates the bill
based on bed charges and doctor fees.
3. Facility Management:
o Displays hospital facilities such as surgery, lab tests, and ICU charges, along with
their associated costs.
o These facilities are preloaded and can be used for calculating bills (if integrated in
future iterations).
4. Hospital Details:
o Stores basic hospital information, such as name, city, number of beds, and bed
prices.
o Displays a summary of available doctors and facilities to users.
5. Interactive Menu:
o A menu-driven interface enables users to:
View hospital details.
Add doctors and patients.
View patient records.
o Provides intuitive navigation for ease of use.
Technological Implementation
Language: Implemented in C, leveraging its efficiency and control over memory.
Structures: Uses struct to group related data (e.g., Doctor, Patient, Facility).
Functions:
o Modular functions like printDoctor(), addPatient(), and printHospitalDetails()
enable code reusability and clarity.
Student Name SAP ID Branch
Preloaded Data:
o Includes initial data for doctors, facilities, and patients, allowing immediate
interaction without manual entry.
Outcomes
Successfully created a working prototype that organizes hospital records and automates
billing.
Demonstrated how modular programming in C can be applied to real-world problems.
Highlighted the importance of user-friendly interfaces in management systems.
Learning and Benefits
1. Programming Skills:
o Improved understanding of data structures, modular programming, and memory
management in C.
2. Healthcare Insights:
o Gained insight into hospital workflows, including patient-doctor assignment and
facility management.
3. Problem-Solving:
o Identified and addressed challenges in designing systems for data management.
Limitations
1. No persistent storage: Data is lost when the program exits.
2. Limited scalability: Fixed-size arrays restrict the number of records.
3. Simplistic billing system: Only includes bed charges and doctor fees.
4. No error handling for invalid input.
Future Scope
File I/O: Enable saving and retrieving hospital data from files for persistence.
Dynamic Memory: Replace static arrays with dynamic memory allocation for flexibility.
Enhanced Billing: Incorporate detailed billing for facilities and medications.
Security Features: Add role-based access and authentication.
Student Name SAP ID Branch
Reporting: Generate detailed hospital performance and financial reports.
Bibliography
Student Name SAP ID Branch
Books and Study Material
"Let Us C" by Yashavant Kanetkar
Web Resources
GeeksforGeeks ([Link]
TutorialsPoint ([Link]
Stack Overflow ([Link]
Software Tools
Code::Blocks IDE
Student Name SAP ID Branch