full doc- hospital management

106
INTRODUCTION Hospital are the essential part of our lives, providing best medical facilities to people suffering from various ailments, which may be due to change in climatic conditions, increased work-load, emotional trauma stress etc. It is necessary for the hospitals to keep track of its day-to-day activities & records of its patients, doctors, nurses, ward boys and other staff personals that keep the hospital running smoothly & successfully. But keeping track of all the activities and their records on paper is very cumbersome and error prone. It also is very inefficient and a time-consuming process Observing the continuous increase in population and number of people visiting the hospital. Recording and maintaining all these records is highly unreliable, inefficient and error-prone. It is also not economically & technically feasible to maintain these records on paper. Thus keeping the working of the manual system as the basis of our project. We have developed an automated version of the manual system, named as “Hospital Management System”. The main aim of our project is to provide a paper-less hospital up to 90%. It also aims at providing low-cost reliable automation of the existing systems. The system also provides excellent security of data at every level of user-system interaction and also provides robust & reliable storage and backup facilities.

Upload: gokul-krishnan

Post on 14-Sep-2015

24 views

Category:

Documents


8 download

DESCRIPTION

full description if hospital management

TRANSCRIPT

INTRODUCTIONHospital are the essential part of our lives, providing best medical facilities to people suffering from various ailments, which may be due to change in climatic conditions, increased work-load, emotional trauma stress etc. It is necessary for the hospitals to keep track of its day-to-day activities & records of its patients, doctors, nurses, ward boys and other staff personals that keep the hospital running smoothly & successfully.But keeping track of all the activities and their records on paper is very cumbersome and error prone. It also is very inefficient and a time-consuming process Observing the continuous increase in population and number of people visiting the hospital. Recording and maintaining all these records is highly unreliable, inefficient and error-prone. It is also not economically & technically feasible to maintain these records on paper.Thus keeping the working of the manual system as the basis of our project. We have developed an automated version of the manual system, named as Hospital Management System.The main aim of our project is to provide a paper-less hospital up to 90%. It also aims at providing low-cost reliable automation of the existing systems. The system also provides excellent security of data at every level of user-system interaction and also provides robust & reliable storage and backup facilities.

OBJECTIVES OF THE SYSTEM:The project Hospital management system is aimed to develop to maintain the day to-day state of admission/discharge of patients, list of doctors, reports generation, and etc.It is designed to achieve the following objectives:1. To computerize all details regarding patient details & hospital details.2. Scheduling the appointment of patient with doctors to make it convenient for both.3. Scheduling the services of specialized doctors and emergency properly so that facilities provided by hospital are fully utilized in effective and efficient manner.4. If the medical store issues medicines to patients, it should reduce the stock status of the medical store and vice-versa.5. It should be able to handle the test reports of patients conducted in the pathology lab of the hospital.6. The inventory should be updated automatically whenever a transaction is made.7. The information of the patients should be kept up to date and there record should be kept in the system for historical purposes.

Existing System:In the current system, an attendance register is maintained at the front-office and employees enter their in and out times. The HR department does the attendance and leave calculation manually at the end of each month. This increases the paper work and makes the record maintenance tedious.DISADVANTAGES 1) Maintenance of attendance is complicated and its time consuming.2) The files and shelves occupy a lot of physical space.3) It includes lot of paper work.4) Documents may be misplaced and lost.5) Data is manually collected and processed to produce any report.6) Searching and maintaining employee record is complicated and slow.

Proposed system: The drawbacks, which are faced during existing system, can be Eradicated by using the proposed system. The main objective of the existing system is to provide a user-friendly interface. The system, which is proposed, now computerizes all the details that are maintained manually. Once the details are fed into the computer there is no need for various persons to deal with separate sections. Only a single person is enough to maintain all the reports. The security can also be given as per the requirement of the users.BENEFITS OF THE PROPOSED SYSTEM Large volumes of data can be stored with case.

Security is assured.

Maintenance of file is flexible.

Records stored are updated now and then.

Stored data and procedures can be easily edited.

Reports can be generated with case.

Accurate calculations are made.

Less manpower required.

ENVIRONMENTAL SPECIFICATIONSoftware specification

Platform:Microsoft Windows XPFront - End:VB .NetBack - End :SQL serverEnvironment:Microsoft Visual Studio .Net 2005

Hardware specification

Processor: Pentium IVRAM:1 GBMonitor:15 colorHard Disk:80 GBCD Drive:LG 52xKeyboard:LogitechMouse:Logitech

PLATFORM VB.NETMany people have looked at VB.NET and grumbled about the changes. There are significant changes to the language: a new optional error handling structure, namespaces, true inheritance, free threading, and many others. Some see these changes as merely a way that Microsoft can place a check mark next to a certain feature and is able to say, Yeah, we do that. However, there are good reasons for the changes inVB.NET.

At this point, you might be tempted to think that SOAP is all you need, and that you can just stick with VB6. Therefore it is important to understand what VB.NET gives you, and why it makes sense for you, and many other developers, to upgrade to .NET. For example, you create components and want them to be callable via SOAP, but how do you let people know that those components exist? .NET includes a discovery mechanism that allows you to find components that are available to you. Building Web Services with VB.NET. .NET also provides many other features, such as garbage collection for freeing up resources, true inheritance for the first time, debugging that works across languages and against running applications, and the ability to create Windows services and console applications. Before proceeding, its important to understand a little bit more about what is meant by .NET.

There are many .NETs here. There is VB.NET, which is the new version of Visual Basic. There is Visual Studio.NET, an Integrated Development Environment that hosts VB.NET, C#, and C++.NET. Underlying all this is the .NET Framework and its core execution engine, the Common Language Runtime. In the .NET model, you write applications that target the .NET Framework. This gives them automatic access to such benefits as garbage collection (which destroys objects and reclaims memory for you), debugging, security services, inheritance, and more. When you compile the code from any language that supports the .NET Framework, it compiles into something called MSIL, or Microsoft Intermediate Language. This MSIL file is binary, but it is not machine code; instead, it is a format that is platform independent and can be placed on any machine running the .NET Framework. Within the .NET Framework is a compiler called the Just-In-Time, or JIT, compiler. It compiles the MSIL down to machine code specific to that hardware and operating system.In looking at the fundamental changes, its important to understand that the number one feature request from Visual Basic developers, for years, has been inheritance. VB has had interface inheritance since VB4, but developers wanted real or implementation inheritance. Why? What are the benefits? The main benefit of inheritance is the ability to create applications more quickly. This is an extension of the promise of component design and reusability. With implementation inheritance, you build a base class and can inherit from it, using it as the basis for new classes. For example, you could create a Vehicle class that provides basic functionality that could be inherited in both a Bicycle class and a Car class. The important point here is that Bicycle and Car inherit the functionality, or the actual code, from the Vehicle class. In VB4, the best you could do was inherited the structure, minus any implementation code. In VB.NET, the functionality in that base class is available to your other classes as is, or you can extend and modify it as necessary.

.NET provides you with integrated debugging tools. If youve ever debugged an ASP application that had VB COM components, you know that you had to use Visual InterDev to debug the ASPs and VB to debug the components. If you also had C++ components in the mix, you had to use the C++ debugger on those components. With .NET, there is one debugger. Any language that targets the .NET Framework can bedebugged with that single debugger, even if one part of your application is written in VB.NET and calls another part written in C# (pronounced C-Sharp), or any other language built to target the .NET Framework.

