Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 16

Hospital Billing System

Hospital Billing System


Project Report
Hospital Billing System

Table of Contents

S.R Content

1 Introduction

2 Case Scenario

3 Waterfall diagram

4 Use Case diagram

5 UML diagram

6 Report

7 Appendix

8 Reference
Hospital Billing System

Introduction:

This is the Hospital Billing system project Report which we have used
various classes and operation to make a Proper Command Line interface
Program using Python.

In this we have used Object Oriented Approach to solve this kind of


problem.
And all the files are attached with project Zip

Case Scenario:
The Project scenario is a about on a Hospital where we have a
number of doctors with their own specific quality in their field.

So the program aim to make a system which ask every client


(Patient) there fields and make a total bill amount or bill to respective

And the continue loop over unit user not say to exit that is a given option.
For running to simulation we have to run the main file of our program that
contains everything required to project.
Hospital Billing System

Waterfall diagram
Hospital Billing System

Use Case diagram


Hospital Billing System

UML diagram
Hospital Billing System

Report:
This is the main Report section of our project Hospital billing system.

The project is based on Python and the version of python is used to make is the python
3.9.

So As the UML, Use Case and waterfall diagram the program is made up with total 5
classes where each files have their different uses

The classes used are

 PersonType
 PatientType
 BillType
 DoctorType
 DateType

PersonType:
This class is used to create a person object with first and last name attributes it
also has a printDetails method that prints the first and last name of the person
It is the super class of PatientType and DoctorType
Method: printDetails
Parameters: None
Algorithm:

1. Print the first and last name of the person

PatientType:
This class is used to create a patient object with ID, first and last name attributes
it also has a printDetails method that prints the first and last name of the patient

It is the child class of PersonType

Method: printDetails

Parameters: None

Algorithm:
Hospital Billing System

1. Print the first and last name of the person

2. Print the ID of the patient

3. Print the date of birth of the patient

4. Print the attending physician's specialty

5. Print the admit date of the patient

6. Print the discharge date of the patient

complxity: O(1)

BillType:
This class is used to create a bill object with ID, pharmacyCharges, roomRent,
doctorFee attributes it also has a printBill method that prints the bill

This is not inherited from PersonType

Method: printBill

Parameters: None

Algorithm:

1. Print the Pharmacy Charges

2. Print the Room Charges

3. Print the Doctor's Fees

4. Print the Total Charges

end printBill

Method: billingAmount

Parameters: None

Algorithm:

1. Return the sum of the pharmacyCharges, roomRent, and doctorFee

end billingAmount
Hospital Billing System

Method: updatePharmacyCharges

Parameters: newCharges

Algorithm:

1. Set the pharmacyCharges to newCharges

end updatePharmacyCharges

Method: updateRoomRent

Parameters: newRent

Algorithm:

1. Set the roomRent to newRent

end updateRoomRent

Method: updateDoctorFee

Parameters: newFee

Algorithm:

1. Set the doctorFee to newFee

end updateDoctorFee

DoctorType:
This class is used to create a doctor object with first and last name attributes it also has a
printDetails method that prints the first and last name of the doctor

It is the child class of PersonType

Method: printDetails

Parameters: None

Algorithm:

1. Print the first and last name of the person

2. Print the speciality of the doctor

complxity: O(1)
Hospital Billing System

DateType:
This class is used to create a date object with day, month and year attributes it also has a date
method that prints the date in the format dd/mm/yyyy

Method: date

Parameters: None

return: string

Algorithm:

1. Return the date in the format dd/mm/yyyy

complxity: O(1)

Main Program:
we have 3 lists:

1. doctorList : list of doctors

2. patientList : list of patients

3. billList : list of bills

At the beginning, we have an empty list of doctors and patients.

First we make a infinite loop.

And give the user the following options:

1) Enter patient details

2) print patient's medical bill

3) create a list of patients

4) create a list of doctors

