0% found this document useful (0 votes)
171 views266 pages

Analysis Final Project

The document summarizes an e-health services website project created by students Fazila Khatoon and Reem Safeer. The project was supervised by Ma'am Sabeen and coordinated by Ma'am Sabira of the Computer Science department. The e-health website allows online communication between doctors and patients, enabling patients to ask questions and schedule appointments without visiting in-person. Doctors can also issue prescriptions, refer patients to specialists, and share health tips through the site.

Uploaded by

Nadeem Shahzad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
171 views266 pages

Analysis Final Project

The document summarizes an e-health services website project created by students Fazila Khatoon and Reem Safeer. The project was supervised by Ma'am Sabeen and coordinated by Ma'am Sabira of the Computer Science department. The e-health website allows online communication between doctors and patients, enabling patients to ask questions and schedule appointments without visiting in-person. Doctors can also issue prescriptions, refer patients to specialists, and share health tips through the site.

Uploaded by

Nadeem Shahzad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 266

E-Health services (Website)

Federal Urdu University of Arts, Science and Technology


Islamabad

Fazila khatoon
Reem safeer

Supervised by:
Ma’am Sabeen
Lecturer
Department of Computer Science
Coordinated by:
Ma’am sabira
Lecturer
Department of Computer Science

E-Health Services (Website)

Page1
Federal Urdu University of Arts Science & Technology

In Partial Fulfillment of the Requirement for the

Degree of Bachelor of Computer Science

by

Fazila Khatoon

Reem safeer

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

_________________________

Project Supervisor
__________________________
_

Page2
Ma’am sabeen
Department of Computer
Science
Project Coordinator
__________________________
_
Ma’am sabira
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 Ma’am sabeen 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.

Page4
Project in Brief
Project Title E-Health-Services

Objective The system is designed to help the online doctor


consultation and provide ease for people to get suggestions
and appointment from doctor.
Undertaken By Fazila khatoon(Team Leader)
Reem safeer

Supervised By Ma’am sabeen

Date Started 18th January 2021

Date Ended

Tools used Microsoft Visual code 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
E-Health-Service System (EHS) is a website which sets up online communication between a
doctor and a patient. This website is helpful to patients to ask questions and state their concerns
to doctors regarding their health condition. This website will facilitate the patients to interact
with doctors without making any physical appointments. . In addition using this website, the
patient can make an appointment to meet the doctor in clinic/hospital. EHS website would also
facilitate the patient’s pharmacy selection to pick up the medication. Similarly, this website is
beneficial to doctors by providing the following functionalities: patient interaction through
messaging, sending prescription to pharmacies, confirming appointments, information sharing
with other doctors, and patient referrals., video chat , audio calling has unique features such as
issuing online prescription to patients, referring patients to a specialist, sending health tips to
patients, and effectively, reducing the cost of customer service and providing a vital
communication link between doctors and patients. There is also a separate page for doctors
that they can post daily health realted information which can help the people to aware every
type of disease.

Table of Contents
1. CHAPTER INCEPTION....................................................................................................................................1
1.1 VISION & SCOPE.........................................................................................................................................11

Page6
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
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

CHAPTER
INCEPTION

VISION
Page7
FOR

E-HEALTH SERVICES (WEBSITE)

Version 1.1

Prepared by
Fazila Khatoon
&
Reem safeer
18th Jan, 2021

Revision History

Version Description Author Date

This covers the major vision Fazila Khatoon/


1.0 18thJan, 2021
documents reem safeer

Page8
1 Introduction
As the world is facing global pandemic crises, the healthcare system is turning
toward new technologies and adopting online doctor’s consultation platforms. It is the
remote delivery of healthcare services, such as health assessments or consultations, using
Internet. It allows healthcare providers to evaluate, diagnose and treat patients using
common technology, such as video conferencing and smartphones, without the need for
an in-person visit. Patients may pick or be assigned to any specialist/general duty doctor
who is accessible on the web. They are not limited to a particular care provider either by
past learning or by geographical closeness. The most obvious advantage during these
times is that it ensures the safety of the patients. People are apprehensive to go to places
where they must interact with others. Amidst a pandemic, virtual consultations provide
assurance of your safety. This website also saves a lot of time and energy. You just must
book an appointment and be online at the given time of your consultation which is as
simple as that. People do not have to worry about standing in a queue or even are saved
from the hassles of travelling.

