To Renie For The Support You Gave. Thank You.: Dedicatcion

  • Uploaded by: TRYVERN MAMIZA
  • 0
  • 0
  • February 2021
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View To Renie For The Support You Gave. Thank You.: Dedicatcion as PDF for free.

More details

  • Words: 24,328
  • Pages: 231
Loading documents preview...
DEDICATCION

To Renie for the support you gave. Thank you.

ABSTRACT

This is a concise research as a requirement for Part III National Diploma in Information Technology. The subject of research is eLogistics and warehousing management system. It is hoped that this study will detail as much as possible the issues involved in a research study from project inception through to system implementation. This project is aimed at developing an information management system for Hospitals. The writer visited Kwekwe General Hospital to establish the system requirements. The system is expected to be achieved through the creation of a database to store patient details, the design of a user-friendly Visual Basic interface and integrating the two to complete the system. The information management system is going to simplify and automate patient records in hospitals. It has happened over the past few years in the disciplines of the economy and there is no reason why it cannot happen in the health sector as well.

In Zimbabwe, Hospital data has been largely handled using manual filing and, or spreadsheet programs. A number of limitations in functionality, multi user accessibility, and duplication of data, supplier/product details updates, report writing and high volume data handling have been encountered. These have led to complications in accessing correct data.

This project offers an alternative method of handling, processing and accessing data using a database system which is also compatible with the traditional spreadsheets approach,

leading to greater data manipulation, greater storage in a robust system, easier accessibility, multi user access, no duplication, easier reporting and filtering. This software product: Hospital Management System, was developed using Visual Basic 6.0.

It is hoped that this project will go a long way to contribute to the development of new Hospital Management Systems. Developed for all Hospitals.

ACKNOWLEDGEMENTS My tender gratitude goes to my Fellow classmates for the incessant productive criticisms which made this project come to success. Profound regards also goes to my family for the support they have given me so far during my studies.

Many thanks to Kwekwe General Hospital for allowing me access to information regarding their internal operations and for giving me case study material for use in this project

To the lecturers at BTTC, I gratefully acknowledge the generous help and support through lectures and consultations during the course of this project and indeed the years of study at BTTC. The lectures have helped to turn class knowledge into practical experience, which will be very useful in the future of my career in information technology. Many thanks to my Project Supervisor Mr Ziwada for his assistance and above all patience he paid during the course of this project Development.

Last, but not least, I acknowledge the assistance of all those who offered their bit, no matter how little it was, although I haven’t mentioned you by name, thank you so much.

PREFACE The HIGHER EXAMINATION COUNCIL (HEXCO) requires that every student at the National Diploma Level of the Information Technology Course undertake a SYSTEM DEVELOPMENT PROJECT. The project is aimed at testing the ability of the student to analyze business problems and hence develop computerized solutions to these problems. This

project

has

been

designed

according

to

the

EXAMINATIONS COUNCIL standards and requirements.

HIGHER

EDUCATION

TERMS OF REFERENCE 

To come up with software development project of a computerized business application using Visual Basic.



Details of the existing system are to be outlined.



To evaluate alternatives so as to come up with the most effective computer system.



To incorporate the different subsystems found in the system and their interrelationships.



Programs are to be incorporated in the system.



Security features of the system and background information.



Define in details the inputs processes and output of the system.

AIMS AND OBJECTIVES:



To develop and implement a system that is efficient and yet user friendly, to ease the burden of any first time users who might not have dealt extensively with computers before.



To provide security and privacy of data, mostly from accidental loss through e.g. fire, or from deliberate loss by disgruntled employees or rogues who intend to cause harm to the data held.



To find an easy way to update records with shared information.



To create a system, which would make provision of back up easy and nonstrenuous



To provide a system that would ensure that transactions are done timely and records are updated as soon as possible, increasing their efficiency and business.



To implement a system that would provide a reliable backup source in case of any misdemeanor, whether deliberate or accidental

BACKGROUND INFORMATION

INTRODUCTION The health sector is one of the areas, which is moving on a slow pace as far as information technology is concerned especially in Zimbabwe. In a bid to improve the quality of health services, the governments worldwide are computerizing most of the work in public hospitals and this has improved their information management. Most Hospitals, small private clinics and surgeries have been reluctant to change their systems the main reason being that they see themselves as small hence they don’t need information management systems. Most of them rely on manual systems with a lot of filing and paper work. Of late, recent trends reveal that the cost of hospital stationery is increasing significantly especially in the hyperinflationary environment like Zimbabwe’s.

I my research work at Kwekwe General Hospital. Kwekwe General Hospital is a referral hospital situated at the heart of Zimbabwe. It is Government Health institution found in 1936 and was upgraded to its present state by the government in 1978. The hospital falls under the Ministry of Health and Child Welfare. It is one of the biggest hospitals in the country and offers many services included are medical treatment and training to medical staff such as doctors, nurses, physiotherapists and Dentist. The hospital consists of many departments such as the Accounts, Pharmacy, Admissions, Outpatients and Health Information and Medical Records department.

Currently the system in use is manual. Patients coming to the hospital first pass through the OPD where he/she pays an initial consultation fee for medical card stamping if the patient is new then he/she has to buy the medical card. Clinical services at the OPD are offered such Temperature taking, Weight and Bp. This is recorded in the medical card. An initial medical diagnosis is done by a nurse on call who then decides whether to offer prescription to the patient or make an appointment for the patient with the doctor. The doctor will then provide medication for the patient and decide on whether it is necessary to admit the patient into the hospital for further treatments. After a patient is given a directive by the doctor to be admitted then the patient has to pass through the admissions where bed and ward allotment is done. When a patient is admitted a progress report is written everyday. This done all manually therefore the need to introduce a cost effective information management system in the hospital is inevitable. Effective Information management systems will see the Hospital providing the market with a service second to none

What is an Information management system? Information Management is the administration of information, its uses and transmission, and the application of theories and techniques of information science to create, modify, or improve information handling systems. Information Management System is the area of Information Technology (IT) that is concerned with configuring, maintaining, and managing information resources by electronic means. The "management" refers to supervising the information technology systems in an organization. This

includes the selection and purchase of IT equipment and software, distributing and installing it in local and remote sectors of the company or organization, and configuring it so that it integrates with existing systems.

Hospitals also need these type of system management tools, to handle multidoctor appointments, accounting information and patient details but often encounter difficulties due to lack of dedicated IT staff and/or budget limitations.

The ultimate goal of information management system is to provide an effective way of service delivery to the owners and various stakeholders in health sector. By doing so, it's possible to identify waste and duplication so that costs are controlled and resources are used in the most efficient manner. If a company's system management process is running smoothly, the entire IT infrastructure will operate efficiently.

Computerized management information systems are being used in almost every corner of the world be it retail, commerce, industry, health and agriculture. Efficient and effective information management is becoming a competitive edge of most organizations, which has resulted in continued survival in the modern sophisticated and dynamic business environment.

ANALYSIS OF THE CURRENT SYSTEM

FACT FINDING TECHNIQUES Fact-finding is an important activity in system investigation. These are the activities that enable you to gather information about the organisation, the problems that have led to the system request and the detailed system requirements.

In this stage, the functioning of the system is to be understood by the system analyst to design the proposed system. Various methods are used for this and these are known as fact-finding techniques. The analyst needs to fully understand the current system.

The analyst needs data about the requirements and demands of the project undertaken and the techniques employed to gather this data are known as fact-finding techniques.

The researcher used the following investigatory methods in the extraction of information:  Interviews

 Questionnaires  Observations  Sampling of Documents Questionnaires A questionnaire is a instrument consisting of a series of and other prompts for the purpose of gathering information from respondents. Although they are often designed for analysis of the responses, this is not always the case. Questionnaires are an inexpensive way to gather data from a potentially large number of respondents. Often they are the only feasible way to reach a number of reviewers large enough to allow statistically analysis of the results. A well-designed questionnaire that is used effectively can gather information on both the overall performance of the test system as well as information on specific components of the system. If the questionnaire includes demographic questions on the participants, they can be used to correlate performance and satisfaction.

FINDINGS FROM QUESTIONNAIRES

There was a high response from members of staff . Much of the responses I gathered were against the current system operation which is time consuming and strenuous. Much of the staff especially the clerks who are involved in data capturing expressed dismay with how things are done at the hospital.

WHY QUESTIONNAIRES WERE USED  Questionnaires are very cost effective when compared to face-to-face interviews. This is especially true for studies involving large sample sizes and large geographic areas. Written questionnaires become even more cost effective as the number of research questions increases.  Questionnaires are easy to analyze. Data entry and tabulation for nearly all surveys can be easily done with many computer software packages.  Questionnaires are familiar to most people. Nearly everyone has had some experience completing questionnaires and they generally do not make people apprehensive.  Questionnaires reduce bias. There is uniform question presentation and no middle-man bias. The researcher's own opinions will not influence the respondent to answer questions in a certain manner. There are no verbal or visual clues to influence the respondent.

 Questionnaires are less intrusive than telephone or face-to-face surveys. When a respondent receives a questionnaire in the mail, he is free to complete the questionnaire on his own time-table. Unlike other research methods, the respondent is not interrupted by the research instrument

DRAWBACKS OF USING QUESTIONNAIRES  One major disadvantage of written questionnaires is the possibility of low response rates. Low response is the curse of statistical analysis. It can dramatically lower our confidence in the results. Response rates vary widely from one questionnaire to another (10% - 90%), however, well-designed studies consistently produce high response rates.  Another disadvantage of questionnaires is the inability to probe responses. Questionnaires are structured instruments. They allow little flexibility to the respondent with respect to response format. In essence, they often lose the "flavor of the response" (i.e., respondents often want to qualify their answers). By allowing frequent space for comments, the researcher can partially overcome this disadvantage. Comments are among the most helpful of all the information on the questionnaire, and they usually provide insightful information that would have otherwise been lost.

 Nearly ninety percent of all communication is visual. Gestures and other visual cues are not available with written questionnaires. The lack of personal contact will have different effects depending on the type of information being requested. A questionnaire requesting factual information will probably not be affected by the lack of personal contact. A questionnaire probing sensitive issues or attitudes may be severely affected.  When returned questionnaires arrive in the mail, it's natural to assume that the respondent is the same person you sent the questionnaire to. This may not actually be the case. Many times business questionnaires get handed to other employees for completion. Housewives sometimes respond for their husbands. Kids respond as a prank. For a variety of reasons, the respondent may not be who you think it is. It is a confounding error inherent in questionnaires.  Finally, questionnaires are simply not suited for some people. For example, a written survey to a group of poorly educated people might not work because of reading skill problems. More frequently, people are turned off by written questionnaires because of misuse.

Questionnaire Sample The following is a sample questionnaire for hospital staff members. Please fill in the questionnaire. Try to answer all the questions as detailed as possible. Your co-operation is greatly appreciated.

Recommendations for the new system 1. What services does the hospital offer? (List your answers below)

2. How many patients do you accommodate per day?

3. What criteria is used in tracking a patient’s record?

4. The speeds at which services are provided are favorable and fast. (Tick where appropriate) I agree Do not agree No opinion

5. Which departments are responsible for the following tasks? a) Keeping records of patients

b) Distribution of drugs

c) Settling patients debts

d) Scheduling doctor’s Appointments with the patient

e) What happens to the records when their period of use has expired?

f) What problems, if any, have you experienced in storing or accessing this information?

OBSERVATION Observation is one of the most effective fact-finding techniques you can use to understand a system. With this technique, you can either participate in, or watch a person performing activities to learn about the system. This technique is particularly useful when the validity of data collected through other methods is in question or when the complexity of certain aspects of the system prevents a clear explanation by the end-users.

As with the other fact-finding techniques, successful observation requires much preparation. To ensure that the observation is successful, you will want to know as much about the individuals and the activity to be observed as possible. For example, when are the low, normal, and peak periods for the activity being observed and will the individuals be upset by having someone watch and record their actions? The advantages and disadvantages of using observation as a fact-finding technique are listed in the following table

WHY OBSERVATIONS WERE USED 

Allows the validity of facts and data to be checked



Observer can see exactly what is being done



Observer can also obtain data describing the physical environment of the task



Relatively inexpensive



Observer can do work measurements

DRAWBACKS OF USING OBSERVATION 

People may knowingly or unknowingly perform differently when being observed



May miss observing tasks involving different levels of difficulty or volume normally experienced during that time period



Some tasks may not always be performed in the manner in which they are observed



May be impractical

Schematic of observation recording sheet

Date

.................................................................................................... .................................................................................................... .................................................................................................... .................................................................................................... Time .................................................................................................... .................................................................................................... .................................................................................................... Department under Observation .................................................................................................... ................. Observations

....................................................................................................... ....................................................................................................... ....................................................................................................... ....................................................................................................... ....................................................................................................... ......... ....................................................................................................... ....................................................................................................... ....................................................................................................... .......................................................................................................

Conclusion/summary

Recommendations

Findings from Observation My first port of call was the OPD department where all patients coming into the hospital pass through. The disturbing factor was the time spent by each patient to get his/her chance to be served, the same scenario was present on the Doctors’ examination room and in the admissions office. INTERVIEWS Interviewing is the most commonly used, and normally most useful, fact-finding technique. You can interview to collect information from individuals face-to-face. There

can be several objectives to using interviewing such as finding out facts, verifying facts, clarifying facts, generating enthusiasm, getting the end-user involved, identifying requirements, and gathering ideas and opinions. However, using the interviewing technique requires good communication skills for dealing effectively with people who have different values, priorities, opinions, motivations, and personalities. As with other fact-finding techniques, interviewing isn't always the best method for all situations WHY INTERVIEWS WERE USED 

Allows interviewee to respond freely and openly to questions



Allows interviewee to feel part of project



Allows interviewer to follow up on interesting comments made by interviewee



Allows interviewer to adapt or reword questions during interview



Allows interviewer to observe interviewee's body language

QUESTIONS ASKED DURING INTERVIEWS The researcher visited various privately owned surgeries and clinics in Harare and conducted a number of interviews to establish the weaknesses of the current information management system and to come up with the system requirements for the automated information management system. The researcher frequently conducted a number of interviews with the various private clinics and surgeries personnel scattered around the Harare city center. The following is the list of questions asked: Types of fees charged 

What fees do you charge?



How do you treat patients on medical aid?



How do you trace a patient’s payment record?



What documentation if any is used in (1.a.) above?



What documentation used in communicating the fees charged to patients?

Storage of information  

What specific transaction records do you keep? What documentation is used in this storage?

For how long are these records kept?



What happens to the records when their period of use has expired?

Uses of information  

What specific use do you put to the above specified information? Who are the consumers of this information and what specific aspects of it do they require?



What problems, if any, have you experienced in storing or accessing this information?



What opportunities for further utilization of the information would you want explored?

Computer System Do you have a computer system within your immediate office? If you do have a computer system, what are its technical specifications? How would you appraise your level of computer literacy? DRAWBACKS OF INTERVIEWS 

Very time-consuming and costly, and therefore may be impractical



Success is dependent on communication skills of interviewer

FINDINGS FROM INTERVIEWS The people targeted were the data captures because they are the sole users of the system. Data captures are involved in the day-to-day running of the business. Personal interviews were carried out to all data captures so as to acquire all their views. Questions were asked directly, fairly and precaution was taken to present the questions in a non suggestive manner without an inclination of leading responses. I had a chance to interview one member of staff from OPD, Admissions office and the Accounts department. Most of the departments at the hospital have computers except for the OPD and the Admissions Office which interact daily with patients. The outcome from the interviews came out with vast complaints from the OPD and Admissions office staff saying the work is strenuous and involves a lot of paperwork. At times patients come seeking their medical records and its really difficult to trace those records. SAMPLING OF DOCUMENTS A useful fact-finding technique is to research the application and problem. Computer trade journals, reference books, and the Internet are good sources of information. They can provide you with information on how others have solved similar problems, plus you can learn whether or not software packages exist to solve your problem

WHY SAMPLING DOCUMENTS WERE USED 

Can save time if solution already exists



Researcher can see how others have solved similar problems or met similar requirements



Keeps researcher up to date with current developments

DRAWBACKS OF SAMPLING DOCUMENTS 

Can be time-consuming



Requires access to appropriate sources of information



May ultimately not help in solving problem because problem is not documented elsewhere

FINDINGS FROM SAMPLING DOCUMENTS The admissions office, which operate hand in glove with the Health Information and Medical records departments create records. All these records are kept in the Health Information Store room. I had to adapt to the system they use to retrieve a particular record for a patient and the whole was strenuous. One has to go through all records using a patient’s Hospital number in order to locate the particular patient’s record.

CURRENT SYSTEM CURRENT SYSTEM DESCRIPTION

1.2 THE CURRENT SYSTEM In most hospitals countrywide, one is given a treatment card on admission or if he/she already possesses one he/she has to produce it. The card contains the treatment history, dates, name of the patient, address, next of kin and the prescriptions given among other things. Payments for those who are not on medical aid are cash up-front and the receipt is attached to the card, for one to be to verify that the patient has paid. The patients have to pay the consultation fee first, then other payments thereafter. Those who are on medical aid have to fill medical aid forms, which are readily available. Depending on the medical aid schemes and the treatments required, the patient may be asked to pay part of their bills in cash. Most surgeries and private clinics keep carbon copy of patients’ records in steel cabinets in their offices. Therefore a lot of filling is involved and some have to employ filling clerks to manage and file the records. It is therefore a common site in private clinics and surgeries to see patients sitting on benches waiting for the clerks to find their records before they proceed for treatment.

There is also a manual facility in most Hospitals, where one can book for an appointment to see the doctor in most cases via the clerk, who will consult with the doctor for free slots. Therefore the handling of appointments in these organizations is subject to human errors and consequently cause inconveniences to patients.

Most of the hospitals have the latest state of the art medical equipment, which needs to be coupled with effective information management to produce better health standards. They have got full intensive care units, up-to-date drug range, oxygen administration suction

and neo-natal incubator instruments among other things. If these equipments are coupled with a better management information system, then a patient will be attended to in a click of the mouse.

