Medical Billing Final Project

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 293

Medical Billing System

Prepared For

Federal Urdu University of Arts, Science and Technology


Islamabad

Hassnain Rafique
Bachelor in Computer Science
Wasaf Ul Hassan
Bachelor in Computer Science
Supervised by:
Mr. Khawaja Tahir
Lecturer
Department of Computer Science
Coordinated by:
Ma’am Fakhra
Lecturer
Department of Computer Science

Session [2016-2020]

Medical Billing System


Prepared For
Federal Urdu University Of Arts Science & Technology,
Islamabad.

A Project Presented to

Page1
Federal Urdu University of Arts Science & Technology

In Partial Fulfillment of the Requirement for the

Degree of Bachelor of Computer Science

by

Hassnain Rafique

Wasaf Ul Hassan

January, 2020

Final Approval
Dated
It is certified that I have read the project report submitted by Hassnain Rafique and
Wasaf ul Hassan and it is our judgment that this project is of sufficient standard to
warrant its acceptance by the FUUAST university, Islamabad for the Degree of BSCS in
System Software.

Committee

External Examiner

_________________________

Page2
Project Supervisor
__________________________
_
Mr. Khawaja Tahir.
Department of Computer Science
Project Coordinator
__________________________
_
Ma’am Fakhra
Department of Computer Science.

Dedication
“Dedicated…

To the Holy Prophet (PBUH) “The Mohsen” of whole community,

To our beloved parents who blessed us with their wisdom and they are always there when
we need them the most. They guided us throughout and supported us through all the
hardships of
Life.

To our teachers who shared with us their experience and knowledge.

And

To our friends from their good will and company we enjoyed every single moment of our
Education and university life”

Page3
Acknowledgment
All praise to Almighty Allah who gave us the understanding, courage and patience to
complete this project.

Thanks to our parents and all well-wishers who helped us during our most difficult times
and it is due to their untiring efforts that we are at this position today.

We express our gratitude to our kind teacher Sir Khawaja Tahir for providing us
opportunity to learn and enhance our knowledge. He has been ready to help and guide us
throughout the project in any way possible.

Project in Brief
Project Title Medical Billing System

Page4
Objective The system is designed to help the administrator to automate
the work for ease and profit.

Undertaken By Hassnain Rafique(Team Leader)


Wasaf Ul Hassan

Supervised By Sir Khawaja Tahir

Date Started 30th November 2019

Date Ended 12th September 2020

Tools used Microsoft Visual Studio 2017

Microsoft SQL server 2018

Microsoft Word 2016

Microsoft Visio 2016

Microsoft PowerPoint 2016

Microsoft Office 365

System used Core i7, Processor 2.5 GHz, 16 GB RAM

Abstract

Page5
In some universities, there is no such fully automated platform exists where the record of
the employees can easily be saved and extracted. Data of the employee doesn’t maintain
properly, each time the DEO enters record into the system when application generated.
There is no such proper system to get the medical receipt directly from the hospital.
Moreover, there is no such system which can be used to monitor the status of employee’s
medical quota and also in some universities, although there is facility to get the report of
the employees but not according to the requirement.

Table of Contents
1. CHAPTER INCEPTION....................................................................................................................................1
1.1 VISION & SCOPE.........................................................................................................................................11
1.1.1 Introduction...........................................................................................................................................13
1.1.2 Purpose.................................................................................................................................................13
1.1.3 Scope..................................................................................................................................................... 14
1.1.4 Definitions, Acronyms and Abbreviations..............................................................................................14
1.1.5 References.............................................................................................................................................14
1.1.6 Overview...............................................................................................................................................14
1.2.0 Positioning............................................................................................................................................15
1.3.0 Stakeholder and User Descriptions.......................................................................................................17
1.4.0 System Overview....................................................................................................................................19
1.4.1 Cost and Pricing....................................................................................................................................20
1.4.2 Licensing and Installation.....................................................................................................................20
1.5.0 System Feature and Priorities...............................................................................................................20
1.6.0 Constraints............................................................................................................................................22
1.7.0 Quality Ranges......................................................................................................................................23
1.8.0 Other Item Requirements.......................................................................................................................24
2. CHAPTER ELABORATION............................................................................................................................25
2.1 SOFTWARE REQUIREMENTS SPECIFICATIONS....................................................................................................26
2.1.1 Introduction...........................................................................................................................................28

Page6
2.1.2 Purpose.................................................................................................................................................28
2.1.3 Scope..................................................................................................................................................... 29
2.1.4 Definitions, acronyms and abbreviation................................................................................................29
2.1.5 Overview...............................................................................................................................................30
2.2.0 Functional Requirements.......................................................................................................................30
2.3.0 Non Functional Requirements...............................................................................................................30
2.4.0 External Interface Requirements...........................................................................................................39
2.2 USE CASES DIAGRAM......................................................................................................................................40
2.3 FULLY DRESSED USE CASE.............................................................................................................................46
2.4 SYSTEM SEQUENCE DIAGRAM.........................................................................................................................87
2.5 ENTITY RELATION DIAGRAM.........................................................................................................................109
2.6 NORMALIZATION............................................................................................................................................112
2.7 DOMAIN MODEL.............................................................................................................................................121
2.8 RELATIONAL MODEL.....................................................................................................................................124
2.9 FEATURE
ACCESSIBILTY………………………………………………………………………………………………
……...……….131
3. CHAPTER CONSTRUCTION.......................................................................................................................135
3.1 CLASS DIAGRAM...........................................................................................................................................136
3.2 IMPLEMENTATION CODE................................................................................................................................139
3.3 TEST
CASES………………………………………………………………………………………………………
…………….……….285
4. CHAPTER TRANSITION..............................................................................................................................325
4.1 USER GUIDE..............................................................................................................................................326

5. CHAPTER PROJECT MANAGEMENT......................................................................................................353


5.1 PROJECT DEVELOPMENT PLAN.......................................................................................................................356
5.1.1 Introduction.........................................................................................................................................356
5.1.2 Project Organization...........................................................................................................................358
5.1.3 Project Plan.........................................................................................................................................360
5.1.4 Technical Process Plans......................................................................................................................362
5.1.5 Process Improvement Plan..................................................................................................................363

Page7
1. CHAPTER
INCEPTION

Page8
VISION
FOR

MEDICAL BILLING MANAGEMENT


SYSTEM

Version 1.1

Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
23rd Jan, 2020

Page9
Revision History

Version Description Author Date

Hassnain Rafique /
1.0 This covers the major vision documents 11th Jan, 20120
Wasaf Ul Hassan

This covers the major vision of Hassnain Rafique /


1.1 23th Jan, 20120
ducuments Wasaf Ul Hassan

1. Introduction
Our medical billing system is a desktop application which is being developed for the
FUUAST that assists to maintain the record of the employees, employee’s dependent,
medical quota, application generation and also monitor medical billing status of every
employee.
The previous system uses Microsoft Excel and it is hard to manage keep track of data
and to perform simple tasks it requires an immense amount of time and energy. No such
system previously being used for required purposes.
The organization wants to find a solution to easily track and maintain record. Moreover,
add, update, view, and generate reports of data. The main goal of our system is to get the
fast application generation and monitor status of the employees’ medical quota and
directly add receipt into the system.

P a g e 10
The major goal of the system is to fulfill the client’s wishes and provide a better working
environment for the administrator to work in easy and effective way so they can save
time and work in more efficient way.

1.1 Purpose
The purpose of the Medical Billing Management System is to add and maintain
employee billing data properly into the system. Moreover, to manage and monitor status
of the employees’ billing

Medical Billing Management System (MBMS) is to collect, analyze, and define needs
and features of the employees’ medical billing system to manage the record of
employees, employees’ dependent, application generation, monitoring status. It focuses
on the functionality needed by the stakeholders. The details of how the (MBMS) fulfils
stakeholders are described in the use-case and supplementary specifications.

1.2 Scope
In our (MBMS), the old system is transitioned to a new computerized system. Different
modules will be constructed based on the requirements gathered from the stake holder
and the environment. Main modules are Security, User, Data Logging, Department,
Employee, Employee dependent, Application Generation, Medical Claim, Medical
Billing, and Online Medical Receipt.

1.3 Definitions, Acronyms and Abbreviations


Term/Abbreviation Description
MBMS Medical Billing Management System

1.4 References
Persons Involved:
• Mr. Khawaja Tahir (Supervisor CS Department FUUAST Islamabad)
• Mr. Muhammad Zeeshan (Admin Officer)
• Mr. Abdul Mateen (Additional Registrar FUUAST Islamabad)

1.5 Overview
This document provides the introduction of the (MBMS), the positioning information
(which includes business opportunity, problem statement, and System position
statement), stakeholders and the description of their interaction with the Desktop based
system, and system overview.

P a g e 11
2.0 Positioning

2.1 Business Opportunity


The previous system is hard to use and manage. To keep track of simple tasks, it requires
an immense amount of time and energy. So, to fulfill the requirements of the
stakeholders, we are developing a computerized Medical Billing System. By doing this
the productivity of the business will increase by fair amount and the overall procedure of
record keeping of employees will be simplified.

2.2 PROBLEM STATEMENT


Previous (MBMS) uses Microsoft Excel.
It leads to the mishandling of the records of employee,
The problem employees’ dependent, etc.
It is very difficult and time consuming and there is no sense
of of security.
All the records save in the excel sheet and if a person wants to
see, he/she can access all the records

It will effect administrator to increase efficiency and provides


Effects security to data. Moreover, availability of the data according
to the privileges given to the user of the system and security
does not compromise and will reduce errors.
It will effect time management and fast retrieval of data and
delivery of reports. Moreover, data security (which is an
important factor) is provided to the user.

Data will be secured enough that no third person can access


anything without the permission of the user of the system.
To update data would be very easy.

The impact of Efficiency of the users gets affected.


which is
Administrator and assistant will be able to get a lot of help
available regarding record of employees, employee
dependent etc.

A successful A system which provides simplicity and efficiency without


solution would be compromising the security of the data.
An error free system and will providing best management of
employees etc.
All the required modules like security management, user

P a g e 12
management, department management, employee
management, employee dependent management, application
generation, medical billing would assist management of the
FUUAST to keep record properly maintained and would
provide efficient environment in order to make work easy and
reliable.
The system will be reliable and efficient.

2.3 System Position Statement


For FUUAST Islamabad
The Medical Billing Management System (MBMS)
That Keeps a large number of records of employees and employees’
dependent.

Our Product Uses new technologies for development. This system is going to be
built by keeping in mind the latest business requirements. By
providing better performance, security, reliability so that the business
runs efficient and fast.
All the required modules like security management, user management,
department management, employee management, employee dependent
management, application generation, medical billing would assist
management of the FUUAST to keep record properly maintained

3. Stakeholder and User Descriptions

3.1 STAKEHOLDER SUMMARY


Name Represents Role

They will provide all requirements Ensure that the system will
Administrator that are required to complete the have all records. Also create
(Primary Actor) product. record, maintain record,
generate and view reports.

Assistant He will provide all requirements Ensure that the system will
(Primary Actor) that are required regarding MBMS have all records. Also
to complete the product. generate, add data and view
reports.

Additional He will provide all requirements Ensure that the system will
Registrar that are required regarding MBMS have all records. Also
(Primary Actor) to complete the product. generate, approve/not approve
status and view reports.

P a g e 13
Assistant Ensure that the system will
Registrar He will provide all requirements have all records. Also
(Primary Actor) that are required regarding MBMS generate and view reports.
to complete the product.

Deputy Ensure that the system will


Registrar He will provide all requirements have all records. Also
(Primary Actor) that are required regarding MBMS generate and view reports.
to complete the product.

3.2 USER SUMMARY


Name Description
Administrator He will interact with the system after installation, he can create,
maintain, update a record and also enter data into the system.

He will interact with the system after installation, he can enter data
Assistant
into system according to the privileges given by the Administrator.

Additional He will interact with the system after installation, according to the
Registrar privileges provided to him.

He will interact with the system after installation, according to the


Assistant
privileges provided to him.
Registrar

He will interact with the system after installation, according to the


Deputy
privileges provided to him.
Registrar

3.3 Key Stakeholder / User Needs


Existing system doesn’t have a proper environment to manage the record of the
employees and can’t be updated efficiently as required.(MBMS) will provide, maintain,
efficiently update, and automatic repose, and handling different situations etc. and will

P a g e 14
be easy to access each and every record available in (MBMS) when needed at once or at
different times. Efficient reporting will also be provided.

4. System Overview
This system is being made to replace the old system. The main idea is to have easy
access to the records and managing them efficiently. This system which is being
designed would provide the main feature of digitally accessing the different records,
which was not possible before. The users will have their own accounts, separate
according to user category, where they will be able to enter records according to
privileges.

4.1 System Perspective


This (MBMS) is a completely new system for the users of Business Community. It has
the database of employee customization, quote Suggestion (Data searching, Data
updating), manage quota system, logging, and guide etc. There are other features such as
report generation etc. which is totally something new for the users.

4.2 SUMMARY OF CAPABILITIES


Benefit Supporting Features

Users will digitally access information. Digital information is easy to access.

Administrator would manage the system Computerized system plus digital information
easily as compared to existing system. management using computers makes
management easier.

System can generate different types of Computerized system settings will always
reports according to given criteria. make the business running efficiently.

4.3 Assumptions and Dependencies


• The Default language of the (MBMS) is English so the user of the system should
be able to read, write and perceive the proper meaning.
• On the developing side the implementers should be familiar with the
programming languages used.

4.4 Cost and Pricing


• It is an honor to design a system for the FUUAST so this respect is our price.
4.5 Licensing and Installation
FUUAST has rights in order to install the system.
Installation of the system will take place after complete development.

P a g e 15
5. System Feature and Priorities

Security Management
Process Logging Priority: High
Forget Password Priority: High
Change Password Priority: High
User Management
Add User Priority: High
Search User Priority: High
Update User Priority: High
View User Priority: High
Log Generation Management
View Data Log Priority: High

Department Management
Add Department Priority: High
Update Department Priority: High
View all Department Priority: High
Hospital Management
Add Hospital Priority: High
Update Hospital Priority: High
View all Hospital Priority: High
Employee Management
Add Employee Priority: High
Search Employee Priority: High
Update Employee Priority: High
Employee Dependent Managment
Add Employee Dependent Priority: High
Search Employee Dependent Priority: High
Update Employee Dependent Priority: High
View Employee Dependent Priority: High
Medical Quota Management
Add Quota Priority: High
Search Quota Priority: High
Update Quota Priority: High
View Quota Priority: High
Application Generation Management
Generate Medication Letter Priority: Low

P a g e 16
Search Application Priority: High
View Application Priority: High
Re-Imbrusement Status Management
Add Claim Priority: High
Search Claim Priority: High
Monitor Status Priority: Low
Update Claim Priority: High
View Claim Priority: High

Application Status Management


View Application Priority: High
Update Status Priority: High
Monitor Status Priority: Low
Signature Management
Add Signature Priority: High
Update Signature Priority: High
Medical Billing Management
Add Bill Priority: High
Search Bill Priority: High
Update Bill Priority: High
Monitor Status Priority: Low
View Bill Priority: High
Generate Report Priority: High
Sop’s Management
Add SOPs Priority: High
Update SOPs Priority: High
View SOPs Priority: High
Generate Report Priority: High

6. Constraints
The system is compatible for any platform. Since we are using tools i.e. MySQL,
(VS 2010+), Visio 2010+ therefore the system on which this whole (MBMS) is
installed must be at least single core 2 GHZ.

P a g e 17
7. Quality Ranges

7.1 Accuracy
Our system will meet the specified requirements and give accurate results. The result
generated will be consistent and according to the requirements gathered by the
stakeholders.

7.2 Performance
The (MBMS) has a simple GUI, so that the users of the system will not have any
problem in handling the system. The overall experience of the usage will be
satisfactory.
Standard queries will take no longer than 2-3 second.

7.3 Security
Our (MBMS) provides better security by authenticating users and giving them access
to the system according to their privileges. Without proper authentication no one can
access the system.

7.4 Usability
The system will be easy to use. The (MBMS) has simple and attractive interface that has
all of the components arranged logically so that the users of the system will not have any
problem in handling the system. The overall experience of the usage will be satisfactory.

7.5 Availability
As the system is a desktop application, it will run 24/7 as the user wants it to run.

8. Other Item Requirements

8.1 System Requirements


Minimum Windows 7
8.2 Platform
The system is a desktop-based application.
8.3 Printer
Printer is used to print the required form or and reports.

P a g e 18
2.CHAPTER
ELABORATION

Software Requirement
Specifications

P a g e 19
MEDICAL BILLING MANAGEMENT
SYSTEM

Version 1.2

Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
11th Sep, 2020

Revision History

P a g e 20
Version Description Author Date

Hassnain Rafique /
1.0 This covers the major SRS documents 11th Jan, 2020
Wasaf Ul Hassan

Hassnain Rafique /
1.1 This covers the major SRS documents 23th Jan, 2020
Wasaf Ul Hassan

Hassnain Rafique /
1.2 This covers the major SRS documents 11th Sep, 2020
Wasaf Ul Hassan

1 Introduction
Our medical billing system is a desktop application which is being developed for
the FUUAST that assists to maintain the record of the employees, employee’s dependent,
medical quota, application generation and also monitor medical record.
The previous system in use is hard to manage keep track of data and to perform simple
tasks it requires an immense amount of time and energy. No such system previously
being used for required purposes.
The organization wants to find a solution to easily track and maintain record.
Moreover, add, update, view, and generate reports of data. The main goal of our system
is to get the fast application generation and monitor status of the employees’ medical
quota and directly add receipt into the system.

The major goal of the system is to fulfill the client’s wishes and provide a better
working environment for the administrator to work in easy and effective way so they can
save time and work in more efficient way.

1.1 Purpose

Medical Billing Management System (MBMS) is to collect, analyze, and define


needs and features of the employees’ medical billing system to manage the record of

P a g e 21
employees, employees’ defendant, application generation, monitoring status. It focuses
on the functionality needed by the stakeholders. The details of how the (MBMS) fulfils
stakeholders are described in the use-case and supplementary specifications.

1.2 Scope
The functional scope of the system has the following main features
• Security Management
• User Management
• Department Management
• Hospital Management
• Employee Management
• Employees’ Dependent Management
• Medical Quota Management System
• Application Generation
• Application Status
• Medical Claim Management
• Medical Billing Management

• Log Generation

• Standard Operating Procedure

• Signature

1.3 Definitions, acronyms and abbreviation


Term/Abbreviation Definition
(MBMS) Medical Billing Management System
GUI Graphical User Interface
RUP Rational Unified Process
C# Programming language
MySQL Programming language
MS Visio Designing tool
UML Unified Modeling Language

1.4 Overview
This document contains the requirements of the Medical Billing Management
System (MBMS). All the functional Requirements are collected by the personal visit
to the organization.
Manager of the company Mr.Zeeshan provided the requirements and functionalities
by himself.

P a g e 22
2 Functional Requirements

2.1 Security Management

2.1 .1 Process Login


SRS-1 Administrator or Assistant can use the system by entering the user id and
password.
SRS-2 The user Id would be Unique.
SRS-3 Authentication would be provided and the suitable access of the system
would be given according to the privileges.

2.1.2 Change Password


SRS-4 User of the system can change the password.
SRS-5 User will enter his old password and then would be able to enter new
password.
SRS-6 System should save the changed password successfully.

2.1.3 Forget Password


SRS-7 User can reset the password, if forgotten.
SRS-8 User answers some security questions which have to be added in the system.
SRS-9 System verifies the answer and then the user will be able to reset the
password by entering new password.

2.2 User Management

2.2.1 Add User


SRS-10 Administrator can add new users into the system by entering the User ID,
User name and Password.
SRS-11 The user Id would be Unique.
SRS-12 Suitable access of the system would be given according to privileges.
2.2.2 Update User
SRS-13 Updating of the User would be according to the User-Id
SRS-14 Administrator would be able to update the user info.
SRS-15 System would update the information.
2.2.3 View User
SRS-16 System would give facility to view all the user information

SRS-17 Administrator can view user on grid and textboxes also.


SRS-18 System would display information.

P a g e 23
2.3 Department Management

2.3.1 Add Department


SRS-19 Departments can be added into the system by the Administrator.
SRS-20 Administrator and Assistant will have interest for adding department
details.
SRS-21 Other details of the department i.e. department id, department name would
be entered.

SRS-22 System would save this information.

2.3.2 Update Department


SRS-23 The updating of the department information would be according to the
department name.
SRS-24 Administrator and Assistant would be able to update the department
information.
SRS-25 System would update this information.

2.3.3 View All Department


SRS-26 System would give facility to view all the department information
SRS-27 Administrator can view user on grid and textboxes also.

SRS-28 System would display information.


2.4 Hospital Management

2.4.1 Add Hospital


SRS-29 Hospital can be added into the system by the User.
SRS-30 User and Assistant will have interest for adding hospital details.
SRS-31 Other details of the department i.e. hospital id, hospital name would be
entered.

SRS-32 System would save this information.


2.4.2 Update Hospital
SRS-33 The updating of the hospital information would be according to the
hospital name.
SRS-34 Administrator and Assistant would be able to update the hospital
information.
SRS-35 System would update this information.
2.4.3 View All Hospital
SRS-36 System would give facility to view all the hospital information on the
basis of hospital Id.
SRS-37 Administrator can view user on grid and textboxes also.

SRS-38 System would display information.

P a g e 24
2.5 Employee Management

2.5.1 Add Employee


SRS-39 Employees’ information can be added into the system by the
Administrator.
SRS-40 Administrator and Assistant would have interest for adding Employee
details.

SRS-41 Other details of the employees i.e. employee id, name, father name,
CNIC, contact, date of birth, department, designation, BPS and medical
quota would be entered.
SRS-42 System would save this information.
2.5.2 Search Employee
SRS-43 System would give facility to search employees’ information on the basis
of employees’ Id, employee CNIC or employee name.

SRS-44 Administrator and Assistant can search for an employee.

SRS-45 System would display searched information.


2.5.3 Update Employee
SRS-46 Updating of the employee would be according to the employees’ id.
SRS-47 Administrator would be able to update the employees’ information.
SRS-48 System would update this information.

2.6 Employee Dependent Management


2.6.1 Add Employee Dependent
SRS-49 Employee’s dependent information can be added into the system by the
Administrator.
SRS-50 Administrator and Assistant would have interest for adding Employee
details.

SRS-51 Other details of the employee i.e. dependent id, name, CNIC, age and
relation would be entered.

SRS-52 System would save this information.


2.6.2 Search Employee Dependent
SRS-53 System would give facility to search employees’ information on the basis
of Employees’ id.

SRS-54 Administrator can search for employee dependent.

SRS-55 System would display search information.


2.6.3 Update Employee Dependent
SRS-56 The updating of the employee dependent information would be according to
employees’ id.
SRS-57 Administrator would be able to update the employee dependent

P a g e 25
information.
SRS-58 System would update this information.

2.7 Medical Quota Management


2.7.1 Add Quota
SRS-59 Employee’s medical quota information can be added into the system by
the User.
SRS-60 Administrator and Assistant would have interest for adding Employees’
quota details.

SRS-61 Other details of the employee i.e. quota id, name, IPD and OPD would be
entered.

SRS-62 System would save this information.


2.7.2 Search Quota
SRS-63 System would give facility to search employees’ information on the basis
of Employees’ id, Employees’ name or Employees’ CNIC.

SRS-64 Administrator can search for employees’ quota

SRS-65 System would display search information.


2.7.3 Update Quota
SRS-66 The updating of the employee quota information would be according to
employees’ id.
SRS-67 Administrator would be able to update the employee quota information.
SRS-68 System would update this information.

2.7.4 View Quota


SRS-69 System would give facility to view all the quota information.
SRS-70 Administrator can search for a quota.

SRS-71 System would display information.

2.8 Application Generation

2.8.1 Generate Medication Letter


SRS-72 System would give facility of generating medical letters for employees

SRS-73 Administrator can search for employee on the basis of Employees’ id.
SRS-74 Administrator selects the information required for the medication letter.
SRS-75 System would generate the application.

P a g e 26
2.9 Re-imbursement Status

2.9.1 Add & Generate Medical Claim


SRS-76 Administrator can search for employee on the basis of employees’ id.
SRS-77 Insert required information into the system for the employee medical
claim.
SRS-78 System would Insert information into the system.
2.9.2 Search Medical Claim
SRS-79 System would give facility to search Medical Claim information on the
basis of Employees’ id.

SRS-80 Administrator can search for employee dependent.

SRS-81 System would display search information.


2.9.3 Monitor Status
SRS-82 Administrator would be able to monitor the status of employees’ medical
claim status(approved/not etc)
2.9.4 View Medical Claim
SRS-83 System would give facility to view Medical Claim information.

SRS-84 Administrator can search for medical claim information.


SRS-85 System would display information.
2.10 Medical Billing

2.10.1 Add Bill


SRS-86 Employee’s medical expenses can be added into the system by the
Administrator.
SRS-87 Administrator searches the employee on the basis of employees’ id and
add medical expenses of that employee.
SRS-88 System would automatically deduct the amount from the remaining
balance of the employee.
2.10.2 Search Bill
SRS-89 System would give facility of searching employee medical bill on the
basis of employees’ id.
SRS-90 Administrator can search for employee medical bill.
SRS-91 System would display searched information.
2.10.3 View Bill
SRS-92 System would give facility to view all employee medical bills on the basis
of Employees id, medical expenses, and date.
SRS-93 Administrator can search for employee Bills.
SRS-94 System would display information.
2.10.4 Generate Report

P a g e 27
SRS-95 System would give facility of generating report of employee bills on the
basis of employee id, medical expenses, and date.
SRS-96 Administrator can generate the reports of employees.

SRS-97 System would generate reports.


2.11 Standard Operating Procedure

2.11.1 Add & Attach Sop’s

SRS-98 Standard Operating Procedure can be added into the system by the
Administrator.
2.11.2 Update Sop’s
SRS-99 Standard Operating Procedure can easily be updated by the Administrator.
2.11.3 View & Print Sop’s
SRS-100 Standard Operating Procedure can easily be viewed by the assistant and
administrator.
SRS-101 Standard Operating Procedure can be displayed by the assistant and
administrator.

2.12 Application Status

2.12.1 Application Status


SRS-102 Applications of different employees can easily be viewed by the primary
actors.
SRS-103 Can update the application status and digital sign can automatically added
to the application.
SRS-104 Users can monitor application of different employees
2.13 Application Status
2.13.1 Add Signature

SRS-105 Those primary actors can add signature who have the privileges.
2.13.2 Update Signature

SRS-106 Those primary actors can update signature who have the privileges.

3 Non Functional Requirements

3.1 Security
The system requires the users to identify themselves by using login id and
password. Any user who use the system shall have a login Id and a password.

P a g e 28
3.2 Usability
With proper guidance and use of manual, the required training time for a
normal users will not be more than two weeks.

3.3 Reliability
 Availability: The system facility will be available to its users for 24
hours
 Accuracy: The system will generate accurate results and will behave
according to the requirements.
 Bugs or defect rate – Very little.
 Robustness – our system will generate appropriate exceptions and
will handle those exceptions effectively.
 Correctness – our system will be according to all the requirements
collected. All the requirements will be met.

3.4 Performance
 The (MBMS) has a simple GUI, which is self-explanatory and user
friendly.
 The lists, reports and results generated by the system will not take
more than 2 to 3 second.
 Responses to queries shall take no longer than 4 to 5 second to load
onto the screen after the user submits the query.
 The (MBMS) shall display confirmation messages to user within 1 to 2
second after the user submits information to the system. In other words
robustness is maintained.
Hardware Minimum Recommended
Processor 1 Core 2 GHz Dual Core 2+ GHz
RAM 1 GB 2 GB
Hard-drive 20 GB *As Required
Printer Any Any
3.5 RESOURCE REQUIRED
3.6 Design Constraints
Rational Unified Process model will be used for the design purposes and UML will
be used for the diagrams in MS Visio. C# language will be used for the development
and for the database, Microsoft SQL server will be used. So, we must be familiar
with these constraints.
3.7 User Help/ manuals
Detailed System Manuals are given to the systems’ users and two days training
session will be held to ensure that the users of the system fully understand the system
and get the maximum benefit from the system.

P a g e 29
4. External Interface Requirements

4.1 User Interfaces


The user interfaces will be friendly because they will be made after discussion with
the end users. The software will be interactive and self-explanatory.

4.2 Hardware Interfaces


The system will interact with the printer if the user wants to print a form,
applications or reports.

4.3 Licensing requirements


This system will be developed according to the business oriented nature of
(FUUAST), and it is licensed by The Federal Urdu University of Arts Science And
Technology, Islamabad.

4.4 LICENSE REQUIREMENT CHART


Software USE Version

Windows Operating sys. XP,7,8,10