1.1 Purpose
The basic purpose of E-Health services (website) is to approach directly doctor
online. People can able to communicate with doctor through vedio calling ,audio
calling and messaging. They can easily get suggestions and apponintment from
doctor about the related disease from anywhere online.And it is also helpful to
overcome the crowds in hospitals and stopping the spreading of corona virus in
present pandemic situation.In our website the world best doctors are enrolled that

Page9
can be helpful for people to get appointment and suggestions from them. E-Health-
services (website)can provide additional information to help patients understand
more about their conditions because there is spread page for doctors that they can
share daily health related information.

1.2 Scope
In our (EHS), the old system is transitioned to a new computerized system. Different
modules will be constructed based on the requirements gathered from hospital and the
environment. Main modules are security management, user management,patient
resourse management, doctor management, patient verification,video recording, health
service management.

1.2 Definitions, Acronyms and Abbreviations

Term/Abbreviation Description
EHS E-HEALTH SERVICES(WEBSITE)

1.4 References
Persons Involved:
Ma’am sabeen (supervisor)
Ma’am sabira(coordinator)
Sir Hassan & Sir zeeshan ( evaulators)

1.5 Overview
This document provides the introduction of the (), 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.

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

P a g e 10
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


 It is problematic to observe every patient physically
for many doctors,and is difficult to follow the proper
precautions because of crowd in hospitals.

 Doctors cannot be able to give full attention to the


serious patients.
 If in some areas there is transportation issue than at that
time there is a risk for patient life.
 Peoples cannot be able to visit the hospitals
because of their busy routines, but want to get
appointment and suggestions from doctors.
 A person incidentally ill and there is no possibility for
him to go hospital at that time.
 Only information about concerned doctor
The problem
of .  Not able to get suggestion about related dieses from
out of country doctors.
 Cannot able to know about the basic information and
precautions about every type of dieses.

It will great effects in present pandemic situation that people


Effects can approach doctor online from anywhere any time and get
suggestions about related disease.
It will effect time management and fast retrieval of doctor
response and appointments time. Moreover, data security
(which is an important factor) is provided to the user.
It will great effect in hospitals to overcome crowd and
spreading of virus in current pandemic situation

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
which is
Patient will be able to get a lot of information available
rearding health in daily basis.

P a g e 11
Our aim is to develop an effective online doctor consultation
website which would work in all around the world and willing
to give the online doctor consultation platform for peoples to
communicate with doctor by using common technologoies.
A successful All the required modules like security management, user
solution would be management, doctor management, patient resource
management, patient verification, vedio recording, health
service management would assist management of the website
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 Azeema sheikh hospital Rawalpindi
The E-Health-Services Website (EHS)
That Keeps a large number of records of patient and doctor also.

Our Product Uses new technologies for development. This system is going to be
built by keeping in mind the current pandemic situation.By providing
better performance, security, reliability so that the people can use this
website without any fear.
All the required modules like security management, user management,
doctor management, patient resource management, health
management, vedio recording, patient verification, would assist
management of the website 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 EHS to have all records. Also
complete the product. generate, add data and view
reports.

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

Assistant Ensure that the system will


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

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

3.2 USER SUMMARY


Name Description
Administrator He will interact with the systm 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

P a g e 13
3.3 Key Stakeholder / User Needs.
Physical system doesn’t have a proper environment to manage the record of the patient
and can’t be updated efficiently as required.(EHS) will provide, maintain, efficiently
update, and automatic repose, and handling different situations etc. and will be easy to
access each and every category of doctor available in (EHS) when needed at once or at
different times. Efficient response will also be provided.

4. System Overview
This system is being made to replace the physical doctor consultation system. The main
idea is to have easy access to the doctor and managing them efficiently. This system
which is being designed would provide the main feature of digitally approaching the
different categories of doctors which was not possible before. The doctor will have their
own accounts, separate according to doctor category, where they will be able to enter
their basic information and experience according to privileges.

