0% found this document useful (0 votes)
96 views

Documentation Patient

patient

Uploaded by

kenbobalaji
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views

Documentation Patient

patient

Uploaded by

kenbobalaji
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 95

SYNOPSIS The Project is entitled Patient Management System.

The main objective of this project is to computerize hospitals to manage patients information. Patient management system project is developed for computerizing hospitals to manage patients information more efficiently and save time in serving patients in limited time. Using this system details of every patient who visited hospital are updated and their details of tests, tablets, amount they paid, doctor they consulted, disease they are suffering form and next visit timings are updated to database. Using patient management system application hospitals can easily manage patients data and helps in analyzing patients visits and retrieving old data. With these application hospital authorities can view data of any patient with clarity on his past treatment details like doctor name, case and treatment details. This project is made using VB basic as front end and Microsoft Access as backend.

Module Description Admin Hospital info Doctor info Departments info Patients Reports Visitors Reports Doctor Patients info Appointment Report Staff Visitors info Appointment Info Admin Administrator will have complete control of the system. She/he can Add/Edit/Delete patients, Add/Edit/Delete Doctors, Add/Edit/Delete Beds, Search for patients, Assign patients to doctors.

Hospital In hospital module we can registered the hospital id, during registration we enter the basic information regarding hospital. Here we register the authoritys person name. Doctor Doctors who are related to that hospital can enter to their related page by their login name and password. They can see their information, change their account, they can see patients whom they checked, and Doctor can access a patients record and update his observations about the patient in that particular visit. Departments In departments module we can registered the department id, department name, description during registration we enter the basic information regarding departments. (Scan, ECG, Medicals are including this) Patient Reports

We can enter or view the previous medical record of particular patient. We can enter or view the PRESCRIPTION of particular patient. We can enter or view other information like :
o o o o

Notes and reports, Allergy, Diet Plan, Physician Orders,

o o o o o

Problems, Measurement, Diagnosis, Therapy, Medical advice

Visitors Reports In visitors reports module, visitors basic information, Visiting Time, Patient Name, are displayed here. The information is fetched from visitor info module. Patient In patient module we can registered the new patient, during registration we enter the basic information regarding patient. There are two types of patient one is INPATIENT and another is OUTPATIENT. If patient is INPATIENT then we can check the availability of room in particular ward. Appointment Report In this appointment report module, Doctor Name, patient Name, Timing is displayed here. Information is fetched from appointment info module. Staff This Module is for employees who are working in that particular hospital. Admin will assign them user name and password by this they can enter into their related page. An employee can enter the information about the Admitted Patient, he can add all type of charges like Room, Medicine, Test etc. to particular Patient, and he can also maintain the information of the Patient who has discharged.

Visitors In visitors module, visitor information on patient visits is maintained here. Patient name, visitor address, time in, time out is maintained here. Appointment Info In appointmen module here we can registered the new patient, during registration we enter the basic information regarding patient. There are two types of patient one is INPATIENT and another is OUTPATIENT. If patient is INPATIENT then we can check the availability of room in particular ward.

Chapter No Title 1. Introduction 1.1. 1.2. 2. Organization Profile Problem Statement

Page No 1

System Analysis 2.1. Approach 2.2. Existing System 2.3. Proposed System 2.4. Need For Computerization

3.

System Configuration 3.1. Hardware Configuration 3.2. Software Configuration

4.

System Development 4.1. Project Specification 4.2. Module Description 4.3. Form Validation

5.

System Design 5.1. Input Design 5.2. Code Design 5.3. Database Design 5.4. Output Design 5.5. Data Flow Diagram

6. 7. 8. 9.

Testing and Implementation Future Enhancement Conclusion Bibliography

10.

Appendices A. Input Screen B. Sampling Code

1.2.Problem Statement 1.Lack of immediate retrievals The information is very difficult to retrieve and to find particular information likeE.g. - To find out about the patients history, the user has to go through various registers. This results in inconvenience and wastage of time. 2.Lack of immediate information storage The information generated by various transactions takes time and efforts to be stored at right place. 3.Lack of prompt updating Various changes to information like patient details or immunization details of child are difficult to make, as paper work is involved. 4.Error prone manual calculation Manual calculations are error prone and take a lot of time this may result in incorrect information. For example calculation of patients bill based on various treatments. 5. Preparation of accurate and prompt reports This becomes a difficult task as information is difficult to collect from various registers.

Chapter 2

System analysis

2.SYSTEM ANALYSIS 2.1. APPROACH The data which were manually collected and the same is analyzed for computerization. System Analysis means the set of requirement and the description for the new system. This aims to understand how an existing system operation there by project to proposed system. 2.2. EXISTING SYSTEM The characteristic of existing system has been observed. They are summarized as below: 1. 2. 3. 4. 5. Traditional works are done in systems. Few staff in hospitals for more patients. It is time consuming. It is error prone. Rectification is tedious.

LIMITATIONS OF EXISTING SYSTEM: 1. 2. 3. 4. 5. Lack of security for handling cash physically. Distraction and stress is more. No direct role of higher officials. Problems due to network traffic. Problems due to frequent power failure.

2.3. PROPOSED SYSTEM Proposed system is being developed using Visual Basic as front end and MsAccess as back end. The aim of proposed system is to develop a system of improved facilities. The proposed system can overcome all the limitations of the existing system. 1. 2. 3. 4. The system provides proper security. Reports can be easily generated as per the requirements. The customer can deposit a large amount at any time. Reports can be easily generated by date wise.

5. Retrieval of details of patients is very fast and easy. 6. Information can be retrieved at any time. 7. A patient can view the transaction at any time. ADVANTAGES OF THE PROPOSED SYSTEM: The system is very simple in design and to implement. The system requires very low system resources and the system will work in almost all configurations. 1. 2. 3. 4. 5. 6. 7. Security of data. Proper control of the higher officials. Minimum time needed for the various processing. Greater efficiency and better service. We can view the patient report at any time. The details of the patient can be viewed through his finger prints. Reports can be viewed by the customer whenever he want.

2.4. NEED FOR COMPUTERIZATION The storage and the retrieval of the data were difficult and data entry was time consuming are some of the reasons for computerization are: Can be used to give operational characteristics For the usage of 24 hours usage. For the users comfort ability. To achieve secrecy and confidentiality. Its user friendly and helps in obtaining knowledge. Reports can be viewed easily at any time.

Chapter 3

System configuration

3.SYSTEM CONFIGURATION 3.1. HARDWARE CONFIGURATION: Processor Co Processor Speed RAM Hard disk Keyboard Mouse : Minimum of P4 Processor : Build in

: 2.79 GHz : 512 MB or more : 20 GB or more : 104 Keys : 2buttons/ 3 buttons

3.2. SOFTWARE CONFIGURATION: Operating System Front end Back end Design tool : Microsoft Windows XP

: Visual Basic 6.0 : MS Access : Data Flow Diagram

Chapter 4

System Specifications

4.SYSTEM SPECIFICATIONS 4.1. PROJECT SPECIFICATION MICROSOFT WINDOWS XP Microsoft Windows XP is a series of operating systems produced by Microsoft. Microsoft introduced an operating environment named Windows on November 20,1985 as an add-on to MS-DOS in response to the growing internet in graphical users interfaces (GUIs). Microsoft Windows came to dominate the worlds personal computer market, overtaking Mac OS, which had been introduced in 1984. The most recent server version is Windows Server 2008 R2; the most recent mobile version is Windows Phone7. Features of Windows XP The window XP service pack is the operating system which provides more security, flexibility and high performance in comparison with the previous versions and offers full level compatibility with the windows updating and offers so many features which is not there in the previous versions. Simplified user interface and innovative support services creates the best desktop operating system for business. Architectural independence Less crashing Faster internet performance Better Photo Handling and Printing Treats a CD-RW like a real drive System Restore Centralized Administration Large memory space Remote access server

MICROSOFT VISUAL BASIC Visual Basic(VB) is the third-generation event-driven programming language and integrated development environment (IDE) from Microsoft for its COM programming model. Visual Basic is designed to be relatively easy to learn and use. Visual Basic was derived from BASIC and enables the rapid application

development(RAD) of graphical user interface (GUI) application, access to databases using Data Acess Objects and Remote Data Objects, or ActiveX Data Objects and creation of ActiveX controls and objects. Programs written in Visual Basic can also use the Windows API, but doing so requires external function declaration. Properties, Events and Methods: Properties define the characteristic of a size and color etc. sometimes it is the way in which it behaves the method is an action that can be performed on objects. VB forms and controls are object, which expose the own properties, methods and events. Developing an Application: Visual Programming Setup Code Programming Setup Visual Basic involves designing an application with various tools. The code programming step involves writing the program using a text editor. Programming Fundamentals: Visual Basic uses building blocks such as Variables, Data types, Procedures, Functions and Control structures in its programming environment. Using the Menu Editor: A Menu Editor can be used to add a new command to the existing menu which creates menu bar, change or delete an existing menu. Data Environment: The Data Environment Designer allows quick and building of hierarchical record set during the design time. Programming is the result in Data Environment Object however requires the knowledge of ADO Programming Model combines with the characters of hierarchical record set. Elements used in Visual Basic:

The Text Box: The text box is the standard control for accepting input from the user as well as to display the output. It can handle string (text) and numeric data but not images or pictures. String in a text box can be converted to a numeric data by using the function Val(text). The Label Box: The label is a very useful control for Visual Basic, as it is not only used to provide instructions and guides to the users, it can also be used to display outputs. One of its most important properties is Caption. Using the syntax label caption,it can display text and numeric data. You can change its caption in the properties window and also at runtime. The Command Button: The command button is one of the most important controls as it is used to execute commands. It displays an illusion that the button is pressed when the user click on it. The most common event associated with the command button is the click event. The Image Box: The Image Box is another control that handles images and pictures. It functions almost identically to the picture box. However, there is one major difference, the image is in image box is stretchable, which means it can be resized.This feature is not available in the picture box. The Combo Box: The function of the combo box is also to present a list of items where the user can click and select the items from the list. However the user needs to click on the small arrowhead on the right of the combo box to see the items which are presented in a drop down list. In order to add items to the list, you can also use the add item method. The Check Box: The Check Box control lets the user selects or unselects an option. When the check box is checked, its value is set to 1 and when it is unchecked, the value is set to

0.You can include the statements check1.value=1to mark the checkbox and check1.value=0 to unmark the check box, as well as use them to initiate certain actions. MICROSOFT ACCESS Microsoft Access stores information in what is called a Database. Database Create your Microsoft Access database and specify what kind of data you will be storing. A retail business might create a database to store all their sales information (i.e. Items sold, Customer, employee, commission, etc) The name database is actually a very descriptive name. The database is two things in one: Data: A place to store your data. This data could be a record of sales, employees, salaries, or anything else. base: It is the basic building block that many other features in access use to function.With a properly created database you can create informative reports about the data, custom charts to visually display values, and create queries. Query Using queries we can view, change, and analyze the data in different ways. We can also use them as the source of records for forms, reports, and data access pages. This is a fancy term to basically describe the process of retrieving information from the database. Table A table is a collection of data about specific topics.A table in access in quite different then a table in real life. Instead of having wooden legs and being used for meals, Access tables are a grid made up of rows and columns Table organizes the data into columns(called fields)and rows(called records).

4.2.Module Description Admin Administrator will have complete control of the system. She/he can Add /Edit / Delete patients, Add/Edit/Delete Doctors, Add/Edit/Delete Beds, Search for patients, Assign patients to doctors. Hospital In hospital module here we can registered the hospital id, during registration we enter the basic information regarding hospital. Here we register the authoritys person name. Doctor Doctors who are related to that hospital can enter to their related page by their login name and password. They can see their information, change their account, they can see patients whom they checked, and Doctor can access a patients record and update his observations about the patient in that particular visit. Departments In departments module here we can registered the department id, department name, description during registration we enter the basic information regarding departments. (Scan, ECG, Medicals are including this) Patient Reports

We can enter or view the previous medical record of particular patient. We can enter or view the PRESCRIPTION of particular patient.

We can enter or view other information like :


o o o o o o o o o

Notes and reports, Allergy, Diet Plan, Physician Orders, Problems, Measurement, Diagnosis, Therapy, Medical advice

Visitors Reports In visitors reports module, visitors basic information, Visiting Time, Patient Name, are displayed here. The information is fetched from visitor info module. Patient In patient module here we can registered the new patient, during registration we enter the basic information regarding patient. There are two types of patient one is INPATIENT and another is OUTPATIENT. If patient is INPATIENT then we can check the availability of room in particular ward. Appointment Report

In this appointment report module, Doctor Name, patient Name, Timing is displayed here. Information is fetched from appointment info module. Staff This is Module is for employees who are working in that particular hospital. Admin will assign them user name and password by this they can enter in to their related page. An employee can enter the information about the Admitted Patient, he can add all type of charges like Room, Medicine, Test etc. to particular Patient, and he can also maintain the information of the Patient who has discharged.

Visitors In visitors module, visitor information on patient visits is maintained here. Patient name, visitor address, time in, time out is maintained here. Appointment Info In patient module here we can registered the new patient, during registration we enter the basic information regarding patient. There are two types of patient one is INPATIENT and another is OUTPATIENT. If patient is INPATIENT then we can check the availability of room in particular ward.

4.3 FORM VALIDATION Patient Info Form: Validation was done to ensure that the patient has entered numeric values in numeric fields and has entered the alphabets for text fields and has entered the correct date in the date/time field.

Doctor Info Form: Validation was done to ensure that the doctor has entered numeric values in numeric fields and has entered the alphabets for text fields and has entered the correct date in the date/time field. Visitor Info Form: Each field was tested by the programmer. Validation was done to ensure the owner has enters a numeric value in the amount field.

Chapter 5

System design

5.SYSTEM DESIGN Design is a iterative process thought which requirements a translated into or blue print for constructing the software design must implement all the implicit all threw implicit requirements and explicit requirements. It must be a readable and understandable. It is not coding. The initial focus of the project will be on in-house league formats. However, the user interface is designed to organize the users' data efficiently and intuitively and can be easily extended to support almost any kind of athletic event. The scheduling system will be developed in Java, while web-based components will be developed in HTML. 5.1.Input Design Input design is the process of converting a user-oriented description of the input into a computer-based system. This design is important to avoid errors in the data input process and show the correct direction to the management for getting correct information from the computerized system. It is achieved by creating user-friendly screens for the data entry to handle large volume of data. The goal of designing input is to make data entry easier and to free from errors. The data entry screen is designed such a way that all the data manipulates can be performed. It also provides record viewing facilities. When the data is entered it will check for its validity. Data can be entered with the help of screen. Appropriate messages are provided as when needed so that the user will not be in maize of instant. The design of input focuses on controlling the amount of input required, controlling the errors, avoiding delay, avoiding extra steps and keeping the process simple. The input is designed in such a way so that it provides security.

5.2.CODE DESIGN A code is an ordered collection of symbols designed to prove unique identification to an entry or an attribute. Purpose of using code is: To achieve unique identification. Can be used instead of the name. To specify an objects physical or performance characteristics. Can be used to give Operational characteristics. 5.3.DATA BASE DESIGN Table : Login Field Name LoginId UserId Password Usertype Data Type Text Text Text Text Size 50 50 50 50 Description Login Id User Id Password User Type

Table :AppoinmentInfo Field Name Id Date Data Type Number Date/Time Size 50 50 Description Appoinment Id AppoinmentDate

DoctorName PatientName Timing Age

Text Text Date/time Number

50 50 Size 50

DoctorName Patient Name Timing Age

Table :DepartmentInfo Field Name Id Name Description Data Type Number Text Text Size 50 50 50 Description Department Id Department Name Description

Table : DoctorInfo Field Name Id Data Type Number Size 50 Description Doctor Id

Name PhoneNo MailId Address HospitalName Specialist

Text Text Text Text Text Text

50 50 50 50 50 50

DoctorName PhoneNo MailId Address HospitalName Specialist

Table :HospitalInfo Field Name HospitalId HospitalName Address PhNo Inchargename Data Type Number Text Text Number Text Size 50 50 50 50 50 Description HospitalId HospitalName Address PhNo Inchargename

Table : InpatientInfo Field Name Data Type Size Description

Id Doctorname patientname Department Indate Outdate Feesamount Paidamount Medicalreport Tabletinfo

Number Text Text Text Date/Time Date/Time Number Number Text Text

50 50 50 50 50 50 50 50 50 50

Id Doctorname Patientname Department Indate Outdate Feesamount Paidamount Medicalreport Tabletinfo

Table: OutPatientInfo Field Name Id doctor name patient name Medical Report Tablet info Date Timing Fees Data Type Number Text Text Text Text Date/Time Date/Time Number Size 50 50 50 50 50 50 50 50 Description Id DoctorName patient name Medical Report Tablet info Date Timing Fees

Table: PatientInfo Field Name Id name Age Gender Address blood Group Height Weight Phone No Registration Date FPTP Data Type Number Text Text Text Text Date/Time Number Number Number Date/Time OLE Object Size 50 50 50 50 50 50 50 50 50 50 50 Description Id Name Age Gender Address blood Group Height Weight Phone No Registration Date FPTP

Table : Staff Info Field Name Id Name PhoneNo Mailid Destination Data Type Number Text Text Number Text Size 50 50 50 50 50 Description Id Name PhoneNo Mailid Destination

Address Salary

Text Number

50 50

Address Salary

Table : VisitorsInfo Field Name Id Name Patientname Address Phoneno Date Timing Data Type Number Text Text Text Text Date/Time Date/Time Size 50 50 50 50 50 50 50 Description Id Name Patientname Address Phoneno Date Timing

5.4.Output Design Designing computer output should processed in an organized, well thought out manner; the right output must be developed while ensuring that each output

element is designed so that people will find the system can use easily and effectively. When analysis designs computer output should design: Identify the specific output that is needed to meet the requirements. Create document, report, or other formats that contain information produced by the system. Select the appropriate methods for presenting the information. A quality output is one, which meets the requirements of the end user and presents the information clearly. In output designs it is determined how the information is to be displaced for immediate need and also the hard copy output. It is the most important and direct source information to the user. Efficient and intelligent output design improves the systems relationship to help user decision making.

5.5Data Flow Diagram


Data Input Stage Data Out Put Stage

Data Storage

ADMIN

Admin Employee

Doctor

Doctor Patient Billing


UI Screens

Emplo.

Reports
Login DFD

Login Master

Open Login form

Enter User Name and Password

Yes

Check User

Yes

User Home Page

No

Verification Data

Admin Activities (1st Level)

Pay Slips Details Doctors Master Login Master


Open Form() 1.0.0 Doctors registration 1.0.2 Generate Pay slips 1.0.4

Manage Reports 1.0.5

Enter Login Details 1.0.1

User Reports Employee registration 1.0.3

Employee Details

Verificatio n

Validation

Patient Reports 1.0.6

Patient Details

Admin Register Doctors

Doctor Registration

Get Doctor ID

Get doctor name

Get Qulification
Specialzation

1.2.1

1.2.2

1.2.3

1.2.4

1.2.5

Validates Data Validates Data Validates Data Doctor Details

Admin Register Employee

Employee Registration

Employee ID

Employee name

Get Qulification
Designation