1.3 PROPOSED SOLUTION The writer proposes a patient database coupled with a user-friendly interface to facilitate the recording and storage of patients’ information. 1.3.1 System Requirements The system should be able to capture and keep patient details in the system database. The system should provide a platform for multi-doctor and multi-room appointment handler. The system should be able to capture and keep employee details in the system database. The system should record and keep track of each payment transaction from patients and medical aid organizations. Users should be able to run various queries to produce reports when needed. There should be system reports, which act like electronic patient cards, which in turn help the doctor or nurse when executing his/her duties. The system should comply with the rules, regulations, Medical Practitioners Body standards and Zimbabwean health standards

1.3.2 Advantages of the system 

Hospitals shall enjoy improved efficiency in their day-to-day offer of health services.



The system will provide multi Doctor, multi Room appointment handling



The proposed solution shall eliminate filling and reduce the cost of stationary.



Patients will be treated immediately at the press of the mouse click.



The proposed solution will provide accounting information to the stakeholders in a click of the mouse.



The proposed solution will lead to a paperless office.



The public at large shall enjoy high quality service hence the general uplift of the health standards.



System security enhancement –the system shall allow the use of authentication through the use of password and implementation of user levels. Certain users falling under a prescribed user group shall have different views of the system.



Business reviews –The owner shall have the privilege of viewing accounting reports.



The system will provide safe storage of Data to the hospitals.



Backup of system files –The system shall be able to carryout backup of all system resources and also implement the restoration procedure whereby the system can retrace to earlier condition if required to do so.

LIMITATIONS OF THE CURRENT SYSTEM

The system that is currently in use has a number of deficiencies, which are as follows: URGENCY More time is spent during referencing of files in the shelves. Some of the files are not properly filed which causes some problems in referencing and trying to locate the needed file at a particular moment. Since most of the work is done manually, the process of registering a patient takes a lot of time for registration may need the same information of one patient to be dealt with in more than a single book QUALITY AND EFFICIENCY The inefficiency of the system is shown in its inability to always produce a correct output of the patient information, resulting, in some wrong records written for patients. This usually happens when the file cannot be located or the clerks are busy to go through all the papers within the file. The inefficiency is shown when a file cannot be located for a particular patient since it would have been filed in the wrong place.

SPEED AND ACCURACY More time is spent during referencing of files in the file shelves and hence affecting speed by which a file can be locate The system is prone to errors since everything is done manually. A lot of mistakes are encountered during the use of the system and some of them are discovered after completion of that very process.

LIMITED RESOURCES Scarce resources make it difficult for staff to perform their duties. REPORT GENERATION Reports are not produced in time because relevant records are not always available. They have to be searched from the other offices which might be using them also such as the secretary’s office. INFORMATION DISTORTION It was observed that papers wear-out with time such that some patient information is distorted. Also papers are subject to risks such as fire and theft. AIMS OF THE PROJECT To develop a very precise, concise, cost cutting and efficient Hospital Management system OBJECTIVES The main objectives of the System follows: 

To produce an efficient method of offering medical facilities



To allow quick and easy data retrieval for a specific patient



To produce a patient record based on data kept on the patient from the time the patient paid the hospital a visit for the first time up to the time he/she is treated



File Maintenance i.e. the system should possess the capability of adding, deleting and changing data



To produce an efficient method of keeping records about wards including the treatment offered to each patient



To eliminate duplication of data



To respond to emergencies within few minutes



To generate summary reports which calls for decision making. Reduce the workload of administration workers involved in the registration system of the patients as well as getting a better way of handling patients’ information



To provide security to patient information

SYSTEMS ALTERNATIVES o To modify the existing system o To use the services bureaus o To purchase a ready made package o To use in-house resource to develop a new system

ALTERNATIVE A To modify the existing system The existing system can be improved in order to solve some of the problems currently being faced. ADVANTAGES o Simple to design and implement o Least expensive o Enable users to get control of manual procedure DISADVANTAGES 1. Does not provide for inventory growth and management reporting 2. More labor-intensive effort ALTERNATIVE B To use a service bureau A service bureau is a commercial organization with its own computer facility, which offers a range of computing services for hire.

ADVANTAGES



It helps organizations’ non-skilled computer personnel to familiarize themselves with computerized systems before purchasing a computer of their own



Cheaper compared to costs of buying equipment and training. The charges of a bureau are by usage and therefore, if an organization is very small and has few transactions it pays less/cheaper than In-House.



It provides powerful equipment, which take a long lead-time for management to recognize and purchase. Provide sufficient processing power to handle the organizations’ immediate needs.



It provides a number of computer applications, which are difficult to justify In- house because of their requirements for special hardware and software expertise eg use of microfilm and microfiche



It can obtain experts to do design work



It can contact and pay for specific special services that are needed

DISADVANTAGES 

Implementation may be difficult for ‘outsiders ‘ external project management including time, cost and performance



Additional duties will conflict with principles of separation of duties



Organisations’ data will be under control of bureau so there is loss of confidentiality and security of organisations’ data



Services of bureau are made on contract, they are not very reliable as contracts can be terminated



Unscheduled reruns of programs due to faults such as power failures, operator failures and errors will be charged to the organization



To ensure adequate security is being provided, auditors are sent to service bureau to evaluate control in situ. This is expensive and time consuming



One problem is to transport data and information between the two locations

ALTERNATIVE C Purchasing a ready made package Packaged software can be defined as prewritten programs that perform a defined function. ADVANTAGES 

They are immediately available no lead-time from decision to acquire to actual program implementation



Demonstration- System can be demonstrated to user prior to cost being incurred and therefore can insure that the output is really what he needs



The cost is known and there is no development costs and is likely to be cheaper



Have cheaper reliability as well as all errors might have been corrected at the first few sites



Better documentation – Sometimes computer departments do not provide adequate written descriptions of systems



With packaged software the vendor is likely to stress user training would have both the skills and experience to do experience



Ongoing Support- Most reputable packages are sold with on going support



Lower risk of failure- It is already finished compared to development projects, which can have problems of excessive costs, loss of essential development staff and time overruns

DISADVANTAGES 1. The packages do not meet organizations’ requirements 2. Processing efficiency- it is inefficient in its use of storage and speed of processing 3. The package may be difficult to use-will not have the same report layout, data names and general terminology

4. It is likely that it will not be compatible with other computer systems within the organization 5. If modified to meet a particular requirement, it is no longer immediately available, it needs to re-tested and no longer as reliable. Changes would not be reflected in standard documentation 6. Danger of the particular idiosyncrasies of your software being lost as programmers come and go in vendor organizations 7. Can contain some procedures, which a user does not need

ALTERNATIVE D To develop a system using in-house resources ADVANTAGES 1. It meets user requirements 2. It provides users with needed decision support 3. Allows ad-hoc query and reporting 4. It will have the report layout, data names and terminology used by the organization 5. Can be easily modified

6. Addresses specialized problems 7. The user communicate the requirements to the analyst in precisely concrete statements so it will be successful 8. The user is involved in testing, conversion and implementation 9. The procedures would be exactly as the manual system 10. It will contain procedures, which are only needed by the users 11. Eliminates duplication of data 12. Maximum utilization of the current technologies 13. Resources could be further utilized for other functions, for example, accounting 14. Very reliable and very fast in processing data

DISADVANTAGES 1. Inadequate funds to develop to develop the system or buy necessary hardware 2. It expensive to maintain such a system 3. It takes long before the system becomes fully operational 4. It needs training of workers before it is implemented

RECOMMENDED ALTERNATIVE After careful considerations have been made to all possible solutions fourth alternative looks all the best, I therefore recommend that a new system that is user defined be developed in order to meet the daily demands of the current system. It is economical, socially and operationally feasible to undertake the design, development, and implementation of alternative 4 compared to the other three. It is better than the resting terms of the long-term benefits.

JUSTIFICATION The proposed system will impact on the duties, responsibilities and workload of all departments within the organization as it is bound to offer the following: 1. Allows multi user access to information and incorporate on-line enquiry facilities 2. Improve the standard and quality of service to patients through reduced processing turnaround times and availability of information 3. Simplicity in maintaining supplier records, and issues, capturing and storing data and the information held in the system; 4. Efficiency in data manipulation for the processing of reports

5. Allow the user an efficient means of maintaining and updating system management information details and producing reports; 6. There are some common signs that indicate the need to update a system from a spreadsheet based to a database based system. These signs include:

1. When there is creation of numerous spreadsheets containing similar data. 2. When spreadsheets are not allowing the functionality extent that is required. 3. When there is constant modification of data to export it to another user. 4. When changes made in one spreadsheet cause changes to be made in one or more additional spreadsheets. 5. When the system needs to be accessed by two or more people at the same time, and sharing violations are occurring. THE PROPOSED SYSTEM The system will be dominated by the use of computers to save, store and manipulate the data. Controls shall be put in place to control the data entry and accessing of certain data items of great importance. The computerized system aims at eliminating the problems of the manual system.

Compatibility is a characteristic of the new system hereby specified, it can be used on the computer hardware that the organization can acquire from any computer vendor without necessarily specifying one brand of computers. NEW SYSTEM RESTRICTIONS The available resources influence the choice of the system. The system proposed for the Main Stores is very compatible since it is easy to implement. There are however some limitations to the system. These are as follows: 1. Users must know passwords to access the system. The system will not allow two users to access the files unless they know the correct passwords. 2. The system will only allow the administrator in charge to update and make amendments to the data records so as to keep the security and integrity of the system. 3. The system will not use any additional facilities like the scanners or the Internet. When needed the system could be upgraded to use those facilities for communication 4. The system will not allow two different users to perform a single transaction at the same time.

INTRODUCTION This chapter will explore feasibility study for the system and various functional and nonfunctional requirements of the system. Functional requirements will bring into light the services, which the system is going to provide. On the other hand, non-functional requirements will highlight constrains which the system is going to operate under. Nonfunctional requirements will also give an overview of the hardware and software requirements for the system. B 3.1 FEASIBILITY STUDY A feasibility study will give a brief formal analysis of a prospective business idea. The feasibility study will give the reader a clear evaluation of the potential sales and profit after the system is implemented 3.1.1 TECHNICAL FEASIBILITY One out of four private Hospitals have at least a desktop computer or a laptop, which they use for printing purposes. Therefore the system will have a platform to run on for a start. On the developer’s side, both software and hardware for the development and implementation are available in the computer science lab. Software includes Visual Basic

6.0; Msword, Microsoft Access, and Hardware include diskettes and computers. The system interface development will be in Visual Basic, Vbscript, and MSAccess. The developer has experience in the languages and has accumulated a vast library of code that should facilitate rapid application development and deployment. It is therefore anticipated that the project is technically feasible. It is technically feasible to develop the proposal system since management is willing and prepared to pump up economic resources to secure all hardware and software requirements which includes: 11BM Net Vista Pentium 4 computer  256MB RAM  Epson Stylus 480  3,5 Floppy diskette for backups  10gb Hard disk drive  Norton anti virus 2005  Microsoft XP  Microsoft access

3.1.2 OPERATIONAL FEASIBILITY The main objective of this project is to design an information management system for the niche health sector. This will mean that the current system will now be computerized and electronic patient cards introduced. It does not change the whole essence of

information filing as the major objective of developing a pool of customer patients. It is also platform independent i.e. is not restricted to one operating system like Win98, Win200 or WinXP but is portable across most platforms. Operational costs are incurred in the day to day running of the business. Such costs include maintenance costs. Examples include cartridges, bond paper required for printing software upgrade, floppy diskettes and CDs’ for backups. In addition, staff training, hardware repairs as well as operational salaries are part of operational costs. Conversion and change over costs have also to be taken into account. Overtime payment is also an operational cost. Payments to debt collector are also make up operational costs. c) Tangible Benefits:- Patient satisfaction leads to more cash inflow to the hospital. There is an increase in job done.

d) Intangible Benefits:- Reduction in the rate at which error occur especially in the calculation of overdue accounts. Staff motivation, efficiency, reduced time spent on tasks and reduced workload. Estimated Costs and Benefits

Development Costs Items 3 Pentium 4 computers 2 Laser printers Windows XP operating system Antivirus software Visual basic 6.0 software package Software for backup Salary for development team Total Development Costs

Cost ($) 3600 000 200 000 100 000 50 000 50 000 30 000 250 000 4280 000

Operational Costs Items Costs ($) Floppy diskettes 20 000 Compact discs 30 000 Bond paper 45 000 Cartridge 120 000 User training 600 000 Total Operational Costs 810 000

3.1.3 SOCIAL FEASIBILITY The system will not result in a loss of jobs but will reduce the workload on the hospital personnel responsible for tackling patient details. The system will also speed the doctors’ diagnosis system, as it will provide the patient history on the click of the mouse. It will however require that staff be well versed with it especially those that are unfamiliar with computerized systems. Those who have absolutely no experience with computers will have to offer some time off their schedules to accommodate training. However, if the Computers on which the system is running are connected to the Internet, the system might be vulnerable to unscrupulous people who may hack into the system and tamper with the records in the database and therefore violate the privacy realms of the health sector. This is however not the case for the employees in the hospital because the system database is exposed to selected personnel who are allocated usernames and passwords for verification before they can view the database.

3.1.4 ECONOMIC FEASIBILITY

Development of the system will incur very little cost with these costs in buying diskettes , writable compact disks and flash memory for data storage and printing costs for the final documentation of the project. However, upon implementation the hospital will have to buy more computers for the system. The number will be dependent on management, owners’ policy and finances available. It is not anticipated, though, that these will be of high cost, as the machines does not necessarily need to be brand-new. The hospital will also incur training costs for those who are unfamiliar with computerized systems, and for those who are familiar with them to familiarize themselves with the new system. Moreover a computer is an asset, therefore buying one or two is a form of investment, which helps to boost a company’s asset base. 3.1.5 ENVIRONMENTAL FEASIBILITY Information Management system is a paperless process so the new system will cut down on the paper used when processing patients records. This will be in line with the “save paper save trees” worldwide campaign that the healthy sector joined recently. The system will see reduced paper work, which means reduced litter on health premises. 3.2 FUNCTIONAL REQUIREMENTS We shall divide the functional requirements into; patient requirements, hospital staff requirements and overall system requirements. PATIENT

1. The system shall allow patient to make appointments with their doctors more efficiently by just filing in an electronic form his or her name, national identity number, date being booked, and doctor to be seen among other things. 2. The system shall keep patient records and treatment history complete and up-todate. 3. The system shall give feedback messages to patients on their appointment status, that is, if the day chosen is fully booked, the system will give that feedback. HEALTH STAFF 1. The personnel in private hospitals and surgeries should be able to instantly access complete patient history, appointments, and payments information. 2. Should be able to capture, show patient contact information. 3. Instantly check patients who have booked a particular day and a particular doctor. 4. They should be able to handle multi-doctor and multi-room appointment. 5. Produce quick and comprehensive reports 6. Make informed decisions using accurate data

OVERALL SYSTEM

a) The overall system should place appointments on doctor’s desk for future crosschecking of appointments and payments processing. b) The system should be useful for data mining, better decision-making and patient diagnosis purposes. c) The system should bridge across disparate healthcare applications and brings together islands of information, without impacting existing IT infrastructures. d) Provides secure access to the latest patient and administrative information wherever it is needed. e) Track every access to patient sensitive and mission-critical documents at the same time eliminating time, cost and errors associated with microfiche and paper-based documents f) The system should Increases productivity by saving time spent on searching, collecting and manually recording data. g) The system should provide easy accessibility of documents enabling faster and accurate management decisions. h) The system should provide real-time, multi-user, multi-location, intranet and extranet capabilities i) The system should save on communication, paper and stationary costs.

j) The system should be configured to save its data on a stand-alone PC or a Network Server. The user should be able to retrieve the documents from the disk by simply selecting the required record. k) The system should have a powerful query tool that allows the user to search for documents through pre-defined as well as user-defined search criteria. l) The system should provide appointment modules in the, one for the doctor and the other for the Front Office. m) The system should provide payment module, which lists all pending or completed bills for a given date. The user should be able to prepare an invoice for patients and print it. n) The system should produce the following reports: -

Appointment Details

-

Payment History

-

Patient Profile

-

Doctor Profile

-

Lab Analysis Reports

-

Treatment Details

3.3 NON-FUNCTIONAL REQUIREMENTS We shall group non-functional requirements into; security requirements, hardware and software requirements and general constrains for the system. SECURITY 1. The system database will be password protected and will be accessible by authorized users for the purpose of queries. 2. System should display error messages where possible. 3. The system shall not disclose any personal information about patients to other patients for privacy reasons. 4. The system should have robust engine based on the latest security and advanced features of 2000 database server. 5. The system should allow complete control by defining different user roles to grant explicit levels of access and authority.

CONSTRAINS -

The system should be able to process a query in less than 20seconds.

-

The system should provide acceptable performance under loads, which are 100%.

-

For security reasons there should be some way of distinguishing between system administrators and general personnel through user status and passwords.

-

The system should allow multiple users to access the database at a given time.

-

Inexperienced personnel should be able to use all the system functions after a total of 3 hours training. After this training the average number of errors made by experienced users should not exceed 2 per day.

-

The system should be flexible to both users and patients.

-

The system should have easy integration with legacy systems, accounting/financial software and credit services.

3.3.1 HARDWARE AND SOFTWARE REQUIREMENTS 

Visual basic 6.0 (for users)



At least Microsoft Windows 98



Sever: Windows 2000 Server to host the system database



Client: At least Pentium II computer with a processing speed of over 200Mh, 64 MB RAM at least 10 GB Hard drive.



Local Area Network (LAN) for the machines to be able to access the remote database

Development Plans Basically gives an overview of stages to be undertaken in their sequence and time frame for completion of the activities of each stage. The developer identified tasks that need to be worked on and the estimated time it will take to complete them. The items that were looked into and allocated time are: 

Project Proposal



Feasibility Report



System Analysis



System Design



Implementation



Maintenance

The proposed system must be developed within the given time span, which is about 8 weeks. The time will be spent as illustrated below in a Project work plan and Gantt chart shown below, which shows the distribution of time for the duration of the project. TASK

STARTING DATE

COMPLITION

DURATION

DATE

Project proposal P1)

11 – 05 – 2008

18– 05 – 2008

1 week