4.1 System Perspective


This (EHS) 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.

P a g e 14
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.

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
Doctor Management
Add Doctor Priority: High
Search Doctor Priority:High
Update Doctor 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

P a g e 15
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
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

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

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 (EHS) 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 (EHS) provides better security by authenticating patient and doctors 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 (EHS) 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

P a g e 17
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 E-Health Services(website). All
the functional Requirements are collected by the personal visit to the
Azeema sheikh Hospital.

P a g e 22
CEO of Azeema sheikh hospital provided the requirements and functionalities by
himself.

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-1 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

P a g e 23
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.

2.3 Doctor management:

2.3.1 Add Prescription


SRS-19 Doctors can be added into the system by the Administrator.
SRS-20 Doctors will have interest for adding patient prescription details.
SRS-21 Other details of the patients i.e. patient id, patient name would be entered.

SRS-22 System would save this information.

2.3.2 Update prescription


SRS-23 The updating of the patients information would be according to the
doctors name.
SRS-24 Doctors would be able to update the patients information.

SRS-25 System would update this information.

2.3.3 Search prescription


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

SRS-28 System would display information.

2.4 Patient verification:

2.4.1 Add patient verification


SRS-29 Patient information can be added into the system.
SRS-30 User will have interest for adding his/her details.
SRS-31 Other details of the department i.e. patient id, patient name, patient
CNIC no, patient phone no would be entered.

SRS-32 System would save this information.

2.4.2 Update patient verification

P a g e 24
SRS-33 The updating of the patients information would be according to the
doctors name
SRS-34 Doctors would be able to update the patient information

SRS-35 System would update this information.

2.4.3 View All patient detials


SRS-36 System would give facility to view all the patient information on the basis
of patient id.
SRS-37 Administrator can view user on grid and textboxes also.

SRS-38 System would display information.

2.5 Patient resources management:

2.5.1 Process patient detection


SRS-39 Patient enter their information into the system
SRS-40 Detect the patient information that they enter their valid information.

SRS-41 Other details of the patients i.e. patient id, name, patient CNIC, contact
no , would be entered.

SRS-42 System would save this information.

2.5.2 Process microphone and speaker detection


SRS-43 Before the using of system user must check their microphone and speaker
that it can work properly or not.

SRS-44 System will save this information.

2.5.3 View report


SRS-45 User will also view the reports.
SRS-46 System will save all the information of the reports.

2.5.4 Update report


SRS-47 Doctor will update the patient report.
SRS-48 Other details of the patient i.e. patient id, name, CNIC, contact no,
would be entered.

P a g e 25
SRS-49 System would save this information.

2.5.5 Process bandwidth detection


SRS-50 System can also the detect the data packet transfer from the network.

SRS-51 System would generate the application.

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.

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 (EHS) 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

P a g e 26
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.
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


P a g e 27
E-Health Services (Website)
Version 1.1

Prepared by
Fazila khatoon
&
Reem safeer
18th jan, 2021

Revision History

P a g e 28
Version Description Author Date

This covers the major use case Fazila khatoon/


1.0 18th Jan, 2021
documents Reem safeer

P a g e 29
Process Login

Change Password

Forget Password

Administrator

Add User

Search User

Update User

View User

Doctor

Add Prescription

Update Prescription

Search Prescription

Add Patient Verification

Patient
Update Patient Verification

View All Patient Verification

Process Patient
Detection

process microphone
and speaker detection

View Report

Update Report

Process Bandwidth
Detection

P a g e 30
Fully Dressed Use Cases

E-Health Sevices (website)


Version 1.2

Prepared by
Fazila khatoon
&
Reem safeer
18th jan, 2021

P a g e 31
Revision History

Version Description Author Date

This cover the User cases Fazila khatoon


1.0 11st Jan, 2020
of the system Reem safeer

Use case ID: UC-01


Use case Name: Process Login

Use case Prepared by: Reem safeer Use case Prepared on: 18th Jan,2021

Use case updated by: Fazila khatoon Use case updated on: 18th Jan,2021

P a g e 32
Use case Description: This use case describes that how a user will Login into a system.

