0% found this document useful (0 votes)
30 views13 pages

Hospital Management Code With Output

Uploaded by

Sanjai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views13 pages

Hospital Management Code With Output

Uploaded by

Sanjai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

FLOW CHART

PYTHON-MYSQL CONNECTING

SOFTWARE LOGIN WITH USERNAME&PASSWORD

ASKS USER TO ENTER HIS CHOICE

YOUR NEED WILL BE FULFILLED PYTHON BY

INTERACTING WITH MYSQL


i.e registering-stored in database

getting information-get from database


AGAIN FIRST PAGE WILL BE OPENED TO FULFILL THE

NEED OF USER

SOURCE CODE
from sys import exit

import mysql.connector as sql

conn=sql.connect(host='localhost',user='root',passwd='',databa

se='project')

if conn.is_connected():

print('successfully connected')

c1=conn.cursor()

print('---------------------------------------------')

print("HOSPITAL MANAGEMENT SYSTEM")

print('---------------------------------------------')

print('"GOD WISHES YOU"')

print("1.LOGIN")

print("2.EXIT")

choice=int(input("ENTER YOUR CHOICE:"))

if choice==1:

u1=input("enter user name:")

pwd1=input("enter the password:")

while u1=='vasu'and pwd1=='vasu6072':

print('connected')

print("WELCOME TO HOSPITAL")

print("successfully connected")
print('1.RegisteringPatient details')

print('2.RegisteringDoctor details')

print('3.RegisteringWorker details')

print("4.total patient details")

print("5.total doctor details")

print("6.total worker details")

print('7.Patient detail')

print('8.Doctor detail')

print('9.Worker detail')

print('10.Exit')

choice=int(input('ENTER YOUR CHOICE:'))

if choice==1:

p_name=input('Enter Patient Name:')

p_age=int(input('Enter Age:'))

p_problems=input('Enter the Problem/Disease:')

p_phono=int(input('Enter Phone number:'))

sql_insert="insert into patient_details