.NET supplies a standard security mechanism, available to all parts of your application. .NET provides a possible solution to DLL Hell, and removes much of the complexity of dealing with COM and the registry. .NET allows you to run components locally, without requiring the calling application to go to the registry to find components.There are also things that VB.NET can do that you cannot do today in VB. For example, Web Applications are a new form of project. Gone is Visual InterDev with its interpreted VBScript code. Instead, you now build your ASP.NET pages with VB.NET (or C# or C++), and they are truly compiled for better performance. VB.NET lets you create Windows services natively for the first time by providing a Windows Ser vices project type. And yes, VB.NET lets VB developers build truly free-threaded components and applications for the first time.The .NET Framework is a collection of services and classes. It exists as a layer between the applications you write and the underlying operating system. This is a powerful concept: The .NET Framework need not be a Windows-only solution. The .NET Framework could be moved to any operating system, meaning your .NET applications could be run on any operating system hosting the .NET Framework. This means that you could achieve true cross-platform capabilities simply by creating VB.NET applications, provided the .NET Framework was available for other platforms. Although this promise of cross-platform capability is a strong selling point to .NET, there has not yet been any official announcement about .NET being moved to other operating systems.In addition, the .NET Framework is exciting because it encapsulates much of the basic functionality that used to have to be built into various programming languages. The .NET Framework has the code that makes Windows Forms work, so any language can use the built-in code in order to create and use standard Windows forms. In addition, Web Forms are part of the framework, so any .NET language could be used to create Web Applications. Additionally, this means that various programming elements will be the same across all languages; a Long data type will be the same size in all .NET languages. This is even more important when it comes to strings and arrays. No longer will you have to worry about whether or not a string is a BStr or a CStr before you pass it to a component written in another language.

The Common Language RuntimeOne of the major components of the .NET Framework is the Common Language Runtime, or CLR. The CLR provides a number of benefits to the developer, such as exception handling, security, debugging, and versioning and these benefits are available to any language built for the CLR. This means that the CLR can host a variety of languages, and can offer a common set of tools across those languages. Microsoft has made VB, C++, and C# premier languages for the CLR, which means that these three languages fully support the CLR. In addition, other vendors have signed up to provide implementations of other languages, such as Perl, Python, and even COBOL.

When a compiler compiles for the CLR, this code is said to be managed code. Managed code is simply code that takes advantage of the services offered by the CLR. For the runtime to work with managed code, that code must contain metadata. This metadata is created during the compilation process by compilers targeting the CLR. The metadata is stored with the compiled code and contains information about the types, members, and references in the code. Among other things, the CLR uses this metadata to

Locate classes Load classes Generate native code Provide security

The runtime also handles object lifetimes. Just as COM/COM+ provided reference counting for objects, the CLR manages references to objects and removes them from memory when all the references are gone, through the process known as garbage collection. Although garbage collection actually gives you slightly less control than you had in VB, you gain some important benefits. For example, your errors should decrease because the number of objects that end up hanging around due to circular references should be reduced or completely eliminated. In addition, garbage collection ends up being much faster than the old way of destroying objects in VB. Instances of objects you create that are managed by the runtime are called managed data. You can interact with both managed and unmanaged data in the same application, although managed data gives you all the benefits of the runtime. The CLR defines a standard type system to be used by all CLR languages. This means that all CLR languages will have the same size integers and longs, and they will all have the same type of string no more worrying about BStrs and CStrs! This standard type system opens up the door for some powerful language interoperability. For example, you can pass a reference of a class from one component to another, even if those components are written in different languages. You also can derive a class in C# from a base class written in VB.NET, or any other combination of languages targeted to the runtime. Dont forget that COM had a set of standard types as well, but they were binary standards. This meant that with COM, you had language interoperability at run time. With .NETs type standard, you have language interoperability at design time.Managed ExecutionTo understand how your VB.NET applications work, and just how much the code differs from the VB code that Dorothy wrote in Kansas, its important to understand managed code and how it works. To use managed execution and get the benefits of the CLR, you must use a language that was built for, or targets, the runtime. Fortunately for you, this includes VB.NET. In fact, Microsoft wanted to make sure that VB.NET was a premier language on the .NET platform, meaning that Visual Basic could no longer be accused of being a toy language.The runtime is a language-neutral environment, which means that any vendor can create a language that takes advantage of the runtimes features. Different compilers can expose different amounts of the runtime to the developer, so the tool you use and the language in which you write might still appear to work somewhat differently. The syntax of each language is different, of course, but when the compilation process occurs, all code should be compiled into something understandable to the runtime.Microsoft Intermediate Language (MSIL)One of the more interesting aspects of .NET is that when you compile your code, you do not compile to native code. Before you VB developers panic and fear that you are returning to the days of interpreted code, realize that the compilation process translates your code into something called Microsoft intermediate language, which is also called MSIL or just IL. The compiler also creates the necessary metadata and compiles it into the component. This IL is CPU independent. After the IL and metadata are in a file, this compiled file is called the PE, which stands for either portable executable or physical executable, depending on whom you ask. Because the PE contains your IL and metadata, it is therefore self-describing, eliminating the need for a type library or interfaces specified with the Interface Definition Language (IDL).The Just-In-Time CompilerYour code does not stay IL for long, however. It is the PE file, containing the IL that can be distributed and placed with the CLR running on the .NET Framework on any operating system for which the .NET framework exists, because the IL is platform independent. When you run the IL, however, it is compiled to native code for that platform. Therefore, you are still running native code; you are not going back to the days of interpreted code at all. The compilation to native code occurs via another tool of the .NET Framework: the Just-In-Time (JIT) compiler. With the code compiled, it can run within the Framework and take advantage of low level features such as memory management and security.The compiled code is native code for the CPU on which the .NET Framework is running, meaning that you are indeed running native code instead of interpreted code. A JIT compiler will be available for each platform on which the .NET Framework runs, so you should always be getting native code on any platform running the .NET Framework. Remember, today this is just Windows, but this could change in the future.

ClassesMost Visual Basic developers are familiar with classes. Classes are definitions or blueprints of objects that will be created at runtime. Classes define the properties, methods, fields, and events of objects. If the term fields are new to you, it simply means public variables exposed by the class; fields are the lazy way to do properties.Together, properties, methods, fields, and events are generically called members of the class. If a class has one or more methods that do not contain any implementation, the class is said to be abstract. In VB.NET, you cannot instantiate abstract classes directly; instead, you must inherit from them. In VB6, it was possible to create a class that was just method definitions and then to use the Implements keyword to inherit the interface. You could actually instantiate the interface in VB6, but because it did not have any implementation code, there was no point in doing so. In VB.NET, you can create a class that has implementation code instead of just the interface, and then mark the class as abstract. Now, other classes can inherit from that abstract class and use the implementation in it or override the implementation as needed.These are new concepts to VB developers. In the past, VB had only interface inheritance, but VB.NET has real inheritance, known as implementation inheritance In VB.NET, interfaces are separate from classes. In VB6, you created interfaces by creating classes with method definitions, but no implementation code inside those methods. You will see more on interfaces in the next section, but realize that although a VB.NET class can implement any number of interfaces, it can inherit from only one base class.This will be examined in more detail throughout the book. Classes have a number of possible characteristics that can be set, and that are stored in the metadata. In addition, members can have characteristics. These characteristics include such items as whether or not the class or member is inheritable.

InterfacesInterfaces in VB.NET are like the interfaces in previous versions of VB: They are definitions of a class without the actual implementation. Because there is no implementation code, you cannot instantiate an interface, but must instead implement it in a class. There is one exception to the no implementation code in an interface rule: In VB.NET, you can define what are called static members. These can have implementation code.Value TypesIn .NET languages, a standard variable type, such as an integer, is native to the language, and it is passed by value when used as an argument. Objects, on the other hand, are always passed by reference. However, a value type is a user-defined type that acts much like an object, but is passed by value. In reality, value types are stored as primitive data types, but they can contain fields, properties, events, and both static and nonstatic methods. Value types do not carry the overhead of an object that is being held in memory. If this seems confusing, think about enums. Enumerations are a special type of value type. An enum simply has a name and a set of fields that define values for a primitive data type. Enums, however, cannot have their own properties, events, or methods.DelegatesDelegates are a construct that can be declared in a client. The delegate actually points to a method on a particular object. Which method it points to on which object can be set when the instance of the delegate is created at declaration. This allows you to define calls to various methods in different objects based on logic in your code. Delegates are most often used to handle events. Using delegates, you can pass events to a centralized event handler. Due to the small size of this book, delegates will not be examined in more detail.

The .NET Framework Class LibraryThe .NET Framework provides a number of types that are already created and ready for use in any language that targets the Common Language Runtime. These types include such items as the primitive data types, I/O functions, data access, and .NET Framework security. Perhaps one of the biggest changes in the way developers will work with VB.NET is the entire area of namespaces. .NET Framework provides a host of utility classes and members, organized within a hierarchy called a namespace. At the root of the hierarchy is the System namespace. A namespace groups classes and members into logical nodes. This way, you can have the same name for a method in more than one namespace. The Left() method could therefore exist in the System.Windows.Forms namespace and the Microsoft.VisualBasic namespace.Self-Describing ComponentsIn traditional VB, compiled components created a type library that attempted to define what was in the component as far as classes, interfaces, properties, methods, and events. Communication occurred through a binary interface at the COM level. Unfortunately, one language could expect as parameters data types or structures that are not available to other languages, or that are at least difficult to implement. For example, C++ components often expect pointers or structures to be passed in, and this could be problematic if the calling program is written in Visual Basic. The .NET Framework attempts to solve this by compiling additional data into all assemblies. This additional data is called metadata and allows compiled components to interact seamlessly. Couple this with a common type system so that all runtime-compatible languages share the same types, and you can see that cross-language compatibility is enhanced.

Cross-Language InteroperabilityIf youve been building COM components for a while, you know that one of the great promises of COM is that it is language independent. If you build a COM component in C++, you can call it from VB, and vice versa. However, to reach that point, your code had to be compiled to a COM standard. Much of this was hidden from the VB developer, but your component had to implement the IUnknown and IDispatch interfaces.

Without these interfaces, they would not have been true COM components. COM is only giving you cross-language interoperability at the binary level, however. This means that you can only take advantage of this interoperability at run time. Now, however, the CLR gives you much better language interoperability. Not only can you inherit classes from one PE written in language A and use them in language B, but debugging now works across components in multiple languages.

This way, you can step through the code in a PE written in C# and jump to the base class that was written in VB.NET. This means that your cross-language interoperability is happening at design time and run time, not just the run time given to you by COM. In addition, you can raise an error (now called an exception) in one language and have it handled by a component in another language. This is significant because now developers can write in the language with which they are most comfortable, and be assured that others writing in different languages will be able to easily use their components.

The CatchThis all sounds great, and you are probably getting excited about the possibilities. There is a catch, however: To make use of this great cross-language interoperability, you must stick to only those data types and functions common to all the languages. If youre wondering just how you do that, the good news is that Microsoft has already thought about this issue and set out a standard, called the Common Language Specification, or CLS. If you stick with the CLS, you can be confident that you will have complete interoperability with others programming to the CLS, no matter what languages are being used. Not very creatively, components that expose only CLS features are called CLS-compliant components. To write CLS-compliant components, you must stick to the CLS in these key areas:

The public class definitions must include only CLS types. The definitions of public members of the public classes must be CLS types. The definitions of members that are accessible to subclasses must be CLS types. The parameters of public methods in public classes must be CLS types. The parameters of methods that are accessible to subclasses must be CLS types.

These rules talk a lot about definitions and parameters for public classes and methods. You are free to use non-CLS types in private classes, private methods, and local variables. Even if you have a public class that you want to be CLS compliant, the implementation code inside that class does not have to be CLS compliant; as long as the definition is compliant, you are safe. The CLS is still in flux, but the basics are well established.

Code Access Security (CAS)This security does not control who can access the code; rather, it controls what the code itself can access. This is important because it allows you to build components that can be trusted to varying degrees. If you build a VB component today and want to perform database access, you are free to call ADO and connect to a database (provided, of course, that you have a valid user ID and password). With .NET, however, you can actually specify, with the tools in the .NET Framework, what actions your component can and, more importantly, cannot perform. This has the benefit of preventing others from using the code in ways that you did not intend. Perhaps the main benefit of CAS is that you can now trust code that is downloaded from the Internet. Security can be set up so that it becomes impossible for the code to perform any mischievous actions. This would prevent most of the macro viruses that are spread via e-mail today.If you examine the Visual Basic project types, youll see that many of them are different from what you are used to with VB6. Some of the major project types are

Windows Application This is a standard executable, in VB6 terminology. It is the way to create applications with a Windows interface, using forms and controls. This is as close to your fathers VB as youll get in VB.NET.

Class Library This project type allows you to create classes that will be used in other applications. Think of it as similar to the COM components that you have been building, which VB6 called the ActiveX DLL and ActiveX EXE project types.

Windows Control Library This project type is for creating what used to be called ActiveX controls. This type allows you to create new controls to be used in Windows applications.

Web Application Goodbye, Visual InterDev. Goodbye, server-side, interpreted scripting languages for Active Server Pages. Visual Basic now has Web Application projects, which use ASP.NET to create dynamic Web applications. These projects allow you to create HTML, ASP.NET, and VB files. You will now code your Web applications using a powerful, event-driven model instead of the request/response model.

Web Service If youve used VB6 to create COM components and then made them available over HTTP with SOAP, you understand the concept of Web Services. Web Service projects are components that you make available to other applications via the Web; the underlying protocol is HTTP instead of DCOM, and you pass requests and receive responses behind the scenes using XML. Some of the major promises of Web Services are that they are all standards- based and are platform independent. Unlike DCOM, which was tied to a COM (that is, Windows) infrastructure, Web Service projects can be placed on any platform that supports .NET, and can then be called by any application using just the HTTP protocol.

Web Control Library As with Web Service projects, theres no exact match back in VB6 for the Web Control Library projects. Thanks to the new Web Application projects in VB.NET, you can add controls to Web pages just as you would in a standard Windows Application project, but VB.NET makes them HTML controls at runtime. You can design your own controls that can then be used by Web applications.

Console Application Many of the Windows administrative tools are still console (or command-line, or DOS) applications. Previously, you didnt have a good way to create console applications in VB, and instead had to rely on C++. Now, console applications are natively supported by VB.NET.

Windows Service As with console applications, there was no good way to create Windows services in previous versions of VB. Windows services, of course, are programs that run in the background of Windows, and can automatically start when the machine is booted, even if no one logs in. Those are the basic types of applications you can create. You can also create an Empty project (for Windows applications, class libraries, and services) or an empty Web Application (for Web applications).Windows Application EnhancementsVisual Studio.NET has added a variety of features to VB.NET to make the IDE more powerful and to enhance the functionality of Windows forms. There is improved support for features such as building menus, automatically adjusting to changes in the size of the text to display, better anchoring of controls for resized windows, and a much-improved mechanism for setting the tab order.Resizing Controls AutomaticallyYou can set certain controls to resize automatically based on what they need to display. This is easy to examine with a simple label. Open the Toolbox and add a label to your form. Drag it over to the left side of the form, so that it is not in line with the button.

IDE ChangesThere are numerous IDE changes. Several of those have been addressed already: the lack of the Line and Shape controls, the new menu builder, the new way of setting the tab order, and the Dynamic Help window. There are many other changes, such as the debugging windows.New ItemsIn addition to changes to the core language and some of the tools, there are some completely new features to VB.NET. The major new items include such features as constructors and destructors, namespaces, inheritance, overloading, free threading, and garbage collection. This is not an exhaustive list by any means, but these six features are worth discussing to one degree or another. One feature that should be mentioned as well is something youve seen before: auto-indention. As soon as you create a block, such as a Sub or If block, the IDE indents the next line of code automatically.Constructors and DestructorsConstructors and destructors are potentially new concepts for VB programmers. They are similar to the Class Initialize and Class Terminate events you have had with classes. At their simplest level, constructors and destructors are procedures that control the initialization and destruction of objects, respectively. The procedures Sub New and Sub Destruct replace the VB6 Class_Initialize and Class_Terminate methods. Unlike Class_Initialize, Sub New runs only once, when the object is first created. Sub New cannot be called explicitly except in rare circumstances. Sub Destruct is called by the system when the object is set to nothing or all references to the object are dropped. However, you cannot ensure when Sub Destruct actually will be called, thanks to the way VB.NET does garbage collection, One of the reasons for constructors is that you can create an object and pass in some initialization parameters. For example, assume that you want to create a class dealing with a training course, and you want to initialize the class with a course number so that it can retrieve certain information from a database. In your class, you create a Sub New method that accepts an argument for the course ID. The first line inside the Sub New is a call to another constructor, usually the constructor of the base class on which this class is based. Fortunately, VB.NET gives you an easy way to call the constructor of the base class for your current class: MyBase.New. If you want to create a class for training course and initialize it with a course ID.InheritanceThe most-requested feature in VB for years has been inheritance. Microsoft often countered that VB did inheritance; VB did interface inheritance, which meant that you could inherit (what VB called implement) an interface. However, the interface you implemented did not have any code in it, or if it did, the code was ignored.

Therefore, the class implementing the interface had to provide methods for all the Methods in the interface, and the code had to be rewritten in each class that implemented the interface. VB developers wanted to be able to write that code once, in a base class, and then to inherit that class in other classes, which would then be called derived classes. The derived classes should be able to use the existing code in the base class. With VB.NET, developers have their wish. Not only does your derived class inherit the properties and methods of the base class, it can extend the methods and, of course, create new methods (in the derived class only). Derived classes can also override any existing method in the base class with a new method of the same name, in a process called overriding. Forms, which are really just classes, can be inherited to create new forms. There are many concepts to inheritance.OverloadingOverloading is another feature that some VB developers have been requesting for a long time. In short, overloading allows you to define the same procedure multiple times. The procedure has the same name but a different set of arguments each time. You could fake this in an ugly way in VB6. You could pass in an argument as a Variant, and then use the VarType command to check the type of variable that was passed in. This was cumbersome, and the code could get nasty if your procedure had to accept an array or a collection.Free ThreadingFor the first time, VB.NET has given VB developers the ability to write truly free threaded applications. If your application is going to perform a task that could take a long time, such as parsing through a large recordset or performing a complex series of mathematical calculations, you can push that processing off to its own thread so that the rest of your application is still accessible. In VB6, , the best you could do to keep the rest of the application from appearing to be locked was to use the DoEvents method.Examine this code, which is written for VB.NET. Here you have some code for button4. This code calls the BeBusy routine, which has a loop in it to just to take up time. However, while in this loop, you are consuming the thread for this application, and the UI will not respond while the loop is running.Creating Your First Class LibraryTo see how to build your first class library, start Visual Studio.NET and from the Start Page, click Create New Project. From the New Project dialog box, choose Visual Basic Projects in the Project Types list box, and then choose Class Library in the Templates list box. Name the project Healthcare and click the OK button. At this point, a new class is created for you.

The first thing you might notice is that the class does not have a designer by default, making it different from most VB.NET application types. Instead, you start with basically the same thing you had in VB6: an empty class. Right now, you have one class, named Class1.Here is where things start to diverge from VB6. In VB6, you had one class per class module, and these were compiled into a single component. Class modules had a. CLS extension. In VB.NET, your Module has a .VB extension, and a single source code file can contain more than one class. One or more source code files can be compiled into an assembly. You can create a new class at any time using the Class...End Class block.Parameterized PropertiesIt is possible to create a parameterized property. Using the example of a patient, consider that a patient is likely to have several physicians attending to him at any one time. Therefore, although your Healthcare class library might have a Physician class, the Patient will likely hold a collection of Physician objects. You would be able to access this collection through a parameterized property and walk through this collection.Creating a parameterized property is fairly straightforward: You simply add a parameter to the property procedure.Compiling the AssemblyNow that you have created a class library with two classes (Patient and Physician), it is time to compile your assembly. In VB6, you would compile a COM component, but you arent in VB6 anymore. Instead, you are writing for the .NET Framework, and that means you will be compiling an assembly. The assembly might have a .DLL extension, but it is not a traditional DLL in the Windows API sense, nor is it a COM DLL in the VB6 sense.Building the assembly is fairly easy. The build option is no longer on the File menu, but is now a separate menu labeled Build. If you click on the Build menu, you willsee several choices. Because you have a solution in this example, with a class library (Healthcare) and Windows application (HealthcareClient), you will see options to build or rebuild the solution. You also have an option to deploy the solution. In the next section of the Build menu, you have the option to build or rebuild one of the projects in the solution, depending on which project is highlighted in the solution explorer when you click the menu. Finally, there is a choice for a batch build and one for the Configuration Manager.In .NET, you can compile your assemblies in either Debug or Release mode, or you can create your own custom modes. Debug mode compiles in symbolic debug information and does not use any compiler optimizations. Release mode does not compilein any of the symbolic debug information, and it applies code optimizations. Obviously, you will use Debug mode while developing and debugging your application. After you have the bugs worked out and are ready to deploy the application, you switch to Release mode and recompile your assembly. Realize that you can modify these modes or add your own. For example, you could add debug information into projects compiled under Release mode, if you chose to modify Release mode in that fashion.You can see that the Debug option is set if you look at the toolbar. The Solutions Configuration drop-down list box allows you to choose Debug or Release, and to open the Configurations Manager.For now, just click on the Healthcare project one time in the Solution Explorer window. This will select it as the project to build if you choose not to build the entire solution. Now, click on the Build menu and choose Build Healthcare. The Output window at the bottom of the IDE should report when the build is done, and show how many projects succeeded, how many failed, and how many were skipped. In this case, the HealthcareClient is not counted as skipped, so you should see that one project succeeded, with no failures and no projects skipped.

Accessing a DatabaseVB.NET includes a number of new controls for accessing data from your application. You can see this in action by creating a new Windows Application project in VB.NET and naming it LearningVBdata. Click on the Toolbox and notice that there is a Data tab at the top. Click on the Data tab, and you will see a series of controls as shown in In the past, controls dragged from the Toolbox and dropped on the form were shown on the form.

In VB.NET, however, controls that do not have a visual interface appear in the component tray, a window below the form. This is where the majority of your data controls will appear when added to a form.

There is a second option for data access that helps separate things and keeps them a little cleaner. You can use components, or forms without a visual part; these are classes with a designer. All your forms can share these components.

Thus, you can have a single component thats responsible for all the data access in your project and your forms can connect to it. This is the model you will follow in the next few pages. Select Add New Item from the Project menu and double-click the Component Class icon. This will add a new component, named Component1, to your project.ADO.NETSo far, all your programming has revolved around displaying data on a form. This has been accomplished by binding controls to a DataSet. Other than the navigation code you wrote in the previous example, you havent had to code against the ADO.NET objects. Obviously, you need to work against these objects when you start using ADO.NET in components, where you no longer have a user interface. Therefore, it is important to understand something about the ADO.NET controls and how they work.About ADO.NETADO.NET uses a disconnected architecture to operate. The reason for this is that traditional applications that maintained an open database connection did not scale well. If a component opened a connection to the database and held it open for the lifetime of the application, it consumed expensive database resources, when the connection probably was needed for only a small percentage of that time.As the number of users grows, the overhead of the database connections can begin to affect the database performance negatively. Therefore, Microsoft decided to use a disconnected architecture for ADO.NET. This not only solves the problems with scalability by reducing the number of active connections, it makes it much easier to transfer data from one component to another. You do not need to have both components connected to the database, nor do you have to have them both understand some binary format of the data, as you will see in a moment.Additionally, Microsoft recognized that in much programming today, you basically have a disconnected application architecture, thanks to the Web. Think of a typical Web application: The user requests a page and the page is generated on the server, with a mix of HTML and data from the database. By the time the page is sent back to the user and rendered in his browser, the connection to the database is no longer needed. Therefore, if it takes one second to render a page but the user views it fortwenty-nine seconds, a database connection is needed for only one-thirtieth of the total time the page is used. If you still need to use a connected architecture, Microsoft recommends you use ADO. ADO.NET is inherently disconnected, so ADO is still a better approach if you need a continuous connection to the underlying database.

XML IntegrationAs you are aware, XML is currently the big thing. Everyone is talking about XML, even if they arent quite doing it yet. The idea behind XML is to provide a way to transfer structured or relational information in a text-only format. Beyond that, though, the data is self-describing and easy to manipulate into a different format. XML is seen as the ideal way for businesses to pass data back and forth. Microsoft has made most of .NET XML based, and that is clearly evident with the inclusion of two classes: XmlReader and XmlWriter. Microsoft has created two objects to implement these two classes, called XmlTextReader and XmlTextWriter. These classes can be found in the System.Xml namespace. Working together, .NET and ADO.NET can read or write data in the same manner, whether it is XML or relational data.Microsoft has created an XmlDataDocument object to tie relational data from a DataSet with the XML Document Object Model (DOM). If you need to work with XML, the XmlDataDocument can load either relational or XML data and manipulate it. If the XmlDataDocument is loading relational data, it uses a DataSet as its source. After the relational data is loaded by the XmlDataDocument, it is accessed using the .NET XML classes and functions. One of the things that .NET will do for you is validate your XML against an XML schema. If you arent familiar with an XML schema, heres your one-paragraph crash course: Just as your database has a schema that defines the tables, columns, constraints, and so forth, an XML schema defines the structure of an XML document to make sure that the document is properly formed. This way, you can share the schema with others and when they get an XML document from you, they can compare it to the schema. Pretty soon, if everyone starts using the same schemas, you have universal DataFormats. It isnt quite the universal language translator from Star Trek, but its a step in the right direction for businesses that need to share data across disparate systems.

FEASIBILITY STUDY

Depending on the results of the initial investigation the survey is now expanded to a more detailed feasibility study. FEASIBILITY STUDY is a test of system proposal according to its workability, impact of the organization, ability to meet needs and effective use of the resources. It focuses on these major questions:

1. What are the users demonstrable needs and how does a candidate system meet them?2. What resources are available for given candidate system?3. What are the likely impacts of the candidate system on the organization?4. Whether it is worth to solve the problem?

During feasibility analysis for this project, following primary areas of interest are to be considered. Investigation and generating ideas about a new system does this.

Steps in feasibility analysis

Eight steps involved in the feasibility analysis are:

Form a project team and appoint a project leader. Prepare system flowcharts. Enumerate potential proposed system. Define and identify characteristics of proposed system. Determine and evaluate performance and cost effective of each proposed system. Weight system performance and cost data. Select the best-proposed system. Prepare and report final project directive to management.3.1) Technical feasibility