MS Visual Studio (C#) Front End 2010 +
MS SQL Server Backend 2012+
Microsoft Visio For Modeling 2010+

Use Case Diagram

MEDICAL BILLING MANAGEMENT


SYSTEM

Version 1.1

Prepared by
Hassnain Rafique

P a g e 30
&
Wasaf Ul Hassan
11thSep, 2020

Revision History

Version Description Author Date

This covers the major use case Hassnain Rafique /


1.0 11th Jan, 2020
documents Wasaf Ul Hassan

This covers the major use case Hassnain Rafique /


1.1 23th Jan, 2020
documents Wasaf Ul Hassan

P a g e 31
This covers the major use case Hassnain Rafique /
1.2 11th Sep, 2020
documents Wasaf Ul Hassan

P a g e 32
P a g e 33
P a g e 34
P a g e 35
P a g e 36
Fully Dressed Use Cases

MEDICAL BILLING MANAGEMENT


SYSTEM

Version 1.2

Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
11thSep, 2020

P a g e 37
Revision History

Version Description Author Date

This cover the User cases Hassnain Rafique


1.0 11st Jan, 2020
of the system Wasaf Ul Hassan

This cover the User cases Hassnain Rafique


1.1 23st Jan, 2020
of the system Wasaf Ul Hassan

This cover the User cases Hassnain Rafique


1.2 11th Sep, 2020
of the system Wasaf Ul Hassan

Use case ID: UC-01


Use case Name: Process Login
Use case Prepared
Hassnain Rafique Use case Prepared on: 10th Jan,2020
by:
Use case updated
Hassnain Rafique Use case updated on: 10th Jan,2020
by:
Use case
This use case describes that how a user will Login into a system
Description:
Primary Actors: <Administrator><Assistant><AdditionalRegistrar><AssistantRegistrar><DeputyRegistrar>
Stake Holders & Administrator: Wants to successfully log into the system
Interest: Users: Wants to successfully log into the system
1. System must be in running state
Pre-Condition:
2. User must be registered
Main Success Scenario:

P a g e 38
User Action System Response

1 User will enter the ID & Password

System will authenticate the user information from


2
database

System process information and Confirmation message


3
is shown

Post-Condition: User successfully logged into the system


If user enters the “Invalid ID”
System prompt user to enter correct ID
Extension Points: If user enters the “Wrong Password”
System prompt user to enter correct Password
If user leave any blank field
System will prompt to “Fill the blank fields”

Priority: High

Frequency: Less Frequently Use

Cross-Reference: SRS1, SRS2, SRS3

Use case ID: UC-02


Use case Name: Change Password

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how a user will Change the Password

Primary Actors: <Administrator><Assistant><AdditionalRegistrar><AssistantRegistrar><DeputyRegistrar>

Stake Holders & Administrator: Wants to successfully change the Password


Interest: Users: Wants to successfully change the Password
1. System must be in running state
Pre-Condition:
2. User must be registered
Main Success Scenario:

User Action System Response

1 User will enter Old and New Password

System will authenticate the user information from


2
database

3 System process information and successfully change the


password

P a g e 39
Post-Condition: User successfully change the password

If user enters the “Invalid Old Password”


Extension Points: System will prompt to Invalid Old Password
If user leave any blank field
System will prompt to “Fill the blank fields”

Priority: High

Frequency: Less Frequently use

Cross-Reference: SRS4, SRS5, SRS6

Use case ID: UC-03


Use case Name: Forget Password

Use case Prepared by: Hassnain Rafique

Use case updated by: Hassnain Rafique

Use case Description: This use case describes how a user will reset the password if forget

Primary Actors: <Administrator><Assistant><AdditionalRegistrar><AssistantRegistrar><DeputyRegistrar>


Administrator: Wants to successfully reset the Password
Stake Holders & Interest:
Users: Wants to successfully reset the Password
1. System must be in running state
Pre-Condition:
2. User must be registered
Main Success Scenario:

User Action System Response

1 User will answer some security questions

2 System verify these answers

3 User than able to change password

System process information and successfully reset


4
the password

Post-Condition: User successfully reset the password


Extension Points: If user enters the “Invalid Old Code”
System will prompt to Invalid Code
If user leave any blank field

P a g e 40
System will prompt to “Fill the blank fields”

Priority: High

Frequency: Less Frequently use

Cross-Reference: SRS7, SRS8, SRS9

Use case ID: UC-04


Use case Name: Add User

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how admin will Add User

Primary Actors: <Admin>

Stake Holders & Interest: Admin: Wants to successfully Add User


1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Admin must have right to Add User

Main Success Scenario:

User Action System Response

1 Admin will enter the all information of User

System will insert the information into the system and


2
add new user for the system

System will show confirmation message “User Add


3
Successfully”

4 Step 1-3 repeats if user repeat the process

Post-Condition: Admin successfully add new user into the system

P a g e 41
If user leaves any field blank
System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”

Priority: High

Frequency: Less Frequent in use

Cross-Reference: SRS10, SRS11, SRS12

Use case ID: UC-05


Use case Name: Update User
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how admin will Update the user information

Primary Actors: <Administrator>

Stake Holders & Interest: Administrator: Wants to successfully Update User information
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. User data must be present in database before updating
Main Success Scenario:

User Action System Response

1 Admin search for User

System process and User information is shown to


2
Admin

3 Admin will update the User information

System will process and update the new information


4
to system

Step 1-4 repeats if user repeat the


5
process

Post-Condition: Admin successfully update User information


Extension Points: Admin search for User which doesn't exist
System will prompt to “User Not Found”
If user leaves any field blank
System will prompt to “Fill the blank field”
If user enter invalid data in any field

P a g e 42
System will prompt to “Enter Valid Data”
Priority: High

Frequency: low Frequent in use

Cross-Reference: SRS13, SRS14, SRS15

Use case ID: UC-06

Use case Name: View User

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how admin will view all users information

Primary Actors: <Administrator>

Stake Holders & Interest: Administrator: Wants to successfully view users information

1. System must be in running state


Pre-Condition: 2. System must authenticate the user
3. User data must be present in database

Main Success Scenario:

User Action System Response

1 Admin press view User tab

2 System process and users information is shown to admin

Post-Condition: Admin successfully view user’s information


If user leaves any field blank
System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”
Priority: High

Frequency: Low Frequent in use

P a g e 43
Cross-Reference: SRS16, SRS17, SRS18

Use case ID: UC-07


Use case Name: Add Department

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how a user will Add Department

Primary Actors: <Administrator><Assistant>


Administrator: Wants to successfully Add Department
Stake Holders & Interest:
Assistant: Wants to successfully Add Department
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. User must have right to add department

Main Success Scenario:

User Action System Response

1 User will enter the all information of a department

System will insert all the information to the system And


2
Confirmation message is shown

3 Step 1-2 repeats if user repeat the process

Post-Condition: User successfully enters the department information into the system

If user leaves any field blank


System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”

Priority: High

Frequency: Less Frequent in use

Cross-Reference: SRS19, SRS20, SRS21, SRS22

P a g e 44
Use case ID: UC-08
Use case Name: Update Department

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how a Admin will Update the Department Information

Primary Actors: <Administrator><Assistant>

Stake Holders & Interest: Administrator and Assistant: Wants to successfully Update Department
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Department data must be present in database before updating

Main Success Scenario:

User Action System Response

1 User search for Department

System process and Department information is shown


2
to user

3 User will update the Department information

System will process and update the new information to


4
system

5 Step 1-4 repeats if user repeat the process

Post-Condition: User successfully update Department information


User search for Department which doesn't exist
System will prompt to “Department Not Found”
If user leaves any field blank
Extension Points:
System will prompt to “Fill the blank field”
If user enter invalid data in any field
System will prompt to enter “Valid Data”
Priority: High

Frequency: low Frequent in use

Cross-Reference: SRS23, SRS24, SRS25

P a g e 45
Use case ID: UC-09
Use case Name: View All Department

Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 21st Jan,2020

Use case updated by: Wasaf Ul Hassan Use case updated on: 21st Jan,2020

Use case Description: This use case describes how a user will view Department

Primary Actors: <Administrator><Assistant>


Administrator: Wants to successfully view Department
Stake Holders & Interest:
Assistant: Wants to successfully view Department
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. User must have right to view department

Main Success Scenario:

User Action System Response

1 User will enter the name of a department

2 System will display the department

3 Step 1-2 repeats if user repeat the process

Post-Condition: User successfully views the department


If user leaves the field blank
System will prompt to “Fill in the blank field”
If user enters data that does not exist
Extension Points:
System will prompt to “data doesn’t exist”
If user enter invalid data in any field
System will prompt to enter “Valid Data”
Priority: High

Frequency: Less Frequent in use

Cross-Reference: SRS26, SRS27, SRS28

Use case ID: UC-10

P a g e 46
Use case Name: Add Hospital

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how a user will Add Hospital

Primary Actors: <Administrator><Assistant>


Administrator: Wants to successfully Add Hospital
Stake Holders & Interest:
Assistant: Wants to successfully Add Hospital
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. User must have right to add hospital

Main Success Scenario:

User Action System Response

1 User will enter the all information of a Hospital

System will insert all the information to the system And


2
Confirmation message is shown

3 Step 1-2 repeats if user repeat the process

Post-Condition: User successfully enters the Hospital information into the system

If user leaves any field blank


System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”

Priority: High

Frequency: Less Frequent in use

Cross-Reference: SRS29, SRS30, SRS31, SRS32

Use case ID: UC-11


Use case Name: Update Hospital

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

P a g e 47
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how a Admin will Update the Hospital Information

Primary Actors: <Administrator><Assistant>

Stake Holders & Interest: Administrator and Assistant: Wants to successfully Update Hospital
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Hospital data must be present in database before updating

Main Success Scenario:

User Action System Response

1 User search for Hospital

System process and Hospital information is shown to


2
user

3 User will update the Hospital information

System will process and update the new information to


4
system

5 Step 1-4 repeats if user repeat the process

Post-Condition: User successfully update Hospital information


User search for Hospital which doesn't exist
System will prompt to “Department Not Found”
If user leaves any field blank
Extension Points:
System will prompt to “Fill the blank field”
If user enter invalid data in any field
System will prompt to enter “Valid Data”
Priority: High

Frequency: low Frequent in use

Cross-Reference: SRS33, SRS34, SRS35

Use case ID: UC-12

Use case Name: View Hospital

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

P a g e 48
Use case Description: This use case describes how admin will view all Hospital information

Primary Actors: <Administrator><Assistant>

Stake Holders & Interest: Administrator and Assistant: Wants to successfully view Hospital information

1. System must be in running state


Pre-Condition: 2. System must authenticate the user
3. Hospital data must be present in database

Main Success Scenario:

User Action System Response

1 Admin press view Hospital tab

2 System process and users information is shown to admin

Post-Condition: Admin successfully view Hospital information


If user leaves any field blank
System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”
Priority: High

Frequency: Low Frequent in use

Cross-Reference: SRS36, SRS37, SRS38

Use case ID: UC-13


Use case Name: Add Employee

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how a user will Add Employee Information

P a g e 49
Primary Actors: <Administrator><Assistant>
Administrator: Wants to successfully Add Employee Information
Stake Holders & Interest:
DEO: Wants to successfully Add Employee Information
1. System must be in running state
Pre-Condition: 2. System must authenticate the user

Main Success Scenario:

User Action System Response

User will enter the all information of a new


1
Employee

System will insert all the information to the system And


2
Confirmation message is shown

3 Step 1-2 repeats if user repeat the process

Post-Condition: User successfully enters the Employee information into the system

If user leaves any field blank


System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”

Priority: High

Frequency: High Frequent in use

Cross-Reference: SRS39, SRS40,SRS41, SRS42

Use case ID: UC-14

Use case Name: Search Employee

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how a user will Search Employee

Primary Actors: <Administrator><Assistant>


Stake Holders & Interest: Administrator: Wants to successfully Search Employee

P a g e 50
DEO: Wants to successfully Search Employee
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Employee data must be present in database

Main Success Scenario:

User Action System Response

User will enter the Employee information that is to


1
be searched

System will verify the information and then Employee


2
information will be shown to the user

3 Step 1-2 repeats if user repeat the process

Post-Condition: User successfully Search Employee

User search for Employee which doesn't exist


System will prompt to “Employee Not Found”
Extension Points:
If user leaves the field blank
System will prompt to “Fill the blank field”

Priority: High

Cross-Reference: SRS43, SRS44, SRS45

Use case ID: UC-15

Use case Name: Update Employee

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how admin will Update the Employee Information

Primary Actors: <Administrator>

Stake Holders & Interest: Administrator: Wants to successfully Update Employee


1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Employee data must be present in database before updating
Main Success Scenario:

P a g e 51
User Action System Response

1 Admin search for Employee

System process and Employee information is shown to


2
user

3 Admin will update the Employee information

System will process and update the new information to


4
system

5 Step 1-4 repeats if user repeat the process

Post-Condition: Admin successfully update Employee information


User search for Employee which doesn't exist
System will prompt to “Employee Not Found”
If user leaves any field blank
Extension Points:
System will prompt to “Fill the blank field”
If user enter invalid data in any field
System will prompt to enter “Valid Data”
Priority: High

Frequency: low Frequent in use


Cross-Reference: SRS46, SRS47, SRS48

Use case ID: UC-16

Use case Name: Add Employee Dependent

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how a user will Add Employee Dependent Information

Primary Actors: <Administrator><Assistant>


Administrator: Wants to successfully Add Employee Dependent Information
Stake Holders & Interest:
DEO: Wants to successfully Add Employee Dependent Information
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
Main Success Scenario:

User Action System Response

User will enter the all information of Employee


1
Dependent

P a g e 52
System will insert all the information to the system And
2
Confirmation message is shown

3 Step 1-2 repeats if user repeat the process

Post-Condition: User successfully enters the Employee Dependent information into the system

If user leaves any field blank


System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”

Priority: High

Frequency: High Frequent in use

Cross-Reference: SRS49, SRS50, SRS51, SRS52

Use case ID: UC-17


Use case Name: Search Employee Dependent

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how a user will Search Employee Dependent

Primary Actors: <Administrator><Assistant>

Administrator: Wants to successfully Search Employee Dependent


Stake Holders & Interest:
DEO: Wants to successfully Search Employee Dependent
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Employee Dependent data must be present in database
Main Success Scenario:

User Action System Response

User will enter the Employee Dependent


1
information that is to be searched

System will verify the information and then Employee


2
Dependent information will be shown to the user

P a g e 53
3 Step 1-2 repeats if user repeat the process

Post-Condition: User successfully Search Employee Dependent

User search for Employee Dependent which doesn't exist


System will prompt to “Employee Dependent Not Found”
Extension Points:
If user leaves the field blank
System will prompt to “Fill the blank field”

Priority: High

Frequency: Low Frequent in use

Cross-Reference: SRS53, SRS54, SRS55

Use case ID: UC-18


Use case Name: Update Employee Dependent

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how admin will Update the Employee Dependent Information

Primary Actors: <Administrator>

Stake Holders & Interest: Administrator : Wants to successfully Update Employee Dependent
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Employee Dependent data must be present in database before updating
Main Success Scenario:

User Action System Response

1 Admin search for Employee Dependent

System process and Employee Dependent information is


2
shown to user

Admin will update the Employee Dependent


3
information

System will process and update the new information to


4
system

5 Step 1-4 repeats if user repeat the process

P a g e 54
Post-Condition: Admin successfully update Employee Dependent information
User search for Employee Dependent which doesn't exist
System will prompt to “Employee Dependent Not Found”
If user leaves any field blank
Extension Points:
System will prompt to “Fill the blank field”
If user enter invalid data in any field
System will prompt to enter “Valid Data”
Priority: High

Frequency: low Frequent in use

Cross-Reference: SRS56, SRS57, SRS58

Use case ID: UC-19

Use case Name: Add Quota

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how admin will Add Quota

Primary Actors: <Admin>

Stake Holders & Interest: Admin: Wants to successfully Add Quota


1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Admin must have right to Add User

Main Success Scenario:

User Action System Response

1 Admin will enter the all information of Quota

2 System will insert the information into the system

3 Step 1-2 repeats if user repeat the process

Post-Condition: Admin and assistant successfully add new Quota into the system

P a g e 55
If user leaves any field blank
System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”

Priority: High

Frequency: Less Frequent in use

Cross-Reference: SRS59, SRS60, SRS61, SRS62

Use case ID: UC-20

Use case Name: Search Quota

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how admin will Search Quota information

Primary Actors: <Administrator>

Stake Holders & Interest: Administrator: Wants to successfully Search Quota

1. System must be in running state


Pre-Condition: 2. System must authenticate the user
3. Quota data must be present in database

Main Success Scenario:

User Action System Response

Admin will enter the employee information whose


1
quota is to be searched

System will verify the information and then information


2
will be shown to the user

3 Step 1-2 repeats if user repeat the process

Post-Condition: Admin successfully Search quota


Extension Points: Admin search for Quota which doesn't exist
System will prompt to “Quota Not Found”

P a g e 56
If user leaves the field blank
System will prompt to “Fill the blank field”

Priority: High

Frequency: Less Frequent in use

Cross-Reference: SRS63, SRS64, SRS65

Use case ID: UC-21

Use case Name: Update Quota

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 21th Jan,2020

Use case Description: This use case describes how admin will Update the Quota information

Primary Actors: <Administrator>

Stake Holders & Interest: Administrator : Wants to successfully Update Quota information
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Quota data must be present in database before updating

Main Success Scenario:

User Action System Response

1 Admin search for employee

System process and quota information is shown to


2
Admin

3 Admin will update the Quota information

System will process and update the Quota information


4
to system

5 Step 1-4 repeats if user repeat the process

Post-Condition: Admin successfully update Quota information


Extension Points: Admin search for quota which doesn't exist
System will prompt to “Quota Not Found”
If user leaves any field blank
System will prompt to “Fill the blank field”

P a g e 57
If user enter invalid data in any field
System will prompt to “Enter Valid Data”
Priority: High

Frequency: low Frequent in use

Cross-Reference: SRS66, SRS67, SRS68

Use case ID: UC-22

Use case Name: View Quota

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 21th Jan,2020

Use case Description: This use case describes how admin will view all Quota information

Primary Actors: <Administrator>

Stake Holders & Interest: Administrator: Wants to successfully view Quota information

4. System must be in running state


Pre-Condition: 5. System must authenticate the user
6. Quota data must be present in database

Main Success Scenario:

User Action System Response

1 Admin press view tab of specific employee

2 System process and users information is shown to admin

Post-Condition: Admin successfully view Quota information


If user leaves any field blank
System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”
Priority: High

Frequency: Low Frequent in use

Cross-Reference: SRS69, SRS70, SRS71

P a g e 58
Use case ID: UC-23
Use case Name: Generate Medication Letter
Use case
Use case Prepared by: Hassnain Rafique 11th Jan,2020
Prepared on:
Use case
Use case updated by: Hassnain Rafique 11th Jan,2020
updated on:
Use case Description: This use case describes how a admin will Generate Medication letter for Employees
Primary Actors: <Administrator><Assistant>
Stake Holders &
User: Wants to successfully Generates Medication letter for Employees
Interest:
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Employee data must be present in database before Generating Medication letter
Main Success Scenario:

User Action System Response

User search for Employee that’s


1
Medication letter is to be generated

2 System process and Employee information is shown to the admin

Admin select the information required


3
for employee medication letter

System will process and add this selected information into the
4
predefined letter format

5 System Generates Medication letter

Step 1-5 repeats if user repeat the


6
process

Post-Condition: User successfully Generate Employee Dependent Report


User search for Employee Dependent which doesn't exist
System will prompt to “Employee Dependent Not Found”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”
Priority: High
Frequency: Low Frequent in use
Cross-Reference: SRS72, SRS73, SRS74, SRS75

P a g e 59
Use case ID: UC-24
Use case Name: Add & Generate Medical claim

Use case Prepared by: Wasaf ul Hassan Use case Prepared on: 11th Jan,2020

Use case updated by: Wasaf Ul Hassan Use case updated on: 11th Jan,2020

Use case Description: This use case describes how a user will add & Generate Medical claim Information

Primary Actors: <Administrator>

Stake Holders & Interest: Administrator: Wants to successfully add Medical claim Information

1. System must be in running state


Pre-Condition: 2. System must authenticate the user
3. Employee data must be present in database

Main Success Scenario:


User Action System Response

1 User add medical claim information for Employee

2 System will check the information

Admin insert the required information that is used for


3
employee medical claim

4 System will process and save the information

Post-Condition: User successfully add medial claim information and update status
User search for Employee which doesn't exist
System will prompt to “Employee Not Found”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”
Priority: High

Frequency: Low Frequent in use

Cross-Reference: SRS76, SRS77, SRS78

P a g e 60
UC-25
Use case ID:
Use case Name: Search Medical Claim

Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 21stJan,2020

Use case updated by: Wasaf Ul Hassan Use case updated on: 21st Jan,2020

Use case Description: This use case describes how a user will search medical claim Information

Primary Actors: <Administrator>

Stake Holders & Interest: Administrator: Wants to successfully search medical claim Information
1. System must be in running state
Pre-Condition: 2. System must authenticate the user

Main Success Scenario:


User Action System Response

1 User will enter the information to search the letter

System will verify the information and then information


2
will be shown to the user

3 Step 1-2 repeats if user repeat the process

Post-Condition: User successfully search a medical claim Information

If user leaves any field blank


System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”

Priority: High

Frequency: High Frequent in use

Cross Reference: SRS79, SRS80, SRS81

P a g e 61
Use case ID: UC-26
Use case Name: Monitor Status

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

This use case describes how admin will monitor the medical claim information of
Use case Description:
employees

Primary Actors: <Administrator

Stake Holders & Interest: Administrator: Wants to successfully monitor medical claim status

1. System must be in running state


Pre-Condition: 2. System must authenticate the user
3. Employee data must be present in database

Main Success Scenario:

User Action System Response

1 Admin search for Employee

System process and Employee information with


2
medical claim is shown to admin

System will also display that the medical claim


3
process is approved or or.

Post-Condition: User successfully monitor the medical claim


User search for Employee which doesn't exist
System will prompt to “Employee Not Found”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”

Priority: High

Frequency: Low Frequent in use

Cross-Reference: SRS82

Use case ID: UC-27

P a g e 62
Use case Name: View Medical claim

Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 11th Jan,2020

Use case updated by: Wasaf Ul Hassan Use case updated on: 11th Jan,2020

Use case Description: This use case describes how a user will view Medical claim status

Primary Actors: <Administrator>

Stake Holders & Interest: Administrator: Wants to successfully search Medical claim status

1. System must be in running state


Pre-Condition: 2. System must authenticate the user
3. Employee data must be present in database

Main Success Scenario:


User Action System Response

1 User selects the claim search tab from the menu

System will process and display the information to the


2
user.

Post-Condition: User successfully view medial claim information


User search for Employee which doesn't exist
System will prompt to “Employee Not Found”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Please enter valid data”
Priority: High

Frequency: Low Frequent in use

Cross-Reference: SRS83, SRS84, SRS85

Use case ID: UC-28


Use case Name: Add Bill

P a g e 63
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how a user will Add medical Bill Information

Primary Actors: <Administrator>

Stake Holders & Interest: Administrator: Wants to successfully Add Bill Information
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
Main Success Scenario:

User Action System Response

1 Admin search for employee

System process and Employee information is shown to


2
the admin

Admin will enter the all information of a new Bill


3
into the employee data

System will insert all the information to the system And


4
Confirmation message is shown

System automatically deduct amount from employees’


5
quota

6 Step 1-5repeats if user repeat the process

Post-Condition: User successfully enters the Bill into the system

If user leaves any field blank


System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”

Priority: High

Frequency: High Frequent in use

Cross-Reference: SRS86, SRS87, SRS88

Use case ID: UC-29


Use case Name: Search Bill

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

P a g e 64
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

Use case Description: This use case describes how a user will Search Bill of employees

Primary Actors: <Administrator><AdditionalRegistrar><AssistantRegistrar><DeputyRegistrar>

Stake Holders & Interest: Administrator and Users: Wants to successfully Search Bill of employees

1. System must be in running state


Pre-Condition: 2. System must authenticate the user
3. Bill data must be present in database

Main Success Scenario:

User Action System Response

User search for employee bill by using different


1
criteria

System process and Employee information with medical


2
expenses is shown to the admin

5 Step 1-2 repeats if user repeat the process

Post-Condition: User successfully Search Bill

User search for Employee which doesn't exist


System will prompt to “Employee Not Found”
Extension Points:
If user leaves the field blank
System will prompt to “Fill the blank field”

Priority: High

Frequency: Low Frequent in use

Cross Reference: SRS89, SRS90, SRS91

Use case ID: UC-30


Use case Name: View Bill

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020

P a g e 65
Use case Description: This use case describes how admin will view all Bills information

Primary Actors: Administrator><AdditionalRegistrar><AssistantRegistrar><DeputyRegistrar>

Stake Holders & Interest: Administrator and Users: Wants to successfully view Bills information

1. System must be in running state


Pre-Condition: 2. System must authenticate the user
3. Bills data must be present in database

Main Success Scenario:

User Action System Response

1 Admin press view Bills tab

System process and bills information with employee


2
name and id is shown to admin

Post-Condition: Admin successfully view Bills information


If user leaves any field blank
System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”
Priority: High

Frequency: Low Frequent in use

Cross-Reference: SRS92, SRS93, SRS94

Use case ID: UC-31


Use case Name: Generate Report

Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2019

Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2019

Use case Description: This use case describes how a admin will Generates Reports of employee medical expenses

P a g e 66
Primary Actors: Administrator><Assistant><AdditionalRegistrar><AssistantRegistrar><DeputyRegistrar>
Stake Holders & Administrator and Users: Wants to successfully Generate a Report of employee medical
Interest: expenses
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Bills data must be present in database
Main Success Scenario:

User Action System Response

User search for Bill on the basis of different


1
criteria(most/less usage in month, specific date)

2 System process and Bill information is shown to user

3 User will press on generate report button

4 System will process and generate the report

5 Step 1-4 repeats if user repeat the process

Post-Condition: User successfully Generate a Bills Report


If user leaves any field blank
System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”
Priority: High

Frequency: Low Frequent in use

Cross-Reference: SRS95, SRS96, SRS97

Use case ID: UC-32

Use case Name: Add & Attach SOPs

Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 8th Aug,2020

Use case updated by: Wasaf Ul Hassan Use case updated on: 8th Aug,2020

Use case Description: This use case describes how admin will Add & Attach SOPs

Primary Actors: <Admin>

Stake Holders & Interest: Admin and Assistant: Wants to successfully Add & Attach SOPs
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Admin must have right to Add SOPs
Main Success Scenario:

P a g e 67
User Action System Response

1 User will enter the all information of SOPs

2 System will insert the information into the system

System will show confirmation message “ SOPs are


3
added Successfully”

User will also attach SOPs from the computer into


4
the system

5 File is successfully attached with the system

4 Step 1-5 repeats if user repeat the process

Post-Condition: User successfully add new SOPs into the system

If user leaves any field blank


System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”

Priority: High

Frequency: Less Frequent in use

Cross-Reference: SRS98

Use case ID: UC-33

Use case Name: Update SOPs

Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 8th Aug,2020

Use case updated by: Wasaf Ul Hassan Use case updated on: 8th Aug,2020

Use case Description: This use case describes how admin will update SOPs

Primary Actors: <Admin>

Stake Holders & Interest: Admin and Assistant: Wants to successfully Add Quota
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Admin must have right to update SOPs
Main Success Scenario:

User Action System Response

P a g e 68
Admin will enter the information of SOPs to be
1
updated

2 System will insert the information into the system

System will show confirmation message “ SOPs are


3
updated Successfully”

4 Step 1-3 repeats if user repeat the process

Post-Condition: Admin successfully updated new SOPs into the system

If user leaves any field blank


System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”

Priority: High

Frequency: Less Frequent in use

Cross-Reference: SRS99

Use case ID: UC-34

Use case Name: View & Print SOPs

Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 8th Aug,2020

Use case updated by: Wasaf Ul Hassan Use case updated on: 8th Aug,2020

Use case Description: This use case describes how admin will view & Print SOPs

Primary Actors: <Admin><Assistant>

Stake Holders & Interest: Admin and Assistant: Wants to successfully view & print SOPs
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Admin and assistant must have right to view SOPs
Main Success Scenario:

User Action System Response

1 Admin will click on Print button to view SOPs

2 System will display and print SOPs

P a g e 69
3 Step 1-2 repeats if user repeat the process

Post-Condition: Admin successfully viewed SOPs

If there is no record found


Extension Points: System will prompt to “there is no record found to display”

Priority: High

Frequency: Less Frequent in use

Cross-Reference: SRS100, SRS101

Use case ID: UC-35


Use case Name: View Application

Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 11th Sep, 2020

Use case updated by: Wasaf Ul Hassan Use case updated on: 11th Sep, 2020

Use case Description: This use case describes how users will view application

Primary Actors: <Admin><Assistant><AdditionalRegistrar><AssistantRegistrar><DeputyRegistrar>

Stake Holders & Interest: Admin and Users: Wants to successfully view application
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Admin and users must have right to view application

P a g e 70
Main Success Scenario:

User Action System Response

1 Users will click on Application Status Button

2 System will display application to them

3 Step 1-2 repeats if user repeat the process

Post-Condition: Users successfully viewed SOPs

If there is no record found


Extension Points: System will prompt to “there is no record found to display”

Priority: High

Frequency: Less Frequent in use

Cross-Reference: SRS102

Use case ID: UC-36


Use case Name: Update Application Status

Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 11th Sep, 2020

Use case updated by: Wasaf Ul Hassan Use case updated on: 11th Sep, 2020

Use case Description: This use case describes how users will update the status of the application

Primary Actors: <Admin><Assistant><AdditionalRegistrar><AssistantRegistrar><DeputyRegistrar>

Stake Holders & Interest: Admin and Users: Wants to successfully update the status of the application
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Admin and users must have right to update the status
Main Success Scenario:

User Action System Response

P a g e 71
1 User will click on the application status button

2 System will show different applications to the user

User will click on the view button to view the


3
selected application

4 System will show crystal report to the user

User will either click on approve or disapprove


5
radio button

Status of the application will be updated automatically


6
and system will add signature to the application

7 Steps 1-6 repeats if user repeats the procedure

Post-Condition: Users successfully updated the application

If there is no record found


Extension Points: System will prompt to “there is no record found to display”

Priority: High

Frequency: Less Frequent in use

Cross-Reference: SRS103

Use case Id UC-37

Use case Name: Monitor Application Status

Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 11th Sep, 2020

Use case updated by: Wasaf Ul Hassan Use case updated on: 11th Sep, 2020

Use case Description: This use case describes how users will monitor the status of the application

Primary Actors: <Admin><Assistant><AdditionalRegistrar><AssistantRegistrar><DeputyRegistrar>

Stake Holders & Interest: Admin and Users: Wants to successfully monitor the status of the application
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Admin and users must have right to monitor the status
Main Success Scenario:

User Action System Response

1 User will click on the application status button

P a g e 72
2 System will show different application status

3 Steps 1-2 repeats if user repeats the action

Post-Condition: Users successfully monitor the application

If there is no record found


Extension Points: System will prompt to “there is no record found to display”

Priority: High

Frequency: Less Frequent in use

Cross-Reference: SRS104

Use case Id UC- 38


Use case Name: Add Signature

Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 11th Sep, 2020

Use case updated by: Wasaf Ul Hassan Use case updated on: 11th Sep, 2020

Use case Description: This use case describes how users will add signature to the application

Primary Actors: <Admin><Assistant><AdditionalRegistrar><AssistantRegistrar><DeputyRegistrar>

Stake Holders & Interest: Admin and Users: Wants to successfully monitor the status of the application
4. System must be in running state
Pre-Condition: 5. System must authenticate the user
6. Admin and users must have right to add signature to the application
Main Success Scenario:

User Action System Response

1 User will click on the signature button

2 System will show a form to the user

3 User will select add signature button

P a g e 73
System will show a dialogue box to the user from where
4
he can select signature

5 System will save the record/pic in the database

6 Steps 1-5 repeats if user repeats the action

Post-Condition: Users successfully added signature in the database

If there is no picture selected from the system


Extension Points: System will prompt to “please add signature”

Priority: High

Frequency: Less Frequent in use

Cross-Reference: SRS105

Use case Id: UC-39

Use case Name: Update Signature


11th Sep, 2020
Use case Prepared by: Wasaf Ul Hassan Use case Prepared on:
11th Sep, 2020
Use case updated by: Wasaf Ul Hassan Use case updated on:

Use case Description: This use case describes how users will update signature to the application

Primary Actors: <Admin><Assistant><AdditionalRegistrar><AssistantRegistrar><DeputyRegistrar>

Stake Holders & Interest: Admin and Users: Wants to successfully update the signature
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Admin and users must have right to update signature to the application
Main Success Scenario:

User Action System Response

1 User will click on the signature button

2 System will show a form to the user

3 User will select update signature button

System will show a dialogue box to the user from where


4
he can select signature

P a g e 74
5 System will save the record/pic in the database

6 Steps 1-5 repeats if user repeats the action

Post-Condition: Users successfully updated signature in the database

If there is no picture selected from the system


Extension Points: System will prompt to “please select data”

Priority: High

Frequency: Less Frequent in use

Cross-Reference: SRS106

System Sequence Diagram


FOR

MEDICAL BILLING MANAGEMENT


SYSTEM

Version 1.1

Prepared by
Hassnain Rafique
&
P a g e 75
Wasaf Ul Hassan
11th Jan, 2020

Revision History

Version Description Author Date

This cover the SSD of the Hassnain Rafique


1.0 11st Jan, 2020
system Wasaf Ul Hassan

This cover the SSD of the Hassnain Rafique


1.1 11th Sep, 2020
system Wasaf Ul Hassan

P a g e 76
2.4 System Sequence Diagram

SSD: Process Login

SSD: 01 Process Login

Administrator/Assistant :System

Start Login Process()

userLogin(username,password)

Login Succesfully, Confimation Message is shown to the user

SSD: Change Password

P a g e 77
SSD: 02 Change Password

Administrator/
:System
Assistant

Start Change Password Process()

changePassword(oldpassword,newpassword)

System will authenticate the user information from database and


willconfiguration Message show the Password is Reset Successfully

SSD: Forget Password

SSD: Add User

P a g e 78
SSD: Update User

SSD: View User

P a g e 79
SSD: Add Department

SSD: Update Department

P a g e 80
SSD: View Department

SSD: Add Hospital

P a g e 81
SSD: Update Hospital

SSD: View Hospital

P a g e 82
SSD: Add Employee

SSD: Search Employee

P a g e 83
SSD: Update Employee

P a g e 84
SSD: Add Employee Dependent

SSD: Search Employee Dependent

P a g e 85
SSD: Update Employee Dependent

SSD: Add Medical Quota

P a g e 86
SSD: Search Medical Quota

SSD: Update Medical Quota

P a g e 87
SSD: View Medical Quota

SSD: Generate Medication Letter

P a g e 88
SSD: Add Medical Claim

SSD: Search Medical Claim

SSD: Monitor Status

P a g e 89
SSD: View Medical CLaim

SSD: Add Bill

P a g e 90
SSD: Search Bill

SSD: View Bill

P a g e 91
SSD: Generate Bill Report

SSD: Add & Attach SOPs

P a g e 92
SSD: Update SOPs

SSD: View & Print SOPs

P a g e 93
SSD: Add Signature

SSD: Update Signature

P a g e 94
SSD: View Application

SSD: Update Application

P a g e 95
SSD: Monitor Application

P a g e 96
Entity Relationship Diagram

MEDICAL BILLING MANAGEMENT


SYSTEM

Version 1.1

Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
11th Sep, 2020

P a g e 97
Revision History

Version Description Author Date

This cover the ER Diagram Hassnain Rafique


1.0 11th Jan, 2020
of the system Wasaf Ul Hassan

This cover the ER Diagram Hassnain Rafique


1.1 11th Sep, 2020
of the system Wasaf Ul Hassan

P a g e 98
P a g e 99
Normalization

MEDICAL BILLING MANAGEMENT


SYSTEM

Version 1.2

Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
11th Sep, 2020

Revision History

P a g e 100
Version Description Author Date

This cover the


Hassnain Rafique
1.0 Normalization of the 11st Jan, 2020
Wasaf Ul Hassan
system
This cover the
Hassnain Rafique
1.1 Normalization of the 23st Jan, 2020
Wasaf Ul Hassan
system
This cover the
Hassnain Rafique
1.2 Normalization of the 11th Sep, 2020
Wasaf Ul Hassan
system

1.1 TBLUserLogin

UserId(pk) UserName UserPassword UserType

1NF: Primary Key is not repeating so, it is in 1NF


2NF: Partial Function Dependency also not exists because of so it is in 2NF
3NF: Transitive Dependency is also not exists as non-key Attributes are not dependent on each
other) so there will not be any changes in the table and remain the same
1.2 TBLEMPLOYEE
employee_id(PK) employee_name employee_cnic picture