values(""'"+p_name+"',"+str(p_age)

+",'"+p_problems+"',"+str(p_phono)+")"

c1.execute(sql_insert)

print('SUCCESSFULLY REGISTERED')

conn.commit()

elif choice==2:

d_name=input('Enter Doctor Name:')

d_age=int(input('Enter Age:'))
d_department=input('Enter the Department:')

d_phono=int(input('Enter Phone number:'))

sql_insert="insert into doctor_details

values(""'"+d_name+"',"+str(d_age)

+",'"+d_department+"',"+str(d_phono)+")"

c1.execute(sql_insert)

print('successfully registered')

conn.commit()

elif choice==3:

w_name=input('Enter Worker Name:')

w_age=int(input('Enter Age:'))

w_workname=input('Enter type of work:')

w_phono=int(input('Enter Phone number:'))

sql_insert="insert into worker_details

values(""'"+w_name+"',"+str(w_age)

+",'"+w_workname+"',"+str(w_phono)+")"

c1.execute(sql_insert)

print('successfully registered')

conn.commit()

elif choice==4:

sql_w='select*from patient_details '

c1.execute(sql_w)

r = c1.fetchall()

for i in r :
print(i)

elif choice==5:

sql_x="select*from doctor_details"

c1.execute(sql_x)

s=c1.fetchall()

for i in s:

print(i)

elif choice==6:

sql_y="select*from worker_details"

c1.execute(sql_y)

t=c1.fetchall()

for i in t:

print(i)

elif choice==7:

h=input("Enter the name:")

sql_w='select*from patient_details where

p_name=("{}")'.format(h)

c1.execute(sql_w)

u = c1.fetchall()

for i in u:

print(i)

elif choice==8:
d=input("Enter the name:")

sql_d='select*from doctor_details where

p_name=("{}")'.format(d)

c1.execute(sql_d)

v=c1.fetchall()

for i in v:

print(i)

elif choice==9:

f=input("Enter the name:")

sql_f='select*from worker_details where

p_name=("{}")'.format(f)

c1.execute(sql_f)

w=c1.fetchall()

for i in w:

print(i)

elif choice==10:

exit()

break

else:

print('wrong username&password')

if choice==2:

exit()
OUTPUT

Login output:

After login:
After choosing choice:

TESTING

Software Testing is an empirical investigation conducted to provide


stakeholders with information about the quality of the product or service under test[1]
, with respect to the context in which it is intended to operate. Software Testing also
provides an objective, independent view of the software to allow the business to
appreciate and understand the risks at implementation of the software. Test
techniques include, but are not limited to, the process of executing a program or
application with the intent of finding software bugs.
It can also be stated as the process of validating and verifying that a software
program/application/product meets the business and technical requirements that
guided its design and development, so that it works as expected and can be
implemented with the same characteristics. Software Testing, depending on the
testing method employed, can be implemented at any time in the development
employed
process, however the most test effort is after the requirements have been
defined and coding process has been completed.

TESTING METHODS
Software testing methods are traditionally divided into black box testing and
white box testing. These two approaches are used to describe the point of view that
a test engineer takes when designing test cases.

BLACK BOX TESTING


Black box testing treats the software as a "black box," without any knowledge
of internal implementation. Black box testing methods include: equivalence
partitioning, boundary value analysis, all-pairs testing, fuzz testing, model-based
testing, traceability matrix, exploratory testing and specification-based testing.

SPECIFICATION-BASED TESTING

Specification-based testing aims to test the functionality of software according


to the applicable requirements.[16] Thus, the tester inputs data into, and only sees
the output from, the test object. This level of testing usually requires thorough test
cases to be provided to the tester, who then can simply verify that for a given input,
the output value (or behaviour), either "is" or "is not" the same as the expected value
specified in the test case. Specification-based testing is necessary, but it is
insufficient to guard against certain risks
ADVANTAGES AND DISADVANTAGES

The black box tester has no "bonds" with the code, and a tester's perception
is very simple: a code must have bugs. Using the principle, "Ask and you shall
receive," black box testers find bugs where programmers don't. But, on the other
hand, black box testing has been said to be "like a walk in a dark labyrinth without a
flashlight," because the tester doesn't know how the software being tested was
actually constructed.
That's why there are situations when (1) a black box tester writes many test
cases to check something that can be tested by only one test case, and/or (2) some
parts of the back end are not tested at all. Therefore, black box testing has the
advantage of "an unaffiliated opinion," on the one hand, and the disadvantage of
"blind exploring," on the other.

WHITE BOX TESTING

White box testing, by contrast to black box testing, is when the tester has
access to the internal data structures and algorithms (and the code that implement
these)

Types of white box testing:-


The following types of white box testing exist:
api testing - Testing of the application using Public and Private APIs.
Code coverage - creating tests to satisfy some criteria of code
coverage.
For example, the test designer can create tests to cause all statements in the
program to be executed at least once.
fault injection methods.
mutation testing methods.
static testing - White box testing includes all static testing.
CODE COMPLETENESS EVALUATION

White box testing methods can also be used to evaluate the completeness of
a test suite that was created with black box testing methods. This allows the software
team to examine parts of a system that are rarely tested and ensures that the most
important function points have been tested.

Two common forms of code coverage are:


FunctionCoverage: Which reports on functions executed and
StatementCoverage:Which reports on the number of lines executed to
complete the test.
They both return coverage metric, measured as a percentage
HARDWARE AND SOFTWARE REQUIREMENTS

I.OPERATING SYSTEM : WINDOWS 10 AND ABOVE

II. PROCESSOR : PENTIUM(ANY) OR AMD

ATHALON(3800+- 4200+ DUALCORE)

III. MOTHERBOARD : 1.845 OR 915,995 FOR PENTIUM 0R MSI

K9MM-V VIAK8M800+8237R PLUS

CHIPSET FOR AMD ATHALON

IV. RAM : 512MB+

V. Hard disk : SATA 40 GB OR ABOVE

VI. CD/DVD r/w multi drive combo: (If back up required)

VII. FLOPPY DRIVE 1.44 MB : (If Backup required)

VIII. MONITOR 14.1 or 15 -17 inch

IX. Key board and mouse

X. Printer : (if print is required – [Hard copy])

SOFTWARE REQUIREMENTS:

I. Windows OS
II. Python

You might also like