You are on page 1of 147

A PROJECT REPORT ON

HOSPITAL MANAGEMENT SYSTEM

PGDCA : 2010-11
Project Head : Mr. Aviral Saxena Submitted By : Mohd. Faisal Bharat Singh Rathore Project Guide : Mr. Aviral Saxena

Certificate

Hospital Manageme System

Hospital Manageme System

CERTIFICATE
This is to certify that Mohd. Faisal & Bharat Singh Rathore is the student of P.G.D.C.A. of KHANDELWAL COLLEGE OF MANAGEMENT TECHNOLOGY Bareilly, Affiliated to M.J.P.ROHILKHAND UNIVERSITY Bareilly, sumitted the project HOSPITAL MANAGEMENT SYSTEM The project is for partial fulfillment for the award of degree P.G.D.C.A. and is carried out by them under my supervision. They both worked on the using VISUAL BASIC 6.0 language. They have completed this project in an excellent manner. During this period with us, we found his hard working sincere and system. I wish them grand success in their bright future.

Mr.AVIRALSAXENA (ProjectHead)

Mr. Aviral Saxena (Project Guide)

Hospital Manageme System

ACKNOWLEDGEMENT

Hospital Manageme System

ACKNOWLEDGEMENT
Acknowledgement is an art, one can write glib stanzas without meaning a word, on the other hand one can make a simple expression of gratitude.
No project can be done in vacuum. The accomplishment of this project would have not been possible without the unending encouragement, assistant & precious guidance from various sources. I take this opportunity to express my gratitude to my guide Mr. AVIRAL SAXENA, for his erudite guidance and constant encouragement enabling me to pursue the present project with skill and confidence. His innovation suggestion and critical comments are the motivating force behind the analysis put forward in the dissertation. I thank all the faculty members of KHANDELWAL COLLEGE OF MANAGEMENT SCIENCE & TECHNOLOGY, BAREILLY for their tremendous support and help at every step. I would like to gratefully appreciate the continuous encouragement from my friends. They were always there with motivational advice and unfailing support, which generated a great deal of confidence with me I thank my parents, who always supported us with their blessing.

(Mohd. Faisal) (Bharat Singh Rathore)

Hospital Manageme System

PREFACE

Hospital Manageme System

PREFACE
The most important technological break through of the 20th century has been the computer. ENIAC (Electronic Numerical Integrator and Computer) was firstly invented by Charles Babbage in 1946. It was the first digital computer. But with boon and advancement of technology, computer no longer remained as calculating device. With invention of new and faster processor computer became a powerful tool for processing, storage and

communication of data. With the facilities such as huge storage of data and higher processing speed, computer became the backbone of society. Computers have replaced the labor and paper work of humans with profound efficiency. More and more institutions are now computerized so as to reduce human labor, large stationary work and most important of them all, invaluable time. Today computers play an important role in the field of communication using the enhanced features of networking & Internet. This project is also a milestone in the area of medicine using the latest in the field of computer & information technology.

Hospital Manageme System

Content

Hospital Manageme System

CONTENTS
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Introduction Introduction to Visual Basic Introduction to Database & Microsoft Access 2000 Problem Description System Analysis System Design System Specification System Study SDLC Data Flow Diagram E-R Diagram Software Description Data Tables Interface Design Data Reports Coding Conclusion Bibliography

Hospital Manageme System

Introduction

Hospital Manageme System

INTRODUCTION
Hospital Management System is a versatile software package made using powerful, industry strength technologies developed by leading software firms of the world. This project is designed to ease and automate the working of a Hospital. Mostly in Hospitals, records of various patients information are kept such as patients personal information. Each patient as allotted a room from his demanded category. There are a vide variety of rooms or Wards available in the hospital that have various facilities according to their price. The hospital staff has to keep track of every room when it is available or not. Another task associated with Hospitals is bill processing that requires calculation of charges according to the facilities used by the patient. These tasks are very tedious takes much more time to do then it should and delays other important tasks. Thats where this project comes in handy. It automates the process of management of patients as well as various rooms and room categories as well as bill creation and printing. Along with these, project provides support for the major housekeeping tasks such as customer record creation, modification and long term record maintenance. The software also features a sufficiently Powerful, Encrypted User Management System developed by the author. Plus, the software also provides facilities for easy maintenance of the customer database by providing facilities such as Automated, Compressed Data Backup and Restore, Automated Database Cleanup and Repair etc. so that your information remains intact and your computerized system dont die out when you need it the most.

Hospital Manageme System

All in all, the project provides more than enough facilities that any of the modern Hospital will ever need for making their work automated and productive.

INTRODUCTIO N TO VISUAL BASIC

Hospital Manageme System

WHY VISUAL BASIC


Graphical user interfaces, or GUI has revolutionized the microcomputer industry. They demonstrate that the proverb "A picture is worth a thousand words", hasn't lost its truth to most computer users. Instead of the cryptic C :\> prompt that DOS user has long seen, we are presenting with a desktop filled with icons and with programs that use mice and menus. For a long time there few such tools for developing Windows applications. Before Visual Basic was introduced in 1991, developing Windows applications was much harder than developing DOS applications. Programmers had too much to worry about where the user was inside a menu, and whether he or she was clicking or double clicking at a given place, developing a windows application required experts C programmers and hundreds of lines of code for the simplest task, even the experts had trouble. Visual Basic version 6 is the newest addition to the family of VB products. It allows us to quickly & easily develop windows application for our PC without being expert in any programming language. VB provides a graphical environment in which we visually design the forms & controls that becomes the building blocks of your applications. VB supports many useful tools that will help us too more productive. These provide, but are not limited to projects, forms, class, objects, templates, custom controls, add-ins & database managers. Visual Basic let us add menus, text boxes, command buttons, option buttons (for making exclusive choices), check boxes (for nonexclusive choices), list boxes, scroll bars, file and directory boxes to blank windows. We can use grids to handle tabular data. We can communicate with other windows applications, and perhaps most importantly, we'll have an easy method to let users control and access

Hospital Manageme System

databases. We can have multiple windows on a screen. These windows have full access to the clipboard and to the information are most other windows applications running at the same time.

We can use visual basic to communicate with other applications running under windows, using the most modern version of Microsoft's COM/OLE technology. Visual Basic provides a graphical environment in which we visually design the forms and controls that become the building blocks of our application. Visual Basic supports many useful tools that will help us to be more productive. These include, but are not limited to projects, forms, class objects, templates, custom controls, add-ins and database managers. We can use these tools together to create complete applications in months, weeks or even days, producing an application using another language can take much larger. Version 6 of Visual Basic is specifically design to utilize the Internet. It comes with several controls that allow us to create web-based applications called ActiveX executables. These works just like standalone Visual Basic applications, but they are accessed through the Microsoft Internet explorer 4-web browser. Using this new style of application, we use revise our existing Visual Basic applications and distribute them through the internet. New to Visual Basic 6 are the ISAPI application and dynamic H1ML project templates. These templates provide us with a framework to develop server-side components as well as "Smart" Web pages and applications. Visual Basic continues to sport the Explorer style development environment, modeled after Windows Explorer. This makes it easy for a computer user to jump right into creating applications with Visual Basic. Almost all of the objects and tools on the screen can be manipulated through a right-click. We set properties, add controls, and even view context sensitive help with this single action. In a nutshell the answer is that Visual Basic 6 offers us more: more internet features, better support for database development, more language features to make your programming jobs easier, more wizards, more, more, and more. Visual Basic was derived from BASIC, and is an event driven

Hospital Manageme System

programming language. Programming in Visual Basic is done visually, which means that as you design, you will know how your application will look on execution. User can therefore, Change and experiment with the design to meet your requirement. Three editions of Visual Basic are available.

Standard Professional Enterprise

STANDARD EDITION:The Visual Basic Standard edition: Allows user to create powerful 32 bit applications for Microsoft Windows 9xs and Windows NT. Includes intrinsic controls, as well as grid, tab, and data-bound controls. Includes Microsoft Developer Network CDs containing full online documentation.

PROFESSIONAL EDITION:The Professional edition, in addition to the features provided in the Standard edition, includes: ActiveX controls, including internet control. Internet Information Server Application Designer. Integrated Data Tools and Data Environment. Dynamic HTML Page Designer.

ENTERPRISE EDITION:The Enterprise edition, in addition to the features available in the Professional edition, allows creation of robust distributed application and includes: Application Performance Explorer.

Internet Information Services.

Hospital Manageme System

Support for Microsoft Transaction Server 2.0. Stored Procedure Editor.

SQL Debugging.

Visual Component Manager. Visual Database Tools. Visual SourceSafe.

Introduction to Databases AND MICROSOFT ACCESS 2000

Hospital Manageme System

INTRODUCTION TO DATABASES AND MICROSOFT ACCESS 2000


A Database is a collection of information thats related to a particular subject or purpose, such as dropkicking customer orders or maintaining a music collection. If our database is not stored on a computer, or only parts of it are, we may be tracking information from a variety of sources that we have to coordinate and organize ourselves. Using Microsoft Access, we can manage all our information from a single database file. Within the file, divide our data into separate storage containers called Table. View, add and update table data by using online forms, Find and retrieve the data we want using queries and analyze or print data in a specific layout by using reports. Access allows users to view, update and analyze the databases data from the internet or an intranet by creating Data Access Pages. To Store our data we create one table for each type of information that we track. To bring data from multiple tables together in a query, form, report or data access pages. We can also define relationships between tables. To find and retrieve just the data that meets conditions that we specify, including data from multiple tables, create a query. A query can also update and delete multiple records at the same time and perform predefined or custom calculations on our data.

Hospital Manageme System

To easily view, enter and change data directly in a table, we can create a form. When we open a form, Microsoft Access retrieves the data from one or more tables and displays it on the screens with the layout we choose in the form wizard, or a layout that we create from scratch. To analyze our data or present it in a certain way in print, we can create reports, for example we might print one print that groups data and calculates totals and another report with different data for printing mailing labels.

PROBLEM DESCRIPTION

Hospital Manageme System

PROBLEM DESCRIPTION
The purpose of the project entitled as HOSPITAL MANAGEMENT SYSTEM is to computerize the Front Office Management of Hospital to develop software which is user friendly, simple, fast, and cost effective. It deals with the collection of patients information, diagnosis details, etc. Traditionally, it was done manually.

The main function of the system is to register and store patient details and doctor details and retrieve these details as and when required, and also to manipulate these details meaningfully System input contains patient details, diagnosis details; while system output is to get these details on to the CRT screen.

Hospital Manageme System

NEED:1. Efficiently maintains the details about the patient 2. Simultaneously updates changes made to any data, item in the entire data base. 3. It is faster than manual system

SYSTEM ANALYSIS

Hospital Manageme System

SYSTEM ANALYSIS
Analysis:Analysis is the study of problem prior to make some action. In the specific domain of computer system development, analysis refers to the study of some business areas application, usually leading to the specification of new system. The action that is to be taken later on is implementation of system. While studying or analyzing an analysis has to involve deeply in analysis task.

Steps In The System Development Life Cycle:Every task of our daily life can be perform in a appropriate manner by adopting some predetermine methodologies .Similarly System Development Life Cycle involves many steps in the design of new system.

These Steps Are:1. 2. 3. 4. Problem definition Drawbacks in the existing system Request for the system change Requirement analysis

Hospital Manageme System

5. The proposed system 6. Feasibility study of the proposed system

Requirement Specification: Application should use the data related to Hospital Management System. Application should provide for the viewing and updating of data whenever needed. Application should provide report generation facility with flexibility. Application should also provide different types of query. System should be secure, as the data is sensitive.

Feasibility Analysis:It determines the best way to achieve the objective of the system request and is the preliminary steps towards the design of a system proposed system changes leading feasibility study fall into one of the three categories.

Change To The Existing System:When the present has some discrepancies, which can be removed by some alteration, fall under this category.

Completely New System:When the present system whether manual or computerized has a lot of discrepancies which results in performance degradation and the system is causing big loss of money and the time then sometimes it is desirable to replace the older system with a completely new system .

Hardware Survey:When the present hardware platforms are not sufficient or satisfactory operation of current software then it is required the processing time, response time etc can be removed.

Hospital Manageme System

Other Feasibility Of Proposed System Is:Operational Feasibility:Operational feasibility is concerned with human, organizational and political aspects. One is a technical performance aspect and the other is acceptance within the organization.

Technical Feasibility:The existence of the infrastructure required for the proposed system makes it technically feasible for the system to be implemented. Technical feasibility is concerned with specifying equipment and software that will successfully support the required task.

Economic Feasibility:The organization already has the idea of development of the information system in its priorities. The cost, which will be incurred in the development, gets cleared.

Hospital Manageme System

SYSTEM DESIGN

Hospital Manageme System

SYSTEM DESIGN
Overview:System design is an essential activity in the system development life cycle. System design is the general specification of the computer-based solution that was selected analysis. Design specification forms the basis for the system development. The design is a solution the translation of requirement into ways of meeting them in the process the end user requirements were translated into specification for a computer based information system. System design consists of tow phase: 1. Logical design 2. Physical design In logical design the detailed specification of the new system is described i.e. output, the input and the database, all in the manner that meets project requirement. The activity following logical design, are the procedures followed in the physical design of a system takes the logical design blueprint & produces the program specification, physical file or database definition with the help of this blue print, e.g. producing programs, software, and files and working system.

Hospital Manageme System

Design Goals:Here our approach is to develop an interactive system, which accepts inputs, options and provides the user with the required outputs. After some give and take, the design goals suggest that the user have the following features: 1. The system should have good interface. 2. To facilitate the user, a number of messages should be designed which guide the action. 3. Care should be taken to keep the user input simple to ensure accuracy of input. 4. The system should be flexible.

Hospital Manageme System

System Design Phase: Data gathering Detail system Input design Output design Control design Database design

Program writing.

Input Design:Input design specifies how data are accepted for processing. This involves: What data to input. What medium to use. How the data should be arrange or coded. The dialog to guide users in providing input. Data items and transactions validation to detect error. Method of performing input validation.

Output Design:For many Ends-users output is the main reason for developing the system and the basis on which they will evaluate the usefulness of the application. Output design involves. Determines what information to present. Decide whether to display or print information. Presentation in an acceptable format.

Hospital Manageme System

Control Design:While entering data or in requesting the performance of certain function there may occur errors, which could be in proper use of system. Control provides ways to: Ensure that only authorized users access the system. Guarantee that transaction is acceptable. Validate the data for accuracy. Determine whether any necessary data have been omitted.

Database Design:The collection of data is usually referred to as database. The database contains information about the particulars of organization. The management of data involves the definition of structures of the storage of information and the provision of mechanism for the manipulation of information.

Hospital Manageme System

SYSTEM SPECIFICATION

Hospital Manageme System

SYSTEM SPECIFICATION
1. Hardware Requirements
Processor Clock speed System bus RAM HDD Monitor Keyboard Mouse : Intel Pentium IV 2.4 GHZ or above : 500 MHZ : 32 bits : 256MB of RAM : 40 GB or higher : SVGA COLOR : 108 keys : 2 button mouse

2. Software Requirements
OS Front End Back End : : : MS WINDOWS XP SP2 Visual Basic 6.0 Microsoft Access 2003

Hospital Manageme System

SYSTEM STUDY

Hospital Manageme System

SYSTEM STUDY

INTRODUCTION

The goal of any system development is to develop and implement the system cost effectively; user-friendly and most suited to the users analysis is the heart of the process. Analysis is the study of the various operations performed by the system and their relationship within and outside of the system. During analysis, data collected on the files, decision points and transactions handled by the present system. Different kinds of tools are used in analysis of which interview is a common one.

INITIAL INVESTIGATION

The first step in system development life cycle is the identification of need of change to improve or enhance an existing system. An initial investigation on existing system was carried out. The present system of hospital is completely manual. Many problems were identified during the initial study of the existing system.

Hospital Manageme System

EXISTING SYSTEM

System analysis is a detailed study of the various operations performed by a system and their relationships within and outside of the system. Here the key question is What all problems exist in the present system? What must be done to solve the problem? Analysis begins when a user or manager begins a study of the program using existing system.

During analysis, data collected on the various files, decision points and transactions handled by the present system. The commonly used tools in the system are Data Flow Diagram, interviews, etc. training, experience and common sense are required for collection of relevant information needed to develop the system. The success of the system depends largely on how clearly the problem is defined, thoroughly investigated and properly carried out through the choice of solution. A good analysis model should provide not only the mechanisms of problem understanding but also the framework of the solution. Then the proposed system should be analyzed thoroughly in accordance with the needs.

System analysis can be categorized into four parts. System planning and initial investigation Information gathering

Hospital Manageme System

Applying analysis tools for structured analysis Feasibility study Cost/benefit analysis

PROPOSED SYSTEM

The drawback of the existing system is that it is very difficult to retrieve data from case files. It is difficult to handle the whole system manually and it is less accurate and to keep the data in case files for future reference because it may get destroyed. Moreover it is very difficult to retrieve data. Redundancy of data may occur and this may lead to the inconsistency. The manual system is so time-consuming.

The proposed system is very easy to operate. Speed and accuracy are the main advantages of proposed system. There is no redundancy of data. The data are stored in the computers secondary memories like hard disk, etc. it can be easily receive and used at any time. The proposed system will easily handle all the data and the work done by the existing systems. The proposed systems eliminate the drawbacks of the existing system to a great extent and it provides tight security to data.

Hospital Manageme System

ABOUT OPERATING SYSTEM


Windows XP is a line of operating systems developed by Microsoft for use on general purpose computer systems, including home and business desktops, notebook computers and media centers. The letters XP stand for experience. Windows XP is the successor to both Windows 2000 and Windows Me and is first consumer oriented operating system produced by Microsoft to be built on the Windows NT kernel and architecture.

The most common editions of operating systems are Windows XP home edition, which is targeted at home users, and Windows XP professional, which has additional features such as, support for Windows server domain and two physical processors and is targeted at power users and business clients. Windows XP Tablet PC edition is designed to run the ink-aware Tablet PC platform. Two separate 64 bit versions of Windows XP were also released, Windows XP 64 bit edition for IA-64(Itanium) processors and Windows XP Professional x64 edition for x86-64 processor.

Hospital Manageme System

Software development life cycle

Hospital Manageme System

SOFTWARE DEVELOPMENT LIFE CYCLE (SDLC)


INTRODUCTION
A SDLC is a series of identifiable stages that are software product undergoes during its lifetime. It is used to facilitate the development of a large project in a well defined & cost effective way. Each stage is called a life cycle phase. A software life cycle model (or process model) is built which identifies all the requirements and activities need to maintain & develop the project. There are various purposes behind to use SDLC for the project:1. Helps to understand entire process. 2. Enforces a structured approach for development of any project. 3. Enable programming of resources in advance. 4. Keep track on progress of the software.

SDLC consist of several phases defines the entry & exit criteria for any face. It any ware there is no clear indication of entry & exit for every face it becomes very difficult to track the process of the project. The primary advantage of SDLC in any project is that it encourages the development of software project in a systematic & disciplined manner.

Hospital Manageme System

PLANNING

FEASIBILITY STUDY

PROJECT ANALYSIS

SOFTWARE DESIGN

CODING

TESTING

IMPLEMENTATION

MAINTENANCE

PHASES OF SOFTWARE DEVELOPMENT LIFE CYCLE

PHASES OF SOFTWARE DEVELOPMENT LIFE CYCLE: Project initialization/Planning Project identification/feasibility study Project analysis Software design Coding Testing Implementation Maintenance

Hospital Manageme System

Project initialization/Planning: - This is a first stage of SDLC first of

all we can make a plan before started any project, so at this stage the need of any software project is identified & information of the software project are examine.
Project identification/Feasibility study: - This is the second phase of

SDLC also known as feasibility study. The main aim of any software developer at this stage is to determine whether our developed project is financially or technically feasible or not. It involves analysis of the problem and determines the resource requirement cost, benefits and feasibility of a proposed project. The feasibility of the software can be evaluated into four major categories: Organizational feasibility: - It is, on how well the proposed

project supports the objective of the organization & its strategies plan for information system. Economic feasibility: - It is concerned with whether expected cost, savings, increased revenue, increased profit & other type of benefits will exceed the cost of developing & operating proposed software. Technical feasibility: - It can be demonstrated if reliable hardware & software capable of meeting the needs of proposed project can be acquired & developed in required time. Operational feasibility: - It is the willingness and ability of the management, employees, customers, suppliers, and others to operate, use & support proposed software project.
Project analysis: - Analysis is the detailed studies of various operations

performed by the software & their relationships within and outside the system. Thus the aim of project analysis phase is to understand the exact requirement of customer & to document them properly. This phase consist of two distinct activities: Requirement analysis: - The goal of requirement analysis is to collect & analyze all related data & information with a view to understand the customer requirements clearly

Hospital Manageme System

Requirement specification: - The user requirements are organized properly in a SRS (software requirement specification) document. The SRS document addresses the functional and other requirements on maintenance & development of software product. It must be remembered that the requirement analysis and specification phase concentrates on what needs to be done & not how to do.
Software Design: - The purpose of design phase is to plan a solution of