Feasibility study P2)

19 – 05 – 2008

02– 06 – 2008

2 weeks

Analysis phase (P3)

03 – 06 – 2008

10 – 06 – 2008

1 weeks

Design phase

(P4)

11 – 06 – 2008

25 – 06 – 2008

2 weeks

Implementation (P5)

26 – 06 – 2008

10– 07 – 2008

2 weeks

Training

11 – 07 – 2008

15 – 08 – 2008

5 weeks

Documentation

11 – 05 – 2008

10 – 07 – 2008

8 weeks

Gantt Chart The Gantt chat shows a work plan and a work breakdown schedule Activity Project Proposal Planning Phase Analysis Design Implementatio n

Maintenance

Week Week Week Week Week Week 6 1 2 3 4 5

Week 7

Week 8

Data flow Diagram A data flow diagram is a structured network showing systematic connectivity in the processing and storage of data and information in a system. It illustrates how data flows in the system. A DFD increase in detail as it goes up the levels. The levels covered as an aid to system development are as follows: 

Context or Zero level DFD



First Level DFD



Second Level DFD

Data Flow Diagram Symbols

NAME

SYMBOL

EXPLANATION

Data Store Contains data generated by a process or structured data which is used in a process. It is a repository of information within the system Data sores is generic for physical files. External Entity Source or destination of queries to and from the

system. Is a source or destination of a data flow which is outside the area of study for example patient.

Flow Directional flow of structured data and information the system. The data flow shows the flow of information from its source to its destination Process Changes input data into output data by applying a predefined sequence of steps

LEVEL ZERO DFD

Supplier

Patient

Admission form Treatment Details Receipt Drugs

Requisitions Quotation

Patient Details Health Details Payments

Purchase order details Returns

HOSPITAL MANAGEMENT SYSTEM

Deposits Requisitions

Bank Details Bank Statements Bank loans Interests Withdrawals

Bank

Supplier Details Product Details Quotation Product Invoice Receipt

Patient

The patient provides basic details to the system . The patient makes payments for Medical card stamping and consultation. A receipt is availed to the patient for payments made by the system. Treatment details are provided by the system to the patient and if there is need for the patient to be admitted into the hospital then further payments are made by the patient for bedding , treatment and all services rendered. Admission forms and receipts are provided to the patient by the system.

Supplier Basic Supplier details are captured by the system such that whenever there is need for the supplier’s product the system places requisitions with the supplier.. The Supplier then provides a quotation for any requisitions made. Products are provided for any purchase orders made by the system and the Supplier provides invoices for orders made and receipts for payments made. Returns for faulty products are made by the system and hence refunds are made for faulty products to the system by the supplier.

Bank The Bank plays an important role to the system by providing withdrawals, Bank loans and Bank statements . The system provides Hospital details and makes deposits to the bank.

Bank

LEVEL ONE DATA FLOW DIAGRAM FOR Hospital Management System Supplier Details Account Details Supplier Hospital Details

Patient Details

Patient file

Patient

Patient Details

1.0

REGISTRATION Registration

Treatment Details Health details

Supplier details Account Details

Supplier file Bank file

Product Details Product file

Supplier

Requisitions, purchase order Health details

Health file Purchase order details

2.0

Health Management system

Purchase order file Admission details

Product mgt file Treatment file

Interests ,bank loans, withdrawals Bank statements

3.0

Accounting

invoice Bank details Bank details Bank file Patient details Patient file Supplier details Supplier file Product details Product file Health details Health file Supplier mgt details Supplier mgt file Patient mgt details Patient mgt file

Patient mgt file

Treatment details

Returns, payments

Patient

Supplier mgt file

Product details

Refunds

payments

Supplier details Patient details

Patient admission discharge file Discharge Supplier

Account details Supplier details Patient details Quotation , product

Bank

Deposits ,requisitions, a/cs receivable details a/cs payable details

A/cs receivable file A/cs payable file

Purchases order details

Purchase order file Purchases order details

4.0

Updating

a/cs payable details a/cs receivable details Updated details

Updated files

Updated details 5.0

Reporting

Report details

Report file

REGISTRATION Patient

A person seeking treatment for the first time has to be registered by the Registration subsystem. The patient provides his/her details to the system which in turn produces a medical card/book to the patient which he/she produces when he/she makes the next appointment with the system. The patient details are stored in the patient file for future references.

Supplier When the system wants to purchase products it searches for prospective suppliers. If one supplier’s product meets the requirements of the system then the supplier and his/her product is registered in the system if the supplier is new. The Supplier details are stored in the Supplier file and his/her product details are stored in a product file.

HEALTH MANAGEMENT SYSTEM Patient A patient seeking treatment will be checked in the system to see whether or not is recognized by the system by using his/her ID. If the patient is recognized then treatment services are provided to the patient. The treatment details are stored in the treatment file. Discharged patient details are stored in a Patient Discharge file. Patient Health details are stored in a Health file and the patient’s basic details in a Patient Information file . If need arises that a patient be admitted into the hospital then an admission is provided for the patient. Supplier

If a certain product is required by the system , the system places requisitions for the products and purchase orders. In turn the system receives quotations for the required products. The system will request purchase of the required products from the Accounting subsystem. The Supplier will provide the products requested. Purchase order details are stored in a purchase order file and the product details in the product information file and that of the supplier in the Supplier Information file.

ACCOUNTING Patient If a patient visits the system for medical check-up he/she makes payments for consultation. If the patient is admitted then he/she makes further payments for treatment and services rendered. Payments made are stored in the A/Cs receivable file.

Supplier The Supplier makes out invoices and quotations for products required by the system. The Accounting subsystem will pay the Supplier for the products supplied. Payments made to the supplier are stored in the A/Cs payable file.

Bank The Accounting subsystem places deposits and requisitions with the bank. The Bank offers withdrawals and interests for any deposits made by the system. The Bank also provides Bank loans and Bank statements for any enquiries made by the system . UPDATING

The updating subsystems caters for any changes made on each and every subsystem. The updating subsystem creates files to store information on updated subsystems.

REPORTING Reports for information generated from each and every subsystem are created.

2ND LEVEL DFD FOR HOSPITAL MANAGEMENT SYSTEM 2ND LEVEL DFD FOR PROCESS 1 . 0

Patient

Patient Details 1.1

Patient Registration

Patient Details

Product Details 1.2

Supplier Supplier

Supplier Details

Hospital Details

Supplier/Product Registration

Patient File

Product file

Supplier Details

Supplier file

2ND LEVEL DFD FOR PROCESS 2.0

2.1 Patient Details

Patient File

Out-patient Details

Patient Management Admission Details

In-Patient file

Out-patient file

Out-patient Details

2.2

Admission Details

Supplier Details Health

Supplier File Diagnosis Details

Information

Patient Diagnosis file

Purchase order details Supplier Information Details

Patient Information Details Patient Information file

Product Information Details Health Information Details

Product file

Purchase order file Supplier Information file

Product Information file Health Information file

Product Details

2.3 Patient file

Patient Details

Treatment/ Discharge

Treatment Details

Discharge File

2ND LEVEL DFD FOR PROCESS 3.0

Treatment File

Patient Discharge File

Product File

Product Details 3 .1

Payment

A/c payable Details

A/c payable file

Withdrawals, Bank loans, Interests

Bank

Supplier

Refunds 3 .2

Receipting

Payments

Patient

A/c Receivable Details

Bank File

A/cs Receivable File

A/c Details 3.3

Banking Banking Details

Bank Information file

2ND LEVEL DFD FOR PROCESS 4.0 Patient Information File

Patient information details

Updated infor Details

4.1

Patient Update

Updated Patient infor file

Patient discharge details

Patient Discharge file

Updated Discharge file

Health Information File Treatment File

Updated Discharge details Updated Health details

Health information details

Updated Health info file

Treatment Details

Updated Treatment Details Updated Treatment file

Supplier Information details Supplier Information File 4.2 Product Information details Product Information File Purchase Order File

Purchase order details

Supplier Update

Updated supplier details dedetailsdetails

Updated supplier info file

Updated product details Updated product info file Updated Purchase details Updated Purchase order file

A/c Receivable File

A/c Payable file

Bank file

Updated receivable details

A/c Receivable Details

Updated A/c Receivable file

4. 3

A/c payable details

Bank Details

Accounting Update

Updated payable details Updated A/c payable file

4.4

Bank Update Updated bank details Updated bank file

2nd Level DFD for process 5.0

Updated infor Details Updated Patient infor file

Patient information report 5 .1

Updated patient report

Updated Discharge details Updated Discharge file Discharge report details Updated Health details

Patient Report

Health report details

Updated discharge report

Updated health report

Updated Treatment Details Updated Treatment file

Treatment report

Updated treatment report

Updated supplier details Updated supplier info file

5.2

Updated supplier report details Updated supplier report

Updated product details Updated product info file

Supplier Report Updated product report details Updated product report Updated Purchase details

Updated Purchase order file Updated Purchase report details Updated Purchase report

REGISTRATION SYSTEM(1.0)

This subsystem captures details of entities in the system. The subsystem is subdivided into two subsystems which are:  Patient Registration  Supplier/Product Registration

Patient Registration(1.1) The Patient Registration subsystem is an integrated patient management system, which captures complete and relevant new patient information. The system automates the patient administration functions to have better and efficient patient care process. It provides for enquiries about the patient, the patient's location, admission, and appointment scheduling and discharge details. Furthermore, this system even takes care of package deals for a patient for a fixed cost. Medical Record keeps an abstract of clinical data about patients. It allows easy retrieval of medical records on patients. Patient registration details are stored in the Patient File

Supplier /Product Registration(1.2) Relevant Supplier details are captured in this subsystem such as name, contact details and product details. Details of new Supplier/product are captured in this subsystem. The supplier information is stored in the Supplier file and the product details is stored in the Product file.

HEALTH MANAGEMENT SYSTEM(2.0)

This subsystem automates the day-to-day administrative activities and provides instant access to other subsystems, which leads to a better patient care this subsystem, manages and controls all the activities in the system. It is subdivided into three subsystems, which are as follows: 

Patient Management



Admission Treatment Discharge



Health Information

Patient Management The Patient Management Subsystem is designed to take care of all the activities and functions pertaining to Inpatient and Out-patient Management. For Inpatients it provides comprehensive data pertaining to Admission of Patients & Ward Management: Availability of beds, Estimation, Agreement preparation, Collection of advance, planned admission, Emergency admission and so on. For outpatients this subsystem supports doctors to take better and timely consultation decisions by providing instant access to comprehensive patient information. Patient visits are divided into New, Follow-up and Review. Two files are produced which are In-patient and Out-patient files.

Admission Treatment Discharge

This subsystem provides for enquiries about the patient, the patient's location, admission, appointment scheduling and discharge details. The subsystem is further split into three subsystems which are: 

Admissions



Treatment



Discharge

The Admission Subsystem This subsystem caters for patients who have been recommended on doctors order to be admitted into the hospital. The subsystem captures patient details like date of admission, ailment. Furthermore, the subsystem is also responsible for bed and ward allotment to the patient who is to be admitted into the hospital. An admission file is generated. The Treatment Subsystem This module facilitates tracking the services given to patients depending on the consultant's recommendations. Treatment and follow-up treatments are tracked using this subsystem. Progress readings can be recorded through this module. The outpatients and inpatients seeking treatment are captured in this subsystem. Doctors are able to provide medication and prescription details pertaining patients through this subsystem. , the online prescription facility assists and facilitates the physicians to

track the patient's prescription details. Appointments have to be fixed by the Patient before the medication. A treatment report is generated The Discharge Subsystem This subsystem facilitates tracking of patients who have been discharged from the hospital under a doctor’s recommendation. The discharge types are grouped into three categories which are: 

Home- Caters for patients who have been released from the hospital to home



Referral-out- Caters for patients who have been discharged from the hospital and referred to another hospital.



Deceased – Caters for patients who are released from hospital after death.

HEALTH INFORMATION The Health information subsystem is responsible for generation, storing and provision of Management Information. THE ACCOUNTING SUBSYSTEM This system has three other subsystems; The Payment The Receipting The Banking NB. I DID NOT CODE BANKING BECAUSE OF TIME

4.1 THE PAYMENT SUB-SUBSYSTEM This is responsible making subsequent payments to the suppliers. The file involved is the Accounts payable file to which it records payments made to suppliers for ; food, beverage and telephone charges etc the supplier also sends a receipt of payments. From the procurement it gets the invoice with which it uses to pay the supplier, also it gets the requirements of the procurement. 4.2THE RECEIPTING SUBSYSTEM This module facilitates cashier operations for different categories of patients like Outpatient, Inpatient and Referral. It provides automatic posting of charges related to different services like bed charges, lab tests conducted, medicines issued, consultant's fee,. This subsystem provides for credit partly. The receipting subsystem is extensively flexible by which each receipting made can be configured to automatically accept or deny. The system is tuned to capture room and bed charges along with ancillary charges based on the sponsorship category. The receipting subsystem will in turn generate a receipt which is given to the patient as proof of payment for future references.

THE REPORTING SUBSYSTEM This subsystem was exploded in level one; all the data stores in the system are gathered and manipulated to produce organized data flow patterns. This is one of the most integral part of the system and its output is required by almost every other department in the organization and outside as well it helps build up the statistical base of different departments as well as that of the Hospital, it is imperative that the most stringent harnesses are employed to ensure data integrity and security, the reports produced are various orders, the most common are the daily or monthly reports on: receipts, orders, payments, treatments made. Of paramount importance also are the reports based on each and every data store in the system like, reports on: suppliers and patients. Other reporting mechanisms like datebased reporting and ad-hoc reporting are also employed.

NASSI-SCHENEIDERMAN FLOWCHART Also known as the N-S charts. The logic of the entire program plus its modules is represented on an N-S chart unlike in the Traditional flowchart. The N-S chart has a number of advantages and some of the merits are the following:  It is easier to draw.  More compact.  Flow of the entire program can be viewed at a glance.  Shows selections with clarity.  Employs the use of the three basic control structures used in all structured programs (Selection, Sequence and Iteration).

NS CHART FOR HOSPITAL MANAGEMENT SYSTEM START ENTER USERNAME AND PASSWORD YES

USERNAME & PASSWORD CORRECT

MAIN MENU

NO CANCEL

SELECT OPTION OPTION=1 YES

DO

NO

OPTION=2

NO

YES

REGISTRATION

OPTION=3 YES

NO

DO HEALTH MANAGEMENT

OPTION=4 YES

NO

DO ACCOUNTING DO UPDATING

DO REPORTING

EXIT

PSEUDOCODE

Initialize the program Input Choice If choice = 1 then Call registration subprogram If choice = 2 then call health management subprogram If choice = 3 then call Accounting subprogram If choice = 4 then call Updating subprogram If choice = 5 then call Reporting sub program Else exit Stop Run

REGISTRATION SUBPROGRAM SUBSYSTEM OVERVIEW This Registration subsystem is called when a new patient ,supplier or product is getting registered into the system. The sub program Supplier/Product registration captures details of the supplier and/or the product. The patient registration captures registration details of the supplier. Program Flowchart for Registration

Registration

Supp/Prdct Registration

Supp/Prdct Registration

Supp name

Patient Number

Patient Name

Patient Address

Patient Age

Patient sex

Patient ailment

Supp Address

Next of Kin

Supp Phone #

Patient Phone#

Supp product

Supp ID

Registration Registration C1

Patient Registration

Supplier Registration Start

Enter Option

Pseudo-code Enter option If option=1.1 then Enter Patient Registration Another Record? If Yes then Repeat Patient Registration Else Stop Else Enter Supplier Registration Another Record? If Yes then Repeat Supplier Registration Else Stop

Yes

Option= 1.1

Patient Registration

Yes

Supplier Registration

Anothe r Record ? No

Anothe r Record ? No

Stop

Program Flowchart for Health Management

No

Yes

Health Information

Pseudo-code Enter option If option=2.1 then Enter Patient Management Another Record? If Yes then Repeat Patient Management Else Stop Else Enter Health Information Another Record? If Yes then Repeat Health Information Else Stop Else Enter Treatment/discharge Another Record? If Yes Then Repeat Treatment/Discharge Else Stop

Program Flowchart for Accounting

Pseudo-code Enter option If option=3.1 then Enter Payment Another Record? If Yes then Repeat Payment Else Stop Else Enter Receipting Another Record? If Yes then Repeat Receipting Else Stop Else Enter Banking Another Record? If Yes Then Repeat Banking Else Stop

Program Flowchart for Updating

Patient Number

Health Details

Treatment Details

Receivable Details

Deposit Details

Withdrawal Loan Details Details

Start

Enter Option

Yes

Option 4.1

No

Yes

Yes

Yes

Patient Update

Another Record?

No

Option= 4.2

Supplier Update

Bank Update

Another Record?

Another Record?

No

No

Stop

Pseudo-code Enter option If option=4.1 then Enter Patient Update Another Record? If Yes then Repeat Patient Update Else Stop Else Enter Supplier Update Another Record? If Yes then Repeat Supplier Update Else Stop Else Enter Bank Update Another Record? If Yes Then Repeat Bank Update Else Stop

Program Flowchart for Health Management

No

No

Bank Update

Anothe Yes r Record ?

No

Health Management

Treatment/ Discharge

Health Information

Patient Management

Supp name

Supp Address

Supp Phone #

Supp product

Supp ID

Patient ID Patient ID

Patient Name

Patient Address

Patient Age

Treatment Details

Discharge Type

D

Program Flowchart for Reporting

Reporting

Patient Report

Supplier Report

Supplier Details

Patient Details

Treatment Details

Health Details

Product Details

Purchase Details

Discharge Details

Registration Registration C1

Patient Report

Supplier Report

Payable Details

Start

Enter Option

Pseudo-code Enter option If option=5.1 then Enter Patient Report Another Record? If Yes then Repeat Patient Report Else Stop Else Enter Supplier Report Another Record? If Yes then Repeat Supplier Report Else Stop

Yes

Option= 1.1

Patient Report

Yes

No

Supplier Report

Anothe r Record ? No

Anothe r Record No

Stop

Yes

Structured Chart for Hospital Management System Hospital Management System