Primary Actors: <Administrator><doctor><patient>


Stake Holders & Interest: Administrator: Wants to successfully log into the system
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:

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: Reem safeer Use case Prepared on: 18th Jan,2021

Use case updated by: Fazila khatoon Use case updated on: 18th Jan,2021

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

Primary Actors: <Administrator><patients><Doctors>

Administrator: Wants to successfully change the Password


Stake Holders & 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:

P a g e 33
User Action System Response

1 User will enter Old and New Password

System will authenticate the user information from


2
database

System process information and successfully change the


3
password

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: Reem safeer Use case Prepared on: 18th Jan,2021

Use case updated by: Fazila khatoon Use case updated on: 18th Jan,2021

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

Primary Actors: <Administrator><Doctors><Patients>


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

P a g e 34
3 User than able to change password

System process information and successfully reset


4
the password

Post-Condition: User successfully reset the password

If user enters the “Invalid Old Code”


System will prompt to Invalid Code
Extension Points: If user leave any blank field
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: Reem safeer Use case Prepared on: 18th Jan,2021

Use case updated by: Fazila khatoon Use case updated on: 18th Jan,2021

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”

P a g e 35
4 Step 1-3 repeats if user repeat the process

Post-Condition: Admin successfully add new user 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: SRS10, SRS11, SRS12

Use case ID: UC-05


Use case Name: Update User
Use case Prepared by: Reem safeer Use case Prepared on: 18th Jan,2021

Use case updated by: Fazila khatoon Use case updated on: 18th Jan,2021

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

P a g e 36
Post-Condition: Admin successfully update User information
Admin search for User which doesn't exist
System will prompt to “User 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: SRS13, SRS14, SRS15

Use case ID: UC-06

Use case Name: View User

Use case Prepared by: Reem safeer Use case Prepared on: 18th Jan,2021

Use case updated by: Fazila khatoon Use case updated on: 18th Jan,2021

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”

P a g e 37
Priority: High

Frequency: Low Frequent in use

Cross-Reference: SRS16, SRS17, SRS18

Use case ID: UC-07


Use case Name: Add prescription

Use case Prepared by: Reem safeer Use case Prepared on: 18th Jan,2021

Use case updated by: Fazila khatoon Use case updated on: 18th Jan,2021

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

Primary Actors: <Administrator><Doctor><Patient>


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

Main Success Scenario:

User Action System Response

1 Doctors will enter the all information of patients.

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: Doctor successfully enters the patient 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

P a g e 38
Cross-Reference: SRS19, SRS20, SRS21, SRS22

Use case ID: UC-08


Use case Name: Update prescription

Use case Prepared by: Reem safeer Use case Prepared on: 18th Jan,2021

Use case updated by: Fazila khatoon Use case updated on: 18th Jan,2021

Use case Description: This use case describes how a doctor will Update the patient Information.

Primary Actors: <Administrator><Doctors><patient>

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

Main Success Scenario:

User Action System Response

1 Doctor search for patient information.

System process and patient nformation is shown to


2
user

3 Doctor will update the patient 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 prescription which doesn't exist
System will prompt to “prescrition 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

P a g e 39
Cross-Reference: SRS23, SRS24, SRS25

Use case ID: UC-09


Use case Name: Search prescription

Use case Prepared by: Reem safeer Use case Prepared on: 18th Jan,2021

Use case updated by: Fazila khatoon Use case updated on: 18th Jan,2021

This use case describes how a system would give facility to search all the patient
Use case Description:
prescription information.
Primary Actors: <Administrator><patient>
Administrator: Wants to successfully search prescription .
Stake Holders & Interest:
Patient :Wants to successfully search prescription.
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. User must have right to search prescription.

Main Success Scenario:

User Action System Response

1 User will search the prescription.

2 System will display the prescription.

3 Step 1-2 repeats if user repeat the process

Post-Condition: User successfully search the prescription.


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

P a g e 40
Use case ID: UC-10

Use case Name: Add prescription verification.

Use case Prepared by: Reem safeer Use case Prepared on: 18th Jan,2021

Use case updated by: Hassnain Rafique Use case updated on: 18th Jan,2021

