MPRA Paper 70218
MPRA Paper 70218
This is a concise research as a requirement for Part III National Diploma in Information
It is hoped that this study will detail as much as possible the issues involved in a research
The writer visited Kwekwe General Hospital to establish the system requirements. The
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
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
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
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
technology.
Many thanks to my Project Supervisor Mr Ziwada for his assistance and above all
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
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.
interrelationships.
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.
To create a system, which would make provision of back up easy and non-
strenuous
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
INTRODUCTION
The health sector is one of the areas, which is moving on a slow pace as far as
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
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
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
management systems will see the Hospital providing the market with a service second to
none
and installing it in local and remote sectors of the company or organization, and
Hospitals also need these type of system management tools, to handle multi-
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
operate efficiently.
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
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
purpose of gathering information from respondents. Although they are often designed for
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
used effectively can gather information on both the overall performance of the test system
demographic questions on the participants, they can be used to correlate performance and
satisfaction.
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
This is especially true for studies involving large sample sizes and large
geographic areas. Written questionnaires become even more cost effective as the
Questionnaires are easy to analyze. Data entry and tabulation for nearly all
Questionnaires are familiar to most people. Nearly everyone has had some
apprehensive.
middle-man bias. The researcher's own opinions will not influence the respondent
dramatically lower our confidence in the results. Response rates vary widely from
respondent with respect to response format. In essence, they often lose the "flavor
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
cues are not available with written questionnaires. The lack of personal contact
will have different effects depending on the type of information being requested.
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
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
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)
4. The speeds at which services are provided are favorable and fast. (Tick where
appropriate)
I agree
Do not agree
No opinion
b) Distribution of drugs
e) What happens to the records when their period of use has expired?
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
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
table
WHY OBSERVATIONS WERE USED
Observer can also obtain data describing the physical environment of the task
Relatively inexpensive
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
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
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,
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
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:
Storage of information
What happens to the records when their period of use has expired?
Uses of information
What opportunities for further utilization of the information would you want
explored?
Computer System
DRAWBACKS OF 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
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
SAMPLING OF DOCUMENTS
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
requirements
Can be time-consuming
information
documented elsewhere
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
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
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
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.
The writer proposes a patient database coupled with a user-friendly interface to facilitate
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
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
The system should comply with the rules, regulations, Medical Practitioners Body
services.
The system will provide multi Doctor, multi Room appointment handling
The proposed solution shall eliminate filling and reduce the cost of stationary.
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.
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
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
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.
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
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.
To develop a very precise, concise, cost cutting and efficient Hospital Management
system
OBJECTIVES
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
To generate summary reports which calls for decision making. Reduce the
SYSTEMS ALTERNATIVES
The existing system can be improved in order to solve some of the problems currently
being faced.
ADVANTAGES
o Least expensive
DISADVANTAGES
ALTERNATIVE B
A service bureau is a commercial organization with its own computer facility, which
ADVANTAGES
It helps organizations’ non-skilled computer personnel to familiarize
of their own
very small and has few transactions it pays less/cheaper than In-House.
It can contact and pay for specific special services that are needed
DISADVANTAGES
Services of bureau are made on contract, they are not very reliable as contracts
can be terminated
To ensure adequate security is being provided, auditors are sent to service bureau
One problem is to transport data and information between the two locations
ALTERNATIVE C
function.
ADVANTAGES
program implementation
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
With packaged software the vendor is likely to stress user training would have
Ongoing Support- Most reputable packages are sold with on going support
which can have problems of excessive costs, loss of essential development staff
DISADVANTAGES
3. The package may be difficult to use-will not have the same report layout, data
organization
standard documentation
ALTERNATIVE D
ADVANTAGES
4. It will have the report layout, data names and terminology used by the
organization
10. It will contain procedures, which are only needed by the users
13. Resources could be further utilized for other functions, for example, accounting
DISADVANTAGES
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
and implementation of alternative 4 compared to the other three. It is better than the
JUSTIFICATION
The proposed system will impact on the duties, responsibilities and workload of all
1. Allows multi user access to information and incorporate on-line enquiry facilities
3. Simplicity in maintaining supplier records, and issues, capturing and storing data
6. There are some common signs that indicate the need to update a system from a
2. When spreadsheets are not allowing the functionality extent that is required.
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,
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
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
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
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
This chapter will explore feasibility study for the system and various functional and non-
functional 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. Non-
functional requirements will also give an overview of the hardware and software
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
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
It is technically feasible to develop the proposal system since management is willing and
256MB RAM
Microsoft XP
Microsoft access
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,
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.
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
Development Costs
Items Cost ($)
3 Pentium 4 computers 3600 000
2 Laser printers 200 000
Windows XP operating system 100 000
Antivirus software 50 000
Visual basic 6.0 software package 50 000
Software for backup 30 000
Salary for development team 250 000
Total Development Costs 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
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
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
writable compact disks and flash memory for data storage and printing costs for the final
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
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
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.
We shall divide the functional requirements into; patient requirements, hospital staff
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-to-
date.
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
3. Instantly check patients who have booked a particular day and a particular doctor.
OVERALL SYSTEM
a) The overall system should place appointments on doctor’s desk for future
b) The system should be useful for data mining, better decision-making and
c) The system should bridge across disparate healthcare applications and brings
wherever it is needed.
same time eliminating time, cost and errors associated with microfiche and
paper-based documents
extranet capabilities
Network Server. The user should be able to retrieve the documents from the
k) The system should have a powerful query tool that allows the user to search
l) The system should provide appointment modules in the, one for the doctor
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
- Appointment Details
- Payment History
- Patient Profile
- Doctor Profile
- Treatment Details
3.3 NON-FUNCTIONAL REQUIREMENTS
SECURITY
3. The system shall not disclose any personal information about patients to other
4. The system should have robust engine based on the latest security and advanced
5. The system should allow complete control by defining different user roles to grant
CONSTRAINS
given time.
after a total of 3 hours training. After this training the average number
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.
DATE
Gantt Chart
The Gantt chat shows a work plan and a work breakdown schedule
Design
Implementatio
n
Maintenance
Data flow Diagram
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
It is a repository of
Flow
Directional flow of
to its destination
Process
Changes input data into
predefined sequence of
steps
LEVEL ZERO DFD
Supplier
Patient
Returns
HOSPITAL MANAGEMENT
SYSTEM
Deposits
Requisitions
Bank Details
Bank Statements
Bank loans
Interests
Withdrawals
Bank
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
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.
LEVEL ONE DATA FLOW DIAGRAM FOR Hospital Management System
Supplier Details
Account Details Supplier
Bank
Hospital Details Patient Details
Patient file
Patient Details 1.0 Supplier details
Patient Supplier file
REGISTRATION
Registration
Account Details
Treatment Details
Bank file
Health details
Product Details
Product file
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.
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
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
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
REPORTING
Reports for information generated from each and every subsystem are created.
2ND LEVEL DFD FOR HOSPITAL MANAGEMENT
SYSTEM
Patient
Patient Details
Registration Patient File
Hospital Details
2ND LEVEL DFD FOR PROCESS 2.0
2.1
Out-patient file
Product Details
Product file
2.3
Patient Details
Patient file Treatment/ Treatment Details
Treatment File
Discharge
Discharge File
Patient Discharge File
Payment
Supplier Refunds
3 .2
Payments Receipting
Patient
A/c Details
Bank File 3.3
Banking
Banking Details
Bank Information file
Patient
Update
Patient discharge details
Patient Discharge file Updated Discharge details
Updated Discharge file
Treatment Details
Treatment File Updated Treatment Details
Updated Treatment file
Accounting
A/c payable details Update Updated payable details
A/c Payable file Updated A/c payable file
4.4
Bank Details
Bank file
Bank
Update
Updated bank details
Updated bank file
REGISTRATION SYSTEM(1.0)
This subsystem captures details of entities in the system. The subsystem is subdivided
Patient Registration
Supplier/Product Registration
Patient Registration(1.1)
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
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.
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
Health Information
Patient Management
The Patient Management Subsystem is designed to take care of all the activities and
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.
appointment scheduling and discharge details. The subsystem is further split into three
Admissions
Treatment
Discharge
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.
This module facilitates tracking the services given to patients depending on the
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
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
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
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 Payment
The Receipting
The Banking
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
This module facilitates cashier operations for different categories of patients like
different services like bed charges, lab tests conducted, medicines issued, consultant's
fee,. This subsystem provides for credit partly. The receipting subsystem is extensively
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,
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 date-
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
It is easier to draw.
More compact.
Employs the use of the three basic control structures used in all structured
START
SELECT OPTION
OPTION=1
YES NO
OPTION=2
DO NO
YES
REGISTRATION
OPTION=3
YES NO
DO OPTION=4
YES NO
HEALTH
MANAGEMENT
DO
ACCOUNTING
DO
DO
UPDATING
REPORTING
EXIT
PSEUDOCODE
Initialize the program
Input Choice
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.
Registration
Supp/Prdct Supp/Prdct
Registration Registration
Start
Enter Option
Pseudo-code
Enter option
If option=1.1 then
Enter Patient Registration Yes No
Option=
Another Record? 1.1
If Yes then
Repeat Patient Registration
Else
Stop
Else
Patient Supplier
Enter Supplier Registration
Registration Registration
Another Record?
If Yes then
Repeat Supplier Registration
Else
Stop
Stop
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
Enter Option
Yes Yes
Supplier Bank
Patient
Update Update
Update
No No No
Stop
Pseudo-code
Enter option
If option=4.1 then
Enter Patient Update No
Another Record?
If Yes then
Repeat Patient Update
Else
Stop
Else No
Enter Supplier Update
Another Record?
If Yes then
Repeat Supplier Update
Bank
Else Update
Stop
Else
Enter Bank Update
Another Record?
If Yes Then Anothe Yes
Repeat Bank Update r
Record
Else ?
Stop No
Reporting
Patient Supplier
Report Report
Registration
Registration
C1
Enter Option
Pseudo-code
Enter option
If option=5.1 then
Enter Patient Report Yes No
Option=
Another Record? 1.1
If Yes then
Repeat Patient Report
Else
Stop
Else
Patient Supplier
Enter Supplier Report
Report Report
Another Record?
If Yes then
Repeat Supplier Report
Else
Stop
Stop
Structured Chart for Hospital Management System
Hospital
Management
System
Health
Registration Management Accounting Updating Reporting
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
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
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
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
- Mouse
- Keyboard
- Color monitor
- Power cables
Software Requirements
- Windows 2000 or Windows XP professional operating system
- 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
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 DATA TYPE LENGTH
This will be an auto-generated field,
which will also act as a primary key to
Patient ID uniquely identify a patient record in
Number (long) 8
this table.
Name This field will take patient names. Text 15
Surname This field will take patient surname Text 15
Date of birth The patient’s date of birth Date/Time 8
SPLASH SCREEN
LOGIN
MAIN MENU
REGISTRATION REPORTING
HEALTH ACCOUNTING
MANAGEMENT
PAYMENT
PATIENT REPORT
PATIENT FORM
RECEIPTING
PATIENT
MANAGEMENT
SUPPLIER FORM BANKING SUPPLIER
REPORT
ADMISSION
TREATMENT
DISCHARGE
HEALTH
INFORMATION
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
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
Considerations have been made about security concerns and factors below are discussed
in detail :
It is imperative to keep the computers under physical security in order to keep them safe
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
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.
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.
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
User Name
entered here
Select user
Levels here
Insert password
Here
main system platform. The user is denied access if any of the user details are wrong or
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
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.
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:
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
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 module-
testing phase.
Unnoticed design errors may be detected and corrected without undue costs, at an
Early error detection means that expensive redesign and re- implementation may
be avoided.
Validation can begin early in the testing process as a demonstrable system can be
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
because the system is actually designed to add convenience on the part of both the
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
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
Go to [Control Panel]
SPLASH SCREEN
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
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.
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
Management System” in the “Programs Files” folder. The path to the system then
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
Maintenance
Introduction
system is up and running but that is not the end of the story. All computer
Corrective Maintenance
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
has to be used. The system will be altered only if the changing environment
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
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
periodic reviews with the users or the representatives of the hospital to audit
objectives when the system has been implemented we will first hold
monthly reviews so that if there are any problems arising they may be
every six months so that if there are any changes due to changes in hospital
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
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
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
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
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
End If
End If
End If
End Sub
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
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
Call SetDB
Dim stSQL As String
Dim rsEmployee As New ADODB.Recordset
Set rsEmployee = New ADODB.Recordset
Dim resulfalg2 As Boolean
resultflag = False
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
End Sub
'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
End Sub
End Sub
End Sub
End Sub
Private Sub mnuadmission_Click()
frmadm.Show
End Sub
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
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
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
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
'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-222299-
G-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
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
.Update
End With
MsgBox "INPATIENT'S RECORD SUCCESSFULLY RECORDED", vbInformation,
"RESULT"
Unload Me
frmInpat.Show
End Sub
Next
.Delete
.MoveNext
End With
rs.Close
Dim reply
reply = MsgBox("Record Successfully Deleted ", vbInformation)
'End With
Exit Sub
End Sub
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
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
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
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
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
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
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
FORM TREATMENT
Private Sub CmdExit_Click()
Unload Me
MAIN.Show
End Sub
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
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
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
FORM PRESCRIPTION
Private Sub CmdExit_Click()
Unload Me
MAIN.Show
End Sub
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
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
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
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
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
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
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
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