A study of resource availability that may affect the ability to achieve an acceptable system. This evaluation determines whether the technology needed for the proposed system is available or not.

Can the work for the project be done with current equipment existing software technology & available personal? Can the system be upgraded if developed? If new technology is needed then what can be developed?This is concerned with specifying equipment and software that will successfully satisfy the user requirement. The technical needs of the system may include:

Front-end and back-end selection

An important issue for the development of a project is the selection of suitable front-end and back-end. When we decided to develop the project we went through an extensive study to determine the most suitable platform that suits the needs of the organization as well as helps in development of the project.

The aspects of our study included the following factors.

Front-end selection:

1. It must have a graphical user interface that assists employees that are not from ITbackground.2. Scalability and extensibility.3. Flexibility.4. Robustness.5. According to the organization requirement and the culture.6. Must provide excellent reporting features with good printing support.7. Platform independent.8. Easy to debug and maintain.9. Event driven programming facility.10. Front end must support some popular back end like Ms Access. According to the above stated features we selected VB6.0 as the front-end for developing our project.Back-end Selection:

1. Multiple user support.

2. Efficient data handling.

3. Provide inherent features for security.

4. Efficient data retrieval and maintenance.

5. Stored procedures.

6. Popularity.

7. Operating System compatible.

8. Easy to install.