Health Management

Registration

Patient Registration

Supp/Prdt Registration

Patient Management

Health Information

Accounting

Payment

Treatment / Discharge

Receipting

Updating

Patient Report

Banking

Patient Update

Reporting

Supplier Update

Supplier Report

Bank Update

Design Introduction The purpose of the design phase is to decide how to build a system and how it will work. Logical diagrams in the analysis phase are converted into physical diagrams showing how the system should be built. This phase is divided into the following stages which are design structure of the system, the architecture to implement, interface design, data base and program design.

Design Consideration

Efficiency: - The system developed is meant to satisfy user requirements since it was developed after a strong analysis of the current used system. The user requirements must be met within a specified reasonable time using minimum available resources.

Functionality: - The system should provide the required functionalities specified in the user requirements.

User friendliness: - the system must be usable with minimal support and consultation.

Security: - the system must provide privacy and confidentiality and must be usable only with those who are authorized to do so

Reliability: - the system must provide privacy and confidentiality and must be usable only with those who are authorized to do so.

Physical Design It is concerned with the actual physical implementation of all components of the system. It describes the actual processes of inputting verifying and storing the data. It also describes the physical layout of the data store, the sorting procedures and the precise format of reports. Procedure Each entity in the logical data model becomes a table in the physical data model. Each attribute of an entity becomes a field or column table that is created from the entity. Components of the identifier will become the components of the primary key in the table. The relationship in the logical model will become the relationship in the physical model.

Architecture Design This stage describes the technical environment in which the system will run. Architecture design is namely concerned with the hardware and software requirements of the system.

Hardware Requirements -

Intel Pentium processor, 1000Mhz

-

256 Mb Ram

-

20 Gig hard disk

-

3.5 inch floppy disk and recordable compact discs

-

Standard 3.5 floppy drive

-

LG 52x re-writer Rom drive

-

LX 300 Epson printer

-

Mouse

-

Keyboard

-

Color monitor

-

Power cables

Software Requirements -

Windows 2000 or Windows XP professional operating system

-

Microsoft Office 2000

-

Microsoft Visual basic 6.0

-

Norton anti-virus

The stated hardware and software specifications are recommended for the system to operate efficiently.

Security Plan Architecture design also focuses on both hardware and software security of the system. Unauthorized access to system is prohibited by the use of secret passwords that allows authorized users to access the data in the system. Hardware security is achieved through locking the hardware components in rooms that are safe from theft, bad climatic conditions like extreme heat levels or water dripping from the roofs. A security guard is employed to look after the room after hours. A burglar bar is placed at that particular

room. There is need to have fire extinguishers in the complex. In case of accidental damages of data, there must be a provision of backups so that information is not completely lost.

Virus To control the problem of viruses, anti-virus software should be installed to check the files and disk for viruses. This antivirus should be regularly updated.

Interface Design Is the process of defining how the system will interact with external entities? It also defines the way the user will interfere with the system and the nature of inputs and output The writer is going to describe the system database tables in detail using the criteria bellow: 

Field-This column contains the field name in the database table as well as the designation of the field as a primary key, a foreign key, a not null field, a unique field or an auto-generated key field. Primary, foreign and auto-generated key fields, by definition, are not null fields. However primary and foreign keys may contain zero length value fields. Fields which are neither primary nor foreign key fields, but which have been designated as not null or unique are those fields deemed essential to certain applications of the database.



Description - This column contains a definition of the database table field.



Type (Format) - This column specifies the field type as text, number, small integer, or date/time; it also includes the format of the field and the precision



Auto-Generated Field- By definition these are primary or foreign key fields that are automatically generated by the system database. These fields may be dropped in subsequent versions of the database since they are unnecessary once the appropriate auto-key is assigned to a data record.



Length (BYTES) - This column specifies the maximum character or numeric length of a field as well the internal database storage requirement (primary tables only).

The primary tables are: PATIENT TABLE and HITORY TABLE whist the rest (Treatment table; Appointment Table and Diagnosis Table) are secondary tables. 4.2.1 PATIENT TABLE The Patient Table is one of the primary tables, which contain the patient’s records. Each record is assigned an auto-generated Patient ID, which will identify the record. Why use auto-generated ID instead of the national Identity Number? The auto-generated ID accommodates cases when a patient is treated several times in a month but a national ID will create duplicate records in this scenario hence it cannot be used as a primary key. FIELD NAME

DESCRIPTION This will be an auto-generated field, which will also act as a primary key to uniquely identify a patient record in this table.

DATA TYPE

Number (long)

8

Name

This field will take patient names.

Text

15

Surname Date of birth

This field will take patient surname The patient’s date of birth

Text Date/Time

15 8

Sex

The field will take patient’s sex (male Text or female)

6

National ID

Patient’s national registration number

14

Address

Patient’s residential address

Phone # Patient Doctor

Patient’s contact phone or cell phone number. Patient’s doctor name

Memo (Letters and numbers) Memo (text and letters) Number (single) Text

15

Medical Aid Medical Aid # Treated Rendered

Patient’s medical aid name Patient’s medical aid number What the patient has been treated for.

Text Number (single)

10 10 25

Patient ID

LENGTH

25 10

Text Date of treatment

Current date when the patient is being treated

4.2.2 HISTORY TABLE

8 Date/Time

DATA FIELD Patient National ID

Heart Disease Rheumatic Fever Bleeding Disease Blood Pressure Liver Disease

DESCRIPTION Patient’s national registration number given by the registrar’s office. This is the primary key for this table, which also links this table to the patient table. If the patient is suffering or had suffered from heart disease before. If the patient is suffering or had suffered from rheumatic fever before. If the patient is suffering or had suffered from bleeding disease before. If the patient is suffering or had suffered from blood pressure before. If the patient is suffering or had suffered from Liver disease before.

DATA TYPE Memo (mixture of Letters and numbers)

LENGTH 14 (For Yes or No)

Text

4

Text

4

Text

4

Text

4

Text

4

Text

4

Text

4

Tuberculosis

If the patient is suffering or had suffered from Kidney disease before. If the patient is suffering or had suffered from tuberculosis before.

Diabetes

If the patient is suffering or had suffered from diabetes before.

Text

4

Epilepsy

If the patient is suffering or had suffered from epilepsy before.

Text

4

Cancer

If the patient is suffering or had suffered from cancer before.

Text

4

Allergy

If the patient has allergy

Text

4

Hepatitis

If the patient is suffering or had suffered from hepatitis before. Text

4

Kidney Disease

Other Diseases

This column will take other diseases that are not mentioned Text above.

4

The diagram below show how to access the system SPLASH SCREEN

LOGIN

MAIN MENU

REGISTRATION

HEALTH MANAGEMENT

ACCOUNTING

REPORTING

PAYMENT PATIENT REPORT

PATIENT FORM RECEIPTING PATIENT MANAGEMENT BANKING

SUPPLIER FORM

ADMISSION TREATMENT DISCHARGE

HEALTH INFORMATION

SUPPLIER REPORT

SYSTEM IMPLEMENTATION

5.1 INTRODUCTION The system has been developed using Microsoft Visual Basic 6.0. It will be implemented in a network environment in which one computer will be running as a server, the system is going to manipulate the MS Access database system. Since the operations of the system are going to be centralised through the use of sever technology, unauthorised users have put much security in place in order to reduce the risk of data manipulations, proliferation and theft. Considerations have been made about security concerns and factors below are discussed in detail :

5.1.1 Physical Security It is imperative to keep the computers under physical security in order to keep them safe from unauthorized persons. Recruitment of security details from security companies could help on this one The computer has to be kept in a safe place, under lock and key. If no one is at work the premise housing it, after being locked as they are supposed to be, should be manned by a security guard.

Secured Waste To ensure that vital information will not leak from the department all waste printed material must first be shredded and then disposed of either by burning or dumping in locked trash barrels

5.1.2 BACK-UP The Hospital Management System must have adequate backup facilities in order to enable it to recover from loss of data which could be caused by various reasons. Back-up on auxiliary storage ensures continuity of operations, if either hard drive crashes or the data gets corrupted, the system will not stop, nor lose much, it will simply resume tasks after the restart operation, which will be initiated in the backup copies. Regular back up will always make the system more resilient.

Offsite Storage It is also important to store backup copies of data in a separate location so that in the event of disasters like fire, not everything will be destroyed. The remaining backup copies will then be collected from the site and be used for restart operations.

5.1.3 USE OF PASSWORDS This system works with a user log book that has passwords and usernames. Strict password checking is employed to screen users. All users will be assigned a password for use in logging on to the system. There are also options for users to constantly change their passwords for the security to remain tight. This password will be used to restrict access to the system and they will have a priority dictating which features to use and which features will not be in use.

USER INTERFACE DESIGN 5.1.1 USER LOGIN

The user login to the system will appear as below:

User Name entered here

Select user Levels here Insert password Here

Click this icon to change If you have difficulties in logging your password in, click this icon for help The user details are first validated before the system authenticates the user to access the main system platform. The user is denied access if any of the user details are wrong or the text boxes is blank.

Available user levels in the system

The change password form will appear as follows if the change password icon is clicked:

These two passwords should match for the user to successfully change the password

This is where the administrator changes usernames and passwords .the details to be included are:  User category  Login name  Password  Confirm password After these details have been filled in the user makes use of the following command buttons :  Save changes  Back The SAVE changes command button allows the administrator to save new user details. As long as the user is given a valid user name or password, he /she will be able to access the

system. The Back command button exits from the subprogram to the main screen. This is selected normally when the user is done with a particular program.

The login help will appear as follows: Validation The user is going to meet some of these error messages on logging in and changing password.

Successful Login On successful log in the user is going to access the main panel, which looks like the one bellow:

User Menu

Display screen for quick search results

The main panel above provides the user with quick search facility, which the user can use to search: Patient Record; Appointments Made and even Prescriptions issued to patients. The panel is also the same platform for every system user but the difference is in menus that a user can access. For instance, a nurse is the only person allowed to access the Prescription Issuing platform whilst the Doctor is the only authorized person to write prescriptions for the patients and the Accounts Clerks are authorized to process accounts reports and take Patient payment details.

5.1.2 CAPTURING PATIENT DETAILS

This is the first stage in the patient treatment stages and it involves taking patients details and treatment history before they proceed to see the doctors.

The system automatically fills current date for the user.

Testing It is important to note that different test strategies may be needed for different parts of the system and at different stages in the testing process. At this stage it is important to ensure that the system performs is according to specifications. The process of verifying a system involves making a series of tests on the system before it is actually declared a working system. The tests that can be performed on the system include the following:

Unit tests and module tests These tests are the responsibility of programmers who develop the system. The programmers make up their own tests and incrementally test the code as it is developed. This is an economic way of testing since the programmers are most likely to know the components of the program better and are best able to generate relevant test data. However, some monitoring procedure should be put in place to ensure that the components are properly tested. This can be achieved by making use of an independent tester who is supposed to use a different set of test cases. If independent testing and programmer testing come to the same conclusion, it may be assumed that the programmer’s testing methods are adequate.

Top down testing Where testing starts with the most abstract component of the system and works downwards, right down to the highest levels of the system before testing its detailed components. This testing method was used during program development so that the system components could be tested as soon as they were coded. In this type of testing strategy, coding and testing are a single activity with no separate component or moduletesting phase. Advantages of top down testing 

Unnoticed design errors may be detected and corrected without undue costs, at an early stage in the testing process



Early error detection means that expensive redesign and re- implementation may be avoided.



A limited working system is made available at an early stage in the development. It can be used to demonstrate the feasibility of the system to management.



Validation can begin early in the testing process as a demonstrable system can be made available to users.

Thread testing. This type of testing is used in systems with multiple processes where the processing of a transaction threads its way through these multiple processes. In this system, it was necessary to test whether the system could thread its way from the loan

application process to the processing of a transaction relating to a clients account i.e. testing to see whether the system can go from processing loan applications and creation of accounts then move on to access those accounts that will have been created, for the purpose of effecting transactions on them such as payments made by the client.

Stress testing This test relies on stressing the system by going beyond its specified limits and hence testing how well the system can cope with overload situations. It was necessary to perform these tests because, during peak periods where, a lot of patients visit the hospital for medical services. It is very important to ensure that the system works reliably during such periods to avoid patient dissatisfactions. If the system fails due to over stressing then it is likely to create problems that affect the smooth flow of operations in the organization. Efforts should be made to avoid such a situation because the system is actually designed to add convenience on the part of both the patients and the hospital staff members.

Defect testing This type of testing method is intended to find areas where the program does not conform to its specifications. The test is designed to reveal the presence of faults in the system. It is different from debugging in that, testing only establishes the existence of defects whereas debugging is concerned with the location and correction of these defects USER MANUAL

INTRODUCTION It makes the user aware of how to use the Hospital Management system. The system was designed to reduce manual work. It is also designed to discard too much paper work that is currently in use and produce a computer based Hospital system which takes little time to process transactions.

Getting started 

Switch on the power supply of the computer



Switch on the system unit of the computer



Switch on the monitor of the computer



Wait for the computer to boot up. The computer should start by using Windows XP



Insert a CD in the CD-ROM drive .Click My computer on the desktop then select CD-drive and press enter or double click. Once open select My Documents folder then Right click it and copy it Then paste it in C-drive.



Go to [Control Panel]



Open [Administrative Tools]



Open [Data Sources]



In the [User DSN] window, Click [Add]



Select [Microsoft Access Driver] and click [Finish]



Type in the [Data Source Name] as "healthy software"



Click [Select] and browse for the database in your folder in C:



Click [OK] twice



You are good to go

SPLASH SCREEN

Welcomes the user to the system

LOGIN FORM

To get into the system the user has to type the correct username and password as assigned to him/her by the administrator. The following are usernames and passwords that have been assigned to users: General users USERNAME

PASSWORD

 pety

mimi

 nurse

admin

Adminstrators  mimi

pety

 doctor

doc

After these correct entries ,the user should click the OK button or press enter on the keyboard to be granted access to the main menu form.If the user makes a typographical error he/she can click the cancel button to start afresh. If the user want to change password then he/she clicks change password and the following form pops up:

The change password form allows the user to change username and password.

OUT-PATIENT REGISTRATION

IN-PATIENT REGISTRATION

SUPPLIER REGISTRATION

The main screen allows access to all the subsystems of the Hospital Management System. The user chooses the option he /she wants to perform and works on the desired operation. The main menu has the following subsystems: Registration Health Management Accounting Updating Reporting

These subsystems have subprograms contained in them.These subprograms can only be displayed after clicking on a particular subsystem.To exit the system ,the user clicks on EXIT on the main screen.

This form is for appointment scheduling with the doctor.

Installation The system is to be installed on the machine by creating a folder titled “Hospital Management System” in the “Programs Files” folder. The path to the system then becomes “C:\Program Files\Hospital Management System”. It is in this folder that the system is then saved. To save the system from a floppy disk, one first has to copy it from the floppy disk and then paste it to the “Hospital Management System” folder. A shortcut to the system must then be created and saved on the desktop for faster access to the money lending system on the computer.

Maintenance Introduction

It is monitoring, evaluating and modifying the operational information system to make desirable or necessary improvements. A new computer system is up and running but that is not the end of the story. All computer systems require maintenance.

Corrective Maintenance

This type of maintenance is done in an effort to correct a part or parts of the system that would have encountered some errors during the operation of the system. This will be done whenever there will be any reported errors in the

system. These errors will take the form of coding, design errors or equipment errors.

Adaptive Maintenance This will be done whenever some new environment has to be used. The software has to be changed sometimes when a different hardware platform or operating system has to be used. The system will be altered only if the changing environment requires it. Examples include new user requirements.

Perceptive Maintenance The main reason for this type of maintenance is to keep the system in its useful good form regardless of the changes in the requirements and any other factors. This refers to improvements to the system which make the system more efficient e.g. improved response times of the system. This is the most likely of all the maintenance plans to be done most often on the system as the hospital requirements keep on changing constantly. This will be concerned with keeping the system up-to-date with the user requirements. The maintenance process will be triggered by the change request from the users and management. A system service request for the system changes will be submitted by whoever requests the changes

System Review

This process ensures that the newly implemented system meets the system development objectives established for them. This maintenance process must correct errors in development or use of system. In this stage we will have periodic reviews with the users or the representatives of the hospital to audit the system so as to ensure that it is operating properly and meeting its objectives when the system has been implemented we will first hold monthly reviews so that if there are any problems arising they may be attended to as a matter of urgency. After a year we will hold reviews after every six months so that if there are any changes due to changes in hospital environment they may be attended to so that the system continues to meet the business needs.

Systems backup

The system is going to use floppy diskettes, Compact Disks (CDs) and Flash memory for backing up information storages. Hard disks that will contain all the necessary information will be in conjunction with the storage devices mentioned. The storage devices will be stored in a very secure place to protect them from physical damage. To protect files against loss by simple

disk head crash and power surges, we need to make periodic copies of files and store them in a safe place. These files can be copied onto re-writable CDs periodically. In the event that there is a failure on the computer based system, the users can revert to the old manual system making use of the patients’ records stored in those files that are made periodically. It is therefore also important to have proper documentation on how the manual system works. This is because the users who have once operated the manual system may decide to leave the hospital resulting in the need to recruit new employees who do not know how the manual system works. These have to be trained on how the computer based system works, and also, on how the manual system works so that, in the event of computer system failures, they are able to revert to the manual system with fewer problems.

Conclusion A 60-day free maintenance period was agreed upon to provide help to users of the system. The maintenance phase will also mean a continual interaction with the developer to provide adaptive maintenance. Back up will be done every Friday at 3:00PM

SPLASH SCREEN Private Sub Form_Load() 'lblVersion.Caption = "Version " & App.Major & "." & App.Minor & "." & App.Revision 'lblProductName.Caption = App.Title 'Timer = True Bar.Value = 0 End Sub Private Sub Timer_Timer() Bar.Value = Bar.Value + 1 If Bar.Value = 300 Then Bar.Visible = False Timer.Interval = 0 Unload Me Login.Show Exit Sub End If End Sub Private Sub Timer1_Timer() lblTitle.Caption = Right((lblTitle.Caption), Len(lblTitle.Caption) - 1) + Left(lblTitle.Caption, 1) End Sub LOGIN FORM Private Sub Command1_Click() Text1.Text = UCase(Text1.Text) Text1.Text = UCase(Text1.Text)