Use case Description: This use case describes how a user will Add prescription verification.

Primary Actors: <Administrator><doctor><patient>


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

Main Success Scenario:

User Action System Response

doctor will enter the all information of a patient


1
prescription.

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 patient 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 patient prescription

P a g e 41
Use case Prepared by: Reem safeer Use case Prepared on: 18th Jan,2021

Use case updated by: Fazila khatoon Use case updated on: 18th Jan,2021

Use case Description: This use case describes how a Admin will Update the patient description.

Primary Actors: <Administrator><patient>

Stake Holders & Interest: Administrator and patient: Wants to successfully Update patient prescription.
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 Doctor will update the patient prescription.

2 Prescription and patient information is shown.

3 Doctor will update the patient prescription.

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 patient prescrition information.


User search for prescription which doesn't exist
System will prompt to “Prescription 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 all patient details

Use case Prepared by: Reem safeer Use case Prepared on: 18th Jan,2021

P a g e 42
Use case updated by: Fazila khatoon Use case updated on: 18th Jan,2021

This use case describes how admin will view all patient information on the basis of
Use case Description:
patient id

Primary Actors: <Administrator><patient>

Stake Holders & Interest: Administrator and patient Wants to successfully view patient details

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 Doctor view all the patient information.

2 System process and users information is shown to admin

Post-Condition: Admin successfully view all the patient 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: Process patient detection

Use case Prepared by: Reem safeer Use case Prepared on: 18th Jan,2021

Use case updated by: Hassnain Rafique Use case updated on: 18th Jan,2021

P a g e 43
Use case Description: This use case describes how a user will process patient detection.

Primary Actors: <Administrator><Patient>


Administrator: Wants to successfully process patient detection.
Stake Holders & Interest:
Admin Wants to successfully process patient detection.
1. System must be in running state
Pre-Condition: 2. System must authenticate the user

Main Success Scenario:

User Action System Response

1 Patient enter their information into the sytem

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 patient 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: Process microphone and speaker detection

Use case Prepared by: Reem safeer Use case Prepared on: 18th Jan,2021

Use case updated by: Fazila khatoon Use case updated on: 18th Jan,2021

This use case describes how a user will check the microphone and speaker that it can
Use case Description:
work properly or not.

P a g e 44
Primary Actors: <Administrator><patient><doctor>

Administrator: Wants to successfully check the microphone and speaker.


Stake Holders & Interest:
DEO: Wants to successfully check the microphone and speaker.
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Patient data must be present in database

Main Success Scenario:

User Action System Response

System user must check their microphone and


1
speaker .

System will verify the information and then patient


2
information will be shown to the user

3 Step 1-2 repeats if user repeat the process

Post-Condition: User successfully check the microphone and speaker.

User search for patient which doesn't exist


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

Priority: High

Cross-Reference: SRS43, SRS44

Use case ID: UC-15

Use case Name: View report

Use case Prepared by: Reem safeer Use case Prepared on: 18th Jan,2021

Use case updated by: Fazila khatoon Use case updated on: 18th Jan,2021

Use case Description: This use case describes how admin will view the reports.

Primary Actors: <Administrator><Patient><doctors>

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

P a g e 45
3. Patient data must be present in database before updating

Main Success Scenario

User Action System Response

1 User will also view the reports.

2 System process and patient information is shown to user

3 Step 1-4 repeats if user repeat the process

Post-Condition: Admin successfully view the reports.


User search for Patient which doesn't exist
System will prompt to” Patient 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: SRS45, SRS46

Use case ID: UC-16

Use case Name: Update report

Use case Prepared by: Reem safeer Use case Prepared on: 18th Jan,2021

Use case updated by: Fazila khatoon Use case updated on: 18th Jan,2021

Use case Description: This use case describes how a user will update the reports.

Primary Actors: <Administrator><doctor><patient>


Administrator: Wants to successfully update report.
Stake Holders & Interest:
DEO: Wants to successfully update reports.
1. System must be in running state
Pre-Condition: 2. System must authenticate the user

Main Success Scenario:

P a g e 46
User Action System Response

1 Doctor will update the patient report.

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 update the report 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: SRS-47,SRS-50,SRS-51

