+ All Categories
Home > Documents > PATIENT_BILLING_SOFTWARE1-rk project

PATIENT_BILLING_SOFTWARE1-rk project

Date post: 08-Apr-2018
Category:
Upload: parul-taneja
View: 217 times
Download: 0 times
Share this document with a friend

of 152

Transcript
  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    1/152

    Project Report

    On Patient Billing Software

    Submitted in partial fulfillment of the requirementsFor the award of the degree of

    Post Graduate DiplomaIn

    Information Technology

    Submitted byPankaj Batra:

    SYMBIOSIS CENTER FOR DISTANCE LEARNING

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    2/152

    TABLE OF CONTENTS

    1. Study of Existing System and System Requirements

    What is the existing system? Define its scope. How the existing system works? What are the issues/problems with the existing system? How are you going to improve on the issues/problems with the existing

    System?

    2. Analysis

    Context diagram Data flow diagram (Level I, II, III) Functional decomposition Diagram

    3. Design

    ER diagram Data dictionary Table design Input forms design Report Layouts

    4. Coding Quality of code Input data validations Quality of report

    1 Introduction:

    The basic problem with existing hospital management system is that manual operation is still going on invarious hospitals. About 75% of the government hospitals use manual operating system for maintaining therecords, however in some hospitals computerized system is used but it is not up to the mark. The basic

    problems are: Improper maintenance of records Time management problem Unfulfillment of user requirements

    The main objective for the creation of this project is to fulfill the basic needs of its users. It will keep proper records and maintain a proper working environment for the users. It will eradicate time management

    problems and enhance the performance of the system. This system is used to reduce the manual work of thestaff thus increasing the efficiency of the existing work flow.

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    3/152

    Patient Billing System helps to keep track of patients charges consumption and helps to keep track andevaluate patients bills.The hospital can computerize its system so that a clear picture of patients reports and charges are alwaysavailable and the patient can make use of facilities provided by hospital in proper way in future.

    1.1 Objective: The Software is for the automation of Hospital Management.Main purpose of the proposed system is to:

    1. Decreasing the manual work while maintaining the reliability.2. Generation of desired information about patient and doctors.3. To make the hectic billing system fast and easy.

    4. To prevent unauthorized access to system.5. To provide facility for editing information and password.

    2.1 Tools and Enviroment Used:

    Hardware Requirement Estimation: -The proposed configuration is best for daily maintenance of the record.

    Hardware components Proposed configuration Alternative 1 Alternative 2

    Processor Intel Pentium-III(1.1GHZ)

    Intel Pentium-IV(1.3GHZ)

    Intel Pentium-IV(1.5GHZ)

    Cache memory 512KB L2 256KB L2 512KB L2Bus speed 256MHZ 400MHZ 512MHZ

    Motherboard Intel 810EChipset

    Intel 833EChipset

    Intel 440EChipset

    Hard disk drive Seagate 40GBSCSI hard drive

    Seagate 20GBSCSI hard drive

    20GBUltra 160SCSIharddrive

    Random access memory 256MB 128MB 64MB

    CD-ROM 30X CD-ROM 24X CD-ROM 40X CD-ROMFloppyDisk Drive 1.44MB 3.5Diskette

    drive1.44MB 3.5Diskettedrive

    1.44MB 3.5Diskettedrive

    Keyboard 104 key 104key 104 keyMouse 2-Button easy mouse 3-Button scroll

    Mouse2-Buttoneasy mouse

    Power supply 5KVA (UPS) 5KVA (UPS) 5KVA (UPS)VDU (visual display unit) 15(SVGA MONITOR) 14(SVGA MONITOR) 17(SVGA MONITOR)

    Printer NLQ dot matrix printer HLQ laser printer NLQ dot matrix printer

    Sound card PCI sound card PCI sound card PCI sound cardSpeaker Normal

    500watt Normal650watt

    Normal900watt

    Other: Printing and Backup Media.

    Software Requirements: -

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    4/152

    Operating System DatabaseWin-98, Win-XP, Linux or any other higher version Ms Access

    Technologies to be used:

    Db2-DatabaseEclipse: Development toolRational-Design ToolWAS Web Server

    2.2 Process Model Chosen:

    The process model which is chosen is the Water Fall Model. It is so because it is a sequential softwaredevelopment model (a process for the creation of software) in which development is seen as flowingsteadily downwards (like a waterfall) through the phases of requirements analysis, design, implementation,testing (validation),integration, and maintenance.

    Waterfall Model

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    5/152

    What is existing system

    The traditional way of maintaining details of a patient in a hospital was to record those, using case sheetsmanually. It was difficult to manually retrieve data whenever needed and almost next to impossible tomaintain such capacious data as the years passed by. It was difficult to update information for a patientafter some years. The billing had become a hard-hitting task for the data operators. Hence to prevent losingof data and enhance the maintainability, various computerized approaches have been evolved. This projectis aimed at developing a patient billing software system that is of importance to a hospital. This system can

    be used to maintain all patient information the treatment given to the patient the location or bed no. allottedto each patient either in the ward or the ICU. The charges to be paid are computed automatically

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    6/152

    considering the treatment charges specified the doctors charges and the ward bed charges. It also computesthe tax and generates a user bill.

    2.4 Advantages of Proposed System:

    The various advantages of this propose systems are: Reduces paper work. Secure system. Generation of desired information is just a click away. Proper availability of resources. Proper time utilization. Reduce the work of hospital staff. Decreasing the manual work while maintaining the reliability.

    3. Overall Description:

    3.1 Goals of Proposed System:

    1. Planned approach towards working: - The working in theorganization will be well planned and organized. The data will be stored properly in data stores, whichwill help in retrieval of information as well as its storage.

    2. Accuracy: - The level of accuracy in the proposed system will be higher. All operation would be done

    correctly and it ensures that whatever information is coming from the center is accurate.

    3. Reliability: - The reliability of the proposed system will be high due to the above stated reasons. Thereason for the increased reliability of the system is that now there would be proper storage of information.

    4. No Redundancy: - In the proposed system utmost care would be that no information is repeatedanywhere, in storage or otherwise. This would assure economic use of storage space and consistency inthe data stored.

    5. Immediate retrieval of information: - The main objective of proposed system is to provide for aquick and efficient retrieval of information. Any type of information would be available whenever theuser requires.

    6. Immediate storage of information: - In manual system there are many problems to store the largestamount of information.

    7. Easy to Operate: - The system should be easy to operate and should be such that it can be developedwithin a short period of time and fit in the limited budget of the user.

    3.2 Background:

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    7/152

    A Hospital is a place where Patients come up for general diseases. Hospitals provide facilities like:-

    Consultation by Doctors on diseases. Diagnosis for diseases. Providing treatment facility. Facility for admitting Patients (providing beds, nursing, medicines, etc.)

    Various operational works that are done in a Hospital are:-

    Recording information about the Patients that come. Generating bills. Recording information related to diagnosis given to Patients. Keeping information about various diseases and medicines available to cure them.

    These are the various jobs that need to be done in a Hospital by the operational staff and Doctors. All theseworks are done on papers.The work is done as follows:-

    Information about Patients is done by just writing the Patients name, age and gender. Whenever the Patient comes up his information is stored freshly.

    Bills are generated by recording price for each facility provided to Patient on a separate sheet andat last they all are summed up.

    Diagnosis information to patients is generally recorded on the document, which contains Patientinformation. It is destroyed after some time period to decrease the paper load in the office.

    All this work is done manually by the receptionist and other operational staff and lot of papers are neededto be handled and taken care of. Doctors have to remember various medicines available for diagnosis andsometimes miss better alternatives as they cant remember them at that time.

    3.3 User Characteristics:

    Every user should be:

    Comfortable of working with computer. Better to have knowledge in medical field. He must also have basic knowledge of English too.

    3.5 Constraints:

    GUI is only in English. Login and password is used for identification of user and there is no facility for guest.

    3.6 Definition of Problem:

    Problems with conventional system

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    8/152

    1. Lack of immediate retrievals: - The information is very difficult to retrieve and to find particular information E.g. - To find out about the patients history, the user has to go through various registers. Thisresults in inconvenience and wastage of time.

    2. Lack of immediate information storage: - The information generated by various transactions takes

    time and efforts to be stored at right place.3. Lack of prompt updating: - Various changes to information like patient details or immunization detailsof child are difficult to make as paper work is involved.

    4. Error prone manual calculation: - Manual calculations are error prone and take a lot of time this mayresult in incorrect information. For example: calculation of patients bill based on various treatments.

    5. Preparation of accurate and prompt reports: - This becomes a difficult task as information is difficultto collect from various registers.

    3.7 Alternative Solutions:

    1. Improved Manual System: - One of the alternative solutions is the improvement of the manual system.Anything, which can be done by using automated methods, can be done manually. But the question ariseshow to perform thing manually in a sound manner. Following are some suggestions, which can be useful inthe manual system.

    A more sophisticate register maintenance for various patient Information, doctor diary and a good systemfor writing bill amount employees and stock availed for the customers can be maintained at central place.

    Adequate staff may be maintained so that updations are made at the very moment at the same time. Proper person for proper work should be made responsible so that a better efficiency could be achieved. Thisneeds a lot of work force.

    2. Batch System: - Another alternative solution can be used of computer based batch system for maintaining the information regarding purchase details, customers and employees. A batch system refers toa system in which data is processed in a periodical basis.The batch system is able to achieve most of the goals and sub goals. But a batch system data is processed insequential basis. Therefore batch system is not suggested.

    3. Online System: - This system provides online storage/ updations and retrieval facility. This system promises very less or no paper work and also provides help to doctor and operational staff.

    In this system everything is stored electronically so very less amount of paper work is required andinformation can be retrieved very easily without searching here and there into registers. This system is beendiscussed here.

    4. Feasibility Study:

    FEASIBILITY STUDY is a test of system proposal according to its workability, impact of theorganization, ability to meet needs and effective use of the resources. It focuses on these major questions:

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    9/152

    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.

    4.1 Technical Feasibility:

    A study of resource availability that may affect the ability to achieve an acceptable system. This evaluationdetermines 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 IT background.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.

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    10/152

    9. Event driven programming facility.

    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.

    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. Itcenters on the existing computer system (hardware, software etc.) and to what extent it can support the

    proposed system.

    4.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 thecost and the benefits associated with the candidate system and if it suits the basic purpose of theorganization 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 thefollowing:

    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 Patient

    Billing System does not require enormous amount of money to be developed. This can be doneeconomically if planned judicially, so it is economically feasible. The cost of project dependsupon the number of man-hours required.

    4.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?

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    11/152

    The system is operationally feasible as it very easy for the End users to operate it. It only needs basicinformation about Windows platform.

    4.4) Schedule Feasibility:

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

    A reliable Patient Billing System can be developed in the considerable amount of time.

    5. System Requirement Specification:

    Patient Billing Software basic requirement is that it should maintain the record of patient and informationregarding the bills as well as the treatment they have got in that hospital. The task should be divided amongthe users according to their classification.

    5.1 Definitions, Acronyms & Abbreviations:

    (a) Patient Register (PR):

    The Patient Register contains information related to each patient. Whenever a new patient is admitted in thehospital, an entry is made in Patient Register. The Registration-No is automatically generated in the formand so is unique for each patient. The Patients name i.e. First name and Last name cannot be left Blank,similarly Address, City is automatically formatted and cannot be left blank. The date of admission isautomatically taken as current date by the system.

    (b) Bed Allocation Register (BAR):

    The Bed Allocation Register contains details regarding a patients bed allocation viz. Reg-no, Patientsname, bed-no, bed-charges, advance etc. The Registration-no once entered is checked for in the PatientRegister, and only if the NO is found the record is entered into the Bed Allocation Register. The bed to beallocated is checked for availability.

    (c) Medicine Detail Register (MDR):

    The Medicine Detail Register is used to display all the medicines currently in stock of the hospital.Whenever a patient requires any medicine, it is issued against a bill in name of patient.

    (d) Bill Register:

    This register includes the bill printing and display options. A registration number is entered to generate bill,which is first checked in patient register for existence.

    (e) Reception:

    The Administrator will create different bills for the patient. The system users will be created and will beassigned with the different roles. More than one patient can be granted or revoked from the system.

    (f) Patient Admission:

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    12/152

    Responsible for checking In and checking Out of the patient.

    (g) See room Status:

    Checking the status of the room to be allotted.

    (h) Patient:

    Play the role of the person whose bill has to be generated.

    (i) Payment of bill:

    Records the details of the final bill which he has to pay.

    (j) Admission:

    Record and details of the patient at the time of Check in.

    (k) Take medicine:

    Details of the prescription.

    (l) Room Transfer:

    Details of the different rooms in which the patient has to be transferred for different operations.

    (m) Doctor:

    List all the details of the allotted patients.

    (n) Room Status:

    Check the status of the room to be allotted.

    5.2 Use Case Model Survey:

    USE CASE MODEL

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    13/152

    5.3 Data Dictionary:

    Table & Data Structure:

    The Tables used in the modules are as follows:-

    Patient Register

    Attribute Date Type LengthRegNo Varchar 10

    Name Varchar 25Fname Varchar 25Address Varchar 35Age Number 2Sex Varchar 1Phone Number 10Mobile Number 10DoA DateTimein DateCaseType Varchar 25

    c_no Number 5

    Bed Detail Register

    Attribute Date Type LengthBedType Varchar 20Charge Number 7,2

    No_of_Beds Number 5

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    14/152

    BedNo Register

    Attribute Date Type LengthBedType varchar(10), Varchar 10BedNo varchar(20) Number 20

    Case Detail Register

    Attribute Date Type LengthCaseType varchar(25), Varchar 25SurFee number(5), Number 5ConsulFee number(5), Number 5Dname varchar(25) Varchar 25

    Bed Allocation Register

    Attribute Date Type LengthRegNo varchar(10) Varchar 10

    Name varchar(25), Varchar 25

    Fname varchar(25), Varchar 25Address varchar(35), Varchar 35BedNo varchar(25), Varchar 25Charge number(10), number 10Avail varchar(1), Varchar 1Advance number(10) Number 10

    Extra Charges Register

    Attribute Date Type LengthRegNo Varchar 10

    Name Varchar 25Room Number 10Investigate Number 10Xray Number 10Other1 Number 10Other2 Number 10Total Number 10

    Bill Register

    Attribute Date Type LengthRegNo Varchar 10

    Name Varchar 25DoA DateTimein DateDoD DateTimeout DateBedNo Varchar 25BedType Varchar 35Charge Number 10CaseType Varchar 25

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    15/152

    ConsulFee Number 10SurFee Number 10Dname Varchar 25OTCharge Number 5

    NurCharge Number 5Other Number 5

    Total Number 10

    PasswordMaster

    Attribute Date Type Lengthusername Varchar 25

    password Varchar 25right Varchar 25

    Assumptions and Dependencies:

    All the records of patient have to be provided. Administrator is created in the system already. Roles and tasks are predefined.

    5.4 Use Case Diagrams & Activity Diagrams:

    5.4.1 Use Case 1:

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    16/152

    Use Case Reports:

    Use cases1 related to reception and authentication login.

    Primary Actor: Administrator Description: Login is for authentication. It ensures that no fraud user can access. Pre Condition: User should have an account.

    Main Scenario:

    1. Start the application. User prompted for login and password.2. User gives the login and password.3. System does authentication.

    ACTIVITY CASE 1

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    17/152

    5.4.2 Use Case 2:

    EXIST

    Yes

    Nes

    SELECT

    Go To PatientAdmission

    Modify Record

    View Record

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    18/152

    Use Case Reports:

    Use case 2 related to patient billing.

    Primary Actor: Administrator Description: Ensures correct billing details and patient billing details Pre Condition: User should be logged in

    Main Scenario:

    1. Start the billing application2. User gives the patient details.3. System checks for records.

    ACTIVITY CASE 2

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    19/152

    EXIST

    Yes

    Nes

    SELECTPATIENT

    Go To PatientAdmission

    Modify Bill

    Generate Bill

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    20/152

    5.4.3 USE CASE 3:

    Use Case Reports:

    Use case 3 related to new admission.

    Primary Actor: Admission Description: After logging in user can create new patient records Pre Condition: user should be logged in

    Main Scenario:

    1. Start the application.2. User gives details for new patient.

    ACTIVITY CASE 3

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    21/152

    5.4.4 USE CASE 4:

    EXIST

    Nes

    Yes

    SELECTPATIENT

    Go To Stop

    Create NewPatient Record

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    22/152

    New Bed

    Edit Details

    Bed Detail

    View Bed De tails

    Use Case Reports:

    Use Case 4 related to bed details.

    Primary Actor: Administrator Description: Updation of bed details Pre Condition: user should be logged in

    Main Scenario:

    1. Start the application.2. User gives the bed details.

    ACTIVITY CASE 4

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    23/152

    E-R Diagram

    EXIST

    Yes

    Nes

    SELECT BEDDETAILS

    Add the Details

    Modify Details

    Generate Finaldetails

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    24/152

    DFD Diagram

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    25/152

    6. SYSTEM IMPLEMENTATION:

    PLATFORM USED:

    6.1 About JAVA:

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    26/152

    Java refers to a number of computer software products and specifications from Sun Microsystems thattogether provide a system for developing application software and deploying it in a cross-platformenvironment. Java is used in a wide variety of computing platforms from embedded devices and mobile

    phones on the low end, to enterprise servers and supercomputers on the high end. Java is nearly ubiquitousin mobile phones, Web servers and enterprise applications, and while less common on desktop computers;Java applets are often used to provide improved functionality while browsing the World Wide Web.

    Writing in the Java programming language is the primary way to produce code that will be deployed asJava bytecode, though there are compilers available for other languages such as JavaScript, Python andRuby, and a native Java scripting language called Groovy. Java syntax borrows heavily from C and C++

    but it eliminates certain low-level constructs such as pointers and has a very simple memory model whereevery object is allocated on the heap and all variables of object types are references. Memory managementis handled through integrated automatic garbage collection performed by the Java Virtual Machine (JVM).

    On 13 November 2006, Sun Microsystems made the bulk of its implementation of Java available under theGNU General Public License, although there are still a few parts distributed as precompiled binaries due tointellectual property restrictions.

    An edition of the Java platform is the name for a bundle of related programs, or platform, from Sun whichallow for developing and running programs written in the Java programming language.

    The platform is not specific to any one processor or operating system, but rather an execution engine(called a virtual machine) and a compiler with a set of standard libraries that are implemented for varioushardware and operating systems so that Java programs can run identically on all of them.

    Java Card: refers to a technology that allows small Java-based applications (applets) to be runsecurely on smart cards and similar small memory footprint devices.

    Java ME (Micro Edition): Specifies several different sets of libraries (known as profiles) for devices which are sufficiently limited that supplying the full set of Java libraries would take upunacceptably large amounts of storage.

    Java SE (Standard Edition): For general purpose use on desktop PCs, servers and similar devices.

    Java EE (Enterprise Edition): Java SE plus various APIs useful for multi-tier client-server enterprise applications.

    As of September 2008, the current version of the Java Platform is specified as either 1.6.0 or 6 (both refer to the same version). Version 6 is the product version, while 1.6.0 is the developer version.

    The Java Platform consists of several programs, each of which provides a distinct portion of its overallcapabilities. For example, the Java compiler, which converts Java source code into Java bytecode (anintermediate language for the Java Virtual Machine (JVM)), is provided as part of the Java DevelopmentKit (JDK). The Java Runtime Environment (JRE), complementing the JVM with a just-in-time (JIT)compiler, converts intermediate bytecode into native machine code on the fly. Also supplied are extensive

    libraries (pre-compiled in There are several other components, some available only in certain editions.

    The essential components in the platform are the Java language compiler, the libraries, and the runtimeenvironment in which Java intermediate bytecode "executes" according to the rules laid out in the virtualmachine specification.

    6.2 About Eclipse:

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    27/152

    ECLIPSE is a multi-language software development platform comprising an IDE and a plug-in system toextend it. It is written primarily in Java and is used to develop applications in this language and, by meansof the various plug-INS, in other languages as wellC/C++, COBOL, Python, Perl, PHP and more.

    The initial codebase originated from VisualAge. In its default form it is meant for Java developers,consisting of the Java Development Tools (JDT). Users can extend its capabilities by installing plug-ins

    written for the Eclipse software framework, such as development toolkits for other programminglanguages, and can write and contribute their own plug-in modules. Language packs provide translationsinto over a dozen natural languages.

    Architecture:

    Eclipse employs plug-ins in order to provide all of its functionality on top of (and including) the runtimesystem, in contrast to some other applications where functionality is typically hard coded. The runtimesystem of Eclipse is based on Equinox, an OSGi standard compliant implementation.

    This plug-in mechanism is a lightweight software componentry framework. In addition to allowing Eclipseto be extended using other programming languages such as C and Python, the plug-in framework allowsEclipse to work with typesetting languages like LaTeX, networking applications such as telnet, anddatabase management systems. The plug-in architecture supports writing any desired extension to theenvironment, such as for configuration management. Java and CVS support is provided in the EclipseSDK.

    The key to the seamless integration (but not of seamless interoperability) of tools with Eclipse is the plug-in. With the exception of a small run-time kernel, everything in Eclipse is a plug-in.This means that every plug-in developed integrates with Eclipse in exactly the same way as other plug-ins;in this respect, all features are created equal.Eclipse provides plug-ins for a wide variety of features, some of which are through third parties using bothfree and commercial models. Examples of plug-ins include UML plug-in for Sequence and other UMLdiagrams, plug-in for Database explorer, and many others.

    The Eclipse SDK includes the Eclipse Java Development Tools, offering an IDE with a built-in incrementalJava compiler and a full model of the Java source files. This allows for advanced refactoring techniquesand code analysis. The IDE also makes use of a workspace, in this case a set of metadata over a flat filespace allowing external file modifications as long as the corresponding workspace "resource" is refreshedafterwards. The Visual Editor project (discontinued since June 30, 2006) allows interfaces to be createdinteractively, thus allowing Eclipse to be used as a RAD tool.

    Eclipse's widgets are implemented by a widget toolkit for Java called SWT, unlike most Java applications,which use the Java standard Abstract Window Toolkit (AWT) or Swing. Eclipse's user interface also usesan intermediate GUI layer called JFace, which simplifies the construction of applications based on SWT.

    Rich Client Platform:

    Eclipse provides the Eclipse Rich Client Platform (RCP) for developing general purpose applications. Thefollowing components constitute the rich client platform:

    Equinox OSGi a standard bundling framework Core platform boot Eclipse, run plug-ins Standard Widget Toolkit (SWT) a portable widget toolkit JFace viewer classes to bring model view controller programming to SWT, file buffers, text

    handling, text editors. Eclipse Workbench views, editors, perspectives, wizards

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    28/152

    6.3 About DB2 Server:

    DB2 is one of IBM's families of relational database management system (RDBMS) software products

    within IBM's broader Information Management Software line. Although there are different "editions" and"versions" of DB2 which run on devices ranging from handhelds to mainframes, most often DB2 refers toDB2 Enterprise Server Edition, which runs on Unix (AIX), Windows or Linux servers; or DB2 for z/OS.DB2 powers the different IBM InfoSphere Warehouse editions. Alongside DB2 is another RDBMS:Informix, which was acquired by IBM in 2001.

    DB2 is available in several "editions," or licensing arrangements. By opting for a reduced-feature "edition,"IBM allows customers to avoid paying for database features which they do not need. Sample editionsinclude the Express, Workgroup, and Enterprise Edition. The most sophisticated edition for Linux/UNIX/Windows is DB2 Data Warehouse Enterprise Edition or DB2 for short. This edition isintended for mixed workload (OLTP and data warehousing) or business intelligence (BI) implementations.DB2 DWE includes several "BI" features such as ETL, data mining, OLAP acceleration, and in-lineanalytics.

    DB2 for z/OS is available under its own licensing terms. Starting with Version 8, IBM brought DB2 for z/OS and for the other platforms into much closer alignment. (Previously there were significant differencesin SQL vocabularies, for example.) DB2 for z/OS has some exclusives notably Multi-Level Security(MLS), extremely large table sizes, and hardware-assisted compression owing to its special environmentand the demanding needs of its customers. DB2 for z/OS has always been known for its leading OLTP

    performance and capabilities, and for its reliability and availability to support mission-critical businessoperations, but the z/OS version is now starting to acquire BI features as well, such as materialized querytables (MQTs) and star schema. Oracle's CEO Larry Ellison commented that DB2 for z/OS is the onecompetitive database he respects and admires.

    On January 30, 2006, IBM released a no-charge version of DB2 called DB2 Express-C. This was anexpected response to the recently announced free versions of Oracle 10g and Microsoft SQL Server. UnlikeMicrosoft or Oracle's free editions, Express-C has no limit on number of users or on database size. Whileversions 8.2 and 9.1 of DB2 Express-C imposed hardware limits on the server on which it ran, DB2Express-C 9.5 can run on Windows and Linux machines of any size, but the database engine will not utilizemore than two CPU cores and 2GB RAM. In 2007, IBM introduced a yearly support subscription called theFixed Term License (FTL), which offers a year of telephone support for Express-C. Purchasing the FTLalso allows the DB2 Express-C engine to use up to four CPU cores and 4GB RAM.

    Users of DB2 Express-C who don't purchase an FTL subscription can receive support and assistance on afree, public web forum staffed by IBM technicians and other DB2 users.DB2 can be administered from either the command-line or a GUI. The command-line interface requiresmore knowledge of the product but can be more easily scripted and automated. The GUI is a multi-platformJava client that contains a variety of wizards suitable for novice users. DB2 supports both SQL andXQuery. DB2 has native implementation of XML data storage, where XML data is stored as XML (not asrelational data or CLOB data) for faster access using XQuery.

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    29/152

    Program Code

    mainpage.java

    package patient;import java.awt.Container;import java.awt.GridBagConstraints;import java.awt.GridBagLayout;import java.awt.Insets;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;//import java.sql.Connection;//import java.sql.DriverManager;//import java.sql.PreparedStatement;//import java.sql.ResultSet;//import java.sql.Statement;//import java.sql.ResultSet;//import java.sql.SQLException;//import java.sql.Statement;//import java.util.ArrayList;//import java.sql.*;import javax.swing.JButton;import javax.swing.JFrame;//import javax.swing.JLabel;//import javax.swing.JOptionPane;//import javax.swing.JTextField;

    public class mainpage implements ActionListener{

    // private Connection con;JFrame appFrame;

    JButton

    jbnadddoctor,jbneditdoctor,jbnmedicine,jbneditmedicine,jbnreg,jbneditreg,jbnbloodbank,jbneditbloodbank,jbndepartment,jbneditdepartment,jbndiet,jbneditdiet,jbnschedule,jbneditschedule,jbndrugmaster,jbneditdrugmaster,jbnlab,jbneditlab,jbnward,jbneditward,jbnpatientroom,jbneditpatientroom,jbntreatment,jbnedittreatment,jbnroom,jbneditroom,jbnroomtransfer,jbnpatientbill,jbnback,jbnexit;

    Container cPane;

    public static void main(String args[]){new mainpage();

    }public mainpage(){createGUI();}

    public void createGUI(){

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    30/152

    /*Create a frame, get its contentpane and set layout*/appFrame = new JFrame("mainpage");

    cPane = appFrame.getContentPane();cPane.setLayout(new GridBagLayout());

    //Arrange components on contentPane and set Action Listeners to each JButtonarrangeComponents();

    appFrame.setSize(1200,1200);appFrame.setResizable(false);appFrame.setVisible(true);appFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    }public void arrangeComponents(){

    jbnadddoctor = new JButton("ADD NEW DOCTORS ENTRY"); jbneditdoctor = new JButton("EDIT DOCTORS ENTRY"); jbnmedicine = new JButton("NEW MEDICINE ENTRY"); jbneditmedicine = new JButton("EDIT MEDICINE ENTRY"); jbnreg = new JButton("REGISTRATION OF PATIENT"); jbneditreg = new JButton("EDIT REGISTRATION OF PATIENT"); jbnbloodbank = new JButton(" BLOOD BANK "); jbneditbloodbank = new JButton("EDIT BLOOD BANK"); jbndepartment = new JButton(" DEPARTMENT "); jbneditdepartment = new JButton("EDIT DEPARTMENT"); jbndiet = new JButton(" DIET "); jbneditdiet = new JButton(" EDIT DIET "); jbndrugmaster = new JButton(" DRUGMASTER "); jbneditdrugmaster = new JButton("EDIT DRUGMASTER"); jbnlab = new JButton(" LAB ENTRY "); jbneditlab = new JButton("EDIT LAB ENTRY "); jbnward = new JButton(" WARD ENTRY "); jbneditward = new JButton("EDIT WARD ENTRY"); jbnpatientroom = new JButton( "Patient ROOM " ); jbneditpatientroom = new JButton("EDIT PATIENT ROOM"); jbntreatment = new JButton(" DAILY CHARGES " );

    jbnedittreatment = new JButton(" EDIT CHARGES " ); jbnroom = new JButton(" ROOMS ENTRY " ); jbneditroom = new JButton("EDIT ROOMS ENTRY" ); jbnroomtransfer = new JButton(" ROOM TRANSFER "); jbnpatientbill = new JButton(" PATIENT BILL "); jbnback = new JButton(" BACK " ); jbnexit = new JButton(" EXIT ");

    /*add all initiaeized components to the container*/GridBagConstraints gridBagConstraintsx01 = new GridBagConstraints();

    gridBagConstraintsx01.gridx = 0;gridBagConstraintsx01.gridy = 0;gridBagConstraintsx01.insets = new Insets(5,5,5,5);cPane.add(jbnadddoctor, gridBagConstraintsx01);

    GridBagConstraints gridBagConstraintsx02 = new GridBagConstraints();gridBagConstraintsx02.gridx = 1;gridBagConstraintsx02.insets = new Insets(5,5,5,5);gridBagConstraintsx02.gridy = 0;

    //gridBagConstraintsx02.gridwidth = 2;

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    31/152

    gridBagConstraintsx02.fill = GridBagConstraints.BOTH;cPane.add(jbneditdoctor, gridBagConstraintsx02);

    GridBagConstraints gridBagConstraintsx03 = new GridBagConstraints();gridBagConstraintsx03.gridx = 2;gridBagConstraintsx03.gridy = 0;gridBagConstraintsx03.insets = new Insets(5,5,5,5);cPane.add(jbnmedicine, gridBagConstraintsx03);

    GridBagConstraints gridBagConstraintsx04 = new GridBagConstraints();gridBagConstraintsx04.gridx = 3;gridBagConstraintsx04.insets = new Insets(5,5,5,5);gridBagConstraintsx04.gridy = 0;

    //gridBagConstraintsx02.gridwidth = 2;gridBagConstraintsx04.fill = GridBagConstraints.BOTH;cPane.add(jbneditmedicine, gridBagConstraintsx04);

    GridBagConstraints gridBagConstraintsx05 = new GridBagConstraints();gridBagConstraintsx05.gridx = 0;gridBagConstraintsx05.gridy = 1;gridBagConstraintsx05.insets = new Insets(5,5,5,5);cPane.add(jbnreg, gridBagConstraintsx05);GridBagConstraints gridBagConstraintsx06 = new GridBagConstraints();gridBagConstraintsx06.gridx = 1;gridBagConstraintsx06.insets = new Insets(5,5,5,5);gridBagConstraintsx06.gridy = 1;

    //gridBagConstraintsx.gridwidth = 2;gridBagConstraintsx06.fill = GridBagConstraints.BOTH;cPane.add(jbneditreg, gridBagConstraintsx06);

    GridBagConstraints gridBagConstraintsx07 = new GridBagConstraints();gridBagConstraintsx07.gridx = 2;gridBagConstraintsx07.gridy = 1;gridBagConstraintsx07.insets = new Insets(5,5,5,5);cPane.add(jbnbloodbank, gridBagConstraintsx07);

    GridBagConstraints gridBagConstraintsx08 = new GridBagConstraints();gridBagConstraintsx08.gridx = 3;gridBagConstraintsx08.insets = new Insets(5,5,5,5);gridBagConstraintsx08.gridy = 1;

    //gridBagConstraintsx.gridwidth = 2;gridBagConstraintsx08.fill = GridBagConstraints.BOTH;cPane.add(jbneditbloodbank, gridBagConstraintsx08);

    GridBagConstraints gridBagConstraintsx09 = new GridBagConstraints();gridBagConstraintsx09.gridx = 0;

    gridBagConstraintsx09.gridy = 2;gridBagConstraintsx09.insets = new Insets(5,5,5,5);cPane.add(jbndepartment, gridBagConstraintsx09);

    GridBagConstraints gridBagConstraintsx10 = new GridBagConstraints();gridBagConstraintsx10.gridx = 1;gridBagConstraintsx10.insets = new Insets(5,5,5,5);gridBagConstraintsx10.gridy = 2;

    //gridBagConstraintsx.gridwidth = 2;gridBagConstraintsx10.fill = GridBagConstraints.BOTH;

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    32/152

    cPane.add(jbneditdepartment, gridBagConstraintsx10);

    GridBagConstraints gridBagConstraintsx11 = new GridBagConstraints();gridBagConstraintsx11.gridx = 2;gridBagConstraintsx11.gridy = 2;gridBagConstraintsx11.insets = new Insets(5,5,5,5);cPane.add(jbndiet, gridBagConstraintsx11);

    GridBagConstraints gridBagConstraintsx12 = new GridBagConstraints();gridBagConstraintsx12.gridx = 3;gridBagConstraintsx12.insets = new Insets(5,5,5,5);gridBagConstraintsx12.gridy = 2;

    //gridBagConstraintsx.gridwidth = 2;gridBagConstraintsx12.fill = GridBagConstraints.BOTH;cPane.add(jbneditdiet, gridBagConstraintsx12);

    GridBagConstraints gridBagConstraintsx13 = new GridBagConstraints();gridBagConstraintsx13.gridx = 0;gridBagConstraintsx13.gridy = 3;gridBagConstraintsx13.insets = new Insets(5,5,5,5);cPane.add(jbndrugmaster, gridBagConstraintsx13);

    GridBagConstraints gridBagConstraintsx14 = new GridBagConstraints();gridBagConstraintsx14.gridx = 1;gridBagConstraintsx14.insets = new Insets(5,5,5,5);gridBagConstraintsx14.gridy = 3;

    //gridBagConstraintsx.gridwidth = 2;gridBagConstraintsx14.fill = GridBagConstraints.BOTH;cPane.add(jbneditdrugmaster, gridBagConstraintsx14);

    GridBagConstraints gridBagConstraintsx15 = new GridBagConstraints();gridBagConstraintsx15.gridx = 2;gridBagConstraintsx15.gridy = 3;gridBagConstraintsx15.insets = new Insets(5,5,5,5);cPane.add(jbnlab ,gridBagConstraintsx15);

    GridBagConstraints gridBagConstraintsx16 = new GridBagConstraints();gridBagConstraintsx16.gridx = 3;gridBagConstraintsx16.insets = new Insets(5,5,5,5);gridBagConstraintsx16.gridy = 3;

    //gridBagConstraintsx.gridwidth = 2;gridBagConstraintsx16.fill = GridBagConstraints.BOTH;cPane.add(jbneditlab, gridBagConstraintsx16);

    GridBagConstraints gridBagConstraintsx17 = new GridBagConstraints();gridBagConstraintsx17.gridx = 0;

    gridBagConstraintsx17.gridy = 4;gridBagConstraintsx17.insets = new Insets(5,5,5,5);cPane.add(jbnward, gridBagConstraintsx17);

    GridBagConstraints gridBagConstraintsx18 = new GridBagConstraints();gridBagConstraintsx18.gridx = 1;gridBagConstraintsx18.insets = new Insets(5,5,5,5);gridBagConstraintsx18.gridy = 4;

    //gridBagConstraintsx.gridwidth = 2;gridBagConstraintsx18.fill = GridBagConstraints.BOTH;

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    33/152

    cPane.add(jbneditward, gridBagConstraintsx18);

    GridBagConstraints gridBagConstraintsx19 = new GridBagConstraints();gridBagConstraintsx19.gridx = 2;gridBagConstraintsx19.gridy = 4;gridBagConstraintsx19.insets = new Insets(5,5,5,5);cPane.add(jbnpatientroom, gridBagConstraintsx19);

    GridBagConstraints gridBagConstraintsx20 = new GridBagConstraints();gridBagConstraintsx20.gridx = 3;gridBagConstraintsx20.insets = new Insets(5,5,5,5);gridBagConstraintsx20.gridy = 4;

    //gridBagConstraintsx.gridwidth = 2;gridBagConstraintsx20.fill = GridBagConstraints.BOTH;cPane.add(jbneditpatientroom, gridBagConstraintsx20);

    GridBagConstraints gridBagConstraintsx21 = new GridBagConstraints();gridBagConstraintsx21.gridx = 0;gridBagConstraintsx21.gridy = 5;gridBagConstraintsx21.insets = new Insets(5,5,5,5);cPane.add(jbntreatment, gridBagConstraintsx21);

    GridBagConstraints gridBagConstraintsx22 = new GridBagConstraints();gridBagConstraintsx22.gridx = 1;gridBagConstraintsx22.insets = new Insets(5,5,5,5);gridBagConstraintsx22.gridy = 5;

    //gridBagConstraintsx.gridwidth = 2;gridBagConstraintsx22.fill = GridBagConstraints.BOTH;cPane.add(jbnedittreatment, gridBagConstraintsx22);

    GridBagConstraints gridBagConstraintsx23 = new GridBagConstraints();gridBagConstraintsx23.gridx = 2;gridBagConstraintsx23.gridy =5;gridBagConstraintsx23.insets = new Insets(5,5,5,5);cPane.add(jbnroom, gridBagConstraintsx23);

    GridBagConstraints gridBagConstraintsx24 = new GridBagConstraints();gridBagConstraintsx24.gridx = 3;gridBagConstraintsx24.insets = new Insets(5,5,5,5);gridBagConstraintsx24.gridy = 5;

    //gridBagConstraintsx.gridwidth = 2;gridBagConstraintsx24.fill = GridBagConstraints.BOTH;cPane.add(jbneditroom, gridBagConstraintsx24);

    GridBagConstraints gridBagConstraintsx25 = new GridBagConstraints();gridBagConstraintsx25.gridx = 0;

    gridBagConstraintsx25.gridy = 6;gridBagConstraintsx25.insets = new Insets(5,5,5,5);cPane.add(jbnroomtransfer, gridBagConstraintsx25);

    GridBagConstraints gridBagConstraintsx26 = new GridBagConstraints();gridBagConstraintsx26.gridx = 1;gridBagConstraintsx26.insets = new Insets(5,5,5,5);gridBagConstraintsx26.gridy = 6;

    //gridBagConstraintsx.gridwidth = 2;gridBagConstraintsx26.fill = GridBagConstraints.BOTH;

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    34/152

    cPane.add(jbnpatientbill, gridBagConstraintsx26);

    GridBagConstraints gridBagConstraintsx27 = new GridBagConstraints();gridBagConstraintsx27.gridx = 2;gridBagConstraintsx27.gridy = 6;gridBagConstraintsx27.insets = new Insets(5,5,5,5);cPane.add(jbnback, gridBagConstraintsx27);

    GridBagConstraints gridBagConstraintsx28 = new GridBagConstraints();gridBagConstraintsx28.gridx = 3;gridBagConstraintsx28.insets = new Insets(5,5,5,5);gridBagConstraintsx28.gridy = 6;

    //gridBagConstraintsx.gridwidth = 2;gridBagConstraintsx28.fill = GridBagConstraints.BOTH;cPane.add(jbnexit, gridBagConstraintsx28);

    jbnadddoctor.addActionListener(this);jbneditdoctor.addActionListener(this);jbnmedicine.addActionListener(this);jbneditmedicine.addActionListener(this);jbnreg.addActionListener(this);jbneditreg.addActionListener(this);jbnbloodbank.addActionListener(this);jbneditbloodbank.addActionListener(this);jbndepartment.addActionListener(this);jbneditdepartment.addActionListener(this);jbndiet.addActionListener(this);jbneditdiet.addActionListener(this);jbndrugmaster.addActionListener(this);jbneditdrugmaster.addActionListener(this);jbnlab.addActionListener(this);jbneditlab.addActionListener(this);jbnward.addActionListener(this);jbneditward.addActionListener(this);jbnpatientroom.addActionListener(this);jbneditpatientroom.addActionListener(this);jbntreatment.addActionListener(this);jbnedittreatment.addActionListener(this);jbnroom.addActionListener(this);jbneditroom.addActionListener(this);jbnroomtransfer.addActionListener(this);jbneditward.addActionListener(this);jbnpatientbill.addActionListener(this);jbnback.addActionListener(this);jbnexit.addActionListener(this);}

    public void actionPerformed (ActionEvent e){if (e.getSource() == jbnadddoctor){new docmaster();

    }else if (e.getSource() == jbneditdoctor){new docmaster1();}

    else if (e.getSource() == jbnmedicine){new medicines();

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    35/152

    }else if (e.getSource() == jbneditmedicine){new medicines1();}

    else if (e.getSource() == jbnreg){new registration();}

    else if (e.getSource() == jbneditreg){new registration1();

    }else if (e.getSource() == jbnbloodbank){new bloodbank();

    }else if (e.getSource() == jbneditbloodbank){new bloodbank1();

    }else if (e.getSource() == jbndepartment){new departement();

    }else if (e.getSource() == jbneditdepartment){new department1();

    }else if (e.getSource() == jbndiet){new diet();

    }else if (e.getSource() == jbneditdiet){new diet1();}

    else if (e.getSource() == jbndrugmaster){new drugmaster();}

    else if (e.getSource() == jbneditdrugmaster){new drugmaster1();}

    else if (e.getSource() == jbnlab){new lab();}

    else if (e.getSource() == jbneditlab){new lab1();}

    else if (e.getSource() == jbnward){new wardmaster();}

    else if (e.getSource() == jbneditward){new wa();}

    else if (e.getSource() == jbnpatientroom){new patientroom();}

    else if (e.getSource() == jbneditpatientroom){new editpatientroom();}

    else if (e.getSource() == jbntreatment){new treatment();}

    else if (e.getSource() == jbnedittreatment){

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    36/152

    new edittreatment();}

    else if (e.getSource() == jbnroom){new room();}

    else if (e.getSource() == jbneditroom){new editroom();}

    else if (e.getSource() == jbnroomtransfer){new roomtransfer();}

    else if (e.getSource() == jbnpatientbill){new patientbilling();}

    else if (e.getSource() == jbnback){new loginenter();}

    else if (e.getSource() == jbnexit){System.exit(0);}}

    // Save the Person into the Address Book }

    loginenter.java

    package patient;import java.awt.Container;import java.awt.GridBagConstraints;import java.awt.GridBagLayout;import java.awt.Insets;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.sql.Connection;import java.sql.DriverManager;//import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.Statement;//import java.sql.ResultSet;import java.sql.SQLException;//import java.sql.Statement;//import java.util.ArrayList;//import java.sql.*;import javax.swing.JButton;import javax.swing.JFrame;

    import javax.swing.JLabel;import javax.swing.JOptionPane;//import javax.swing.JOptionPane;import javax.swing.*;

    public class loginenter implements ActionListener{private Connection con;JFrame appFrame;

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    37/152

    JLabel jlbloginname, jlbpassword,hello;JTextField jtfloginname;

    JPasswordField jtfpassword;JButton jbnsubmit , jbnClear,jbnexit;String login,pass;

    // JTextArea jTextArea1;

    Container cPane;public static void main(String args[]){

    new loginenter();}

    public loginenter(){

    login="";pass="";createGUI();

    }public void createGUI(){

    /*Create a frame, get its contentpane and set layout*/appFrame = new JFrame("Login Page");

    cPane = appFrame.getContentPane();cPane.setLayout(new GridBagLayout());

    //Arrange components on contentPane and set Action Listeners to each JButtonarrangeComponents();

    appFrame.setSize(1200,1200);appFrame.setResizable(false);appFrame.setVisible(true);appFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    }public void arrangeComponents(){

    hello =new JLabel("Hospital Billing Software");hello.setFont(new java.awt.Font("Times New Roman", 0, 36));hello.setText("PATIENT BILLING SOFTWARE");

    jlbloginname = new JLabel("Login");

    jlbpassword = new JLabel("Password");

    //jTextArea1 = new javax.swing.JTextArea();

    jtfloginname = new JTextField(20);

    jtfpassword = new JPasswordField(20);

    jbnsubmit = new JButton("Submit");jbnClear = new JButton("Clear");jbnexit = new JButton("Exit");

    GridBagConstraints gridBagConstraintsx30 = new GridBagConstraints();

    gridBagConstraintsx30.gridx = 0;gridBagConstraintsx30.gridy = 1;gridBagConstraintsx30.insets = new Insets(5,5,5,5);cPane.add(hello, gridBagConstraintsx30);

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    38/152

    /*add all initialized components to the container*/GridBagConstraints gridBagConstraintsx01 = new GridBagConstraints();

    gridBagConstraintsx01.gridx = 0;gridBagConstraintsx01.gridy = 3;gridBagConstraintsx01.insets = new Insets(5,5,5,5);cPane.add(jlbloginname, gridBagConstraintsx01);

    GridBagConstraints gridBagConstraintsx02 = new GridBagConstraints();gridBagConstraintsx02.gridx = 1;gridBagConstraintsx02.insets = new Insets(5,5,5,5);gridBagConstraintsx02.gridy = 3;gridBagConstraintsx02.gridwidth = 2;gridBagConstraintsx02.fill = GridBagConstraints.BOTH;cPane.add(jtfloginname, gridBagConstraintsx02);

    GridBagConstraints gridBagConstraintsx03 = new GridBagConstraints();gridBagConstraintsx03.gridx = 0;gridBagConstraintsx03.insets = new Insets(5,5,5,5);gridBagConstraintsx03.gridy = 4;cPane.add(jlbpassword, gridBagConstraintsx03);

    GridBagConstraints gridBagConstraintsx04 = new GridBagConstraints();gridBagConstraintsx04.gridx = 1;gridBagConstraintsx04.gridy = 4;gridBagConstraintsx04.insets = new Insets(5,5,5,5);gridBagConstraintsx04.gridwidth = 2;gridBagConstraintsx04.fill = GridBagConstraints.BOTH;cPane.add(jtfpassword, gridBagConstraintsx04);

    // jComboBox1.addActionListener(this);

    GridBagConstraints gridBagConstraintsx07 = new GridBagConstraints();gridBagConstraintsx07.gridx = 0;gridBagConstraintsx07.gridy = 5;gridBagConstraintsx07.insets = new Insets(5,5,5,5);cPane.add(jbnsubmit, gridBagConstraintsx07);

    GridBagConstraints gridBagConstraintsx08 = new GridBagConstraints();gridBagConstraintsx08.gridx = 1;gridBagConstraintsx08.insets = new Insets(5,5,5,5);gridBagConstraintsx08.gridy = 5;cPane.add(jbnClear, gridBagConstraintsx08);

    GridBagConstraints gridBagConstraintsx09 = new GridBagConstraints();gridBagConstraintsx09.gridx = 2;

    gridBagConstraintsx09.insets = new Insets(5,5,5,5);gridBagConstraintsx09.gridy = 5;cPane.add(jbnexit, gridBagConstraintsx09);

    jbnsubmit.addActionListener(this);

    jbnClear.addActionListener(this);jbnexit.addActionListener(this);

    }void searchPerson(){

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    39/152

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    40/152

    jtfloginname.setText("");jtfpassword.setText("");

    }}

    Wardmaster.java

    package patient;import java.awt.Container;import java.awt.GridBagConstraints;import java.awt.GridBagLayout;import java.awt.Insets;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;//import java.sql.ResultSet;import java.sql.SQLException;//import java.sql.Statement;//import java.util.ArrayList;//import java.sql.*;import javax.swing.JButton;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JOptionPane;import javax.swing.JTextField;

    public class wardmaster implements ActionListener{

    private Connection con;JFrame appFrame;

    JLabel jlbwardno,jlbwardname, jlbwardincharge,jlbheadnurse,jlbnoofbeds,jlbaviablebeds;JTextField jtfwardno,jtfwardname, jtfwardincharge,jtfheadnurse,jtfnoofbeds,

    jtfaviablebeds;

    String wardno,wardname,wardincharge, headnurse, noofbeds,aviablebeds;

    JButton jbnSave,jbnClear,back;

    Container cPane;public static void main(String args[]){

    new wardmaster();}

    public wardmaster(){

    wardno="";wardname="";wardincharge="";headnurse="";noofbeds="";

    aviablebeds="";

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    41/152

    createGUI();}public void createGUI(){

    /*Create a frame, get its contentpane and set layout*/appFrame = new JFrame("WARD MASTER");

    cPane = appFrame.getContentPane();cPane.setLayout(new GridBagLayout());

    //Arrange components on contentPane and set Action Listeners to each JButtonarrangeComponents();

    appFrame.setSize(1200,1200);appFrame.setResizable(false);appFrame.setVisible(true);appFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    }public void arrangeComponents(){

    jlbwardno = new JLabel("Ward Number");jlbwardname = new JLabel(" wardname");jlbwardincharge = new JLabel("wardincharge");jlbheadnurse = new JLabel("headnurse");jlbnoofbeds = new JLabel("noofbeds");jlbaviablebeds= new JLabel("aviable");jtfwardno = new JTextField(20);jtfwardname = new JTextField(20);jtfwardincharge = new JTextField(20);jtfheadnurse = new JTextField(20);jtfnoofbeds = new JTextField(20);jtfaviablebeds = new JTextField(20);jbnSave = new JButton("Save");jbnClear = new JButton("Clear");back = new JButton("Back");

    /*add all initialized components to the container*/GridBagConstraints gridBagConstraintsx01 = new GridBagConstraints();

    gridBagConstraintsx01.gridx = 0;gridBagConstraintsx01.gridy = 0;gridBagConstraintsx01.insets = new Insets(5,5,5,5);

    cPane.add(jlbwardno, gridBagConstraintsx01);

    GridBagConstraints gridBagConstraintsx02 = new GridBagConstraints();gridBagConstraintsx02.gridx = 1;gridBagConstraintsx02.insets = new Insets(5,5,5,5);gridBagConstraintsx02.gridy = 0;gridBagConstraintsx02.gridwidth = 2;

    gridBagConstraintsx02.fill = GridBagConstraints.BOTH;cPane.add(jtfwardno, gridBagConstraintsx02);

    GridBagConstraints gridBagConstraintsx03 = new GridBagConstraints();gridBagConstraintsx03.gridx = 0;gridBagConstraintsx03.insets = new Insets(5,5,5,5);gridBagConstraintsx03.gridy = 1;cPane.add(jlbwardname, gridBagConstraintsx03);

    GridBagConstraints gridBagConstraintsx04 = new GridBagConstraints();

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    42/152

    gridBagConstraintsx04.gridx = 1;gridBagConstraintsx04.insets = new Insets(5,5,5,5);gridBagConstraintsx04.gridy = 1;gridBagConstraintsx04.gridwidth = 2;gridBagConstraintsx04.fill = GridBagConstraints.BOTH;cPane.add(jtfwardname, gridBagConstraintsx04);

    GridBagConstraints gridBagConstraintsx05 = new GridBagConstraints();gridBagConstraintsx05.gridx = 0;gridBagConstraintsx05.insets = new Insets(5,5,5,5);gridBagConstraintsx05.gridy = 2;cPane.add(jlbwardincharge, gridBagConstraintsx05);

    GridBagConstraints gridBagConstraintsx06 = new GridBagConstraints();gridBagConstraintsx06.gridx = 1;gridBagConstraintsx06.gridy = 2;gridBagConstraintsx06.insets = new Insets(5,5,5,5);gridBagConstraintsx06.gridwidth = 2;gridBagConstraintsx06.fill = GridBagConstraints.BOTH;cPane.add(jtfwardincharge, gridBagConstraintsx06);

    GridBagConstraints gridBagConstraintsx07 = new GridBagConstraints();gridBagConstraintsx07.gridx = 0;gridBagConstraintsx07.insets = new Insets(5,5,5,5);gridBagConstraintsx07.gridy = 3;cPane.add(jlbheadnurse, gridBagConstraintsx07);

    GridBagConstraints gridBagConstraintsx08 = new GridBagConstraints();gridBagConstraintsx08.gridx = 1;gridBagConstraintsx08.gridy = 3;gridBagConstraintsx08.gridwidth = 2;gridBagConstraintsx08.insets = new Insets(5,5,5,5);gridBagConstraintsx08.fill = GridBagConstraints.BOTH;cPane.add(jtfheadnurse, gridBagConstraintsx08);

    GridBagConstraints gridBagConstraintsx09 = new GridBagConstraints();gridBagConstraintsx09.gridx = 0;gridBagConstraintsx09.gridy = 4;gridBagConstraintsx09.insets = new Insets(5,5,5,5);cPane.add(jlbnoofbeds, gridBagConstraintsx09);

    GridBagConstraints gridBagConstraintsx10 = new GridBagConstraints();gridBagConstraintsx10.gridx = 1;gridBagConstraintsx10.gridy = 4;gridBagConstraintsx10.insets = new Insets(5,5,5,5);gridBagConstraintsx10.gridwidth = 2;

    gridBagConstraintsx10.fill = GridBagConstraints.BOTH;cPane.add(jtfnoofbeds, gridBagConstraintsx10);

    GridBagConstraints gridBagConstraintsx11 = new GridBagConstraints();gridBagConstraintsx11.gridx = 0;gridBagConstraintsx11.gridy = 5;gridBagConstraintsx11.insets = new Insets(5,5,5,5);cPane.add(jlbaviablebeds, gridBagConstraintsx11);

    GridBagConstraints gridBagConstraintsx12 = new GridBagConstraints();

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    43/152

    gridBagConstraintsx12.gridx = 1;gridBagConstraintsx12.gridy = 5;gridBagConstraintsx12.insets = new Insets(5,5,5,5);gridBagConstraintsx12.gridwidth = 2;gridBagConstraintsx12.fill = GridBagConstraints.BOTH;cPane.add(jtfaviablebeds, gridBagConstraintsx12);

    GridBagConstraints gridBagConstraintsx13 = new GridBagConstraints();gridBagConstraintsx13.gridx = 1;gridBagConstraintsx13.gridy = 12;gridBagConstraintsx13.insets = new Insets(5,5,5,5);cPane.add(jbnSave, gridBagConstraintsx13);

    GridBagConstraints gridBagConstraintsx14 = new GridBagConstraints();gridBagConstraintsx14.gridx = 2;gridBagConstraintsx14.insets = new Insets(5,5,5,5);gridBagConstraintsx14.gridy = 12;cPane.add(jbnClear, gridBagConstraintsx14);

    GridBagConstraints gridBagConstraintsx15 = new GridBagConstraints();gridBagConstraintsx15.gridx = 3;gridBagConstraintsx15.insets = new Insets(5,5,5,5);gridBagConstraintsx15.gridy = 12;cPane.add(back, gridBagConstraintsx15);

    jbnSave.addActionListener(this);

    jbnClear.addActionListener(this);back.addActionListener(this);

    }public void actionPerformed (ActionEvent e){if (e.getSource () == jbnSave){

    savePerson();clear();

    }else if (e.getSource() == jbnClear){

    clear();}else if (e.getSource() == back){

    new mainpage();}}

    // Save the Person into the Address Book public void savePerson(){

    wardno = jtfwardno.getText();if(wardno.equals("")){JOptionPane.showMessageDialog(null, "Please enter Department regno.");

    }else{//create a PersonInfo object and pass it to PersonDAO to save it

    // PersonInfo person = new PersonInfo(name, address, phone, email);// pDAO.savePerson(person);

    try {Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");} catch(java.lang.ClassNotFoundException e) {System.err.print("ClassNotFoundException: ");System.err.println(e.getMessage());}

    try {con=DriverManager.getConnection("jdbc:odbc:bil","","");

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    44/152

    } catch(SQLException ex) {System.err.println("SQLException: " + ex.getMessage());}try{String sql = "INSERT INTO wardmaster2 VALUES ('" + jtfwardno.getText()+

    "','" + jtfwardname.getText() + "','" + jtfwardincharge.getText() + "','" + jtfheadnurse.getText() +"','" + jtfnoofbeds.getText() + "','" + jtfaviablebeds.getText() + "')";

    //JTextField jtfName, jtfAddress, jtfPhone, jtfEmail,jtfIpdno,jtfGender,jtfMarital,jtfFname,jtfDoa,jtfDocref,jtfTpo,jtfCons;;

    PreparedStatement ps = con.prepareStatement(sql);ps.executeUpdate();

    }catch(Exception e){

    JOptionPane.showMessageDialog(null, e.toString());}

    JOptionPane.showMessageDialog(null, "Record Saved");}}

    public void clear(){ jtfwardno.setText(""); jtfwardname.setText(""); jtfwardincharge.setText(""); jtfheadnurse.setText(""); jtfnoofbeds.setText(""); jtfaviablebeds.setText("");

    } }

    Roomtransfer.java

    package patient;import java.awt.Container;import java.awt.Font;import java.awt.GridBagConstraints;import java.awt.GridBagLayout;import java.awt.Insets;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;

    import java.sql.ResultSet;import java.sql.Statement;//import java.sql.ResultSet;import java.sql.SQLException;import java.util.Date;//import java.sql.Statement;//import java.util.ArrayList;//import java.sql.*;import javax.swing.JButton;import javax.swing.JFrame;

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    45/152

    import javax.swing.JLabel;import javax.swing.JOptionPane;import javax.swing.JTextField;

    public class roomtransfer implements ActionListener{private Connection con;

    JFrame appFrame;JLabel one;

    JLabel jlbid,jlbdate, jlbroomfrom,jlbamount,jlbroomto;JTextField jtfId,jtfdate, jtfroomfrom,jtfamount,jtfroomto;JButton jbbsubmit , jbnClear,jbnback,search;String id, date,roomfrom,amount,roomto;

    Container cPane;

    public static void main(String args[]){new roomtransfer();

    }public roomtransfer(){

    id="";date="";roomfrom="";amount="";roomto="";createGUI();

    }public void createGUI(){

    /*Create a frame, get its contentpane and set layout*/appFrame = new JFrame("Room Allocation");

    cPane = appFrame.getContentPane();cPane.setLayout(new GridBagLayout());

    //Arrange components on contentPane and set Action Listeners to each JButtonarrangeComponents();

    appFrame.setSize(1000,1000);appFrame.setResizable(false);appFrame.setVisible(true);appFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    }public void arrangeComponents(){

    jlbid = new JLabel("patient ID");jlbdate = new JLabel(" date");jlbroomfrom = new JLabel("roomfrom no");

    jlbamount = new JLabel("amount");jlbroomto= new JLabel("roomto");

    one=new JLabel("Hospital roomtransfers");Font f=new Font("Arial",Font.BOLD,50);one.setFont(f);jtfId = new JTextField(20);jtfdate = new JTextField(20);jtfroomfrom = new JTextField(20);jtfamount = new JTextField(20);jtfroomto = new JTextField(20);

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    46/152

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    47/152

    gridBagConstraintsx07.gridy = 4;cPane.add(jlbamount, gridBagConstraintsx07);

    GridBagConstraints gridBagConstraintsx08 = new GridBagConstraints();gridBagConstraintsx08.gridx = 1;gridBagConstraintsx08.gridy = 4;gridBagConstraintsx08.gridwidth = 2;gridBagConstraintsx08.insets = new Insets(5,5,5,5);gridBagConstraintsx08.fill = GridBagConstraints.BOTH;cPane.add(jtfamount, gridBagConstraintsx08);

    GridBagConstraints gridBagConstraintsx09 = new GridBagConstraints();gridBagConstraintsx09.gridx = 0;gridBagConstraintsx09.insets = new Insets(5,5,5,5);gridBagConstraintsx09.gridy = 5;cPane.add(jlbroomto, gridBagConstraintsx09);

    GridBagConstraints gridBagConstraintsx10 = new GridBagConstraints();gridBagConstraintsx10.gridx = 1;gridBagConstraintsx10.gridy = 5;gridBagConstraintsx10.gridwidth = 2;gridBagConstraintsx10.insets = new Insets(5,5,5,5);gridBagConstraintsx10.fill = GridBagConstraints.BOTH;cPane.add(jtfroomto, gridBagConstraintsx10);

    GridBagConstraints gridBagConstraintsx17 = new GridBagConstraints();gridBagConstraintsx17.gridx = 3;gridBagConstraintsx17.gridy = 5;gridBagConstraintsx17.gridwidth = 2;gridBagConstraintsx17.insets = new Insets(5,5,5,5);gridBagConstraintsx17.fill = GridBagConstraints.BOTH;cPane.add(search, gridBagConstraintsx17);

    GridBagConstraints gridBagConstraintsx19 = new GridBagConstraints();gridBagConstraintsx19.gridx = 0;gridBagConstraintsx19.gridy = 10;gridBagConstraintsx19.insets = new Insets(5,5,5,5);cPane.add(jbbsubmit, gridBagConstraintsx19);

    GridBagConstraints gridBagConstraintsx20 = new GridBagConstraints();gridBagConstraintsx20.gridx = 1;gridBagConstraintsx20.insets = new Insets(5,5,5,5);gridBagConstraintsx20.gridy =10;cPane.add(jbnClear, gridBagConstraintsx20);

    GridBagConstraints gridBagConstraintsx21 = new GridBagConstraints();

    gridBagConstraintsx21.gridx = 2;gridBagConstraintsx21.insets = new Insets(5,5,5,5);gridBagConstraintsx21.gridy =10;cPane.add(jbnback, gridBagConstraintsx21);

    jbbsubmit.addActionListener(this);jbnClear.addActionListener(this);jbnback.addActionListener(this);search.addActionListener(this);

    }

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    48/152

    public void actionPerformed (ActionEvent e){if (e.getSource () == jbbsubmit){

    deletePerson();submitPerson();

    clear();}else if (e.getSource() == jbnClear){

    clear();}

    else if (e.getSource() == jbnback){new mainpage();

    }else if (e.getSource() == search){

    searchPerson();} }

    void searchPerson(){

    try {Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    } catch(java.lang.ClassNotFoundException e) {System.err.print("ClassNotFoundException: ");System.err.println(e.getMessage());

    }try {

    con=DriverManager.getConnection("jdbc:odbc:bil","","");} catch(SQLException ex) {

    System.err.println("SQLException: " + ex.getMessage());}

    try {String sql = "SELECT * FROM room WHERE roomno= '"+ jtfroomto.getText() +"'";

    // Create a prepared statementStatement s = con.createStatement();ResultSet rs = s.executeQuery(sql);

    if(rs.next()){amount = rs.getString("charges");//Create a PersonInfo object

    //PersonInfo person = newPersonInfo(pid,did,ddate,address,fdate,lline,mobile,room,exp,eid,tfrom,tto,rno,ipdpatientroom,opdpatientroom);

    //Add the person object to array list//personsList.add(person);

    jtfamount.setText(amount);}}catch(Exception e){

    System.out.println("D");

    System.out.println(e);}

    //return personsList;}

    public void deletePerson(){id= jtfId.getText();

    id = id.toUpperCase();if(id.equals("")){

    JOptionPane.showMessageDialog(null,"Please enter patientroom id todelete.");

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    49/152

    }else{

    //remove Person of the given name from the Address Book databaseint numberOfDeleted =removePerson(id);

    JOptionPane.showMessageDialog(null, numberOfDeleted + " Record(s)deleted.");

    } }public int removePerson(String id){

    int no = 0;try {

    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");} catch(java.lang.ClassNotFoundException e) {

    System.err.print("ClassNotFoundException: ");System.err.println(e.getMessage());

    }try {

    con=DriverManager.getConnection("jdbc:odbc:bil","","");} catch(SQLException ex) {

    System.err.println("SQLException: " + ex.getMessage());}

    try{String sql = "DELETE FROM patientroom WHERE ipdno = '" + id + "'";System.out.println(id);// Create a Prepared statement//con=DriverManager.getConnection("jdbc:odbc:hos","","");

    } catch(SQLException ex) {PreparedStatement ps = con.prepareStatement(sql);

    ps.executeUpdate();no=1;

    }catch(Exception e){System.out.println(e);}return no;

    }// submit the Person into the Address Book public void submitPerson(){

    id = jtfId.getText();if(id.equals("")){

    JOptionPane.showMessageDialog(null, "Please enter roomtransfer Id.");}else{

    //create a PersonInfo object and pass it to PersonDAO to submit it// PersonInfo person = new PersonInfo(name, address, phone, email);// pDAO.submitPerson(person);

    try {

    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    } catch(java.lang.ClassNotFoundException e) {System.err.print("ClassNotFoundException: ");System.err.println(e.getMessage());

    }try {

    con=DriverManager.getConnection("jdbc:odbc:bil","","");} catch(SQLException ex) {

    System.err.println("SQLException: " + ex.getMessage());

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    50/152

    }try

    {String sql = "INSERT INTO patientroom VALUES ('" +

    jtfId.getText()+ "','" + jtfdate.getText() + "','" + jtfroomfrom.getText() + "','" + jtfamount.getText()+ "','" + jtfroomto.getText() + "')";

    / /JTextField jtfName, jtfAddress, jtfPhone, jtfEmail,jtfIpdno,jtfGender,jtfMarital,jtfFname,jtfDoa,jtfDocref,jtfTpo,jtfCons;;

    PreparedStatement ps = con.prepareStatement(sql);ps.executeUpdate();

    }catch(Exception e){

    JOptionPane.showMessageDialog(null, e.toString());}

    JOptionPane.showMessageDialog(null, "Record submitd");}}

    public void clear(){ jtfId.setText(""); jtfdate.setText(""); jtfroomfrom.setText(""); jtfamount.setText(""); jtfroomto.setText("");

    }}

    Patientbilling.java

    package patient;import java.awt.Container;import java.awt.GridBagConstraints;import java.awt.GridBagLayout;import java.awt.Insets;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.Statement;//import java.sql.ResultSet;import java.sql.SQLException;import java.util.Date;//import java.sql.Statement;

    //import java.util.ArrayList;//import java.sql.*;import javax.swing.JButton;import javax.swing.JFrame;import javax.swing.JLabel;import javax.swing.JOptionPane;import javax.swing.JTextField;

    public class patientbilling implements ActionListener{

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    51/152

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    52/152

    }

    public void arrangeComponents(){jlbbillno = new JLabel("Bill No");jlbdate = new JLabel(" Date");jlbipd = new JLabel("Pid");jlbname = new JLabel("Name");jlbtreatment = new JLabel("Treatment");jlbamt= new JLabel("Treatment charges");jlbroomcharges = new JLabel("Room Charges");jlbmedcharges = new JLabel("MEDICINE charges");jlblabtestcharges=new JLabel("lAB TEST Charges");jlbbloodcharges=new JLabel("blood CHARGES");jlbothercharges=new JLabel("OTHER Charges");jlbtotalcharges=new JLabel("TOTAL");

    jtfbillno = new JTextField(20);jtfdate = new JTextField(20);jtfipd = new JTextField(20);jtfname = new JTextField(20);jtftreatment = new JTextField(20);jtfamt = new JTextField(20);jtfroomcharges = new JTextField(20);jtfmedcharges = new JTextField(20);jtflabtestcharges = new JTextField(20);jtfbloodcharges = new JTextField(20);jtfothercharges = new JTextField(20);

    jtftotalcharges = new JTextField(20);

    jbbSave = new JButton("Save");jbnClear = new JButton("Clear");back = new JButton("Back");auto=new JButton("Auto");total=new JButton("Total");

    Date s=new Date();String ss=s.toString();

    jtfdate.setText(ss);

    /*add all initialized components to the container*/GridBagConstraints gridBagConstraintsx01 = new GridBagConstraints();

    gridBagConstraintsx01.gridx = 0;gridBagConstraintsx01.gridy = 0;

    gridBagConstraintsx01.insets = new Insets(5,5,5,5);cPane.add(jlbbillno, gridBagConstraintsx01);

    GridBagConstraints gridBagConstraintsx02 = new GridBagConstraints();gridBagConstraintsx02.gridx = 1;gridBagConstraintsx02.insets = new Insets(5,5,5,5);gridBagConstraintsx02.gridy = 0;gridBagConstraintsx02.gridwidth = 2;gridBagConstraintsx02.fill = GridBagConstraints.BOTH;cPane.add(jtfbillno, gridBagConstraintsx02);

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    53/152

    GridBagConstraints gridBagConstraintsx03 = new GridBagConstraints();gridBagConstraintsx03.gridx = 0;gridBagConstraintsx03.insets = new Insets(5,5,5,5);gridBagConstraintsx03.gridy = 1;cPane.add(jlbdate, gridBagConstraintsx03);

    GridBagConstraints gridBagConstraintsx04 = new GridBagConstraints();gridBagConstraintsx04.gridx = 1;gridBagConstraintsx04.insets = new Insets(5,5,5,5);gridBagConstraintsx04.gridy = 1;gridBagConstraintsx04.gridwidth = 2;gridBagConstraintsx04.fill = GridBagConstraints.BOTH;cPane.add(jtfdate, gridBagConstraintsx04);

    GridBagConstraints gridBagConstraintsx05 = new GridBagConstraints();gridBagConstraintsx05.gridx = 0;gridBagConstraintsx05.insets = new Insets(5,5,5,5);gridBagConstraintsx05.gridy = 2;cPane.add(jlbipd, gridBagConstraintsx05);

    GridBagConstraints gridBagConstraintsx06 = new GridBagConstraints();gridBagConstraintsx06.gridx = 1;gridBagConstraintsx06.gridy = 2;gridBagConstraintsx06.insets = new Insets(5,5,5,5);gridBagConstraintsx06.gridwidth = 2;gridBagConstraintsx06.fill = GridBagConstraints.BOTH;cPane.add(jtfipd, gridBagConstraintsx06);

    GridBagConstraints gridBagConstraintsx88 = new GridBagConstraints();gridBagConstraintsx88.gridx = 3;gridBagConstraintsx88.gridy = 2;gridBagConstraintsx88.insets = new Insets(5,5,5,5);cPane.add(auto, gridBagConstraintsx88);

    GridBagConstraints gridBagConstraintsx07 = new GridBagConstraints();gridBagConstraintsx07.gridx = 0;gridBagConstraintsx07.insets = new Insets(5,5,5,5);gridBagConstraintsx07.gridy = 3;cPane.add(jlbname, gridBagConstraintsx07);

    GridBagConstraints gridBagConstraintsx08 = new GridBagConstraints();gridBagConstraintsx08.gridx = 1;

    gridBagConstraintsx08.gridy = 3;gridBagConstraintsx08.gridwidth = 2;gridBagConstraintsx08.insets = new Insets(5,5,5,5);gridBagConstraintsx08.fill = GridBagConstraints.BOTH;cPane.add(jtfname, gridBagConstraintsx08);

    GridBagConstraints gridBagConstraintsx09 = new GridBagConstraints();gridBagConstraintsx09.gridx = 0;gridBagConstraintsx09.gridy = 4;

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    54/152

    gridBagConstraintsx09.insets = new Insets(5,5,5,5);cPane.add(jlbtreatment, gridBagConstraintsx09);

    GridBagConstraints gridBagConstraintsx10 = new GridBagConstraints();gridBagConstraintsx10.gridx = 1;gridBagConstraintsx10.gridy = 4;gridBagConstraintsx10.insets = new Insets(5,5,5,5);gridBagConstraintsx10.gridwidth = 2;gridBagConstraintsx10.fill = GridBagConstraints.BOTH;cPane.add(jtftreatment, gridBagConstraintsx10);

    GridBagConstraints gridBagConstraintsx11 = new GridBagConstraints();gridBagConstraintsx11.gridx = 0;gridBagConstraintsx11.gridy = 5;gridBagConstraintsx11.insets = new Insets(5,5,5,5);cPane.add(jlbamt, gridBagConstraintsx11);

    GridBagConstraints gridBagConstraintsx12 = new GridBagConstraints();gridBagConstraintsx12.gridx = 1;gridBagConstraintsx12.gridy = 5;gridBagConstraintsx12.insets = new Insets(5,5,5,5);gridBagConstraintsx12.gridwidth = 2;gridBagConstraintsx12.fill = GridBagConstraints.BOTH;cPane.add(jtfamt, gridBagConstraintsx12);

    GridBagConstraints gridBagConstraintsx13 = new GridBagConstraints();gridBagConstraintsx13.gridx = 0;gridBagConstraintsx13.gridy = 6;gridBagConstraintsx13.insets = new Insets(5,5,5,5);cPane.add(jlbroomcharges, gridBagConstraintsx13);

    searchPerson();GridBagConstraints gridBagConstraintsx14 = new GridBagConstraints();gridBagConstraintsx14.gridx = 1;gridBagConstraintsx14.gridy = 6;gridBagConstraintsx14.insets = new Insets(5,5,5,5);gridBagConstraintsx14.gridwidth = 2;gridBagConstraintsx14.fill = GridBagConstraints.BOTH;cPane.add(jtfroomcharges, gridBagConstraintsx14);

    GridBagConstraints gridBagConstraintsx15 = new GridBagConstraints();gridBagConstraintsx15.gridx = 0;gridBagConstraintsx15.gridy = 7;

    gridBagConstraintsx15.insets = new Insets(5,5,5,5);cPane.add(jlbmedcharges, gridBagConstraintsx15);

    GridBagConstraints gridBagConstraintsx16 = new GridBagConstraints();gridBagConstraintsx16.gridx = 1;gridBagConstraintsx16.gridy = 7;gridBagConstraintsx16.insets = new Insets(5,5,5,5);gridBagConstraintsx16.gridwidth = 2;gridBagConstraintsx16.fill = GridBagConstraints.BOTH;

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    55/152

    cPane.add(jtfmedcharges, gridBagConstraintsx16);

    // GridBagConstraints gridBagConstraintsx50 = new GridBagConstraints();//gridBagConstraintsx50.gridx = 3;//gridBagConstraintsx50.gridy = 7;//gridBagConstraintsx50.insets = new Insets(5,5,5,5);//cPane.add(total, gridBagConstraintsx50);

    GridBagConstraints gridBagConstraintsx17 = new GridBagConstraints();gridBagConstraintsx17.gridx = 0;gridBagConstraintsx17.gridy = 8;gridBagConstraintsx17.insets = new Insets(5,5,5,5);cPane.add(jlblabtestcharges, gridBagConstraintsx17);

    GridBagConstraints gridBagConstraintsx18 = new GridBagConstraints();gridBagConstraintsx18.gridx = 1;gridBagConstraintsx18.gridy = 8;gridBagConstraintsx18.insets = new Insets(5,5,5,5);gridBagConstraintsx18.gridwidth = 2;gridBagConstraintsx18.fill = GridBagConstraints.BOTH;cPane.add(jtflabtestcharges, gridBagConstraintsx18);

    GridBagConstraints gridBagConstraintsx19 = new GridBagConstraints();gridBagConstraintsx19.gridx = 0;gridBagConstraintsx19.gridy = 9;gridBagConstraintsx19.insets = new Insets(5,5,5,5);cPane.add(jlbbloodcharges, gridBagConstraintsx19);

    GridBagConstraints gridBagConstraintsx20 = new GridBagConstraints();gridBagConstraintsx20.gridx = 1;gridBagConstraintsx20.gridy = 9;gridBagConstraintsx20.insets = new Insets(5,5,5,5);gridBagConstraintsx20.gridwidth = 2;gridBagConstraintsx20.fill = GridBagConstraints.BOTH;cPane.add(jtfbloodcharges, gridBagConstraintsx20);

    GridBagConstraints gridBagConstraintsx21 = new GridBagConstraints();gridBagConstraintsx21.gridx = 0;gridBagConstraintsx21.gridy = 10;gridBagConstraintsx21.insets = new Insets(5,5,5,5);cPane.add(jlbothercharges, gridBagConstraintsx21);

    GridBagConstraints gridBagConstraintsx22 = new GridBagConstraints();gridBagConstraintsx22.gridx = 1;gridBagConstraintsx22.gridy = 10;gridBagConstraintsx22.insets = new Insets(5,5,5,5);gridBagConstraintsx22.gridwidth = 2;gridBagConstraintsx22.fill = GridBagConstraints.BOTH;cPane.add(jtfothercharges, gridBagConstraintsx22);

    GridBagConstraints gridBagConstraintsx23 = new GridBagConstraints();

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    56/152

    gridBagConstraintsx23.gridx = 0;gridBagConstraintsx23.gridy =11;gridBagConstraintsx23.insets = new Insets(5,5,5,5);cPane.add(jlbtotalcharges, gridBagConstraintsx23);

    GridBagConstraints gridBagConstraintsx24 = new GridBagConstraints();gridBagConstraintsx24.gridx = 1;gridBagConstraintsx24.gridy = 11;gridBagConstraintsx24.insets = new Insets(5,5,5,5);gridBagConstraintsx24.gridwidth = 2;gridBagConstraintsx24.fill = GridBagConstraints.BOTH;cPane.add(jtftotalcharges, gridBagConstraintsx24);

    GridBagConstraints gridBagConstraintsx28 = new GridBagConstraints();gridBagConstraintsx28.gridx = 3;gridBagConstraintsx28.gridy = 11;gridBagConstraintsx28.insets = new Insets(5,5,5,5);cPane.add(total, gridBagConstraintsx28);

    GridBagConstraints gridBagConstraintsx25 = new GridBagConstraints();

    gridBagConstraintsx25.gridx = 0;gridBagConstraintsx25.gridy = 12;gridBagConstraintsx25.insets = new Insets(5,5,5,5);cPane.add(jbbSave, gridBagConstraintsx25);

    GridBagConstraints gridBagConstraintsx26 = new GridBagConstraints();gridBagConstraintsx26.gridx = 1;gridBagConstraintsx26.insets = new Insets(5,5,5,5);gridBagConstraintsx26.gridy = 12;cPane.add(jbnClear, gridBagConstraintsx26);

    GridBagConstraints gridBagConstraintsx27 = new GridBagConstraints();gridBagConstraintsx27.gridx = 2;gridBagConstraintsx27.insets = new Insets(5,5,5,5);gridBagConstraintsx27.gridy = 12;cPane.add(back, gridBagConstraintsx27);

    jbbSave.addActionListener(this);jbnClear.addActionListener(this);back.addActionListener(this);auto.addActionListener(this);total.addActionListener(this);

    }

    public void actionPerformed (ActionEvent e){

    if (e.getSource () == jbbSave){savePerson();deletePerson();clear();

    }

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    57/152

    else if (e.getSource() == jbnClear){clear();

    }else if (e.getSource() == back){

    new mainpage();}

    else if (e.getSource() ==total){total();

    }else if (e.getSource() == auto){

    searchPerson1();searchPerson2();searchPerson3();searchPerson4();searchPerson5();searchPerson6();searchPerson7();

    }

    }

    public void total(){

    String tc=jtfamt.getText();int tc1=Integer.parseInt(tc);

    String rc=jtfroomcharges.getText();int rc1=Integer.parseInt(rc);

    String lab=jtflabtestcharges.getText();int lab1=Integer.parseInt(lab);

    String med=jtfmedcharges.getText();int med1=Integer.parseInt(med);

    String bl=jtfbloodcharges.getText();int bl1=Integer.parseInt(bl);

    String oc=jtfothercharges.getText();int oc1=Integer.parseInt(oc);

    int total=0;

    total=tc1+rc1+lab1+med1+oc1+bl1;

    String xx=Integer.toString(total);

    jtftotalcharges.setText(xx);}

    void searchPerson(){String billno;

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    58/152

    try {Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    } catch(java.lang.ClassNotFoundException e) {

    System.err.print("ClassNotFoundException: ");System.err.println(e.getMessage());

    }

    try {con=DriverManager.getConnection("jdbc:odbc:bil","","");

    } catch(SQLException ex) {System.err.println("SQLException: " + ex.getMessage());

    }

    try {

    String sql = "SELECT max(billno)+1 as bill FROM patientbill2 ";

    // Create a prepared statementStatement s = con.createStatement();

    ResultSet rs = s.executeQuery(sql);

    if(rs.next()){

    billno = rs.getString("bill");

    //Create a PersonInfo object//PersonInfo person = new

    PersonInfo(pid,did,dname,address,fname,lline,mobile,category,exp,eid,tfrom,tto,rno,ipdcharge,opdcharge);

    //Add the person object to array list//personsList.add(person);

    jtfbillno.setText(billno);

    }}catch(Exception e){

    System.out.println("D");System.out.println(e);

    }

    //return personsList;

    }

    void searchPerson1(){String amt;try {

    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    59/152

    } catch(java.lang.ClassNotFoundException e) {System.err.print("ClassNotFoundException: ");System.err.println(e.getMessage());

    }

    try {con=DriverManager.getConnection("jdbc:odbc:bil","","");

    } catch(SQLException ex) {System.err.println("SQLException: " + ex.getMessage());

    }

    try {

    String sql = "SELECT sum(amount) as amt FROM treatment3 wherepid='" + jtfipd.getText() + "' ";

    // Create a prepared statementStatement s = con.createStatement();

    ResultSet rs = s.executeQuery(sql);

    if(rs.next()){

    amt = rs.getString("amt");

    //Create a PersonInfo object//PersonInfo person = new

    PersonInfo(pid,did,dname,address,fname,lline,mobile,category,exp,eid,tfrom,tto,rno,ipdcharge,opdcharge);

    //Add the person object to array list//personsList.add(person);

    jtfamt.setText(amt);

    }}catch(Exception e){

    System.out.println("D");System.out.println(e);

    }

    //return personsList;

    }

    void searchPerson5(){String amt;

    try {Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    } catch(java.lang.ClassNotFoundException e) {

    System.err.print("ClassNotFoundException: ");

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    60/152

    System.err.println(e.getMessage());}

    try {con=DriverManager.getConnection("jdbc:odbc:bil","","");

    } catch(SQLException ex) {System.err.println("SQLException: " + ex.getMessage());

    }

    try { String sql = "SELECT sum(charges) as amt FROM medicines1 where pid='" + jtfipd.getText() + "'";

    // Create a prepared statementStatement s = con.createStatement();

    ResultSet rs = s.executeQuery(sql);

    if(rs.next()){

    amt = rs.getString("amt");

    //Create a PersonInfo object//PersonInfo person = new

    PersonInfo(pid,did,dname,address,fname,lline,mobile,category,exp,eid,tfrom,tto,rno,ipdcharge,opdcharge);

    //Add the person object to array list//personsList.add(person);

    jtfmedcharges.setText(amt);

    }}catch(Exception e){

    System.out.println("D");System.out.println(e);

    }

    //return personsList;

    }void searchPerson6(){

    String amt;

    try {Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    } catch(java.lang.ClassNotFoundException e) {

    System.err.print("ClassNotFoundException: ");System.err.println(e.getMessage());

    }

  • 8/7/2019 PATIENT_BILLING_SOFTWARE1-rk project

    61/152

    try {con=DriverManager.getConnection("jdbc:odbc:bil","","");

    } catch(SQLException ex) {System.err.println("SQLException: " + ex.getMessage());

    }

    try { String sql = "SELECT sum(amount) as amt FROM lab1 where pi


Recommended