9. Various drivers must be available.

10. Easy to implant with the Front-end.

According to above stated features we selected Ms-Access as the backend.The technical feasibility is frequently the most difficult area encountered at this stage. It is essential that the process of analysis and definition be conducted in parallel with an assessment to technical feasibility. It centers on the existing computer system(hardware, software etc.) and to what extent it can support the proposed system.

3.2) Economical feasibility

Economic justification is generally the Bottom Line consideration for most systems. Economic justification includes a broad range of concerns that includes cost benefit analysis. In this we weight the cost and the benefits associated with the candidate system and if it suits the basic purpose of the organization i.e. profit making, the project is making to the analysis and design phase.

The financial and the economic questions during the preliminary investigation are verified to estimate the following:

The cost to conduct a full system investigation.The cost of hardware and software for the class of application being considered.

The benefits in the form of reduced cost.

The proposed system will give the minute information, as a result the performance is improved which in turn may be expected to provide increased profits.

This feasibility checks whether the system can be developed with the available funds. The Hospital Management System does not require enormous amount of money to be developed. This can be done economically if planned judicially, so it is economically feasible. The cost of project depends upon the number of man- hours required.

3.3) Operational Feasibility

It is mainly related to human organizations and political aspects. The points to be considered are:

What changes will be brought with the system? What organization structures are disturbed? What new skills will be required? Do the existing staff members have these skills? If not, can they be trained in due course of time?The system is operationally feasible as it very easy for the End users to operate it. It only needs basic information about Windows platform.

