Medical Shop Administration System
Medical Shop Administration System
INTRODUCTION
The Medical shop Management system project is software product to automate and log
on to various day-to-day activities and to provide instantaneous information required in effective
management of any medical shops. This project is capable to manage the records of medicines,
stocks of the medicines, medicine company details, user details, sales details etc.
1
1.1. SYSTEM SPECIFICATION
The System requirement has two phases as Hardware and Software Specification. The
system architecture describes the collection of inter-connected hardware nodes on which
software will eventually run.
Features of VB Visual basic syntax ideally suited for producing windows application.
Msword, MsAccess and MsPowerPoint all share visual basic for application the exact same
language syntax in visual basic in 6.0.
Visual basic continues the tradition Of simple, powerful and easy to learn language yet
adds enough extended capabilities to the satisfy o most jaded developer.
2
Several significant facts contribute to visual basic is bright future. First visual basic hedge
product millions of developers of all skills levels are producing application with visual basic
secondly VB powerful development system. It contain built in function to its intrinsic features
VB provides the capability to produce custom libraries and objects that can be loaded at run time
or bound to the distributable application. Thirdly VB also well supported by their party product.
Microsoft is indisputably the largest and the most successfully software company in the world.
For all these and many more visual basic is indisputably the most attractive development
environment urgently available. In the contrast to the absolute systems of the past, visual basic
has an under sizably bright and shining future.
In 1977 Larry Elision, Bob Miner & Ed Oates formatted a company built RDBMS
using C & the SQL interface. Soon, after they come out with version 1, a prototype. In 1979 RSI
delivered its first product to customers. The Oracle RDBMS version 2 worked on the digital
PDP-2 operating system & was soon ported to the DEC VAX system. 1983 heralded the release
of version 3, which touted changes in the SQL languages as well as performance enhancement &
other improvements. Unlike earlier version 3 was written almost entirely in c. At this point RSI
change its name to ORACLE CORPORATION.
Oracle version 4 was released in 1984. This version supported both the VAX system
and the IBM operating system. Version 4 was the first version to incorporate read consistency.
Version 5 introduced in 1985, was milestone it introduced client/server computing to the market
with the use of SQL*NET. Version 5 was also the first MS-DOS product to break through the
640 KB barrier.
In 1988 Oracle presented version 6 which introduced low level locking as well as a
verity of performance improvements & functionality enhancement including sequence
generation & differed writes. I was introduced to Oracle 6 back in the days when we ran the TPI,
TCP-A & TCP-B benchmark. At this point oracle was running on a large verity of different
platforms & operating systems. In 1991 Oracle introduced the oracle parallel server option was
available on a variety of platforms.
3
Oracle 7 released in 1992 including many architecture changes in the area of
memory, CPU & I/O utilization. Oracle 7 is a full-featured RDBMS to which you are
accustomed the one you have been using for many years.
4
2. SYSTEM STUDY
The system can be studied in two different kinds. The system analysis means analyze the
entire system. This phase are classified into
Existing System
Proposed System
2.1.1. DRAWBACKS
It is tedious to manage historical data which needs much space to keep all the previous
years’ ledgers, books etc.
5
2.2.1 FEATURES
The goal of the system is to bring down the work load with the increased efficiency and to speed
up the activities. The proposed system provides real time communication between the users
irrespective of geographical boundaries. The transaction details are maintained for future
reference these are the advantages of the proposed system
6
3. SYSTEM DESIGN AND DEVELOPMENT
Although the degree of interest in each concept has varied over the years, each has stood
the test of time .each provides the software with a foundation from which more sophisticated
methods can be applied fundamental design provides the necessary framework for “getting it
right”.
Set of fundamental design concepts are evolved over the past three decades. Although the
degree of interest in each concept has varied over the years, each has stood the test of time. Each
provides the software designer with a foundation from which more sophisticated design methods
can be applied. Design is defining a model of the new system and continues by converting this
method to a new system. The method is used to convert to database and processes to use
procedures and computer programs. Design proposes the new system that meets these
requirements. The detailed design uses conceptual data model in the proposed system the need
for database design is mandatory as all the information is maintained in a properties file. The
details of server configuration are fetched from a properties file.
3.1. FORM DESIGN
The purpose of the form design is to create a technical solution that satisfies the
functional requirements for the system it started off with initials of the existing system. The
analysis was helpful giving a thorough understanding of the present system. The analysis of
existing system also uncovered many flaws and limitation formed the major objective of the
proposed system goals.
Input design
Output design
Database design
Decide whether to display, print or speak information and select the output medium.
To reduce the need to restructure or reorganize data when new application requirements
arise.
8
PURPOSE OF DATABASE
A database system provides the organization with centralized control of the data. This is
in sharp contrast to the situation that prevails in many enterprises, where typically each
application has its own private files in its tapes and disks so that the data is widely dispersed and
therefore difficult to control the flow.
The advantages of centralized database are:
Redundancy can be reduced.
9
Sale Item module
The main purpose for developing this module is to manage the customer sales. Admin
will manage all sales record.
Stock module
The main purpose for developing this module is to manage the customer medicine stock.
Admin will manage all medicine stock record.
Reports
Reports are generated for various modules as per request.
10
4. TESTING AND IMPLEMENTATION
SYSTEM TESTING
System testing is the stage of implementation, which is aimed at ensuring that the system
works accurately and efficiently before live operation commences. Testing is vital to the success
of the system. System resting makes a logical assumption that is all the parts of the system are
correct, the goal will be successfully achieved .The candidate system is subject to a variety of
tests: on-line response, Volume, Stress, recovery and security and usability tests.
TYPES OF TESTING
Unit Testing
Integration Testing
Validation Testing
Output Testing
Unit Testing
Unit testing focuses verification efforts on the smallest unit of software design, the
module. This is also known as “Module Testing”. The modules are tested separately. This testing
is carried out during programming stage itself. In this testing step each module is found to be
working satisfactorily as regard to the expected output from the module.
Integration Testing
Integration testing focuses on the design and the construction of the software architecture. Data
can be lost across an interface; one module can have adverse effect on another sub function and
so on. This integration testing is a part that the software meets all functional, behavioral and
performance requirements. The errors, which are uncovered during integration testing, are
corrected during this phase.
Validation Testing
Errors discovered where corrected prior to completion of this project with the help of the user by
negotiating to establish a method of resolving deficiencies. Thus the proposed system under
consideration has been tested by using validation testing and found to be working satisfactorily.
11
Output Testing
After performing the validation testing, the next step is output testing of the proposed system
since no system could be useful if it does not produce the required output in the specific format.
The outputs generated or displayed by the system under consideration are tested asking the users
about the format required by them.
System Testing is an important phase. Testing represents an interesting anomaly for the software.
Thus a series of testing are performed for the proposed system before the system is ready for user
acceptance testing.
A good test case is one that has a high probability of finding an as undiscovered error. A
successful test is one that uncovers an as undiscovered error.
Testing Objectives:
Testing Principles:
SYSTEM IMPLEMENTATION
After proper testing and validation, the question arises whether the system can be
implemented or not. Implementation includes all those activities that take place to convert from
the old system to the new. The new system may be totally new, replacing an existing module or
automated system, or it may be major modification to an existing system. In either case proper
12
implementation is essential to provide a reliable to provide a reliable system to meet organization
requirements.
All planning has now, be completed and the transformation to a fully operational system
can commence. The first job will be writing, debugging documenting of all computer programs
and their integration into a total system. The master and transaction files are decided, and this
general processing of the system is established. Programming is complete when the programs
conformed to the detailed specification.
When the system is ready for implementation, emphasis switches to communicate with
the transaction. Open discussion with the staff is important form the beginning of the project.
Staff can be expected to the concerned about the effect of the automation on their jobs and the
fear of redundancy or loss of status must be allayed immediately. During the implementation
phase it is important that all staff concerned be apprised of the objectives of overall operation of
the system. They will need shinning on how computerization will change their duties and need to
understand how their role relates to the system as a whole.
13
5. CONCLUSION & FUTURE ENHANCEMENT
CONCLUSION
FUTURE ENHANCEMENT
The project has a very vast scope in future. The project can be implemented on intranet in
future. Project can be updated in near future as and when requirement for the same arises, as it
is very flexible in terms of expansion. With the proposed software of database Space
Manager ready and fully functional the client is now able to manage and hence run the entire
work in a much better, accurate and error free manner.
14
BIBLIOGRAPHY
REFERENCES BOOKS
WEBSITES
1. http://www.techopedia.com/definition/3734
2. http://en.wikipedia.org/wiki/.NET_Framework
3. http://www.tutorialspoint.com/vb.net/vb.net_overview.htm/net-framework-net
4. http://www.vbtutor.net/lesson1.html
5. http://en.wikipedia.org/wiki/Microsoft_SQL_Server
15
APPENDICES
DATA FLOW DIAGRAM
LEVEL 0:
Medical shop
User administration Main menu
system
LEVEL 1:
Purchase
Purchase module
Administrator
Medicine item
Medicine Details
Customer bill
Customer bill
Details
Medicine
Medicine Stock Details
Stock
16
SYSTEM FLOW DIAGRAM
17
DATABASE DESIGN
Login Form
Purchase Item
Sale Item
18
Item detail
Field name Data type(size)
record no Number(5)
Agencynm Varchar2(30)
item name Varchar2(30)
batch no Varchar2(10)
Mfgdt date
Expdt date
Agency bill
Customer bill
Field name Data type(size)
record no Number(5)
Billno Number(5)
Agencynm Varchar2(30)
Doctornm Varchar2(30)
Itemnm Varchar2(30)
Mfgdt Date
Expdt Date
Qty Number(5)
Ppr Number(8,2)
Total Number(8,2)
Stock
19
Field name Data type(size)
Agencynm Varchar2(30)
Item type Varchar2(20)
Itemnm Varchar2(30)
Mfgdt date
Expdt date
Ppr Number(8,2)
Qty Number(5)
20
SAMPLE SCREENSHOTS
21
22
23
24
25
26
27
28
29
30
31
32
SAMPLE CODING
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub cmd_cancel_Click()
Unload Me
End Sub
Private Sub cmd_ok_Click()
If txt_unm.Text = " " And txt_pass.Text = " " Then
MsgBox "PLS ENTER USERNAME AND PASSWORD"
ElseIf txt_unm.Text = "abhigna" And txt_pass.Text = "abhigna" Then
MsgBox "Login Successfully!!!"
MDIForm1.Show
ElseIf txt_unm.Text = "ssmedicals" And txt_pass.Text = "ssmedicals" Then
MsgBox "Login Successfully!!!"
MDIForm1.Show
Unload Me
Else
MsgBox "Login Not Successfully!!!"
End If
End Sub
Private Sub Form_Load()
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.Open "Provider=MSDAORA.1;Password=tiger;User ID=scott;Persist Security Info=True"
On Error GoTo err
cn.Execute "create table loginform(username varchar2(25),password varchar2(30))"
cn.Execute "commit"
err:
rs.Open "select *from loginform", cn, adOpenStatic, adLockBatchOptimistic
End Sub
Private Sub M_AGEBILL_Click()
Form10.Show
End Sub
Private Sub M_CUSTBILL_Click()
Form11.Show
End Sub
Private Sub M_EXIT_Click()
Unload Me
End Sub
Private Sub M_IDETAIL_Click()
Form9.Show
End Sub
Private Sub M_PUR_Click()
Form1.Show
End Sub
Private Sub M_REPORT1_Click()
DataReport1.Show
33
End Sub
Private Sub M_REPORT2_Click()
DataReport2.Show
End Sub
Private Sub M_REPORT3_Click()
DataReport3.Show
End Sub
Private Sub M_REPORT4_Click()
DataReport4.Show
End Sub
Private Sub M_SAL_click()
Form8.Show
End Sub
Private Sub M_STOCK_Click()
Form12.Show
End Sub
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim rs1 As ADODB.Recordset
Dim no1 As Integer
Dim item_nm As String
Dim agency_nm As String
Dim qty As Integer
Dim qty1 As Integer
Private Sub cmd_add_Click()
item_nm = Me.cmb_inm.Text
agency_nm = Me.cmb_agenm.Text
If cmd_add.Caption = "Add" Then
txt_rno.Text = " "
cmb_agenm.Text = " "
cmb_inm.Text = " "
txt_itemnm.Text = " "
Me.txt_mgdt.Text = ""
Me.txt_epdt.Text = ""
txt_ppr.Text = " "
txt_qty.Text = " "
txt_total.Text = " "
txt_rno.SetFocus
cmd_add.Caption = "Save"
Else
cn.Execute "insert into pur_item values(" & Val(txt_rno.Text) & ",'" & Trim(cmb_agenm.Text)
& "','" & Trim(cmb_inm.Text) & "','" & Me.txt_itemnm.Text & "','" & Format(dtp_endt.Value,
"dd-mmm-yy") & "','" & Format(Me.txt_mgdt.Text, "dd-mmm-yy") & "','" &
Format(Me.txt_epdt.Text, "dd-mmm-yy") & "'," & Val(txt_ppr.Text) & "," & Val(txt_qty.Text)
& "," & Val(txt_total.Text) & ")"
cn.Execute "commit"
qty = Val(Me.txt_qty.Text)
While Not rs1.EOF = True
34
If agency_nm = rs1.Fields(0).Value Then
If item_nm = rs1.Fields(1).Value Then
qty = Val(Me.txt_qty.Text)
qty1 = rs1.Fields(6).Value
qty1 = qty1 + qty
cn.Execute "update stock_detail set agencynm='" & cmb_agenm.Text & "',itemtype='" &
cmb_inm.Text & "',itemnm=' " & Me.txt_itemnm.Text & " ',mfgdt='" &
Format(Me.txt_mgdt.Text, "dd-mmm-yy") & "',expdt='" & Format(Me.txt_epdt.Text, "dd-mmm-
yy") & "',ppr=" & Val(txt_ppr.Text) & ",qty=" & qty1 & " where itemtype='" & cmb_inm.Text
& "' "
cn.Execute "commit"
MsgBox "record updated"
cmd_add.Caption = "Add"
rs.Requery
Exit Sub
End If
End If
rs1.MoveNext
Wend
cn.Execute "insert into stock_detail values('" & Trim(cmb_agenm.Text) & "','" &
Trim(cmb_inm.Text) & "',' " & Me.txt_itemnm.Text & " ','" & Format(Me.txt_mgdt.Text, "dd-
mmm-yy") & "','" & Format(Me.txt_epdt.Text, "dd-mmm-yy") & "'," & Val(txt_ppr.Text) & ","
& Val(txt_qty.Text) & ")"
cn.Execute "commit"
MsgBox "Your record saved"
cmd_add.Caption = "Save"
rs.Requery
End If
End Sub
Private Sub cmd_del_Click()
Dim ans As String
no1 = Val(InputBox("enter no to delete"))
ans = MsgBox("Do U Want To Delete?....", vbYesNo, "deletion Process...")
If ans = vbYes Then
cn.Execute "delete from pur_item where recordno=" & Val(txt_rno.Text) & ""
MsgBox "record deleted"
Call data
cn.Execute "commit"
rs.Requery
End If
rs.MoveNext
If rs.EOF = True Then
rs.MoveLast
End If
End Sub
Private Sub cmd_edit_Click()
Dim no As Integer
If cmd_edit.Caption = "Edit" Then
35
cmd_edit.Caption = "Edit Save"
Else
cn.Execute "update pur_item set recordno='" & Val(txt_rno.Text) & "',agencynm='" &
cmb_agenm.Text & "',itemtype='" & cmb_inm.Text & "',itemnm='" & txt_itemnm.Text &
"',entrydt='" & Format(txt_epdt.Text, "dd-mmm-yy") & "',mfgdt='" &
Format(Me.txt_mgdt.Text, "dd-mmm-yy") & "',expdt='" & Format(Me.txt_epdt.Text, "dd-mmm-
yy") & "',ppr='" & Val(txt_ppr.Text) & "',qty='" & Val(txt_qty.Text) & "',total=" &
Val(txt_total.Text) & " where recordno='" & Val(txt_rno.Text) & "'"
cn.Execute "commit"
MsgBox "record update"
cmd_edit.Caption = "Edit"
rs.MoveNext
End If
rs.Requery
End Sub
Private Sub cmd_ref_Click()
Unload Me
Me.Show
End Sub
Private Sub cmd_search_Click()
Dim fnd As Integer
fnd = Val(InputBox("enter no for searching"))
rs.MoveFirst
While Not rs.EOF = True
If fnd = rs.Fields(0).Value Then
MsgBox "record found"
Call data
Exit Sub
rs.Requery
End If
rs.MoveNext
Wend
If rs.EOF = True Then
MsgBox "record not found"
End If
rs.Requery
End Sub
Private Sub cmd_exit_Click()
Unload Me
End Sub
Private Sub cmd_first_Click()
If (rs.BOF = True) And (rs.EOF = True) Then
MsgBox "plece enter record", vbOKOnly
Else
rs.MoveFirst
Call data
End If
End Sub
36
Private Sub cmd_last_Click()
If (rs.BOF = True) And (rs.EOF = True) Then
MsgBox "plece enter record", vbOKOnly
Else
rs.MoveLast
Call data
End If
End Sub
Private Sub cmd_next_Click()
rs.MoveNext
If rs.EOF = True Then
MsgBox "you are in last recod"
rs.MoveLast
End If
Call data
End Sub
Private Sub cmd_previous_Click()
rs.MovePrevious
If rs.BOF = True Then
MsgBox "you are in first recod"
rs.MoveFirst
End If
Call data
End Sub
Public Function data()
txt_rno.Text = rs.Fields(0).Value
cmb_agenm.Text = rs.Fields(1).Value
cmb_inm.Text = rs.Fields(2).Value
Me.txt_itemnm.Text = rs.Fields(3).Value
dtp_endt.Value = rs.Fields(4).Value
Me.txt_mgdt.Text = rs.Fields(5).Value
Me.txt_epdt.Text = rs.Fields(6).Value
txt_ppr.Text = rs.Fields(7).Value
txt_qty.Text = rs.Fields(8).Value
txt_total.Text = rs.Fields(9).Value
End Function
Private Sub txt_qty_lostfocus()
txt_total.Text = txt_qty.Text * txt_ppr.Text
End Sub
Private Sub Form_Load()
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
Set rs1 = New ADODB.Recordset
cn.Open "Provider=MSDAORA.1;Password=tiger;User ID=scott;Persist Security Info=True"
On Error GoTo err
37
cn.Execute "create table pur_item(recordno number(5),agencynm varchar2(30),itemtype
varchar2(20),itemnm varchar2(30),entrydt varchar2(10),mfgdt date,expdt date,ppr
number(8,2),qty number(5),total number(8,2))"
cn.Execute "commit"
cn.Execute "create table stock_detail(agencynm varchar(30),itemtype varchar(20),itemnm
varchar(30),mfgdt date,expdt date,ppr number(8,2),qty number(5))"
cn.Execute "commit"
err:
rs.Open "select * from pur_item", cn, adOpenStatic, adLockBatchOptimistic
rs1.Open "select *from stock_detail", cn, adOpenStatic, adLockBatchOptimistic
End Sub
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim rs1 As ADODB.Recordset
Dim cn1 As ADODB.Connection
Private Sub cmd_add_Click()
agency_nm = Me.cmb_agenm.Text
item_nm = Me.cmb_inm.Text
If cmd_add.Caption = "Ok" Then
cn.Execute "insert into sale_item values(" & Val(txt_rno.Text) & ",'" & Trim(Me.txt_dr.Text) &
"','" & Trim(txt_cnm.Text) & "','" & Trim(txt_add.Text) & "','" & Trim(txt_city.Text) & "','" &
Trim(cmb_agenm.Text) & "','" & Trim(cmb_inm.Text) & "','" & Trim(Me.txt_itemnm.Text) &
"','" & Format(dtp_endt.Value, "dd-mmm-yy") & "','" & Format(Me.txt_mfgdt.Text, "dd-mmm-
yy") & "','" & Format(Me.txt_expdt.Text, "dd-mmm-yy") & "'," & Val(txt_ppr.Text) & "," &
Val(txt_qty.Text) & "," & Val(txt_total.Text) & ")"
cn.Execute "commit"
rs.Requery
rs1.Requery
qty = Val(Me.txt_qty.Text)
While Not rs1.EOF = True
If agency_nm = rs1.Fields(0).Value Then
If item_nm = rs1.Fields(1).Value Then
qty = Val(Me.txt_qty.Text)
qty1 = rs1.Fields(6).Value
qty1 = qty1 - qty
cn.Execute "update stock_detail set agencynm='" & cmb_agenm.Text & "',itemtype='" &
cmb_inm.Text & "',itemnm=' " & Me.txt_itemnm.Text & " ',mfgdt='" &
Format(Me.txt_mfgdt.Text, "dd-mmm-yy") & "',expdt='" & Format(Me.txt_expdt.Text, "dd-
mmm-yy") & "',ppr=" & Val(txt_ppr.Text) & ",qty=" & qty1 & " where itemtype='" &
cmb_inm.Text & "' "
cn.Execute "commit"
MsgBox "record updated"
Dim ans As String
rs.Requery
rs1.Requery
DataReport4.Show
ans = MsgBox("Do U Want To Print Out?....", vbYesNo, "deletion Process...")
38
If ans = vbYes Then
cm_print.ShowPrinter
Else
txt_rno.Text = " "
txt_dr.Text = " "
txt_cnm.Text = " "
txt_add.Text = " "
cmb_agenm.Text = " "
txt_itemnm.Text = " "
cmb_inm.Text = " "
txt_city.Text = " "
txt_mfgdt.Text = " "
txt_expdt.Text = " "
txt_ppr.Text = " "
txt_qty.Text = " "
txt_total.Text = " "
txt_rno.SetFocus
End If
rs.MoveNext
If rs.EOF = True Then
rs.MoveLast
End If
Exit Sub
End If
End If
rs1.MoveNext
Wend
cmd_add.Caption = "print"
Else
cmd_add.Caption = "Ok"
MsgBox "ok"
End If
rs.Requery
rs1.Requery
End Sub
42
Private Sub txt_rno_KeyPress(KeyAscii As Integer)
If Not (KeyAscii >= 48 And KeyAscii <= 57 Or KeyAscii = 8) Then
KeyAscii = 0
MsgBox "plese enter numeric value"
txt_rno.SetFocus
End If
End Sub
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub cmd_add_Click()
If cmd_add.Caption = "Add" Then
txt_rno.Text = " "
cmb_agenm.Text = " "
cmb_inm.Text = " "
txt_bno.Text = " "
txt_rno.SetFocus
cmd_add.Caption = "Save"
Else
cn.Execute "insert into item_detail values(" & Val(txt_rno.Text) & ",'" &
Trim(cmb_agenm.Text) & "','" & Trim(cmb_inm.Text) & "','" & Trim(txt_bno.Text) & "','" &
Format(dtp_mdt.Value, "dd-mmm-yy") & "','" & Format(dtp_edt.Value, "dd-mmm-yy") & "')"
cn.Execute "commit"
MsgBox "Your record saved"
cmd_add.Caption = "Add"
End If
End Sub
43
Private Sub cmd_delete_Click()
Dim ans As String
no1 = InputBox("enter no to delete")
ans = MsgBox("Do U Want To Delete?....", vbYesNo, "deletion Process...")
If ans = vbYes Then
cn.Execute "delete from item_detail where recordno=" & Val(txt_rno.Text) & ""
MsgBox "record deleted"
Call data
cn.Execute "commit"
End If
rs.MoveNext
If rs.EOF = True Then
rs.MoveLast
End If
End Sub
45