the problem specified by the requirement analysis. This phase is the first step in moving from problem domain to solution domain. In other words, starting from what is needed; design takes us towards how to specify the needs. The design activity often divided into two separate phases- one is system design also called top level design which aims to identify the modules and how they interact with each other to produce the desire result. Second one is detailed design- during this the internal logic of the modules specified in the system design is decided. In these further details of the data structure and algorithm design of module is specified. A large system cannot be handled as a whole and so for design it, it is partitioned into smaller system. Abstraction is the concept related to the problem partitioning. When partitioning is used, the design activity is focused on one part of system. Coding: - The goal of coding is to translate the design of software into code in a programming language. In this phase the aim is to implement the design in a best possible manner. This phase affects both testing and maintenance phases, hence during coding the focus is on developing programs that are easy to read and understand, not simplify on developing programs that are simple to write.
Testing: - It is the major quality control measure used during software

development its basic function is to detect errors in the software project. Thus the goal of testing is to uncover requirements, design & coding errors in the project. For all of this we can do step by step testing: Unit testing: - The purpose of this testing is to determine the correct working of individual modules. Unit testing focuses on modules independently on one another to

Hospital Manageme System

another to locate another. So, before proceeding one must sure that all the programs are working properly & independently. Integration testing: - The process of combining the multiple modules systematically for conducting test in order to find errors in modules is called integration testing. It is done after successful completion of unit testing. System testing: - When all the modules have been successfully integrated & tested, system testing is carried out. The goal of this system testing is to ensure that the developed project functions according to its requirements as specified. The final output of testing phase is going through such testing also: Alpha testing: - It is a system testing performed by the development team. Beta testing: - It is a system testing performed by a friendly set of customers. Acceptance testing: - It is a system testing performed by the customers him after the delivery of software product to determine whether to accept or reject the delivery project.
Implementation: - After testing is done of all the modules of the proposed

project, the software (or project) is now implemented. Implementation is the process of converting a new software design into operational software. It involves programmers, users and operations management.
Maintenance: - It is an important part of SDLC if there is any error to correct or

change needed by the software then it is done in the maintenance phase. In this the software product is being modified after it has been delivered to the customer. Such type of maintenance is also done are as follows:

Corrective m discovered corrective

Perfective ma system, an according

Hospital Manageme System

DATA FLOW DIAGRAMS

Hospital Manageme System

DFD for Login Module

Ok Password Administrator User Verifying User Name and Password

Enter Administrator/User

Rejected

User Password Login File

DFD for Billing process


File User Item Details Sales process Updating process Item Code

Item Details

Quotation Details Stock File

Billing process

Bill Customer

Hospital Manageme System

ENTITY RELATIONSHIP DIAGRAMS

Hospital Manageme System

ENTITY RELATIONSHIP DIAGRAMS

Administrator

Controls Name Employee

DateStarted HOD Wor ks On

Department

Emp- Number

Address Dept Name Works On Name Name

Dept number

Name

Patient

Trea ted by

Doctor

Patient ID

Address

Dr-ID

Address

Hospital Manageme System

SOFTWARE DESCRIPTION

Hospital Manageme System

Hospital Manageme System

SOFTWARE DESCRIPTION

Microsoft Visual Basic 6.0

Visual Basic 6.0 is Microsofts latest version of the Visual Basic Programming language. Although writing programs can be a tedious chore at time. Visual Basic reduces the effort required on your part, and makes

programming enjoyable. Visual Basic makes many aspects of programming as simple as dragging graphics objects on to screen with your mouse.

Visual Basic 6.0 is more than just a programming language; the secret to Visual Basic is in its name Visual. With to days Windows Operating System, a program must be able to interact with the screen. Keyboard, mouse and printer graphically.

The environment provided by Visual Basic is suitable for any type of application. Using this environment, the user can visually design the objects that your application uses. Visual Basic is not just a languages, its an

integrated development environment in which you can develop, run, test and debug your applications. The impressive array of programming resources

Hospital Manageme System

provided by Visual Basic enables to create the objects extemporaneously which can range from pop-up menu to a message box. A form is a major part of Visual Basic application, which allows the user to enter the data as well as view the result. A control is an object that we draw on a form to enable or enhance user interaction with an application. Hence a Visual Basic application is a combination of object like forms and controls, procedures that can respond to Events and other general-purpose procedures.

Starting Visual Basic

To start Visual Basic:

Click on the Start button on the Windows task bar.

Select Programs, then Microsoft Visual Basic # (where # is your

version of Visual Basic).

Click on Visual Basic # (where again # is your version).

Hospital Manageme System

Title Bar

Main Menu

Toolbar

At the top of the screen is the Visual Basic Main Window. At the top of the main window is the Title Bar. The title bar gives us information about what program were using and what Visual Basic program we are working with. Under the main menu is the Toolbar. Here little buttons with pictures also allow us to control Visual Basic, much like the main menu. If you put the mouse cursor over one of these buttons for a second or so, a little tool tip will pop up and tell you what that particular button does.

Hospital Manageme System

Parts of a Visual Basic Project

There are three major components in a Visual Basic project: the project itself, the form, and the controls. Project is the word used to encompass

everything in a Visual Basic project. Other words used to describe a project are application or program. The Form is the window where you create the

interface between the user and the computer. Controls are graphical features or tools that are placed on forms to allow user interaction (text boxes, labels, scroll bars, command buttons). Recall the form itself is a control. Controls are also referred to as objects. Pictorially, a project is:

Control Project Control Control Form Control

Project consists of a form containing several controls. In looking around your computers file directory, you may find some files associated with a Visual Basic project. Two primary files are used to save a Visual Basic project. The project file will have an extension of vbp (in addition, there is sometimes a file

Hospital Manageme System

with a vbw extension). The form file has an extension of frm (in addition, there is sometimes a form file with an frx extension). An important concept concerning a Visual Basic project is that of a property. Every characteristic of a control (including the form itself) is

specified by a property. Example properties include names, captions, sizes, colors, position on the form, and contents. Visual Basic is an event-driven language. Visual Basic is governed by an event processor. That means that nothing happens in a Visual Basic project until some event occurs. Once an event is detected, the project finds a series of instructions related to that event, called an event procedure. That procedure is executed, and then program control is returned to the event:

EVENT
Event processor

Event Procedure

Event Procedure

Event Procedure

Event procedures are where we do the actual computer programming and are saved with the form in the file with the frm extension. These procedures are where we write BASIC language statements. You will learn a lot of

programming and BASIC language in this course. The BASIC you will learn is very similar to the original BASIC used by Bill Gates and Paul Allen when starting Microsoft.

Hospital Manageme System

Parts of the Visual Basic Program

Visual Basic is more than just a computer language.

It is a project

building environment. Within this one environment, we can begin and build our project, run and test our project, eliminate errors (if any) in our project, and save our project for future use. With other computer languages, many times you need a separate text editor to write your program, something called a compiler to create the program, and then a different area to test your program. Visual Basic integrates each step of the project building process into one environment. Lets look at the parts of the Visual Basic environment.

Main Window
Start Visual Basic using the procedure learned in Class 1. Notice that several windows appear. The Main Window is used to control most aspects of the Visual Basic project building and running process.

The main window consists of the title bar, menu bar, and toolbar. The title bar indicates the project name and the current Visual Basic operating mode (design, break, run). The menu bar has drop-down menus from which you control the operation of the Visual Basic environment.

Hospital Manageme System

Form Window

The Form Window is central to developing Visual Basic applications. It is where you develop your application.

If the form window is not present on the screen:

Properties

Like all controls, the form has many (over 40) properties. Fortunately, we only have to know about some of them. concerned with are: The properties we will be

Hospital Manageme System

Property
Name