employee_contact employee_dob employee_bps employee_designation

P a g e 101
department_id (FK)

1NF: Primary Key is not repeating so, it is in 1NF


2NF: Partial Function Dependency also not exists because of so it is in 2NF
3NF: Transitive Dependency is also not exists as non-key Attributes are not dependent on each
other) so there will not be any changes in the table and remain the same.

1.3 TblEmployeeDependent

dependentID (PK) DependentName DependentCNIC DependentDOB

DependentPicture DependentRelation EmployeeID (FK)

1NF: Primary Key is not repeating so, it is in 1NF


2NF: Partial Function Dependency also not exists because of so it is in 2NF
3NF: Transitive Dependency is also not exists as non-key Attributes are not dependent on each
other) so there will not be any changes in the table and remain the same.

1.4 TblDepartment

P a g e 102
departmentID (PK) departmentName

1NF: Primary Key is not repeating so, it is in 1NF


2NF: Partial Function Dependency also not exists because of so it is in 2NF
3NF: Transitive Dependency is also not exists as non-key Attributes are not dependent on each
other) so there will not be any changes in the table and remain the same

1.5 TblHospital
hospitalID (PK) hospitalName hospitalAddress

1NF: Primary Key is not repeating so, it is in 1NF


2NF: Partial Function Dependency also not exists because of so it is in 2NF
3NF: Transitive Dependency is also not exists as non-key Attributes are not dependent on each
other) so there will not be any changes in the table and remain the same.

1.6 TblMedicalQuota

quotaID (PK) IPD OPD employeeID (FK)

1NF: Primary Key is not repeating so, it is in 1NF


2NF: Partial Function Dependency also not exists because of so it is in 2NF

P a g e 103
3NF: Transitive Dependency is also not exists as non-key Attributes are not dependent on each
other) so there will not be any changes in the table and remain the same.

1.7 TblMedicalClaim
claimId (PK) claimPayment claimDescription claimType

claimDate treatmentType admitOn dischargeOn

consultantName labTest hospitalName claimStatus

imbursementAmount notApprovedReason EmployeeId(FK)

1NF: Primary Key is not repeating so, it is in 1NF


2NF: Partial Function Dependency also not exists because of so it is in 2NF
3NF: Transitive Dependency is also not exists as non-key Attributes are not dependent on each
other) so there will not be any changes in the table and remain the same.

1.8 TblMedicalBilling
billingID (PK) medicalDescription medicalExpenses BillingMonth

P a g e 104
AddedOn BillNo quotaID(FK employeeID(FK hospitalID(FK)
BillType ) )

1NF: Primary Key is not repeating so, it is in 1NF


2NF: Partial Function Dependency also not exists because of so it is in 2NF
3NF: Transitive Dependency is also not exists as non-key Attributes are not dependent on each
other) so there will not be any changes in the table and remain the same.

1.9 TblDependentClaim
dependentClaimId(PK) ClaimId(FK) dependentId(FK)

1NF: Primary Key is not repeating so, it is in 1NF


2NF: Partial Function Dependency also not exists because of so it is in 2NF
3NF: Transitive Dependency is also not exists as non-key Attributes are not dependent on each
other) so there will not be any changes in the table and remain the same.

1.10 TBLMedicalRequestIssue
mRequestId(PK) dateTime TreatmentType consultantName

testName transactionId Application Status EmployeeId(F


K)

dependentId(FK) hospitalId(FK) userId(FK)

P a g e 105
1NF: Primary Key is not repeating so, it is in 1NF
2NF: Partial Function Dependency also not exists because of so it is in 2NF
3NF: Transitive Dependency is also not exists as non-key Attributes are not dependent on each
other) so there will not be any changes in the table and remain the same.
1.13 TblDependentRequest

DependentRequestId(PK) mRequestId(FK) dependentId(FK


)

1NF: Primary Key is not repeating so, it is in 1NF


2NF: Partial Function Dependency also not exists because of so it is in 2NF
3NF: Transitive Dependency is also not exists as non-key Attributes are not dependent on each
other) so there will not be any changes in the table and remain the same.

1.12 TblSecurityQuestions
securityQId(PK) ansOne ansTwo ansThree

ansFour userId(FK)

1NF: Primary Key is not repeating so, it is in 1NF


2NF: Partial Function Dependency also not exists because of so it is in 2NF
3NF: Transitive Dependency is also not exists as non-key Attributes are not dependent on each
other) so there will not be any changes in the table and remain the same.

1.11 TblSop
sopID sopDescription

1NF: Primary Key is not repeating so, it is in 1NF


2NF: Partial Function Dependency also not exists because of so it is in 2NF
3NF: Transitive Dependency is also not exists as non-key Attributes are not dependent on each
other) so there will not be any changes in the table and remain the same.

1.14 TblSignature
SignId(PK) Signature Designation UserId(FK)

1NF: Primary Key is not repeating so, it is in 1NF


2NF: Partial Function Dependency also not exists because of so it is in 2NF
3NF: Transitive Dependency is also not exists as non-key Attributes are not dependent on each
other) so there will not be any changes in the table and remain the same.

Domain Model

MEDICAL BILLING MANAGEMENT SYSTEM

107 | P a g e
Version 1.2

Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
11thSep, 2020

Revision History

Version Description Author Date

This cover the Domain Hassnain Rafique


1.0 11st Jan, 2020
Model of the system Wasaf Ul Hassan

This cover the Domain Hassnain Rafique


1.1 23st Jan, 2020
Model of the system Wasaf Ul Hassan
This cover the Domain Hassnain Rafique
1.2 11st Sep, 2020
Model of the system Wasaf Ul Hassan

109 | P a g e
110 | P a g e
Relational Model

MEDICAL BILLING MANAGEMENT SYSTEM

Version 1.2

Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
11th Sep, 2020

Revision History

111 | P a g e
Version Description Author Date

This cover the Relational Hassnain Rafique


1.0 11st Jan, 2020
Table of the system Wasaf Ul Hassan

This cover the Relational Hassnain Rafique


1.1 23st Jan, 2020
Table of the system Wasaf Ul Hassan

This cover the Relational Hassnain Rafique


1.2 11th Sep, 2020
Table of the system Wasaf Ul Hassan

Table of User:
1.1 TBLUSERLOGIN

Attributes Data Types Constraints Primary Key Foreign Key

UserID Varchar(50) Not Null Yes No


userName Varchar(50) Not Null No No
UserPassword Varchar(50) Not Null No No
userType Varchar(50) Not Null No No
Table of Employee:
1.2 TBLEMPLOYEE

Attributes Data Types Constraints Primary Foreign Key


Key

employeeID Varchar(50) Not Null Yes No


employeeName Varchar(50) Not Null No No
EmployeeDesignation Varchar(50) Not Null No No

112 | P a g e
EmployeeCNIC nVarchar(50) Not Null No No
employeeContact nVarchar(50) Not Null No No
EmployeeDOB Varchar(50) Not Null No No
employeeBPS Varchar(50) Not Null No No
picture Image Allow Null No No
departmentID Int Not Null No Yes

Table of EmployeeDependent:
1.3 TBLEMPLOYEEDEPENDENT

Attributes Data Types Constraints Primary Foreign Key


Key

dependentID Int Not Null Yes No


dependentName Varchar(50) Not Null No No
dependentCNIC nVarchar(50) Not Null No No
dependentDOB Date Not Null No No
dependentRelation Varchar(50) Not Null No No
picture Image Allow Null No No
employeeID Varchar(50) Not Null No Yes

Table of Department:
1.4 TBLDEPARTMENT

Attributes Data Types Constraints Primary Key Foreign Key

departmentID Int Not Null Yes No


departmentName Varchar(50) Not Null No No

Table of Hospital:
1.5 TBLHOSPITAL

Attributes Data Types Constraints Primary Key Foreign Key


hospitalID Int Not Null Yes No

hospitalName Varchar(max) Not Null No No

hospitalAddress Varchar(max) Not Null No No

Table of MedicalClaim:
1.6 TBLMEDICALCLAIM

Attributes Data Types Constraints Primary Key Foreign Key


claimId Int Not Null Yes No

113 | P a g e
claimPayment int Not Null No No

claimDescription Varchar(300) Not Null No No

claimType Varchar(50) Not Null No No

claimDate Date Not Null No No

treatmentType Varchar(50) Not Null No No

admintOn Date Not Null No No

dischargeOn Date Not Null No No

consultantName Varchar(50) Allow Null No No

labTest Varchar(50) Allow Null No No

employeeID Int Not Null No Yes

hospitalName Varchar(150) Not Null No No

claimStatus Varchar(50) Not Null No No

imbursementAmount Int Not Null No No

notApprovedReason Varchar(150) Allow Null No No

Table of MedicalQuota:
1.7 TBLMEDICALQUOTA

Attributes Data Types Constraints Primary Key Foreign Key


quotaID Int Not Null Yes No
IPD Int Not Null No No
OPD Int Not Null No No
employeeID Varchar(50) Not Null No Yes

Table of MedicalBilling:
1.8 TBLMEDICALBILLING

Attributes Data Types Constraints Primary Key Foreign Key


billingID Int Not Null Yes No
billingMonth Varchar(50) Not Null No No

medicalExpenses BigInt Not Null No No

addedOn DateTime Not Null No No

billType Varchar(50) Not Null No No

billNo Varchar(50) Not Null No No

quotaID Int Not Null No Yes

114 | P a g e
employeeID Varchar(50) Not Null No Yes

hospitalId Int Not Null No Yes

Table of Medical Request Issues:


1.9 TBLMEDICALREQUESTISSUE

Attributes Data Types Constraints Primary Key Foreign


Key
mRequestID Int Not Null Yes No
employeeId Varchar(50) Not Null No Yes

dependentId Varchar(50) Not Null No Yes

dateTime DateTime Not Null No No

treatmentType Varchar(50) Not Null No No

hospitalId Int Not Null No Yes

consultantName Varchar(50) Not Null No No

testName Varchar(50) Not Null No No

transactionId Int Not Null No No

userId Varchar(50) Not Null No Yes

application Status Varchar(50) Not Null No No

Table of SOP:
1.10 TBLSOP

Attributes Data Types Constraints Primary Key Foreign Key

sopID Int Not Null Yes No


sopDescription Varchar(max) Not Null No No

Table of Security Question:


1.11 TBLSECURITYQUESTIONS

115 | P a g e
Attributes Data Types Constraints Primary Key Foreign Key

securityQID Int Not Null Yes No


ansOne Varchar(100) Not Null No No
ansTwo Varchar(100) Not Null No No
ansThree Varchar(100) Not Null No No
ansFour Varchar(100) Not Null No No
userId Varchar(50) Not Null No Yes

Table of Dependent Claim:


1.12 TBLDEPENDENTCLAIM

Attributes Data Types Constraints Primary Key Foreign Key

dependentClaimID Int Not Null Yes No


claimId Int Not Null No Yes
dependentId Int Not Null No Yes

Table of Dependent Request:


1.13 TBLDEPENDENTREQUEST

Attributes Data Types Constraints Primary Key Foreign Key

dependentRequestID Int Not Null Yes No


mRequestId(FK) Int Not Null No Yes

Table of Signature:
1.14 TBLSIGNATURE

Attributes Data Types Constraints Primary Key Foreign Key

signID Int Not Null Yes No


sign Image Not Null No Yes
userId Varchar(50) Not Null No Yes
designation String Not Null No No

116 | P a g e
Features Accessibility

MEDICAL BILLING MANAGEMENT SYSTEM

Version 1.0

Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
11th Sep, 2020

117 | P a g e
Revision History

Version Description Author Date

This cover the features Hassnain Rafique


1.0 11th Sep, 2020
accessibility of the system Wasaf Ul Hassan

118 | P a g e
Administration Access:

Admin will be able to perform:

1. Login
2. Add, update users
3. Change password
4. Forget password
5. Add security questions
6. Add, update employee with dependent information and also can include quota
7. Generate medical application and monitor the application status.
8. Generate reimbursement letter and update, search and monitor imbursement status
9. Add, search bill and can also get reports of the bills
10. View application logs
11. Add, update departments
12. Add, update hospitals
13. Add, update SOPs and can also attach pdf file and get print

Assistant Access:

Assistant will be able to perform:

1. Login
2. Change password
3. Forget password
4. Add security questions
5. Add employee with dependent information.
6. Generate medical application and monitor the application status.
7. View application logs
8. Add, update departments
9. Add, update hospitals
10. View SOPs and can get print

Additional Registrar Access:

Additional Registrar will be able to perform:

1. Login and Change password


2. Forget password
3. Add security questions
4. View, monitor the application status and can also approve/disapprove application
5. Search and monitor the imbursement status
6. Search bill and can also get reports of the bills

Assistant Registrar Access:

Assistant Registrar will be able to perform:

119 | P a g e
1. Login and Change password
2. Forget password
3. Add security questions
4. View, monitor the application status and can also approve/disapprove application
5. Search and monitor the imbursement status
6. Search bill and can also get reports of the bills

Deputy Registrar Access:

Deputy Registrar will be able to perform:

1. Login and Change password


2. Forget password
3. Add security questions
4. View, monitor the application status and can also approve/disapprove application
5. Search and monitor the imbursement status
6. Search bill and can also get reports of the bills

3. CHAPTER
CONSTRUCTION

120 | P a g e
Class Diagram

MEDICAL BILLING MANAGEMENT SYSTEM

Version 1.2

Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
11th Sep, 2020

121 | P a g e
Revision History

Version Description Author Date

This cover the Domain Hassnain Rafique


1.0 22nd Aug, 2020
Model of the system Wasaf Ul Hassan

This cover the Domain Hassnain Rafique


1.1 22nd Aug, 2020
Model of the system Wasaf Ul Hassan

This cover the Domain Hassnain Rafique


1.2 11th Sep, 2020
Model of the system Wasaf Ul Hassan

122 | P a g e
123 | P a g e
Implementation Code

MEDICAL BILLING MANAGEMENT SYSTEM

Version 1.1

Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
12th Sep, 2020

Revision History

Version Description Author Date

124 | P a g e
This cover the code of the Hassnain Rafique
1.0 22nd Aug, 2020
system Wasaf Ul Hassan

This cover the code of the Hassnain Rafique


1.1 12th Sep, 2020
system Wasaf Ul Hassan

Implementation Code:
EF-Model:

125 | P a g e
AddUser.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

126 | P a g e
using System.Windows.Forms;
using DAL;

namespace MBMS
{
public partial class AddUser : MetroFramework.Forms.MetroForm
{
public AddUser()
{
InitializeComponent();
}

private void btnSubmit_Click(object sender, EventArgs e)


{

MBMSEntities dc = new MBMSEntities();


if(btnSubmit.Text=="Submit")
{
try
{
var result = (from u in dc.tblUserLogins where u.userID == txtUserId.Text select u).SingleOrDefault();
tblUserLogin obj = new tblUserLogin();
obj.userID = txtUserId.Text;
obj.userName = txtName.Text;
obj.userPassword = txtPassword.Text;

if (rdbAssistant.Checked)
{
obj.userType = rdbAssistant.Text;
}

dc.tblUserLogins.Add(obj);

if (txtName.Text == "" || txtPassword.Text == "" || txtUserId.Text == "" || rdbAssistant.Checked == false)


{
lblErrorMessage1.Visible = true;
lblErrorMessage1.ForeColor = Color.Red;
lblErrorMessage1.Text = "Please insert data properly";
}

else if (result != null)


{
lblErrorMessage1.Visible = true;
lblErrorMessage1.ForeColor = Color.Red;
lblErrorMessage1.Text = "User Already Exist";
}
else if (dc.SaveChanges() > 0)
{
txtName.Text = "";
txtPassword.Text = "";
txtUserId.Text = "";
rdbAssistant.Checked = false;
lblErrorMessage1.Visible = true;
lblErrorMessage1.ForeColor = Color.Green;
lblErrorMessage1.Text = "Data is inserted successfully";
metroGrid2.DataSource = getAllRecords();
// Clear();
}

}
catch (Exception ex)
{

127 | P a g e
MessageBox.Show(ex.Message);
}

}
else if (btnSubmit.Text=="Update")
{
try
{
string UserID = metroGrid2.SelectedRows[0].Cells[0].Value.ToString();
var result = (from u in dc.tblUserLogins where u.userID == UserID select u).SingleOrDefault();
if (result != null)
{
result.userName = txtName.Text;
result.userID = txtUserId.Text;
result.userPassword = txtPassword.Text;
if (dc.SaveChanges() > 0)
{
lblErrorMessage1.Visible = true;
lblErrorMessage1.ForeColor = Color.Green;
lblErrorMessage1.Text = "User Information is Updated Successfully";
txtUserId.Text = "";
txtName.Text = "";
txtPassword.Text = "";
txtUserId.ReadOnly = false;
btnSubmit.Text = "Add";
metroGrid2.DataSource = getAllRecords();
}

}
}
catch (Exception ex)
{

lblErrorMessage1.Visible = true;
lblErrorMessage1.ForeColor = Color.Red;
lblErrorMessage1.Text = ex.Message;
}
}

private void Form1_Load(object sender, EventArgs e)


{
this.tblUserLoginTableAdapter.Fill(this.mBMSDataSet11.tblUserLogin);
txtName.Focus();
rdbAssistant.Focus();
this.ControlBox = false;

this.BackColor = Color.White;
}
public List<tblUserLogin> getAllRecords()
{
MBMSEntities dc = new MBMSEntities();
try
{
var result = from u in dc.tblUserLogins
orderby u.userName

128 | P a g e
select u;
return result.ToList();
}
catch (Exception)
{

throw;
}
}

private void txtName_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if(!char.IsLetter(ch) && (ch!=8) && (ch!=46) && (ch != 32))
{
e.Handled = true;
lblErrorMessage1.Visible = true;
lblErrorMessage1.ForeColor = Color.Red;
lblErrorMessage1.Text = "Please enter letter(s) only";
}
else
{
lblErrorMessage1.Visible = false;
}
}

private void btnCancel_Click(object sender, EventArgs e)


{
this.Close();
}

private void metroGrid2_CellClick(object sender, DataGridViewCellEventArgs e)


{
if (e.ColumnIndex == 3)
{
MBMSEntities dc = new MBMSEntities();

try
{

string UserID = metroGrid2.SelectedRows[0].Cells[0].Value.ToString();

var result = (from u in dc.tblUserLogins where u.userID == UserID select u).SingleOrDefault();


if (result != null)
{
btnSubmit.Text = "Update";
txtUserId.Text = result.userID;
txtName.Text = result.userName;
txtPassword.Text = result.userPassword;
txtUserId.ReadOnly = true;

}
}
catch (Exception ex)
{
lblErrorMessage1.Visible = true;
lblErrorMessage1.ForeColor = Color.Red;
lblErrorMessage1.Text = ex.Message;
}

129 | P a g e
}
}

private void txtName_MouseClick(object sender, MouseEventArgs e)


{
lblErrorMessage1.Visible = false;
}
}
}
AboutUS.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MBMS
{
public partial class FormAboutUs : MetroFramework.Forms.MetroForm
{
public FormAboutUs()
{
InitializeComponent();
}

private void FormAboutUs_Load(object sender, EventArgs e)


{
this.ControlBox = false;
}
}
}
FormApplicationStatus.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
using System.Data.SqlClient;

namespace MBMS
{
public partial class FormApplicationStatus : MetroFramework.Forms.MetroForm
{
string _userID;
public FormApplicationStatus(string userID)
{
InitializeComponent();
_userID = userID;

130 | P a g e
}
MBMSEntities dc = new MBMSEntities();
private void FormApplicationStatus_Load(object sender, EventArgs e)
{
radGridView2.TableElement.RowHeight = 30;

this.tblMedicalRequestIssueTableAdapter1.Fill(this.mBMSDataApplicationStatus.tblMedicalRequestIssue);

}
int? OPDUsage;
int? IPDUsage;
int? OPDRemaining;
int? IPDRemaining;

private void radGridView2_CommandCellClick(object sender, Telerik.WinControls.UI.GridViewCellEventArgs


e)
{
MBMSEntities dc = new MBMSEntities();

if (e.ColumnIndex == 8)
{

string empID = radGridView2.SelectedRows[0].Cells[1].Value.ToString();


string treatmentType = radGridView2.SelectedRows[0].Cells[3].Value.ToString();
string Signature = radGridView2.SelectedRows[0].Cells[7].Value.ToString();
int Transaction= Convert.ToInt32(radGridView2.SelectedRows[0].Cells[5].Value.ToString());
int hospID= Convert.ToInt32(radGridView2.SelectedRows[0].Cells[4].Value.ToString());
var hosName = (from u in dc.tblHospitals where u.hospitalId==hospID select
u.hospitalName).SingleOrDefault();
var display1 = (from u in dc.tblMedicalQuotas where u.employeeId == empID select u).SingleOrDefault();
if (display1 != null)
{
OPDRemaining = display1.OPD;
IPDRemaining = display1.IPD;
OPDUsage = 70000 - display1.OPD;
IPDUsage = 400000 - display1.IPD;
}
FormGenerateApplication objAppGenerate = new FormGenerateApplication(empID, hosName,
Transaction, treatmentType, OPDUsage, OPDRemaining, IPDUsage, IPDRemaining,_userID,Signature);
objAppGenerate.Show();
}
}
}
}

FormARApplicationStatus.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;

131 | P a g e
using System.Data.SqlClient;

namespace MBMS
{
public partial class FormARApplicationStatus : MetroFramework.Forms.MetroForm
{
string _userID;
public FormARApplicationStatus(string userID)
{
InitializeComponent();
_userID = userID;
}
MBMSEntities dc = new MBMSEntities();
private void FormApplicationStatus_Load(object sender, EventArgs e)
{
radGridView2.TableElement.RowHeight = 30;

this.tblMedicalRequestIssueTableAdapter1.Fill(this.mBMSDataApplicationStatus.tblMedicalRequestIssue);

this.tblMedicalRequestIssueTableAdapter.Fill(this.mBMSDataSetApplicationStatus.tblMedicalRequestIssue);

}
int? OPDUsage;
int? IPDUsage;
int? OPDRemaining;
int? IPDRemaining;

private void radGridView2_CommandCellClick(object sender, Telerik.WinControls.UI.GridViewCellEventArgs


e)
{
MBMSEntities dc = new MBMSEntities();

if (e.ColumnIndex == 8)
{

string empID = radGridView2.SelectedRows[0].Cells[1].Value.ToString();


string treatmentType = radGridView2.SelectedRows[0].Cells[3].Value.ToString();
string Signature = radGridView2.SelectedRows[0].Cells[7].Value.ToString();
int Transaction= Convert.ToInt32(radGridView2.SelectedRows[0].Cells[5].Value.ToString());

int hospID= Convert.ToInt32(radGridView2.SelectedRows[0].Cells[4].Value.ToString());


var hosName = (from u in dc.tblHospitals where u.hospitalId==hospID select
u.hospitalName).SingleOrDefault();
var display1 = (from u in dc.tblMedicalQuotas where u.employeeId == empID select u).SingleOrDefault();
if (display1 != null)
{
OPDRemaining = display1.OPD;
IPDRemaining = display1.IPD;
OPDUsage = 70000 - display1.OPD;
IPDUsage = 400000 - display1.IPD;
}
FormGenerateApplication objAppGenerate = new FormGenerateApplication(empID, hosName,
Transaction, treatmentType, OPDUsage, OPDRemaining, IPDUsage, IPDRemaining,_userID,Signature);
objAppGenerate.Show();
}
}
}
}
FormAssistantMainPage.cs
132 | P a g e
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MBMS
{
public partial class FormAssistantMainPage : MetroFramework.Forms.MetroForm
{
string _userID;
public FormAssistantMainPage(string userID)
{
InitializeComponent();
_userID = userID;
}

private void AssistantMainPage_Load(object sender, EventArgs e)


{
panelDrpUser.Height = 41;
panelDepartment.Height = 41;
panelEmployee.Height = 41;
panelDataLog.Height = 43;
panelClaim.Height = 43;
panelBill.Height = 43;
lbluserID.Text = _userID;
}

private void btnUser_Click_1(object sender, EventArgs e)


{
if (panelDrpUser.Height == 41)
{
panelDrpUser.Height = 135;
}
else
{
panelDrpUser.Height = 41;
}
}

private void btnDepartment_Click_1(object sender, EventArgs e)


{
if (panelDepartment.Height == 41)
{
panelDepartment.Height = 90;
}
else
{
panelDepartment.Height = 41;
}
}

private void btnDrpEmployee_Click_1(object sender, EventArgs e)


{

133 | P a g e
if (panelEmployee.Height == 41)
{
panelEmployee.Height = 127;
}
else
{
panelEmployee.Height = 41;
}
}

private void btnDataLog_Click_1(object sender, EventArgs e)


{
if (panelDataLog.Height == 43)
{
panelDataLog.Height = 85;
}
else
{
panelDataLog.Height = 43;
}
}

private void btnDrpClaim_Click_1(object sender, EventArgs e)


{
if (panelClaim.Height == 43)
{
panelClaim.Height = 88;
}
else
{
panelClaim.Height = 43;
}
}

private void btnDrpBill_Click_1(object sender, EventArgs e)


{
if (panelBill.Height == 43)
{
panelBill.Height = 130;
}
else
{
panelBill.Height = 43;
}
}

private void btnChangePassword_Click(object sender, EventArgs e)


{
FormChangePassword change = new FormChangePassword(lbluserID.Text);
change.Show();
}

private void btnSecurityQ_Click(object sender, EventArgs e)


{
FormSecurityQuestions security = new FormSecurityQuestions(lbluserID.Text);
security.Show();
}

private void pictureBox4_Click(object sender, EventArgs e)


{
FormApplicationStatus obj = new FormApplicationStatus(lbluserID.Text);
obj.Show();

134 | P a g e
}

private void pictureBox5_Click(object sender, EventArgs e)


{
FormSignature obj = new FormSignature(lbluserID.Text);
obj.Show();
}
}
}

FormBill.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
using Telerik.WinControls.UI;