1.2.1

1.2.2

1.2.3

1.2.4

1.2.5

Validates Data Validates Data Validates Data Employee Details

User (Employee) Activities (2nd Level):


Data Storage Patient Details
Generate Bills

Login Account Details


Open Form() 2.0.0 New Patient Registration 2.0.2

Log out
2.0.4

Enter Login Details 2.0.1

Queries 2.0.3

Data Storage Verifies Data Validates Data

Chapter 6

Testing and Implementation

6. SYSTEM IMPLEMENTATION AND TESTING 6.1.SYSTEM TESTING A strategy for software testing may also be viewed in the context of the spiral. Unit testing begins at the vertex of the spiral and concentrates on each unit of the software as implemented in source code. Testing progress by moving outward along the spiral to integration testing, where the focus is on the design and the construction of the software architecture. Talking another turn on outward on the spiral we encounter validation testing where requirements established as part of software requirements analysis are validated against the software that has been constructed. Finally we arrive at system testing, where the software and other system elements are tested as a whole. UNIT TESTING All modules were tested and individually as soon as they were completed and were checked for their correct functionality.Unit testing focuses verification effort on the smallest unit of software design, the module. The unit testing we have is white box oriented and some modules the steps are conducted in parallel. To follow the concept of white box testing we have tested each form .we have created independently to verify that Data flow is correct, All conditions are exercised to check their validity, All loops are executed on their boundaries. INTEGRATION TESTING The entire project was split into small program; each of this single programs gives a frame as an output. These programs were tested individually; at last all these programs where combined together by creating another program where all

these constructors were used. It give a lot of problem by not functioning is an integrated manner. The user interface testing is important since the user has to declare that the arrangements made in frames are convenient and it is satisfied. when the frames where given for the test, the end user gave suggestion. Based on their suggestions the frames where modified and put into practice.

VALIDATION TESTING At the culmination of the black box testing software is completely assembled as a package. Interfacing errors have been uncovered and corrected and a final series of test i.e., Validation succeeds when the software function in a manner that can be reasonably Accepted by the customer. 6.2. SYSTEM IMPLEMENTATION System implementation is stage in the project where the theoretical design is turned into the working system. The most crucial stage is giving the users confidence that the new system will work effectively and efficiently. The performance of reliability of the system is tested and it gained acceptance. The system was implemented successfully. Implementation is a process that means converting a new system in to operation. Proper implementation is essential to provide a reliable system to meet organization requirements. During the implementation stage a live demon was undertaken and made in front of end-users. The various features provided in the system were discussed during implementation.

Chapter 7

FUTURE ENHANCEMENT

7. FUTURE ENHANCEMENT I have derived immense pleasure in completing this project. This project has not only helped me to learn in depth but also improved the system design capabilities. In our project we developed to manage the patient management system. It can handle the patient details as well as doctors details and staff so it is easy to maintain a patient records in our project. We can retrieve a large data in a short time. In future we enhance Patient management in online. Thats very helpful to use our project in anywhere. We can enhance the sms concept in appointment info by using GSM concepts. Once we make an appointment that will intimate through sms if your appointment is conform or not

Chapter 8

CONCLUSION

8. CONCLUSION I have successfully completed the project PATIENT MANAGEMENT SYSTEM Using Visual Basic 6.0 as Front End and MS Access as Back End. The developed system deals with the computerization of both patient and hospital management with In patients, Out Patients, Doctors Info, Patients Info, Appoinment Info, Deparment Info , Staff Info, Hospital Info, Visitors Info. This system is partially implemented because of time consumption and low cost.The developed system is completely menu driven and extremely user friendly. So it can easily used by any user.

APPENDICES A.INPUT SCREEN

B.SAMPLE CODING Login Page

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("Do you want to close?", vbYesNo, "PMS") = vbYes Then Unload Me End If End If End Sub Private Sub cmbUserType_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmdLogin.SetFocus End If End Sub Private Sub cmdClear_Click() txtUserId.Text = "" txtPassword.Text = "" cmbUserType.Text = "" txtUserId.SetFocus End Sub Private Sub cmdExit_Click() End End Sub Private Sub cmdLogin_Click() Dim IsValidUser As Boolean IsValidUser = False If txtUserId.Text = "" Then MsgBox "Please Enter the User Id" txtUserId.SetFocus ElseIf txtPassword.Text = "" Then MsgBox "Please Enter the Password" txtPassword.SetFocus ElseIf cmbUserType.Text = "" Then MsgBox "Please Select the User Type" cmbUserType.SetFocus Else dataLogin.Recordset.MoveFirst While (Not dataLogin.Recordset.EOF)

If LCase(txtUserId.Text) = LCase(dataLogin.Recordset(1).Value) And LCase(txtPassword.Text) = LCase(dataLogin.Recordset(2).Value) And cmbUserType.Text = dataLogin.Recordset(3).Value Then IsValidUser = True End If dataLogin.Recordset.MoveNext Wend If IsValidUser = True Then If cmbUserType.Text = "Admin" Then frmMainFormAdmin.Show ElseIf cmbUserType.Text = "Doctor" Then frmMainfromdoctor.Show ElseIf cmbUserType.Text = "Staff" Then frmMainFormStaff.Show End If Me.Hide Else MsgBox "Invalid User" txtUserId.SetFocus End If End If

End Sub Private Sub txtPassword_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmbUserType.SetFocus End If End Sub Private Sub txtUserId_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtPassword.SetFocus End If End Sub

Main Form Admin

Private Sub cmdBack_Click() Me.Hide FrmLogin.Show FrmLogin.txtUserId = "" FrmLogin.txtPassword = "" FrmLogin.cmbUserType = "" End Sub Private Sub cmdstaffinfo_Click() Me.Hide frmStaffinfo.Show End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("Do you want to close?", vbYesNo, "PMS") = vbYes Then Unload Me End If End If End Sub Private Sub cmddepartmentinfo_Click() Me.Hide frmDepartmentinfo.Show End Sub Private Sub cmddoctorinfo_Click() Me.Hide frmDoctorinfo.Show End Sub Private Sub cmdHospitalInfo_Click() Me.Hide frmHospitalinfo.Show End Sub Private Sub cmdPatientinfo_Click() Me.Hide frmPatientinfo.Show End Sub

STAFF MAIN FORM

Private Sub cmdBack_Click() Me.Hide FrmLogin.Show FrmLogin.txtUserId = "" FrmLogin.txtPassword = "" FrmLogin.cmbUserType = "" End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("Do you want to close?", vbYesNo, "PMS") = vbYes Then Unload Me End If End If End Sub Private Sub Appointmentinfo_Click() Me.Hide frmAppointmentinfo.Show End Sub Private Sub cmdVisitorsinfo_Click() Me.Hide frmVisitorsinfo.Show End Sub

MAIN DOCTOR FORM Private Sub cmdBack_Click() Me.Hide FrmLogin.Show FrmLogin.txtUserId = "" FrmLogin.txtPassword = "" FrmLogin.cmbUserType = "" End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("Do you want to close?", vbYesNo, "PMS") = vbYes Then Unload Me End If End If End Sub

Private Sub cmdAppointmentinfo_Click() frmAppointmentinfo.Show Me.Hide End Sub Private Sub cmdInpatientinfo_Click() frmInpatientinfo.Show Me.Hide End Sub Private Sub cmdOutpatientinfo_Click() frmOutpatientinfo.Show Me.Hide End Sub Private Sub cmdPatientinfo_Click() frmPatientinfo.Show Me.Hide End Sub APPOINTMENT FORM

Private Sub cmdBack_Click() Txtdate = "" Txtdoctorname = "" Txtid = "" Txtpatientname = "" cmbTiming = "" If MsgBox("Do you want to move staff form ?", vbYesNo) = vbYes Then frmMainFormStaff.Show Me.Hide Else frmMainfromdoctor.Show Me.Hide End If End Sub Private Sub cmdDelete_Click() If MsgBox("Are you Delete this Record?", vbYesNo) = vbYes Then If DataAppoitnmentinfo.Recordset.RecordCount = 0 Then MsgBox "No record" Else DataAppointmentinfo.Recordset.MoveFirst Do While Not DataAppointmentinfo.Recordset.EOF

If Txtid.Text = DataAppointmentinfo.Recordset(0).Value Then DataAppointmentinfo.Recordset.Delete MsgBox "Deleted" Exit Do End If DataAppointmentinfo.Recordset.MoveNext Loop End If End If Txtid = "" Txtdate = "" Txtdoctorname = "" Txtid = "" Txtpatientname = "" cmbTiming = "" Txtdate.SetFocus End Sub Private Sub cmdNew_Click() Txtid.Text = DataAppointmentinfo.Recordset.RecordCount + 1 cmbTiming.Text = "" Txtdoctorname.Text = "" Txtdate = "" Txtpatientname = "" Txtdate.SetFocus End Sub Private Sub cmdSave_Click() If Txtid = "" Then MsgBox ("Please enter the id") Txtid.SetFocus ElseIf Txtdoctorname = "" Then MsgBox ("Please enter the doctorname") Txtdoctorname.SetFocus ElseIf Txtpatientname = "" Then MsgBox ("Please enter the patientname") Txtpatientname.SetFocus ElseIf cmbTiming = "" Then MsgBox ("Please enter the timings") cmbTiming.SetFocus Else Dim IsExistRec As Boolean IsExistRec = False If DataAppointmentinfo.Recordset.RecordCount > 0 Then

DataAppointmentinfo.Recordset.MoveFirst End If Do While Not DataAppointmentinfo.Recordset.EOF If Txtid.Text = DataAppointmentinfo.Recordset(0).Value Then IsExistRec = True Exit Do End If DataAppointmentinfo.Recordset.MoveNext Loop If IsExistRec = True Then DataAppointmentinfo.Recordset.Edit Else DataAppointmentinfo.Recordset.AddNew End If