3.4) Schedule feasibility

Time evaluation is the most important consideration in the development of project. The time schedule required for the developed of this project is very important since more development time effect machine time, cost and cause delay in the development of other systems.

A reliable Hospital Management System can be developed in the considerable amount of time.SYSTEM DESIGNDATA FLOW DIAGRAM

ER DIAGRAM

INPUT DESIGNThe Input Design is the main feature of the system. Input design determines the format and validations criteria for data entering the system. Inputs originate with end-users; human factors play a significant role in input design. The input design is designed to control the input, to avoid delay, errors in data, to avoid extra steps, to keep the process simple.The following are the general principals, which are considered in designing inputs. Enter only variable data Do not input data that can be calculated List of values Sequence entry

Completeness CheckThis checks whether the important fields have been keyed or not. For example the Document number, which is required field for any entry, if it is not entered by the user than message should be raised that the Field must be entered. Insisting the user to enter value for the field and by user from accessing the other fields without entering it. The following are the forms: Supplier Details Purchase details Sales details Stock in Stock out

DATABASE DESIGN The goal of database design is to generate a set of relations that allows storing information easily. The database is designed in relational model in which the data are organized into entities and relational between them. In our flow diagrams, we have given names to data flows, process and data stores. Although the names are descriptive of the data, they do not give details. So the following DFD gives the details of the fields used. A data dictionary has many advantages in improving analyst of user communication by establishing consistent definitions of terms elements and procedures.

1. Login Table:-

Field NameData TypeDescription

User_NameText

PasswordText

Hint_QuestionText

Hint_AnswerText

User_TypeText

2. Patient Detail Table:-

Field NameData TypeDescription

Registration_NoText

Registration_DateDate/Time

NameText

AddressText

CityText

TelePhone_Mobile_NoText

Marital_StatusText

ReligionText

GenderText

Father_Husband_NameText

3. Patient Diagnosis Table:-

Field NameData TypeDescription

Dignosis_NoText

Registration_NoText

Dignosis_DateDate/Time

Provisional_DignosisText

RemarkText

BioChemistryYes/No

StoolYes/No

BloodYes/No

ColonoscopyYes/No

GastroscopyYes/No

UrineYes/No

XRayYes/No

SONOGRAPHYYes/No

OthersText

Reconsultation_Advice_WeekTextWeek Wise

Reconsultation_Advice_DateDate/Time

FINAL_DiagnosisText

ECGYes/No

4. Patient Diet Advice Table:-

Field NameData TypeDescription

Dignosis_NoText

Diet_AdviceText

5. Patient Medicine Table:-

Field NameData TypeDescription

Dignosis_NoText

Medicine_NoNumber

Medicine_NameText

PrecautionTextMedicine Related HindiWords

No_of_DosesNumber

SYSTEM TESTING AND IMPLEMENTATIONSYSTEM TESTING

System testing is the process of exercising software with the intent of finding and ultimately correcting errors. This fundamental philosophy does not change for web applications, because Web-based systems and application reside on a network and interoperate with many different operating system, browsers, hardware platforms, and communication protocols; the search for errors represents a significant challenge for web application.The distributed nature of client/server environments, the performance issues associated with transaction processing, the potential presence of a number of different hardware platforms, the complexities of network communication, the need to serve multiple clients from a centralized database and the requirements imposed on the server all combine to make testing of client\server architectures.TESTING ISSUES

Client GUI considerations Target environment and platform diversity considerations Distributed database considerations Distributed processing considerations

Testing Methodologies:System testing is the state of implementation, which is aimed at ensuring that the system works accurately and efficiently as expect before live operation commences. It certifies that the whole set of programs hang together. System testing requires a test plan that consists of several key activities and steps for run program, string, system and user acceptance testing. The implementation of newly designed package is important in adopting a successful new system. Testing is an important stage in software development. The system test in implementation stage in software development. The system test in implementation should be confirmation that all is correct and an opportunity to show the users that the system works as expected. It accounts the largest percentage of technical effort in the software development process. Testing phase in the development cycle validates the code against the functional specification. Testing is vital to the achievement of the system goals. The objective of testing is to discover errors. To fulfill this objective a series of test step unit, integration, validations and system tests were planned and executed. Testing Objectives:Testing is a process of executing a program with the intent of finding an error.A good test case is one that has a high probability of finding on as yet undiscovered error.A successful test is one that uncovers on as yet undiscovered error.

The above objectives imply a change in view. They move counter to the commonly held view that a successful list is one in which no errors are found. Any engineered product can be listed in one of two ways1. Knowing the specified function that a product has been designed to perform tests can be conducted to demonstrate each function is fully operational.

2. Knowing the internal workings of a product, tests can be conducted to ensure that all gear mesh that is, the internal operation of the product performs according to specification and all internal components have been adequately exercised.Types of testing1. Unit Testing2. Integration Testing3. Validation Testing4. Output Testing5. User acceptance Testing6. System Testing:-

(i) Unit Testing :-All modules were tested and individually as soon as they were completed were checked for there correct functionality. Unit testing is carried out by verify and recover errors within the boundary of the smallest unit or a module. In this testing step, each module was found to be working satisfactory per the expected output of the module. In the package development, each module is tested separately after it has been completed and checked with valid data.Unit testing exercise specific paths in the modules control structure to maximum error detection.

(ii) Integration Testing :- The entire project was split into small programs; each of these 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 constructions were used. It give a lot of problem by not functioning in an integrated manner.The user interface testing is important since the user has to declare that the arrangements made in the frames are convenient and it is satisfied. When the frames are the test, the end user gave suggestion. Since they where much exposed to do the work manually.

(iii) 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 functions in a manner that can be reasonably accepted by the customer.

(iv) Output Testing:-After performing the validation testing the next step is output testing of the proposed system. Since the system cannot be useful if it does not produce the required output.Asking the users about the format in which the system is required tests the output displayed or generated by the system under consideration. Here the output format is considered in two ways. One is on screen and another one is printed format. The output format on the screen is found to be corrected as the format was designed in the system phase according to the user needs. And for the hardcopy the output comes according to the specifications requested by the user. Here the output testing does not result in any correction in the system.(v) User Acceptance Testing:- User acceptance testing of the system is the key factor the success of any system. The system under consideration is tested for user acceptance by constantly keeping in touch with prospective system at the time of development and making change whenever required. This is done with regard to the input screen design and output screen design. (v) System Testing:-This is to verify that all the system elements have been properly integrated and perform allocated functions. Testing is executing a program to test the logic changes made in it and with intention of finding errors. Tests are also conducted to find discrepancies between system and its original objective, current specification and documents.Quality AssuranceQuality assurance consists of the auditing and reporting functions of management. The goal of quality assurance is to provide management with the data necessary to be informed about product quality, thereby gaining insight and confidence that product quality is meeting its goal.

Quality Assurance GoalsCorrectnessThe extent to which the program meets system specifications and user objectives. ReliabilityThe degree to which the system performs its intended functions overtime.EfficiencyThe amount of computer resources required by a program to perform a function.Usability The effort required learning and operating a system.Maintainability To use with which program errors are located and corrected.TestabilityThe effort required testing a program to ensure its correct performance.Portability The ease of transporting a program from one hardware configuration to another.Accuracy The required position in input editing, computations and output.

SYSTEM IMPLEMENTATION

Implementation ProceduresImplementation phase is the last phase regarding any system development, before any system is implemented various tests are performed the system is reviewed thoroughly. The changeover selected is used to change the existing system to the new proposed system. In this phase, the system enters the operation and routine maintenance stage.Operation DocumentationThis system is developed in such a way that the existing system facilities are enough for implementation.The hardware facilities are sufficient enough to implement the developed system.The system has been successfully implemented in the organization with full co-operation of the management. The users assume their respective responsibilities. User TrainingThis software is being implemented on parallel basis with the ole manual system. As this new system is more users friendly and fast, the users get more accustomed with it. This reduces the usage of the old manual system by and by the old system is eliminated while the new system establishes itself. By following this method if there are any deformities in the system, it can be easily corrected by comparing with the old system.Physical Interaction:Along with the need to visually refine the system there is also a need to improve the user physical interaction with it. Since the tasks necessary to complete analysis with three-dimensionally referenced data are complex, it will require the development of expressly designed interaction techniques. The ideal interface is undetectable and unobtrusive to users while they maintain involvement in task completion. Unfortunately, analysis and understanding excavation site and associated physical evidence, creates specific needs not often addressed by generalized user interface techniques. For example, without control of the scale of the environment and movement in the system, the user must navigate over a full-scale representation of this monumental site, a daunting task. This method is based on the assumption that users need to be able to navigate exactly as they do in the real world. Unless the user is quite familiar with the site, its easy to get lost. We have integrated a WIM (world in miniature), interface for navigation which allows the user to access a small version of the site to help make choices about areas to focus on at larger scales. This model helps acquaint the user with the overall site plan. Once the user has chosen an area to focus on, he/she is automatically transferred to the full-scale model for a more detailed exploration. After the user is transported to an area to examine he/she can begin moving and interacting with excavation data via a mouse and pinch glove. The mouse is used to move, select and turn objects on and off. The glove can be used to access a virtual widget to initiate queries of six different bulk finds. Queries and Analysis Our main goal in developing the Archave system is to provide a simple format for displaying excavation data whereby remote users could come to many of the same conclusions archaeologists arrive at during excavation procedures. This was to be accomplished by allowing users to investigate and manipulate artifact and site data at close range and perform a variety of queries for analysis. The system currently allows users to search for six types of bulk finds and a full range of special artifacts in seventeen trenches. As the user navigates in the model at full-scale, queries can be performed to show each of the six types of bulk finds as clusters in defined trenches. Users can navigate through the model to examine it with variable concentrations ofartifacts. They can also ask to see special finds in the same context to try and establish relationships between the two artifact types. Our initial tests with the system have shown that it is fairly easy for the user to identify key areas with simple query commands. By doing a variety of queries with the six types of bulk find data, its possible to see where excavation areas relate with the architectural finds and where important loci in each trench are located. Issues: Currently, the user cannot access enough realistic data about special finds to use them for dating areas and relating them to bulk finds. We posit that providing the user with a special find model hyper linked to a database with additional data about the object will provide the user with enough information to make educated conclusions. Also, in performing flexible queries with the site data represented in a cluster format we encountered several problems. The initial site model with trenches fairly stresses the processing speeds for the cave hardware since it is essentially polygon and texture intensive. Merging the additional polygons from the bulk finds increases overall polygon counts even more, making processing time longer and affecting the frame rates users experience. With the model running at low frame rates (2-3 frames per second compared to normal rates of 30+), users will notice jerky movement during navigation, which will affect both their performance during analysis tasks, and their level of comfort in the virtual environment. As stated earlier, in developing the Archave system, we are attempting to provide archaeologists with an alternative way of doing analysis with site data and to compare methods used in a VR environment with traditional analysis methods. We have concluded that there are several key areas in need of additional development to provide users with fluid interaction and navigation in the system and access to all essential finds in those areas being investigated. The immediate goal is to provide users with a natural way to investigate the site, architecture, trenches and artifacts, much like they might experience during excavation and analysis of the objects found. To accomplish this in a VR environment such as the cave, we need to improve existing tools for fluid navigation and comfortable interaction with the data. We must also provide access to additional, more detailed information (such as special find data) needed to make conclusions in the system. Although we generally feel that the Archave system is still a working model it is an early effort to push VR applications away from strict visualizations and into research driven vehicles for advanced analysis. The standard archaeological method provides a rich record for high-level analysis to occur and VR can provide a significant test-bed for advanced forms of analysis not heretofore available. Current tendencies to implement VR for reconstruction and visualization need not be the only use for this technology

CONCLUSION

The project Hospital Management System (HMS) is for computerizing the working in a hospital. The software takes care of all the requirements of an average hospital and is capable to provide easy and effective storage of information related to patients that come up to the hospital.

It generates test reports; provide prescription details including various tests, diet advice, and medicines prescribed to patient and doctor. It also provides injection details and billing facility on the basis of patients status whether it is an indoor or outdoor patient.

The system also provides the facility of backup as per the requirement.

BIBLIOGRAPHY

BOOKS REFERRED1. More VB6.0 (Teach Yourself)- Lowell Mauer2. Guide to VB 6.0 - Peter Norton, Michael Groh3. Fundamentals of Database System- Ramez Shamkant B Navathe 4. Complete Guide to SQL server - Peter Norton, Jill T. Freeze, Wayne S. Freeze

WEBSITE REFERRED

www.dotnetspider.comwww.dotnetguide.comwww.planetsourcecode.com

SCREENS

SOURCE CODE

Public Class clsCheckInternetConnection

#Region "InternetGetConnectedStateEx function" Private Declare Function InternetGetConnectedStateEx Lib "wininet.dll" Alias "InternetGetConnectedStateExA" _ (ByRef lpdwFlags As Long, _ ByVal lpszConnectionName As String, _ ByVal dwNameLen As Long, ByVal dwReserved As Long) As Boolean