5) view list of patients

6) view list of doctors

7) exit
Hospital Billing System

And ask the user to enter the choice.

If the user enters 1, we will ask the user to enter the following details:

1) patient ID

and check if the patient already exists

if the patient already exists

print "Patient already exists"

else

ask the user to enter the following details:

patient first name

patient last name

patient date of birth

doctor first name

doctor last name

doctor name

doctor specialty

And then we check is there a doctor with this name at intialization we don't have any doctor
so we should chhose first option 4 for filling up doctorlist

and then we check if the doctor already exists

if the doctor already exists

ask the user to enter the following details:

patient admission date

patient discharge date

patient pharmacy charges

patient room rent

patient doctor fee

And then we create a bill and add it to the bill list

else
Hospital Billing System

print "Doctor does not exist"

2) print patient's medical bill

we will ask the user to enter the patient ID

and check if the patient exists

if the patient exists

print the bill

else

print "Patient does not exist"

3) create a list of patients

we will ask the user to enter the following details:

patient ID

patient first name

patient last name

patient date of birth

doctor first name

doctor last name

doctor name

doctor specialty

and then we check is there a doctor with this name at intialization we don't have any doctor
so we should chhose first option 4 for filling up doctorlist

and then we check if the doctor already exists

if the doctor already exists

ask the user to enter the following details:

patient admission date

patient discharge date

patient pharmacy charges

patient room rent


Hospital Billing System

patient doctor fee

And then we create a bill and add it to the bill list

else

print "Doctor does not exist"

and repeat the process until the user enters user enter n to stop

4) create a list of doctors

we will ask the user to enter the following details:

doctor first name

doctor last name

doctor name

doctor specialty

check if the doctor already exists

if the doctor already exists

print "Doctor already exists"

else

create a doctor and add it to the doctor list

and repeat the process until the user enters user enter n to stop

5) view list of patients

we will print the list of patients

6) view list of doctors

we will print the list of doctors

7) exit

we will exit the program

If the user enters a number that is not in the list, we will print "Invalid choice"
Hospital Billing System

Testing Program:
This is the test file for the project
IN this file we will test the classes that we created in the project and the test suite
We will test the classes in the following order:
PersonType.py
DateType.py
BillType.py
DoctorType.py
PatientType.py
now we will test the test suite
The testing is unit testing
TestPerson
TestDate
TestPatient
TestDoctor

Test

main function

suite

add tests to the suite

unittest.TextTestRunner().run(suite)

and run the suite

Output

....

----------------------------------------------------------------------

Ran 4 tests in 0.002s

OK

Date Object

Case Input Output obtained Pass/Fail


Date () 111 1/1/1 pass
Set date 12 11 2022 12/11/2022 pass
Hospital Billing System

Appendix:
Our program is based Python so if we don’t have a python install it wouldn’t work
no extra requirements of this project everything is based upon the basic simulation of
commands that is sated up with reused fields:

How to Run Program

a. Open console in program directory


b. Give the command to run simulation
i. Python3 main.py (for mac or linux based system)
ii. Python main.py (windows)

And then follow steps that are given upper

How to test Classes

c. Open console in project directory


d. Give the commands to run simulation
i. Python3 Test.py (for mac or linux based system)
ii. Python Test.py (windows)

Thank you for Reading


Hospital Billing System

Reference:
Python Software Foundation. Python Language Reference, version 2.7. Available at
http://www.python.org

"G. van Rossum, Python tutorial, Technical Report CS-R9526, Centrum voor Wiskunde
en Informatica (CWI), Amsterdam, May 1995."

Python OOP Reference

https://www.w3schools.com/python/python_classes.asp

By using the class keyword, we can create a class.

Testing reference

https://docs.python.org/3/library/unittest.html

https://docs.python.org/3/library/unittest.html#assert-methods

https://docs.python.org/3/library/unittest.html#unittest.TestCase.assertEqual

You might also like