Description
Name used to identify form. Three letter prefix for form names is frm.

Caption Icon Left

Text that appears in the title bar of form. Reference to icon that appears in title bar of form. Distance from left side of computer screen to left side of form.

Top

Distance from top side of computer screen to top side of form.

Width Height Back Color Border Style

Width of the form in twips. Height of form in twips. Background color of form. Form can either be sizable (can resize using the mouse) or fixed size.

Form Events

The form primarily acts as a container for other controls, but it does support events. That is, it can respond to some user interactions. We will only be concerned with two form events in this course:

Hospital Manageme System

Event
Click

Description
Event executed when user clicks on the form with the mouse.

Load

Event executed when the form first loads into the computers memory. This is a good place to set initial values for various properties and other project values.

Toolbox Window
The Toolbox Window is the selection menu for controls used in your application.

Hospital Manageme System

VB6:

Pointer Label Frame Check Box Combo Box Horizontal Scroll Bar Timer Directory Shape Image OLE

Picture Box Text Box Command Button Option Button List Box Vertical Scroll Bar Drive Files Line Data Control

If the toolbox window is not present on the screen, click View on the main menu, then Toolbox.

Features of Visual Basic:


1. Good User Interface. 2. OLE Features. 3. Windows API Features. 4. 32 bit Programming Languages. 5. Data Management 6. Online Help 7. Data Access.

Hospital Manageme System

Areas of Application
The term "Personal Programming" refers to the idea that, wherever you work, whatever you do, you can expand your computer's usefulness by writing applications to use in your own job. Personal Programming is what Visual Basic is all about. Using Visual Basic's tools, you quickly translate an abstract idea into a program design you can actually see on the screen. VB encourages you to experiment, revise, correct, and network your design until the new project meets your requirements. However, most of all, it inspires your imagination and creativity. Visual Basic is ideal for developing applications that run in the new Windows 95 operating system. VB presents a 3-step approach for creating programs: 1. Design the appearance of your application. 2. Assign property settings to the objects of your program. 3. Write the code to direct specific tasks at runtime. Visual Basic can and is used in a number of different areas, for example:

Education Research Medicine Business

Hospital Manageme System

Commerce Marketing and Sales Accounting Consulting Law Science

Microsoft Access 2003.

Microsoft Access is the default database of Microsoft Visual Basic. Microsoft Access 2003 provides many new features that make working with data and designing a database even easier. Microsoft Access Database is a collection of data and objects related to particular topic or purpose. Microsoft Access Database may contain tables; queries, forms, reports, macros modules and shortcuts top data access pages. Microsoft Access is a Relational Database Management System. Using Access we can organize our data according to subject and can store information about how different subject are related. In general MS-Access database can have several small tables. Microsoft Office Access, previously known as Microsoft Access, is a relational database management system from Microsoft that combines the relational

Hospital Manageme System

Microsoft Jet Database Engine with a graphical user interface and software development tools. It is a member of the 2007 Microsoft Office system. Access can use data stored in Access/Jet, Microsoft SQL Server, Oracle, or any ODBC-compliant data container (including MySQL and PostgreSQL). Skilled software developers and data architects use it to develop application software. Relatively unskilled programmers and non-programmer "power users" can use it to build simple applications. It supports some object-oriented techniques but falls short of being a fully object-oriented development tool. Access was also the name of a communications program from Microsoft, meant to compete with ProComm and other programs. This proved a failure and was dropped. Years later Microsoft reused the name for its database software.

Access is used by small businesses, within departments of large corporations, and by hobby programmers to create ad hoc customized desktop systems for handling the creation and manipulation of data. Access can be used as a database for basic web based applications hosted on Microsoft's Internet Information Services and utilizing Microsoft Active Server Pages ASP. Most typical web applications should use tools like ASP/Microsoft SQL Server or the LAMP stack. Some professional application developers use Access for rapid application development, especially for the creation of prototypes and standalone applications that serve as tools for on-the-road salesmen. Access does not scale

Hospital Manageme System

well if data access is via a network, so applications that are used by more than a handful of people tend to rely on Client-Server based solutions. However, an Access "front end" (the forms, reports, queries and VB code) can be used against a host of database back ends, including JET (file-based database engine, used in Access by default), Microsoft SQL Server, Oracle, and any other ODBC-compliant product. Features One of the benefits of Access from a programmer's perspective is its relative compatibility with SQL (structured query language) queries may be viewed and edited as SQL statements, and SQL statements can be used directly in Macros and VBA Modules to manipulate Access tables. Users may mix and use both VBA and "Macros" for programming forms and logic and offers objectoriented possibilities. MSDE (Microsoft SQL Server Desktop Engine) 2000, a mini-version of MS SQL Server 2000, is included with the developer edition of Office XP and may be used with Access as an alternative to the Jet Database Engine. Unlike a modern RDBMS, the Access and the Jet Engine implements database triggers and stored procedures in a non-standard way. Stored Procedures are implemented in VBA, and Triggers are only available from embedded Forms. Both Triggers and Stored procedures are only available to applications built completely within the Access database management system. Client applications built with VB or C++ are not able to access these features. Starting in MS

Hospital Manageme System

Access 2003 (Jet 4.0), there is a new syntax for creating queries with parameters, in a way that looks like creating stored procedures, but these procedures are still limited to one statement per procedure. Microsoft Access does allow forms to contain code that is triggered as changes are made to the underlying table (as long as the modifications are done only with that form), and it is common to use pass-through queries and other techniques in Access to run stored procedures in RDBMSs that support these. In ADP files (supported in MS Access 2003 and later), the database-related features are entirely different, because this type of file connects to a MSDE or Microsoft SQL Server, instead of using the Jet Engine. Thus, it supports the creation of nearly all objects in the underlying server (tables with constraints and triggers, views, stored procedures and UDF-s). However, only forms, reports, macros and modules are stored in the ADP file (the other objects are stored in the back-end database).

Hospital Manageme System

DATABASE DESIGN

The general theme behind a database is to handle information as an integrated whole. A database is a collection of interrelated data stored with minimum redundancy to serve many users quickly and effectively. After designing the input and output, the analyst must concentrate on database design or how data should be organized around user requirements. The general objective is to make information access, easy, quick, inexpensive and flexible for other users. During database design, the following objectives are concerned: Controlled redundancy Easy to learn and use More information and low cost Accuracy Integrity

Hospital Manageme System

Data TABLES

Hospital Manageme System

File Name :- Login

Field Name
id username password

Data Type
Number Text Text

File Name :- Admit form

Field Name
Patient_id Patient_name age sex Address Consultant_doctor registrationfee Admit_date Room_no

Data Type
Number Text Number Text Text Text Number Date/time Number

Hospital Manageme System

File Name:-Discharge Form

Field Name
Patient_id Patient_name age sex Date_of_admit Date_of_discharge Treatment_provided Consultant_doctor

Data Type
Number Text Number Text Date/time Date/time Text Text

File Name:-Newcoming Doctor Details Field Name


Name Age Sex Address Specialization Experience Qualification Department

Data Type
Text Number Text Text Text Number Text Text

File Name:-Doctor Search Field Name


Name Age Sex Address Specialization Experience Qualification Department

Data Type
Text Number Text Text Text Number Text Text

Hospital Manageme System

File Name:- Patient Search