Use case ID: UC-17


Use case Name: Process bandwidth detection

Use case Prepared by: Reem safeer Use case Prepared on: 18th Jan,2021

Use case updated by: Hassnain Rafique Use case updated on: 18th Jan,2021

Use case Description: This use case describes how a system can also the detect resources.

Primary Actors: <Administrator><doctor><patient>

Administrator: Wants to successfully process bandwidth detection.


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

User Action System Response

System can also the detect the data packet transfer


1
from the network.

P a g e 47
System will verify the information and doctor
2
Dependent information will be shown to the user.

3 Step 1-2 repeats if user repeat the process

Post-Condition: User successfully will detect the process bandwidth detection.

User search for Doctor Dependent which doesn't exist


System will prompt to “Doctor 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: SRS-52,SRS-53.

System Sequence Diagram


FOR

E-Health services(website)

Version 1.1

Prepared by

P a g e 48
Hassnain Rafique
&
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 49
1.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 50
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 51
SSD: Update User

SSD: View User

P a g e 52
SSD: Add Department

SSD: Update Department

P a g e 53
SSD: View Department

SSD: Add Hospital

P a g e 54
SSD: Update Hospital

SSD: View Hospital

P a g e 55
SSD: Add Employee

SSD: Search Employee

P a g e 56
SSD: Update Employee

P a g e 57
SSD: Add Employee Dependent

SSD: Search Employee Dependent

P a g e 58
SSD: Update Employee Dependent

SSD: Add Medical Quota

P a g e 59
SSD: Search Medical Quota

SSD: Update Medical Quota

P a g e 60
SSD: View Medical Quota

SSD: Generate Medication Letter

P a g e 61
SSD: Add Medical Claim

SSD: Search Medical Claim

SSD: Monitor Status

P a g e 62
SSD: View Medical CLaim

SSD: Add Bill

P a g e 63
SSD: Search Bill

SSD: View Bill

P a g e 64
SSD: Generate Bill Report

SSD: Add & Attach SOPs

P a g e 65
SSD: Update SOPs

SSD: View & Print SOPs

P a g e 66
SSD: Add Signature

SSD: Update Signature

P a g e 67
SSD: View Application

SSD: Update Application

P a g e 68
SSD: Monitor Application

P a g e 69
Entity Relationship Diagram

MEDICAL BILLING MANAGEMENT


SYSTEM

Version 1.1

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

P a g e 70
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 71
P a g e 72
Normalization

MEDICAL BILLING MANAGEMENT


SYSTEM

Version 1.2

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

Revision History

P a g e 73
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 74
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 75
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 76
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 77
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(FK)

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

P a g e 78
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

79 | P a g e
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


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

81 | P a g e
This cover the Domain Hassnain Rafique
1.2 11st Sep, 2020
Model of the system Wasaf Ul Hassan
MEDICAL BILLING MANAGEMENT SYSTEM (MBMS)

83 | 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

84 | 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

85 | 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

86 | 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

87 | 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

88 | 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

89 | P a g e
Features Accessibility

MEDICAL BILLING MANAGEMENT SYSTEM

Version 1.0

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

90 | 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

91 | 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:

92 | 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

2. CHAPTER
CONSTRUCTION

93 | P a g e
Class Diagram

MEDICAL BILLING MANAGEMENT SYSTEM

Version 1.2

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

94 | 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

95 | P a g e
96 | 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

97 | 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:

98 | 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;

99 | 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)
{

100 | 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

101 | 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;
}

102 | 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;

103 | 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;

104 | 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
105 | 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)


{

106 | 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();

107 | 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();

108 | 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();

109 | 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";
}
}

110 | 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
{

111 | 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;

112 | 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;

113 | 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)

114 | 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

115 | 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")
{

116 | 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
{

117 | 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);

118 | 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;

119 | 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();

120 | 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);

121 | 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;

122 | 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
{

123 | 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;

124 | 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();

125 | 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;

126 | 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;

127 | 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)
{

128 | 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)
{

129 | 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)

130 | 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)
{

131 | 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;
}

132 | 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")
{

133 | 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

134 | 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)


{

}
}