DataAppointmentinfo.Recordset(0) = Txtid.Text DataAppointmentinfo.Recordset(1) = Txtdate.Text DataAppointmentinfo.Recordset(2) = Txtdoctorname.Text DataAppointmentinfo.Recordset(3) = Txtpatientname.Text DataAppointmentinfo.Recordset(4) = cmbTiming.Text DataAppointmentinfo.Recordset.Update MsgBox "Saved" End If Txtid = "" Txtdate = "" Txtdoctorname = "" Txtid = "" Txtpatientname = "" cmbTiming = "" Txtdate.SetFocus End Sub Private Sub cmdSearch_Click() Dim IsExistRec As Boolean IsExistRec = False If DataAppointmentinfo.Recordset.RecordCount > 0 Then DataAppointmentinfo.Recordset.MoveFirst End If Do While Not DataAppointmentinfo.Recordset.EOF

If LCase(cmbSearch.Text) = LCase(DataAppointmentinfo.Recordset(2).Value) Then IsExistRec = True Exit Do End If DataAppointmentinfo.Recordset.MoveNext Loop If IsExistRec = True Then Txtid.Text = DataAppointmentinfo.Recordset(0) Txtdate.Text = DataAppointmentinfo.Recordset(1) Txtdoctorname.Text = DataAppointmentinfo.Recordset(2) Txtpatientname.Text = DataAppointmentinfo.Recordset(3) cmbTiming.Text = DataAppointmentinfo.Recordset(4) Else MsgBox "Record not found" End If

End Sub Private Sub cmdView_Click() rptAppointmentinfo.Show End Sub

Private Sub Command1_Click() End Sub Private Sub Form_Activate() If DataAppointmentinfo.Recordset.RecordCount > 0 Then DataAppointmentinfo.Recordset.MoveFirst End If cmbSearch.Clear Do While Not DataAppointmentinfo.Recordset.EOF cmbSearch.AddItem (DataAppointmentinfo.Recordset(2).Value) DataAppointmentinfo.Recordset.MoveNext Loop End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("Do you want to close?", vbYesNo, "PMS") = vbYes Then Unload Me

End If End If End Sub Private Sub Txtdate_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtdoctorname.SetFocus End If End Sub Private Sub Txtdate_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub Private Sub Txtdoctorname_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtpatientname.SetFocus End If End Sub Private Sub Txtdoctorname_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If End Sub Private Sub Txtid_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtdate.SetFocus End If End Sub Private Sub Txtpatientname_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmbTiming.SetFocus End If End Sub Private Sub Txtpatientname_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If

End Sub Private Sub cmbTiming_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmdSave.SetFocus End If End Sub DEPARTMENT INFO Private Sub cmdBack_Click() Me.Hide frmMainFormAdmin.Show End Sub Private Sub Form_Activate() If Datadepartment.Recordset.RecordCount > 0 Then Datadepartment.Recordset.MoveFirst End If cmbSearch.Clear Do While Not Datadepartment.Recordset.EOF cmbSearch.AddItem (Datadepartment.Recordset(1).Value) Datadepartment.Recordset.MoveNext Loop End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("Do you want to close?", vbYesNo, "PMS") = vbYes Then Unload Me End If End If End Sub Private Sub cmdDelete_Click() If MsgBox("Are you Delete this Record?", vbYesNo) = vbYes Then If Datadepartment.Recordset.RecordCount = 0 Then MsgBox "No record" Else Datadepartment.Recordset.MoveFirst Do While Not Datadepartment.Recordset.EOF If Txtid.Text = Datadepartment.Recordset(0).Value Then Datadepartment.Recordset.Delete MsgBox "Delted" Exit Do End If Datadepartment.Recordset.MoveNext

Loop End If End If Txtid.Text = "" Txtname.Text = "" Txtdescription.Text = "" Txtid.SetFocus End Sub Private Sub cmdNew_Click() Txtid.Text = Datadepartment.Recordset.RecordCount + 1 Txtname.Text = "" Txtdescription.Text = "" Txtname.SetFocus End Sub Private Sub cmdSave_Click() If Txtid = "" Then MsgBox ("Please enter the id") ElseIf Txtdescription = "" Then MsgBox ("Please enter the description") ElseIf Txtname = "" Then MsgBox ("Please enter the name of the department") Else Dim IsExistRec As Boolean IsExistRec = False If Datadepartment.Recordset.RecordCount > 0 Then Datadepartment.Recordset.MoveFirst End If Do While Not Datadepartment.Recordset.EOF If Txtid.Text = Datadepartment.Recordset(0).Value Then IsExistRec = True Exit Do End If Datadepartment.Recordset.MoveNext Loop If IsExistRec = True Then Datadepartment.Recordset.Edit Else Datadepartment.Recordset.AddNew End If

Datadepartment.Recordset(0) = Txtid.Text Datadepartment.Recordset(1) = Txtname.Text Datadepartment.Recordset(2) = Txtdescription.Text Datadepartment.Recordset.Update MsgBox "Saved" End If Txtid.Text = "" Txtname.Text = "" Txtdescription.Text = "" Txtname.SetFocus End Sub Private Sub cmdSearch_Click() Dim IsExistRec As Boolean IsExistRec = False If Datadepartment.Recordset.RecordCount > 0 Then Datadepartment.Recordset.MoveFirst End If Do While Not Datadepartment.Recordset.EOF If LCase(cmbSearch.Text) = LCase(Datadepartment.Recordset(1).Value) Then IsExistRec = True Exit Do End If Datadepartment.Recordset.MoveNext Loop If IsExistRec = True Then Txtid.Text = Datadepartment.Recordset(0) Txtname.Text = Datadepartment.Recordset(1) Txtdescription.Text = Datadepartment.Recordset(2) Else MsgBox "Record not found" End If

End Sub Private Sub cmdView_Click() rptDepartmentinfo.Show End Sub

Private Sub Txtdescription_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmdSave.SetFocus End If End Sub Private Sub Txtid_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtname.SetFocus End If End Sub Private Sub Txtname_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtdescription.SetFocus End If End Sub Private Sub Txtname_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If End Sub DOCTORS INFO Private Sub cmdBack_Click() Me.Hide frmMainFormAdmin.Show End Sub Private Sub Form_Activate() If datadoctor.Recordset.RecordCount > 0 Then datadoctor.Recordset.MoveFirst End If cmbSearch.Clear Do While Not datadoctor.Recordset.EOF cmbSearch.AddItem (datadoctor.Recordset(1).Value) datadoctor.Recordset.MoveNext Loop End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("Do you want to close?", vbYesNo, "PMS") = vbYes Then Unload Me

End If End If End Sub Private Sub cmdDelete_Click() If MsgBox("Are you Delete this Record?", vbYesNo) = vbYes Then If datadoctor.Recordset.RecordCount = 0 Then MsgBox "No record" Else datadoctor.Recordset.MoveFirst Do While Not datadoctor.Recordset.EOF If Txtid.Text = datadoctor.Recordset(0).Value Then datadoctor.Recordset.Delete MsgBox "Delted" Exit Do End If datadoctor.Recordset.MoveNext Loop End If End If Txtid.Text = "" Txtname.Text = "" txtaddress.Text = "" txtphoneno.Text = "" cmbSpecialist = "" Txtmailid.Text = "" txthospitalname = "" Txtname.SetFocus End Sub Private Sub cmdNew_Click() Txtid.Text = datadoctor.Recordset.RecordCount + 1 Txtname.Text = "" txtaddress.Text = "" txtphoneno.Text = "" cmbSpecialist = "" Txtmailid.Text = "" txthospitalname = "" Txtname.SetFocus End Sub Private Sub cmdSave_Click() If Txtname = "" Then MsgBox ("Please enter the name of the doctor") ElseIf txtaddress = "" Then MsgBox ("Please enter the address of doctor")

ElseIf txthospitalname = "" Then MsgBox ("Please enter the hospitalname") ElseIf txtphoneno = "" Then MsgBox ("Please enter the phoneno") ElseIf cmbSpecialist = "" Then MsgBox ("Please enter the specialist") Else Dim IsExistRec As Boolean IsExistRec = False If datadoctor.Recordset.RecordCount > 0 Then datadoctor.Recordset.MoveFirst End If Do While Not datadoctor.Recordset.EOF If Txtid.Text = datadoctor.Recordset(0).Value Then IsExistRec = True Exit Do End If datadoctor.Recordset.MoveNext Loop If IsExistRec = True Then datadoctor.Recordset.Edit Else datadoctor.Recordset.AddNew End If datadoctor.Recordset(0) = Txtid.Text datadoctor.Recordset(1) = Txtname.Text datadoctor.Recordset(2) = txtphoneno.Text datadoctor.Recordset(3) = Txtmailid.Text datadoctor.Recordset(4) = txtaddress.Text datadoctor.Recordset(5) = txthospitalname.Text datadoctor.Recordset(6) = cmbSpecialist.Text datadoctor.Recordset.Update MsgBox "Saved" End If Txtid.Text = "" Txtname.Text = "" txtaddress.Text = "" txtphoneno.Text = "" cmbSpecialist = "" Txtmailid.Text = "" txthospitalname = ""

Txtname.SetFocus End Sub Private Sub cmdSearch_Click() Dim IsExistRec As Boolean IsExistRec = False If datadoctor.Recordset.RecordCount > 0 Then datadoctor.Recordset.MoveFirst End If Do While Not datadoctor.Recordset.EOF If LCase(cmbSearch.Text) = LCase(datadoctor.Recordset(1).Value) Then IsExistRec = True Exit Do End If datadoctor.Recordset.MoveNext Loop If IsExistRec = True Then Txtid.Text = datadoctor.Recordset(0) Txtname.Text = datadoctor.Recordset(1) txtphoneno.Text = datadoctor.Recordset(2) Txtmailid.Text = datadoctor.Recordset(3) txtaddress.Text = datadoctor.Recordset(4) txthospitalname.Text = datadoctor.Recordset(5) cmbSpecialist.Text = datadoctor.Recordset(6) Else MsgBox "Record not found" End If

End Sub Private Sub cmdView_Click() rptDoctorinfo.Show End Sub Private Sub txtaddress_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txthospitalname.SetFocus End If End Sub

Private Sub txthospitalname_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmbSpecialist.SetFocus End If End Sub Private Sub txthospitalname_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If End Sub Private Sub Txtid_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtname.SetFocus End If End Sub Private Sub Txtmailid_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtaddress.SetFocus End If End Sub Private Sub Txtname_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtphoneno.SetFocus End If End Sub Private Sub Txtname_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If End Sub Private Sub txtphoneno_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtmailid.SetFocus End If End Sub Private Sub txtphoneno_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If

End Sub Private Sub cmbSpecialist_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmdSave.SetFocus End If End Sub Private Sub cmbSpecialist_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If End Sub HOSPITAL INFO Private Sub cmdBack_Click() Me.Hide frmMainFormAdmin.Show End Sub Private Sub Form_Activate() If dataHospital.Recordset.RecordCount > 0 Then dataHospital.Recordset.MoveFirst End If cmbSearch.Clear Do While Not dataHospital.Recordset.EOF cmbSearch.AddItem (dataHospital.Recordset(1).Value) dataHospital.Recordset.MoveNext Loop End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("Do you want to close?", vbYesNo, "PMS") = vbYes Then Unload Me End If End If End Sub Private Sub cmdDelete_Click() If MsgBox("Are you Delete this Record?", vbYesNo) = vbYes Then If dataHospital.Recordset.RecordCount = 0 Then MsgBox "No record" Else dataHospital.Recordset.MoveFirst Do While Not dataHospital.Recordset.EOF

If txtHospitalId.Text = dataHospital.Recordset(0).Value Then dataHospital.Recordset.Delete MsgBox "Delted" Exit Do End If dataHospital.Recordset.MoveNext Loop End If End If txtHospitalId.Text = "" Txtname.Text = "" txtaddress.Text = "" txtphoneno.Text = "" txtInchargename.Text = "" Txtname.SetFocus End Sub Private Sub cmdNew_Click() txtHospitalId.Text = dataHospital.Recordset.RecordCount + 1 Txtname.Text = "" txtaddress.Text = "" txtphoneno.Text = "" txtInchargename.Text = "" Txtname.SetFocus End Sub Private Sub cmdSave_Click() If txtaddress = "" Then MsgBox ("Please enter the address") ElseIf txtInchargename = "" Then MsgBox ("Please enter the Inchargename") ElseIf Txtname = "" Then MsgBox ("Please enter the name") ElseIf txtphoneno = "" Then MsgBox ("Please enter the phoneno") Else Dim IsExistRec As Boolean IsExistRec = False If dataHospital.Recordset.RecordCount > 0 Then dataHospital.Recordset.MoveFirst End If Do While Not dataHospital.Recordset.EOF If txtHospitalId.Text = dataHospital.Recordset(0).Value Then IsExistRec = True

Exit Do End If dataHospital.Recordset.MoveNext Loop If IsExistRec = True Then dataHospital.Recordset.Edit Else dataHospital.Recordset.AddNew End If dataHospital.Recordset(0) = txtHospitalId.Text dataHospital.Recordset(1) = Txtname.Text dataHospital.Recordset(2) = txtaddress.Text dataHospital.Recordset(3) = txtphoneno.Text dataHospital.Recordset(4) = txtInchargename.Text dataHospital.Recordset.Update MsgBox "Saved" End If txtHospitalId.Text = "" Txtname.Text = "" txtaddress.Text = "" txtphoneno.Text = "" txtInchargename.Text = "" Txtname.SetFocus End Sub Private Sub cmdSearch_Click() Dim IsExistRec As Boolean IsExistRec = False If dataHospital.Recordset.RecordCount > 0 Then dataHospital.Recordset.MoveFirst End If Do While Not dataHospital.Recordset.EOF If LCase(cmbSearch.Text) = LCase(dataHospital.Recordset(1).Value) Then IsExistRec = True Exit Do End If dataHospital.Recordset.MoveNext Loop If IsExistRec = True Then

txtHospitalId.Text = dataHospital.Recordset(0) Txtname.Text = dataHospital.Recordset(1) txtaddress.Text = dataHospital.Recordset(2) txtphoneno.Text = dataHospital.Recordset(3) txtInchargename.Text = dataHospital.Recordset(4) Else MsgBox "Record not found" End If

End Sub Private Sub cmdView_Click() rptHospitalinfo.Show End Sub Private Sub txtaddress_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtphoneno.SetFocus End If End Sub Private Sub txtHospitalId_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtname.SetFocus End If End Sub Private Sub txtInchargename_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmdSave.SetFocus End If End Sub Private Sub txtInchargename_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If End Sub Private Sub Txtname_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtaddress.SetFocus End If End Sub

Private Sub Txtname_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If End Sub Private Sub txtphoneno_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtInchargename.SetFocus End If End Sub Private Sub txtphoneno_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub INPATIENT INFO Private Sub cmdBack_Click() Me.Hide frmMainfromdoctor.Show End Sub Private Sub Form_Activate() If DataInpatientinfo.Recordset.RecordCount > 0 Then DataInpatientinfo.Recordset.MoveFirst End If cmbSearch.Clear Do While Not DataInpatientinfo.Recordset.EOF cmbSearch.AddItem (DataInpatientinfo.Recordset(1).Value) DataInpatientinfo.Recordset.MoveNext Loop End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("Do you want to close?", vbYesNo, "PMS") = vbYes Then Unload Me End If End If End Sub Private Sub cmdDelete_Click() If MsgBox("Are you Delete this Record?", vbYesNo) = vbYes Then

If DataInpatientinfo.Recordset.RecordCount = 0 Then MsgBox "No record" Else DataInpatientinfo.Recordset.MoveFirst Do While Not DataInpatientinfo.Recordset.EOF If Txtid.Text = DataInpatientinfo.Recordset(0).Value Then DataInpatientinfo.Recordset.Delete MsgBox "Delted" Exit Do End If DataInpatientinfo.Recordset.MoveNext Loop End If End If Txtid.Text = "" Txtdoctorname.Text = "" Txtpatientname.Text = "" cmbDepartment.Text = "" Txtindate.Text = "" Txtoutdate.Text = "" Txtfeesamount.Text = "" Txtpaidamount.Text = "" Txtmedicalreport.Text = "" Txttabletinfo.Text = "" Txtdoctorname.SetFocus End Sub Private Sub cmdNew_Click() Txtid.Text = DataInpatientinfo.Recordset.RecordCount + 1 Txtdoctorname.Text = "" Txtpatientname.Text = "" cmbDepartment.Text = "" Txtindate.Text = "" Txtoutdate.Text = "" Txtfeesamount.Text = "" Txtpaidamount.Text = "" Txtmedicalreport.Text = "" Txttabletinfo.Text = "" Txtdoctorname.SetFocus End Sub Private Sub cmdSave_Click() If cmbDepartment = "" Then MsgBox ("Please enter the epartment") ElseIf Txtdoctorname = "" Then MsgBox ("Please enter the doctorname")

ElseIf Txtfeesamount = "" Then MsgBox ("Please enter the feesamount") ElseIf Txtindate = "" Then MsgBox ("Please enter the indate") ElseIf Txtoutdate = "" Then MsgBox ("Please enter the outdate") ElseIf Txtmedicalreport = "" Then MsgBox ("Please enter the medicalreport") ElseIf Txtpaidamount = "" Then MsgBox ("Please enter the paid amount") ElseIf Txtpatientname = "" Then MsgBox ("Please enter the patient name") ElseIf Txttabletinfo = "" Then MsgBox ("Please enter the tabletinfo") Else Dim IsExistRec As Boolean IsExistRec = False If DataInpatientinfo.Recordset.RecordCount > 0 Then DataInpatientinfo.Recordset.MoveFirst End If Do While Not DataInpatientinfo.Recordset.EOF If Txtid.Text = DataInpatientinfo.Recordset(0).Value Then IsExistRec = True Exit Do End If DataInpatientinfo.Recordset.MoveNext Loop If IsExistRec = True Then DataInpatientinfo.Recordset.Edit Else DataInpatientinfo.Recordset.AddNew End If DataInpatientinfo.Recordset(0) = Txtid.Text DataInpatientinfo.Recordset(1) = Txtdoctorname.Text DataInpatientinfo.Recordset(2) = Txtpatientname.Text DataInpatientinfo.Recordset(3) = cmbDepartment.Text DataInpatientinfo.Recordset(4) = Txtindate.Text DataInpatientinfo.Recordset(5) = Txtoutdate.Text DataInpatientinfo.Recordset(6) = Txtfeesamount.Text DataInpatientinfo.Recordset(7) = Txtpaidamount.Text DataInpatientinfo.Recordset(8) = Txtmedicalreport.Text

DataInpatientinfo.Recordset(9) = Txttabletinfo.Text DataInpatientinfo.Recordset.Update MsgBox "Saved" End If Txtid.Text = "" Txtdoctorname.Text = "" Txtpatientname.Text = "" cmbDepartment.Text = "" Txtindate.Text = "" Txtoutdate.Text = "" Txtfeesamount.Text = "" Txtpaidamount.Text = "" Txtmedicalreport.Text = "" Txttabletinfo.Text = "" Txtdoctorname.SetFocus End Sub Private Sub cmdSearch_Click() Dim IsExistRec As Boolean IsExistRec = False If DataInpatientinfo.Recordset.RecordCount > 0 Then DataInpatientinfo.Recordset.MoveFirst End If Do While Not DataInpatientinfo.Recordset.EOF If LCase(cmbSearch.Text) = LCase(DataInpatientinfo.Recordset(1).Value) Then IsExistRec = True Exit Do End If DataInpatientinfo.Recordset.MoveNext Loop If IsExistRec = True Then Txtid.Text = DataInpatientinfo.Recordset(0) Txtdoctorname.Text = DataInpatientinfo.Recordset(1) Txtpatientname.Text = DataInpatientinfo.Recordset(2) cmbDepartment.Text = DataInpatientinfo.Recordset(3) Txtindate.Text = DataInpatientinfo.Recordset(4) Txtoutdate.Text = DataInpatientinfo.Recordset(5) Txtfeesamount.Text = DataInpatientinfo.Recordset(6) Txtpaidamount.Text = DataInpatientinfo.Recordset(7) Txtmedicalreport.Text = DataInpatientinfo.Recordset(8) Txttabletinfo.Text = DataInpatientinfo.Recordset(9)

Else MsgBox "Record not found" End If

End Sub Private Sub cmdView_Click() rptInpatientinfo.Show End Sub

Private Sub cmbDepartment_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtindate.SetFocus End If End Sub Private Sub cmbDepartment_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If End Sub Private Sub Timer1_Timer() If FPVerVeiw1.Done = True Then Dim RP As FPTemplate Dim VP As New FPVerify Dim Result As Boolean Dim er, re As String Dim src, thsh As Object Dim IsExistRec As Boolean IsExistRec = False If DataPatientinfo.Recordset.RecordCount > 0 Then DataPatientinfo.Recordset.MoveFirst End If Do While Not DataPatientinfo.Recordset.EOF varnt = DataPatientinfo.Recordset(10) Set RP = New FPTemplate

er = RP.Import(varnt) re = VP.Compare(RP, FPVerVeiw1.Template, Result, src, thsh, False, Sm_None) Set RP = Nothing If Result = True Then IsExistRec = True Exit Do End If DataPatientinfo.Recordset.MoveNext Loop If IsExistRec = True Then Txtpatientname.Text = DataPatientinfo.Recordset(1)

Dim i As Integer i=0 MSFlexGrid1.Rows = 0 If DataInpatientinfo.Recordset.RecordCount > 0 Then DataInpatientinfo.Recordset.MoveFirst End If Do While Not DataInpatientinfo.Recordset.EOF If LCase(Txtpatientname.Text) = LCase(DataInpatientinfo.Recordset(2).Value) Then i=i+1 MSFlexGrid1.Rows = MSFlexGrid1.Rows + 1 MSFlexGrid1.Row = i - 1 MSFlexGrid1.Col = 0 MSFlexGrid1.Text = i MSFlexGrid1.Col = 1 MSFlexGrid1.Text = DataInpatientinfo.Recordset(1).Value MSFlexGrid1.Col = 2 MSFlexGrid1.Text = DataInpatientinfo.Recordset(2).Value MSFlexGrid1.Col = 3 MSFlexGrid1.Text = DataInpatientinfo.Recordset(4).Value MSFlexGrid1.Col = 4 MSFlexGrid1.Text = DataInpatientinfo.Recordset(5).Value

MSFlexGrid1.Col = 5 MSFlexGrid1.Text = DataInpatientinfo.Recordset(8).Value MSFlexGrid1.Col = 5 MSFlexGrid1.Text = DataInpatientinfo.Recordset(9).Value

End If DataInpatientinfo.Recordset.MoveNext Loop Else Txtpatientname.Text = "" End If End If End Sub Private Sub Txtdoctorname_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtpatientname.SetFocus End If End Sub Private Sub Txtfeesamount_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtpaidamount.SetFocus End If End Sub Private Sub Txtfeesamount_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub Private Sub Txtid_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtdoctorname.SetFocus End If End Sub Private Sub Txtindate_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtoutdate.SetFocus End If

End Sub Private Sub Txtindate_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub Private Sub Txtmedicalreport_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txttabletinfo.SetFocus End If End Sub Private Sub Txtoutdate_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtfeesamount.SetFocus End If End Sub Private Sub Txtoutdate_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub Private Sub Txtpaidamount_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtmedicalreport.SetFocus End If End Sub Private Sub Txtpaidamount_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub Private Sub Txtpatientname_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmbDepartment.SetFocus End If End Sub

Private Sub Txtpatientname_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If End Sub Private Sub Txttabletinfo_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmdSave.SetFocus End If End Sub OUTPATIENT INFO Private Sub cmdBack_Click() Me.Hide frmMainfromdoctor.Show End Sub Private Sub cmdDelete_Click() If MsgBox("Are you Delete this Record?", vbYesNo) = vbYes Then If DataOutpatientinfo.Recordset.RecordCount = 0 Then MsgBox "No record" Else DataOutpatientinfo.Recordset.MoveFirst Do While Not DataOutpatientinfo.Recordset.EOF If Txtid.Text = DataOutpatientinfo.Recordset(0).Value Then DataOutpatientinfo.Recordset.Delete MsgBox "Delted" Exit Do End If DataOutpatientinfo.Recordset.MoveNext Loop End If End If Txtid.Text = "" Txtdoctorname.Text = "" Txtpatientname.Text = "" Txtmedicalreport.Text = "" Txttabletinfo.Text = "" Txtdate.Text = "" cmbTiming.Text = "" Txtfeesamount.Text = "" Txtdoctorname.SetFocus

End Sub Private Sub cmdNew_Click() Txtid.Text = DataOutpatientinfo.Recordset.RecordCount + 1 Txtdoctorname.Text = "" Txtpatientname.Text = "" Txtmedicalreport.Text = "" Txttabletinfo.Text = "" Txtdate.Text = "" cmbTiming.Text = "" Txtfeesamount.Text = "" Txtdoctorname.SetFocus End Sub Private Sub cmdSave_Click() If Txtdoctorname = "" Then MsgBox ("Please enter the doctorname") ElseIf Txtfeesamount = "" Then MsgBox ("Please enter the feesamount") ElseIf Txtpatientname = "" Then MsgBox ("Please enter the patient name") ElseIf Txttabletinfo = "" Then MsgBox ("Please enter the tabletinfo") ElseIf Txtmedicalreport = "" Then MsgBox ("Please enter the medicalreport") ElseIf Txtdate = "" Then MsgBox ("Please enter the date") ElseIf cmbTiming = "" Then MsgBox ("Please enter the timings") Else Dim IsExistRec As Boolean IsExistRec = False If DataOutpatientinfo.Recordset.RecordCount > 0 Then DataOutpatientinfo.Recordset.MoveFirst End If Do While Not DataOutpatientinfo.Recordset.EOF If Txtid.Text = DataOutpatientinfo.Recordset(0).Value Then IsExistRec = True Exit Do End If DataOutpatientinfo.Recordset.MoveNext Loop If IsExistRec = True Then

DataOutpatientinfo.Recordset.Edit Else DataOutpatientinfo.Recordset.AddNew End If DataOutpatientinfo.Recordset(0) = Txtid.Text DataOutpatientinfo.Recordset(1) = Txtdoctorname.Text DataOutpatientinfo.Recordset(2) = Txtpatientname.Text DataOutpatientinfo.Recordset(3) = Txtmedicalreport.Text DataOutpatientinfo.Recordset(4) = Txttabletinfo.Text DataOutpatientinfo.Recordset(5) = Txtdate.Text DataOutpatientinfo.Recordset(6) = cmbTiming.Text DataOutpatientinfo.Recordset(7) = Txtfeesamount.Text DataOutpatientinfo.Recordset.Update MsgBox "Saved" End If End Sub Private Sub cmdSearch_Click() Dim IsExistRec As Boolean IsExistRec = False If DataOutpatientinfo.Recordset.RecordCount > 0 Then DataOutpatientinfo.Recordset.MoveFirst End If Do While Not DataOutpatientinfo.Recordset.EOF If LCase(cmbSearch.Text) = LCase(DataOutpatientinfo.Recordset(1).Value) Then IsExistRec = True Exit Do End If DataOutpatientinfo.Recordset.MoveNext Loop If IsExistRec = True Then Txtid.Text = DataOutpatientinfo.Recordset(0) Txtdoctorname.Text = DataOutpatientinfo.Recordset(1) Txtpatientname.Text = DataOutpatientinfo.Recordset(2) Txtmedicalreport.Text = DataOutpatientinfo.Recordset(3) Txttabletinfo.Text = DataOutpatientinfo.Recordset(4) Txtdate.Text = DataOutpatientinfo.Recordset(5) cmbTiming.Text = DataOutpatientinfo.Recordset(6) Txtfeesamount.Text = DataOutpatientinfo.Recordset(7)

Else MsgBox "Record not found" End If

End Sub

Private Sub Timer1_Timer() If FPVerVeiw1.Done = True Then Dim RP As FPTemplate Dim VP As New FPVerify Dim Result As Boolean Dim er, re As String Dim src, thsh As Object Dim IsExistRec As Boolean IsExistRec = False If DataPatientinfo.Recordset.RecordCount > 0 Then DataPatientinfo.Recordset.MoveFirst End If Do While Not DataPatientinfo.Recordset.EOF varnt = DataPatientinfo.Recordset(10) Set RP = New FPTemplate er = RP.Import(varnt) re = VP.Compare(RP, FPVerVeiw1.Template, Result, src, thsh, False, Sm_None) Set RP = Nothing If Result = True Then IsExistRec = True Exit Do End If DataPatientinfo.Recordset.MoveNext Loop If IsExistRec = True Then Txtpatientname.Text = DataPatientinfo.Recordset(1) Dim i As Integer i=0 MSFlexGrid1.Rows = 0