Call SetDB Dim rs As ADODB.Recordset Dim strSQL As String If Text1.Text = "" Or Text2.Text = "" Then MsgBox "Username and Password cannot be null please!", vbOKOnly, "ERROR!" End If If Combolevel.Text = "" Or Combolevel.Text = "CHOOSE" Then MsgBox "Please select the LEVEL you are logging under", vbOKOnly, "SELECT LEVEL" Combolevel.SetFocus End If If Me.Combolevel.Text = "GENERAL" Then strSQL = "SELECT username,password FROM PASSWORDS WHERE username LIKE '" & Trim(Me.Text1.Text) & "' And password LIKE '" & Trim(Me.Text2.Text) & "'" Set rs = New ADODB.Recordset rs.Open strSQL, con, adOpenDynamic, adLockOptimistic If rec_found(rs, "username", Text1.Text) = True And rec_found(rs, "password", Text2.Text) = True Then MAIN.StatusBar1.Panels(4).Text = Login.Text1.Text MAIN.Show MAIN.mdAdmin.Enabled = False MAIN.MdQueris.Enabled = False Unload Me Else ' If rec_found(rs, "username", Text1.Text) = False And rec_found(rs, "password", Text2.Text) = True Then MsgBox "Please enter valid Username and Password" Text1.Text = "" Text2.Text = ""

End If End If If Me.Combolevel.Text = "ADMINISTRATOR" Then strSQL = "SELECT username,password FROM ADMINISTRATOR WHERE username LIKE '" & Trim(Me.Text1.Text) & "' And password LIKE '" & Trim(Me.Text2.Text) & "'" Set rs = New ADODB.Recordset rs.Open strSQL, con, adOpenDynamic, adLockOptimistic If rec_found(rs, "username", Text1.Text) = True And rec_found(rs, "password", Text2.Text) = True Then MAIN.StatusBar1.Panels(4).Text = Login.Text1.Text MAIN.Show Unload Me Else MsgBox "Please enter valid Username and Password" Text1.Text = "" Text2.Text = "" End If End If End Sub

Private Sub Command2_Click() LOGINHELP.Show End Sub Private Sub Command3_Click() Dim response As String response = MsgBox("Are you sure you want to cancel the application?", vbYesNo, "WARNING!") If response = vbYes Then

Unload Me End End If End Sub

Private Sub Command4_Click() Unload Me PASSCHANGE.Show End Sub Private Sub Form_Load() 'Text1.SetFocus End Sub FORM CHANGE PASSWORD Private Sub Command1_Click() Text1.Text = UCase(Text1.Text) Text2.Text = UCase(Text2.Text) TextNewpass.Text = UCase(TextNewpass.Text) Textconfirm.Text = UCase(Textconfirm.Text) Call SetDB Dim rs As ADODB.Recordset Dim strSQL As String If cmbcategory.Text = "" Or cmbcategory.Text = "CHOOSE" Then MsgBox "PLEASE CHOOSE YOUR USER CATEGORY", vbOKOnly, "Category not selected" cmbcategory.SetFocus Exit Sub End If

If Text1.Text = "" Then MsgBox "Enter your username", , "Username" Text1.SetFocus Exit Sub ElseIf Text2.Text = "" Then MsgBox "Enter your old password", , "Password" Text2.SetFocus Exit Sub ElseIf TextNewpass.Text = "" Then MsgBox "Enter new password", , "Password" TextNewpass.SetFocus Exit Sub ElseIf Textconfirm.Text = "" Then MsgBox "Retype your new password", , "Password" Textconfirm.SetFocus Exit Sub End If If cmbcategory.Text = "GENERAL" Then If TextNewpass.Text = Textconfirm.Text Then strSQL = "SELECT username,password FROM PASSWORDS WHERE username LIKE '" & Trim(Me.Text1.Text) & "' And password LIKE '" & Trim(Me.Text2.Text) & "'" Set rs = New ADODB.Recordset rs.Open strSQL, con, adOpenDynamic, adLockOptimistic If rec_found(rs, "username", Text1.Text) = True And rec_found(rs, "password", Text2.Text) = True Then strSQL = "UPDATE PASSWORDS SET [password]='" & Trim(TextNewpass.Text) & "' WHERE username='" & Trim(Text1.Text) & "'" Set rs = New ADODB.Recordset

rs.Open strSQL, con, adOpenDynamic, adLockPessimistic MsgBox "The password has been successfuly changed", vbOKOnly, "Password Change" Text1.Text = "" Text2.Text = "" TextNewpass.Text = "" Textconfirm.Text = "" ElseIf rec_found(rs, "username", Text1.Text) = False And rec_found(rs, "password", Text2.Text) = False Then MsgBox " The log in details are incorrent. Type old password and username correctly", , "Wrong Details" Text1.Text = "" Text2.Text = "" TextNewpass.Text = "" Textconfirm.Text = "" End If End If If Not TextNewpass.Text = Textconfirm.Text Then MsgBox "The new passwords entered do not match. Retype them again.", vbInformation, "Password" TextNewpass.Text = "" Textconfirm.Text = "" End If Exit Sub End If If cmbcategory.Text = "ADMINISTRATOR" Then If TextNewpass.Text = Textconfirm.Text Then

strSQL = "SELECT username,password FROM ADMINISTRATOR WHERE username LIKE '" & Trim(Me.Text1.Text) & "' And password LIKE '" & Trim(Me.Text2.Text) & "'" Set rs = New ADODB.Recordset rs.Open strSQL, con, adOpenDynamic, adLockOptimistic If rec_found(rs, "username", Text1.Text) = True And rec_found(rs, "password", Text2.Text) = True Then strSQL = "UPDATE ADMINISTRATOR SET [password]='" & Trim(TextNewpass.Text) & "' WHERE username='" & Trim(Text1.Text) & "'" Set rs = New ADODB.Recordset rs.Open strSQL, con, adOpenDynamic, adLockPessimistic MsgBox "The password has been successfuly changed", vbOKOnly, "Password Change" Text1.Text = "" Text2.Text = "" TextNewpass.Text = "" Textconfirm.Text = "" ElseIf rec_found(rs, "username", Text1.Text) = False And rec_found(rs, "password", Text2.Text) = False Then MsgBox " The log in details are incorrent. Type old password and username correctly", , "Wrong Details" Text1.Text = "" Text2.Text = "" TextNewpass.Text = "" Textconfirm.Text = "" End If End If If Not TextNewpass.Text = Textconfirm.Text Then

MsgBox "The new passwords entered do not match. Retype them again.", vbInformation, "Password" TextNewpass.Text = "" Textconfirm.Text = "" End If Exit Sub End If End Sub Private Sub Command3_Click() Unload Me Login.Show End Sub FORM NEW USER Private Sub Command1_Click() txtusername.Text = UCase(txtusername.Text) txtpassword.Text = UCase(txtpassword.Text) txtconfirm.Text = UCase(txtconfirm.Text) Call SetDB Dim strSQL As String Set rs = New ADODB.Recordset Dim adoCmd As New ADODB.Command If Me.Combocat.Text = "" Or Me.Combocat.Text = "CHOOSE" Then MsgBox "Please select user category", vbOKOnly, "Blank dectected" Me.Combocat.SetFocus End If txtusername.Text = UCase$(txtusername.Text) txtpassword.Text = UCase$(txtpassword.Text) txtconfirm.Text = UCase$(txtconfirm.Text)

If Me.Combocat.Text = "GENERAL" Then If Trim(Me.txtpassword.Text) = Trim(Me.txtconfirm.Text) Then strSQL = "SELECT * FROM PASSWORDS " rs.Open strSQL, con, adOpenDynamic, adLockOptimistic With rs .AddNew 'adding new record .Fields("username") = txtusername.Text .Fields("password") = txtpassword.Text .Update End With MsgBox "NEW USER RECORD SUCCESSFULLY ADDED", vbInformation, "RESULT" txtusername.Text = "" Combocat.Text = "CHOOSE" txtpassword.Text = "" txtconfirm.Text = "" Else MsgBox "Cornfirmation of the password does not match the typed password", vbOKOnly, "CONFIRMATION ERROR" txtpassword.Text = "" txtconfirm.Text = "" End If End If If Me.Combocat.Text = "ADMINISTRATOR" Then If Trim(Me.txtpassword.Text) = Trim(Me.txtconfirm.Text) Then strSQL = "SELECT * FROM ADMINISTRATOR " rs.Open strSQL, con, adOpenDynamic, adLockOptimistic With rs .AddNew 'adding new record .Fields("username") = txtusername.Text

.Fields("password") = txtpassword.Text .Update End With MsgBox "NEW USER RECORD SUCCESSFULLY ADDED", vbInformation, "RESULT" txtusername.Text = "" Combocat.Text = "CHOOSE" txtpassword.Text = "" txtconfirm.Text = "" Else MsgBox "Cornfirmation of the password does not match the typed passwor", vbOKOnly, "CONFIRMATION ERROR" txtpassword.Text = "" txtconfirm.Text = "" End If End If End Sub Private Sub Command2_Click() Dim srtSQL As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset Dim rsPassword As New ADODB.Recordset Set rsPassword = New ADODB.Recordset Call SetDB txtusername.Text = UCase$(Trim(txtusername.Text)) txtpassword.Text = UCase$(Trim(txtpassword.Text)) txtconfirm.Text = UCase$(Trim(txtconfirm.Text)) MsgBox "Are you sure you want to DELETE this User's details", vbYesNo, "WARNING" If vbYes Then

If Me.Combocat.Text = "GENERAL" Then strSQL = "SELECT * FROM PASSWORDS WHERE username LIKE '" & Trim(Me.txtusername.Text) & "'" rs.Open strSQL, con, adOpenDynamic, adLockOptimistic If rec_found(rs, "username", txtusername.Text) = True Then strSQL = "DELETE * FROM PASSWORDS WHERE username LIKE '" & Trim(Me.txtusername.Text) & "'" rsPassword.Open strSQL, con, adOpenDynamic, adLockOptimistic MsgBox "USER SUCCESSFULLY DELETED" txtusername.Text = "" Combocat.Text = "CHOOSE" Else MsgBox "THE USER YOU WANT TO DELETE IS NOT IN THE DATABASE", vbOKOnly, "RESULT" txtusername.Text = "" Combocat.Text = "CHOOSE" End If End If If Me.Combocat.Text = "ADMINISTRATOR" Then strSQL = "SELECT * FROM ADMINISTRATOR WHERE username LIKE '" & Trim(Me.txtusername.Text) & "'" rs.Open strSQL, con, adOpenDynamic, adLockOptimistic If rec_found(rs, "username", txtusername.Text) = True Then strSQL = "DELETE * FROM ADMINISTRATOR WHERE username LIKE '" & Trim(Me.txtusername.Text) & "'" rsPassword.Open strSQL, con, adOpenDynamic, adLockOptimistic MsgBox "USER SUCCESSFULLY DELETED" txtusername.Text = "" Combocat.Text = "CHOOSE" Else

MsgBox "THE USER YOU WANT TO DELETE IS NOT IN THE DATABASE", vbOKOnly, "RESULT" txtusername.Text = "" Combocat.Text = "CHOOSE" End If End If End If

End Sub Private Sub Command3_Click() Dim response response = MsgBox("Are you sure you want to exit this Section!!", vbYesNo, "WARNNING") If response = vbYes Then Unload Me MAIN.Show End If End Sub FORM MAIN Private Sub Form_Load() End Sub Private Sub Command1_Click() txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus

Exit Sub End If Dim tryid As New RegExp tryid.Pattern = "^(\d{2})\-(\d{6})" If tryid.Test(txtsearch.Text) = False Then MsgBox "Wrong format for National ID. National ID should be in the form: 58-222299g-04." txtsearch.SetFocus Exit Sub End If If Combocategory.Text = "" Or Combocategory.Text = "CHOOSE" Then MsgBox ("PLEASE CHOOSE SEARCH CATEGORY"), vbOKOnly, "BLANK CATEGORY" Combocategory.SetFocus End If If Combocategory.Text = "PATIENT" Then ' lbpatientid.Visible = True lbname.Visible = True lbsurname.Visible = True lbsex.Visible = True lbnationalid.Visible = True lbaddress.Visible = True lbphone.Visible = True lbpdoctor.Visible = True txtpid.Visible = True txtname.Visible = True txtsurname.Visible = True txtSex.Visible = True txtnid.Visible = True

txtaddress.Visible = True txtphone.Visible = True txtpdoctor.Visible = True Call SetDB Dim strSQL As String Dim rsCash As New ADODB.Recordset Set rsCash = New ADODB.Recordset Dim rsMedical As New ADODB.Recordset Set rsMedical = New ADODB.Recordset Dim resultfalg As Boolean resultflag = False Dim resultflag1 As Boolean resultflag1 = False strSQL = "Select *from CASH_PATIENT " rsCash.Open strSQL, con, adOpenDynamic, adLockOptimistic rsCash.MoveFirst Do Until rsCash.EOF If Trim(rsCash!nationalid) = Trim(txtsearch.Text) Then txtpid.Text = rsCash(0) & "" txtname.Text = rsCash(1) & " " txtsurname.Text = rsCash(2) & " " txtnid.Text = rsCash(3) & " " txtaddress.Text = rsCash(5) & " " txtpdoctor.Text = rsCash(9) & "" txtphone.Text = rsCash(10) & "" txtSex.Text = rsCash(11) & "" resultflag = True End If rsCash.MoveNext

Loop strSQL = "Select *from MEDICAL " rsMedical.Open strSQL, con, adOpenDynamic, adLockOptimistic rsMedical.MoveFirst Do Until rsMedical.EOF If Trim(rsMedical!nationalid) = Trim(txtsearch.Text) Then txtpid.Text = rsMedical(0) & "" txtname.Text = rsMedical(1) & " " txtsurname.Text = rsMedical(2) & " " txtnid.Text = rsMedical(3) & " " txtaddress.Text = rsMedical(5) & " " txtpdoctor.Text = rsMedical(11) & "" txtphone.Text = rsMedical(12) & "" txtSex.Text = rsMedical(13) & "" resultflag1 = True End If rsMedical.MoveNext Loop If resultflag = True Then lbcategory1.Visible = False txtcategory1.Visible = False lbcategory.Visible = True txtcategory.Visible = True End If If resultflag1 = True Then lbcategory.Visible = False txtcategory.Visible = False lbcategory1.Visible = True txtcategory1.Visible = True End If If resultflag = False And resultflag1 = False Then

lbcategory.Visible = False txtcategory.Visible = False lbcategory1.Visible = False txtcategory1.Visible = False lbpatientid.Visible = False lbname.Visible = False lbsurname.Visible = False lbsex.Visible = False lbnationalid.Visible = False lbaddress.Visible = False lbphone.Visible = False lbpdoctor.Visible = False txtpid.Visible = False txtname.Visible = False txtsurname.Visible = False txtSex.Visible = False txtnid.Visible = False txtaddress.Visible = False txtphone.Visible = False txtpdoctor.Visible = False MsgBox "The PATIENT is not in the RECORDS", vbInformation, "SEARCH RESULT" End If End If If Combocategory.Text = "EMPLOYEE" Then lbemployeeid.Visible = True lbename.Visible = True lbesurname.Visible = True lbesex.Visible = True lbenationalid.Visible = True lbeaddress.Visible = True

lbephone.Visible = True lbqualification.Visible = True txteid.Visible = True txtename.Visible = True txtesurname.Visible = True txtesex.Visible = True txtenid.Visible = True txteaddress.Visible = True txtephone.Visible = True txtqualification.Visible = True Call SetDB Dim stSQL As String Dim rsEmployee As New ADODB.Recordset Set rsEmployee = New ADODB.Recordset Dim resulfalg2 As Boolean resultflag = False stSQL = "Select *from EMPLOYEES " rsEmployee.Open stSQL, con, adOpenDynamic, adLockOptimistic rsEmployee.MoveFirst Do Until rsEmployee.EOF If Trim(rsEmployee!nationalid) = Trim(txtsearch.Text) Then txteid.Text = rsEmployee(0) & "" txtename.Text = rsEmployee(1) & " " txtesurname.Text = rsEmployee(2) & " " txtenid.Text = rsEmployee(3) & " " txtqualification.Text = rsEmployee(8) & "" txteaddress.Text = rsEmployee(5) & " " txtephone.Text = rsEmployee(6) & "" txtesex.Text = rsEmployee(9) & ""

resultflag2 = True End If rsEmployee.MoveNext Loop If resultflag2 = False Then lbemployeeid.Visible = False lbename.Visible = False lbesurname.Visible = False lbesex.Visible = False lbenationalid.Visible = False lbeaddress.Visible = False lbephone.Visible = False lbqualification.Visible = False txteid.Visible = False txtename.Visible = False txtesurname.Visible = False txtesex.Visible = False txtenid.Visible = False txteaddress.Visible = False txtephone.Visible = False txtqualification.Visible = False MsgBox "The EMPLOYEE is not in the RECORDS", vbInformation, "SEARCH RESULT" End If End If If Combocategory.Text = "PRESCRIPTION" Then ' lbpname.Visible = True 'lbpsurname.Visible = True 'lbdatep.Visible = True 'lbtreatment.Visible = True

'lbpres.Visible = True 'lbpstatus.Visible = True 'txtpname.Visible = True 'txtdatep.Visible = True 'txtpsurname.Visible = True 'txtlast.Visible = True 'txtPrescription.Visible = True 'txtstatus.Visible = True Call SetDB Dim tSQL As String Dim s2SQL As String Dim S3SQL As String Dim rsD As New ADODB.Recordset Set rsD = New ADODB.Recordset Dim rsCa As New ADODB.Recordset Set rsCa = New ADODB.Recordset Dim rs4 As New ADODB.Recordset Set rs4 = New ADODB.Recordset Dim resulfalg5 As Boolean resultflag5 = False tSQL = "Select *from DIAGNOSIS " rsD.Open tSQL, con, adOpenDynamic, adLockOptimistic rsD.MoveFirst Do Until rsD.EOF If Trim(rsD!nationalid) = Trim(txtsearch.Text) Then txtpname.Text = rsD(2) & "" txtpsurname.Text = rsD(3) & " " txtlast.Text = rsD(5) & " " txtPrescription.Text = rsD(6) & " "

