Professional Documents
Culture Documents
ON
1
CONTENTS
1. Contents of Index
2. Title of the project
3. Acknowledgement
4. Study Center Certificate
5. Certificate
6. Self Certificate
7. Project Outline
Project Outline Objective
Problem definition
Required hardware
Required software
The hardware & software specification of environment
necessary to run the project
8. The Sponsoring Organization
9. System Analysis
10. Software Planning
11. System Design
12. Testing and Debugging
13. Security of the System
14. Conclusion
15. Bibliography
2
PROJECT TITLE
HEALTH
CARE
SYSTEM
3
ACKNOWLEDGEMENT
DATE SUBMITTED BY
4
CERTIFICATE
5
SELF CERTIFICATE
6
COLLEGE CERTIFICATE
7
INTRODUCTION TO PRESENT SYSTEM
8
HARDWARE REQUIREMENT
This software run in any environment .This software needs at least Pentium
prosessor 32MB RAM memory,2.1GB of Hard disk ,SVGA display of 1
MB video memory and color monitor but with this lot of processor power
consumed and speed of the system will be very slow. Therefore a realistic
hardware configuration for this software is:-
9
FRONT END
VISUAL BASIC has been developed by Microsoft. Visual Basic can use a
large number of reference liabraries and components. Visual Basic –the
environment-provides integration with a variety of other tools, including
source code management ,component reuse tools and data manipulation.
Visual Basic truly is much more of a “programming environment” than just
a language. using this environment ,a single developer can quickly create a
simple application; a team of developers can create a so sophisticated,
distributed application.
Data access
Internet features
Controls
Component creation
Language
Wizards
10
programming technique is to embrace the capabilities to create classes and
ActiveX in Visual Basic.
If we look at all of the new features and functions added to the 6.0 release of
the Visual Basic, a couple of themes become evident: the internet and the
database
BACK END
For example, suppose the phone numbers of your suppliers are stored in
various locations: in a card file containing supplier phone numbers, in
product information file cabinet, and in a spreadsheet containing order
information .if a supplier’s phone number changes, you might have to update
that information in all three places in database, however, you only have to
update that information in one place- the supplier’s phone number is
automatically updated wherever you use it in database.
11
Using Microsoft Access, you can manage all your information from a single
database file. within the file, you can use:
12
HOSPITAL CHART
BOOKING ROOM
CALCULATE BILL
PATIENT
REPORTS
13
DFD FOR USER LOGIN
1 User_id
USER
User Enter Their Password & User_Id for
Opening the application
Accessing User
Information
Invalid Pasword
Validity
Process
User Matched Process Accessing User
Information
User Type
Invalid User Type
Validity
Process
Matched
14
DFD FOR ROOM
t ROOM
Room details
Data
Validity
Process 1 Patient1
Room not
available
2 Patient2
15
DFD FOR PATIENT
PATIENT
1 Room1
Searching Room
Not found
Display Process
Available room
16
ENTITY – RELATIONSHIP DIAGRAM
17
rent
Age Phone
Orderno.
Address
Roomtype Name
Roomno
ROOM
Patient
Roomno Admit
Date
contains Pid
has
HOSPITAL
DATABASE
Has staff
members
address
staff
staffid
post
name
18
OPERATIONS OF PRESENT SYSTEM
A. Room management
• Add new rooms
• Delete room
• Modify room
• Search room
B. Staff management
• Add new staff
• Delete staff
• Modify staff
• Search staff
C. Patient Management
• Add new patient
• Delete patient
• Modify patient
• Search patient
D. Calculating bill
19
SYSTEM DEVELOPMENT LIFE CYCLE
collection is done. The various reports and documents used are studied
in detail. After that the interview of various levels of management is
carried out. The DFD. Data dictionary, Menu chart are the tools used for
it.
output, input files, files, program construction plans, all these details are
submitted to user and got signed.
separately and tested for bugs. Whole of the system is executed and test
20
data is prepared and is fed in to the system and the output reports are
compared with the parameters.
21
ANALYSIS PHASE
SYSTEM DEFINATION
A system may be defined as any set of modules and ideas and its inter-
relationships that is ordered to achieve a common goal .A system processes
the input to produce outputs .The process in a manual system usually
employs various types of elements.
• Physical
• Procedural
• Conceptual
• Social etc.
A system is limited by its boundary. A system is composed of sub-systems,
which are also systems as this developed Hospital Management System. It
was decided to develop a system which having following features:
1. Room management
2. Staff management
3. Patient management
22
PERFORMANCE REQUIREMENTS:
1. USER-FRIENDLY:
The system should be user friendly so that it can be easily understood by the
user without any difficulty.
2. EASY TO MAINTAIN:
The system be easy to maintain and use. The system should be less time
consuming whish could be achieved by good programming.
3. PORTABILITY:
4. SECURITY:
The system should be secure from the unauthorized access and should be
password protected so that no other user can access it.
5. ERROR FREE:
The system should easily handle the use error in any case.
23
GENERAL ATTRIBUTES:
• AVAILABILITY
• MAINTAINABILITY
This software can be maintained with the help of extensive
documentation to be provided to the client.
• TRANSFERABILITY/CONVERSION
Product can easily be transferable to new version of windows.
When the existing system of the Hospital is working, we found that some
add on were required there so that problems could be solved. Some of the
problems or limitations in the present system are: -
3) There is no security of the database register i.e. any other person can
make changes in the database.
4) Calculating billing.
24
SYSTEM ANALYSIS
System Analysis is a very vast field of study through which a system analyst
puts his thought and search for the best solution of problem .Really, system
analysis is not a precise science, in fact it is an art of scientific approach
through which a analyst find the facts and records them in flexible manner .
Since the evolution of computer, computer based information system has
generally increased the quality and the performance of the computerization
of entrance test, that’s why the possibility of partiality or mistakes by
checker has lowered down almost to zero(0).
PRELIMINARY INVESTIGATION
25
The following objectives were achieved during the preliminary
investigation.
• Classification and the understanding of the project.
• Determination of options required for the test
• Determination of the technical and operational feasibility of the
alternative approaches.
.
STRUCTURED ANALYSIS
FEASIBILITY ANALYSIS
26
It is developed as a selection criteria and selection procedures. There are
three criteria for judgement are as follows:
TECHNICAL FEASIBILITY
This tells whether the appropriate h/w and s/w application tools will be
available when required. The system is developed under.
• Pentium4
• Window -xp platform
• Visual basic
ECONOMICAL FEASIBILITY
The application module has since been by us but it is difficult to know the
cost of this package in monetary terms after considering h/w, s/w and overall
expenses in project making.
OPERATIONAL FEASIBILITY:
This informs us whether the user will accept it or not and considered that it
does not need extra training to operate it .
27
DESIGN OBJECTIVE
Desugn is an excat blueprint of what will be built & a basis for the
configuration & content of that blueprint .The primary objective of the
design is to deliver the requirements as specified in the feasibility report.
Following objectives should be kept in mind: -
1. Practicability:-
2. Efficiency:-
3. Cost: -
4. Flexibility: -
28
5. Security: -
This is very important aspect of the design & should cover areas as
hardware reliability, fall back procedures, physical security of data &
provision of detection of fraud & abuse.
6. Reliability:-
The end user will normally specify reliability requirements for a new
system.these requirements may be expressed in terms of mean time
between failure or mean time to repair or system availability.
7. Correctness:-
8. Understandability:-
9. Modularity:-
10.Completeness:-
Good design should cover all relevant data structures , modules ,external
interface and module interconnection .
29
11.Consistency:-
Design should follow consistency through the system. it aims that there is
no inherent inconsistencies in the design.
12.Verifiability:-
13.Traceabiliy:-
30
FEASIBILITY REPORT
Is it feasible to automatic the system? The three major areas to determine the
feasibility of project:
1. Technical Feasibility:
The current level of technology can support the proposed system. The
proposed software is enabling to meet all the objective of the system and
output received is more efficient. So the project is technical feasible.
2. Economic Feasibility:
The proposed system needs to get hardware and software installed. The
short-term costs are over shadowed by the long-term gains. The profits of
the business is raised as this visual drafting system help in establishing
the better relationship between client and also satisfy their query’s and so
the cost of the development of the software and hardware is over
shadowed. Thus, project is economically feasible.
3. Operational Feasibility:
The current system faces a lot of problems that are removed in the
proposed system. The Clients of the system will be free from the burden
and a lot of confusion. The clients are themselves interested in getting the
manual system replace by the automated one. The proposal system is user
friendly, so even a layman can use it. Thus it is operationally feasible.
31
COST & BENEFIT ANALYSIS
Hardware Cost
Personnel Cost
This include staff salaries & benefits (health insurance, vocation time, sick
pay etc.) as well as pay for those involved in developing system. Costs
incurred during the development of a system are one time costs & are
labeled development costs. Once the system is installed the costs of
operating & maintaining the system become recurring costs.
Facility Cost
Facility costs are expenses incurred in the preparation of the physical site
where the application or the computer will be I operation. This includes
wiring, flooring, acoustics, lighting & air conditioning. These costs are
treated as one-time costs.
32
Operating Cost
Operating costs include all costs associated with the day-to-day operating
system. The amount depends on the number of sifts the nature of the
application & the caliber of the operating staff. There are various ways of
covering operating costs to overhead. Another approach is to change each
authorized user for the amount of processing they request from the system.
The amount charged is based on the computer time, staff time & the volume
of output produced.
Supply Cost
These costs are variable costs that increase with increased use of paper,
ribbon, disks & the like they should be estimated & include in the overall
cost of the system.
Equipment Cost
Equipment costs include rental & annual deprecation of any equipment such
as typewriter, copies, computer, terminals & microcomputers used in
connection with the system. Other costs associated with the equipment, such
as insurance & maintenance should also be included.
33
SYSTEM ANALYSIS
Introduction :
3. Certain tasks that are normally carried out late in the system
development cycle are moved to the analysis phase. For example , user
procedure documented during the analysis rather than later in the
application.
34
• Context diagram
• Structured chart
Context Diagram :
Context digram is the starting point of the structured analysis. They are
constructed to show the highest- level model of the system. It is used to
represent pictorially, the scope of boundaries of the system, or what we call
“AREA UNDER STUDY”.
SYSTEM DESIGN
Introduction:
35
System design is a highly created process that can be greatly facilitated by
the following:
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
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).
36
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
SYSTEM IMPLEMANTATION
37
Implementation, literally, means to put into effects or to carry out. The
system implementation phase of software engineering deals with all
activities that take place to convert from the old system to the new. Proper
implementation is essential to provide system to meet organization’s
requirements.
• Accuracy of Results,
• Minimization of response Time,
• Clarity and Simplicity of the code,
• Minimization of hard – Coding i.e. (a generic approach was followed)
• Minimization of amount of memory used.
38
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
1. INTERNAL DOCUMENTATION
2. EXTERNAL DOCUMENTATION
INTERNAL DOCUMENTATION
39
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 ;
a) Module functionality or what the module is doing.
b) Parameters are their purpose
c) Assumptions about the input, if any
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.
40
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:
Program/module name on top.
Date of creation of the program.
Last modification date.
The S/W tool used to develop the program.
Description of input to the program/module.
Description of the output produced.
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
The external documentation of the system contains all the relevant
information about the system which is not included within the programs.
The external documentation typically explains:
41
Why the system was developed?
The platform on which the system will run.
The various trouble shooting mechanisms.
The operation’s guide.
TESTING
Testing Objectives: -
4. Testing Principles:-
• Testing should begin “in the small” & progress towards “in the
large”.
42
• To be most effective, an independent third party should conduct
testing.
It is also known as glass box testing and internal testing. It is a test case
design method that uses a control structure of the procedural design to derive
test cases. Using white box testing methods, software engineer can derive
test cases that: -
1. Guarantee that all independent paths within the module have been
exercised at least once.
43
2. Interface errors.
6. Compile/assemble programs
44
DEBUGGING
Simulators: -
45
Logical Analyzers:
Breakpoints: -
Trace Routines: -
Memory Dumps: -
Software Interrupts: -
46
displays status information – breakpoint may be inserted with trap
instructions.
47
MAINTENANCE
Types of Maintenance
1. Corrective maintenance:-
2. Adaptive Maintenance: -
3. Perfective Maintenance: -
48
Fundamental objective of system maintenance:-
2 To preserve those aspects of programs that were correct and to avoid the
possibility that fixes applications and cause other aspects of those
applications to behave differently.
49
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:
from fire, flood and other physical damages. For that many measures are
taken such as hardware locks, preventing access of unauthorized person
from entering the system area, keep the floppy and disk in face custody,
keeping any heat generating appliances away from the system. Obtaining
insurance cover against the risk and natural calamities.
Database integrity: to maintain the data integrity many data validation
techniques are used so that the user cannot enter any unauthorized data.
The access of database is possible only to responsible user through
password.
Operating system level security: The measures is taken by giving no
50
SYSTEM ANALYSIS
QUALITY ASSURANCE
I have determined the quality of our system through following factors:
1. Correctness
2. Reliability
3. Efficiency
4. Usability
5. Maintainability
6. Testability
7. Portability
8. Accuracy
9. Error tolerance
Following are three main sub area of the main application area: -
i. Proper Maintenance of Staff
ii. Proper Maintenance of Room
iii. Proper Generation of Patient
All the activities related with the above Three activities starts with addmiting
a new Patient in Hospital.
51
52
DATABASE DESIGN
All the tables, sequences, triggers are stored in database for storing the
information about entrance test made by the users.
Following are the tables:
Login Table
Loginname Text
Password Text
Room Table
Room no AutoNumber
Room type Text
Rent per day Number
Staff Table
Staff id AutoNumber
Name Text
Age Number
Dateofjoining Date
Qualificateion Text
Address Text
Phone Text
Dept Text
Salary Number
Patient Table
Patientid AutoNumber
Name Text
53
Fname Text
Address Text
Age Number
PhoneNo Text
Roomno Number
PatientAdmit Table
Formno AutoNumber
Date Date
PatientId Number
Roomno Number
Staffid Number
Adv.amount Number
Remarks Text
CONCLUSION
After having completed this project ,We felt that it was an excellent learning
experience as I deal with a real life project that give a oppurtunity to
working for the students to make their test more easy, while working on this
project I got a good exposure to the sharp programming skills and the
various programming techniques while coding for this system I was exposed
to the vast knowledge about the strength and weakness of VB language .
54
A part from this I have been able to appreciate the hardwork of programmers
spent in developing such a system the most important realization was the
amount of cooperation, dedication, hardwork and team spirit that goes into
making of a successful project.
HARDWARE REQUIREMENT
55
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
• C get crystal reports 6.0
• Black book of vb6
• Complete Ref. Oracle
WEB REFRENCES
www.microsoft.com
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
frmsplash
Option Explicit
77
Passwordform
Data1.Recordset.MoveLast
If Text1.Text = Data1.Recordset.Fields(0) And Text2.Text =
Data1.Recordset.Fields(1) Then
Unload Me
Mainform.Show
Else
ans = MsgBox("Incorrect! Try Again ", vbYesNo)
If ans = vbYes Then
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Else
End
End If
End If
End Sub
78
Private Sub cmdok_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
cmdexit.SetFocus
End If
End Sub
End Sub
79
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Cmdok.SetFocus
End If
End Sub
80
Mainform
81
Private Sub mnuBillingReport_Click()
Calculating_bill.Show
End Sub
82
Private Sub mnuYes_Click()
End
End Sub
83
Room_add
End Sub
cmdadd.Visible = False
If Text1.Text = "" Then
MsgBox "Invalid entry", vbExclamation
Text1.SetFocus
ElseIf Text2.Text = "" Then
84
MsgBox "Invalid entry", vbExclamation
Text2.SetFocus
Else
Data1.Recordset.AddNew
Data1.Recordset.Fields("room_no") = Val(Text1.Text)
Data1.Recordset.Fields("room_type") = Combo1.Text
Data1.Recordset.Fields("rent") = Val(Text2.Text)
Data1.Recordset.Update
Data1.Refresh
MsgBox "Entry successfully saved!", vbExclamation
cmdadd.Visible = True
cmdadd.Enabled = True
cmdadd.SetFocus
End If
End Sub
85
Private Sub Form_Activate()
Text1.Locked = True
Text2.Locked = True
Combo1.Locked = True
cmdsave.Enabled = False
cmdadd.SetFocus
End Sub
86
If KeyAscii = 13 Then
Combo1.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 And cmdsave.Enabled = True Then
cmdsave.SetFocus
End If
End Sub
End Sub
87
Room_delete
End Sub
88
Else
Frame2.Visible = True
Text1.Text = Data1.Recordset.Fields("room_no")
Combo1.Text = Data1.Recordset.Fields("room_type")
Text3.Text = Data1.Recordset.Fields("rent")
Text1.Locked = True
Combo1.Locked = True
Text3.Locked = True
End If
End Sub
End Sub
89
Data1.DatabaseName = App.Path + "\hospdatabase.mdb"
Data1.RecordSource = "room_table"
Me.WindowState = 2
End Sub
End Sub
End Sub
90
Room_modify
Text1.Text = Data2.Recordset.Fields(0)
Combo1.Text = Data2.Recordset.Fields(1)
Text3.Text = Data2.Recordset.Fields(2)
Text1.Locked = True
Combo1.Locked = True
Text3.Locked = True
modifycmd.SetFocus
End If
End Sub
91
Private Sub Form_Activate()
Frame2.Visible = False
End Sub
Data1.Refresh
92
End Sub
93
Text1.Locked = True
Combo1.Locked = True
Text3.Locked = True
End If
End Sub
End Sub
94
Room_search
Label3.Visible = True
95
Combo3.Visible = True
Label3.Caption = "Enter " + Combo2.Text
Data1.Refresh
Combo3.Clear
If Data1.Recordset.EOF = False Then
Data1.Recordset.MoveFirst
Do
If UCase(Combo2.Text) = "ROOM_NO" Then
Combo3.AddItem Data1.Recordset.Fields(0)
ElseIf UCase(Combo2.Text) = "ROOM_TYPE" Then
Combo3.AddItem Data1.Recordset.Fields(1)
End If
Data1.Recordset.MoveNext
Loop While Data1.Recordset.EOF = False
Data1.Refresh
Data1.Recordset.MoveFirst
End If
End Sub
96
Private Sub Form_Load()
Me.WindowState = 2
Data1.DatabaseName = App.Path + "\hospdatabase.mdb"
Data1.RecordSource = "room_table"
Data2.DatabaseName = App.Path + "\hospdatabase.mdb"
Data2.RecordSource = "room_table"
Combo2.AddItem "ROOM_NO"
Combo2.AddItem "ROOM_TYPE"
End Sub
97
Staff_Add
End Sub
98
Private Sub Form_Activate()
Text1.Locked = True
Text2.Locked = True
Text3.Locked = True
Text4.Locked = True
Text5.Locked = True
Text6.Locked = True
Text7.Locked = True
Addcmd.SetFocus
savecmd.Enabled = False
End Sub
End Sub
99
Text1.SetFocus
ElseIf Text2.Text = "" Then
MsgBox "Invalid entry", vbExclamation
Text2.SetFocus
ElseIf Text3.Text = "" Then
MsgBox "Invalid entry", vbExclamation
Text3.SetFocus
ElseIf Text4.Text = "" Then
MsgBox "Invalid entry", vbExclamation
Text4.SetFocus
ElseIf Text5.Text = "" Then
MsgBox "Invalid entry", vbExclamation
Text5.SetFocus
ElseIf Text6.Text = "" Then
MsgBox "Invalid entry", vbExclamation
Text6.SetFocus
ElseIf Text7.Text = "" Then
MsgBox "Invalid entry", vbExclamation
Text7.SetFocus
Else
Data1.Refresh
Data1.Recordset.AddNew
Data1.Recordset.Fields(0) = Val(Text1.Text)
Data1.Recordset.Fields(1) = Text2.Text
Data1.Recordset.Fields(2) = Text3.Text
Data1.Recordset.Fields(3) = Val(Text4.Text)
Data1.Recordset.Fields(4) = Val(Text5.Text)
100
Data1.Recordset.Fields(5) = Text6.Text
Data1.Recordset.Fields(6) = Text7.Text
Data1.Recordset.Update
Data1.Refresh
MsgBox "Entry successfully saved!", vbExclamation
Addcmd.Enabled = True
savecmd.Enabled = False
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
End If
End Sub
101
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text4.SetFocus
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text5.SetFocus
End If
End Sub
Private Sub Text5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text6.SetFocus
End If
End Sub
102
Private Sub Timer1_Timer()
Dim r As Integer
r = Rnd * 15
ADDLABEL.ForeColor = QBColor(r)
STAFFLabel.ForeColor = QBColor(r)
End Sub
103
Staff_delete
End Sub
104
If Data1.Recordset.EOF = True Then
MsgBox "No record", vbExclamation
Backcmd.SetFocus
End If
If Data1.Recordset.EOF = False Then
Data1.Recordset.FindFirst "Staff_id=" & Combo1.Text
ans = MsgBox("Are you sure", vbYesNo + vbQuestion)
If ans = vbYes Then
Data1.Recordset.Delete
Data1.Refresh
MsgBox "Successfully deleted", vbExclamation
If Data1.Recordset.EOF = True Then
Combo1.Clear
End If
Combo1.Clear
Data2.Refresh
If Data2.Recordset.EOF = False Then
Data2.Recordset.MoveFirst
Do
Combo1.AddItem Data2.Recordset.Fields(0)
Data2.Recordset.MoveNext
Loop While Data2.Recordset.EOF = False
End If
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
105
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Frame2.Visible = False
Combo1.SetFocus
End If
End If
End Sub
Text1.Locked = True
Text2.Locked = True
Text3.Locked = True
Text4.Locked = True
Text5.Locked = True
Text6.Locked = True
106
Text7.Locked = True
End Sub
Private Sub Form_Load()
Me.WindowState = 2
Data1.DatabaseName = App.Path + "\hospdatabase.mdb"
Data1.RecordSource = "staff_table"
Data2.DatabaseName = App.Path + "\hospdatabase.mdb"
Data2.RecordSource = "staff_table"
End Sub
End Sub
107
Staff_modify
Text1.Text = Data2.Recordset.Fields(0)
Text2.Text = Data2.Recordset.Fields(1)
Text3.Text = Data2.Recordset.Fields(2)
Text4.Text = Data2.Recordset.Fields(3)
Text5.Text = Data2.Recordset.Fields(4)
Text6.Text = Data2.Recordset.Fields(5)
Text7.Text = Data2.Recordset.Fields(6)
End If
End Sub
Private Sub Form_Activate()
Combo1.SetFocus
Text3.Text = ""
savecmd.Visible = False
Text1.Locked = True
Text2.Locked = True
108
Text3.Locked = True
Text4.Locked = True
Text5.Locked = True
Text6.Locked = True
Text7.Locked = True
Data2.Refresh
If Data2.Recordset.EOF = False Then
Data2.Recordset.MoveFirst
Do
Combo1.AddItem Data2.Recordset.Fields(0)
Data2.Recordset.MoveNext
Loop While Data2.Recordset.EOF = False
End If
End Sub
End Sub
109
Text1.Locked = False
Text2.Locked = False
Text3.Locked = False
Text4.Locked = False
Text5.Locked = False
Text6.Locked = False
Text7.Locked = False
End Sub
110
Text6.SetFocus
ElseIf Text7.Text = "" Then
MsgBox "Invalid entry", vbExclamation
Text7.SetFocus
Else
Data2.Recordset.Edit
Data2.Recordset.Fields(0) = Val(Text1.Text)
Data2.Recordset.Fields(1) = Text2.Text
Data2.Recordset.Fields(2) = Text3.Text
Data2.Recordset.Fields(3) = Text4.Text
Data2.Recordset.Fields(4) = Val(Text5.Text)
Data2.Recordset.Fields(5) = Text6.Text
Data2.Recordset.Fields(6) = Text7.Text
Data2.Recordset.Update
Data2.Refresh
MsgBox "Entry successfully saved!", vbExclamation
End If
End Sub
111
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text4.SetFocus
End If
End Sub
Private Sub Text4_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text5.SetFocus
End If
End Sub
Private Sub Text5_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text6.SetFocus
End If
End Sub
Private Sub Text6_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text7.SetFocus
End If
End Sub
112
End If
End Sub
113
Staff_Serach
114
Data1.Recordset.MoveFirst
End If
End Sub
115
Private Sub Form_Activate()
DBGrid1.Visible = False
Combo2.Visible = False
End Sub
Combo1.AddItem "Staff_id"
Combo1.AddItem "Name"
Combo1.AddItem "Post"
End Sub
116
Add_patient
117
txtremarks.Text = ""
txtfname.Text = ""
txtamt.Text = ""
cmdsave.Enabled = True
cmdadd.Enabled = False
txtpname.SetFocus
End Sub
End If
End If
118
Data1.Refresh
Dim flag As Boolean
flag = True
Data1.Recordset.FindFirst "roomno=" & txtroomno.Text
If Data1.Recordset.NoMatch Then
flag = False
End If
If flag = True Then
MsgBox "Already booked", vbExclamation
Else
Data1.Refresh
On Error GoTo message
Data1.Recordset.AddNew
Data1.Recordset.Fields("form_no") = txtformno.Text
Data1.Recordset.Fields("patientid") = txtpid.Text
Data1.Recordset.Fields("name") = txtpname.Text
Data1.Recordset.Fields("age") = txtage.Text
Data1.Recordset.Fields("address") = txtadd.Text
Data1.Recordset.Fields("phone") = txtphone.Text
Data1.Recordset.Fields("fname") = txtfname.Text
Data1.Recordset.Fields("dateofadmit") = txtdoa.Text
Data1.Recordset.Fields("roomno") = txtroomno.Text
Data1.Recordset.Fields("adv_amount") = txtamt.Text
Data1.Recordset.Fields("remarks") = txtremarks.Text
Data1.Recordset.Update
MsgBox "Successfully saved", vbExclamation
119
cmdsave.Enabled = False
txtformno.Text = ""
txtpid.Text = ""
txtpname.Text = ""
txtage.Text = ""
txtphone.Text = ""
txtadd.Text = ""
txtroomno.Text = ""
txtdoa.Text = ""
txtremarks.Text = ""
txtfname.Text = ""
txtamt.Text = ""
txtformno.Locked = True
txtpid.Locked = True
txtpname.Locked = True
txtage.Locked = True
txtphone.Locked = True
txtadd.Locked = True
txtroomno.Locked = True
txtdoa.Locked = True
txtremarks.Locked = True
txtfname.Locked = True
txtamt.Locked = True
cmdsave.Enabled = False
cmdadd.Enabled = True
120
Exit Sub
message:
MsgBox "Invalid data", vbExclamation
cmdsave.Enabled = False
cmdadd.Enabled = True
End If
End Sub
121
txtroomno.Locked = True
txtdoa.Locked = True
txtremarks.Locked = True
txtfname.Locked = True
txtamt.Locked = True
cmdsave.Enabled = False
cmdadd.SetFocus
cmdadd.SetFocus
End Sub
End Sub
122
Private Sub txtpname_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtfname.SetFocus
End If
End Sub
123
End If
End Sub
Private Sub txtdoa_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtamt.SetFocus
End If
End Sub
Private Sub txtamt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
txtroomno.SetFocus
End If
End Sub
124
Del_modify_patient
125
End Sub
126
txtdoa.Text = Data1.Recordset.Fields("dateofadmit")
txtroomno.Text = Data1.Recordset.Fields("roomno")
txtamt.Text = Data1.Recordset.Fields("adv_amount")
txtremarks.Text = Data1.Recordset.Fields("remarks")
End If
End If
End Sub
Data1.Refresh
On Error GoTo message
Data1.Recordset.Edit
Data1.Recordset.Fields("name") = txtpname.Text
Data1.Recordset.Fields("age") = txtage.Text
Data1.Recordset.Fields("address") = txtadd.Text
Data1.Recordset.Fields("phone") = txtphone.Text
Data1.Recordset.Fields("fname") = txtfname.Text
Data1.Recordset.Fields("dateofadmit") = txtdoa.Text
Data1.Recordset.Fields("roomno") = txtroomno.Text
Data1.Recordset.Fields("adv_amount") = txtamt.Text
Data1.Recordset.Fields("remarks") = txtremarks.Text
Data1.Recordset.Update
MsgBox "Successfully saved", vbExclamation
CMDDEL.Enabled = True
127
CMDMODIFY.Enabled = True
CMDUPDATE.Enabled = False
Exit Sub
message:
MsgBox "Invalid data", vbExclamation
CMDDEL.Enabled = True
CMDMODIFY.Enabled = True
CMDUPDATE.Enabled = False
End Sub
End Sub
End Sub
128
Search_patient
129
Private Sub Form_Load()
Me.WindowState = 2
Data1.DatabaseName = App.Path + "\hospdatabase.mdb"
Data1.RecordSource = "patient_table"
End Sub
130
Room_report
131
Staff_report
132
Patient_report
133
Calculating_bill
End Sub
134
txtroomno.Text = Data1.Recordset.Fields("roomno")
txtdoa.Text = Data1.Recordset.Fields("dateofadmit")
txtpname.Locked = True
txtroomno.Locked = True
txtdoa.Locked = True
txtdays.Locked = True
txtamt.Locked = True
txtwhichdoa.SetFocus
End If
End Sub
Combo1.Clear
Data1.Refresh
If Data1.Recordset.EOF = False Then
Do
135
Combo1.AddItem Data1.Recordset.Fields("patientid")
Data1.Recordset.MoveNext
Loop While Data1.Recordset.EOF = False
End If
End Sub
End Sub
136