If DataInpatientinfo.Recordset.RecordCount > 0 Then DataInpatientinfo.Recordset.MoveFirst End If While Not DataInpatientinfo.Recordset.EOF If LCase(Txtpatientname.Text) = LCase(DataInpatientinfo.Recordset(2).Value) Then i=i+1 MSFlexGrid1.Rows = MSFlexGrid1.Rows + 1 MSFlexGrid1.Row = i - 1 MSFlexGrid1.Col = 0 MSFlexGrid1.Text = i MSFlexGrid1.Col = 1 MSFlexGrid1.Text = DataOutpatientinfo.Recordset(1).Value MSFlexGrid1.Col = 2 MSFlexGrid1.Text = DataOutpatientinfo.Recordset(2).Value MSFlexGrid1.Col = 3 MSFlexGrid1.Text = DataOutpatientinfo.Recordset(3).Value MSFlexGrid1.Col = 4 MSFlexGrid1.Text = DataOutpatientinfo.Recordset(4).Value MSFlexGrid1.Col = 5 MSFlexGrid1.Text = DataOutpatientinfo.Recordset(5).Value MSFlexGrid1.Col = 6 MSFlexGrid1.Text = DataOutpatientinfo.Recordset(6).Value Loop Else Txtpatientname.Text = "" End If

End Sub Private Sub Form_Activate() If DataOutpatientinfo.Recordset.RecordCount > 0 Then DataOutpatientinfo.Recordset.MoveFirst End If

cmbSearch.Clear Do While Not DataOutpatientinfo.Recordset.EOF cmbSearch.AddItem (DataOutpatientinfo.Recordset(2).Value) DataOutpatientinfo.Recordset.MoveNext Loop End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("Do you want to close?", vbYesNo, "PMS") = vbYes Then Unload Me End If End If End Sub

Private Sub cmdView_Click() rptOutpatientinfo.Show End Sub Private Sub Txtdate_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmbTiming.SetFocus End If End Sub Private Sub Txtdate_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub Private Sub Txtdoctorname_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtpatientname.SetFocus End If End Sub Private Sub Txtdoctorname_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If End Sub Private Sub Txtfeesamount_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = 13 Then cmdSave.SetFocus End If End Sub Private Sub Txtfeesamount_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub Private Sub Txtid_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtdoctorname.SetFocus End If End Sub Private Sub Txtmedicalreport_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txttabletinfo.SetFocus End If End Sub Private Sub Txtpatientname_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtmedicalreport.SetFocus End If End Sub Private Sub Txtpatientname_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If End Sub Private Sub Txttabletinfo_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtdate.SetFocus End If End Sub Private Sub cmbTiming_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtfeesamount.SetFocus End If

End Sub PATIENT INFO Private Sub cmdBack_Click() If MsgBox("Do you want to move Admin form ", vbYesNo) = vbYes Then frmMainFormAdmin.Show Me.Hide Else frmMainfromdoctor.Show Me.Hide End If End Sub Private Sub Form_Activate() If DataPatientinfo.Recordset.RecordCount > 0 Then DataPatientinfo.Recordset.MoveFirst End If cmbSearch.Clear Do While Not DataPatientinfo.Recordset.EOF cmbSearch.AddItem (DataPatientinfo.Recordset(1).Value) DataPatientinfo.Recordset.MoveNext Loop End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("Do you want to close?", vbYesNo, "PMS") = vbYes Then Unload Me End If End If End Sub Private Sub cmbgender_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtaddress.SetFocus End If End Sub Private Sub cmdDelete_Click() If MsgBox("Are you Delete this Record?", vbYesNo) = vbYes Then If DataPatientinfo.Recordset.RecordCount = 0 Then MsgBox "No record" Else DataPatientinfo.Recordset.MoveFirst Do While Not DataPatientinfo.Recordset.EOF

If Txtid.Text = DataPatientinfo.Recordset(0).Value Then DataPatientinfo.Recordset.Delete MsgBox "Delted" Exit Do End If DataPatientinfo.Recordset.MoveNext Loop End If End If Txtid.Text = "" Txtname.Text = "" txtAge.Text = "" cmbgender.Text = "" txtaddress.Text = "" cmbBloodgroup.Text = "" TxtHeight.Text = "" TxtWeight.Text = "" txtphoneno.Text = "" Txtregistrationdate = "" Txtname.SetFocus End Sub Private Sub cmdNew_Click() Txtid.Text = DataPatientinfo.Recordset.RecordCount + 1 Txtname.Text = "" txtAge.Text = "" cmbgender.Text = "" txtaddress.Text = "" cmbBloodgroup.Text = "" TxtHeight.Text = "" TxtWeight.Text = "" txtphoneno.Text = "" Txtregistrationdate = "" Txtname.SetFocus End Sub Private Sub cmdSave_Click() If txtAge = "" Then MsgBox ("enter the age") ElseIf cmbBloodgroup = "" Then MsgBox ("Please enter the bloodgroup") ElseIf Txtname = "" Then MsgBox ("Please enter the name") ElseIf Txtregistrationdate = "" Then MsgBox ("Please enter the registration date") ElseIf txtphoneno = "" Then

MsgBox ("Please enter the phone number") Else Dim IsExistRec As Boolean IsExistRec = False If DataPatientinfo.Recordset.RecordCount > 0 Then DataPatientinfo.Recordset.MoveFirst End If Do While Not DataPatientinfo.Recordset.EOF If Txtid.Text = DataPatientinfo.Recordset(0).Value Then IsExistRec = True Exit Do End If DataPatientinfo.Recordset.MoveNext Loop If IsExistRec = True Then DataPatientinfo.Recordset.Edit Else DataPatientinfo.Recordset.AddNew End If

If FPRegView1.register Is Nothing Then MsgBox "Nothing Registered !!" Exit Sub End If Dim bvariant As Variant bvariant = Null FPRegView1.register.Export bvariant

DataPatientinfo.Recordset(0) = Txtid.Text DataPatientinfo.Recordset(1) = Txtname.Text DataPatientinfo.Recordset(2) = txtAge.Text DataPatientinfo.Recordset(3) = cmbgender.Text DataPatientinfo.Recordset(4) = txtaddress.Text DataPatientinfo.Recordset(5) = cmbBloodgroup.Text DataPatientinfo.Recordset(6) = TxtHeight.Text DataPatientinfo.Recordset(7) = TxtWeight.Text DataPatientinfo.Recordset(8) = txtphoneno.Text DataPatientinfo.Recordset(9) = Txtregistrationdate.Text

DataPatientinfo.Recordset(10) = bvariant

DataPatientinfo.Recordset.Update MsgBox "Saved" End If End Sub Private Sub cmdSearch_Click() Dim IsExistRec As Boolean IsExistRec = False If DataPatientinfo.Recordset.RecordCount > 0 Then DataPatientinfo.Recordset.MoveFirst End If Do While Not DataPatientinfo.Recordset.EOF If LCase(cmbSearch.Text) = LCase(DataPatientinfo.Recordset(1).Value) Then IsExistRec = True Exit Do End If DataPatientinfo.Recordset.MoveNext Loop If IsExistRec = True Then Txtid.Text = DataPatientinfo.Recordset(0) Txtname.Text = DataPatientinfo.Recordset(1) txtAge.Text = DataPatientinfo.Recordset(2) cmbgender.Text = DataPatientinfo.Recordset(3) txtaddress.Text = DataPatientinfo.Recordset(4) cmbBloodgroup.Text = DataPatientinfo.Recordset(5) TxtHeight.Text = DataPatientinfo.Recordset(6) TxtWeight.Text = DataPatientinfo.Recordset(7) txtphoneno.Text = DataPatientinfo.Recordset(8) Txtregistrationdate.Text = DataPatientinfo.Recordset(9) Else MsgBox "Record not found" End If

End Sub Private Sub cmdView_Click()

rptPatientinfo.Show End Sub Private Sub Timer1_Timer() If FPRegView1.Done = True Then lblFPReady.Caption = "Ready" Else lblFPReady.Caption = "Not Ready" End If End Sub Private Sub txtaddress_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmbBloodgroup.SetFocus End If End Sub Private Sub Txtage_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmbgender.SetFocus End If End Sub Private Sub Txtage_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub Private Sub cmbBloodgroup_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then TxtHeight.SetFocus End If End Sub Private Sub TxtHeight_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then TxtWeight.SetFocus End If End Sub Private Sub TxtHeight_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0

End If End Sub Private Sub Txtid_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtname.SetFocus End If End Sub Private Sub Txtname_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtAge.SetFocus End If End Sub Private Sub Txtname_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If End Sub Private Sub txtphoneno_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmdSave.SetFocus End If End Sub Private Sub txtphoneno_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub Private Sub Txtregistrationdate_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtphoneno.SetFocus End If End Sub Private Sub Txtregistrationdate_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub

Private Sub TxtWeight_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtregistrationdate.SetFocus End If End Sub Private Sub TxtWeight_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub STAFF INFO Private Sub Form_Activate() If DataStaffinfo.Recordset.RecordCount > 0 Then DataStaffinfo.Recordset.MoveFirst End If cmbSearch.Clear Do While Not DataStaffinfo.Recordset.EOF cmbSearch.AddItem (DataStaffinfo.Recordset(1).Value) DataStaffinfo.Recordset.MoveNext Loop End Sub Private Sub Cmbdestination_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtaddress.SetFocus End If End Sub Private Sub cmdBack_Click() Me.Hide frmMainFormAdmin.Show End Sub Private Sub cmdDelete_Click() If MsgBox("Are you Delete this Record?", vbYesNo) = vbYes Then If DataStaffinfo.Recordset.RecordCount = 0 Then MsgBox "No record" Else DataStaffinfo.Recordset.MoveFirst Do While Not DataStaffinfo.Recordset.EOF If Txtid.Text = DataStaffinfo.Recordset(0).Value Then