''''''''''''CONSTANT's''''''''''''''' 'Internet connection VIA Proxy server. Public Const ProxyConnection As Integer = &H4S 'Modem is busy. Public Const ModemConnectionIsBusy As Integer = &H8S 'Internet connection is currently Offline Public Const InternetIsOffline As Integer = &H20S 'Internet connection is currently configured Public Const InternetConnectionIsConfigured As Integer = &H40S 'Internet connection VIA Modem. Public Const ModemConnection As Integer = &H1S 'Remote Access Server is installed. Public Const RasInstalled As Integer = &H10S 'Internet connection VIA LAN. Public Const LanConnection As Integer = &H2S

''''''''''''''VARIABLES''''''''''''' Public CntType As Long, CntName As String = Space(50), CntNameLen As Long = 50 Dim Status As Boolean '''''''''''''''FUNCTIONS''''''''''''''' Public Function IsConnected() As Boolean 'Returns true if there is any internet connection. IsConnected = InternetGetConnectedStateEx(CntType, CntName, CntNameLen, 0) End Function

Public Function IsLanConnection() As Boolean Dim dwflags As Integer 'return True if LAN connection Status = InternetGetConnectedStateEx(CntType, CntName, CntNameLen, 0) IsLanConnection = CntType And LanConnection And Status End Function

Public Function IsModemConnection() As Boolean Dim dwflags As Integer

'return True if modem connection. Status = InternetGetConnectedStateEx(CntType, CntName, CntNameLen, 0) IsModemConnection = CntType And ModemConnection And Status End Function

Public Function IsProxyConnection() As Boolean Dim dwflags As Integer 'return True if connected through a proxy. Call InternetGetConnectedStateEx(CntType, CntName, CntNameLen, 0) IsProxyConnection = CntType And ProxyConnection End Function

Public Function IsRasInstalled() As Boolean Dim dwflags As Integer 'return True if RAS installed. Call InternetGetConnectedStateEx(CntType, CntName, CntNameLen, 0) IsRasInstalled = CntType And RasInstalled End Function#End Region

End Class

Imports System.Data.OleDb

Public Class frmBed Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New() MyBase.New()

'This call is required by the Windows Form Designer. InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub

'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents btnOK As System.Windows.Forms.Button Friend WithEvents txtGeneralWard As System.Windows.Forms.TextBox Friend WithEvents txtSpecialWard As System.Windows.Forms.TextBox Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Private Sub InitializeComponent() Me.Panel1 = New System.Windows.Forms.Panel() Me.btnOK = New System.Windows.Forms.Button() Me.txtGeneralWard = New System.Windows.Forms.TextBox() Me.txtSpecialWard = New System.Windows.Forms.TextBox() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.Panel1.SuspendLayout() Me.SuspendLayout() ' 'Panel1 ' Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.Panel1.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnOK, Me.txtGeneralWard, Me.txtSpecialWard, Me.Label2, Me.Label1}) Me.Panel1.Name = "Panel1" Me.Panel1.Size = New System.Drawing.Size(352, 206) Me.Panel1.TabIndex = 0 ' 'btnOK ' Me.btnOK.FlatStyle = System.Windows.Forms.FlatStyle.System Me.btnOK.Location = New System.Drawing.Point(134, 140) Me.btnOK.Name = "btnOK" Me.btnOK.Size = New System.Drawing.Size(72, 32) Me.btnOK.TabIndex = 3 Me.btnOK.Text = "OK" ' 'txtGeneralWard ' Me.txtGeneralWard.Location = New System.Drawing.Point(214, 76) Me.txtGeneralWard.Name = "txtGeneralWard" Me.txtGeneralWard.TabIndex = 2 Me.txtGeneralWard.Text = "" ' 'txtSpecialWard ' Me.txtSpecialWard.Location = New System.Drawing.Point(214, 28) Me.txtSpecialWard.Name = "txtSpecialWard" Me.txtSpecialWard.TabIndex = 1 Me.txtSpecialWard.Text = "" ' 'Label2 ' Me.Label2.Location = New System.Drawing.Point(38, 84) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(160, 24) Me.Label2.TabIndex = 6 Me.Label2.Text = "Enter beds for General ward " ' 'Label1 ' Me.Label1.Location = New System.Drawing.Point(38, 28) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(152, 32) Me.Label1.TabIndex = 5 Me.Label1.Text = "Enter beds for Special ward " ' 'frmBed ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.LightGray Me.ClientSize = New System.Drawing.Size(352, 206) Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Panel1}) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "frmBed" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Bed Information" Me.Panel1.ResumeLayout(False) Me.ResumeLayout(False)

End Sub

#End Region

#Region "All button code"

Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click If txtSpecialWard.Text = "" Or txtGeneralWard.Text = "" Then MessageBox.Show("You should fill both fields.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)

Else Dim save_Constr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\hm.mdb;" Dim save_Comstr As String Dim save_Con As OleDbConnection Dim save_Com As OleDbCommand Dim save_DA As OleDbDataAdapter Dim save_DS As DataSet Dim save_DT As DataTable

save_Comstr = "insert into flag(setflag)values" & _ ("(" + "'" + "1" + "'" + ")")

save_Con = New OleDbConnection(save_Constr) save_Com = New OleDbCommand(save_Comstr, save_Con)

save_DA = New OleDbDataAdapter(save_Comstr, save_Constr) Dim save_builder As New OleDbCommandBuilder(save_DA)

save_DS = New DataSet()

Try save_DA.Fill(save_DS, "hm") MsgBox("Flag set successfully.", MsgBoxStyle.Information, "Register Patient") Catch ex As Exception MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) Exit Sub End Try save_Con.Close()

'code for filling the General bed in Generalward table Dim saveGeneralBed_Constr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\hm.mdb;" Dim saveGeneralBed_Comstr As String Dim saveGeneralBed_Con As OleDbConnection Dim saveGeneralBed_Com As OleDbCommand Dim saveGeneralBed_DA As OleDbDataAdapter Dim saveGeneralBed_DS As DataSet Dim saveGeneralBed_DT As DataTable

Dim General_begining As Integer Dim General_ending As Integer = txtGeneralWard.Text

For General_begining = 1 To General_ending Me.Cursor = Cursors.WaitCursor

txtGeneralWard.Text = General_begining saveGeneralBed_Comstr = "insert into generalward(bedno)values" & _ ("(" + "'" + txtGeneralWard.Text + "'" + ")")

saveGeneralBed_Con = New OleDbConnection(saveGeneralBed_Constr) saveGeneralBed_Com = New OleDbCommand(saveGeneralBed_Comstr, saveGeneralBed_Con)

saveGeneralBed_DA = New OleDbDataAdapter(saveGeneralBed_Comstr, saveGeneralBed_Constr) Dim saveGeneralBed_builder As New OleDbCommandBuilder(saveGeneralBed_DA)

saveGeneralBed_DS = New DataSet()

Try saveGeneralBed_DA.Fill(saveGeneralBed_DS, "hm") 'MsgBox("Bed capacity filled in setbed record.", MsgBoxStyle.Information, "Register Patient") Catch ex As Exception MsgBox(ex.Message) End Try Me.Cursor = Cursors.Arrow Next

'code for filling the General bed in Specialward table Dim saveSpecialBed_Constr As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\hm.mdb;" Dim saveSpecialBed_Comstr As String Dim saveSpecialBed_Con As OleDbConnection Dim saveSpecialBed_Com As OleDbCommand Dim saveSpecialBed_DA As OleDbDataAdapter Dim saveSpecialBed_DS As DataSet Dim saveSpecialBed_DT As DataTable

Dim Special_begining As Integer Dim Special_ending As Integer = txtSpecialWard.Text

For Special_begining = 1 To Special_ending Me.Cursor = Cursors.WaitCursor

txtSpecialWard.Text = Special_begining saveSpecialBed_Comstr = "insert into Specialward(bedno)values" & _ ("(" + "'" + txtSpecialWard.Text + "'" + ")")

saveSpecialBed_Con = New OleDbConnection(saveSpecialBed_Constr) saveSpecialBed_Com = New OleDbCommand(saveSpecialBed_Comstr, saveSpecialBed_Con)

saveSpecialBed_DA = New OleDbDataAdapter(saveSpecialBed_Comstr, saveSpecialBed_Constr) Dim saveSpecialBed_builder As New OleDbCommandBuilder(saveSpecialBed_DA)

saveSpecialBed_DS = New DataSet()

Try saveSpecialBed_DA.Fill(saveSpecialBed_DS, "hm") 'MsgBox("Bed capacity filled in setbed record.", MsgBoxStyle.Information, "Register Patient") Catch ex As Exception MsgBox(ex.Message) End Try

Me.Cursor = Cursors.Arrow Next Me.Hide() Dim objfrmMain As New frmMain() objfrmMain.Show() End If End Sub#End Region

End Class

Imports System.Data.OleDb

Public Class frmBill Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New() MyBase.New()

'This call is required by the Windows Form Designer. InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub

'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Label13 As System.Windows.Forms.Label Friend WithEvents txtBedCharge As System.Windows.Forms.TextBox Friend WithEvents btnEditRegistration As System.Windows.Forms.Button Friend WithEvents Label6 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents txtPatiname As System.Windows.Forms.TextBox Friend WithEvents txtRegno As System.Windows.Forms.TextBox Friend WithEvents Label11 As System.Windows.Forms.Label Friend WithEvents GrpBox_Patibill As System.Windows.Forms.GroupBox Friend WithEvents GB_PatientBillView As System.Windows.Forms.GroupBox Friend WithEvents LV_PatiBillView As System.Windows.Forms.ListView Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents Label4 As System.Windows.Forms.Label Friend WithEvents txtTotBedcharge As System.Windows.Forms.TextBox Friend WithEvents Label5 As System.Windows.Forms.Label Friend WithEvents txtOthercharge As System.Windows.Forms.TextBox Friend WithEvents txtTotalbill As System.Windows.Forms.TextBox Friend WithEvents Label7 As System.Windows.Forms.Label Friend WithEvents txtBedCategory As System.Windows.Forms.TextBox Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox Friend WithEvents btnCustomprint As System.Windows.Forms.Button Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox Friend WithEvents btnSearch As System.Windows.Forms.Button Friend WithEvents btnExcel As System.Windows.Forms.Button Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox Friend WithEvents btnDelete As System.Windows.Forms.Button Friend WithEvents DTP_date As System.Windows.Forms.TextBox Friend WithEvents DTP_DOD As System.Windows.Forms.TextBox Private Sub InitializeComponent() Me.GrpBox_Patibill = New System.Windows.Forms.GroupBox() Me.GroupBox3 = New System.Windows.Forms.GroupBox() Me.btnDelete = New System.Windows.Forms.Button() Me.btnEditRegistration = New System.Windows.Forms.Button() Me.txtBedCategory = New System.Windows.Forms.TextBox() Me.Label7 = New System.Windows.Forms.Label() Me.txtTotalbill = New System.Windows.Forms.TextBox() Me.txtOthercharge = New System.Windows.Forms.TextBox() Me.Label5 = New System.Windows.Forms.Label() Me.txtTotBedcharge = New System.Windows.Forms.TextBox() Me.Label4 = New System.Windows.Forms.Label() Me.Label3 = New System.Windows.Forms.Label() Me.Label13 = New System.Windows.Forms.Label() Me.txtBedCharge = New System.Windows.Forms.TextBox() Me.Label6 = New System.Windows.Forms.Label() Me.Label2 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label() Me.txtPatiname = New System.Windows.Forms.TextBox() Me.txtRegno = New System.Windows.Forms.TextBox() Me.Label11 = New System.Windows.Forms.Label() Me.DTP_date = New System.Windows.Forms.TextBox() Me.DTP_DOD = New System.Windows.Forms.TextBox() Me.GB_PatientBillView = New System.Windows.Forms.GroupBox() Me.LV_PatiBillView = New System.Windows.Forms.ListView() Me.GroupBox1 = New System.Windows.Forms.GroupBox() Me.btnCustomprint = New System.Windows.Forms.Button() Me.GroupBox2 = New System.Windows.Forms.GroupBox() Me.btnSearch = New System.Windows.Forms.Button() Me.btnExcel = New System.Windows.Forms.Button() Me.GrpBox_Patibill.SuspendLayout() Me.GroupBox3.SuspendLayout() Me.GB_PatientBillView.SuspendLayout() Me.GroupBox1.SuspendLayout() Me.GroupBox2.SuspendLayout() Me.SuspendLayout() ' 'GrpBox_Patibill ' Me.GrpBox_Patibill.Controls.AddRange(New System.Windows.Forms.Control() {Me.GroupBox3, Me.txtBedCategory, Me.Label7, Me.txtTotalbill, Me.txtOthercharge, Me.Label5, Me.txtTotBedcharge, Me.Label4, Me.Label3, Me.Label13, Me.txtBedCharge, Me.Label6, Me.Label2, Me.Label1, Me.txtPatiname, Me.txtRegno, Me.Label11, Me.DTP_date, Me.DTP_DOD}) Me.GrpBox_Patibill.Location = New System.Drawing.Point(32, 8) Me.GrpBox_Patibill.Name = "GrpBox_Patibill" Me.GrpBox_Patibill.Size = New System.Drawing.Size(456, 368) Me.GrpBox_Patibill.TabIndex = 6 Me.GrpBox_Patibill.TabStop = False Me.GrpBox_Patibill.Text = "Patient Bill Detail" ' 'GroupBox3 ' Me.GroupBox3.Controls.AddRange(New System.Windows.Forms.Control() {Me.btnDelete, Me.btnEditRegistration}) Me.GroupBox3.Location = New System.Drawing.Point(296, 32) Me.GroupBox3.Name = "GroupBox3" Me.GroupBox3.Size = New System.Drawing.Size(136, 152) Me.GroupBox3.TabIndex = 78 Me.GroupBox3.TabStop = False Me.GroupBox3.Text = "Transaction" ' 'btnDelete ' Me.btnDelete.FlatStyle = System.Windows.Forms.FlatStyle.System Me.btnDelete.Location = New System.Drawing.Point(24, 104) Me.btnDelete.Name = "btnDelete" Me.btnDelete.Size = New System.Drawing.Size(88, 32) Me.btnDelete.TabIndex = 3 Me.btnDelete.Text = "Delete" ' 'btnEditRegistration ' Me.btnEditRegistration.FlatStyle = System.Windows.Forms.FlatStyle.System Me.btnEditRegistration.Location = New System.Drawing.Point(24, 40) Me.btnEditRegistration.Name = "btnEditRegistration" Me.btnEditRegistration.Size = New System.Drawing.Size(88, 32) Me.btnEditRegistration.TabIndex = 2 Me.btnEditRegistration.Text = "Save" ' 'txtBedCategory ' Me.txtBedCategory.Location = New System.Drawing.Point(144, 160) Me.txtBedCategory.Name = "txtBedCategory" Me.txtBedCategory.ReadOnly = True Me.txtBedCategory.TabIndex = 5 Me.txtBedCategory.Text = "" ' 'Label7 ' Me.Label7.Location = New System.Drawing.Point(24, 288) Me.Label7.Name = "Label7" Me.Label7.TabIndex = 76 Me.Label7.Text = "Total Bill" ' 'txtTotalbill ' Me.txtTotalbill.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.txtTotalbill.Location = New System.Drawing.Point(144, 288) Me.txtTotalbill.Name = "txtTotalbill" Me.txtTotalbill.ReadOnly = True Me.txtTotalbill.TabIndex = 8 Me.txtTotalbill.Text = "" ' 'txtOthercharge ' Me.txtOthercharge.Location = New System.Drawing.Point(144, 256) Me.txtOthercharge.Name = "txtOthercharge" Me.txtOthercharge.TabIndex = 1 Me.txtOthercharge.Text = "" ' 'Label5 ' Me.Label5.Location = New System.Drawing.Point(24, 256) Me.Label5.Name = "Label5" Me.Label5.TabIndex = 73 Me.Label5.Text = "Other Charge" ' 'txtTotBedcharge ' Me.txtTotBedcharge.Location = New System.Drawing.Point(144, 224) Me.txtTotBedcharge.Name = "txtTotBedcharge" Me.txtTotBedcharge.ReadOnly = True Me.txtTotBedcharge.TabIndex = 7 Me.txtTotBedcharge.Text = "" ' 'Label4 ' Me.Label4.Location = New System.Drawing.Point(24, 224) Me.Label4.Name = "Label4" Me.Label4.TabIndex = 71 Me.Label4.Text = "Total Bed Charge" ' 'Label3 ' Me.Label3.Location = New System.Drawing.Point(24, 128) Me.Label3.Name = "Label3" Me.Label3.TabIndex = 69 Me.Label3.Text = "Discharge Date" ' 'Label13 ' Me.Label13.Location = New System.Dra