namespace MBMS
{
public partial class FormBills : MetroFramework.Forms.MetroForm
{
string employeeID;
public FormBills(string empID)
{
InitializeComponent();
employeeID = empID;
}

private void ApplicationForm_Load(object sender, EventArgs e)


{
this.viewBillingTableAdapter.Fill(this.mBMSDataSet_SearchBilling.viewBilling);

this.ControlBox = false;
this.tblEmployeeTableAdapter.Fill(this.mBMSDataSet13.tblEmployee);
this.tblHospitalTableAdapter.Fill(this.dataSetHospital.tblHospital);
drpEmployee.DropDownListElement.AutoCompleteSuggest.SuggestMode = SuggestMode.Contains;
drpEmployee.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
drpEmployee.DropDownListElement.AutoCompleteAppend.LimitToList = true;

GridViewSummaryItem Total=new GridViewSummaryItem("medicalExpenses","Total:{0}",


GridAggregateFunction.Sum);
GridViewSummaryRowItem rowItem = new GridViewSummaryRowItem(new GridViewSummaryItem[]
{Total});
radGridView1.SummaryRowsBottom.Add(rowItem);
txtAmount.Text = "0";
radGridView1.TableElement.RowHeight = 30;
}

private void drpEmployee_SelectedIndexChanged(object sender,


public List<viewBilling> getBillingRecord()
{
MBMSEntities dc = new MBMSEntities();

135 | P a g e
try
{

var result = dc.viewBillings.SqlQuery("select * from viewBilling ORDER BY billingId DESC").ToList();


return result.ToList();
}
catch (Exception)
{

throw;
}
}
private void btnNext_Click(object sender, EventArgs e)
{
MBMSEntities dc = new MBMSEntities();
try
{

tblMedicalBilling objBilling = new tblMedicalBilling();


objBilling.HospitalID = Convert.ToInt32(cmbHospital.SelectedValue);
objBilling.BillingMonth = dtpBilling.Value.ToString("MMMM yyyy");
objBilling.AddedOn = DateTime.Now;
objBilling.BillType = Convert.ToString(cmbBillType.SelectedItem);
objBilling.employeeId = Convert.ToString(drpEmployee.SelectedValue);
objBilling.medicalExpenses = Convert.ToInt32(txtAmount.Text);
var result = (from u in dc.tblMedicalQuotas where u.employeeId == objBilling.employeeId select
u).FirstOrDefault();
if(result!=null)
{
if(cmbBillType.SelectedItem == "OPD")
{
result.OPD = result.OPD - Convert.ToInt32(txtAmount.Text);
}
else if(cmbBillType.SelectedItem == "IPD")
{
result.IPD = result.IPD - Convert.ToInt32(txtAmount.Text);
}
}
dc.tblMedicalBillings.Add(objBilling);
if(txtAmount.Text == "0")
{
lblErrorMessage3.Visible = true;
lblErrorMessage3.ForeColor = Color.Red;
lblErrorMessage3.Text = "Please enter required data";
}
else if (cmbBillType.Text=="")
{
lblErrorMessage3.Visible = true;
lblErrorMessage3.ForeColor = Color.Red;
lblErrorMessage3.Text = "Please enter required data";
}
else if(dc.SaveChanges() > 0)
{
lblErrorMessage3.Visible = true;
lblErrorMessage3.ForeColor = Color.Green;
lblErrorMessage3.Text = "Data is inserted";

drpEmployee.Text = "";

txtAmount.Text = "0";
radGridView1.DataSource = getBillingRecord();

136 | P a g e
}

}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

private void txtAmount_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsDigit(ch) && (ch != 8) && (ch != 46) && (ch != 188))
{
e.Handled = true;
lblErrorMessage3.Visible = true;
lblErrorMessage3.ForeColor = Color.Red;
lblErrorMessage3.Text = "Please enter number(s) only";
}
else
{
lblErrorMessage3.Visible = false;
}
}

private void dtpBilling_ValueChanged(object sender, EventArgs e)


{
if (DateTime.Today < dtpBilling.Value)
{
lblErrorMessage3.Visible = true;
lblErrorMessage3.Text = "Your selected date is invalid";
dtpBilling.Value = DateTime.Today;
}
else if (DateTime.Today > dtpBilling.Value)
{
lblErrorMessage3.Visible = false;
}
}
public string getLogoPath()
{
string fileName = "";
var parent = Directory.GetParent(Directory.GetCurrentDirectory()).Parent;
if (parent != null)
{
var directoryInfo = parent.Parent;
string startDirectory = null;
if (directoryInfo != null)
{
startDirectory = directoryInfo.FullName;
}
if (startDirectory != null)
{
String[] subdirs = Directory.GetDirectories(startDirectory);
foreach (var item in subdirs)
{
if (item.Contains("Icons"))
{
fileName = item + "/Logo.PNG";
}
}

137 | P a g e
}
}
return fileName;
}

private void button1_Click(object sender, EventArgs e)


{
MBMSEntities dc = new MBMSEntities();
var UserID = (from u in dc.tblUserLogins where u.userID == employeeID select u).SingleOrDefault();
RadPrintDocument document = new RadPrintDocument();
document.HeaderHeight = 30;
document.HeaderFont = new Font("Century Gothic", 14);

document.MiddleHeader = "Federal Urdu University Of Arts Science & Technology, Islamabad";


document.ReverseHeaderOnEvenPages = true;
string filename = getLogoPath();
document.Watermark.ImagePath = filename;

document.Watermark.ImageHOffset = 325;
document.Watermark.ImageVOffset = 360;
document.Watermark.ImageOpacity = 50;
document.FooterFont = new Font("Century Gothic", 12);
document.RightFooter = UserID.userName;
document.LeftFooter = "Printed on: [Date Printed] [Time Printed].";
document.ReverseFooterOnEvenPages = true;
document.AssociatedObject = this.radGridView1;
RadPrintPreviewDialog dialog = new RadPrintPreviewDialog(document);
dialog.ShowDialog();
}

private void btnCancel_Click(object sender, EventArgs e)


{
this.Close();
}

private void drpEmployee_MouseEnter(object sender, EventArgs e)


{
lblErrorMessage3.Visible = false;
}
}
}

FormChangePassword.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using DAL;

namespace MBMS
{

138 | P a g e
public partial class FormChangePassword : MetroFramework.Forms.MetroForm
{
public FormChangePassword(string userID)
{
InitializeComponent();
txtUserID.Text = userID;
txtUserID.ReadOnly = true;

private void button2_Click(object sender, EventArgs e)


{
this.Close();
}

private void btnSubmit_Click(object sender, EventArgs e)


{
MBMSEntities dc = new MBMSEntities();
try
{
var result = (from u in dc.tblUserLogins
where u.userID == txtUserID.Text
select u).SingleOrDefault();
if (txtOldPswd.Text == "" || txtNewPswd.Text == "" || txtConfirmPswd.Text == "")
{
lblErrorMessage12.Visible = true;
lblErrorMessage12.ForeColor = Color.Red;
lblErrorMessage12.Text = "Please enter required data";
}

else if (result != null)


{
if (result.userPassword == txtOldPswd.Text)
{
if (txtNewPswd.Text == txtConfirmPswd.Text)
{
result.userPassword = txtNewPswd.Text;
if (dc.SaveChanges() > 0)
{

lblErrorMessage12.Visible = true;
lblErrorMessage12.ForeColor = Color.Green;
lblErrorMessage12.Text = "Your password is changed your new password is " + "'" +
txtNewPswd.Text + "'";

txtOldPswd.Text = "";
txtNewPswd.Text = "";
txtConfirmPswd.Text = "";
}
}
else
{
lblErrorMessage12.Visible = true;
lblErrorMessage12.ForeColor = Color.Red;
lblErrorMessage12.Text = "New password and confirm password didn't match";
}

}
else
{
lblErrorMessage12.Visible = true;

139 | P a g e
lblErrorMessage12.ForeColor = Color.Red;
lblErrorMessage12.Text = "Old Password Is inCorrect";
}
}

}
catch (Exception)
{

throw;
}
}

private void ChangePassword_Load(object sender, EventArgs e)


{
this.ControlBox = false;

private void btnCancel_Click(object sender, EventArgs e)


{
this.Close();
}

private void txtOldPswd_MouseClick(object sender, MouseEventArgs e)


{
lblErrorMessage12.Visible = false;
}

private void txtNewPswd_MouseClick(object sender, MouseEventArgs e)


{
lblErrorMessage12.Visible = false;
}

private void txtConfirmPswd_MouseClick(object sender, MouseEventArgs e)


{
lblErrorMessage12.Visible = false;
}
}
}

FormClaimSearch.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
using RadGridReportingLite;
using Telerik.Reporting;
using Telerik.Reporting.Processing;
using Telerik.WinControls.UI;

140 | P a g e
namespace MBMS
{

public partial class FormClaimSearch : MetroFramework.Forms.MetroForm


{
string _UserID;
public FormClaimSearch(string UserID)
{
InitializeComponent();
_UserID = UserID;
}

private void frmClaimSearch_Load(object sender, EventArgs e)


{
this.ControlBox = false;
this.viewClaimsListTableAdapter.Fill(this.mBMSSearchClaim.viewClaimsList);
radGridView1.TableElement.RowHeight = 35;
}

private void btnPrint_Click(object sender, EventArgs e)


{
MBMSEntities dc = new MBMSEntities();
var UserID = (from u in dc.tblUserLogins where u.userID == _UserID select u).SingleOrDefault();

RadPrintDocument document = new RadPrintDocument();


document.HeaderHeight = 30;
document.HeaderFont = new Font("Arial", 15);

document.MiddleHeader = "Federal Urdu University Of Arts Science & Technology, Islamabad";


document.ReverseHeaderOnEvenPages = true;

string filename = getLogoPath();

document.Watermark.ImagePath = filename ;

document.Watermark.ImageHOffset = 325;
document.Watermark.ImageVOffset = 360;
document.Watermark.ImageOpacity = 50;
document.FooterFont = new Font("Arial", 12);
document.RightFooter = UserID.userName;
document.LeftFooter = "Printed on [Date Printed] [Time Printed].";

document.ReverseFooterOnEvenPages = true;
document.AssociatedObject = this.radGridView1;
RadPrintPreviewDialog dialog = new RadPrintPreviewDialog(document);
dialog.ShowDialog();

}
public string getLogoPath()
{
string fileName = "";
var parent = Directory.GetParent(Directory.GetCurrentDirectory()).Parent;
if (parent != null)

141 | P a g e
{
var directoryInfo = parent.Parent;
string startDirectory = null;
if (directoryInfo != null)
{
startDirectory = directoryInfo.FullName;
}
if (startDirectory != null)
{
String[] subdirs = Directory.GetDirectories(startDirectory);
foreach (var item in subdirs)
{
if (item.Contains("Icons"))
{
fileName= item + "/Logo.PNG";
}
}

}
}
return fileName;
}
private void btnExport_Click(object sender, EventArgs e)
{
FormOptions form = new FormOptions();
form.ShowDialog(this);

if (form.DialogResult == DialogResult.OK)
{
RadGridReport report = new RadGridReport(String.Format("Report {0}", "Medical Claim"));
report.FitToPageSize = form.FitToPage;
report.UseGridColors = form.UseGridColors;
report.AllMargins = form.SetAllMargins;
report.PaperKind = form.PaperKind;
report.PageLandScape = form.IsLandScape;
report.ReportWindowState = FormWindowState.Maximized;
report.ReportSize = new Size(800, 350);
report.RepeatTableHeader = form.RepeatHeaderRow;
report.ReportForm(this.radGridView1);

ReportProcessor reportProcessor = new ReportProcessor();


InstanceReportSource instanceReportSource = new InstanceReportSource();
instanceReportSource.ReportDocument = report.Report;
RenderingResult result = reportProcessor.RenderReport("XLS", instanceReportSource, null);

string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);


desktopPath += "\\grid.xls";

FileStream file = new FileStream(desktopPath, FileMode.Create, FileAccess.Write);


file.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
file.Close();
}

}
}

FormDepartment.cs

142 | P a g e
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;

namespace MBMS
{
public partial class FormDepartment : MetroFramework.Forms.MetroForm
{
public FormDepartment()
{
InitializeComponent();
}

private void Department_Load(object sender, EventArgs e)


{
this.tblDepartmentTableAdapter.Fill(this.mBMSDataSet4.tblDepartment);
this.ControlBox = false;
}

private void btnSubmit_Click(object sender, EventArgs e)


{
MBMSEntities dc = new MBMSEntities();
if (btnSubmit.Text == "Add")
{

try
{
tblDepartment obj = new tblDepartment();
obj.departmentName = txtDepartment.Text;
dc.tblDepartments.Add(obj);
if (txtDepartment.Text == "")
{
lblErrorMessage6.Visible = true;
lblErrorMessage6.ForeColor = Color.Red;
lblErrorMessage6.Text = "Please enter department name";
}
else if (dc.SaveChanges() > 0)
{
lblErrorMessage6.Visible = true;
lblErrorMessage6.ForeColor = Color.Green;
lblErrorMessage6.Text = "Department name is saved";
txtDepartment.Text = "";
GridDepartment.DataSource = getAllRecords();

}
catch (Exception ex)
{

MessageBox.Show(ex.Message);
}
}
else if (btnSubmit.Text == "Update")
{

143 | P a g e
var result = (from u in dc.tblDepartments where u.departmentId == depID select u).SingleOrDefault();
if (result != null)
{
result.departmentName = txtDepartment.Text;
if (dc.SaveChanges() > 0)
{
lblErrorMessage6.Visible = true;
lblErrorMessage6.ForeColor = Color.Green;
lblErrorMessage6.Text = "Department name is Updated";
txtDepartment.Text = "";
btnSubmit.Text = "Add";
GridDepartment.DataSource = getAllRecords();
}
}
}
}
public List<tblDepartment> getAllRecords()
{
MBMSEntities dc = new MBMSEntities();
try
{
var result = from u in dc.tblDepartments orderby u.departmentId select u;
return result.ToList();
}
catch (Exception)
{

throw;
}
}

private void btnCancel_Click(object sender, EventArgs e)


{
this.Close();
}

private void txtDepartment_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsLetter(ch) && (ch != 8) && (ch != 46) && (ch != 32))
{
e.Handled = true;
lblErrorMessage6.Visible = true;
lblErrorMessage6.ForeColor = Color.Red;
lblErrorMessage6.Text = "Please enter letter(s) only";
}
else
{
lblErrorMessage6.Visible = false;
}
}

int depID = -1;


private void GridDepartment_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex == 2)
{
MBMSEntities dc = new MBMSEntities();

try
{

144 | P a g e
depID = Convert.ToInt32(GridDepartment.SelectedRows[0].Cells[0].Value.ToString());
tblDepartment obj = new tblDepartment();
var result = (from u in dc.tblDepartments where u.departmentId == depID select u).SingleOrDefault();
if (result != null)
{
btnSubmit.Text = "Update";
txtDepartment.Text = result.departmentName;

}
}
catch (Exception ex)
{
lblErrorMessage6.Text = ex.Message;
}
}
}

private void txtDepartment_MouseClick(object sender, MouseEventArgs e)


{
lblErrorMessage6.Visible = false;
}
}
}

FormDRApplicationStatus.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
using System.Data.SqlClient;

namespace MBMS
{
public partial class FormDRApplicationStatus : MetroFramework.Forms.MetroForm
{
string _userID;
public FormDRApplicationStatus(string userID)
{
InitializeComponent();
_userID = userID;
}
MBMSEntities dc = new MBMSEntities();
private void FormApplicationStatus_Load(object sender, EventArgs e)
{
radGridView2.TableElement.RowHeight = 30;

this.tblMedicalRequestIssueTableAdapter2.Fill(this.mBMSDataSetDRApplicationStatus.tblMedicalRequestIssue);

this.tblMedicalRequestIssueTableAdapter1.Fill(this.mBMSDataApplicationStatus.tblMedicalRequestIssue);

this.tblMedicalRequestIssueTableAdapter.Fill(this.mBMSDataSetApplicationStatus.tblMedicalRequestIssue);

145 | P a g e
int? OPDUsage;
int? IPDUsage;
int? OPDRemaining;
int? IPDRemaining;

private void radGridView2_CommandCellClick(object sender, Telerik.WinControls.UI.GridViewCellEventArgs


e)
{
MBMSEntities dc = new MBMSEntities();

if (e.ColumnIndex == 8)
{

string empID = radGridView2.SelectedRows[0].Cells[1].Value.ToString();


string treatmentType = radGridView2.SelectedRows[0].Cells[3].Value.ToString();
string Signature = radGridView2.SelectedRows[0].Cells[7].Value.ToString();
int Transaction= Convert.ToInt32(radGridView2.SelectedRows[0].Cells[5].Value.ToString());
int hospID= Convert.ToInt32(radGridView2.SelectedRows[0].Cells[4].Value.ToString());
var hosName = (from u in dc.tblHospitals where u.hospitalId==hospID select
u.hospitalName).SingleOrDefault();
var display1 = (from u in dc.tblMedicalQuotas where u.employeeId == empID select u).SingleOrDefault();
if (display1 != null)
{
OPDRemaining = display1.OPD;
IPDRemaining = display1.IPD;
OPDUsage = 70000 - display1.OPD;
IPDUsage = 400000 - display1.IPD;
}
FormGenerateApplication objAppGenerate = new FormGenerateApplication(empID, hosName,
Transaction, treatmentType, OPDUsage, OPDRemaining, IPDUsage, IPDRemaining,_userID,Signature);
objAppGenerate.Show();
}
}
}
}

FormEmployeeInformation.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;

namespace MBMS
{
public partial class FormEmployeeInformation : MetroFramework.Forms.MetroForm

{
string employeeID;
string fileName;

146 | P a g e
public FormEmployeeInformation(string empID)
{
InitializeComponent();
employeeID = empID;

}
public FormEmployeeInformation()
{
InitializeComponent();

private void EmployeeInformation_Load(object sender, EventArgs e)


{
txtDesignation.Visible = false;

this.tblDepartmentTableAdapter1.Fill(this.mBMSDataSet12.tblDepartment);
this.tblDependentTableAdapter2.Fill(this.mBMSDependent.tblDependent);

MBMSEntities dc = new MBMSEntities();


GridDependent.DataSource = getAllDependent();
try
{

var display = (from u in dc.tblEmployees


where u.employeeId == employeeID
select u).SingleOrDefault();
if (display != null)
{
btnAdd.Text = "Update";
txtEmployeeNo.ReadOnly = true;
txtEmployeeNo.Text = display.employeeId;
txtEmployeeName.Text = display.employeeName;
cmbDesignation.Text = display.employeeDesigntion;
txtBPS.Text = display.employeeBPS;
txtContactNo.Text = display.employeeContact;
txtCNIC.Text = display.employeeCNIC;
txtFname.Text = display.employeeFatherName;
txtAddress.Text = display.employeeAddress;
dtDOB.Value = display.employeeDOB.Value;
if (display.Picture != null)
{

pictureBox1.Image = ConvertBinaryToImage(display.Picture);
}
cmbDepartment.SelectedValue = display.departmentId;
var displayQuota = (from v in dc.tblMedicalQuotas
where v.employeeId == display.employeeId
select v).SingleOrDefault();
if (displayQuota != null)
{

txtOPD.Text =Convert.ToString(displayQuota.OPD);
txtIPD.Text = Convert.ToString(displayQuota.IPD);
}
GridDependent.DataSource = getAllDependent();

147 | P a g e
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}

private void btnCancel_Click(object sender, EventArgs e)


{
this.Close();
}
MemoryStream ms;
byte[] ConvertImageToBinary(Image img)
{
ms = new MemoryStream();

img.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
return ms.ToArray();

}
Image ConvertBinaryToImage(byte[] data)
{
ms = new MemoryStream(data);

return Image.FromStream(ms);

}
private void btnAdd_Click(object sender, EventArgs e)
{
MBMSEntities dc = new MBMSEntities();
try
{
if (btnAdd.Text == "Add")
{
tblEmployee obj = new tblEmployee();
obj.employeeId = txtEmployeeNo.Text;
obj.employeeName = txtEmployeeName.Text;
obj.employeeFatherName = txtFname.Text;
if (cmbDesignation.SelectedIndex == 10)
{
obj.employeeDesigntion = txtDesignation.Text;
}
else
{
obj.employeeDesigntion = cmbDesignation.SelectedItem.ToString();
}

obj.employeeBPS = txtBPS.Text;
obj.employeeCNIC = txtCNIC.Text;
obj.employeeContact = txtContactNo.Text;
obj.employeeDOB = dtDOB.Value;
obj.employeeAddress = txtAddress.Text;
if (pictureBox1.Image != null)
{
obj.Picture = ConvertImageToBinary(pictureBox1.Image);
}
obj.departmentId = Convert.ToInt32(cmbDepartment.SelectedValue);
dc.tblEmployees.Add(obj);
tblMedicalQuota objQuota = new tblMedicalQuota();
objQuota.OPD = Convert.ToInt32(txtOPD.Text);
objQuota.IPD = Convert.ToInt32(txtIPD.Text);

148 | P a g e
objQuota.employeeId = txtEmployeeNo.Text;
dc.tblMedicalQuotas.Add(objQuota);
if (
txtEmployeeName.Text == "" ||
txtFname.Text == ""
||
txtBPS.Text == "" ||
txtCNIC.Text == "" ||
txtContactNo.Text == "" ||
txtAddress.Text == "" ||
pictureBox1.Image == null ||
(dtDOB.Value == DateTime.Today))
{
lblErrorMessage7.Visible = true;
lblErrorMessage7.ForeColor = Color.Red;
lblErrorMessage7.Text = "Please insert data properly";
return;
}
else if (dc.SaveChanges() > 0 )
{

txtEmployeeName.Text = "";
txtFname.Text = "";
txtDesignation.Text = "";
txtBPS.Text = "";
txtCNIC.Text = "";
txtContactNo.Text = "";
dtDependentDOB.Value = DateTime.Today;
txtAddress.Text = "";
pictureBox1.Image = null;
lblErrorMessage7.Visible = true;
lblErrorMessage7.Text = "Data is inserted successfully \nPlease go to dependent Tab to Add
Dependents";
lblErrorMessage7.ForeColor = Color.Green;

}
}

else if (btnAdd.Text == "Update")


{
var display = (from u in dc.tblEmployees
where u.employeeId == employeeID
select u).SingleOrDefault();
if (display != null)
{

display.employeeId = txtEmployeeNo.Text;
display.employeeName = txtEmployeeName.Text;
display.employeeDesigntion = txtDesignation.Text;
if (cmbDesignation.SelectedIndex == 10)
{
display.employeeDesigntion = txtDesignation.Text;
}
else
{
display.employeeDesigntion = cmbDesignation.SelectedItem.ToString();
}
display.employeeBPS = txtBPS.Text;
display.employeeContact = txtContactNo.Text;
display.employeeCNIC = txtCNIC.Text;
display.employeeFatherName = txtFname.Text;
display.employeeAddress = txtAddress.Text;

149 | P a g e
display.employeeDOB = dtDOB.Value;
if (pictureBox1.Image != null)
{
display.Picture = ConvertImageToBinary(pictureBox1.Image);
}
display.departmentId = Convert.ToInt32(cmbDepartment.SelectedValue);
var displayQuota = (from v in dc.tblMedicalQuotas
where v.employeeId == display.employeeId
select v).SingleOrDefault();
if (displayQuota != null)
{

displayQuota.OPD = Convert.ToInt32(txtOPD.Text);
displayQuota.IPD = Convert.ToInt32(txtIPD.Text);
}
else
{
tblMedicalQuota objQuota = new tblMedicalQuota();
objQuota.OPD = Convert.ToInt32(txtOPD.Text);
objQuota.IPD = Convert.ToInt32(txtIPD.Text);
objQuota.employeeId = txtEmployeeNo.Text;
dc.tblMedicalQuotas.Add(objQuota);
}
if (dc.SaveChanges() > 0)
{
lblErrorMessage7.Visible = true;
lblErrorMessage7.Text = "Record Is Updated Successfully";
lblErrorMessage7.ForeColor = Color.Green;
}

}
}

}
catch (Exception ex)
{

MessageBox.Show(ex.Message);
}

private void btnAddImage_Click(object sender, EventArgs e)


{
using (OpenFileDialog ofd = new OpenFileDialog() { Filter = "JPEG|*.jpg|PNG|*.png", ValidateNames =
true, Multiselect = false })
{
if (ofd.ShowDialog() == DialogResult.OK)
{
fileName = ofd.FileName;

pictureBox1.Image = Image.FromFile(fileName);
}
}
}
public List<tblDependent> getAllRecord()
{
MBMSEntities dc = new MBMSEntities();
try
{

150 | P a g e
var result = from u in dc.tblDependents orderby u.employeeId select u;
return result.ToList();
}
catch (Exception)
{

throw;
}
}

private void btnAddDependent_Click(object sender, EventArgs e)


{
MBMSEntities dc = new MBMSEntities();
try
{
if (btnAddDependent.Text == "Add")
{

tblDependent obj = new tblDependent();


obj.dependentName = txtDependentName.Text;
obj.dependentCNIC = txtDependentCNIC.Text;
obj.dependentDOB = dtDependentDOB.Value;
obj.dependentRelation = cmbRelation.Text;
if (pictureBox2.Image != null)
{
obj.dependentPicture = ConvertImageToBinary(pictureBox2.Image);
}
obj.employeeId = txtEmployeeNo.Text;
dc.tblDependents.Add(obj);
if (txtDependentName.Text == "" || txtDependentCNIC.Text == "" || cmbRelation.Text == "" ||
(dtDependentDOB.Value == DateTime.Today) || pictureBox2.Image == null)
{
lblErrorMessage11.Visible = true;
lblErrorMessage11.ForeColor = Color.Red;
lblErrorMessage11.Text = "Please insert data properly";
return;
}
else if (dc.SaveChanges() > 0 && DateTime.Today > dtDependentDOB.Value)
{
lblErrorMessage11.Visible = true;
lblErrorMessage11.Text = "Data is inserted successfully";
lblErrorMessage11.ForeColor = Color.Green;
txtDependentName.Text = "";
txtDependentCNIC.Text = "";
cmbRelation.Text = "";
pictureBox2.Image = null;
GridDependent.DataSource = getAllDependent();

}
}
else if (btnAddDependent.Text=="Update")
{

var update = (from u in dc.tblDependents where u.dependentId == depID select u).SingleOrDefault();


if (update != null)
{
update.dependentName = txtDependentName.Text;
update.dependentCNIC = txtDependentCNIC.Text;

151 | P a g e
update.dependentDOB = dtDependentDOB.Value;
if (pictureBox2.Image != null)
{
update.dependentPicture = ConvertImageToBinary(pictureBox2.Image);
}
update.dependentRelation = cmbRelation.Text;
if (dc.SaveChanges() > 0)
{
GridDependent.DataSource = getAllDependent();
lblErrorMessage11.Visible = true;
lblErrorMessage11.Text = "Data is Updated successfully";
lblErrorMessage11.ForeColor = Color.Green;
btnAddDependent.Text = "Add";
txtDependentName.Text = "";
txtDependentCNIC.Text = "";
cmbRelation.Text = "";
pictureBox2.Image = null;
}
}
}

catch (Exception ex)


{

MessageBox.Show(ex.Message);
}
}
public List<tblDependent> getAllDependent()
{
MBMSEntities dc = new MBMSEntities();
try
{
var result = from u in dc.tblDependents where u.employeeId==txtEmployeeNo.Text orderby u.employeeId
select u;
return result.ToList();
}
catch (Exception)
{

throw;
}
}

private void EmployeeInformation_FormClosed(object sender, FormClosedEventArgs e)


{
if (ms!=null)
{
ms.Close();
}
}

private void tabEmployee_Click(object sender, EventArgs e)


{
tabEmployeeInformation.SelectedIndex = 0;
}
int depID = -1;
private void GridDependent_CellClick(object sender, DataGridViewCellEventArgs e)
{
MBMSEntities dc = new MBMSEntities();

152 | P a g e
try
{
depID = Convert.ToInt32(GridDependent.SelectedRows[0].Cells[6].Value.ToString());
tblDependent obj = new tblDependent();
var result = (from u in dc.tblDependents where u.dependentId == depID select u).SingleOrDefault();
if (result != null)
{
btnAddDependent.Text = "Update";
txtDependentName.Text = result.dependentName;
txtDependentCNIC.Text = result.dependentCNIC;
cmbRelation.Text = result.dependentRelation;
if (result.dependentPicture != null)
{

pictureBox2.Image = ConvertBinaryToImage(result.dependentPicture);
}
dtDependentDOB.Value = result.dependentDOB.Value;

}
}
catch (Exception ex)
{

MessageBox.Show(ex.Message);
}
}

private void btnDependentImage_Click(object sender, EventArgs e)


{
using (OpenFileDialog ofd = new OpenFileDialog() { Filter = "JPEG|*.jpg|PNG|*.png", ValidateNames =
true, Multiselect = false })
{
if (ofd.ShowDialog() == DialogResult.OK)
{
fileName = ofd.FileName;

pictureBox2.Image = Image.FromFile(fileName);
}
}
}

private void chkUpdate_CheckedChanged(object sender, EventArgs e)


{
txtIPD.ReadOnly = false;
txtOPD.ReadOnly = false;
if (chkUpdate.Checked!=true)
{
txtOPD.ReadOnly = true;
txtIPD.ReadOnly = true;
}
}

private void txtEmployeeName_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsLetter(ch) && (ch != 8) && (ch != 46) && (ch != 32))
{
e.Handled = true;
lblErrorMessage7.Visible = true;
lblErrorMessage7.ForeColor = Color.Red;

153 | P a g e
lblErrorMessage7.Text = "Please enter letter(s) only";
}
else
{
lblErrorMessage7.Visible = false;
}
}

private void txtFname_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsLetter(ch) && (ch != 8) && (ch != 46) && (ch != 32))
{
e.Handled = true;
lblErrorMessage7.Visible = true;
lblErrorMessage7.ForeColor = Color.Red;
lblErrorMessage7.Text = "Please enter letter(s) only";
}
else
{
lblErrorMessage7.Visible = false;
}
}

private void txtDesignation_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsLetter(ch) && (ch != 8) && (ch != 46) && (ch != 32))
{
e.Handled = true;
lblErrorMessage7.Visible = true;
lblErrorMessage7.ForeColor = Color.Red;
lblErrorMessage7.Text = "Please enter letter(s) only";
}
else
{
lblErrorMessage7.Visible = false;
}
}

private void txtBPS_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsDigit(ch) && (ch != 8) && (ch != 46))
{
e.Handled = true;
lblErrorMessage7.Visible = true;
lblErrorMessage7.ForeColor = Color.Red;
lblErrorMessage7.Text = "Please enter number(s) only";
}
else
{
lblErrorMessage7.Visible = false;
}
}

private void txtCNIC_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsDigit(ch) && (ch != 8) && (ch != 46))
{
e.Handled = true;

154 | P a g e
lblErrorMessage7.Visible = true;
lblErrorMessage7.ForeColor = Color.Red;
lblErrorMessage7.Text = "Please enter number(s) only";
}
else
{
lblErrorMessage7.Visible = false;
}
}

private void txtContactNo_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsDigit(ch) && (ch != 8) && (ch != 46))
{
e.Handled = true;
lblErrorMessage7.Visible = true;
lblErrorMessage7.ForeColor = Color.Red;
lblErrorMessage7.Text = "Please enter number(s) only";
}
else
{
lblErrorMessage7.Visible = false;
}
}

private void txtDependentName_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsLetter(ch) && (ch != 8) && (ch != 46) && (ch != 32))
{
e.Handled = true;
lblErrorMessage11.Visible = true;
lblErrorMessage11.ForeColor = Color.Red;
lblErrorMessage11.Text = "Please enter letter(s) only";
}
else
{
lblErrorMessage11.Visible = false;
}
}

private void txtDependentCNIC_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsDigit(ch) && (ch != 8) && (ch != 46))
{
e.Handled = true;
lblErrorMessage11.Visible = true;
lblErrorMessage11.ForeColor = Color.Red;
lblErrorMessage11.Text = "Please enter number(s) only";
}
else
{
lblErrorMessage11.Visible = false;
}
}

private void dtDependentDOB_ValueChanged(object sender, EventArgs e)


{
if (DateTime.Today < dtDependentDOB.Value)
{

155 | P a g e
lblErrorMessage11.Visible = true;
lblErrorMessage11.Text = "Your selected date is invalid";
dtDependentDOB.Value = DateTime.Today;
}
else if (DateTime.Today > dtDependentDOB.Value)
{
lblErrorMessage11.Visible = false;
}
}

private void dtDOB_ValueChanged(object sender, EventArgs e)


{
if (DateTime.Today < dtDOB.Value)
{
lblErrorMessage7.Visible = true;
lblErrorMessage7.Text = "Your selected date is invalid";
dtDOB.Value = DateTime.Today;
}
else if (DateTime.Today > dtDOB.Value)
{
lblErrorMessage7.Visible = false;
}
}

private void btnDelete_Click(object sender, EventArgs e)


{
pictureBox1.Image = null;
}

private void button1_Click(object sender, EventArgs e)


{
pictureBox2.Image = null;
}

private void txtDependentName_MouseClick(object sender, MouseEventArgs e)


{
lblErrorMessage11.Visible = false;
}

private void btnClear_Click(object sender, EventArgs e)


{
txtEmployeeNo.Text = "Fuu/";
txtEmployeeName.Text = "";
txtFname.Text = "";
txtDesignation.Text = "";
txtBPS.Text = "";
txtAddress.Text = "";
cmbDepartment.Text = "";
txtCNIC.Text = "";
txtContactNo.Text = "";
txtDependentName.Text = "";
txtDependentCNIC.Text = "";
cmbRelation.Text = "";
}

private void cmbDesignation_SelectedIndexChanged(object sender, EventArgs e)


{
if(cmbDesignation.SelectedIndex == 10)
{

156 | P a g e
txtDesignation.Visible = true;
label4.Visible = false;
label17.Visible = true;
}
else
{
label4.Visible = true;
label17.Visible = false;
txtDesignation.Visible = false;
}
}

}
}

FormEmployeeList.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
using Telerik.WinControls.UI;
namespace MBMS
{
public partial class FormEmployeeList : MetroFramework.Forms.MetroForm
{
string _userId;
public FormEmployeeList(string userID)
{
InitializeComponent();
_userId = userID;
}

public List<tblEmployee> getEmployeeList()


{
MBMSEntities dc = new MBMSEntities();
var result = from u in dc.tblEmployees orderby u.employeeId select u;
return result.ToList();
}
private void EmployeeList_Load(object sender, EventArgs e)
{
this.ControlBox = false;

this.tblEmployeeTableAdapter1.Fill(this.mBMSEmp.tblEmployee);

this.tblEmployeeTableAdapter.Fill(this.dataEmployeeList.tblEmployee);
radGridView1.TableElement.RowHeight = 35;

private void metroGrid1_CellClick(object sender, DataGridViewCellEventArgs e)

157 | P a g e
{
string empID = radGridView1.SelectedRows[0].Cells[0].Value.ToString();
FormEmployeeInformation obj = new FormEmployeeInformation(empID);
obj.Show();

private void btnAddEmployee_Click(object sender, EventArgs e)


{
FormEmployeeInformation obj = new FormEmployeeInformation();
obj.Show();
}

private void btnRefresh_Click(object sender, EventArgs e)


{
radGridView1.DataSource = getEmployeeList();
}

private void radGridView1_CommandCellClick(object sender, Telerik.WinControls.UI.GridViewCellEventArgs


e)
{
MBMSEntities dc = new MBMSEntities();
if (e.ColumnIndex == 11)
{
string empID = radGridView1.SelectedRows[0].Cells[0].Value.ToString();
FormEmployeeInformation obj = new FormEmployeeInformation(empID);
obj.Show();
}
else if (e.ColumnIndex == 12)
{
string empID = radGridView1.SelectedRows[0].Cells[0].Value.ToString();

var result = (from u in dc.tblMedicalQuotas where u.employeeId == empID select u).SingleOrDefault();


if (result != null)
{
if (result.OPD <= 5000)
{
if (MessageBox.Show("This Employee has minimum OPD amount limit of " + result.OPD + " \n Do
you want to continue?", "Minimum OPD Limit", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) ==
DialogResult.Yes)
{
FormApplicationForm objApp = new FormApplicationForm(empID, _userId);
objApp.Show();

}
else
{
MessageBox.Show("Sorry you can't proceed", "Minimum OPD Limit");
}

}
else if (result.IPD <= 50000)
{
if (MessageBox.Show("This Employee has minimum OPD amount limit of " + result.IPD+ " \n Do
you want to continue?", "Minimum IPD Limit", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) ==
DialogResult.Yes)
{

158 | P a g e
FormApplicationForm objApp = new FormApplicationForm(empID,_userId);
objApp.Show();

}
else
{
MessageBox.Show("Sorry you can't proceed", "Minimum IPD Limit");
}
}
else
{
FormApplicationForm objApp = new FormApplicationForm(empID, _userId);
objApp.Show();
}

}
else if (e.ColumnIndex == 13)
{
string empID = radGridView1.SelectedRows[0].Cells[0].Value.ToString();
FormMedicalClaimInfo objclaim = new FormMedicalClaimInfo(empID);
objclaim.Show();
}
}
}
}

FormForgetPassword.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using DAL;
using System.Collections;
namespace MBMS
{

public partial class FormForgotPassword : MetroFramework.Forms.MetroForm


{
public FormForgotPassword()
{
InitializeComponent();
}

private void textBox1_TextChanged(object sender, EventArgs e)


{
lblErrorMessage13.Visible = false;
}

159 | P a g e
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}

private void button1_Click(object sender, EventArgs e)


{
bool Q1Matched = false;
bool Q2Matched = false;
MBMSEntities dc = new MBMSEntities();
try
{

tblSecurityQuestion obj = new tblSecurityQuestion();


var result = (from u in dc.tblSecurityQuestions where u.userID == txtUserName.Text select
u).SingleOrDefault();
if (txtUserName.Text == "" || cmbQuestions.Text == "" || txtAnswer.Text == "" || cmbQuestions1.Text ==
"" || txtAnswer1.Text == "")
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Please enter data";
}
else if (result != null)
{
if (cmbQuestions.Text != "")
{}

if (cmbQuestions.Text == "What was the name of your childhood friend?")


{
if (txtAnswer.Text == result.ansOne)
{
Q1Matched = true;
}
else
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Answer didn't match with " + cmbQuestions.Text;

}
}
else if (cmbQuestions.Text == "What was your favorite place?")
{
if (txtAnswer.Text == result.ansTwo)
{
Q1Matched = true;
}
else
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Answer didn't match with " + cmbQuestions.Text;

}
}
else if (cmbQuestions.Text == "Who is your favourite Politician")
{

160 | P a g e
if (txtAnswer.Text == result.ansThree)
{
Q1Matched = true;
}
else
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Answer didn't match with " + cmbQuestions.Text;

}
}
else if (cmbQuestions.Text == "What is Your favourite Color?")
{
if (txtAnswer.Text == result.ansFour)
{
Q1Matched = true;
}
else
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Answer didn't match with " + cmbQuestions.Text;

}
}
if (cmbQuestions1.Text == "What was the name of your childhood friend?")
{
if (txtAnswer1.Text == result.ansOne)
{
Q2Matched = true;
}
else
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Answer didn't match with " + cmbQuestions1.Text;

}
}
else if (cmbQuestions1.Text == "What was your favorite place?")
{
if (txtAnswer1.Text == result.ansTwo)
{
Q2Matched = true;
}
else
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Answer didn't match with " + cmbQuestions1.Text;
//MessageBox.Show("Answer not Matched for " + cmbQuestions1.Text);
}
}
else if (cmbQuestions1.Text == "Who is your favourite Politician")
{
if (txtAnswer1.Text == result.ansThree)
{
Q2Matched = true;
}
else

161 | P a g e
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Answer didn't match with " + cmbQuestions1.Text;

}
}
else if (cmbQuestions1.Text == "What is Your favourite Color?")
{
if (txtAnswer1.Text == result.ansFour)
{
Q2Matched = true;
}
else
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Answer didn't match with " + cmbQuestions1.Text;

}
}

if (Q1Matched == true && Q2Matched == true)


{
FormNewPassword objNew = new FormNewPassword(txtUserName.Text);
objNew.Show();

}
}
else
{

lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Please enter correct user id";
}

}
catch (Exception)
{

throw;
}

private void cmbQuestions_SelectedIndexChanged(object sender, EventArgs e)


{

}
}

162 | P a g e
FormGenerateApplication.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
using System.Data.SqlClient;
using System.IO;
using DAL;