txtstatus.Text = rsD(8) & "" resultflag5 = True End If rsD.MoveNext Loop s2SQL = "Select *from CASH_PATIENT " rsCa.Open s2SQL, con, adOpenDynamic, adLockOptimistic rsCa.MoveFirst Do Until rsCa.EOF If Trim(rsCa!nationalid) = Trim(txtsearch.Text) Then txtdatep.Text = rsCa(6) & "" End If rsCa.MoveNext Loop S3SQL = "Select *from MEDICAL " rs4.Open S3SQL, con, adOpenDynamic, adLockOptimistic rs4.MoveFirst Do Until rs4.EOF If Trim(rs4!nationalid) = Trim(txtsearch.Text) Then txtdatep.Text = rs4(6) & "" End If rs4.MoveNext Loop If resultflag5 = False Then MsgBox "The PATIENT'S PRESCRIPTION RECORD is not in the RECORDS", vbInformation, "SEARCH RESULT" End If End If If Combocategory.Text = "APPOINTMENT" Then

Call SetDB Dim sttSQL As String Dim rsA As New ADODB.Recordset Set rsA = New ADODB.Recordset Dim resulfalg7 As Boolean resultflag7 = False sttSQL = "Select *from APPOINTMENTS " rsA.Open sttSQL, con, adOpenDynamic, adLockOptimistic rsA.MoveFirst Do Until rsA.EOF If Trim(rsA!nationalid) = Trim(txtsearch.Text) Then txtanid.Text = rsA(2) & "" txtaname.Text = rsA(0) & " " txtasurname.Text = rsA(1) & " " txtdatebooked.Text = rsA(3) & "" txtadoctor.Text = rsA(5) & " " txtreason.Text = rsA(6) & "" txtappointment.Text = rsA(4) & "" resultflag7 = True End If rsA.MoveNext Loop If resultflag7 = False Then '

lbaname.Visible = False '

lbasurname.Visible = False ''

lbanid.Visible = False

'

lbdatebooked.Visible = False '

lbadoctor.Visible = False ' lbreason.Visible = False

' lbappointment.Visible = False ' txtaname.Visible = False 'txtasurname.Visible = False 'txtanid.Visible = False 'txtdatebooked.Visible = False 'txtadoctor.Visible = False 'txtreason.Visible = False 'txtappointment.Visible = False MsgBox "The APPOINTMENT is not in the RECORDS", vbInformation, "SEARCH RESULT" End If End If

End Sub Private Sub Command2_Click() 'lbpatientid.Visible = False lbname.Visible = False lbsurname.Visible = False lbsex.Visible = False lbnationalid.Visible = False lbaddress.Visible = False lbphone.Visible = False lbpdoctor.Visible = False txtpid.Visible = False txtname.Visible = False txtsurname.Visible = False

txtSex.Visible = False txtnid.Visible = False txtaddress.Visible = False txtphone.Visible = False txtpdoctor.Visible = False lbcategory.Visible = False txtcategory.Visible = False lbcategory1.Visible = False txtcategory1.Visible = False lbemployeeid.Visible = False lbename.Visible = False lbesurname.Visible = False lbesex.Visible = False lbenationalid.Visible = False lbeaddress.Visible = False lbephone.Visible = False lbqualification.Visible = False txteid.Visible = False txtename.Visible = False txtesurname.Visible = False txtesex.Visible = False txtenid.Visible = False txteaddress.Visible = False txtephone.Visible = False txtqualification.Visible = False lbaname.Visible = False lbasurname.Visible = False lbanid.Visible = False lbdatebooked.Visible = False lbadoctor.Visible = False lbreason.Visible = False

lbappointment.Visible = False txtaname.Visible = False txtasurname.Visible = False txtanid.Visible = False txtdatebooked.Visible = False txtadoctor.Visible = False txtreason.Visible = False txtappointment.Visible = False lbpname.Visible = False lbpsurname.Visible = False lbtreatment.Visible = False lbpres.Visible = False lbdatep.Visible = False lbpstatus.Visible = False txtpname.Visible = False txtdatep.Visible = False txtpsurname.Visible = False txtlast.Visible = False txtPrescription.Visible = False txtstatus.Visible = False Combocategory.Text = "CHOOSE" txtsearch.Text = "__-______-_-__" End Sub Private Sub inpatmgt_Click(Index As Integer) Frmchoose2.Show End Sub Private Sub MDALL_Click() admin2.Show End Sub

Private Sub mdapointment_Click() APPOINTMENT.Show End Sub Private Sub mdCash_Click() PATIENT.Show End Sub Private Sub mdClose_Click() Dim response As String response = MsgBox("ARE YOU SURE YOU WANT TO LOG OFF COMPLETELY", vbYesNo, "WARNNING") If response = vbYes Then Unload Me Else: MAIN.Show End If End Sub Private Sub mddoctor_Click() Doctor.Show End Sub Private Sub mdECash_Click() EXISTINGCash.Show End Sub

Private Sub mdExistmedical_Click() EXISTINGmad.Show End Sub

Private Sub mdhelp_Click() HELP.Show End Sub Private Sub MDIForm_Load() txtsearch.Mask = "##-######-&-##" End Sub Private Sub mdissuer_Click() NURSE.Show End Sub Private Sub MDLGOUT_Click() Dim response As String response = MsgBox("ARE YOU SURE YOU WANT TO LOG OFF COMPLETELY", vbYesNo, "WARNNING") If response = vbYes Then Unload Me Login.Show Else: MAIN.Show End If End Sub Private Sub mdMedical_Click() PATIENT2.Show End Sub Private Sub mdPasswords_Click()

End Sub Private Sub search_Click() End Sub Private Sub MDNEWEMP_Click() ADMIN.Show End Sub Private Sub MDNEWSY_Click() ADMINISTRATOR.Show End Sub Private Sub mdStaff_Click() ADMINISTRATOR.Show End Sub Public Sub POPULATEGRID()

End Sub Private Sub mdRevenue_Click() REPORTS.Show End Sub Private Sub MDSTEM_Click() admin1.Show End Sub

Private Sub mnuadmission_Click() frmadm.Show End Sub Private Sub mnubank_Click() frmbank.Show End Sub Private Sub mnuCash_Click() PATIENT.Show End Sub Private Sub mnuDischarge_Click() frmdis.Show End Sub Private Sub mnuExit_Click() End End Sub Private Sub mnuMedaid_Click() PATIENT2.Show End Sub Private Sub mnupatreg_Click() frmChoose.Show End Sub Private Sub mnupurchase_Click() frmorder.Show End Sub

Private Sub mnusup_Click() Frmpay.Show End Sub Private Sub mnusupreg_Click() FrmSupp.Show End Sub Private Sub mnutreat_Click() Doctor.Show End Sub FORM OUTPATIENT REGISTRATION Private Sub Form_Load() End Sub Private Sub Command1_Click() txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If Dim tryid As New RegExp tryid.Pattern = "^(\d{2})\-(\d{6})" If tryid.Test(txtsearch.Text) = False Then MsgBox "Wrong format for National ID. National ID should be in the form: 58-222299g-04." txtsearch.SetFocus Exit Sub

End If If Combocategory.Text = "" Or Combocategory.Text = "CHOOSE" Then MsgBox ("PLEASE CHOOSE SEARCH CATEGORY"), vbOKOnly, "BLANK CATEGORY" Combocategory.SetFocus End If If Combocategory.Text = "PATIENT" Then ' lbpatientid.Visible = True lbname.Visible = True lbsurname.Visible = True lbsex.Visible = True lbnationalid.Visible = True lbaddress.Visible = True lbphone.Visible = True lbpdoctor.Visible = True txtpid.Visible = True txtname.Visible = True txtsurname.Visible = True txtSex.Visible = True txtnid.Visible = True txtaddress.Visible = True txtphone.Visible = True txtpdoctor.Visible = True Call SetDB Dim strSQL As String Dim rsCash As New ADODB.Recordset Set rsCash = New ADODB.Recordset Dim rsMedical As New ADODB.Recordset Set rsMedical = New ADODB.Recordset

Dim resultfalg As Boolean resultflag = False Dim resultflag1 As Boolean resultflag1 = False strSQL = "Select *from CASH_PATIENT " rsCash.Open strSQL, con, adOpenDynamic, adLockOptimistic rsCash.MoveFirst Do Until rsCash.EOF If Trim(rsCash!nationalid) = Trim(txtsearch.Text) Then txtpid.Text = rsCash(0) & "" txtname.Text = rsCash(1) & " " txtsurname.Text = rsCash(2) & " " txtnid.Text = rsCash(3) & " " txtaddress.Text = rsCash(5) & " " txtpdoctor.Text = rsCash(9) & "" txtphone.Text = rsCash(10) & "" txtSex.Text = rsCash(11) & "" resultflag = True End If rsCash.MoveNext Loop strSQL = "Select *from MEDICAL " rsMedical.Open strSQL, con, adOpenDynamic, adLockOptimistic rsMedical.MoveFirst Do Until rsMedical.EOF If Trim(rsMedical!nationalid) = Trim(txtsearch.Text) Then txtpid.Text = rsMedical(0) & "" txtname.Text = rsMedical(1) & " " txtsurname.Text = rsMedical(2) & " " txtnid.Text = rsMedical(3) & " "

txtaddress.Text = rsMedical(5) & " " txtpdoctor.Text = rsMedical(11) & "" txtphone.Text = rsMedical(12) & "" txtSex.Text = rsMedical(13) & "" resultflag1 = True End If rsMedical.MoveNext Loop If resultflag = True Then lbcategory1.Visible = False txtcategory1.Visible = False lbcategory.Visible = True txtcategory.Visible = True End If If resultflag1 = True Then lbcategory.Visible = False txtcategory.Visible = False lbcategory1.Visible = True txtcategory1.Visible = True End If If resultflag = False And resultflag1 = False Then lbcategory.Visible = False txtcategory.Visible = False lbcategory1.Visible = False txtcategory1.Visible = False lbpatientid.Visible = False lbname.Visible = False lbsurname.Visible = False lbsex.Visible = False lbnationalid.Visible = False lbaddress.Visible = False

lbphone.Visible = False lbpdoctor.Visible = False txtpid.Visible = False txtname.Visible = False txtsurname.Visible = False txtSex.Visible = False txtnid.Visible = False txtaddress.Visible = False txtphone.Visible = False txtpdoctor.Visible = False MsgBox "The PATIENT is not in the RECORDS", vbInformation, "SEARCH RESULT" End If End If If Combocategory.Text = "EMPLOYEE" Then lbemployeeid.Visible = True lbename.Visible = True lbesurname.Visible = True lbesex.Visible = True lbenationalid.Visible = True lbeaddress.Visible = True lbephone.Visible = True lbqualification.Visible = True txteid.Visible = True txtename.Visible = True txtesurname.Visible = True txtesex.Visible = True txtenid.Visible = True txteaddress.Visible = True txtephone.Visible = True txtqualification.Visible = True

Call SetDB Dim stSQL As String Dim rsEmployee As New ADODB.Recordset Set rsEmployee = New ADODB.Recordset Dim resulfalg2 As Boolean resultflag = False stSQL = "Select *from EMPLOYEES " rsEmployee.Open stSQL, con, adOpenDynamic, adLockOptimistic rsEmployee.MoveFirst Do Until rsEmployee.EOF If Trim(rsEmployee!nationalid) = Trim(txtsearch.Text) Then txteid.Text = rsEmployee(0) & "" txtename.Text = rsEmployee(1) & " " txtesurname.Text = rsEmployee(2) & " " txtenid.Text = rsEmployee(3) & " " txtqualification.Text = rsEmployee(8) & "" txteaddress.Text = rsEmployee(5) & " " txtephone.Text = rsEmployee(6) & "" txtesex.Text = rsEmployee(9) & "" resultflag2 = True End If rsEmployee.MoveNext Loop If resultflag2 = False Then lbemployeeid.Visible = False lbename.Visible = False lbesurname.Visible = False lbesex.Visible = False lbenationalid.Visible = False

lbeaddress.Visible = False lbephone.Visible = False lbqualification.Visible = False txteid.Visible = False txtename.Visible = False txtesurname.Visible = False txtesex.Visible = False txtenid.Visible = False txteaddress.Visible = False txtephone.Visible = False txtqualification.Visible = False MsgBox "The EMPLOYEE is not in the RECORDS", vbInformation, "SEARCH RESULT" End If End If If Combocategory.Text = "PRESCRIPTION" Then Call SetDB Dim tSQL As String Dim s2SQL As String Dim S3SQL As String Dim rsD As New ADODB.Recordset Set rsD = New ADODB.Recordset Dim rsCa As New ADODB.Recordset Set rsCa = New ADODB.Recordset Dim rs4 As New ADODB.Recordset Set rs4 = New ADODB.Recordset Dim resulfalg5 As Boolean resultflag5 = False

tSQL = "Select *from DIAGNOSIS " rsD.Open tSQL, con, adOpenDynamic, adLockOptimistic rsD.MoveFirst Do Until rsD.EOF If Trim(rsD!nationalid) = Trim(txtsearch.Text) Then txtpname.Text = rsD(2) & "" txtpsurname.Text = rsD(3) & " " txtlast.Text = rsD(5) & " " txtPrescription.Text = rsD(6) & " " txtstatus.Text = rsD(8) & "" resultflag5 = True End If rsD.MoveNext Loop s2SQL = "Select *from CASH_PATIENT " rsCa.Open s2SQL, con, adOpenDynamic, adLockOptimistic rsCa.MoveFirst Do Until rsCa.EOF If Trim(rsCa!nationalid) = Trim(txtsearch.Text) Then txtdatep.Text = rsCa(6) & "" End If rsCa.MoveNext Loop S3SQL = "Select *from MEDICAL " rs4.Open S3SQL, con, adOpenDynamic, adLockOptimistic rs4.MoveFirst Do Until rs4.EOF If Trim(rs4!nationalid) = Trim(txtsearch.Text) Then txtdatep.Text = rs4(6) & "" End If rs4.MoveNext

Loop If resultflag5 = False Then MsgBox "The PATIENT'S PRESCRIPTION RECORD is not in the RECORDS", vbInformation, "SEARCH RESULT" End If End If If Combocategory.Text = "APPOINTMENT" Then Call SetDB Dim sttSQL As String Dim rsA As New ADODB.Recordset Set rsA = New ADODB.Recordset Dim resulfalg7 As Boolean resultflag7 = False sttSQL = "Select *from APPOINTMENTS " rsA.Open sttSQL, con, adOpenDynamic, adLockOptimistic rsA.MoveFirst Do Until rsA.EOF If Trim(rsA!nationalid) = Trim(txtsearch.Text) Then txtanid.Text = rsA(2) & "" txtaname.Text = rsA(0) & " " txtasurname.Text = rsA(1) & " " txtdatebooked.Text = rsA(3) & "" txtadoctor.Text = rsA(5) & " " txtreason.Text = rsA(6) & "" txtappointment.Text = rsA(4) & "" resultflag7 = True End If rsA.MoveNext

Loop If resultflag7 = False Then MsgBox "The APPOINTMENT is not in the RECORDS", vbInformation, "SEARCH RESULT" End If End If End Sub Private Sub Command2_Click() lbname.Visible = False lbsurname.Visible = False lbsex.Visible = False lbnationalid.Visible = False lbaddress.Visible = False lbphone.Visible = False lbpdoctor.Visible = False txtpid.Visible = False txtname.Visible = False txtsurname.Visible = False txtSex.Visible = False txtnid.Visible = False txtaddress.Visible = False txtphone.Visible = False txtpdoctor.Visible = False lbcategory.Visible = False txtcategory.Visible = False lbcategory1.Visible = False txtcategory1.Visible = False lbemployeeid.Visible = False lbename.Visible = False lbesurname.Visible = False

lbesex.Visible = False lbenationalid.Visible = False lbeaddress.Visible = False lbephone.Visible = False lbqualification.Visible = False txteid.Visible = False txtename.Visible = False txtesurname.Visible = False txtesex.Visible = False txtenid.Visible = False txteaddress.Visible = False txtephone.Visible = False txtqualification.Visible = False lbaname.Visible = False lbasurname.Visible = False lbanid.Visible = False lbdatebooked.Visible = False lbadoctor.Visible = False lbreason.Visible = False lbappointment.Visible = False txtaname.Visible = False txtasurname.Visible = False txtanid.Visible = False txtdatebooked.Visible = False txtadoctor.Visible = False txtreason.Visible = False txtappointment.Visible = False lbpname.Visible = False lbpsurname.Visible = False lbtreatment.Visible = False lbpres.Visible = False

lbdatep.Visible = False lbpstatus.Visible = False txtpname.Visible = False txtdatep.Visible = False txtpsurname.Visible = False txtlast.Visible = False txtPrescription.Visible = False txtstatus.Visible = False Combocategory.Text = "CHOOSE" txtsearch.Text = "__-______-_-__" End Sub Private Sub inpatmgt_Click(Index As Integer) Frmchoose2.Show End Sub Private Sub MDALL_Click() admin2.Show End Sub Private Sub mdapointment_Click() APPOINTMENT.Show End Sub Private Sub mdCash_Click() PATIENT.Show End Sub Private Sub mdClose_Click() Dim response As String

response = MsgBox("ARE YOU SURE YOU WANT TO LOG OFF COMPLETELY", vbYesNo, "WARNNING") If response = vbYes Then Unload Me Else: MAIN.Show End If End Sub Private Sub mddoctor_Click() Doctor.Show End Sub Private Sub mdECash_Click() EXISTINGCash.Show End Sub

Private Sub mdExistmedical_Click() EXISTINGmad.Show End Sub Private Sub mdhelp_Click() HELP.Show End Sub Private Sub MDIForm_Load() txtsearch.Mask = "##-######-&-##" End Sub Private Sub mdissuer_Click() NURSE.Show

