Medical Agency
Medical Agency
Medical Agency
PROJECT REPORT
ON
Submitted by
Monika Sharma
Roll no. 062119505
1
CONTENTS
1. Acknowledgement………..…………………………………………. 3
2. Study Center Certificate……….……………………………………. 4
3. Introduction…………………………………………………………. 5
4. Preface………………………………………………………..……… 6
5. Hardware, Software Specification…………………………………… 7
Hardware requirement………………………………………… 10
Software requirement…………………………………………. 11
Database design……………………………………………….. 12
Dataflow diagram…………………………………………….. 16
ER-Diagram ………………………………………………….. 22
5. System analysis………………………………………………………. 23
6. Software Planning……………………………………………………. 27
7. System design………………………………………………………… 29
8. Testing & Debugging...………………………………………………. 36
9. Security of the system………………………………………………… 45
10. Coding……………………..………………………………………… 46
11. Output……………………………………………………………….. 61
11. Bibliography………………………………………….……………... 89
2
INTRODUCTION
3
HARDWARE AND SOFTWARE
REQUIREMENTS SPECIFICATION
The basic limitation is that the user’s need keep on changing as the
environment in which system was to function changes with time. This
happens more in complex application where all the needs may not be
known to any set of people during the requirement phase. Types of error in
this specifications can clearly be avoided or at least considerably, by
properly performing the requirement phase.
As many times a developer or administrator does not know what a user and
the supplier on what the software product will do. This is the only
document which tells the time agreement and procedure of complete project
as well as what a user wants.
4
Introduction Description
Information Description
Function Description
Behavioral Description
Validation checks and criteria
Bibliography
Appendix
Introduction
The introduction states the goals and objectives of the software describing it
in the context of the computer -based system. Actually the introduction may
be nothing more than the software people of the planning document.
Functional description
The project also provides the facility to contact the registered user easily
without any admin interaction. If you find an existing entry meeting your
requirement, then you can contact the concerned party directly.
If there is no entry, which meets your requirement, you can register your
details on the site, so that others can find you. The project improves the
efficiency and effectiveness of the whole system.
5
Behavioral description
6
HARDWARE REQUIREMENT
7
SOFTWARE REQUIREMENT
Database : MS-ACCESS
8
DATABASE DESIGN
Each entry in the data dictionary consists of a set of details describing the
data used or produced in the system. Each item is identified by a data name,
9
description, alias, and length and has specific values that are permissible for
it in the system being studied.
List of Tables:
Table Structure
1. User table
2. Student table
3. Attendance table
1. Login table
2. Supplier Table
10
3. Purchase Table
11
4. Sale Table
5. Stock Table
12
DATA FLOW DIAGRAM (DFD)
Introduction of User:
The term user is widely used in the system analysis and design. The term
end-user is widely used by the analysts to refer to people who are not
professional information systems specialists but who can use computers to
perform their Jobs. We can group end-user into four categories.
Hands-on Users actually interact with the system. They feed in data or
receive output , perhaps using a terminal.
13
End-Users are not alike. Some are intermittent users. The end-user can also
be a competitor, not an employee of the firm.
User managers have management responsibilities for application systems.
Definition of System:
14
SDLC is classically thought of as the set of activities that analysts, designers
and users carry out to develop and implement an information system.
Different parts of the project can be in various phases at the same time,
with some components undergoing analysis while others advanced stages.
Preliminary investigation.
Analysis
Design
15
ANALYSIS:
Objectives:
16
DFD FOR LOGIN
Searched
Username data
USER1
User Detail
Password
Invalid
CHECK message
THE
VALID
USER2 USER
17
DFD FOR MEDICAL AGENCY
STOCK
SUPPLIER
.
Medicine data
Supplier data
Medicin data
PURCHAS
SALE E AND
& SALES
REGISTER
PURCHASE
CUSTOMER
Customer data
18
E-R DIAGRAM
Year
Month
User
Total
absent
User
U_pass name
Login
Purchase Stock
& Sale
medicine
Suppno Phone
Supplier
&
Customer
Addres
Name
s
19
SYSTEM ANALYSIS
20
analysis is on identifying what is needed from the system, and not how the
system achieves its goal.
21
NEED OF COMPUTERIZATION
IMPORTANCE OF COMPUTERIZATION
22
Secrecy and less chance of change of loss of data
Easy data updating facility
Data integrity and inconsistency
23
SOFTWARE PLANNING
Topic Understanding.
Modular Break –Up Of The System.
Processor Logic For Each Module.
Database Requirements.
Topic Understanding:
24
Description Of The Modules:
In this module, registered user enters a password and the software checks its
validity. If the password is valid then he is allowed to enter, otherwise
“Invalid User/Password” message is displayed.
Module 2: Medicine
In this module we can maintain the medicine data.
Module 3: Supplier
In this module, all the suppliers information are maintained
Database Requirements:
The Database here used is Ms-ACCESS The database tables are shown in
DATABASE DESIGN.
25
SYSTEM DESIGN
Introduction:
Input Design
The most common cause of errors in data processing is inaccurate input data
errors entered by the data entry operator. It can be controlled by the input
design. Input design is the process of converting user oriented inputs to the
26
computer based formats. The goal of the input design is to make data entry
as easy, logical and free from as many errors as possible.
Output Design
Computers are the most important sources of information to the users are fed
into the computers to acquire the necessary outputs. The computers can
provide the well enough output in the form of information regarding various
items to the users. The major form of output is a hard copy from the printer.
Printouts are designed around the output requirements of the user(s).
Interface Design
Keeping in view the user’s requirements, the input/output forms have been
designed
and developed for easy data entry and query handling. Based on the various
types of inputs to be fed into the computer in using this system, several
inputs forms have been designed to make data entry easier and accurate.
Database Design
27
designed to manage larger bodies of information. The management of data
involves both the definition of the structures for the storage of the
information and the provision for the mechanism to manipulate the
information. In addition the database system must provide the safety of the
information stored in the database, despite system crashes or attempts at
unauthorized access.
System implemantation
28
Proper documentation of each module was done by embedding comments in
the executable portion of the code. To enhance the readability, comments,
indentation, parenthesis, block spaces, blank lines and borders were around
the blocks of comments. Care was taken to use descriptive names for table,
field modules, forms etc. The proper use of indentation, parenthesis and
blank lines was also ensured during coding.
Testing of the report Generation module was carried out to find out the
response time of the system for the generating reports. To make the response
time negligible.
SYSTEM DOCUMENTATION
29
Internal documentation
The purpose of comments is not to explain the internal logic of the program
– the program itself is the best documentation for the details of logic.
The comments should explain what the code is done is doing, and not how it
is done it. Comments should be provided for the block of code, particularly
those parts of code which are hard to follows.
Providing comments for module is most useful as module form the unit
testing, compiling, verification and modification. Comments for a module
are often called prologue for the module. It is best to standardized the
structure of the prologue of the module. It is desirable that prologue contains
the following information ;
30
d) Global variable accessed and or modified in the module As explanation
of parameters (whether they are input only, output only or both input and
output, why they are needed by the module and how the parameters are
modified) can be quite useful during Maintenance.
Note that if the module is modified, then the prologue should also be
modified, if necessary. A prologue that is inconsistent with the internal logic
of the module is prologue worse than having no prologue at all.
While coding programs for the Station Coding System special attention has
been paid to the internal documentation of the system, in addition to the
external documentation. Each program/module has:
31
How the module is related to other modules?
Purpose of variable/constants used.
Apart from this comments lines have been inserted whenever it was felt that
they were necessary. Moreover meaningful variable names/constants have
been assigned to different variable/constants used in the program.
External documentation
32
TESTING & DEBUGGING
TESTING
It should be clear in mind that the philosophy behind testing is to find errors.
Test cases are devised with this purpose in mind. A test case is a set of data
that the system will process as normal input. However, the data are created
with the express intent of determining whether the system will process them
correctly. For example, test cases for inventory handling should include
situations in which the quantifies to be withdrawn from inventory exceed,
equal and are less than the actual quantities on hand. Each test case is
designed with the intent of finding errors in the way the system will process
it. There are two general strategies for testing software: Code testing and
Specification testing. In code testing, the analyst develops that cases to
execute every instructions and path in a program. Under specification
testing, the analyst examines the program specifications and then writes test
data to determine how the program operates under specific conditions.
Regardless of which strategy the analyst follows, there are preferred
practices to ensure that the testing is useful. The levels of tests and types of
test data, combined with testing libraries, are important aspects of the actual
test process.
Levels of Testing
Systems are not designed as entire systems nor are they tested as single
systems. The analyst must perform both unit and system testing.
33
Unit Testing:
In unit testing the analyst tests the programs making up a system. For this
reason, unit testing is sometimes called program testing. Unit testing gives
stress on the modules independently of one another, to find errors. This
helps the tester in detecting errors in coding and logic that are contained
within that module alone. The errors resulting from the interaction between
modules are initially avoided. For example, a hotel information system
consists of modules to handle reservations; guest checking and checkout;
restaurant, room service and miscellaneous charges; convention activities;
and accounts receivable billing. For each, it provides the ability to enter,
modify or retrieve data and respond to different types of inquiries or print
reports. The test cases needed for unit testing should exercise each condition
and option.
Unit testing can be performed from the bottom up, starting with smallest and
lowest-level modules and proceeding one at a time. For each module in
bottom-up testing a short program is used to execute the module and
provides the needed data, so that the module is asked to perform the way it
will when embedded within the larger system.
System Testing:
The important and essential part of the system development phase, after
designing and developing the software is system testing. We cannot say that
every program or system design is perfect and because of lack of
34
communication between the user and the designer, some error is there in the
software development. The number and nature of errors in a newly designed
system depend on some usual factors like communication between the user
and the designer; the programmer's ability to generate a code that reflects
exactly the systems specifications and the time frame for the design.
Theoretically, a newly designed system should have all the parts or sub-
systems are in working order, but in reality, each sub-system works
independently. This is the time to gather all the subsystem into one pool and
test the whole system to determine whether it meets the user requirements.
This is the last change to detect and correct errors before the system is
installed for user acceptance testing. The purpose of system testing is to
consider all the likely variations to which it will be subjected and then push
the system to its limits.
1) Program testing
2) String testing
3) System testing
4) System documentation
5) User acceptance testing
35
Program Testing:
When a program is tested, the actual output is compared with the expected
output. When there is a discrepancy, the sequence of the instructions, must
be traced to determine the problem. The process is facilitated by breaking
the program down into self-contained portions, each of which can be
checked at certain key points.
String Testing:
Programs are invariably related to one another and interact in a total system.
Each program is tested to see whether it conforms to related programs in the
36
system. Each part of the system is tested against the entire module with both
test and live data before the whole system is ready to be tested.
System Testing:
System Documentation:
All design and test documentation should be well prepared and kept in the
library for future reference. The library is the central location for
maintenance of the new system.
An acceptance test has the objective of selling the user on the validity and
reliability of the system. It verifies that the system's procedures operate to
37
system specifications and that the integrity of important data is maintained.
Performance of an acceptance test is actually the user's show. User
motivation is very important for the successful performance of the system.
After that a comprehensive test report is prepared. This report shows the
system's tolerance, performance range, error rate and accuracy.
There are other six tests which fall under special category. They are
described below:
Peak Load Test: It determines whether the system will handle the volume
of activities that occur when the system is at the peak of its processing
demand. For example, test the system by activating all terminals at the same
time.
38
Recovery Testing: This testing determines the ability of user to recover data
or re-start system after failure. For example, load backup copy of data and
resume processing without data or integrity loss.
Human Factors Testing: It determines how users will use the system when
processing data or preparing reports.
DEBUGGING
39
VERIFICATION—“Are we building the product right?”
Simulators: -
Logical Analyzers:
Breakpoints: -
40
Trace Routines: -
Memory Dumps: -
Software Interrupts: -
41
SECURITY OF THE SYSTEM
While setting up a system aspect should be kept in mind for various reasons
like privacy of data, investment costs and levels this can be achieved by
appointing system administrator, users control supervisor etc. this
organization that depends heavily on information. These controls are
classified into:
42
OUTPUT
43
44
45
46
47
48
49
50
51
52
53
54
55
56
CODING
57
LOGINFORM
End Sub
58
Data1.RecordSource = "logintable"
End Sub
SPLASHFORM
End Sub
MAINFORM
59
End Sub
60
STKSEARCH.Show
End Sub
ADD_SUPPLIER
61
Data1.Recordset.Update
txtsno.Text = ""
txtsname.Text = ""
txtaddress.Text = ""
TXTPHONE.Text = ""
62
End Sub
EDIT_SUPPLIER
63
End Sub
End If
Exit Sub
message:
MsgBox "Invalid data", vbExclamation
End Sub
64
MsgBox "Successfully saved", vbExclamation
End Sub
End Sub
PURCHASE
65
txtmname.Text = ""
txtcompany.Text = ""
txtmdate.Text = ""
txtexpdate.Text = ""
txtrate.Text = ""
txtqty.Text = ""
txtbill.Text = ""
TXTORDERNO.SetFocus
End Sub
66
Data2.Recordset.Update
'Update stock
Data3.Refresh
Data3.Recordset.FindFirst "medicinename='" & txtmname.Text & " ' "
If Data3.Recordset.NoMatch Then
Data3.Recordset.AddNew
Data3.Recordset.Fields("medicinename") = txtmname.Text
Data3.Recordset.Fields("company") = txtcompany.Text
Data3.Recordset.Fields("rate") = txtrate.Text
Data3.Recordset.Fields("qty") = txtqty.Text
Data3.Recordset.Update
Else
Data3.Recordset.Edit
Data3.Recordset.Fields("qty") = Data3.Recordset.Fields("qty") +
Val(txtqty.Text)
Data3.Recordset.Update
End If
TXTORDERNO.Text = ""
txtpdate.Text = ""
txtsno.Text = ""
txtsname.Text = ""
67
txtaddress.Text = ""
txttype.Text = ""
txtmname.Text = ""
txtcompany.Text = ""
txtmdate.Text = ""
txtexpdate.Text = ""
txtrate.Text = ""
txtqty.Text = ""
txtbill.Text = ""
MsgBox "Successfully saved", vbExclamation
Exit Sub
message:
MsgBox "Invalid data", vbExclamation
End Sub
Data1.Refresh
While Data1.Recordset.EOF = False
txtsno.AddItem Data1.Recordset.Fields("sno")
68
Data1.Recordset.MoveNext
Wend
txttype.Clear
txttype.AddItem "Tablet"
txttype.AddItem "Capsule"
txttype.AddItem "Syrup"
txttype.AddItem "Injection"
End Sub
End Sub
End Sub
69
Private Sub txtrate_Change()
txtbill.Text = Val(txtrate.Text) * Val(txtqty.Text)
End Sub
End Sub
DEL_EDIT_PURCHASE
70
txtpdate.Text = ""
txtsno.Text = ""
txtsname.Text = ""
txtaddress.Text = ""
txttype.Text = ""
txtmname.Text = ""
txtcompany.Text = ""
txtmdate.Text = ""
txtexpdate.Text = ""
txtqty.Text = ""
txtrate.Text = ""
txtbill.Text = ""
End If
End Sub
Data2.Recordset.Edit
71
Data2.Recordset.Fields("orderno") = TXTORDERNO.Text
Data2.Recordset.Fields("purchasedate") = txtpdate.Text
Data2.Recordset.Fields("sno") = txtsno.Text
Data2.Recordset.Fields("SName") = txtsname.Text
Data2.Recordset.Fields("address") = txtaddress.Text
Data2.Recordset.Fields("medicinetype") = txttype.Text
Data2.Recordset.Fields("mname") = txtmname.Text
Data2.Recordset.Fields("compname") = txtcompany.Text
Data2.Recordset.Fields("mdate") = txtmdate.Text
Data2.Recordset.Fields("expdate") = txtexpdate.Text
Data2.Recordset.Fields("rate") = txtrate.Text
Data2.Recordset.Fields("qty") = txtqty.Text
Data2.Recordset.Fields("bill") = txtbill.Text
Data2.Recordset.Update
TXTORDERNO.Text = ""
txtpdate.Text = ""
txtsno.Text = ""
txtsname.Text = ""
txtaddress.Text = ""
txttype.Text = ""
txtmname.Text = ""
txtcompany.Text = ""
txtmdate.Text = ""
txtexpdate.Text = ""
txtrate.Text = ""
txtqty.Text = ""
txtbill.Text = ""
72
MsgBox "Successfully saved", vbExclamation
Exit Sub
message:
MsgBox "Invalid data", vbExclamation
End Sub
End Sub
73
txtpdate.Text = Data1.Recordset.Fields("purchasedate")
txtsno.Text = Data1.Recordset.Fields("sno")
txtsname.Text = Data1.Recordset.Fields("sname")
txtaddress.Text = Data1.Recordset.Fields("address")
txttype.Text = Data1.Recordset.Fields("medicinetype")
txtmname.Text = Data1.Recordset.Fields("mname")
txtcompany.Text = Data1.Recordset.Fields("compname")
txtmdate.Text = Data1.Recordset.Fields("mdate")
txtexpdate.Text = Data1.Recordset.Fields("expdate")
txtqty.Text = Data1.Recordset.Fields("qty")
txtrate.Text = Data1.Recordset.Fields("rate")
txtbill.Text = Data1.Recordset.Fields("bill")
End If
End Sub
SALEFORM
74
txtmname.Text = ""
txtcompany.Text = ""
txtmdate.Text = ""
txtexpdate.Text = ""
txtrate.Text = ""
txtqty.Text = ""
txtbill.Text = ""
End Sub
75
Data1.Recordset.Fields("expdate") = txtexpdate.Text
Data1.Recordset.Fields("rate") = txtrate.Text
Data1.Recordset.Fields("qty") = txtqty.Text
Data1.Recordset.Fields("bamount") = txtbill.Text
Data1.Recordset.Update
'update stock
Data3.Refresh
Data3.Recordset.FindFirst "medicinename='" & txtmname.Text & " ' "
Data3.Recordset.Edit
Data3.Recordset.Fields("qty") = Data3.Recordset.Fields("qty") -
Val(txtqty.Text)
Data3.Recordset.Update
TXTORDERNO.Text = ""
txtsale.Text = ""
txtcno.Text = ""
txtcname.Text = ""
txtaddress.Text = ""
txttype.Text = ""
txtmname.Text = ""
txtcompany.Text = ""
txtmdate.Text = ""
txtexpdate.Text = ""
76
txtrate.Text = ""
txtqty.Text = ""
txtbill.Text = ""
MsgBox "Successfully saved", vbExclamation
Exit Sub
message:
MsgBox "Invalid data", vbExclamation
End Sub
Private Sub Form_Activate()
txttype.Clear
txttype.AddItem "Tablet"
txttype.AddItem "Capsule"
txttype.AddItem "Syrup"
txttype.AddItem "Injection"
End Sub
77
End Sub
End Sub
EDITSALE
txtpdate.Text = ""
txtsno.Text = ""
txtsname.Text = ""
txtaddress.Text = ""
78
txttype.Text = ""
txtmname.Text = ""
txtcompany.Text = ""
txtmdate.Text = ""
txtexpdate.Text = ""
txtqty.Text = ""
txtrate.Text = ""
txtbill.Text = ""
End If
End Sub
End Sub
Data1.Recordset.Edit
Data1.Recordset.Fields("ono") = TXTORDERNO.Text
Data1.Recordset.Fields("dos") = txtsale.Text
Data1.Recordset.Fields("cno") = txtcno.Text
Data1.Recordset.Fields("cName") = txtcname.Text
Data1.Recordset.Fields("address") = txtaddress.Text
Data1.Recordset.Fields("mtype") = txttype.Text
79
Data1.Recordset.Fields("mname") = txtmname.Text
Data1.Recordset.Fields("company") = txtcompany.Text
Data1.Recordset.Fields("mdate") = txtmdate.Text
Data1.Recordset.Fields("expdate") = txtexpdate.Text
Data1.Recordset.Fields("rate") = txtrate.Text
Data1.Recordset.Fields("qty") = txtqty.Text
Data1.Recordset.Fields("bamount") = txtbill.Text
Data1.Recordset.Update
TXTORDERNO.Text = ""
txtsale.Text = ""
txtcno.Text = ""
txtcname.Text = ""
txtaddress.Text = ""
txttype.Text = ""
txtmname.Text = ""
txtcompany.Text = ""
txtmdate.Text = ""
txtexpdate.Text = ""
txtrate.Text = ""
txtqty.Text = ""
txtbill.Text = ""
MsgBox "Successfully saved", vbExclamation
Exit Sub
message:
MsgBox "Invalid data", vbExclamation
80
End Sub
End Sub
81
txtmname.Text = Data1.Recordset.Fields("mname")
txtcompany.Text = Data1.Recordset.Fields("company")
txtmdate.Text = Data1.Recordset.Fields("mdate")
txtexpdate.Text = Data1.Recordset.Fields("expdate")
txtqty.Text = Data1.Recordset.Fields("qty")
txtrate.Text = Data1.Recordset.Fields("rate")
txtbill.Text = Data1.Recordset.Fields("bamount")
End If
End Sub
PURCHASEREG
End Sub
SALEREG
82
Data1.RecordSource = "saletable"
End Sub
STOCKREG
End Sub
STOCKSEARCH
83
Data1.Refresh
End Sub
End Sub
LISTSUPPLIER
84
BIBLIOGRAPHY
The following are the books references that have been studied in the
duration of making of this project.
Mastering in vb6.0
Microsoft office
Black book of vb6
WEB REFRENCES
www.microsoft.com
85