Field Name
Patient_id Patient_name Sex Admit_date Treatment_provided Consultant_doctor

Data Type
Number Text Text Date/time Text Text

File Name:-Pharmacy Bill Field Name


Bill_no Patient_id medicine quantity price

Data Type
Number Number Text Number Number

File Name:-Lab Bill Field Name


Bill_no Patient_id Lab_test_name amount

Data Type
Number Number Text Number

Hospital Manageme System

File Name:-Charges Bill Field Name


Patient_id Opd_charges Medicine_charges Staff_charges Ambulance_charges Operation_charges Miscellaneous_charges Total_charges

Data Type
number number number number number number number number

File Name:-Medicine Information

Field Name
medicine Medicine_type amount Expiry_date stock

Data Type
Text Text number Date/time number

File Name:-Staff Information

Field Name

Data Type

Hospital Manageme System

name age sex address Phone_no

Text number Text Text number

Hospital Manageme System

INTERFACE DESIGN

SPLASH SCREEN :-

Hospital Manageme System

WELCOME FORM:-

Hospital Manageme System

LOG IN FORM:-

Hospital Manageme System

MDI FORM:-

Hospital Manageme System

MDI FORM:-

Hospital Manageme System

ORTHOSURGEON DEPARTMENT:-

Hospital Manageme System

PHYSIAN DEPARTMENT:-

Hospital Manageme System

EYE DEPARTMENT:-

Hospital Manageme System

DENTAL DEPARTMENT:-

Hospital Manageme System

PATHOLOGY DEPARTMENT:-

Hospital Manageme System

HOSPITAL PHARMACY DEPARTMENT:-

Hospital Manageme System

MDI FORM:-

Hospital Manageme System

ADMIT PATIENT:-

Hospital Manageme System

DISCHARGE PATIENT:-

Hospital Manageme System

MDI FORM:-

Hospital Manageme System

NEWCOMING DOCTOR:-

Hospital Manageme System

MODIFYING DOCTOR DETAILS:-

Hospital Manageme System

MDI FORM:-

Hospital Manageme System

PATIENT SEARCH:-

Hospital Manageme System

DOCTOR SEARCH:-

Hospital Manageme System

MDI FORM:-

Hospital Manageme System

STAFF INFORMATION:-

Hospital Manageme System

MDI FORM:-

Hospital Manageme System

MEDICINE INFORMATION:-

Hospital Manageme System

MDI FORM:-

Hospital Manageme System

PHARMACY BILL:-

Hospital Manageme System

LAB BILL:-

Hospital Manageme System

CHARGES BILL:-

Hospital Manageme System

MDI FORM:-

Hospital Manageme System

Hospital Manageme System

DATA REPORT

Hospital Manageme System

DATA REPORT 1:-

Hospital Manageme System

DATA REPORT 2:-

Hospital Manageme System

DATA REPORT 3:-

Hospital Manageme System

DATA REPORT 4:-

Hospital Manageme System

MDI FORM:-

Hospital Manageme System

ABOUT US:-

Hospital Manageme System

CODING

SPLASH SCREEN:-

Hospital Manageme System

Option Explicit Private Sub Form_KeyPress(KeyAscii As Integer) Unload Me End Sub Private Sub Form_Load() lblVersion.Caption = "Version " & App.Major & "." & App.Minor & "." & App.Revision End Sub Private Sub Frame1_Click() Unload Me End Sub Private Sub Timer1_Timer() ProgressBar1.Value = ProgressBar1.Value + 1 If ProgressBar1.Value = 100 Then Unload Me Form8.Show Timer1.Enabled = False End If

Hospital Manageme System

End Sub

WELCOME FORM:-

Private Sub Command1_Click() Form1.Show Unload Me End Sub Private Sub Command2_Click() Unload Me

LOG IN FORM:-

Dim con As New ADODB.Connection Dim rs As New Recordset

Private Sub Command1_Click() Set rs = New ADODB.Recordset rs.ActiveConnection = con

Hospital Manageme System

rs.CursorType = 3 rs.LockType = 3 rs.Source = "select * from table1 where username= '" & Text1.Text & "' and password='" & Text2.Text & "' " rs.Open If rs.RecordCount > 0 Then MsgBox "valid user" MDIForm1.Show Else MsgBox ("invalid user") End If rs.Close Unload Me End Sub Private Sub Command2_Click() Unload Me

End Sub Private Sub Form_Load()

Hospital Manageme System

con.Open "dsn" End Sub

MDI FORM:-

Private Sub aboutus_Click() frmAbout.Show End Sub Private Sub admit_Click() Form2.Show End Sub Private Sub charges_Click() DataReport4.Show End Sub Private Sub chargesbill_Click() Form17.Show End Sub Private Sub dentaldepartment_Click() Form12.Show

Hospital Manageme System

End Sub Private Sub discharge_Click(Index As Integer) Form3.Show End Sub Private Sub dischargee_Click() DataReport2.Show End Sub Private Sub doctorsearch_Click() Form5.Show End Sub Private Sub eyedepartment_Click() Form11.Show End Sub Private Sub hospitalpharmacydepartment_Click() Form14.Show End Sub Private Sub labbill_Click() Form16.Show End Sub

Hospital Manageme System

Private Sub log_Click() Form1.Show End Sub Private Sub medicineinfo_Click() Form18.Show End Sub Private Sub Modifyingdoctordetails_Click() Form6.Show End Sub Private Sub newcomingdoctor_Click() Form4.Show End Sub Private Sub orthosurgeon_Click() Form9.Show End Sub

Private Sub pathologydepartment_Click() Form13.Show End Sub

Hospital Manageme System

Private Sub patientreport_Click() DataReport1.Show End Sub Private Sub patientsearch_Click() Form7.Show End Sub Private Sub pharmacybill_Click() Form15.Show End Sub Private Sub physiandepartment_Click() Form10.Show End Sub Private Sub staffinfo_Click() Form19.Show End Sub Private Sub staffreport_Click() DataReport3.Show End Sub

Hospital Manageme System

ADMIT FORM:-

Dim con As New ADODB.Connection Dim rs1 As New ADODB.Recordset Private Sub Command1_Click() If Len(Text6.Text) > 0 And Len(Text1.Text) > 0 And Len(Text2.Text) Len(Text3.Text) Len(Text4.Text) > > > 0 0 0 And And And Len(Combo4.Text) Len(Combo2.Text) Len(Text5.Text) > > > 0 0 0 And And And

Len(Combo3.Text) > 0 Then qry = "insert into table2 values(' " & Text6.Text & " ', ' " & Text1.Text & " ',' " & Text2.Text & " ',' " & Combo4.Text & " ',' " & Text3.Text & " ',' " & Combo2.Text & " ',' " & Text4.Text & " ',' " & Text5.Text & " ',' " & Combo3.Text & " ')" con.Execute qry MsgBox ("Record Save........") Else MsgBox ("Record not save.........") End If

Hospital Manageme System

End Sub Private Sub Command2_Click() Text6.Text = " " Text1.Text = " " Text2.Text = " " Combo4.Text = " " Text3.Text = " " Combo2.Text = " " Text4.Text = " " Text5.Text = " " Combo3.Text = " " End Sub Private Sub Command3_Click() Unload Me End Sub Private Sub Form_Load() con.Open "dsn" Combo4.AddItem "male" Combo4.AddItem "female"