End Sub Private Sub MDLGOUT_Click() Dim response As String response = MsgBox("ARE YOU SURE YOU WANT TO LOG OFF COMPLETELY", vbYesNo, "WARNNING") If response = vbYes Then Unload Me Login.Show Else: MAIN.Show End If End Sub Private Sub mdMedical_Click() PATIENT2.Show End Sub Private Sub mdPasswords_Click() End Sub Private Sub search_Click() End Sub Private Sub MDNEWEMP_Click() ADMIN.Show End Sub Private Sub MDNEWSY_Click()

ADMINISTRATOR.Show End Sub Private Sub mdStaff_Click() ADMINISTRATOR.Show End Sub Public Sub POPULATEGRID()

End Sub Private Sub mdRevenue_Click() REPORTS.Show End Sub Private Sub MDSTEM_Click() admin1.Show End Sub Private Sub mnuadmission_Click() frmadm.Show End Sub Private Sub mnubank_Click() frmbank.Show End Sub Private Sub mnuCash_Click() PATIENT.Show End Sub

Private Sub mnuDischarge_Click() frmdis.Show End Sub Private Sub mnuExit_Click() End End Sub Private Sub mnuMedaid_Click() PATIENT2.Show End Sub Private Sub mnupatreg_Click() frmChoose.Show End Sub Private Sub mnupurchase_Click() frmorder.Show End Sub Private Sub mnusup_Click() Frmpay.Show End Sub Private Sub mnusupreg_Click() FrmSupp.Show End Sub Private Sub mnutreat_Click() Doctor.Show

End Sub FORM INPATIENT REGISTRATION Private Sub CmdClear_Click() Unload Me frmInpat.Show End Sub Private Sub CmdQuit_Click() Unload Me MAIN.Show End Sub Private Sub cmdSearch_Click() Call SetDB Dim strSQL As String 'Dim edeptno As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset Dim rsOutpatreg As New ADODB.Recordset Set rsOutpatreg = New ADODB.Recordset Dim resultfalg As Boolean Dim resultflag1 As Boolean resultflag1 = False resultflag = False

'tryid.Pattern = "^(\d{2})\-(\d{6})" 'If tryid.Test(txtsearch.Text) = False Then

'MsgBox "Wrong format for National ID. National ID should be in the form: 58-222299G-04." 'txtsearch.SetFocus 'Exit Sub 'End If Call SetDB strSQL = "Select * from OUTPATREG " rs.Open strSQL, con, adOpenDynamic, adLockOptimistic rs.MoveFirst Do Until rs.EOF If Trim(rs!NID) = Trim(txtsearch.Text) Then txtname.Text = rs!Name txtsn.Text = rs!Surname TxtHID.Text = rs!NID txtadd.Text = rs!Address cmbsex.Text = rs!Sex TxtDT1.Text = rs!Age txtailmnt.Text = rs!Ailment txtphone.Text = rs!Phonenumber 'txtopdmedob.Text = rs(11) & " " resultflag1 = True End If rs.MoveNext Loop If resultflag1 = False Then MsgBox "Record not found in the records", vbInformation, "RESULT" End If End Sub

Private Sub Cmdupdate_Click() TxtDate.Text = UCase(TxtDate.Text) TxtBd.Text = UCase(TxtBd.Text) TxtNok.Text = UCase(TxtNok.Text) cmb1wd.Text = UCase(cmb1wd.Text) If txtsearch.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" txtsearch.SetFocus Exit Sub End If If txtname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtsn.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If TxtHID.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If TxtDT1.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub

End If If cmbsex.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtadd.Text = "" Then MsgBox "PLEASE ADDRESS CAN NOT BLANK", vbCritical, "BLANK TREATMENT" txtadd.SetFocus Exit Sub End If If txtailmnt.Text = "" Then MsgBox "PLEASE GIVE AILMENT TO THE PATIENT", vbCritical, "BLANK PRESCRIPTION" txtailmnt.SetFocus Exit Sub End If If TxtBd.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If TxtNok.Text = "" Then MsgBox "PLEASE NEXT OF KIN FIELD CAN NOT BE BLANK", vbCritical, "BLANK TREATMENT" TxtNok.SetFocus Exit Sub End If If cmb2doc.Text = "" Then

MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If cmb1wd.Text = "" Then MsgBox "PLEASE NEXT OF KIN FIELD CAN NOT BE BLANK", vbCritical, "BLANK TREATMENT" TxtNok.SetFocus Exit Sub End If Call SetDB Dim stSQL As String Dim strSQL As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset strSQL = "SELECT * FROM INPATREG" rs.Open strSQL, con, adOpenDynamic, adLockOptimistic With rs .AddNew 'adding new record .Fields("name") = txtname.Text .Fields("surname") = txtsn.Text .Fields("NID") = TxtHID.Text .Fields("dOB") = TxtDT1.Text .Fields("AILMENT") = txtailmnt.Text .Fields("DOCTOR") = cmb2doc.Text .Fields("sex") = cmbsex.Text .Fields("PHONENUMBER") = txtphone.Text .Fields("ADDRESS") = txtadd.Text .Fields("DATEOFADMISSION") = TxtDate.Text

.Fields("BEDNUM") = TxtBd.Text .Fields("WARDNAME") = cmb1wd .Fields("NEXTOFKIN") = TxtNok

.Update End With MsgBox "INPATIENT'S RECORD SUCCESSFULLY RECORDED", vbInformation, "RESULT" Unload Me frmInpat.Show End Sub

Private Sub Form_Load() txtsearch.Mask = "##-######-&-##" TxtDate.Text = Date TxtDate.Enabled = False End Sub FORM INPATIENT MANAGEMENT Private Sub CmdClear_Click() Unload Me inpatmgt.Show TxtHID.SetFocus End Sub Private Sub CmdDelete_Click() For Each obj In Me If TypeOf obj Is TextBox Then

If obj.Text = "" Then dummy = MsgBox("Missing Field(s). This Field(s) Is Required To Continue", vbExclamation, "Missing Field(s)!") obj.SetFocus Exit Sub End If End If Next SQL = "select * from inpatreg" Set DB = OpenDatabase(App.path + "\db1.mdb") Set rs = DB.OpenRecordset(SQL, dbOpenDynaset) With rs ' With rs .Delete rs!NID = TxtHID.Text rs!Name = txtname.Text rs!Surname = txtsn.Text rs!Adrress = txtadd.Text rs!DOB = txtDob.Text rs!Sex = cmbsex.Text rs!Ailment = txtailmnt.Text rs!Nextofkin = TxtNok.Text rs!PhoneNo = txtphone.Text rs!wardname = cmb1wd.Text rs!Bednum = TxtBd.Text rs!DateofAdmission = TxtDate.Text rs!Doctor = cmb2doc.Text .Delete

.MoveNext End With rs.Close Dim reply reply = MsgBox("Record Successfully Deleted ", vbInformation) 'End With Exit Sub End Sub Private Sub CmdQuit_Click() Unload Me End Sub Private Sub Cmdupdate_Click() On Error GoTo HELL For Each obj In Me If TypeOf obj Is TextBox Then If obj.Text = "" Then dummy = MsgBox("Missing Field(s). This Field(s) Is Required To Continue", vbExclamation, "Missing Field(s)!") obj.SetFocus Exit Sub End If End If

Next SQL = "select * from Inpatreg" Set DB = OpenDatabase(App.path + "\db1.mdb") Set rs = DB.OpenRecordset(SQL, dbOpenDynaset) With rs 'With rs .AddNew rs!NID = TxtHID.Text rs!Name = txtname.Text rs!Surname = txtsn.Text rs!Adrress = txtadd.Text rs!DOB = txtDob.Text rs!Sex = cmbsex.Text rs!Ailment = txtailmnt.Text rs!Nextofkin = TxtNok.Text rs!PhoneNo = txtphone.Text rs!wardname = cmb1wd.Text rs!Bednum = TxtBd.Text rs!DateofAdmission = TxtDate.Text rs!Doctor = cmb2doc.Text .Update End With rs.Close Dim reply reply = MsgBox("Record Successfully Saved ", vbInformation) 'End With

Exit Sub HELL: If Err.Number = 3022 Then dummy = MsgBox("The Employee Have Already Been Validated and Saved into the Database, Proceed to the Next Employee ", vbExclamation, "Employee Already Validated!") End If End Sub Private Sub Form_Load() txtsearch.Mask = "##-######-&-##" End Sub FORM OUTPATIENT MANAGEMENT Private Sub CmdExit_Click() Unload Me MAIN.Show End Sub Private Sub CmdNewApp_Click() Unload Me outpatmgt.Show End Sub Private Sub cmdsave_Click() TxtDate.Text = UCase(TxtDate.Text) txtname.Text = UCase(txtname.Text) txtsurname.Text = UCase(txtsurname.Text) txtOPDMed.Text = UCase(txtOPDMed.Text)

If txtsearch.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" txtsearch.SetFocus Exit Sub End If If txtname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtsurname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtniid.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtdatebooked.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtdoctor.Text = "" Then MsgBox "PLEASE GIVE THE PATIENT DOCTOR", vbCritical, "BLANK DOCTOR" txtailmnt.SetFocus Exit Sub End If

If txtOPDMed.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If cmbVisit.Text = "" Then MsgBox "PLEASE VISIT TYPE FIELD CAN NOT BE BLANK", vbCritical, "BLANK TREATMENT" Exit Sub End If Call SetDB Dim stSQL As String Dim strSQL As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset strSQL = "SELECT * FROM outpatmgt" rs.Open strSQL, con, adOpenDynamic, adLockOptimistic With rs .AddNew 'adding new record .Fields("sname") = txtsurname.Text .Fields("name") = txtname.Text .Fields("id") = txtid.Text .Fields("dOB") = TxtDT1.Text .Fields("opm") = txtOPDMed.Text .Fields("doc") = txtdoctor.Text .Fields("sex") = cmbsex.Text .Fields("PHONENUMBER") = txtphone.Text .Fields("ADDRESS") = txtadd.Text .Fields("DB") = txtdatebooked.Text .Fields("Date") = TxtDate.Text

.Fields("Visit") = CombVisit.Text .Update End With MsgBox "PATIENT'S PRESCRIPTION SUCCESSFULLY RECORDED", vbInformation, "RESULT" Unload Me frmoutpatmgt.Show

End Sub Private Sub cmdSearch_Click() txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If Dim tryid As New RegExp txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If

Call SetDB Dim strSQL As String 'Dim edeptno As String Dim rs As New ADODB.Recordset

Set rs = New ADODB.Recordset Dim rsOutpatreg As New ADODB.Recordset Set rsOutpatreg = New ADODB.Recordset Dim resultflag As Boolean Dim resultflag1 As Boolean resultflag1 = False resultflag = False strSQL = "Select *from Outpatreg " rs.Open strSQL, con, adOpenDynamic, adLockOptimistic rs.MoveFirst Do Until rs.EOF If Trim(rs!NID) = Trim(txtsearch.Text) Then txtname.Text = rs!Name txtsurname.Text = rs!Surname txtniid.Text = rs!NID txtdoctor.Text = rs!Doctor resultflag = True End If rs.MoveNext Loop If resultflag = False And resultflag1 = False Then MsgBox "Record not found in the records", vbInformation, "RESULT" End If End Sub Private Sub Form_Load() txtsearch.Mask = "##-######-&-##" TxtDate.Text = Date End Sub FORM APPOINTMENTS Private Sub CmdExit_Click()

Unload Me MAIN.Show End Sub Private Sub CmdNewApp_Click() Unload Me outpatmgt.Show End Sub Private Sub cmdsave_Click() TxtDate.Text = UCase(TxtDate.Text) txtname.Text = UCase(txtname.Text) txtsurname.Text = UCase(txtsurname.Text) txtOPDMed.Text = UCase(txtOPDMed.Text) If txtsearch.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" txtsearch.SetFocus Exit Sub End If If txtname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtsurname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtniid.Text = "" Then

MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtdatebooked.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If 'If cmbsex.Text = "" Then 'MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" 'Exit Sub 'End If 'If txtadd.Text = "" Then ' MsgBox "PLEASE ADDRESS CAN NOT BLANK", vbCritical, "BLANK TREATMENT" 'txtadd.SetFocus 'Exit Sub 'End If If txtdoctor.Text = "" Then MsgBox "PLEASE GIVE THE PATIENT DOCTOR", vbCritical, "BLANK DOCTOR" txtailmnt.SetFocus Exit Sub End If If txtOPDMed.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If cmbVisit.Text = "" Then

MsgBox "PLEASE VISIT TYPE FIELD CAN NOT BE BLANK", vbCritical, "BLANK TREATMENT" Exit Sub End If Call SetDB Dim stSQL As String Dim strSQL As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset strSQL = "SELECT * FROM outpatmgt" rs.Open strSQL, con, adOpenDynamic, adLockOptimistic With rs .AddNew 'adding new record .Fields("sname") = txtsurname.Text .Fields("name") = txtname.Text .Fields("id") = txtid.Text .Fields("dOB") = TxtDT1.Text .Fields("opm") = txtOPDMed.Text .Fields("doc") = txtdoctor.Text .Fields("sex") = cmbsex.Text .Fields("PHONENUMBER") = txtphone.Text .Fields("ADDRESS") = txtadd.Text .Fields("DB") = txtdatebooked.Text .Fields("Date") = TxtDate.Text .Fields("Visit") = CombVisit.Text .Update End With MsgBox "PATIENT'S PRESCRIPTION SUCCESSFULLY RECORDED", vbInformation, "RESULT" Unload Me

frmoutpatmgt.Show

End Sub Private Sub cmdSearch_Click() txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If Dim tryid As New RegExp txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If

Call SetDB Dim strSQL As String 'Dim edeptno As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset Dim rsOutpatreg As New ADODB.Recordset Set rsOutpatreg = New ADODB.Recordset Dim resultflag As Boolean Dim resultflag1 As Boolean resultflag1 = False

resultflag = False 'Prompt if invalid search key is entered by user 'If Not IsNumeric(edeptno) Then 'MsgBox "Invalid Search Key Entered", vbCritical, "Search Error" ' Exit Sub 'End If

strSQL = "Select *from Outpatreg " rs.Open strSQL, con, adOpenDynamic, adLockOptimistic rs.MoveFirst Do Until rs.EOF If Trim(rs!NID) = Trim(txtsearch.Text) Then txtname.Text = rs!Name txtsurname.Text = rs!Surname txtniid.Text = rs!NID txtdoctor.Text = rs!Doctor resultflag = True End If rs.MoveNext Loop If resultflag = False And resultflag1 = False Then MsgBox "Record not found in the records", vbInformation, "RESULT" End If End Sub

Private Sub Form_Load() txtsearch.Mask = "##-######-&-##" TxtDate.Text = Date End Sub

FORM ADMISSION Private Sub CmdExit_Click() Unload Me MAIN.Show End Sub Private Sub CmdNewApp_Click() Unload Me outpatmgt.Show End Sub Private Sub cmdsave_Click() TxtDate.Text = UCase(TxtDate.Text) txtname.Text = UCase(txtname.Text) txtsurname.Text = UCase(txtsurname.Text) txtOPDMed.Text = UCase(txtOPDMed.Text) If txtsearch.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" txtsearch.SetFocus Exit Sub End If If txtname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtsurname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub

End If If txtniid.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtdatebooked.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If 'If cmbsex.Text = "" Then 'MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" 'Exit Sub 'End If 'If txtadd.Text = "" Then ' MsgBox "PLEASE ADDRESS CAN NOT BLANK", vbCritical, "BLANK TREATMENT" 'txtadd.SetFocus 'Exit Sub 'End If If txtdoctor.Text = "" Then MsgBox "PLEASE GIVE THE PATIENT DOCTOR", vbCritical, "BLANK DOCTOR" txtailmnt.SetFocus Exit Sub End If If txtOPDMed.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub

End If If cmbVisit.Text = "" Then MsgBox "PLEASE VISIT TYPE FIELD CAN NOT BE BLANK", vbCritical, "BLANK TREATMENT" Exit Sub End If Call SetDB Dim stSQL As String Dim strSQL As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset strSQL = "SELECT * FROM outpatmgt" rs.Open strSQL, con, adOpenDynamic, adLockOptimistic With rs .AddNew 'adding new record .Fields("sname") = txtsurname.Text .Fields("name") = txtname.Text .Fields("id") = txtid.Text .Fields("dOB") = TxtDT1.Text .Fields("opm") = txtOPDMed.Text .Fields("doc") = txtdoctor.Text .Fields("sex") = cmbsex.Text .Fields("PHONENUMBER") = txtphone.Text .Fields("ADDRESS") = txtadd.Text .Fields("DB") = txtdatebooked.Text .Fields("Date") = TxtDate.Text .Fields("Visit") = CombVisit.Text .Update End With

MsgBox "PATIENT'S PRESCRIPTION SUCCESSFULLY RECORDED", vbInformation, "RESULT" Unload Me frmoutpatmgt.Show

End Sub Private Sub cmdSearch_Click() txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If Dim tryid As New RegExp txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If

Call SetDB Dim strSQL As String 'Dim edeptno As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset Dim rsOutpatreg As New ADODB.Recordset Set rsOutpatreg = New ADODB.Recordset

Dim resultflag As Boolean Dim resultflag1 As Boolean resultflag1 = False resultflag = False

strSQL = "Select *from Outpatreg " rs.Open strSQL, con, adOpenDynamic, adLockOptimistic rs.MoveFirst Do Until rs.EOF If Trim(rs!NID) = Trim(txtsearch.Text) Then txtname.Text = rs!Name txtsurname.Text = rs!Surname txtniid.Text = rs!NID txtdoctor.Text = rs!Doctor resultflag = True End If rs.MoveNext Loop If resultflag = False And resultflag1 = False Then MsgBox "Record not found in the records", vbInformation, "RESULT" End If End Sub Private Sub Form_Load() txtsearch.Mask = "##-######-&-##" TxtDate.Text = Date End Sub FORM TREATMENT Private Sub CmdExit_Click()