namespace MBMS
{
public partial class FormGenerateApplication : Form
{
string empID;
string hosID;
string _UserID;
int? max;
string treatment;
string _signature;
int? _OPDUsage;
int? _OPDRemaining;
int? _IPDUsage;
int? _IPDRemaining;

public FormGenerateApplication(string EmployeeID,string HospitalID, int? maxNumber, string treatmenttype,


int? OPDUsage, int? OPDRemaining, int? IPDUsage, int?IPDRemaining,string userId, string Signature)
{
InitializeComponent();
empID = EmployeeID;
hosID = HospitalID;
max = maxNumber;
treatment = treatmenttype;
_signature = Signature;
_OPDUsage = OPDUsage;
_OPDRemaining = OPDRemaining;
_IPDUsage = IPDUsage;
_IPDRemaining = IPDRemaining;
_UserID = userId;

private void GenerateApplication_Load(object sender, EventArgs e)


{
MBMSEntities dc = new MBMSEntities();
var userID = (from u in dc.tblUserLogins where u.userID==_UserID select u.userType).SingleOrDefault();

if (userID=="Admin")
{
rdbApproved.Visible = false;

163 | P a g e
rdbNotApproved.Visible = false;
btnSubmit.Visible = false;

}
else if (userID=="Assistant")
{
rdbApproved.Visible = false;
rdbNotApproved.Visible = false;
btnSubmit.Visible = false;
}
SqlConnection con = new SqlConnection("Data Source=DESKTOP-T542DJ9;Initial
Catalog=MBMS;Integrated Security=True");
SqlDataAdapter da = new SqlDataAdapter("Select * from viewMedicalRequests where EmployeeID='" +
empID + "' and TransactionID= '" + max+ "' union all SELECT tblEmployee.employeeId,
a.dependentId,tblEmployee.employeeName dependentName, tblEmployee.employeeCNIC dependentCNIC,
tblEmployee.employeeDOB dependentDOB, 'Self' AS dependentRelation , a.dateTime,
a.TransactionID,tblEmployee.Picture dependentPicture, dbo.tblEmployee.Picture FROM dbo.tblMedicalRequestIssue
AS a INNER JOIN dbo.tblEmployee ON a.employeeId = dbo.tblEmployee.employeeId and
a.EmployeeID='" + empID + "' and dependentid=-1 and TransactionID= '" + max + "'", con);
if (con.State == ConnectionState.Closed)
{
con.Open();
}

DataSet ds = new DataSet();


da.Fill(ds);

try
{

var display = (from v in dc.tblEmployees


where v.employeeId == empID
select v).SingleOrDefault();
if (display != null)
{
DataView dv = new DataView();
dv.Table = ds.Tables[0];

MBMS.CrystalReport rpt = new MBMS.CrystalReport();


rpt.SetDataSource(dv);
//rpt.Database.Tables[0].SetDataSource(ds);
rpt.SetParameterValue("Employee ID", display.employeeId);
rpt.SetParameterValue("Name", display.employeeName);
rpt.SetParameterValue("Hospital", hosID);
rpt.SetParameterValue("Employee CNIC", display.employeeCNIC);
rpt.SetParameterValue("FatherName",display.employeeFatherName);
rpt.SetParameterValue("Designation", display.employeeDesigntion);
rpt.SetParameterValue("Treatment Type",treatment);
rpt.SetParameterValue("Signature",_signature);
rpt.SetParameterValue("OPDUsage",_OPDUsage);
rpt.SetParameterValue("OPDRemaining",_OPDRemaining);
rpt.SetParameterValue("IPDUsage", _IPDUsage);
rpt.SetParameterValue("IPDRemaining", _IPDRemaining);
rpt.SetParameterValue("image", getSignaturePath());

this.crystalReportViewer1.ReportSource = rpt;
crystalReportViewer1.Refresh();
}
}
catch (Exception)
{

164 | P a g e
throw;
}
}

public string getSignaturePath()


{

string fileName = "";

var parent = Directory.GetParent(Directory.GetCurrentDirectory()).Parent;


MBMSEntities dc = new MBMSEntities();
var result = (from u in dc.tblSigns where u.userID == _UserID select u.sign).SingleOrDefault();
var sign = (from u in dc.tblSigns where u.designation == _signature select u.sign).SingleOrDefault();

var result1 = (from u in dc.tblMedicalRequestIssues where u.TransactionID == max select


u.applicationStatus).FirstOrDefault();

if (result != null)
{

if (result1 == "Approved")
{
rdbApproved.Visible = false;
rdbNotApproved.Visible = false;
btnSubmit.Visible = false;
if (parent != null)
{

var directoryInfo = parent.Parent;


string startDirectory = null;
if (directoryInfo != null)
{
startDirectory = directoryInfo.FullName;
}

if (startDirectory != null)
{
if (sign!=null)
{
fileName = sign;//startDirectory + "/MBMS/signatures/" + signaturePath;
}
else
{
fileName = "";
}

}
}

}
else if (result1 == "Not Approved")
{
fileName = "";
rdbApproved.Visible = false;
rdbNotApproved.Visible = false;
btnSubmit.Visible = false;
}
else
{
fileName = "";

165 | P a g e
}

if (rdbApproved.Checked == true)
{

if (parent != null)
{

var directoryInfo = parent.Parent;


string startDirectory = null;
if (directoryInfo != null)
{
startDirectory = directoryInfo.FullName;
}

if (startDirectory != null)
{
if (sign != null)
{
fileName = sign;//startDirectory + "/MBMS/signatures/" + signaturePath;
}
else
{
fileName = "";
}
}
}
}
else if (rdbNotApproved.Checked == true)
{
fileName = "";
}

}
else
{
if (result1 == "Approved")
{
rdbApproved.Visible = false;
rdbNotApproved.Visible = false;
btnSubmit.Visible = false;
if (parent != null)
{

var directoryInfo = parent.Parent;


string startDirectory = null;
if (directoryInfo != null)
{
startDirectory = directoryInfo.FullName;
}

if (startDirectory != null)
{
if (sign != null)
{
fileName = sign;//startDirectory + "/MBMS/signatures/" + signaturePath;

166 | P a g e
}
else
{
fileName = "";
}

}
}

}
else if (result1 == "Not Approved")
{
fileName = "";
rdbApproved.Visible = false;
rdbNotApproved.Visible = false;
btnSubmit.Visible = false;
}
else
{
fileName = "";
}

}
return fileName;

private void btnSubmit_Click(object sender, EventArgs e)


{
MBMSEntities dc = new MBMSEntities();
var result = (from u in dc.tblMedicalRequestIssues where u.TransactionID == max select u);
foreach (var item in result)
{
if (rdbApproved.Checked == true)
{
item.applicationStatus = "Approved";
}
else if (rdbNotApproved.Checked == true)
{
item.applicationStatus = "Not Approved";
}
else
{
MessageBox.Show("Please Select Required Options");
}
}
dc.SaveChanges();
MessageBox.Show("Record Inserted Successfully");

}
}
}

167 | P a g e
FormHome.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using MetroFramework.Forms;

namespace MBMS
{
public partial class FormHome : MetroFramework.Forms.MetroForm
{
public FormHome(string userID)
{
InitializeComponent();
lblUser.Text = userID;
CustomizeDesign(); //invoke method in the constructor because when form runs. all the initial components
must be initialized.
}
public Form currentChildForm;

public void CustomizeDesign()


{
pnlUserSubMenu.Visible = false;
pnlBillSubMenu.Visible = false;
pnlReimbursementSubMenu.Visible = false;
}

//create another method to hide the submenu that were previously opened

private void HideSubmenu()


{
if (pnlUserSubMenu.Visible == true)
pnlUserSubMenu.Visible = false;
if (pnlBillSubMenu.Visible == true)
pnlBillSubMenu.Visible = false;
if (pnlReimbursementSubMenu.Visible == true)
pnlReimbursementSubMenu.Visible = false;
}

//create another method to shoe the submenu

private void ShowSubmenu(Panel Submenu) // since all the submenues are in the panel. this method provides the
visibility of the submenu(show or hide)
{
if (Submenu.Visible == false)
{
HideSubmenu(); // called this method to hide submenu if any of them is opened
Submenu.Visible = true;
}
else //otherwise if any submenu is opened we hide the submenue.
Submenu.Visible = false;
}

168 | P a g e
private void Practice_Load(object sender, EventArgs e)
{

this.ControlBox = false;
pictureBox4.Visible = false;
lblTitle.Location = new Point(250, 17);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 24);
IsMdiContainer = true;

MdiClient chld;

foreach (Control ctrl in this.Controls)


{
try
{
chld = (MdiClient)ctrl;

chld.BackColor = this.BackColor;
}

catch (InvalidCastException exe)

}
}
}

public void OpenChildForm(MetroForm ChildForm) //create method to open child form in the panel
{
if (currentChildForm != null)
{
//open only form
currentChildForm.Close();
}
currentChildForm = ChildForm;
ChildForm.TopLevel = false;
ChildForm.FormBorderStyle = MetroFramework.Forms.FormBorderStyle.None;
ChildForm.Dock = DockStyle.Fill;
pnlDesktop.Controls.Add(ChildForm);
pnlDesktop.Tag = ChildForm;
ChildForm.BringToFront();
ChildForm.ShadowType = MetroFormShadowType.None;
ChildForm.Show();
//blTitle.Text = ChildForm.Text;
//Thread WorkerThread = new Thread(t =>
//{
//})
//{ IsBackground = true };
//WorkerThread.Start();
}

private void btnUser_Click(object sender, EventArgs e)


{
// OpenChildForm(new )
//AddUser objuser = new AddUser();
//OpenChildForm(new )
////AddUser objUser = new AddUser();
//objUser.TopLevel = false;//allow to added to panel
//this.pnlDesktopPane.Controls.Add(objUser);// add to panel

169 | P a g e
//objUser.FormBorderStyle = MetroFramework.Forms.FormBorderStyle.None;// remove boarder
//objUser.Dock = DockStyle.Fill;// completely fill panel4
//objUser.ShadowType = MetroFormShadowType.None;
//objUser.Show();// show the form
}

private void btnEmployee_Click(object sender, EventArgs e)


{
//FormEmployeeInformation employee = new FormEmployeeInformation();//new instance
//employee.TopLevel = false;//allow to added to panel
//this.pnlDesktopPane.Controls.Add(employee);// add to panel
//employee.FormBorderStyle = MetroFramework.Forms.FormBorderStyle.None;// remove boarder
//employee.Dock = DockStyle.Fill;// completely fill panel4
//employee.ShadowType = MetroFormShadowType.None;
//employee.Show();// show the form

private void btnDepartment_Click(object sender, EventArgs e)


{
//FormDepartment department = new FormDepartment();//new instance
//department.TopLevel = false;//allow to added to panel
//this.pnlDesktopPane.Controls.Add(department);// add to panel
//department.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;// remove boarder
//department.Dock = DockStyle.Fill;// completely fill panel
//department.ShadowType = MetroFormShadowType.None;
//department.Show();// show the form
}

private void btnHospital_Click(object sender, EventArgs e)


{
//FormHospital hospital = new FormHospital();//new instance
//hospital.TopLevel = false;//allow to added to panel
//this.pnlDesktopPane.Controls.Add(hospital);// add to panel
//hospital.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;// remove boarder
//hospital.Dock = DockStyle.Fill;// completely fill panel
//hospital.ShadowType = MetroFormShadowType.None;
//hospital.Show();// show the form
}

private void btnBill_Click(object sender, EventArgs e)


{
// employee = new FormEmployeeInformation();//new instance
//employee.TopLevel = false;//allow to added to panel
//this.pnlDesktopPane.Controls.Add(employee);// add to panel
//employee.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;// remove boarder
//employee.Dock = DockStyle.Fill;// completely fill panel
//employee.Show();// show the form
}

private void btnMedicalClaim_Click(object sender, EventArgs e)


{
//FormMedicalClaimInfo MedicalClaim = new FormMedicalClaimInfo();//new instance
//MedicalClaim.TopLevel = false;//allow to added to panel
//this.pnlDesktopPane.Controls.Add(MedicalClaim);// add to panel
//MedicalClaim.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;// remove boarder
//MedicalClaim.Dock = DockStyle.Fill;// completely fill panel
//MedicalClaim.ShadowType = MetroFormShadowType.None;
//MedicalClaim.Show();// show the form
}

170 | P a g e
private void lblLogo_Click(object sender, EventArgs e)
{
//when click on FUUAST, every control will be on its original position like when app starts
pnlUserSubMenu.Visible = false;
//pnlBillSubMenu.Visible = false;
pnlBillSubMenu.Visible = false;

if (currentChildForm == null)
{
}
else
{
currentChildForm.Close();
lblTitle.Text = "MEDICAL BILLING MANAGEMENT SYSTEM";
lblTitle.Location = new Point(580, 17);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 24);
}
}

private void btnUser_Click_1(object sender, EventArgs e)


{
if (pnlDesktopMenu.Width == 232 || pnlFUUAST.Width == 232)
{
ShowSubmenu(pnlUserSubMenu);
//pnlBillSubMenu.Visible = false;
//pnlReimbursementSubMenu.Visible = false;
}
else if (pnlDesktopMenu.Width == 87)
{
pnlUserSubMenu.Visible = false;
//pnlUserSubMenu.Visible = true;
//pnlUserSubMenu.Visible = false;
}
}

private void button1_Click(object sender, EventArgs e)


{

HideSubmenu(); //after selecting some item, we must hide the submenu


}

private void btnChangePassword_Click(object sender, EventArgs e)


{
OpenChildForm(new FormSecurityQuestions(lblUser.Text));

private void btnSecurityQuestion_Click(object sender, EventArgs e)


{
OpenChildForm(new AddUser());

private void btnEmployee_Click_1(object sender, EventArgs e)


{

171 | P a g e
OpenChildForm(new FormEmployeeInformation());
HideSubmenu();
//Thread WorkerThread = new Thread(t =>
//{
//})
//{ IsBackground = true };
//WorkerThread.Start();
}

private void btnDepartment_Click_1(object sender, EventArgs e)


{
OpenChildForm(new FormDepartment());
HideSubmenu();

private void btnHospital_Click_1(object sender, EventArgs e)


{
OpenChildForm(new FormHospital());
HideSubmenu();
}

private void btnBill_Click_1(object sender, EventArgs e)


{
OpenChildForm(new FormBills(lblUser.Text));
if (pnlDesktopMenu.Width == 232 || pnlFUUAST.Width == 232)
{
ShowSubmenu(pnlBillSubMenu);

//pnlReimbursementSubMenu.Visible = false;
}
else if (pnlDesktopMenu.Width == 87)
{
pnlBillSubMenu.Visible = false;

}
}

private void btnEmployeeList_Click_1(object sender, EventArgs e)


{
OpenChildForm(new FormEmployeeList(lblUser.Text));
HideSubmenu();

}
private void btnMedicalClaim_Click_1(object sender, EventArgs e)
{
OpenChildForm(new FormPendingClaims());

if (pnlDesktopMenu.Width == 232 || pnlFUUAST.Width == 232)


{
ShowSubmenu(pnlReimbursementSubMenu);
}
else if (pnlDesktopMenu.Width == 87)
{
pnlReimbursementSubMenu.Visible = false;
}

172 | P a g e
private void btnSystemLog_Click(object sender, EventArgs e)
{
OpenChildForm(new FormSOPs());
HideSubmenu();

private void btnSearchClaim_Click(object sender, EventArgs e)


{
OpenChildForm(new FormClaimSearch(lblUser.Text));
}

private void picLogout_Click(object sender, EventArgs e)


{

private void btnLogs_Click(object sender, EventArgs e)


{
OpenChildForm(new FormLog());
HideSubmenu();
}

private void btnSearchBill_Click(object sender, EventArgs e)


{
OpenChildForm(new FormSearchBill(lblUser.Text));
}

private void label1_Click(object sender, EventArgs e)


{
Application.Exit();
}

private void label2_Click(object sender, EventArgs e)


{
WindowState = FormWindowState.Minimized;
}

private void pnlHideShow_Click(object sender, EventArgs e)


{
if(pnlDesktopMenu.Width == 232 || pnlFUUAST.Width == 232)
{
lblTitle.Location = new Point(450, 16);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 28);
pnlHideShow.Visible = false;
pnlFUUAST.Width = 87;
pnlDesktopMenu.Width = 87;
pictureBox4.Visible = true;
picLogo.Visible = false;
HideSubmenu();
}
else

{
pictureBox4.Visible = false;
pnlHideShow.Visible = true;
pnlFUUAST.Width = 232;
pnlDesktopMenu.Width = 232;
picLogo.Visible = true;
}
}

173 | P a g e
private void pictureBox4_Click(object sender, EventArgs e)
{
if (pnlDesktopMenu.Width == 232 || pnlFUUAST.Width == 232)
{
pictureBox4.Visible = true;
pnlFUUAST.Width = 87;
pnlDesktopMenu.Width = 87;
pnlHideShow.Visible = false;
}
else

{
lblTitle.Location = new Point(580, 17);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 24);
picLogo.Visible = true;
pnlHideShow.Visible = true;
pnlFUUAST.Width = 232;
pnlDesktopMenu.Width = 232;
pictureBox4.Visible = false;
}
}

private void btnUser_MouseHover(object sender, EventArgs e)


{
this.btnUser.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnUser_MouseLeave(object sender, EventArgs e)


{
this.btnUser.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnUser_MouseEnter(object sender, EventArgs e)


{
this.btnUser.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnEmployee_MouseHover(object sender, EventArgs e)


{
this.btnEmployee.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnEmployee_MouseLeave(object sender, EventArgs e)


{
this.btnEmployee.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnEmployee_MouseEnter(object sender, EventArgs e)


{
this.btnEmployee.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnEmployeeList_MouseHover(object sender, EventArgs e)


{
this.btnEmployeeList.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnEmployeeList_MouseLeave(object sender, EventArgs e)


{
this.btnEmployeeList.BackColor = Color.FromArgb(28, 28, 64);
}

174 | P a g e
private void btnEmployeeList_MouseEnter(object sender, EventArgs e)
{
this.btnEmployeeList.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnDepartment_MouseHover(object sender, EventArgs e)


{
this.btnDepartment.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnDepartment_MouseLeave(object sender, EventArgs e)


{
this.btnDepartment.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnDepartment_MouseEnter(object sender, EventArgs e)


{
this.btnDepartment.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnHospital_MouseHover(object sender, EventArgs e)


{
this.btnHospital.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnHospital_MouseLeave(object sender, EventArgs e)


{
this.btnHospital.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnHospital_MouseEnter(object sender, EventArgs e)


{
this.btnHospital.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnBill_MouseHover(object sender, EventArgs e)


{
this.btnBill.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnBill_MouseLeave(object sender, EventArgs e)


{
this.btnBill.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnBill_MouseEnter(object sender, EventArgs e)


{
this.btnBill.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnMedicalClaim_MouseHover(object sender, EventArgs e)


{
this.btnMedicalClaim.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnMedicalClaim_MouseLeave(object sender, EventArgs e)


{
this.btnMedicalClaim.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnMedicalClaim_MouseEnter(object sender, EventArgs e)

175 | P a g e
{
this.btnMedicalClaim.BackColor = Color.FromArgb(0, 177, 89);
}
private void btnSOPs_MouseHover(object sender, EventArgs e)
{
this.btnSOPs.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnSOPs_MouseLeave(object sender, EventArgs e)


{
this.btnSOPs.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnSOPs_MouseEnter(object sender, EventArgs e)


{
this.btnSOPs.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnLogs_MouseHover(object sender, EventArgs e)


{
this.btnLogs.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnLogs_MouseLeave(object sender, EventArgs e)


{
this.btnLogs.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnLogs_MouseEnter(object sender, EventArgs e)


{
this.btnLogs.BackColor = Color.FromArgb(0, 177, 89);
}

private void lblLogout_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)


{
Application.Restart();
}

private void button1_Click_1(object sender, EventArgs e)


{
OpenChildForm(new FormChangePassword(lblUser.Text));
}

private void btnApplicationStatus_Click(object sender, EventArgs e)


{
OpenChildForm(new FormViewApplication(lblUser.Text));
}

private void lblAboutus_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)


{
OpenChildForm(new FormAboutUs());
HideSubmenu();
}

private void btnApplicationStatus_MouseEnter(object sender, EventArgs e)


{
this.btnApplicationStatus.BackColor = Color.FromArgb(0, 177, 89);
}

176 | P a g e
private void btnApplicationStatus_MouseHover(object sender, EventArgs e)
{
this.btnApplicationStatus.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnApplicationStatus_MouseLeave(object sender, EventArgs e)


{
this.btnApplicationStatus.BackColor = Color.FromArgb(28, 28, 64);
}
}
}

namespace MetroFramework.Forms
{
class FormBorderStyle
{
public static System.Windows.Forms.FormBorderStyle None { get; internal set; }
}
}

FormHomeAdditionalRegistrar.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using MetroFramework.Forms;
using DAL;

namespace MBMS
{
public partial class FormHomeAdditionalRegistrar : MetroFramework.Forms.MetroForm
{
public FormHomeAdditionalRegistrar(string userID)
{
InitializeComponent();
lblUser.Text = userID;
CustomizeDesign();
}
public Form currentChildForm;

public void CustomizeDesign()


{
pnlUserSubMenu.Visible = false;
pnlBillSubMenu.Visible = false;

private void HideSubmenu()


{
if (pnlUserSubMenu.Visible == true)
pnlUserSubMenu.Visible = false;
if (pnlBillSubMenu.Visible == true)
pnlBillSubMenu.Visible = false;

177 | P a g e
}

private void ShowSubmenu(Panel Submenu)


{
if (Submenu.Visible == false)
{
HideSubmenu();
Submenu.Visible = true;
}
else
}
private void Practice_Load(object sender, EventArgs e)
{

this.ControlBox = false;
pictureBox4.Visible = false;
lblTitle.Location = new Point(250, 17);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 24);
IsMdiContainer = true;

MdiClient chld;

foreach (Control ctrl in this.Controls)


{
try
{
chld = (MdiClient)ctrl;

chld.BackColor = this.BackColor;
}

catch (InvalidCastException exe)

}
}
}

private void PanelLogo_Paint(object sender, PaintEventArgs e)


{

public void OpenChildForm(MetroForm ChildForm)


{
if (currentChildForm != null)
{
currentChildForm.Close();
}
currentChildForm = ChildForm;
ChildForm.TopLevel = false;
ChildForm.FormBorderStyle = MetroFramework.Forms.FormBorderStyle.None;
ChildForm.Dock = DockStyle.Fill;
pnlDesktop.Controls.Add(ChildForm);
pnlDesktop.Tag = ChildForm;
ChildForm.BringToFront();

178 | P a g e
ChildForm.ShadowType = MetroFormShadowType.None;
ChildForm.Show();

private void lblLogo_Click(object sender, EventArgs e)


{

pnlBillSubMenu.Visible = false;

if (currentChildForm == null)
{
}
else
{
currentChildForm.Close();
lblTitle.Text = "MEDICAL BILLING MANAGEMENT SYSTEM";
lblTitle.Location = new Point(580, 17);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 24);
}
}

private void btnUser_Click_1(object sender, EventArgs e)


{
if (pnlDesktopMenu.Width == 232 || pnlFUUAST.Width == 232)
{
ShowSubmenu(pnlUserSubMenu);
}
else if (pnlDesktopMenu.Width == 87)
{
pnlUserSubMenu.Visible = false;
}
}

private void button1_Click(object sender, EventArgs e)


{

HideSubmenu();
}

private void btnChangePassword_Click(object sender, EventArgs e)


{
OpenChildForm(new FormSecurityQuestions(lblUser.Text));

private void btnSecurityQuestion_Click(object sender, EventArgs e)


{
OpenChildForm(new AddUser());

179 | P a g e
private void btnEmployee_Click_1(object sender, EventArgs e)
{
MBMSEntities dc = new MBMSEntities();
var result = (from u in dc.tblUserLogins where u.userID == lblUser.Text select u.userType).SingleOrDefault();
if(result== "Additional Registrar")
{
OpenChildForm(new FormARApplicationStatus(lblUser.Text));
HideSubmenu();
}
else if (result == "Assistant Registrar")
{
OpenChildForm(new FormApplicationStatus(lblUser.Text));
HideSubmenu();
}
else if (result == "Deputy Registrar")
{
OpenChildForm(new FormDRApplicationStatus(lblUser.Text));
HideSubmenu();
}

private void btnDepartment_Click_1(object sender, EventArgs e)


{
OpenChildForm(new FormDepartment());
HideSubmenu();
}

private void btnHospital_Click_1(object sender, EventArgs e)


{
OpenChildForm(new FormHospital());
HideSubmenu();
}

private void btnBill_Click_1(object sender, EventArgs e)


{
if (pnlDesktopMenu.Width == 232 || pnlFUUAST.Width == 232)
{
ShowSubmenu(pnlBillSubMenu);

}
else if (pnlDesktopMenu.Width == 87)
{
pnlBillSubMenu.Visible = false;

}
}

private void btnEmployeeList_Click_1(object sender, EventArgs e)


{
OpenChildForm(new FormViewApplication(lblUser.Text));
HideSubmenu();

private void btnSystemLog_Click(object sender, EventArgs e)


{

180 | P a g e
OpenChildForm(new FormSOPs());
HideSubmenu();
}

private void btnLogs_Click(object sender, EventArgs e)


{
OpenChildForm(new FormSignature(lblUser.Text));
HideSubmenu();
}

private void btnSearchBill_Click(object sender, EventArgs e)


{
OpenChildForm(new FormSearchBill(lblUser.Text));
}

private void label1_Click(object sender, EventArgs e)


{
Application.Exit();
}

private void label2_Click(object sender, EventArgs e)


{
WindowState = FormWindowState.Minimized;
}

private void btnAbout_Click(object sender, EventArgs e)


{
OpenChildForm(new FormAboutUs());
HideSubmenu();
}

private void pnlHideShow_Click(object sender, EventArgs e)


{
if(pnlDesktopMenu.Width == 232 || pnlFUUAST.Width == 232)
{
lblTitle.Location = new Point(450, 16);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 28);
pnlHideShow.Visible = false;
pnlFUUAST.Width = 87;
pnlDesktopMenu.Width = 87;
pictureBox4.Visible = true;
picLogo.Visible = false;
HideSubmenu();
}
else

{
pictureBox4.Visible = false;
pnlHideShow.Visible = true;
pnlFUUAST.Width = 232;
pnlDesktopMenu.Width = 232;
picLogo.Visible = true;
}
}

private void pictureBox4_Click(object sender, EventArgs e)


{
if (pnlDesktopMenu.Width == 232 || pnlFUUAST.Width == 232)
{

181 | P a g e
pictureBox4.Visible = true;
pnlFUUAST.Width = 87;
pnlDesktopMenu.Width = 87;
pnlHideShow.Visible = false;
}
else

{
lblTitle.Location = new Point(580, 17);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 24);
picLogo.Visible = true;
pnlHideShow.Visible = true;
pnlFUUAST.Width = 232;
pnlDesktopMenu.Width = 232;
pictureBox4.Visible = false;
}
}

private void btnUser_MouseHover(object sender, EventArgs e)


{
this.btnUser.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnUser_MouseLeave(object sender, EventArgs e)


{
this.btnUser.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnUser_MouseEnter(object sender, EventArgs e)


{
this.btnUser.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnEmployee_MouseHover(object sender, EventArgs e)


{
this.btnEmployee.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnEmployee_MouseLeave(object sender, EventArgs e)


{
this.btnEmployee.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnEmployee_MouseEnter(object sender, EventArgs e)


{
this.btnEmployee.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnEmployeeList_MouseHover(object sender, EventArgs e)


{
this.btnEmployeeList.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnEmployeeList_MouseLeave(object sender, EventArgs e)


{
this.btnEmployeeList.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnEmployeeList_MouseEnter(object sender, EventArgs e)


{
this.btnEmployeeList.BackColor = Color.FromArgb(0, 177, 89);
}

182 | P a g e
private void btnBill_MouseHover(object sender, EventArgs e)
{
this.btnBill.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnBill_MouseLeave(object sender, EventArgs e)


{
this.btnBill.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnBill_MouseEnter(object sender, EventArgs e)


{
this.btnBill.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnLogs_MouseHover(object sender, EventArgs e)


{
this.btnLogs.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnLogs_MouseLeave(object sender, EventArgs e)


{
this.btnLogs.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnLogs_MouseEnter(object sender, EventArgs e)


{
this.btnLogs.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnAbout_MouseHover(object sender, EventArgs e)


{
this.btnAbout.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnAbout_MouseLeave(object sender, EventArgs e)


{
this.btnAbout.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnAbout_MouseEnter(object sender, EventArgs e)


{
this.btnAbout.BackColor = Color.FromArgb(0, 177, 89);
}

private void lblLogout_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)


{
Application.Restart();
}

private void button1_Click_1(object sender, EventArgs e)


{
OpenChildForm(new FormChangePassword(lblUser.Text));

183 | P a g e
}
}
}

namespace MetroFramework.Forms
{
class FormStyle2
{
public static System.Windows.Forms.FormBorderStyle None { get; internal set; }
}
}

FormHomeAssistant.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using MetroFramework.Forms;

namespace MBMS
{
public partial class FormHomeAssistant : MetroFramework.Forms.MetroForm
{
public FormHomeAssistant(string userID)
{
InitializeComponent();
lblUser.Text = userID;
CustomizeDesign(); //invoke method in the constructor because when form runs. all the initial components
must be initialized.
}
public Form currentChildForm;

public void CustomizeDesign()


{
pnlUserSubMenu.Visible = false;
pnlBillSubMenu.Visible = false;
pnlReimbursementSubMenu.Visible = false;
}

//create another method to hide the submenu that were previously opened

private void HideSubmenu()


{
if (pnlUserSubMenu.Visible == true)
pnlUserSubMenu.Visible = false;
if (pnlBillSubMenu.Visible == true)
pnlBillSubMenu.Visible = false;
if (pnlReimbursementSubMenu.Visible == true)
pnlReimbursementSubMenu.Visible = false;
}

184 | P a g e
private void ShowSubmenu(Panel Submenu) // since all the submenues are in the panel. this method provides the
visibility of the submenu(show or hide)
{
if (Submenu.Visible == false)
{
HideSubmenu(); // called this method to hide submenu if any of them is opened
Submenu.Visible = true;
}
else //otherwise if any submenu is opened we hide the submenue.
Submenu.Visible = false;
}
private void Practice_Load(object sender, EventArgs e)
{

this.ControlBox = false;
pictureBox4.Visible = false;
lblTitle.Location = new Point(250, 17);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 24);
IsMdiContainer = true;

MdiClient chld;

foreach (Control ctrl in this.Controls)


{
try
{
chld = (MdiClient)ctrl;

chld.BackColor = this.BackColor;
}

catch (InvalidCastException exe)

}
}
}

private void PanelLogo_Paint(object sender, PaintEventArgs e)


{

public void OpenChildForm(MetroForm ChildForm) //create method to open child form in the panel
{
if (currentChildForm != null)
{
//open only form
currentChildForm.Close();
}
currentChildForm = ChildForm;
ChildForm.TopLevel = false;
ChildForm.FormBorderStyle = MetroFramework.Forms.FormBorderStyle.None;
ChildForm.Dock = DockStyle.Fill;
pnlDesktop.Controls.Add(ChildForm);
pnlDesktop.Tag = ChildForm;
ChildForm.BringToFront();
ChildForm.ShadowType = MetroFormShadowType.None;
ChildForm.Show();

185 | P a g e
//blTitle.Text = ChildForm.Text;
//Thread WorkerThread = new Thread(t =>
//{
//})
//{ IsBackground = true };
//WorkerThread.Start();
}

private void lblLogo_Click(object sender, EventArgs e)


{
pnlUserSubMenu.Visible = false;
pnlBillSubMenu.Visible = false;

if (currentChildForm == null)
{
}
else
{
currentChildForm.Close();
lblTitle.Text = "MEDICAL BILLING MANAGEMENT SYSTEM";
lblTitle.Location = new Point(580, 17);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 24);
}
}

private void btnUser_Click_1(object sender, EventArgs e)


{
if (pnlDesktopMenu.Width == 232 || pnlFUUAST.Width == 232)
{
ShowSubmenu(pnlUserSubMenu);
}
else if (pnlDesktopMenu.Width == 87)
{
pnlUserSubMenu.Visible = false;

}
}

private void button1_Click(object sender, EventArgs e)


{

HideSubmenu(); //after selecting some item, we must hide the submenu


}

private void btnChangePassword_Click(object sender, EventArgs e)


{
OpenChildForm(new FormSecurityQuestions(lblUser.Text));

private void btnSecurityQuestion_Click(object sender, EventArgs e)


{
OpenChildForm(new AddUser());

186 | P a g e
private void btnEmployee_Click_1(object sender, EventArgs e)
{

OpenChildForm(new FormEmployeeInformation());
HideSubmenu();
}

private void btnDepartment_Click_1(object sender, EventArgs e)


{
OpenChildForm(new FormDepartment());
HideSubmenu();

private void btnHospital_Click_1(object sender, EventArgs e)


{
OpenChildForm(new FormHospital());
HideSubmenu();
}

private void btnBill_Click_1(object sender, EventArgs e)


{
OpenChildForm(new FormBills(lblUser.Text));
if (pnlDesktopMenu.Width == 232 || pnlFUUAST.Width == 232)
{
ShowSubmenu(pnlBillSubMenu);

}
else if (pnlDesktopMenu.Width == 87)
{
pnlBillSubMenu.Visible = false;
}
}

private void btnEmployeeList_Click_1(object sender, EventArgs e)


{
OpenChildForm(new FormEmployeeList(lblUser.Text));
HideSubmenu();

}
private void btnMedicalClaim_Click_1(object sender, EventArgs e)
{
OpenChildForm(new FormPendingClaims());

if (pnlDesktopMenu.Width == 232 || pnlFUUAST.Width == 232)


{
ShowSubmenu(pnlReimbursementSubMenu);
}
else if (pnlDesktopMenu.Width == 87)
{
pnlReimbursementSubMenu.Visible = false;
}
}

private void metroRadioButton1_CheckedChanged(object sender, EventArgs e)


{

187 | P a g e
private void metroRadioButton2_CheckedChanged(object sender, EventArgs e)
{

private void radioButton1_CheckedChanged(object sender, EventArgs e)


{

private void pnlBillSubMenu_Paint(object sender, PaintEventArgs e)


{

private void btnSystemLog_Click(object sender, EventArgs e)


{
OpenChildForm(new FormViewApplication(lblUser.Text));
HideSubmenu();
}

private void btnSearchClaim_Click(object sender, EventArgs e)


{
OpenChildForm(new FormClaimSearch(lblUser.Text));

private void picLogout_Click(object sender, EventArgs e)


{

private void btnLogs_Click(object sender, EventArgs e)


{
OpenChildForm(new FormLog());
HideSubmenu();
}

private void btnSearchBill_Click(object sender, EventArgs e)


{
OpenChildForm(new FormSearchBill(lblUser.Text));
}

private void label1_Click(object sender, EventArgs e)


{
Application.Exit();
}

private void label2_Click(object sender, EventArgs e)


{
WindowState = FormWindowState.Minimized;
}

private void pnlHideShow_Click(object sender, EventArgs e)


{
if(pnlDesktopMenu.Width == 232 || pnlFUUAST.Width == 232)
{
lblTitle.Location = new Point(450, 16);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 28);
pnlHideShow.Visible = false;
pnlFUUAST.Width = 87;

188 | P a g e
pnlDesktopMenu.Width = 87;
pictureBox4.Visible = true;
picLogo.Visible = false;
HideSubmenu();
}
else

{
pictureBox4.Visible = false;
pnlHideShow.Visible = true;
pnlFUUAST.Width = 232;
pnlDesktopMenu.Width = 232;
picLogo.Visible = true;
}
}

private void pictureBox4_Click(object sender, EventArgs e)


{
if (pnlDesktopMenu.Width == 232 || pnlFUUAST.Width == 232)
{
pictureBox4.Visible = true;
pnlFUUAST.Width = 87;
pnlDesktopMenu.Width = 87;
pnlHideShow.Visible = false;
}
else

{
lblTitle.Location = new Point(580, 17);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 24);
picLogo.Visible = true;
pnlHideShow.Visible = true;
pnlFUUAST.Width = 232;
pnlDesktopMenu.Width = 232;
pictureBox4.Visible = false;
}
}

private void btnUser_MouseHover(object sender, EventArgs e)


{
this.btnUser.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnUser_MouseLeave(object sender, EventArgs e)


{
this.btnUser.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnUser_MouseEnter(object sender, EventArgs e)


{
this.btnUser.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnEmployee_MouseHover(object sender, EventArgs e)


{
this.btnEmployee.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnEmployee_MouseLeave(object sender, EventArgs e)


{
this.btnEmployee.BackColor = Color.FromArgb(28, 28, 64);
}

189 | P a g e
private void btnEmployee_MouseEnter(object sender, EventArgs e)
{
this.btnEmployee.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnEmployeeList_MouseHover(object sender, EventArgs e)


{
this.btnEmployeeList.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnEmployeeList_MouseLeave(object sender, EventArgs e)


{
this.btnEmployeeList.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnEmployeeList_MouseEnter(object sender, EventArgs e)


{
this.btnEmployeeList.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnDepartment_MouseHover(object sender, EventArgs e)


{
this.btnDepartment.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnDepartment_MouseLeave(object sender, EventArgs e)


{
this.btnDepartment.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnDepartment_MouseEnter(object sender, EventArgs e)


{
this.btnDepartment.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnHospital_MouseHover(object sender, EventArgs e)


{
this.btnHospital.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnHospital_MouseLeave(object sender, EventArgs e)


{
this.btnHospital.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnHospital_MouseEnter(object sender, EventArgs e)


{
this.btnHospital.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnBill_MouseHover(object sender, EventArgs e)


{
this.btnBill.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnBill_MouseLeave(object sender, EventArgs e)


{
this.btnBill.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnBill_MouseEnter(object sender, EventArgs e)

190 | P a g e
{
this.btnBill.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnMedicalClaim_MouseHover(object sender, EventArgs e)


{
this.btnMedicalClaim.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnMedicalClaim_MouseLeave(object sender, EventArgs e)


{
this.btnMedicalClaim.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnMedicalClaim_MouseEnter(object sender, EventArgs e)


{
this.btnMedicalClaim.BackColor = Color.FromArgb(0, 177, 89);
}
private void btnSOPs_MouseHover(object sender, EventArgs e)
{
this.btnApplicationStatus.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnSOPs_MouseLeave(object sender, EventArgs e)


{
this.btnApplicationStatus.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnSOPs_MouseEnter(object sender, EventArgs e)


{
this.btnApplicationStatus.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnLogs_MouseHover(object sender, EventArgs e)


{
this.btnLogs.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnLogs_MouseLeave(object sender, EventArgs e)


{
this.btnLogs.BackColor = Color.FromArgb(28, 28, 64);
}

private void btnLogs_MouseEnter(object sender, EventArgs e)


{
this.btnLogs.BackColor = Color.FromArgb(0, 177, 89);
}

private void lblLogout_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)


{
Application.Restart();
}

private void lblLogout_MouseHover(object sender, EventArgs e)


{
// this.lblLogout.BackColor = Color.FromArgb(20, 84, 3);
}

private void button1_Click_1(object sender, EventArgs e)


{
OpenChildForm(new FormChangePassword(lblUser.Text));

191 | P a g e
}

private void btnSOPs_Click(object sender, EventArgs e)


{
OpenChildForm(new FormSOPs());
}

private void pnlDesktop_Paint(object sender, PaintEventArgs e)


{

private void lblAboutus_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)


{
OpenChildForm(new FormAboutUs());
HideSubmenu();
}

private void btnSOPs_MouseHover_1(object sender, EventArgs e)


{
this.btnSOPs.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnSOPs_MouseEnter_1(object sender, EventArgs e)


{
this.btnSOPs.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnSOPs_MouseLeave_1(object sender, EventArgs e)


{

this.btnSOPs.BackColor = Color.FromArgb(28, 28, 64);


}

private void btnApplicationStatus_MouseHover(object sender, EventArgs e)


{
this.btnApplicationStatus.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnApplicationStatus_MouseEnter(object sender, EventArgs e)


{
this.btnApplicationStatus.BackColor = Color.FromArgb(0, 177, 89);
}

private void btnApplicationStatus_MouseLeave(object sender, EventArgs e)


{
this.btnApplicationStatus.BackColor = Color.FromArgb(28, 28, 64);
}

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)


{
Application.Restart();
}
}
}

namespace MetroFramework.Forms
{
class FormStyle
{
public static System.Windows.Forms.FormBorderStyle None { get; internal set; }

192 | P a g e
}
}

FormHospital.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;

namespace MBMS
{
public partial class FormHospital : MetroFramework.Forms.MetroForm
{
public FormHospital()
{
InitializeComponent();
}

private void Hospital_Load(object sender, EventArgs e)


{
this.ControlBox = false;
this.tblHospitalTableAdapter1.Fill(this.mBMSDataSetHospital.tblHospital);

private void btnSubmit_Click(object sender, EventArgs e)


{

MBMSEntities dc = new MBMSEntities();


if (btnSubmit.Text == "Add")
{

try
{
tblHospital obj = new tblHospital();
obj.hospitalName = txtHospital.Text;
obj.hospitalAddress = txtAddress.Text;
dc.tblHospitals.Add(obj);
if (txtHospital.Text == "" || txtAddress.Text=="")
{
lblErrorMessage8.Visible = true;
lblErrorMessage8.ForeColor = Color.Red;
lblErrorMessage8.Text = "Please fill required field";
}
else if (dc.SaveChanges() > 0)
{
lblErrorMessage8.Visible = true;
lblErrorMessage8.ForeColor = Color.Green;
lblErrorMessage8.Text = "Hospital Information is saved";
txtHospital.Text = "";
txtAddress.Text = "";

193 | P a g e
GridHospital.DataSource = GetAllRecords();

}
}
catch (Exception ex)
{

MessageBox.Show(ex.Message);
}
}
else if (btnSubmit.Text == "Update")
{
var result = (from u in dc.tblHospitals where u.hospitalId == HosID select u).SingleOrDefault();
if (result != null)
{
result.hospitalName = txtHospital.Text;
result.hospitalAddress = txtAddress.Text;
if (dc.SaveChanges() > 0)
{
lblErrorMessage8.Visible = true;
lblErrorMessage8.ForeColor = Color.Green;
lblErrorMessage8.Text = "Hospital information is Updated";
txtHospital.Text = "";
txtAddress.Text = "";
btnSubmit.Text = "Add";
GridHospital.DataSource = GetAllRecords();
}
}
}
}
public List<tblHospital> GetAllRecords()
{
MBMSEntities dc = new MBMSEntities();
try
{
var result = from u in dc.tblHospitals orderby u.hospitalId select u;
return result.ToList();
}
catch (Exception)
{

throw;
}
}

private void btnCancel_Click(object sender, EventArgs e)


{
this.Close();
}

private void txtHospital_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsLetter(ch) && (ch != 8) && (ch != 46) && (ch != 32))
{
e.Handled = true;
lblErrorMessage8.Visible = true;
lblErrorMessage8.ForeColor = Color.Red;
lblErrorMessage8.Text = "Please enter letter(s) only";
}
else
{

194 | P a g e
lblErrorMessage8.Visible = false;
}
}
int HosID=-1;

private void GridHospital_CellClick_2(object sender, DataGridViewCellEventArgs e)


{
if (e.ColumnIndex == 3)
{
MBMSEntities dc = new MBMSEntities();

try
{

HosID = Convert.ToInt32(GridHospital.SelectedRows[0].Cells[0].Value.ToString());
tblHospital obj = new tblHospital();
var result = (from u in dc.tblHospitals where u.hospitalId == HosID select u).SingleOrDefault();
if (result != null)
{
btnSubmit.Text = "Update";
txtHospital.Text = result.hospitalName;
txtAddress.Text = result.hospitalAddress;

}
}
catch (Exception ex)
{
lblErrorMessage8.Text = ex.Message;
}
}
}

private void txtHospital_MouseClick(object sender, MouseEventArgs e)


{
lblErrorMessage8.Visible = false;
}
}
}

FormLog.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MBMS
{

195 | P a g e
public partial class FormLog : MetroFramework.Forms.MetroForm
{
public FormLog()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)


{

var parent = Directory.GetParent(Directory.GetCurrentDirectory()).Parent;


if (parent != null)
{
var directoryInfo = parent.Parent;
string startDirectory = null;
if (directoryInfo != null)
{
startDirectory = directoryInfo.FullName;
}
if (startDirectory != null)
{
String[] subdirs = Directory.GetDirectories(startDirectory);
foreach (var item in subdirs)
{
if (item.Contains("Icons"))
{
DirectoryInfo d = new DirectoryInfo(item);
FileInfo[] Files = d.GetFiles();

List<String> str = new List<string>();


foreach (FileInfo file in Files)
{
str.Add(file.Name);
}
}
}

}
}
private void Form1_Load(object sender, EventArgs e)
{
this.ControlBox = false;
this.viewApplicationLogTableAdapter.Fill(this.mBMSDataSetApplicationLog.ViewApplicationLog);

radGridView1.TableElement.RowHeight = 35;
}

}
}

FormMedicalClaimInfo.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;

196 | P a g e
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;

namespace MBMS
{
public partial class FormMedicalClaimInfo : MetroFramework.Forms.MetroForm
{
string employeeID;
public FormMedicalClaimInfo(string empID)
{
employeeID = empID;
InitializeComponent();
}
MBMSEntities dc = new MBMSEntities();
private void frmMedicalClaimInfo_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'mBMSDataSet10.tblDependent' table. You can move, or
remove it, as needed.
this.tblDependentTableAdapter.Fill(this.mBMSDataSet10.tblDependent);

try
{
var display = (from u in dc.tblEmployees where u.employeeId == employeeID select u).SingleOrDefault();
if(display!= null)
{
txtEmployeeId.Text = display.employeeId;
txtEmployeeName.Text = display.employeeName;
txtCNIC.Text = display.employeeCNIC;
txtDesignation.Text = display.employeeDesigntion;
txtContact.Text = display.employeeContact;
txtBPS.Text = display.employeeBPS;
txtAddress.Text = display.employeeAddress;
radGridView1.DataSource = getdependentRecord();
}
}
catch (Exception)
{

throw;
}
}

public List<tblDependent> getdependentRecord()


{
var result = from v in dc.tblDependents where v.employeeId == txtEmployeeId.Text orderby employeeID
select v;
return result.ToList();
}
private void btnNext_Click(object sender, EventArgs e)
{
string ExpenseWord = "";
ExpenseWord = txtExpenseInWords.Text;
try
{
bool createMedicalClaim = false;
foreach (var row in radGridView1.Rows)
{

197 | P a g e
bool isSelected = Convert.ToBoolean(row.Cells["column1"].Value);
if (isSelected)
{
createMedicalClaim = true;
}
}
if (chkSelf.Checked == false && createMedicalClaim == false)
{
lblErrorMessage9.Visible = true;
lblErrorMessage9.ForeColor = Color.Green;
lblErrorMessage9.Text = "Please select dependent/Patient";
}
else
{
string treatmenttype = string.Empty; ;
tblMedicalClaim obj = new tblMedicalClaim();
obj.employeeId = txtEmployeeId.Text;
obj.claimStatus = "Pending";
obj.hospitalName = txtHospitalName.Text;
obj.claimType = cmbBillType.SelectedItem.ToString();
obj.claimPayment = Convert.ToInt32(txtClaimAmount.Text);
obj.claimDescription = txtDescription.Text;
obj.claimDate = DateTime.Now;

if (rdbTreatment.Checked)
{
obj.treatmentType = rdbTreatment.Text;
obj.admitOn = dtpAdmit.Value;
obj.dischargeOn = dtpDischarge.Value;
treatmenttype = rdbTreatment.Text;
}
else if (rdbFollow.Checked)
{
obj.treatmentType = rdbFollowUp.Text;
obj.consultantName = txtConsultName.Text;
treatmenttype = rdbFollow.Text;
}
else if (rdbLabTest.Checked)
{
obj.treatmentType = rdbLabTest.Text;
obj.labTest = txtLabTest.Text;
treatmenttype = rdbLabTest.Text;
}

dc.tblMedicalClaims.Add(obj);

if (dc.SaveChanges() > 0)
{

int? maxNumber = 0;
var getMaxTransaction = (from u in dc.tblMedicalRequestIssues //Select max
number/Transaction
select u).Max(x => x.TransactionID);
if (getMaxTransaction != null)
{
maxNumber = getMaxTransaction + 1; //Increment On Transaction Column

if (chkSelf.Checked)
{
tblDependentClaim objdependentClaim = new tblDependentClaim();

198 | P a g e
objdependentClaim.dependentId = -1;
objdependentClaim.claimId = obj.claimId;
dc.tblDependentClaims.Add(objdependentClaim);
}
foreach (var row in radGridView1.Rows)
{

bool isSelected = Convert.ToBoolean(row.Cells["column1"].Value);


if (isSelected)
{
tblDependentClaim objdependentClaim = new tblDependentClaim();
string CNIC = row.Cells[1].Value.ToString();
var getID = (from x in dc.tblDependents where x.dependentCNIC == CNIC select
x).SingleOrDefault();
objdependentClaim.dependentId = getID.dependentId;
objdependentClaim.claimId = obj.claimId;
dc.tblDependentClaims.Add(objdependentClaim);
}

}
dc.SaveChanges();
MessageBox.Show("Record Inserted Successfully");
imbursementForm objClaim = new imbursementForm(obj.claimId, txtEmployeeId.Text, treatmenttype,
ExpenseWord);
objClaim.Show();
}
}

}
catch (Exception ex)
{

MessageBox.Show(ex.Message);
}
}

private void rdbFollow_CheckedChanged(object sender, EventArgs e)


{
label3.Visible = true;
txtConsultant.Visible = true;
if (rdbFollow.Checked != true)
{
label3.Visible = false;
txtConsultant.Visible = false;
}
}

private void rdbLabTest_CheckedChanged(object sender, EventArgs e)


{
label4.Visible = true;
txtLabTest.Visible = true;
if (rdbLabTest.Checked != true)
{
label4.Visible = false;
txtLabTest.Visible = false;
}
}

private void rdbTreatment_CheckedChanged(object sender, EventArgs e)


{
label9.Visible = true;

199 | P a g e
dtpAdmit.Visible = true;
label11.Visible = true;
dtpDischarge.Visible = true;
if (rdbTreatment.Checked != true)
{
label9.Visible = false;
dtpAdmit.Visible = false;
label11.Visible = false;
dtpDischarge.Visible = false;
}
}

private void txtConsultant_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsLetter(ch) && (ch != 8) && (ch != 46) && (ch != 32))
{
e.Handled = true;
lblErrorMessage9.Visible = true;
lblErrorMessage9.ForeColor = Color.Red;
lblErrorMessage9.Text = "Please enter letter(s) only";
}
else
{
lblErrorMessage9.Visible = false;
}
}

private void txtClaimAmount_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsDigit(ch) && (ch != 8) && (ch != 46) && (ch != 188))
{
e.Handled = true;
lblErrorMessage9.Visible = true;
lblErrorMessage9.ForeColor = Color.Red;
lblErrorMessage9.Text = "Please enter number(s) only";
}
else
{
lblErrorMessage9.Visible = false;
}
}

private void txtExpenseInWords_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsLetter(ch) && (ch != 8) && (ch != 46) && (ch != 32))
{
e.Handled = true;
lblErrorMessage9.Visible = true;
lblErrorMessage9.ForeColor = Color.Red;
lblErrorMessage9.Text = "Please enter letter(s) only";
}
else
{
lblErrorMessage9.Visible = false;
}
}

private void dtpAdmit_ValueChanged(object sender, EventArgs e)

200 | P a g e
{
if (DateTime.Today < dtpAdmit.Value)
{
lblErrorMessage9.Visible = true;
lblErrorMessage9.ForeColor = Color.Red;
lblErrorMessage9.Text = "Your selected date is invalid";
dtpAdmit.Value = DateTime.Today;
}
else if (DateTime.Today > dtpAdmit.Value)
{
// if(DateTime.MinValue <= )
lblErrorMessage9.Visible = false;
}
}

private void dtpDischarge_ValueChanged(object sender, EventArgs e)


{
if (DateTime.Today < dtpDischarge.Value)
{
lblErrorMessage9.Visible = true;
lblErrorMessage9.ForeColor = Color.Red;
lblErrorMessage9.Text = "Your selected date is invalid";
dtpDischarge.Value = DateTime.Today;
}
else if (DateTime.Today > dtpDischarge.Value)
{
lblErrorMessage9.Visible = false;
}
}

private void btnDCancel_Click(object sender, EventArgs e)


{
this.Close();
}

}
}

FormNewPassword.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
namespace MBMS
{
public partial class FormNewPassword : MetroFramework.Forms.MetroForm
{
string _UserId;
public FormNewPassword(string UserID)

201 | P a g e
{
InitializeComponent();
_UserId = UserID;
}

private void lblErrorMessage12_Click(object sender, EventArgs e)


{

private void btnSubmit_Click(object sender, EventArgs e)


{
MBMSEntities dc = new MBMSEntities();

var display = (from u in dc.tblUserLogins


where u.userID == txtUserID.Text
select u).SingleOrDefault();
if (txtNewPswd.Text == "")
{
lblErrorMessage12.Visible = true;
lblErrorMessage12.ForeColor = Color.Red;
lblErrorMessage12.Text = "Please enter required data";
}
else if (display != null)

{
display.userPassword = txtNewPswd.Text;

if (dc.SaveChanges() > 0)
{

MessageBox.Show("Your Password is successfully changed \nYour New Password is " +


txtNewPswd.Text + "");
this.Close();

}
}

private void FormNewPassword_Load(object sender, EventArgs e)


{
txtUserID.Text = _UserId;
txtUserID.ReadOnly = true;
}
}
}

FormPendingClaim.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;

202 | P a g e
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
using Telerik.WinControls.UI;
namespace MBMS
{
public partial class FormPendingClaims : MetroFramework.Forms.MetroForm
{

public FormPendingClaims()
{
InitializeComponent();
}

public List<viewClaimsList> getClaimList()


{
MBMSEntities dc = new MBMSEntities();
var result = dc.viewClaimsLists.SqlQuery("SELECT employeeId, employeeName, employeeCNIC,
employeeDesigntion, claimPayment, claimDescription, claimType, claimDate, treatmentType, claimStatus,
imbursementAmount, claimId from viewClaimsList WHERE(claimStatus = 'Pending')").ToList();
return result.ToList();
}
private void EmployeeList_Load(object sender, EventArgs e)
{
this.ControlBox = false;
this.viewClaimsListTableAdapter.Fill(this.mBMSDataSetClaimList.viewClaimsList);
radGridView2.TableElement.RowHeight = 35;
}

private void btnRefresh_Click(object sender, EventArgs e)


{
radGridView2.DataSource = getClaimList();
}

private void radGridView1_CommandCellClick(object sender, Telerik.WinControls.UI.GridViewCellEventArgs


e)
{

private void radGridView2_CommandCellClick(object sender, GridViewCellEventArgs e)


{
if (e.ColumnIndex == 12)
{
int claimID = Convert.ToInt32(radGridView2.SelectedRows[0].Cells[11].Value.ToString());
FormProcessClaim obj = new FormProcessClaim(claimID);
obj.Show();
}
}
}
}

FormProcessClaim.cs

203 | P a g e
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;

namespace MBMS
{
public partial class FormProcessClaim : MetroFramework.Forms.MetroForm
{
int _claimID;
public FormProcessClaim(int claimID)
{
InitializeComponent();
_claimID = claimID;
}

private void chkApproved_CheckedChanged(object sender, EventArgs e)


{
label1.Visible = true;
txtImbAmount.Visible = true;
label14.Visible = true;
cmbBillType.Visible = true;
if (rdbApproved.Checked!=true)
{
label1.Visible = false;
txtImbAmount.Visible = false;
label14.Visible = false;
cmbBillType.Visible = false;
}

}
MBMSEntities dc = new MBMSEntities();
private void FormProcessClaim_Load(object sender, EventArgs e)
{

var display = (from u in dc.tblMedicalClaims where u.claimId == _claimID select u).SingleOrDefault();


txtEmployeeId.Text = display.employeeId;
cmbBillType.SelectedItem = display.claimType;
txtImbAmount.Text = Convert.ToString( display.claimPayment);

private void btnSubmit_Click(object sender, EventArgs e)


{
tblMedicalClaim obj = new tblMedicalClaim();
try
{
var result = (from u in dc.tblMedicalClaims where u.claimId == _claimID select u).SingleOrDefault();
if (result != null)
{
if (rdbApproved.Checked)
{
result.claimStatus = "Approved";
result.imbursementAmount = Convert.ToInt32(txtImbAmount.Text);

204 | P a g e
result.claimType = cmbBillType.SelectedItem.ToString();

}
else if (rdbNotApproved.Checked)
{
result.claimStatus = "Not Approved";
result.notApprovedReason = txtReason.Text;
}
var result1 = (from u in dc.tblMedicalQuotas where u.employeeId == result.employeeId select
u).FirstOrDefault();
if (result1 != null)
{
if (cmbBillType.SelectedItem == "OPD")
{
result1.OPD = result1.OPD - Convert.ToInt32(txtImbAmount.Text);
}
else if (cmbBillType.SelectedItem == "IPD")
{
result1.IPD = result1.IPD - Convert.ToInt32(txtImbAmount.Text);
}
}

if (dc.SaveChanges() > 0)
{

lblErrorMessage11.Visible = true;
lblErrorMessage11.ForeColor = Color.Green;
lblErrorMessage11.Text = "Amount is submitted successfully";
this.Close();
}
}
}
catch (Exception)
{

throw;
}
}

private void rdbNotApproved_CheckedChanged(object sender, EventArgs e)


{
label2.Visible = true;
txtReason.Visible = true;
if (rdbNotApproved.Checked != true)
{
label2.Visible = false;
txtReason.Visible = false;
}
}

private void txtImbAmount_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsDigit(ch) && (ch != 8) && (ch != 46) && (ch != 188))
{
e.Handled = true;
lblErrorMessage11.Visible = true;
lblErrorMessage11.ForeColor = Color.Red;
lblErrorMessage11.Text = "Please enter number(s) only";
}

205 | P a g e
else
{
lblErrorMessage11.Visible = false;
}
}
}
}

FormSearchBill.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Telerik.WinControls.UI;
using DAL;
using System.IO;

namespace MBMS
{
public partial class FormSearchBill : MetroFramework.Forms.MetroForm
{
string _UserID;
public FormSearchBill(string UserId)
{
InitializeComponent();
_UserID = UserId;
}

private void FormSearchBill_Load(object sender, EventArgs e)


{
this.viewBillingTableAdapter1.Fill(this.mBMSDataSet_SearchBilling.viewBilling);
radGridView1.TableElement.RowHeight = 30;
GridViewSummaryItem Total = new GridViewSummaryItem("medicalExpenses", "Total:{0}",
GridAggregateFunction.Sum);
GridViewSummaryRowItem rowItem = new GridViewSummaryRowItem(new GridViewSummaryItem[]
{ Total });
radGridView1.SummaryRowsBottom.Add(rowItem);
this.ControlBox = false;
}

private void btnPrint_Click(object sender, EventArgs e)


{
MBMSEntities dc = new MBMSEntities();
var UserID = (from u in dc.tblUserLogins where u.userID == _UserID select u).SingleOrDefault();
RadPrintDocument document = new RadPrintDocument();
document.HeaderHeight = 30;
document.HeaderFont = new Font("Arial", 15);

document.MiddleHeader = "Federal Urdu University Of Arts Science & Technology, Islamabad";


document.ReverseHeaderOnEvenPages = true;

string filename = getLogoPath();

document.Watermark.ImagePath = filename;

206 | P a g e
document.Watermark.ImageHOffset = 325;
document.Watermark.ImageVOffset = 360;
document.Watermark.ImageOpacity = 50;
document.FooterFont = new Font("Arial", 12);
document.RightFooter = UserID.userName;
document.LeftFooter = "Printed on [Date Printed] [Time Printed].";

document.ReverseFooterOnEvenPages = true;
document.AssociatedObject = this.radGridView1;
RadPrintPreviewDialog dialog = new RadPrintPreviewDialog(document);
dialog.ShowDialog();
}
public string getLogoPath()
{
string fileName = "";
var parent = Directory.GetParent(Directory.GetCurrentDirectory()).Parent;
if (parent != null)
{
var directoryInfo = parent.Parent;
string startDirectory = null;
if (directoryInfo != null)
{
startDirectory = directoryInfo.FullName;
}
if (startDirectory != null)
{
String[] subdirs = Directory.GetDirectories(startDirectory);
foreach (var item in subdirs)
{
if (item.Contains("Icons"))
{
fileName = item + "/Logo.PNG";
}
}

}
}
return fileName;
}
}
}

FormSecurityQuestions.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;

namespace MBMS
{
public partial class FormSecurityQuestions : MetroFramework.Forms.MetroForm
{
string ID;
public FormSecurityQuestions(string userID)

207 | P a g e
{
InitializeComponent();
txtUserID.Text = userID;
txtUserID.ReadOnly = true;
ID = userID;
}

private void btnSubmit_Click(object sender, EventArgs e)


{
MBMSEntities dc = new MBMSEntities();
try
{
if (txtQone.ReadOnly!=true && txtQtwo.ReadOnly != true && txtQthree.ReadOnly != true &&
txtQfour.ReadOnly != true)
{
tblSecurityQuestion obj = new tblSecurityQuestion();
obj.userID = txtUserID.Text;
obj.ansOne = txtQone.Text;
obj.ansTwo = txtQtwo.Text;
obj.ansThree = txtQthree.Text;
obj.ansFour = txtQfour.Text;
dc.tblSecurityQuestions.Add(obj);
if (txtQone.Text == "" || txtQtwo.Text == "" || txtQthree.Text == "" || txtQfour.Text == "")
{
lblErrorMessage10.Visible = true;
lblErrorMessage10.ForeColor = Color.Red;
lblErrorMessage10.Text = "Please enter your answers";
}
else if (dc.SaveChanges() > 0)
{
lblErrorMessage10.Visible = true;
lblErrorMessage10.ForeColor = Color.Green;
lblErrorMessage10.Text = "Answeres have been saved";
txtQone.ReadOnly = true;
txtQtwo.ReadOnly = true;
txtQthree.ReadOnly = true;
txtQfour.ReadOnly = true;

}
}
else
{
lblErrorMessage10.Visible = true;
lblErrorMessage10.ForeColor = Color.Green;
lblErrorMessage10.Text = "Answeres are already been saved";
}
}
catch (Exception ex)
{

MessageBox.Show(ex.Message);
}

private void btnCancel_Click(object sender, EventArgs e)


{
this.Close();
}

208 | P a g e
private void FormSecurityQuestions_Load(object sender, EventArgs e)
{

this.ControlBox = false;
MBMSEntities dc = new MBMSEntities();
{
tblSecurityQuestion questions = new tblSecurityQuestion();
try
{

var display = (from u in dc.tblSecurityQuestions


where u.userID == ID
select u).SingleOrDefault();
if(display!=null)
{
txtQone.Text = display.ansOne;
txtQtwo.Text = display.ansTwo;
txtQthree.Text = display.ansThree;
txtQfour.Text = display.ansFour;

}
if (txtQone.Text != "" && txtQtwo.Text != "" && txtQthree.Text != "" && txtQfour.Text != "")
{
txtQone.ReadOnly = true;
txtQtwo.ReadOnly = true;
txtQthree.ReadOnly = true;
txtQfour.ReadOnly = true;
}
}

catch (Exception ex)


{

// throw;
}

private void txtQone_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsLetter(ch) && (ch != 8) && (ch != 46) && (ch != 32))
{
e.Handled = true;
lblErrorMessage10.Visible = true;
lblErrorMessage10.ForeColor = Color.Red;
lblErrorMessage10.Text = "Please enter letter(s) only";
}
else
{
lblErrorMessage10.Visible = false;
}
}

private void txtQthree_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;

209 | P a g e
if (!char.IsLetter(ch) && (ch != 8) && (ch != 46) && (ch != 32))
{
e.Handled = true;
lblErrorMessage10.Visible = true;
lblErrorMessage10.ForeColor = Color.Red;
lblErrorMessage10.Text = "Please enter letter(s) only";
}
else
{
lblErrorMessage10.Visible = false;
}
}

private void txtQfour_KeyPress(object sender, KeyPressEventArgs e)


{
char ch = e.KeyChar;
if (!char.IsLetter(ch) && (ch != 8) && (ch != 46) && (ch != 32))
{
e.Handled = true;
lblErrorMessage10.Visible = true;
lblErrorMessage10.ForeColor = Color.Red;
lblErrorMessage10.Text = "Please enter letter(s) only";
}
else
{
lblErrorMessage10.Visible = false;
}
}

}
}

FormSignature.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;

namespace MBMS
{
public partial class FormSignature : MetroFramework.Forms.MetroForm
{
string fileName;
string _UserID;
public FormSignature( string userId)
{
InitializeComponent();
_UserID = userId;
}
MemoryStream ms;

private void btnAddImage_Click(object sender, EventArgs e)


{

210 | P a g e
using (OpenFileDialog ofd = new OpenFileDialog() { Filter = "JPEG|*.jpg|PNG|*.png", ValidateNames =
true, Multiselect = false })
{
if (ofd.ShowDialog() == DialogResult.OK)
{
pictureBox1.Image = new Bitmap(ofd.FileName);
fileName = ofd.FileName;

pictureBox1.Image = Image.FromFile(fileName);
}
}
}

private void btnAdd_Click(object sender, EventArgs e)


{
MBMSEntities dc = new MBMSEntities();
try
{
if (btnAdd.Text=="Update")
{
var result = (from u in dc.tblSigns where u.userID == _UserID select u).SingleOrDefault();
if (result!=null)
{
result.userID = txtUserID.Text;
result.designation = txtDesignation.Text;
if (pictureBox1!=null)
{
result.sign = fileName;
if (dc.SaveChanges() > 0)
{
MessageBox.Show("Record Updated Successfully");

}
}
else
{
MessageBox.Show("Please Select Signature");
}

}
else if (btnAdd.Text=="Add")
{
tblSign obj = new tblSign();
obj.userID = txtUserID.Text;
obj.designation = txtDesignation.Text;
if (pictureBox1.Image != null)
{
obj.sign = fileName;
dc.tblSigns.Add(obj);
if (dc.SaveChanges() > 0)
{
MessageBox.Show("Record inserted Successfully");
btnAdd.Text = "Update";
}
}
else
{
MessageBox.Show("Please Select Signature");

211 | P a g e
}

}
catch (Exception ex)
{

MessageBox.Show(ex.Message);
}
}

FileStream fs;

private void FormSignature_Load(object sender, EventArgs e)


{
MBMSEntities dc = new MBMSEntities();
var result = (from u in dc.tblUserLogins where u.userID == _UserID select u).SingleOrDefault();
var image1 = (from u in dc.tblSigns where u.userID == _UserID select u.sign).SingleOrDefault();
txtUserID.Text = _UserID;
txtDesignation.Text = result.userType;
txtUserID.ReadOnly = true;
txtDesignation.ReadOnly = true;
if (image1!=null)
{
Image newImage = Image.FromFile(image1);

pictureBox1.Image = newImage;
btnAdd.Text = "Update";
}

}
}

FormSOP’s.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;

namespace MBMS
{
public partial class FormSOPs : MetroFramework.Forms.MetroForm
{

212 | P a g e
public FormSOPs()
{
InitializeComponent();
}

MBMSEntities dc = new MBMSEntities();

private void btnUpdate_Click(object sender, EventArgs e)


{
if (btnUpdate.Text == "Update")
{
var display = (from u in dc.tblSOPs where u.sopDescription != "" select u).SingleOrDefault();
if (display != null)
{

btnUpdate.Text = "Save";
txtSOP.ReadOnly = false;
lblErrorMessage7.Visible = false;
}
}
else if (btnUpdate.Text == "Save")
{
var display = (from u in dc.tblSOPs where u.sopDescription != "" select u).SingleOrDefault();
if (display != null)
{
if (txtSOP.ReadOnly == false)
{
txtSOP.ReadOnly = true;
}
display.sopDescription = txtSOP.Text;
if (dc.SaveChanges() > 0)
{
btnUpdate.Text = "Update";
lblErrorMessage7.Visible = true;
lblErrorMessage7.ForeColor = Color.Green;
lblErrorMessage7.Text = "Data is updated";
}
}
}

private void FormSOPs_Load(object sender, EventArgs e)


{
this.ControlBox = false;
var display = (from u in dc.tblSOPs where u.sopDescription != "" select u).SingleOrDefault();
if (display != null)
{
txtSOP.Text = display.sopDescription;
txtSOP.ReadOnly = true;
}
}

private void btnDisplay_Click(object sender, EventArgs e)


{
sopPrint objSOP = new sopPrint(txtSOP.Text);
objSOP.Show();
}
MemoryStream ms;
private void btnAttach_Click(object sender, EventArgs e)
{
OpenFileDialog ofd = new OpenFileDialog() { Filter = "PDF|*.pdf"

213 | P a g e
if (ofd.ShowDialog() == DialogResult.OK)
{

FileStream fs = File.OpenRead(ofd.FileName);
var assemblyPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
var assemblyParentPath = Path.GetDirectoryName(assemblyPath);
var imageDir = Path.Combine(assemblyParentPath, "Image");

if (!Directory.Exists(imageDir))
Directory.CreateDirectory(imageDir);

System.IO.File.Copy(ofd.FileName, imageDir + "\\" + Path.GetFileName("SOPs.pdf"),true);

}
}

private void btnOpenSOP_Click(object sender, EventArgs e)


{

var assemblyPath = System.Reflection.Assembly.GetExecutingAssembly().Location;


var assemblyParentPath = Path.GetDirectoryName(assemblyPath);
var imageDir = Path.Combine(assemblyParentPath, "Image");

if (System.IO.File.Exists(imageDir + "\\" + Path.GetFileName("SOPs.pdf")))


{
ProcessStartInfo startInfo = new ProcessStartInfo(imageDir + "\\" + Path.GetFileName("SOPs.pdf"));
Process.Start(startInfo);
}
else
{
MessageBox.Show("There is no file saved, Please save SOP's First");
}

}
}
}

FormViewApplication.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
using System.Data.SqlClient;

namespace MBMS
{
public partial class FormViewApplication : MetroFramework.Forms.MetroForm
{

214 | P a g e
string _userID;
public FormViewApplication(string userID)
{
InitializeComponent();
_userID = userID;
}
MBMSEntities dc = new MBMSEntities();
private void FormApplicationStatus_Load(object sender, EventArgs e)
{
radGridView2.TableElement.RowHeight = 30;
this.tblMedicalRequestIssueTableAdapter2.Fill(this.mBMSViewApplication.tblMedicalRequestIssue);

}
int? OPDUsage;
int? IPDUsage;
int? OPDRemaining;
int? IPDRemaining;

private void radGridView2_CommandCellClick(object sender, Telerik.WinControls.UI.GridViewCellEventArgs


e)
{
MBMSEntities dc = new MBMSEntities();

if (e.ColumnIndex == 7)
{

string empID = radGridView2.SelectedRows[0].Cells[1].Value.ToString();


string treatmentType = radGridView2.SelectedRows[0].Cells[4].Value.ToString();
string Signature = radGridView2.SelectedRows[0].Cells[8].Value.ToString();
int Transaction= Convert.ToInt32(radGridView2.SelectedRows[0].Cells[3].Value.ToString());
int hospID= Convert.ToInt32(radGridView2.SelectedRows[0].Cells[5].Value.ToString());
var hosName = (from u in dc.tblHospitals where u.hospitalId==hospID select
u.hospitalName).SingleOrDefault();
var display1 = (from u in dc.tblMedicalQuotas where u.employeeId == empID select u).SingleOrDefault();
if (display1 != null)
{
OPDRemaining = display1.OPD;
IPDRemaining = display1.IPD;
OPDUsage = 70000 - display1.OPD;
IPDUsage = 400000 - display1.IPD;
}
FormGenerateApplication objAppGenerate = new FormGenerateApplication(empID, hosName,
Transaction, treatmentType, OPDUsage, OPDRemaining, IPDUsage, IPDRemaining,_userID,Signature);
objAppGenerate.Show();
}
}
}
}

FrmLogin.cs
using DAL;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;

215 | P a g e
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Threading;

namespace MBMS
{
public partial class FrmLogin : Form
{
public FrmLogin()
{
InitializeComponent();
}

private void label2_Click(object sender, EventArgs e)


{
WindowState = FormWindowState.Minimized;
}
private void label1_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnLogin_Click(object sender, EventArgs e)
{

MBMSEntities dc = new MBMSEntities();

try
{
var result = (from u in dc.tblUserLogins
where u.userID == txtUserName.Text && u.userPassword == txtPassword.Text
select u).SingleOrDefault();
if (result != null)
{

if (result.userType == "Admin")
{
FormHome obj = new FormHome(result.userID);
obj.OpenChildForm(new FormEmployeeList(result.userID));

obj.Show();
this.Hide();
obj.WindowState = FormWindowState.Maximized;
}
else if (result.userType == "Assistant Registrar")
{
FormHomeAdditionalRegistrar objAssistant = new FormHomeAdditionalRegistrar(result.userID);
objAssistant.Show();
this.Hide();
objAssistant.WindowState = FormWindowState.Maximized;
}
else if (result.userType == "Additional Registrar")
{
FormHomeAdditionalRegistrar objAdditional = new FormHomeAdditionalRegistrar(result.userID);
objAdditional.Show();
this.Hide();
objAdditional.WindowState = FormWindowState.Maximized;
}
else if (result.userType == "Deputy Registrar")
{
FormHomeAdditionalRegistrar objAdditional = new FormHomeAdditionalRegistrar(result.userID);
objAdditional.Show();

216 | P a g e
this.Hide();
objAdditional.WindowState = FormWindowState.Maximized;
}
else
{
FormHomeAssistant obj = new FormHomeAssistant(result.userID);
obj.Show();
this.Hide();
obj.WindowState = FormWindowState.Maximized;
}
}
else
{

var check = (from u in dc.tblUserLogins where u.userID == txtUserName.Text select


u).SingleOrDefault();

if (txtUserName.Text == "")
{
lblError.Text = "Please enter your username";
lblError.Visible = true;
}
else if (check == null)
{
lblError.Text = "Invalid username";
lblError.Visible = true;
}
else if (txtPassword.Text == "")
{
lblError.Text = "Please enter your password";
lblError.Visible = true;
}
else if (txtPassword.Text != check.userPassword)
{
lblError.Text = "Invalid Password";
lblError.Visible = true;
}
else
{
lblError.Text = "Invalid username or password";
lblError.Visible = true;
}
}
}

catch (Exception ex)


{
lblError.Text = ex.Message;
lblError.Visible = true;
}
}

private void linkForget_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)


{
FormForgotPassword objForget = new FormForgotPassword();
objForget.Show();
}

private void btnCancel_Click(object sender, EventArgs e)


{

217 | P a g e
Application.Exit();
}

private void txtUserName_TextChanged(object sender, EventArgs e)


{
lblError.Visible = false;
}

private void txtPassword_TextChanged(object sender, EventArgs e)


{
lblError.Visible = false;
}
}
}

ImbursementForm.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using DAL;

namespace MBMS
{
public partial class imbursementForm : Form
{
int claimID = -1;
string _empID = "";
string _treatmentType;
string _ExpenseWord;
public imbursementForm(int ClaimID, string empID ,string TreatmentType, string ExpenseWord)
{
InitializeComponent();
claimID = ClaimID;
_empID = empID;
_treatmentType = TreatmentType;
_ExpenseWord = ExpenseWord;
}

private void imbursementForm_Load(object sender, EventArgs e)


{
SqlConnection con = new SqlConnection("Data Source=DESKTOP-T542DJ9;Initial
Catalog=MBMS;Integrated Security=True");
SqlDataAdapter da = new SqlDataAdapter("Select employeeId, dependentId, dependentName,
dependentCNIC, dependentDOB, dependentRelation, claimDate as [dateTime],'' as TransactionID, dependentPicture,
Picture from viewMedicalClaims as viewMedicalRequests where ClaimID=" + claimID + " union all SELECT
tblEmployee.employeeId, -1 as dependentId,tblEmployee.employeeName dependentName,
tblEmployee.employeeCNIC dependentCNIC, tblEmployee.employeeDOB dependentDOB, 'Self' AS
dependentRelation , a.claimDate, '' as TransactionID,tblEmployee.Picture dependentPicture, dbo.tblEmployee.Picture
FROM dbo.tblMedicalClaim AS a INNER JOIN dbo.tblEmployee ON a.employeeId =
dbo.tblEmployee.employeeId inner join tblDependentClaim b on a.claimId=b.claimId and b.dependentId=-1 and
a.claimId= " + claimID + " ", con);
if (con.State == ConnectionState.Closed)
{
con.Open();

218 | P a g e
}

DataSet ds = new DataSet();


da.Fill(ds);
MBMSEntities dc = new MBMSEntities();
try
{

var display = (from v in dc.tblEmployees


where v.employeeId == _empID
select v).SingleOrDefault();
if (display != null)
{
DataView dv = new DataView();
dv.Table = ds.Tables[0];

MBMS.CrystalReportClaim rpt = new MBMS.CrystalReportClaim();


rpt.SetDataSource(dv);

rpt.SetParameterValue("Employee ID", display.employeeId);


rpt.SetParameterValue("Employee Name", display.employeeName);
rpt.SetParameterValue("Employee CNIC", display.employeeCNIC);
rpt.SetParameterValue("FatherName", display.employeeFatherName);
rpt.SetParameterValue("BPS", display.employeeBPS);
rpt.SetParameterValue("Employee Address", display.employeeAddress);
rpt.SetParameterValue("Employee Contact", display.employeeContact);

rpt.SetParameterValue("Designation", display.employeeDesigntion);

string treatmentResult = "";


var display1 = (from u in dc.tblMedicalClaims
where u.claimId == claimID
select u).SingleOrDefault();
if (display1 != null)
{
rpt.SetParameterValue("Hospital Name", display1.hospitalName);
rpt.SetParameterValue("Claim Description", display1.claimDescription);
rpt.SetParameterValue("Claim Payment", display1.claimPayment);
rpt.SetParameterValue("Treatment Type",_treatmentType);
rpt.SetParameterValue("ExpenseWord",_ExpenseWord);

if (display1.treatmentType== "Admission/Treatment")
{
treatmentResult = "Admit on: " + display1.admitOn.Value.ToString("dd/MM/yyyy") +" "+ "
Discharge on: " + display1.dischargeOn.Value.ToString("dd/MM/yyy");
}
else if(display1.treatmentType == "Follow Up")
{
treatmentResult = display1.consultantName;
}
else if (display1.treatmentType == "Lab Test")
{
treatmentResult = display1.labTest;
}
else if (display1.treatmentType == "Check Up Only")
{
treatmentResult = "";
}
rpt.SetParameterValue("Treatment Result", treatmentResult);

219 | P a g e
}

this.crystalReportViewer1.ReportSource = rpt;
crystalReportViewer1.Refresh();
}
}
catch (Exception)
{

throw;
}
}
}
}

SopPrint.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
using System.Data.SqlClient;

namespace MBMS
{
public partial class sopPrint : Form
{
string _Sop;
public sopPrint(string SOP)
{
InitializeComponent();
_Sop = SOP;
}

private void crystalReportViewer1_Load(object sender, EventArgs e)


{

private void sopPrint_Load(object sender, EventArgs e)


{
SqlConnection con = new SqlConnection("Data Source=DESKTOP-T542DJ9;Initial
Catalog=MBMS;Integrated Security=True");
SqlDataAdapter da = new SqlDataAdapter("Select * from tblSOP", con);
if (con.State == ConnectionState.Closed)
{
con.Open();
}

DataSet ds = new DataSet();


da.Fill(ds);
MBMSEntities dc = new MBMSEntities();
try
{

220 | P a g e
var display = (from u in dc.tblSOPs where u.sopDescription != "" select u).SingleOrDefault();

if (display != null)
{
DataView dv = new DataView();
dv.Table = ds.Tables[0];
MBMS.CrystalReportSOP rpt = new MBMS.CrystalReportSOP();
rpt.SetDataSource(dv);

rpt.SetParameterValue("SOP Description", _Sop);

this.crystalReportViewer.ReportSource = rpt;
crystalReportViewer.Refresh();
}
}
catch (Exception)
{

throw;
}

}
}
}

221 | P a g e
Test Cases

MEDICAL BILLING MANAGEMENT SYSTEM

Version 1.1

Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
22nd Aug, 2020

Revision History

222 | P a g e
Version Description Author Date

This cover the Domain Hassnain Rafique


1.0 22nd Aug, 2020
Model of the system Wasaf Ul Hassan

This cover the Domain Hassnain Rafique


1.1 22nd Aug, 2020
Model of the system Wasaf Ul Hassan

223 | P a g e
Test case ID: TC-01
Test Case Name: Process Login
Test Case Wasaf Ul Use Test 8/18/2020
created by: Hassan created on:

Test Case Hassnain Use Test 8/18/2020


Updated By: Rafique Updated On:
Test Case Description: This Test case describes that user can log in into the
system

Primary Actor: <Administrator> <Assistant>


Main success scenario:
User Action System Response
1- User enter id and password

2- System process and verifies and home screen is


shown to the user

3- Step 1-2 repeats if user repeat


the process

Testing Requirement:
Testing Condition: System must be in running state.
User must have valid id and password
Input Data: User id and password
Expected Result: User successfully log into the system.
Actual Result: User successfully logged into the system
Priority: High.
Frequency Most frequent
Test Acceptance: Passed

Test case ID: TC-02


Test Case Name: Change Password

224 | P a g e
Test Case Wasaf Ul Hassan Test Case 8/18/2020
Created By: Created On:
Updated By: Hassnain Rafique Updated On: 8/18/2020

Test Case Description: This Test case describes that user can change the password

Primary Actor: <Administrator><Assistant>


Main success scenario:
User Action System Response
1- User will select Change
Password
2- The System Process and show the Change Password
form to the User.

3- User will enter information


i.e. Password

4- System will verify the information and display


changed password

5- Step 2-4 repeats if user repeat


the process

Testing Requirement:
Testing Condition: System must be in running state.
User must be logged into the system.
User must have change password rights.
User must have change password data

Input Data: User id and password


Expected Result: User password will be successfully changed.

Actual Result: User password is successfully changed

Priority: High
Frequency Less frequent in use
Test Acceptance: Passed

Test case ID: TC-03

225 | P a g e
Test Case Name: Forget Password

Test Case created Wasaf Ul Hassan Test Case 8/18/2020


by: created on:

Test Case Hassnain Rafique Test Case 8/18/2020


Updated By: Updated On:

Test Case Description: This Test case describes that can user get the forgotten
password

Primary Actor: <Administrator><Assistant>

Main success scenario:

User Action System Response


1- User will select forgot password
2 The System Process and show the Forgot Password
- form to the User.

3- User will enter information i.e.


answers of the questions.
4 System will verify the information and show the
password to the user

5- Step 2-4 repeats if user repeat


the process

Testing Requirement:
Testing Condition: System must be in running state.

User must be logged into the system.

User must enter correct answers

Input Data: Answers of the questions

Expected Result: User get the forgotten password

Actual Result: User get the forgotten password

226 | P a g e
Priority: High

Frequency Less frequent

Test Acceptance: Passed

Test case ID: TC-04

Test Case Add User


Name:
Test Case Wasaf Ul Hassan Test Case 8/18/2020
created by: created on:

Test Case Hassnain Rafique Test Case 8/18/2020


Updated By: Updated On:

Test Case Description: This Test case describes that can user add a new user
Primary Actor: <Administrator>

Main success scenario:

User Action System Response


1- User will select Add User
2- The System Process and show the Add User form
to the User.

3- User will enter information.

4- System will verify the information and insert data


into the system
Testing Requirement:
Testing Condition: System must be in running state.
User must be logged into the system.
User must have Add User rights
Input Data: User name, user id and password
Expected Result: Data will be inserted into the system
Actual Result: Data is inserted into the system
Priority: Low

227 | P a g e
Frequency : Less frequent in use
Test Acceptance: Passed

Test case ID: TC-05

Test Case Update User


Name:
Test Case Wasaf Ul Hassan Test Case created 8/18/2020
created by: on:

Test Case Hassnain Rafique Test Case 8/18/2020


Updated By: Updated On:

Test Case Description: This Test case describes that can user update a user

Primary Actor: <Administrator>

Main success scenario:

User Action System Response


1- User will select Update User
2- The System Process and enable user to update.

3- User will enter information.

4- System will verify the information and insert data


into the system
Testing Requirement:
Testing Condition: System must be in running state.
User must be logged into the system.
User must have Update User rights
Input Data: User name, user id and password
Expected Result: Data will be inserted into the system
Actual Result: Data is inserted into the system
Priority: Low
Frequency Less frequent in use
Test Acceptance: Passed

228 | P a g e
Test case ID: TC-06
Test Case Name: Add Department
Test Case Wasaf Ul Hassan Test Case 8/18/2020
created by: created on:

Test Case Hassnain Rafique Test Case 8/18/2020


Updated By: Updated On:
Test Case Description: This Test case describes that can user add departments

Primary Actor: <Administrator><Assistant>


Main success scenario:
User Action System Response
1- User will select Department
2- The System Process and show the Department
form to the user.

3- User will enter information of the


department

4- System will insert all the information into the


system and confirmation message is shown to
the user

5- Step 3-4 repeats if user add more


departments

Testing Requirement:
Testing Condition: System must be in running state.
User must be logged into the system.
User must have add departments rights
Input Data: Department name
Expected Result: Department name will be successfully stored

Actual Result: Department name is successfully stored.


Priority: High
Frequency Less frequent in use
Test Acceptance: Passed

229 | P a g e
Test case ID: TC-07
Test Case Name: Update Department
Test Case created by: Wasaf Ul Hassan Test Case created on: 8/18/2020
Test Case Updated By: Hassnain Rafique Test Case Updated On: 8/18/2020
Test Case Description: This Test case describes that can user update
the departments

Primary Actor: <Administrator>

Main success scenario:


User Action System Response
1 User will update department

2 The System Process and enables the user


to update department

3 User will enter information i.e department


name

4 System will save the information

5 Step 2-4 repeats if user repeat the process


-
Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have update department rights.
Input Data: Department name
Expected Result: Department name will be successfully
registered.
Actual Result: Department name is successfully registered.
Priority: High.
Frequency Less frequent

230 | P a g e
Test Acceptance: Passed

Test case ID: TC-08


Test Case Name: View All Department
Test Case created Wasaf Ul Hassan Test Case created 8/18/2020
by: on:
Test Case Updated Hassnain Rafique Test Case 8/18/2020
By: Updated On:
Test Case Description: This Test case describes that can a user view all
the departments

Primary Actor: <Administrator> <Assistant>

Main success scenario:


User Action System Response
1 User selects the department tab
-
2- System will show the department names

Testing Requirement
Testing Condition: System must be in running state.
User must have login account
Input Data:
Expected Result: User will successfully view the departments
Actual Result: User successfully viewed the departments

Priority: High.
Frequency High frequent
Test Acceptance: Passed

Test case ID: TC-09


Test Case Name: Add Hospital
Test Case Wasaf Ul Hassan Test Case 8/18/2020
created by: created on:

231 | P a g e
Test Case Hassnain Rafique Test Case 8/18/2020
Updated By: Updated On:
Test Case Description: This Test case describes that can user add a new hospital

Primary Actor: <Administrator> <Assistant>

Main success scenario:


User Action System Response
1- User will select department
2- The System will show the form of hospital to the
user

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
Input Data: Hospital name, hospital address
Expected Result: User will successfully enter information of the hospital
into the system

Actual Result: User successfully enters the information of the hospital


into the system
Priority: High
Frequency Less frequent in use
Test Acceptance: Passed

Test case ID: TC-10


Test Case Name: Update Hospital
Test Case created by: Wasaf Ul Test Case created on: 8/19/2020
Hassan

Test Case Updated By: Hassnain Rafique Test Case Updated On: 8/19/2020

Test Case Description: This Test case describes that can user update the
department

Primary Actor: <Administrator>


Main success scenario:

232 | P a g e
User Action System Response
1 User Selects update department.
-
2 System will enable the user to update
department
3 User will enter the
- Information i.e hospital name and
hospital address.
4 System will insert all the information to the
system and confirmation message will be
shown.

5 Step 2-4 repeats if user repeat the


- process

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have update rights.
User must have data of the department
Input Data: Hospital name and hospital address
Expected Result: User will successfully update the hospital
information into the system.

Actual Result: User successfully updated the hospital information


into the system

Priority: High.
Frequency Less frequent
Test Acceptance: Passed

Test case ID: TC-11


Test Case Name: View Hospital
Test Case created by: Wasaf Ul Hassan Test Case created on: 8/18/2020

Test Case Updated By: Hassnain Rafique Test Case Updated On: 8/18/2020

Test Case Description: This Test case describes that can a user view
hospital

Primary Actor: <Administrator> <Assistant>

233 | P a g e
Main success scenario:
User Action System Response
1- User selects the hospital tab

2- System will show the hospital


information
Testing Requirement
Testing Condition: System must be in running state.
User must have login account
Input Data:
Expected Result: User will successfully view the information of
the hospitals
Actual Result: User successfully viewed the hospitals

Priority: High.
Frequency High frequent
Test Acceptance: Passed
Test case ID: TC-12
Test Case Name: Add Employee
Test Case created by: Wasaf Ul Hassan Test Case created on: 8/19/2020

Test Case Updated By: Hassnain Rafique Test Case Updated On: 8/19/2020

Test Case Description: This Test case describes that can user add
employees’ information

Primary Actor: <Administrator> <Assistant>

Main success scenario:


User Action System Response
1 User select employee tab
-
2 System process and employee
- information form is shown to the user

3 User will enter all the necessary


- information of the employee

234 | P a g e
4- System will process and insert all the
information into the system and
confirmation message will be shown.

5- Step 2-4 repeats if user repeat the


process

Testing Requirement:
Testing Condition: System must be in running state.
User must be logged into the system.
User must have Add Employee rights
User must have data of the employee
Input Data: Employee id, name, cnic, e.t.c.
Expected Result: User successfully add employees’ information.

Actual Result: User successfully add employees’ information.

Priority: High.
Frequency Most frequent
Test Acceptance: Passed

Test case ID: TC-13


Test Case Name: Search Employee
Test Case created by: Wasaf Ul Hassan Test Case created on: 8/19/2020

Test Case Updated By: Hassnain Rafique Test Case Updated On: 8/19/2020

Test Case Description: This Test case describes that can user Search a
employee Information from the System.

Primary Actor: <Administrator> <Assistant>

Main success scenario:


User Action System Response
1- User will select employee

2- The System Process and show the


Employee form to the User.
3- User will enter information to be
searched.

235 | P a g e
4- System will verify the information and
show the employees’ information to the
user.

5- Step 2-4 repeats if user repeat the


process

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have search rights
User must have search criteria data of the
Employee.

Input Data: Employee id, name, cnic e.t.c.


Expected Result: Employee information will be successfully
displayed

Actual Result: Employee information is successfully displayed

Priority: High
Frequency Most frequent in use
Test Acceptance: Passed

Test case ID: TC-14


Test Case Name: Update Employee
Test Case Wasaf Ul Hassan Test Case created on: 8/19/2020
created by:

Test Case Hassnain Rafique Test Case Updated On: 8/19/2020


Updated By:
Test Case Description: This Test case describes that can user update the
information of the employee

Primary Actor: <Administrator>


Main success scenario:
User Action System Response
1 User Selects view button.

236 | P a g e
-
2 System will enable the user to update information of
- the employee

3 User will enter the


- Information to be updated i.e
employee name, cnic, etc
4 System will insert all the information to the system
- and confirmation message will be shown.

5 Step 2-4 repeats if user repeat


- the process

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have update rights.
User must have data of the employee
Input Data: Employee name, cnic e.t.c
Expected Result: User will successfully update the employee information
into the system.

Actual Result: User successfully updated the employee information into


the system

Priority: High.
Frequency Most frequent
Test Acceptance: Passed

Test case ID: TC-15


Test Case Name: Add Employee Dependent
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:

Test Case Hassnain Rafique Test Case 8/19/2020


Updated By: Updated On:
Test Case Description: This Test case describes that can user add employee
dependents

237 | P a g e
Primary Actor: <Administrator><Assistant>

Main success scenario:


User Action System Response
1- User will select employee
dependent

2- The System Process and show the employee


dependent form to the User.

3- User will enter information i.e


employee name, relation e.t.c

4- System will verify the information and save the


record into the system and a confirmation message
will be shown

5- Step 2-4 repeats if user repeat


the process

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have data of the employee dependent to be
added into the system

Input Data: Employee dependent name, relation e.t.c


Expected Result: Employee dependent information will be successfully
saved

Actual Result: Employee dependent information is successfully stored

Priority: High
Frequency Most frequent in use
Test Acceptance: Passed

Test case ID: TC-16


Test Case Name: Search Employee Dependent
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:

238 | P a g e
Test Case Hassnain Rafique Test Case 8/19/2020
Updated By: Updated On:
Test Case Description: This Test case describes that can user Search employee
dependent information from the System.

Primary Actor: <Administrator> <Assistant>


Main success scenario:
User Action System Response
1- User will select employee
dependent

2- The System Process and show the


Employee dependent form to the User.
3- User will enter information to
be searched.

4- System will verify the information and show the


employees’ dependent information to the user.

5- Step 2-4 repeats if user repeat


the process

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have search rights
User must have search criteria data of the Employee
dependent.

Input Data: Employee dependent name, cnic e.t.c.


Expected Result: Employee dependent information will be successfully
displayed

Actual Result: Employee dependent information is successfully


displayed

Priority: High
Frequency Most frequent in use
Test Acceptance: Passed

239 | P a g e
Test case ID: TC-17
Test Case Name: Update Employee Dependent
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:

Test Case Hassnain Rafique Test Case 8/19/2020


Updated By: Updated On:
Test Case Description: This Test case describes that can user
Update the employee dependent information

Primary Actor: <Administrator> <Assistant>

Main success scenario:


User Action System Response
1- User will select employee
dependent tab
2- The System Process and show the employee
dependent form to the User.

3- User will enter information i.e.


employee dependent name, cnic,
etc.

4- System will verify the information and save the


record into the system

5- Step 2-4 repeats if user repeat


the process

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have valid data
Input Data: Employee dependent name, cnic
Expected Result: Employee dependent information will successfully
updated

Actual Result: Employee dependent information is successfully updated

240 | P a g e
Priority: High
Frequency Less frequent in use
Test Acceptance: Passed

Test case ID: TC-18


Test Case Name: Add Quota
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:

Test Case Hassnain Rafique Test Case 8/19/2020


Updated By: Updated On:
Test Case Description: This use case describes that can user add quota of the
employee

Primary Actor: <Administrator>

Main success scenario:

User Action System Response


1- User will select employee tab
2- The System Process and show the employee form to
the user

3- User will check medical quota


4- System will enable the user to change quota of the
employee

5- Step 2-4 repeats if user repeat


the process

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have add quota rights
User must have search criteria data of the all Hotel.

Input Data: OPD/IPD

241 | P a g e
Expected Result: Quota information will be successfully changed
Actual Result: Quota information is successfully changed
Priority: Low
Frequency Less frequent in use
Test Acceptance: Passed

Test case ID: TC-19


Test Case Name: Search Quota
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:

Test Case Hassnain Rafique Test Case 8/19/2020


Updated By: Updated On:
Test Case Description: This Test case describes that can user search quota of the
employee

Primary Actor: <Administrator>


Main success scenario:
User Action System Response
1- User Selects view tab from
employee list
2- System shows form to the user with employee
information and quota

5- Step 1-2 repeats if user repeat the


process

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have search rights.
Input Data:
Expected Result: User will successfully search quota
Actual Result: Search quota is successfully done by the user
Priority: Low
Frequency Less frequent
Test Acceptance: Passed

242 | P a g e
Test case ID: TC-20
Test Case Name: Update
Quota
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:

Test Case Hassnain Rafique Test Case 8/19/2020


Updated By: Updated On:
Test Case Description: This use case describes that can user update the quota

Primary Actor: <Administrator>


Main success scenario:
User Action System Response
1- User Selects view tab from
employee list

2- System shows form to the user with employee


information and quota

3- User will update the quota


information.

4- System will process and update the new information


to system and confirmation message will be shown.

5- Step 2-4 repeats if user repeat


the process

Testing Requirement:
Testing Condition: System must be in running state.
User must be logged into the system.
User must have update rights
User must have data of the quota
Input Data: OPD/IPD
Expected Result: User successfully update quota information.

Actual Result: User successfully updated quota information.


Priority: Low

243 | P a g e
Frequency Less frequent
Test Acceptance: Passed

Test case ID: TC-21


Test Case Name: View Quota
Test Case Wasaf Ul Test Case 8/19/2020
created by: Hassan created on:

Test Case Hassnain Test Case 8/19/2020


Updated By: Rafique Updated On:
Test Case Description: This Test case describes that can user
View the medical quota

Primary Actor: <Administrator> <Assistant>

Main success scenario:


User Action System Response
1- User will select view tab
from employee list

2- The System Process and show the employee


information with medical quota to the User.

3- Step 1-2 repeats if user


repeat the process

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have search criteria data of
Medical quota
Input Data:
Expected Result: Medical quota information will be successfully displayed

Actual Result: Medical quota information is successfully displayed


Priority: Low

244 | P a g e
Frequency Less frequent in use
Test Acceptance: Passed

Test case ID: TC-22


Test Case Name: Generate Medication Letter
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:

Test Case Hassnain Rafique Test Case 8/19/2020


Updated By: Updated
On:
Test Case Description: This Test case describes that can user generate
medication letter from the system

Primary Actor: <Administrator> <Assistant>


Main success scenario:
User Action System Response
1- User will search for the employee
whose medication letter is to be
generated
2 System process and employee information is
shown to the user

3- User will select the performa tab

4 System will process and show the application


letter of the employee to the user

5- User will select the information


required for the medication letter

6 System will process and add selected information


- into the predefined application format and
generate application
7- Step 1-6 repeats if user repeats the
process

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
Input Data: Treatment type, patient information

245 | P a g e
Expected Result: Application will be successfully generated

Actual Result: Application is successfully generated

Priority: High
Frequency Most frequent in use
Test Acceptance: Passed

Test case ID: TC-23


Test Case Name: Add & Generate Medical Claim
Test Case Wasaf Ul Hassan Test Case created on: 8/19/2020
created by:

Test Case Hassnain Rafique Test Case Updated On: 8/19/2020


Updated By:
Test Case Description: This Test case describes that can user generate
medical claim application from the system

Primary Actor: <Administrator>


Main success scenario:

User Action System Response


1- User will search for the employee
whose medical claim application is to
be generated
2 System process and employee information is
- shown to the user

3- User will select the re-imbursement tab


from the employee list form

4 System will process and re-imbursement


- information form show to the user

5- User will enter the information that is


required to generate the application

6- System will process and add information into


the predefined application format and
generate application
246 | P a g e
7- Step1-6 repeats if user repeats the
process

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have employee information

Input Data: Treatment type, hospital name, medical expenses


Expected Result: Application generation will be successfully done

Actual Result: Application generation is successfully done

Priority: High
Frequency Most frequent in use
Test Acceptance: Passed

Test case ID: TC-24


Test Case Name: Search Medical
Claim
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:

Test Case Hassnain Rafique Test Case 8/19/2020


Updated By: Updated On:

Test Case Description: This Test case describes that can user search medical claim
of the employee

Primary Actor: <Administrator>


Main success scenario:
User Action System Response
1- User selects claim search tab
from the menu
2- System processes and display the all medical claim
information to the user

247 | P a g e
3- User will search for the
desired employee

4- System will process and medical claim information


show to the user

5- Step 2-4 repeats if user repeat


the process

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have search rights.
User must have search criteria
Input Data: Employee name, medical expenses

Expected Result: Searched information will successfully be shown to the user

Actual Result: Searched information is shown to the user


Priority: High.
Frequency Most frequent in use
Test Acceptance: Passed

Test case ID: TC-25


Test Case Name: Monitor Status
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:

Test Case Hassnain Rafique Test Case 8/19/2020


Updated By: Updated On:
Test Case Description: This Test case describes that can user monitor the status
of the employee

Primary Actor: <Administrator>

Main success scenario:


User Action System Response
1- User selects imbursement status

248 | P a g e
tab from the menu
2- System processes and employee medical claim
information is shown to the user

3- System will display all the pending employee


medical claim information to the user

3- User selects view tab whose


claim process is completed from
the committee
4- System will process and process claim form show
to the user

5- User will select either approved


or disapproved

6- If employee medical claim is approved then


system automatically deduct amount from
employees’ medical quota and if it is not approved
then user save status by giving reason
7- Step 1-5 repeats if user repeats
the process

Testing Requirement:
Testing Condition: System must be in running state.
User must be logged into the system.
User must have update status rights
Employee claim process must be completed
Input Data: Imbursement amount, claim type, reasons
Expected Result: User successfully update Medical claim status

Actual Result: User successfully updated Medical claim status

Priority: High.
Frequency Most frequent in use
Test Acceptance: Passed

Test case ID: TC-26


Test Case Name: View Medical Claim
Test Case Wasaf Ul Test Case 8/19/2020
created by: Hassan created on:

249 | P a g e
Test Case Hassnain Test Case 8/19/2020
Updated By: Rafique Updated On:
Test Case Description: This Test case describes that can user
View medical claim

Primary Actor: <Administrator>

Main success scenario:


User Action System Response
1- User will select the
imbursement status
2- System processes and employee medical claim
information is shown to the user

3- Steps 1-2 repeats if user


repeats the process .

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have view rights
Input Data:
Expected Result: Information will be successfully displayed
Actual Result: Information is successfully displayed
Priority: High
Frequency Less frequent in use
Test Acceptance: Passed

Test case ID: TC-27


Test Case Name: Add Bill
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:

Test Case Hassnain Rafique Test Case 8/19/2020


Updated By: Updated On:
Test Case Description: This Test case describes that can user
Add bill of the employee into the system

250 | P a g e
Primary Actor: <Administrator>

Main success scenario:


User Action System Response
1- User will select bill tab from
the menu

2- The System Process and show the add bill


information of the employee to the user

3- User will enter information i.e


employee name, billing month,
hospital name, bill type
4- System will verify the information and save the
record into the system

5- Step 2-4 repeats if user repeat


the process

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have add rights
Input Data: Employee name, billing month, bill type
Expected Result: Bill information will be successfully added into the
system

Actual Result: Bill information is successfully Added into the system

Priority: High
Frequency Most frequent in use

Test case ID: TC-28


Test Case Name: Search Bill
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:

Test Case Hassnain Rafique Test Case 8/19/2020


Updated By: Updated On:

251 | P a g e
Test Case Description: This Test case describes that can user search bill of the
employee from the system

Primary Actor: <Administrator><Assistant>


Main success scenario:
User Action System Response
1- User Selects view bill tab from
the menue
2- System will show the bill form to the user and
user see the all information of the employee

3- Step 1-2 repeats if user repeat


the process

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
Input Data:
Expected Result: User will successfully view the information of the
employee

Actual Result: Information of the employee is viewed by the user .


Priority: High.
Frequency Less frequent
Test Acceptance: Passed

Test case ID: TC-29


Test Case Name: Generate Report
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:

Test Case Hassnain Rafique Test Case 8/19/2020


Updated By: Updated On:
Test Case Description: This Test case describes that can user generate report of
the bill of the employee

Primary Actor: <Administrator>


Main success scenario:

252 | P a g e
User Action System Response
1- User will select the bill tab from
the menu

2- System process and Bill information is shown to


user.

3- User will enter information of


the employee

4- System will process and generate report of the


employees’ bill

5- Step 2-4 repeats if user repeat the


process

Testing Requirement:
Testing Condition: System must be in running state.
User must be logged into the system.
User must have generate reports rights
User must have valid data
Input Data: Billing month, medical expenses,
Expected Result: User will successfully generate report

Actual Result: Report generation is successfully done

Priority: High.
Frequency Most frequent in use
Test Acceptance: Passed

Test case ID: TC-30


Test Case Name: Add or attach SOP
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:

Test Case Hassnain Rafique Test Case 8/19/2020


Updated By: Updated On:
Test Case Description: This Test case describes that can user
Add or attach SOPs from the system

253 | P a g e
Primary Actor: <Administrator>

Main success scenario:


User Action System Response
1- User will select SOP tab from
the menu
2- The System Process and show the SOP form to the
User.

3- User will enter or attach SOPs


4- System will verify the information and save the
record into the system.

5- Step 2-4 repeats if user repeat


the process

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have Add rights
Input Data: SOPs
Expected Result: SOPs will successfully be added into the system

Actual Result: SOPs is successfully added into the system


Priority: High
Frequency Less frequent in use
Test Acceptance: Passed

Test case ID: TC-31


Test Case Name: Update SOP
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:

Test Case Hassnain Rafique Test Case 8/19/2020


Updated By: Updated On:

254 | P a g e
Test Case Description: This Test case describes that can user
Update SOPs for the employees

Primary Actor: <Administrator>


Main success scenario:
User Action System Response
1- User will select SOPs from the
menu

2- The System Process and show the SOPs to the


User.

3- User will click on Update button

4- System will enable the user to update SOPs


5- Step 2-4 repeats if user repeat the
process

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have Update rights
Input Data: SOPs
Expected Result: SOPs will successfully be updated by the user of the
system

Actual Result: SOPs are successfully updated by the user of the system

Priority: High
Frequency Less frequent in use

Test case ID: TC-32


Test Case Name: Print SOPs
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:

255 | P a g e
Test Case Hassnain Rafique Test Case 8/19/2020
Updated By: Updated On:
Test Case Description: This Test case describes that can user print SOPs

Primary Actor: <Administrator>


Main success scenario:
User Action System Response
1- User Selects SOPs tab from the
menu.
2- System will show the SOPs to the user

3- User will click on print button

4- System will process and print SOPs

5- Step 2-4 repeats if user repeat the


process
Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
Input Data:

Expected Result: User will successfully print the SOPs

Actual Result: SOPs are successfully printed by the user

Priority: High.
Frequency Less frequent
Test Acceptance: Passed

Test case ID: TC-33


Test Case Name: Application Status

Test Case Wasaf Ul Hassan Test Case 9/11/2020


created by: created on:

Test Case Hassnain Rafique Test Case 9/11/2020


Updated By: Updated On:

256 | P a g e
Test Case Description: This Test case describes that can user
Check status of the application

Primary Actor: <Administrator><Assistant><AdditionalRegistrar>


<AssistantRegistrar><DeputyRegistrar>

Main success scenario:


User Action System Response
1- User will select application
status tab from the menu
2- The System Process and show the application
request (if any) to the user

3- User clicks on view button


4- System will show the crystal report to the user

5- User can either approve or


disapprove the application

6- Signature of the user will be added automatically


the application and system saves the application

7- Steps 1-6 repeats if user repeats


action

Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have Add rights
Input Data: SOPs
Expected Result: SOPs will successfully be added into the system

Actual Result: SOPs is successfully added into the system


Priority: High
Frequency Less frequent in use
Test Acceptance: Passed

257 | P a g e
4. CHAPTER
TRANSITION

258 | P a g e
User Guide

MEDICAL BILLING MANAGEMENT SYSTEM

Version 1.0

Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan

259 | P a g e
12nd Sep, 2020

Revision History

Version Description Author Date

This cover the User Guide Hassnain Rafique


1.0 12nd Sep, 2020
for the system Wasaf Ul Hassan

260 | P a g e
Login:

Login Screen of Screen

Forgot Password:

Forgot Password:Where you can answer correctly of specific question and recover password

AdminHomePage:

261 | P a g e
Admin Home Screen:This screen is most frequently used. In grid, VIEW button is to update
employee and dependent information. PERFORMA button is to view Medical Application where,
after selecting specied data you can generate medical application and request forward to authourized
person. If employee medical quota is below from specific range than system gave notification agaist
that employee. And RE-IMBRUSEMENT button is to view medical claim form, where employee can
claim amount by providing information and after approving employee case, employee claim amount
is released.

Add User:

262 | P a g e
Add User: By providing User Name,ID,Password. And also update data by clicking on UPDATE
button

Change Password:

263 | P a g e
Change Password: By Providing OLD and NEW password

Security Questions:

264 | P a g e
Security Questions:After first time login you first answer the specified questions, through which you
can able to recover password.

Add Employee:

265 | P a g e
Add Employee: After adding employee Information, go to next tab to add dependent of that
employee

Add Dependent:

266 | P a g e
Add Dependent: You can add multiple dependents according to specific employee and also update

Update Employee:

267 | P a g e
Update Employee: By clicking on view button on Employee List Tab, and then Update employee
and Its dependent Information

Medical Application:

268 | P a g e
Medical Application:Select the desired data and select signature and patient and after clicking
Submit Application request is forwarded to that person whose signature is to be selected.

Application Status:

269 | P a g e
Application Status: Check the Status of Medical Application, Which One Is Approved,Not
Approved and pending.

Medical Re-Imbrusement:

270 | P a g e
Re-Imbrusement:By entering Compulsory data that is required for Medical Claim and Click next.
Then Claim letter is generated and employee claim status is set as Pending.

Add Department:

271 | P a g e
Department:Add and Update Department

Add Hospital:

272 | P a g e
Hospital:Add and Update Hospital

Add Bill:

273 | P a g e
Add Bill: Add bill by proving detail and also generate report of bills information in multiple ways.
System automatically deduct amount from employee medical quota

Search Bill:

274 | P a g e
Search Bill: Many Filters are available for searching, so you can search according your need

Imbrusement Status:

275 | P a g e
Status:After Employee Claim cases is clear from Medical Committee, than Employee claim status
can be updated(Approved Or Not). If approved, than amount is automatically deducted from
employee medical quota.

Search Claim:

276 | P a g e
Search Claim:Search Claim Information According to user need

SOPs:

277 | P a g e
SOP:write SOP’s on system and also add SOP PDF file into the system and can also take a print of
SOP’s

Application Log:

278 | P a g e
Log:User can Monitor the log of Applications. Who generate when, Application Form

Assistant Main Page:

279 | P a g e
Assistant Home Screen

Assistant Registrar Home Screen:

280 | P a g e
Assistant Registrar Home Screen: After Login user can see the medical Application Requests. He
can than approved or disapproved application by Clicking on view.

Update Status:

281 | P a g e
Update Status: User can Approve or Not Approve application. If user select “Not approve”
application then he provide Reason and then Click OK

Add Signature:

282 | P a g e
Add Signature: User add their scanned signature into the system, which can be printed on employee
medical application after approval of application.

Additional Registrar Home Screen:

283 | P a g e
Additional Registrar Home Screen: As same As Assistant Registrar Home Screen

Deputy Registrar Home Screen:

284 | P a g e
Deputy Registrar Home Screen: As same As Assistant Registrar Home Screen

285 | P a g e
5. CHAPTER
PROJECT
MANAGEMENT

Project Management Plan

MEDICAL BILLING MANAGEMENT SYSTEM

Version 1.0

286 | P a g e
Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
12nd Sep, 2020

Revision History

Version Description Author Date

This cover the Project Hassnain Rafique


1.0 12nd Sep, 2020
Management of the system Wasaf Ul Hassan

287 | P a g e
5.1 Project Development Plan
5.1.1 Introduction

5.1.1.1 Purpose
This document describes the whole plan for the development of “Medical Billing System This plan
describes all the activities that are to be performed during the development of MBMS. These
activities are described phase by phase.
5.1.1.2 Scope
This software development plan identifies the activities to be carried out for the completion of
project. These activities are discussed later in the document.

5.1.1.3 Definitions, Acronyms and Abbreviations


There are different acronyms used in this artifact. Their detail is given one by one.

Medical Billing System” is written in short as MBMS.

5.1.1.5 Project Purpose, Scope and Objectives


MBMS is a desktop application which will be implemented in FUUAST, Islamabad, which
will help maintaining the records of employee, dependents,bills,Re-
imbrusement,Applications,Approvals etc

The previous system in use is manual and it is hard manage keep track of data and to perform
simple tasks it requires an immense amount of time and energy.

The major goal of the system is to fulfill the client’s wishes and provide a better working
environment for the staff to work in easy and effective way so they can save time and work in more
efficient way.

5.1.1.6. Assumptions and Constraints


Only one main constraints in the system, which is given below.

• The project requirements are little bit change at last moment .


5.1.1.6 Project Deliverables
• Software Development Plan
• Software Requirements Specifications
• Vision Document
• Use Case Diagram

288 | P a g e
• Data Model
• Design Model
• Risk Information Sheet
• Entity Relationship Diagram
• Test Cases

5.1.1.7 Evolution of Software Development Plan


This software development plan will be updated subsequently after phase or iteration. The target
dates of each phase is given below.

TABLE 5.1 EVOLUTION OF SOFTWARE DEVELOPMENT PLAN


Phase Target Date

Inception 15 Jan, 2020


Elaboration 16 Jan, 2020
Construction Iteration 1 1 May, 2020
Construction Iteration 2 30 Aug, 2020
Transition 10 Sep, 2020
5.1.2 Project Organization

5.1.2.1 Organizational Structure


The team is consisting of two members. Each member is for Inception, Elaboration and
Construction phase. Both team members a very cooperative with each other. Hassnain Rafique(Team
Leader) and Wasaf Ul Hassan

Project Manager

Requirements Specialist, Database Designer, Programmer,


Designer Architect
Tester

FIGURE 5.1 ROLES OF TEAM MEMBER

289 | P a g e
5.1.2.2 External Interfaces
The project team will work independently requirements are gathered from internet and
studying related systems. Every module will be tested by the team. Through prototype the missing
requirements will be included. Every functionality objected by the public will be modified or
clarified by the team.

5.1.2.3 Roles and Responsibilities


The following table shows the roles of team members that are represented in the above given
diagram. The responsibilities are also given in the table of each role .

TABLE 5.2 ROLES AND RESPONSIBILITIES


Role Responsibility

Project Manager Project Manager is the leader of the team. He will manage the
resources (time). He coordinates interaction of the team and
(Hassnain Rafique) user. He assigns the task to team mate and makes sure that the
team is doing the “right” things.

Requirements Specialist Requirements specialist, lists all the requirements captured


from the user in his environment or by the prototype. He
(Hassnain rafique) identifies all the functional requirements described by the
client. He interacts with the client and understands what he
wants to communicate. Then he communicates the client’s
desire to team members.

Designer Designer describes the requirements specified by the


Requirements Specialist in technical way. He gives these
(Wasaf ul Hassan) requirements the diagrammatic representation to manage
artifacts and other related documents that would be required at
elaboration phase.
Database Designer Database designer, is responsible for managing the data in
database and its representation. He manages the representation
(Hassnain Rafique) of data in tabular format inside the database, defines their
relationships and makes sure that data integrity is achieved.

Programmer Programmer is responsible for translating the design into


(Hassnain,Hassan) executable format. He gives the soul to the body of system,
created by the designer.

290 | P a g e
Tester (Hassnain Tester, tests the implemented modules by the programmer. He
Rafique,Wasaf ul Hassan) makes sure that the programmer has made the “things right”.
He establishes the test standards to which the system should
conform for acceptance.

5.1.3 Project Plan

5.1.3.1 Phase Plan


The project is planned in phases. Each phase may require iterations to complete its
allocated task. These phase and iterations are listed below with their allocated time on the basis of
estimations.

TABLE 5.3 PHASE PLAN


Phase No. of Iterations Start End

Inception Phase 1 Week 4 Week 11


Elaboration Phase 1 Week 12 Week 16
Construction Phase 2 Week 17 Week 30
Transition Phase 1 Week 31 Week 34
5.1.3.2 Milestones
The end of each phase will be considered as the milestone. The details of each
milestone along their goals are given below. These details include the necessary documents that
would be prepared till the end of milestone.

TABLE 5.4 MILESTONES


Milestone Milestone Description

Inception Phase The Inception phase will develop the software requirements. It will
identify all the functional and non-functional requirements. It will

also develop an initial project plan. The major risks will be


identified. All the major use cases will be identified and explored.

Elaboration Phase Elaboration phase will result in the overall architecture and design
of the system. The conceptual model of system will be mapped to
the software model. The database design will be finalized. A
prototype will be developed with no functionality available at that
level. The software development plan will be revised if needed.

291 | P a g e
Construction Phase Construction phase will include the overall implementation of
business logic of the system. All the modules will be implemented
one by one and at the end they will be integrated. All the necessary
requirements will be completed to deploy system.

Transition Phase User manuals will be prepared for the user guidance, if required
and the system will be deployed properly in the environment of the
user after acceptance test.

5.1.3.3 Schedule Plan


The following table shows the high-level schedule plan for the milestones, set for the
MBMS project. This schedule plan includes the milestone name, iteration with its starting date and
expected finishing date. The schedule plan may be reviewed after each phase or an iteration
depending upon the work finished in that iteration.

5.1.3.4 Project Resourcing


1. Resource Acquisition Plan: In fact, no special hardware or software resource is required for the
completion of this project.
2. Training Plan: The team is skilled with all the necessary tools and techniques required for the
project.

5.1.3.5 Project Monitoring and Control


1. Schedule Control Plan: An “Iteration Assessment Report” will be prepared at the end of
iterations. These reports will help the team to be on track and according to their schedule.
2. Budget Control Plan: Since this project is a Final Year Project, So there is no Cost
3. Quality Control Plan: Informal reviews will be acquired during the development of project.
This will ensure that the system is meeting its requirements.
4. Reporting Plan: Project assessment report will be prepared after iteration. This will ensure that
the progress on project in actual is equal to the expected progress.
5. Measurement Plan: Time estimate has been completed on the basis of project domain and
available human resource.
5.1.4 Technical Process Plans

5.1.4.1 Methods, Tools and Techniques


• The standard guidelines of RUP are used
• We use MS Word,Visio and C#.net using Entity FrameWork for implementation.

292 | P a g e
• Visual Studio as development tool.
• Crystal Reports software for generating reports and through Queries.

5.1.4.2 Infrastructure Plan

This project will be deployed at FUUAST, Islamabad. All the necessary software will
be installing as they would be required.

5.1.4.3 Documentation Plan


During the development of project the following documents will be prepared.

• Software Requirements Specification (SRS)


• Vision Document
• Software Development Plan (SDP)
• Use Case Diagram.
• Entity Relationship Diagram
• UML design diagrams (as required)
• System Sequence Diagram

5.1.4.4 Problem Resolution Plan


Meetings of Team mates are arranged on regular basis. In these meetings all the
problems related to project are discussed and their remedies are suggested.

5.1.5 Process Improvement Plan


In all the meetings, the problems and lessons learned from that problems will be discussed and
careful plan will be established to improve the process pace and try to avoid the repetition of mistakes
been done in past.

293 | P a g e

You might also like