Hospital Manageme System

Combo2.AddItem "amit agarwal" Combo2.AddItem "vandana gupta" Combo2.AddItem "sanjay garg" Combo2.AddItem "ravi adlakha" Combo2.AddItem "yasmeen" Combo2.AddItem "amit kakra" Combo3.AddItem "101" Combo3.AddItem "102" Combo3.AddItem "103" Combo3.AddItem "104" Combo3.AddItem "105" Combo3.AddItem "106" Combo3.AddItem "107" Combo3.AddItem "108" Combo3.AddItem "109" Combo3.AddItem "110" End Sub

DISCHARGE FORM:-

Hospital Manageme System

Dim con As New ADODB.Connection Dim rs1 As New ADODB.Recordset Private Sub Command1_Click() If Len(Text6.Text) > 0 And Len(Text1.Text) > 0 And Len(Text2.Text) Len(Text3.Text) > > 0 0 And And Len(Combo2.Text) Len(Text4.Text) > > 0 0 And And

Len(Text5.Text) > 0 And Len(Combo3.Text) > 0 Then qry = "insert into table3 values(' " & Text6.Text & " ', ' " & Text1.Text & " ',' " & Text2.Text & " ',' " & Combo2.Text & " ',' " & Text3.Text & " ',' " & Text4.Text & " ',' " & Text5.Text & " ',' " & Combo3.Text & " ')" con.Execute qry MsgBox ("Record Save........") Else MsgBox ("Record not save.........") End If End Sub Private Sub Command2_Click()

Hospital Manageme System

Text6.Text = " " Text1.Text = " " Text2.Text = " " Combo2.Text = " " Text3.Text = " " Text4.Text = " " Text5.Text = " " Combo3.Text = " " End Sub Private Sub Command3_Click() Unload Me End Sub

Private Sub Form_Load() con.Open "dsn" Combo2.AddItem "male" Combo2.AddItem "female" Combo3.AddItem "amit agarwal" Combo3.AddItem "vandana gupta"

Hospital Manageme System

Combo3.AddItem "sanjay garg" Combo3.AddItem "ravi adlakha" Combo3.AddItem "yasmeen" Combo3.AddItem "amit kakra" End Sub

NEWCOMING DOCTOR DETAIL FORM:-

Dim con As New ADODB.Connection Dim rs1 As New ADODB.Recordset

Private Sub Command1_Click() If Len(Text1.Text) > 0 And Len(Text2.Text) > 0 And Len(Combo1.Text) Len(Text4.Text) > > 0 0 And And Len(Text3.Text) Len(Text5.Text) > > 0 0 And And

Len(Text6.Text) > 0 And Len(Combo2.Text) > 0 Then qry = "insert into table4 values(' " & Text1.Text & " ', ' " & Text2.Text & " ',' " & Combo1.Text & " ',' " & Text3.Text & " ','

Hospital Manageme System

" & Text4.Text & " ',' " & Text5.Text & " ',' " & Text6.Text & " ',' " & Combo2.Text & " ')" con.Execute qry MsgBox ("Record Save........") Else MsgBox ("Record not save.........") End If End Sub Private Sub Command2_Click() Text1.Text = " " Text2.Text = " " Combo1.Text = " " Text3.Text = " " Text4.Text = " " Text5.Text = " " Text6.Text = "" Combo2.Text = " " End Sub Private Sub Command3_Click()

Hospital Manageme System

Unload Me End Sub Private Sub Form_Load() con.Open "dsn" Combo1.AddItem "male" Combo1.AddItem "female" Combo2.AddItem "orthosurgeon" Combo2.AddItem "physian" Combo2.AddItem "eye" Combo2.AddItem "dental" Combo2.AddItem " pathology" Combo2.AddItem "hospital pharmacy" End Sub

MODIF YING DOCTOR DETAIL FORM:-

Hospital Manageme System

Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset Private Sub Command1_Click() Dim a As Integer, ad As String, ql As String, ex As Integer a = InputBox("enter age") ad = InputBox("enter address") ql = InputBox("Enter qualification") ex = InputBox("enter experience") b = Text1.Text rs.ActiveConnection = con rs.CursorType = 3 rs.LockType = 3 rs.Source = "select * from table5 " rs.Open qry = "update table5 set age='" & a & "',address='" & ad & "',qualification='" & ql & "',experience='" & ex & "' where name='" & b & "'" con.Execute qry

Hospital Manageme System

'rs.Update MsgBox ("record update...") End Sub Private Sub Command2_Click() Text1.Text = " " Text2.Text = " " Text3.Text = " " Text4.Text = " " Text5.Text = " " Text6.Text = " " End Sub Private Sub Command3_Click() Unload Me End Sub

Private Sub Command4_Click() Dim str As String str = InputBox("Enter the doctor name") Set rs.ActiveConnection = con

Hospital Manageme System

rs.CursorType = 3 rs.LockType = 3 rs.Source = "select * from table5 where name='" & str & "'" rs.Open If rs.RecordCount > 0 Then Text1.Text = rs.Fields("name") Text2.Text = rs.Fields("age") Text6.Text = rs.Fields("sex") Text3.Text = rs.Fields("address") Text4.Text = rs.Fields("experience") Text5.Text = rs.Fields("qualification") MsgBox (" record searched...........") 'rs.RecordCount 'con.Close rs.Close Else MsgBox ("record not searched......") End If End Sub

Hospital Manageme System

Private Sub Form_Load() con.Open "dsn" 'rs.ActiveConnection = con 'rs.CursorType = 3 'rs.LockType = 3 'rs.Open "select * from table6" End Sub

DOCTOR SEARCH:-

Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset Private Sub Command1_Click() Dim str As String 'str = InputBox("Enter the doctor name") 'Dim rs1 As New ADODB.Recordset str = InputBox("Enter the doctor name") Set rs.ActiveConnection = con rs.CursorType = 3

Hospital Manageme System

rs.LockType = 3 rs.Source = "select * from table5 where name='" & str & "'" rs.Open If rs.RecordCount > 0 Then Text1.Text = rs.Fields("name") Text2.Text = rs.Fields("age") Text5.Text = rs.Fields("sex") Text3.Text = rs.Fields("address") Text4.Text = rs.Fields("specialization") Text6.Text = rs.Fields("experience") Text7.Text = rs.Fields("qualification") Text8.Text = rs.Fields("department") MsgBox (" record searched...........") 'rs.RecordCount 'con.Close rs.Close Else MsgBox ("record not searched......") End If

Hospital Manageme System

End Sub Private Sub Command2_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" End Sub Private Sub Command3_Click() Unload Me End Sub Private Sub Form_Load() con.Open "dsn" End Sub

PATIENT SEARCH:-

Hospital Manageme System

Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset Private Sub Command1_Click() Dim id As String Dim str As String 'str = InputBox("Enter the doctor name") 'Dim rs1 As New ADODB.Recordset id = InputBox("Enter the patient id") Set rs.ActiveConnection = con rs.CursorType = 3 rs.LockType = 3 rs.Source = "select * from table7 where patient_id='" & id & "'" rs.Open If rs.RecordCount > 0 Then Text6.Text = rs.Fields("patient_id") Text1.Text = rs.Fields("patient_name") Text2.Text = rs.Fields("sex") Text3.Text = rs.Fields("admit_date")