Unload Me MAIN.Show End Sub Private Sub CmdNewApp_Click() Unload Me outpatmgt.Show End Sub Private Sub cmdsave_Click() TxtDate.Text = UCase(TxtDate.Text) txtname.Text = UCase(txtname.Text) txtsurname.Text = UCase(txtsurname.Text) txtOPDMed.Text = UCase(txtOPDMed.Text) If txtsearch.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" txtsearch.SetFocus Exit Sub End If If txtname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtsurname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtniid.Text = "" Then

MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtdatebooked.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtdoctor.Text = "" Then MsgBox "PLEASE GIVE THE PATIENT DOCTOR", vbCritical, "BLANK DOCTOR" txtailmnt.SetFocus Exit Sub End If If txtOPDMed.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If cmbVisit.Text = "" Then MsgBox "PLEASE VISIT TYPE FIELD CAN NOT BE BLANK", vbCritical, "BLANK TREATMENT" Exit Sub End If Call SetDB Dim stSQL As String Dim strSQL As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset strSQL = "SELECT * FROM outpatmgt"

rs.Open strSQL, con, adOpenDynamic, adLockOptimistic With rs .AddNew 'adding new record .Fields("sname") = txtsurname.Text .Fields("name") = txtname.Text .Fields("id") = txtid.Text .Fields("dOB") = TxtDT1.Text .Fields("opm") = txtOPDMed.Text .Fields("doc") = txtdoctor.Text .Fields("sex") = cmbsex.Text .Fields("PHONENUMBER") = txtphone.Text .Fields("ADDRESS") = txtadd.Text .Fields("DB") = txtdatebooked.Text .Fields("Date") = TxtDate.Text .Fields("Visit") = CombVisit.Text .Update End With MsgBox "PATIENT'S PRESCRIPTION SUCCESSFULLY RECORDED", vbInformation, "RESULT" Unload Me frmoutpatmgt.Show

End Sub Private Sub cmdSearch_Click() txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If

Dim tryid As New RegExp txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If

Call SetDB Dim strSQL As String 'Dim edeptno As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset Dim rsOutpatreg As New ADODB.Recordset Set rsOutpatreg = New ADODB.Recordset Dim resultflag As Boolean Dim resultflag1 As Boolean resultflag1 = False resultflag = False

strSQL = "Select *from Outpatreg " rs.Open strSQL, con, adOpenDynamic, adLockOptimistic rs.MoveFirst Do Until rs.EOF If Trim(rs!NID) = Trim(txtsearch.Text) Then txtname.Text = rs!Name txtsurname.Text = rs!Surname

txtniid.Text = rs!NID txtdoctor.Text = rs!Doctor resultflag = True End If rs.MoveNext Loop If resultflag = False And resultflag1 = False Then MsgBox "Record not found in the records", vbInformation, "RESULT" End If End Sub Private Sub Form_Load() txtsearch.Mask = "##-######-&-##" TxtDate.Text = Date End Sub FORM DISCHARGE Private Sub CmdExit_Click() Unload Me MAIN.Show End Sub Private Sub CmdNewApp_Click() Unload Me outpatmgt.Show End Sub Private Sub cmdsave_Click() TxtDate.Text = UCase(TxtDate.Text) txtname.Text = UCase(txtname.Text) txtsurname.Text = UCase(txtsurname.Text) txtOPDMed.Text = UCase(txtOPDMed.Text)

If txtsearch.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" txtsearch.SetFocus Exit Sub End If If txtname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtsurname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtniid.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtdatebooked.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtdoctor.Text = "" Then MsgBox "PLEASE GIVE THE PATIENT DOCTOR", vbCritical, "BLANK DOCTOR" txtailmnt.SetFocus Exit Sub End If

If txtOPDMed.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If cmbVisit.Text = "" Then MsgBox "PLEASE VISIT TYPE FIELD CAN NOT BE BLANK", vbCritical, "BLANK TREATMENT" Exit Sub End If Call SetDB Dim stSQL As String Dim strSQL As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset strSQL = "SELECT * FROM outpatmgt" rs.Open strSQL, con, adOpenDynamic, adLockOptimistic With rs .AddNew 'adding new record .Fields("sname") = txtsurname.Text .Fields("name") = txtname.Text .Fields("id") = txtid.Text .Fields("dOB") = TxtDT1.Text .Fields("opm") = txtOPDMed.Text .Fields("doc") = txtdoctor.Text .Fields("sex") = cmbsex.Text .Fields("PHONENUMBER") = txtphone.Text .Fields("ADDRESS") = txtadd.Text .Fields("DB") = txtdatebooked.Text .Fields("Date") = TxtDate.Text

.Fields("Visit") = CombVisit.Text .Update End With MsgBox "PATIENT'S PRESCRIPTION SUCCESSFULLY RECORDED", vbInformation, "RESULT" Unload Me frmoutpatmgt.Show

End Sub Private Sub cmdSearch_Click() txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If Dim tryid As New RegExp txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If

Call SetDB Dim strSQL As String 'Dim edeptno As String Dim rs As New ADODB.Recordset

Set rs = New ADODB.Recordset Dim rsOutpatreg As New ADODB.Recordset Set rsOutpatreg = New ADODB.Recordset Dim resultflag As Boolean Dim resultflag1 As Boolean resultflag1 = False resultflag = False strSQL = "Select *from Outpatreg " rs.Open strSQL, con, adOpenDynamic, adLockOptimistic rs.MoveFirst Do Until rs.EOF If Trim(rs!NID) = Trim(txtsearch.Text) Then txtname.Text = rs!Name txtsurname.Text = rs!Surname txtniid.Text = rs!NID txtdoctor.Text = rs!Doctor resultflag = True End If rs.MoveNext Loop If resultflag = False And resultflag1 = False Then MsgBox "Record not found in the records", vbInformation, "RESULT" End If End Sub Private Sub Form_Load() txtsearch.Mask = "##-######-&-##" TxtDate.Text = Date End Sub FORM PRESCRIPTION Private Sub CmdExit_Click()

Unload Me MAIN.Show End Sub Private Sub CmdNewApp_Click() Unload Me outpatmgt.Show End Sub Private Sub cmdsave_Click() TxtDate.Text = UCase(TxtDate.Text) txtname.Text = UCase(txtname.Text) txtsurname.Text = UCase(txtsurname.Text) txtOPDMed.Text = UCase(txtOPDMed.Text) If txtsearch.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" txtsearch.SetFocus Exit Sub End If If txtname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtsurname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtniid.Text = "" Then

MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtdatebooked.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtdoctor.Text = "" Then MsgBox "PLEASE GIVE THE PATIENT DOCTOR", vbCritical, "BLANK DOCTOR" txtailmnt.SetFocus Exit Sub End If If txtOPDMed.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If cmbVisit.Text = "" Then MsgBox "PLEASE VISIT TYPE FIELD CAN NOT BE BLANK", vbCritical, "BLANK TREATMENT" Exit Sub End If 'If cmb2doc.Text = "" Then 'MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" ' Exit Sub 'End If Call SetDB Dim stSQL As String

Dim strSQL As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset strSQL = "SELECT * FROM outpatmgt" rs.Open strSQL, con, adOpenDynamic, adLockOptimistic With rs .AddNew 'adding new record .Fields("sname") = txtsurname.Text .Fields("name") = txtname.Text .Fields("id") = txtid.Text .Fields("dOB") = TxtDT1.Text .Fields("opm") = txtOPDMed.Text .Fields("doc") = txtdoctor.Text .Fields("sex") = cmbsex.Text .Fields("PHONENUMBER") = txtphone.Text .Fields("ADDRESS") = txtadd.Text .Fields("DB") = txtdatebooked.Text .Fields("Date") = TxtDate.Text .Fields("Visit") = CombVisit.Text .Update End With MsgBox "PATIENT'S PRESCRIPTION SUCCESSFULLY RECORDED", vbInformation, "RESULT" Unload Me frmoutpatmgt.Show

End Sub Private Sub cmdSearch_Click() txtsearch.Text = UCase(txtsearch.Text)

If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If Dim tryid As New RegExp txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If

Call SetDB Dim strSQL As String 'Dim edeptno As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset Dim rsOutpatreg As New ADODB.Recordset Set rsOutpatreg = New ADODB.Recordset Dim resultflag As Boolean Dim resultflag1 As Boolean resultflag1 = False resultflag = False strSQL = "Select *from Outpatreg " rs.Open strSQL, con, adOpenDynamic, adLockOptimistic rs.MoveFirst Do Until rs.EOF

If Trim(rs!NID) = Trim(txtsearch.Text) Then txtname.Text = rs!Name txtsurname.Text = rs!Surname txtniid.Text = rs!NID txtdoctor.Text = rs!Doctor resultflag = True End If rs.MoveNext Loop If resultflag = False And resultflag1 = False Then MsgBox "Record not found in the records", vbInformation, "RESULT" End If End Sub Private Sub Form_Load() txtsearch.Mask = "##-######-&-##" TxtDate.Text = Date End Sub FORM CASH PATIENT Private Sub CmdExit_Click() Unload Me MAIN.Show End Sub Private Sub CmdNewApp_Click() Unload Me outpatmgt.Show End Sub Private Sub cmdsave_Click() TxtDate.Text = UCase(TxtDate.Text)

txtname.Text = UCase(txtname.Text) txtsurname.Text = UCase(txtsurname.Text) txtOPDMed.Text = UCase(txtOPDMed.Text) If txtsearch.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" txtsearch.SetFocus Exit Sub End If If txtname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtsurname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtniid.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtdatebooked.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtdoctor.Text = "" Then MsgBox "PLEASE GIVE THE PATIENT DOCTOR", vbCritical, "BLANK DOCTOR"

txtailmnt.SetFocus Exit Sub End If If txtOPDMed.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If cmbVisit.Text = "" Then MsgBox "PLEASE VISIT TYPE FIELD CAN NOT BE BLANK", vbCritical, "BLANK TREATMENT" Exit Sub End If Call SetDB Dim stSQL As String Dim strSQL As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset strSQL = "SELECT * FROM outpatmgt" rs.Open strSQL, con, adOpenDynamic, adLockOptimistic With rs .AddNew 'adding new record .Fields("sname") = txtsurname.Text .Fields("name") = txtname.Text .Fields("id") = txtid.Text .Fields("dOB") = TxtDT1.Text .Fields("opm") = txtOPDMed.Text .Fields("doc") = txtdoctor.Text .Fields("sex") = cmbsex.Text .Fields("PHONENUMBER") = txtphone.Text

.Fields("ADDRESS") = txtadd.Text .Fields("DB") = txtdatebooked.Text .Fields("Date") = TxtDate.Text .Fields("Visit") = CombVisit.Text .Update End With MsgBox "PATIENT'S PRESCRIPTION SUCCESSFULLY RECORDED", vbInformation, "RESULT" Unload Me frmoutpatmgt.Show

End Sub Private Sub cmdSearch_Click() txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If Dim tryid As New RegExp txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If

Call SetDB

Dim strSQL As String 'Dim edeptno As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset Dim rsOutpatreg As New ADODB.Recordset Set rsOutpatreg = New ADODB.Recordset Dim resultflag As Boolean Dim resultflag1 As Boolean resultflag1 = False resultflag = False strSQL = "Select *from Outpatreg " rs.Open strSQL, con, adOpenDynamic, adLockOptimistic rs.MoveFirst Do Until rs.EOF If Trim(rs!NID) = Trim(txtsearch.Text) Then txtname.Text = rs!Name txtsurname.Text = rs!Surname txtniid.Text = rs!NID txtdoctor.Text = rs!Doctor resultflag = True End If rs.MoveNext Loop If resultflag = False And resultflag1 = False Then MsgBox "Record not found in the records", vbInformation, "RESULT" End If End Sub Private Sub Form_Load() txtsearch.Mask = "##-######-&-##" TxtDate.Text = Date

End Sub FORM MEDICAL AID Private Sub CmdExit_Click() Unload Me MAIN.Show End Sub Private Sub CmdNewApp_Click() Unload Me outpatmgt.Show End Sub Private Sub cmdsave_Click() TxtDate.Text = UCase(TxtDate.Text) txtname.Text = UCase(txtname.Text) txtsurname.Text = UCase(txtsurname.Text) txtOPDMed.Text = UCase(txtOPDMed.Text) If txtsearch.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" txtsearch.SetFocus Exit Sub End If If txtname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtsurname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH"

Exit Sub End If If txtniid.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtdatebooked.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtdoctor.Text = "" Then MsgBox "PLEASE GIVE THE PATIENT DOCTOR", vbCritical, "BLANK DOCTOR" txtailmnt.SetFocus Exit Sub End If If txtOPDMed.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If cmbVisit.Text = "" Then MsgBox "PLEASE VISIT TYPE FIELD CAN NOT BE BLANK", vbCritical, "BLANK TREATMENT" Exit Sub End If Call SetDB Dim stSQL As String Dim strSQL As String Dim rs As New ADODB.Recordset

Set rs = New ADODB.Recordset strSQL = "SELECT * FROM outpatmgt" rs.Open strSQL, con, adOpenDynamic, adLockOptimistic With rs .AddNew 'adding new record .Fields("sname") = txtsurname.Text .Fields("name") = txtname.Text .Fields("id") = txtid.Text .Fields("dOB") = TxtDT1.Text .Fields("opm") = txtOPDMed.Text .Fields("doc") = txtdoctor.Text .Fields("sex") = cmbsex.Text .Fields("PHONENUMBER") = txtphone.Text .Fields("ADDRESS") = txtadd.Text .Fields("DB") = txtdatebooked.Text .Fields("Date") = TxtDate.Text .Fields("Visit") = CombVisit.Text .Update End With MsgBox "PATIENT'S PRESCRIPTION SUCCESSFULLY RECORDED", vbInformation, "RESULT" Unload Me frmoutpatmgt.Show

End Sub Private Sub cmdSearch_Click() txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID"

Me.txtsearch.SetFocus Exit Sub End If Dim tryid As New RegExp txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If

Call SetDB Dim strSQL As String 'Dim edeptno As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset Dim rsOutpatreg As New ADODB.Recordset Set rsOutpatreg = New ADODB.Recordset Dim resultflag As Boolean Dim resultflag1 As Boolean resultflag1 = False resultflag = False strSQL = "Select *from Outpatreg " rs.Open strSQL, con, adOpenDynamic, adLockOptimistic rs.MoveFirst Do Until rs.EOF If Trim(rs!NID) = Trim(txtsearch.Text) Then txtname.Text = rs!Name

txtsurname.Text = rs!Surname txtniid.Text = rs!NID txtdoctor.Text = rs!Doctor resultflag = True End If rs.MoveNext Loop If resultflag = False And resultflag1 = False Then MsgBox "Record not found in the records", vbInformation, "RESULT" End If End Sub Private Sub Form_Load() txtsearch.Mask = "##-######-&-##" TxtDate.Text = Date End Sub FORM SUPPLIER Private Sub CmdExit_Click() Unload Me MAIN.Show End Sub Private Sub CmdNewApp_Click() Unload Me outpatmgt.Show End Sub Private Sub cmdsave_Click() TxtDate.Text = UCase(TxtDate.Text) txtname.Text = UCase(txtname.Text) txtsurname.Text = UCase(txtsurname.Text)

txtOPDMed.Text = UCase(txtOPDMed.Text) If txtsearch.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" txtsearch.SetFocus Exit Sub End If If txtname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtsurname.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtniid.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtdatebooked.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If txtdoctor.Text = "" Then MsgBox "PLEASE GIVE THE PATIENT DOCTOR", vbCritical, "BLANK DOCTOR" txtailmnt.SetFocus Exit Sub

End If If txtOPDMed.Text = "" Then MsgBox "YOU CAN NOT SERVE A BLANK RECORD", vbCritical, "BLANK SEARCH" Exit Sub End If If cmbVisit.Text = "" Then MsgBox "PLEASE VISIT TYPE FIELD CAN NOT BE BLANK", vbCritical, "BLANK TREATMENT" Exit Sub End If Call SetDB Dim stSQL As String Dim strSQL As String Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset strSQL = "SELECT * FROM outpatmgt" rs.Open strSQL, con, adOpenDynamic, adLockOptimistic With rs .AddNew 'adding new record .Fields("sname") = txtsurname.Text .Fields("name") = txtname.Text .Fields("id") = txtid.Text .Fields("dOB") = TxtDT1.Text .Fields("opm") = txtOPDMed.Text .Fields("doc") = txtdoctor.Text .Fields("sex") = cmbsex.Text .Fields("PHONENUMBER") = txtphone.Text .Fields("ADDRESS") = txtadd.Text .Fields("DB") = txtdatebooked.Text

.Fields("Date") = TxtDate.Text .Fields("Visit") = CombVisit.Text .Update End With MsgBox "PATIENT'S PRESCRIPTION SUCCESSFULLY RECORDED", vbInformation, "RESULT" Unload Me frmoutpatmgt.Show

End Sub Private Sub cmdSearch_Click() txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If Dim tryid As New RegExp txtsearch.Text = UCase(txtsearch.Text) If txtsearch.Text = "__-______-_-__" Then MsgBox "Patient national ID cannot be Blank", vbOKOnly, "Blank ID" Me.txtsearch.SetFocus Exit Sub End If

Call SetDB Dim strSQL As String 'Dim edeptno As String

Dim rs As New ADODB.Recordset Set rs = New ADODB.Recordset Dim rsOutpatreg As New ADODB.Recordset Set rsOutpatreg = New ADODB.Recordset Dim resultflag As Boolean Dim resultflag1 As Boolean resultflag1 = False resultflag = False strSQL = "Select *from Outpatreg " rs.Open strSQL, con, adOpenDynamic, adLockOptimistic rs.MoveFirst Do Until rs.EOF If Trim(rs!NID) = Trim(txtsearch.Text) Then txtname.Text = rs!Name txtsurname.Text = rs!Surname txtniid.Text = rs!NID txtdoctor.Text = rs!Doctor resultflag = True End If rs.MoveNext Loop If resultflag = False And resultflag1 = False Then MsgBox "Record not found in the records", vbInformation, "RESULT" End If End Sub Private Sub Form_Load() txtsearch.Mask = "##-######-&-##" TxtDate.Text = Date End Sub

Related Documents


More Documents from "Margarita Alcevska"