DataStaffinfo.Recordset.Delete MsgBox "Delted" Exit Do End If DataStaffinfo.Recordset.MoveNext Loop End If End If Txtid.Text = "" Txtname.Text = "" txtphoneno.Text = "" Txtmailid.Text = "" Cmbdestination.Text = "" txtaddress.Text = "" Txtsalary.Text = "" Txtname.SetFocus End Sub Private Sub cmdNew_Click() Txtid.Text = DataStaffinfo.Recordset.RecordCount + 1 Txtname.Text = "" txtphoneno.Text = "" Txtmailid.Text = "" Cmbdestination.Text = "" txtaddress.Text = "" Txtsalary.Text = "" Txtname.SetFocus End Sub Private Sub cmdSave_Click() If txtaddress = "" Then MsgBox ("Please enter the address") ElseIf Txtname = "" Then MsgBox ("Please enter the name") ElseIf txtphoneno = "" Then MsgBox ("Please enter the phone number") ElseIf Txtsalary = "" Then MsgBox ("Please enter the salary") Else Dim IsExistRec As Boolean IsExistRec = False If DataStaffinfo.Recordset.RecordCount > 0 Then DataStaffinfo.Recordset.MoveFirst End If

Do While Not DataStaffinfo.Recordset.EOF If Txtid.Text = DataStaffinfo.Recordset(0).Value Then IsExistRec = True Exit Do End If DataStaffinfo.Recordset.MoveNext Loop If IsExistRec = True Then DataStaffinfo.Recordset.Edit Else DataStaffinfo.Recordset.AddNew End If DataStaffinfo.Recordset(0) = Txtid.Text DataStaffinfo.Recordset(1) = Txtname.Text DataStaffinfo.Recordset(2) = txtphoneno.Text DataStaffinfo.Recordset(3) = Txtmailid.Text DataStaffinfo.Recordset(4) = Cmbdestination.Text DataStaffinfo.Recordset(5) = txtaddress.Text DataStaffinfo.Recordset(6) = Txtsalary.Text DataStaffinfo.Recordset.Update MsgBox "Saved" End If End Sub Private Sub cmdSearch_Click() Dim IsExistRec As Boolean IsExistRec = False If DataStaffinfo.Recordset.RecordCount > 0 Then DataStaffinfo.Recordset.MoveFirst End If Do While Not DataStaffinfo.Recordset.EOF If LCase(cmbSearch.Text) = LCase(DataStaffinfo.Recordset(1).Value) Then IsExistRec = True Exit Do End If DataStaffinfo.Recordset.MoveNext Loop If IsExistRec = True Then Txtid.Text = DataStaffinfo.Recordset(0) Txtname.Text = DataStaffinfo.Recordset(1)

txtphoneno.Text = DataStaffinfo.Recordset(2) Txtmailid.Text = DataStaffinfo.Recordset(3) Cmbdestination.Text = DataStaffinfo.Recordset(4) txtaddress.Text = DataStaffinfo.Recordset(5) Txtsalary.Text = DataStaffinfo.Recordset(6) Else MsgBox "Record not found" End If

End Sub Private Sub cmdView_Click() rptStaffinfo.Show End Sub Private Sub txtaddress_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtsalary.SetFocus End If End Sub Private Sub Txtid_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtname.SetFocus End If End Sub Private Sub Txtmailid_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Cmbdestination.SetFocus End If End Sub Private Sub Txtname_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtphoneno.SetFocus End If End Sub Private Sub Txtname_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If

End Sub Private Sub txtphoneno_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtmailid.SetFocus End If End Sub Private Sub txtphoneno_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub Private Sub Txtsalary_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmdSave.SetFocus End If End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("Do you want to close?", vbYesNo, "PMS") = vbYes Then Unload Me End If End If End Sub Private Sub Txtsalary_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub VISITORS INFO Private Sub cmdBack_Click() Me.Hide frmMainFormStaff.Show End Sub Private Sub Form_Activate() If DataVisitorsinfo.Recordset.RecordCount > 0 Then DataVisitorsinfo.Recordset.MoveFirst End If

cmbSearch.Clear Do While Not DataVisitorsinfo.Recordset.EOF cmbSearch.AddItem (DataVisitorsinfo.Recordset(1).Value) DataVisitorsinfo.Recordset.MoveNext Loop End Sub Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 27 Then If MsgBox("Do you want to close?", vbYesNo, "PMS") = vbYes Then Unload Me End If End If End Sub Private Sub cmdDelete_Click() If MsgBox("Are you Delete this Record?", vbYesNo) = vbYes Then If DataVisitorsinfo.Recordset.RecordCount = 0 Then MsgBox "No record" Else DataVisitorsinfo.Recordset.MoveFirst Do While Not DataVisitorsinfo.Recordset.EOF If Txtid.Text = DataStaffinfo.Recordset(0).Value Then DataVisitorsinfo.Recordset.Delete MsgBox "Delted" Exit Do End If DataVisitorsinfo.Recordset.MoveNext Loop End If End If Txtid.Text = "" Txtname.Text = "" Txtpatientname.Text = "" txtaddress.Text = "" txtphoneno.Text = "" Txtdate.Text = "" cmbTiming.Text = "" Txtname.SetFocus End Sub Private Sub cmdNew_Click() Txtid.Text = DataVisitorsinfo.Recordset.RecordCount + 1 Txtname.Text = "" Txtpatientname.Text = "" txtaddress.Text = "" txtphoneno.Text = ""

Txtdate.Text = "" cmbTiming.Text = "" Txtname.SetFocus End Sub Private Sub cmdSave_Click() If Txtdate = "" Then MsgBox ("Please enter the date") ElseIf Txtname = "" Then MsgBox ("Please enter the name ") ElseIf Txtpatientname = "" Then MsgBox ("Please enter the patient name") ElseIf txtphoneno = "" Then MsgBox ("Please enter the phone number") ElseIf cmbTiming = "" Then MsgBox ("Please enter the timings") ElseIf Txtdate = "" Then MsgBox ("Please enter the date ") Else Dim IsExistRec As Boolean IsExistRec = False If DataVisitorsinfo.Recordset.RecordCount > 0 Then DataVisitorsinfo.Recordset.MoveFirst End If Do While Not DataVisitorsinfo.Recordset.EOF If Txtid.Text = DataVisitorsinfo.Recordset(0).Value Then IsExistRec = True Exit Do End If DataVisitorsinfo.Recordset.MoveNext Loop If IsExistRec = True Then DataVisitorsinfo.Recordset.Edit Else DataVisitorsinfo.Recordset.AddNew End If DataVisitorsinfo.Recordset(0) = Txtid.Text DataVisitorsinfo.Recordset(1) = Txtname.Text DataVisitorsinfo.Recordset(2) = Txtpatientname.Text DataVisitorsinfo.Recordset(3) = txtaddress.Text DataVisitorsinfo.Recordset(4) = txtphoneno.Text DataVisitorsinfo.Recordset(5) = Txtdate.Text

DataVisitorsinfo.Recordset(6) = cmbTiming.Text DataVisitorsinfo.Recordset.Update MsgBox "Saved" End If End Sub

Private Sub cmdSearch_Click() Dim IsExistRec As Boolean IsExistRec = False If DataVisitorsinfo.Recordset.RecordCount > 0 Then DataVisitorsinfo.Recordset.MoveFirst End If Do While Not DataVisitorsinfo.Recordset.EOF If LCase(cmbSearch.Text) = LCase(DataVisitorsinfo.Recordset(1).Value) Then IsExistRec = True Exit Do End If DataVisitorsinfo.Recordset.MoveNext Loop If IsExistRec = True Then Txtid.Text = DataVisitorsinfo.Recordset(0) Txtname.Text = DataVisitorsinfo.Recordset(1) Txtpatientname.Text = DataVisitorsinfo.Recordset(2) txtaddress.Text = DataVisitorsinfo.Recordset(3) txtphoneno.Text = DataVisitorsinfo.Recordset(4) Txtdate.Text = DataVisitorsinfo.Recordset(5) cmbTiming.Text = DataVisitorsinfo.Recordset(6) Else MsgBox "Record not found" End If

End Sub Private Sub cmdView_Click() rptVisitorsinfo.Show End Sub Private Sub txtaddress_KeyDown(KeyCode As Integer, Shift As Integer)

If KeyCode = 13 Then Txtdate.SetFocus End If End Sub Private Sub Txtdate_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmbTiming.SetFocus End If End Sub Private Sub Txtdate_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub Private Sub Txtid_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtname.SetFocus End If End Sub Private Sub Txtname_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then Txtpatientname.SetFocus End If End Sub Private Sub Txtname_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If End Sub Private Sub Txtpatientname_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtphoneno.SetFocus End If End Sub Private Sub Txtpatientname_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("0") And KeyAscii <= Asc("9")) Then KeyAscii = 0 End If End Sub

Private Sub txtphoneno_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then txtaddress.SetFocus End If End Sub Private Sub txtphoneno_KeyPress(KeyAscii As Integer) If (KeyAscii >= Asc("A") And KeyAscii <= Asc("Z") Or KeyAscii >= Asc("a") And KeyAscii <= Asc("z")) Then KeyAscii = 0 End If End Sub Private Sub cmbTiming_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = 13 Then cmdSave.SetFocus End If End Sub

You might also like