Hospital Manageme System

Text4.Text = rs.Fields("treatment_provided") Text5.Text = rs.Fields("consultant_doctor") MsgBox (" record searched...........") 'rs.RecordCount 'con.Close rs.Close Else MsgBox ("record not searched......") End If End Sub Private Sub Command2_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" End Sub Private Sub Command3_Click()

Hospital Manageme System

Unload Me End Sub Private Sub Form_Load() con.Open "dsn" End Sub

PHARMACY BILL:-

Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset

Private Sub Command1_Click() If Len(Text1.Text) > 0 And Len(Text6.Text) > 0 And Len(Text2.Text) > 0 And Len(Text3.Text) > 0 And

Len(Text4.Text) > 0 Then qry = "insert into table15 values('" & Text1.Text & "' , '" & Text6.Text & "' , '" & Text2.Text & "' , '" & Text3.Text & "' , '" & Text4.Text & "')"

Hospital Manageme System

con.Execute qry MsgBox ("Record Save........") Else MsgBox ("Record not save.........") End If End Sub Private Sub Command2_Click() Unload Me End Sub Private Sub Command3_Click() Text1.Text = " " Text2.Text = " " Text3.Text = " " Text4.Text = " " Text5.Text = " " Text6.Text = " " End Sub Private Sub Form_Load() con.Open "dsn"

Hospital Manageme System

End Sub Private Sub Timer1_Timer() Text5.Text = Date End Sub

LAB BILL:-

Dim con As New ADODB.Connection Dim rs As New ADODB.Recordset Private Sub Command1_Click() Text1.Text = " " Text2.Text = " " Text3.Text = " " Text4.Text = " " End Sub Private Sub Command2_Click() If Len(Text1.Text) > 0 And Len(Text2.Text) > 0 And Len(Text3.Text) > 0 And Len(Text4.Text) > 0 Then

Hospital Manageme System

qry = "insert into table16 values('" & Text1.Text & "' , '" & Text2.Text & "' , '" & Text3.Text & "' , '" & Text4.Text & "')" con.Execute qry MsgBox ("Record Save........") Else MsgBox ("Record not save.........") End If End Sub Private Sub Command3_Click() Unload Me End Sub

Private Sub Form_Load() con.Open "dsn" End Sub

CHARGES BILL:-

Hospital Manageme System

Dim con As New ADODB.Connection Dim rs As ADODB.Recordset Private Sub Command1_Click() Dim a As Integer Dim b As Integer Dim c As Integer Dim d As Integer Dim e As Integer Dim f As Integer Dim g As Integer Dim h As Integer a = Text1.Text b = Text2.Text c = Text3.Text d = Text4.Text e = Text5.Text f = Text6.Text g = Text7.Text

Hospital Manageme System

h=b+c+d+e+f+g Label8.Visible = True Text8.Visible = True Text8.Text = h If Len(Text1.Text) > 0 And Len(Text2.Text) > 0 And Len(Text3.Text) Len(Text5.Text) > > 0 0 And And Len(Text4.Text) Len(Text6.Text) > > 0 0 And And

Len(Text7.Text) > 0 And Len(Text8.Text) > 0 Then qry = "insert into table17 values(' " & Text1.Text & " ',' " & Text2.Text & " ' , ' " & Text3.Text & " ' , ' " & Text4.Text & " ' ,' " & Text5.Text & " ' , ' " & Text6.Text & " ' , ' " & Text7.Text & " ',' " & Text8.Text & " ')" con.Execute qry MsgBox ("Record saved.........") Else MsgBox ("Record not save.........") End If End Sub Private Sub Command2_Click()

Hospital Manageme System

Unload Me End Sub Private Sub Command3_Click() Text1.Text = "" Text2.Text = "" Text3.Text = "" Text4.Text = "" Text5.Text = "" Text6.Text = "" Text7.Text = "" Text8.Text = "" End Sub

Private Sub Form_Load() con.Open "dsn" Label8.Visible = False Text8.Visible = False End Sub

Hospital Manageme System

MEDICINE INFORMATION:Dim con As New ADODB.Connection Dim rs1 As New ADODB.Recordset Private Sub Command1_Click() If Len(Text1.Text) > 0 And Len(Combo1.Text) > 0 And Len(Text2.Text) > 0 And Len(Text3.Text) > 0 And

Len(Text4.Text) > 0 Then qry = "insert into table18 values(' " & Text1.Text & " ', ' " & Combo1.Text & " ',' " & Text2.Text & " ',' " & Text3.Text & " ',' " & Text4.Text & " ')" con.Execute qry MsgBox ("Record Save........") Else MsgBox ("Record not save.........") End If End Sub Private Sub Command2_Click() Text1.Text = " " Text2.Text = " "

Hospital Manageme System

Text3.Text = " " Text4.Text = " " Combo1.Text = " " End Sub Private Sub Command3_Click() Unload Me End Sub Private Sub Form_Load() con.Open "dsn" Combo1.AddItem "Capsule" Combo1.AddItem "Syrup" End Sub

STAFF INFORMATION:-

Dim con As New ADODB.Connection Dim rs1 As New ADODB.Recordset Private Sub Command1_Click()

Hospital Manageme System

If Len(Text1.Text) > 0 And Len(Text2.Text) > 0 And Len(Combo1.Text) > 0 And Len(Text4.Text) > 0 And

Len(Text5.Text) > 0 Then qry = "insert into table19 values(' " & Text1.Text & " ',' " & Text2.Text & " ',' " & Combo1.Text & " ',' " & Text4.Text & " ',' " & Text5.Text & " ')" con.Execute qry MsgBox ("Record Save........") Else MsgBox ("Record not save.........") End If End Sub Private Sub Command2_Click() Text1.Text = " " Text2.Text = " " Text5.Text = " " Text4.Text = " " Combo1.Text = " " End Sub

Hospital Manageme System

Private Sub Command3_Click() Unload Me End Sub Private Sub Form_Load() 'con.Open "dsn" Combo1.AddItem "male" Combo1.AddItem "female" End Sub

Hospital Manageme System

CONCLUSION

Hospital Manageme System

CONCLUSION
The HOSPITAL MANAGEMENT SYSTEM is a great improvement over the manual system using case fields and paper. The computerization of the system has sped up the process. In the current system, the front office managing is very slow. The hospital managing system was thoroughly checked and tested with dummy data and thus is found to be very reliable.

ADVANTAGES

It is fast, efficient and reliable Avoids data redundancy and inconsistency Very user-friendly Easy accessibility of data Number of personnel required is considerably less Provides more security and integrity to data

Hospital Manageme System

FUTURE ENHANCEMENTS

The proposed system is Hospital Management System. We can enhance this system by including more facilities like billing system, inpatient room allotment for the admitted patients and the stock details of medicines in the pharmacy.

Providing such features enable the users to include more comments into the system.

Hospital Manageme System

BIBLIOGRAPHY

Hospital Manageme System

BIBLIOGRAPHY
*Using Visual Basic 6.0 By Brain Silar & jeff Spotts * Mastering in Visual Basic 6.0 By Evangelos Petroutsos * Visual Basic 5.0 in 21 Days By Nathan Gurewich & Ori Gurewich * Even Programming With Visual Basic By Aptech Certified Course * Fundamental Of Software Engineering By Rajib Mall

Hospital Manageme System

You might also like