135 | 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;

136 | 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)
{

137 | 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 = "";

138 | 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;

139 | 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");

}
}
}

140 | 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;
}

141 | 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

142 | 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
}

143 | 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)


{

144 | 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;
}

145 | 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;
}
}

146 | 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);
}

147 | 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)

148 | 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);
}

149 | 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;

150 | 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();

151 | 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());

152 | 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)


{

153 | 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)
{

154 | 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);
}

155 | 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));

156 | 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;
}

157 | 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();

158 | 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());

159 | 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)


{

160 | 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;

161 | 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);
}

162 | 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)

163 | 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));

164 | 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; }

165 | 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 = "";

166 | 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
{

167 | 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
{

168 | 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;

169 | 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)
{

170 | 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();

171 | 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;

172 | 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)

173 | 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)

174 | 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;

175 | 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

176 | 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);

177 | 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";
}

178 | 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;

179 | 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)

180 | 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();
}

181 | 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;

182 | 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)


{

183 | 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");

184 | 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
{

185 | 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"

186 | 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
{

187 | 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;

188 | 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();

189 | 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)


{

190 | 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();

191 | 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);

192 | 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
{

193 | 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;
}

}
}
}

194 | 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

195 | 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

196 | 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

197 | 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

198 | 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

199 | 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

200 | 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

201 | 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

202 | 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

203 | P a g e
Test Acceptance: Passed

Test case ID: TC-08


Test Case Name: View All Department
Test Case created by: Wasaf Ul Hassan Test Case created 8/18/2020
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:

204 | 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:

205 | 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>

206 | 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

207 | 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.

208 | 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.

209 | 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

210 | 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:

211 | 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

212 | 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

213 | 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

214 | 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

215 | 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

216 | 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

217 | 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

218 | 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
219 | 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

220 | 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

221 | 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:

222 | 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

223 | 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:

224 | 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:

225 | 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

226 | 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:

227 | 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:

228 | 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 created 9/11/2020


created by: on:

Test Case Hassnain Rafique Test Case 9/11/2020


Updated By: Updated On:

229 | 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

230 | P a g e
3. CHAPTER
TRANSITION

231 | P a g e
User Guide

MEDICAL BILLING MANAGEMENT SYSTEM

Version 1.0

Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan

232 | 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

233 | 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:

234 | 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:

235 | P a g e
Add User: By providing User Name,ID,Password. And also update data by clicking on UPDATE
button

Change Password:

236 | P a g e
Change Password: By Providing OLD and NEW password

Security Questions:

237 | 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:

238 | P a g e
Add Employee: After adding employee Information, go to next tab to add dependent of that
employee

Add Dependent:

239 | P a g e
Add Dependent: You can add multiple dependents according to specific employee and also update

Update Employee:

240 | 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:

241 | 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:

242 | P a g e
Application Status: Check the Status of Medical Application, Which One Is Approved,Not
Approved and pending.

Medical Re-Imbrusement:

243 | 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:

244 | P a g e
Department:Add and Update Department

Add Hospital:

245 | P a g e
Hospital:Add and Update Hospital

Add Bill:

246 | 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:

247 | P a g e
Search Bill: Many Filters are available for searching, so you can search according your need

Imbrusement Status:

248 | 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:

249 | P a g e
Search Claim:Search Claim Information According to user need

SOPs:

250 | 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:

251 | P a g e
Log:User can Monitor the log of Applications. Who generate when, Application Form

Assistant Main Page:

252 | P a g e
Assistant Home Screen

Assistant Registrar Home Screen:

253 | 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:

254 | 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:

255 | 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:

256 | P a g e
Additional Registrar Home Screen: As same As Assistant Registrar Home Screen

Deputy Registrar Home Screen:

257 | P a g e
Deputy Registrar Home Screen: As same As Assistant Registrar Home Screen

258 | P a g e
4. CHAPTER
PROJECT
MANAGEMENT

Project Management Plan

MEDICAL BILLING MANAGEMENT SYSTEM

Version 1.0

259 | 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

260 | 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

261 | 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

262 | 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.

263 | 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.

264 | 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.

265 | 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.

266 | P a g e

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy