Medical Billing Final Project
Medical Billing Final Project
Medical Billing Final Project
Prepared For
Hassnain Rafique
Bachelor in Computer Science
Wasaf Ul Hassan
Bachelor in Computer Science
Supervised by:
Mr. Khawaja Tahir
Lecturer
Department of Computer Science
Coordinated by:
Ma’am Fakhra
Lecturer
Department of Computer Science
Session [2016-2020]
A Project Presented to
Page1
Federal Urdu University of Arts Science & Technology
by
Hassnain Rafique
Wasaf Ul Hassan
January, 2020
Final Approval
Dated
It is certified that I have read the project report submitted by Hassnain Rafique and
Wasaf ul Hassan and it is our judgment that this project is of sufficient standard to
warrant its acceptance by the FUUAST university, Islamabad for the Degree of BSCS in
System Software.
Committee
External Examiner
_________________________
Page2
Project Supervisor
__________________________
_
Mr. Khawaja Tahir.
Department of Computer Science
Project Coordinator
__________________________
_
Ma’am Fakhra
Department of Computer Science.
Dedication
“Dedicated…
To 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.
And
To our friends from their good will and company we enjoyed every single moment of our
Education and university life”
Page3
Acknowledgment
All praise to Almighty Allah who gave us the understanding, courage and patience to
complete this project.
Thanks to our parents and all well-wishers who helped us during our most difficult times
and it is due to their untiring efforts that we are at this position today.
We express our gratitude to our kind teacher Sir Khawaja Tahir for providing us
opportunity to learn and enhance our knowledge. He has been ready to help and guide us
throughout the project in any way possible.
Project in Brief
Project Title Medical Billing System
Page4
Objective The system is designed to help the administrator to automate
the work for ease and profit.
Abstract
Page5
In some universities, there is no such fully automated platform exists where the record of
the employees can easily be saved and extracted. Data of the employee doesn’t maintain
properly, each time the DEO enters record into the system when application generated.
There is no such proper system to get the medical receipt directly from the hospital.
Moreover, there is no such system which can be used to monitor the status of employee’s
medical quota and also in some universities, although there is facility to get the report of
the employees but not according to the requirement.
Table of Contents
1. CHAPTER INCEPTION....................................................................................................................................1
1.1 VISION & SCOPE.........................................................................................................................................11
1.1.1 Introduction...........................................................................................................................................13
1.1.2 Purpose.................................................................................................................................................13
1.1.3 Scope..................................................................................................................................................... 14
1.1.4 Definitions, Acronyms and Abbreviations..............................................................................................14
1.1.5 References.............................................................................................................................................14
1.1.6 Overview...............................................................................................................................................14
1.2.0 Positioning............................................................................................................................................15
1.3.0 Stakeholder and User Descriptions.......................................................................................................17
1.4.0 System Overview....................................................................................................................................19
1.4.1 Cost and Pricing....................................................................................................................................20
1.4.2 Licensing and Installation.....................................................................................................................20
1.5.0 System Feature and Priorities...............................................................................................................20
1.6.0 Constraints............................................................................................................................................22
1.7.0 Quality Ranges......................................................................................................................................23
1.8.0 Other Item Requirements.......................................................................................................................24
2. CHAPTER ELABORATION............................................................................................................................25
2.1 SOFTWARE REQUIREMENTS SPECIFICATIONS....................................................................................................26
2.1.1 Introduction...........................................................................................................................................28
Page6
2.1.2 Purpose.................................................................................................................................................28
2.1.3 Scope..................................................................................................................................................... 29
2.1.4 Definitions, acronyms and abbreviation................................................................................................29
2.1.5 Overview...............................................................................................................................................30
2.2.0 Functional Requirements.......................................................................................................................30
2.3.0 Non Functional Requirements...............................................................................................................30
2.4.0 External Interface Requirements...........................................................................................................39
2.2 USE CASES DIAGRAM......................................................................................................................................40
2.3 FULLY DRESSED USE CASE.............................................................................................................................46
2.4 SYSTEM SEQUENCE DIAGRAM.........................................................................................................................87
2.5 ENTITY RELATION DIAGRAM.........................................................................................................................109
2.6 NORMALIZATION............................................................................................................................................112
2.7 DOMAIN MODEL.............................................................................................................................................121
2.8 RELATIONAL MODEL.....................................................................................................................................124
2.9 FEATURE
ACCESSIBILTY………………………………………………………………………………………………
……...……….131
3. CHAPTER CONSTRUCTION.......................................................................................................................135
3.1 CLASS DIAGRAM...........................................................................................................................................136
3.2 IMPLEMENTATION CODE................................................................................................................................139
3.3 TEST
CASES………………………………………………………………………………………………………
…………….……….285
4. CHAPTER TRANSITION..............................................................................................................................325
4.1 USER GUIDE..............................................................................................................................................326
Page7
1. CHAPTER
INCEPTION
Page8
VISION
FOR
Version 1.1
Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
23rd Jan, 2020
Page9
Revision History
Hassnain Rafique /
1.0 This covers the major vision documents 11th Jan, 20120
Wasaf Ul Hassan
1. Introduction
Our medical billing system is a desktop application which is being developed for the
FUUAST that assists to maintain the record of the employees, employee’s dependent,
medical quota, application generation and also monitor medical billing status of every
employee.
The previous system uses Microsoft Excel and it is hard to manage keep track of data
and to perform simple tasks it requires an immense amount of time and energy. No such
system previously being used for required purposes.
The organization wants to find a solution to easily track and maintain record. Moreover,
add, update, view, and generate reports of data. The main goal of our system is to get the
fast application generation and monitor status of the employees’ medical quota and
directly add receipt into the system.
P a g e 10
The major goal of the system is to fulfill the client’s wishes and provide a better working
environment for the administrator to work in easy and effective way so they can save
time and work in more efficient way.
1.1 Purpose
The purpose of the Medical Billing Management System is to add and maintain
employee billing data properly into the system. Moreover, to manage and monitor status
of the employees’ billing
Medical Billing Management System (MBMS) is to collect, analyze, and define needs
and features of the employees’ medical billing system to manage the record of
employees, employees’ dependent, application generation, monitoring status. It focuses
on the functionality needed by the stakeholders. The details of how the (MBMS) fulfils
stakeholders are described in the use-case and supplementary specifications.
1.2 Scope
In our (MBMS), the old system is transitioned to a new computerized system. Different
modules will be constructed based on the requirements gathered from the stake holder
and the environment. Main modules are Security, User, Data Logging, Department,
Employee, Employee dependent, Application Generation, Medical Claim, Medical
Billing, and Online Medical Receipt.
1.4 References
Persons Involved:
• Mr. Khawaja Tahir (Supervisor CS Department FUUAST Islamabad)
• Mr. Muhammad Zeeshan (Admin Officer)
• Mr. Abdul Mateen (Additional Registrar FUUAST Islamabad)
1.5 Overview
This document provides the introduction of the (MBMS), the positioning information
(which includes business opportunity, problem statement, and System position
statement), stakeholders and the description of their interaction with the Desktop based
system, and system overview.
P a g e 11
2.0 Positioning
P a g e 12
management, department management, employee
management, employee dependent management, application
generation, medical billing would assist management of the
FUUAST to keep record properly maintained and would
provide efficient environment in order to make work easy and
reliable.
The system will be reliable and efficient.
Our Product Uses new technologies for development. This system is going to be
built by keeping in mind the latest business requirements. By
providing better performance, security, reliability so that the business
runs efficient and fast.
All the required modules like security management, user management,
department management, employee management, employee dependent
management, application generation, medical billing would assist
management of the FUUAST to keep record properly maintained
They will provide all requirements Ensure that the system will
Administrator that are required to complete the have all records. Also create
(Primary Actor) product. record, maintain record,
generate and view reports.
Assistant He will provide all requirements Ensure that the system will
(Primary Actor) that are required regarding MBMS have all records. Also
to complete the product. generate, add data and view
reports.
Additional He will provide all requirements Ensure that the system will
Registrar that are required regarding MBMS have all records. Also
(Primary Actor) to complete the product. generate, approve/not approve
status and view reports.
P a g e 13
Assistant Ensure that the system will
Registrar He will provide all requirements have all records. Also
(Primary Actor) that are required regarding MBMS generate and view reports.
to complete the product.
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.
P a g e 14
be easy to access each and every record available in (MBMS) when needed at once or at
different times. Efficient reporting will also be provided.
4. System Overview
This system is being made to replace the old system. The main idea is to have easy
access to the records and managing them efficiently. This system which is being
designed would provide the main feature of digitally accessing the different records,
which was not possible before. The users will have their own accounts, separate
according to user category, where they will be able to enter records according to
privileges.
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.
P a g e 15
5. System Feature and Priorities
Security Management
Process Logging Priority: High
Forget Password Priority: High
Change Password Priority: High
User Management
Add User Priority: High
Search User Priority: High
Update User Priority: High
View User Priority: High
Log Generation Management
View Data Log Priority: High
Department Management
Add Department Priority: High
Update Department Priority: High
View all Department Priority: High
Hospital Management
Add Hospital Priority: High
Update Hospital Priority: High
View all Hospital Priority: High
Employee Management
Add Employee Priority: High
Search Employee Priority: High
Update Employee Priority: High
Employee Dependent Managment
Add Employee Dependent Priority: High
Search Employee Dependent Priority: High
Update Employee Dependent Priority: High
View Employee Dependent Priority: High
Medical Quota Management
Add Quota Priority: High
Search Quota Priority: High
Update Quota Priority: High
View Quota Priority: High
Application Generation Management
Generate Medication Letter Priority: Low
P a g e 16
Search Application Priority: High
View Application Priority: High
Re-Imbrusement Status Management
Add Claim Priority: High
Search Claim Priority: High
Monitor Status Priority: Low
Update Claim Priority: High
View Claim Priority: High
6. Constraints
The system is compatible for any platform. Since we are using tools i.e. MySQL,
(VS 2010+), Visio 2010+ therefore the system on which this whole (MBMS) is
installed must be at least single core 2 GHZ.
P a g e 17
7. Quality Ranges
7.1 Accuracy
Our system will meet the specified requirements and give accurate results. The result
generated will be consistent and according to the requirements gathered by the
stakeholders.
7.2 Performance
The (MBMS) has a simple GUI, so that the users of the system will not have any
problem in handling the system. The overall experience of the usage will be
satisfactory.
Standard queries will take no longer than 2-3 second.
7.3 Security
Our (MBMS) provides better security by authenticating users and giving them access
to the system according to their privileges. Without proper authentication no one can
access the system.
7.4 Usability
The system will be easy to use. The (MBMS) has simple and attractive interface that has
all of the components arranged logically so that the users of the system will not have any
problem in handling the system. The overall experience of the usage will be satisfactory.
7.5 Availability
As the system is a desktop application, it will run 24/7 as the user wants it to run.
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
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
• Signature
1.4 Overview
This document contains the requirements of the Medical Billing Management
System (MBMS). All the functional Requirements are collected by the personal visit
to the organization.
Manager of the company Mr.Zeeshan provided the requirements and functionalities
by himself.
P a g e 22
2 Functional Requirements
P a g e 23
2.3 Department Management
P a g e 24
2.5 Employee Management
SRS-41 Other details of the employees i.e. employee id, name, father name,
CNIC, contact, date of birth, department, designation, BPS and medical
quota would be entered.
SRS-42 System would save this information.
2.5.2 Search Employee
SRS-43 System would give facility to search employees’ information on the basis
of employees’ Id, employee CNIC or employee name.
SRS-51 Other details of the employee i.e. dependent id, name, CNIC, age and
relation would be entered.
P a g e 25
information.
SRS-58 System would update this information.
SRS-61 Other details of the employee i.e. quota id, name, IPD and OPD would be
entered.
SRS-73 Administrator can search for employee on the basis of Employees’ id.
SRS-74 Administrator selects the information required for the medication letter.
SRS-75 System would generate the application.
P a g e 26
2.9 Re-imbursement Status
P a g e 27
SRS-95 System would give facility of generating report of employee bills on the
basis of employee id, medical expenses, and date.
SRS-96 Administrator can generate the reports of employees.
SRS-98 Standard Operating Procedure can be added into the system by the
Administrator.
2.11.2 Update Sop’s
SRS-99 Standard Operating Procedure can easily be updated by the Administrator.
2.11.3 View & Print Sop’s
SRS-100 Standard Operating Procedure can easily be viewed by the assistant and
administrator.
SRS-101 Standard Operating Procedure can be displayed by the assistant and
administrator.
SRS-105 Those primary actors can add signature who have the privileges.
2.13.2 Update Signature
SRS-106 Those primary actors can update signature who have the privileges.
3.1 Security
The system requires the users to identify themselves by using login id and
password. Any user who use the system shall have a login Id and a password.
P a g e 28
3.2 Usability
With proper guidance and use of manual, the required training time for a
normal users will not be more than two weeks.
3.3 Reliability
Availability: The system facility will be available to its users for 24
hours
Accuracy: The system will generate accurate results and will behave
according to the requirements.
Bugs or defect rate – Very little.
Robustness – our system will generate appropriate exceptions and
will handle those exceptions effectively.
Correctness – our system will be according to all the requirements
collected. All the requirements will be met.
3.4 Performance
The (MBMS) has a simple GUI, which is self-explanatory and user
friendly.
The lists, reports and results generated by the system will not take
more than 2 to 3 second.
Responses to queries shall take no longer than 4 to 5 second to load
onto the screen after the user submits the query.
The (MBMS) shall display confirmation messages to user within 1 to 2
second after the user submits information to the system. In other words
robustness is maintained.
Hardware Minimum Recommended
Processor 1 Core 2 GHz Dual Core 2+ GHz
RAM 1 GB 2 GB
Hard-drive 20 GB *As Required
Printer Any Any
3.5 RESOURCE REQUIRED
3.6 Design Constraints
Rational Unified Process model will be used for the design purposes and UML will
be used for the diagrams in MS Visio. C# language will be used for the development
and for the database, Microsoft SQL server will be used. So, we must be familiar
with these constraints.
3.7 User Help/ manuals
Detailed System Manuals are given to the systems’ users and two days training
session will be held to ensure that the users of the system fully understand the system
and get the maximum benefit from the system.
P a g e 29
4. External Interface Requirements
Version 1.1
Prepared by
Hassnain Rafique
P a g e 30
&
Wasaf Ul Hassan
11thSep, 2020
Revision History
P a g e 31
This covers the major use case Hassnain Rafique /
1.2 11th Sep, 2020
documents Wasaf Ul Hassan
P a g e 32
P a g e 33
P a g e 34
P a g e 35
P a g e 36
Fully Dressed Use Cases
Version 1.2
Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
11thSep, 2020
P a g e 37
Revision History
P a g e 38
User Action System Response
Priority: High
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how a user will Change the Password
P a g e 39
Post-Condition: User successfully change the password
Priority: High
Use case Description: This use case describes how a user will reset the password if forget
P a g e 40
System will prompt to “Fill the blank fields”
Priority: High
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how admin will Add User
P a g e 41
If user leaves any field blank
System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”
Priority: High
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how admin will Update the user information
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:
P a g e 42
System will prompt to “Enter Valid Data”
Priority: High
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how admin will view all users information
Stake Holders & Interest: Administrator: Wants to successfully view users information
P a g e 43
Cross-Reference: SRS16, SRS17, SRS18
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how a user will Add Department
Post-Condition: User successfully enters the department information into the system
Priority: High
P a g e 44
Use case ID: UC-08
Use case Name: Update Department
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how a Admin will Update the Department Information
Stake Holders & Interest: Administrator and Assistant: Wants to successfully Update Department
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Department data must be present in database before updating
P a g e 45
Use case ID: UC-09
Use case Name: View All Department
Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 21st Jan,2020
Use case updated by: Wasaf Ul Hassan Use case updated on: 21st Jan,2020
Use case Description: This use case describes how a user will view Department
P a g e 46
Use case Name: Add Hospital
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how a user will Add Hospital
Post-Condition: User successfully enters the Hospital information into the system
Priority: High
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
P a g e 47
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how a Admin will Update the Hospital Information
Stake Holders & Interest: Administrator and Assistant: Wants to successfully Update Hospital
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Hospital data must be present in database before updating
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
P a g e 48
Use case Description: This use case describes how admin will view all Hospital information
Stake Holders & Interest: Administrator and Assistant: Wants to successfully view Hospital information
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how a user will Add Employee Information
P a g e 49
Primary Actors: <Administrator><Assistant>
Administrator: Wants to successfully Add Employee Information
Stake Holders & Interest:
DEO: Wants to successfully Add Employee Information
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
Post-Condition: User successfully enters the Employee information into the system
Priority: High
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how a user will Search Employee
P a g e 50
DEO: Wants to successfully Search Employee
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Employee data must be present in database
Priority: High
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how admin will Update the Employee Information
P a g e 51
User Action System Response
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how a user will Add Employee Dependent Information
P a g e 52
System will insert all the information to the system And
2
Confirmation message is shown
Post-Condition: User successfully enters the Employee Dependent information into the system
Priority: High
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how a user will Search Employee Dependent
P a g e 53
3 Step 1-2 repeats if user repeat the process
Priority: High
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how admin will Update the Employee Dependent Information
Stake Holders & Interest: Administrator : Wants to successfully Update Employee Dependent
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Employee Dependent data must be present in database before updating
Main Success Scenario:
P a g e 54
Post-Condition: Admin successfully update Employee Dependent information
User search for Employee Dependent which doesn't exist
System will prompt to “Employee Dependent Not Found”
If user leaves any field blank
Extension Points:
System will prompt to “Fill the blank field”
If user enter invalid data in any field
System will prompt to enter “Valid Data”
Priority: High
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how admin will Add Quota
Post-Condition: Admin and assistant successfully add new Quota into the system
P a g e 55
If user leaves any field blank
System will prompt to “Fill the blank field”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”
Priority: High
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how admin will Search Quota information
P a g e 56
If user leaves the field blank
System will prompt to “Fill the blank field”
Priority: High
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 21th Jan,2020
Use case Description: This use case describes how admin will Update the Quota information
Stake Holders & Interest: Administrator : Wants to successfully Update Quota information
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Quota data must be present in database before updating
P a g e 57
If user enter invalid data in any field
System will prompt to “Enter Valid Data”
Priority: High
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 21th Jan,2020
Use case Description: This use case describes how admin will view all Quota information
Stake Holders & Interest: Administrator: Wants to successfully view Quota information
P a g e 58
Use case ID: UC-23
Use case Name: Generate Medication Letter
Use case
Use case Prepared by: Hassnain Rafique 11th Jan,2020
Prepared on:
Use case
Use case updated by: Hassnain Rafique 11th Jan,2020
updated on:
Use case Description: This use case describes how a admin will Generate Medication letter for Employees
Primary Actors: <Administrator><Assistant>
Stake Holders &
User: Wants to successfully Generates Medication letter for Employees
Interest:
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Employee data must be present in database before Generating Medication letter
Main Success Scenario:
System will process and add this selected information into the
4
predefined letter format
P a g e 59
Use case ID: UC-24
Use case Name: Add & Generate Medical claim
Use case Prepared by: Wasaf ul Hassan Use case Prepared on: 11th Jan,2020
Use case updated by: Wasaf Ul Hassan Use case updated on: 11th Jan,2020
Use case Description: This use case describes how a user will add & Generate Medical claim Information
Stake Holders & Interest: Administrator: Wants to successfully add Medical claim Information
Post-Condition: User successfully add medial claim information and update status
User search for Employee which doesn't exist
System will prompt to “Employee Not Found”
Extension Points:
If user enter invalid data in any field
System will prompt to enter “Valid Data”
Priority: High
P a g e 60
UC-25
Use case ID:
Use case Name: Search Medical Claim
Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 21stJan,2020
Use case updated by: Wasaf Ul Hassan Use case updated on: 21st Jan,2020
Use case Description: This use case describes how a user will search medical claim Information
Stake Holders & Interest: Administrator: Wants to successfully search medical claim Information
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
Priority: High
P a g e 61
Use case ID: UC-26
Use case Name: Monitor Status
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
This use case describes how admin will monitor the medical claim information of
Use case Description:
employees
Stake Holders & Interest: Administrator: Wants to successfully monitor medical claim status
Priority: High
Cross-Reference: SRS82
P a g e 62
Use case Name: View Medical claim
Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 11th Jan,2020
Use case updated by: Wasaf Ul Hassan Use case updated on: 11th Jan,2020
Use case Description: This use case describes how a user will view Medical claim status
Stake Holders & Interest: Administrator: Wants to successfully search Medical claim status
P a g e 63
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how a user will Add medical Bill Information
Stake Holders & Interest: Administrator: Wants to successfully Add Bill Information
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
Main Success Scenario:
Priority: High
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
P a g e 64
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
Use case Description: This use case describes how a user will Search Bill of employees
Stake Holders & Interest: Administrator and Users: Wants to successfully Search Bill of employees
Priority: High
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2020
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2020
P a g e 65
Use case Description: This use case describes how admin will view all Bills information
Stake Holders & Interest: Administrator and Users: Wants to successfully view Bills information
Use case Prepared by: Hassnain Rafique Use case Prepared on: 11th Jan,2019
Use case updated by: Hassnain Rafique Use case updated on: 11th Jan,2019
Use case Description: This use case describes how a admin will Generates Reports of employee medical expenses
P a g e 66
Primary Actors: Administrator><Assistant><AdditionalRegistrar><AssistantRegistrar><DeputyRegistrar>
Stake Holders & Administrator and Users: Wants to successfully Generate a Report of employee medical
Interest: expenses
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Bills data must be present in database
Main Success Scenario:
Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 8th Aug,2020
Use case updated by: Wasaf Ul Hassan Use case updated on: 8th Aug,2020
Use case Description: This use case describes how admin will Add & Attach SOPs
Stake Holders & Interest: Admin and Assistant: Wants to successfully Add & Attach SOPs
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Admin must have right to Add SOPs
Main Success Scenario:
P a g e 67
User Action System Response
Priority: High
Cross-Reference: SRS98
Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 8th Aug,2020
Use case updated by: Wasaf Ul Hassan Use case updated on: 8th Aug,2020
Use case Description: This use case describes how admin will update SOPs
Stake Holders & Interest: Admin and Assistant: Wants to successfully Add Quota
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Admin must have right to update SOPs
Main Success Scenario:
P a g e 68
Admin will enter the information of SOPs to be
1
updated
Priority: High
Cross-Reference: SRS99
Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 8th Aug,2020
Use case updated by: Wasaf Ul Hassan Use case updated on: 8th Aug,2020
Use case Description: This use case describes how admin will view & Print SOPs
Stake Holders & Interest: Admin and Assistant: Wants to successfully view & print SOPs
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Admin and assistant must have right to view SOPs
Main Success Scenario:
P a g e 69
3 Step 1-2 repeats if user repeat the process
Priority: High
Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 11th Sep, 2020
Use case updated by: Wasaf Ul Hassan Use case updated on: 11th Sep, 2020
Use case Description: This use case describes how users will view application
Stake Holders & Interest: Admin and Users: Wants to successfully view application
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Admin and users must have right to view application
P a g e 70
Main Success Scenario:
Priority: High
Cross-Reference: SRS102
Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 11th Sep, 2020
Use case updated by: Wasaf Ul Hassan Use case updated on: 11th Sep, 2020
Use case Description: This use case describes how users will update the status of the application
Stake Holders & Interest: Admin and Users: Wants to successfully update the status of the application
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Admin and users must have right to update the status
Main Success Scenario:
P a g e 71
1 User will click on the application status button
Priority: High
Cross-Reference: SRS103
Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 11th Sep, 2020
Use case updated by: Wasaf Ul Hassan Use case updated on: 11th Sep, 2020
Use case Description: This use case describes how users will monitor the status of the application
Stake Holders & Interest: Admin and Users: Wants to successfully monitor the status of the application
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Admin and users must have right to monitor the status
Main Success Scenario:
P a g e 72
2 System will show different application status
Priority: High
Cross-Reference: SRS104
Use case Prepared by: Wasaf Ul Hassan Use case Prepared on: 11th Sep, 2020
Use case updated by: Wasaf Ul Hassan Use case updated on: 11th Sep, 2020
Use case Description: This use case describes how users will add signature to the application
Stake Holders & Interest: Admin and Users: Wants to successfully monitor the status of the application
4. System must be in running state
Pre-Condition: 5. System must authenticate the user
6. Admin and users must have right to add signature to the application
Main Success Scenario:
P a g e 73
System will show a dialogue box to the user from where
4
he can select signature
Priority: High
Cross-Reference: SRS105
Use case Description: This use case describes how users will update signature to the application
Stake Holders & Interest: Admin and Users: Wants to successfully update the signature
1. System must be in running state
Pre-Condition: 2. System must authenticate the user
3. Admin and users must have right to update signature to the application
Main Success Scenario:
P a g e 74
5 System will save the record/pic in the database
Priority: High
Cross-Reference: SRS106
Version 1.1
Prepared by
Hassnain Rafique
&
P a g e 75
Wasaf Ul Hassan
11th Jan, 2020
Revision History
P a g e 76
2.4 System Sequence Diagram
Administrator/Assistant :System
userLogin(username,password)
P a g e 77
SSD: 02 Change Password
Administrator/
:System
Assistant
changePassword(oldpassword,newpassword)
P a g e 78
SSD: Update User
P a g e 79
SSD: Add Department
P a g e 80
SSD: View Department
P a g e 81
SSD: Update Hospital
P a g e 82
SSD: Add Employee
P a g e 83
SSD: Update Employee
P a g e 84
SSD: Add Employee Dependent
P a g e 85
SSD: Update Employee Dependent
P a g e 86
SSD: Search Medical Quota
P a g e 87
SSD: View Medical Quota
P a g e 88
SSD: Add Medical Claim
P a g e 89
SSD: View Medical CLaim
P a g e 90
SSD: Search Bill
P a g e 91
SSD: Generate Bill Report
P a g e 92
SSD: Update SOPs
P a g e 93
SSD: Add Signature
P a g e 94
SSD: View Application
P a g e 95
SSD: Monitor Application
P a g e 96
Entity Relationship Diagram
Version 1.1
Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
11th Sep, 2020
P a g e 97
Revision History
P a g e 98
P a g e 99
Normalization
Version 1.2
Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
11th Sep, 2020
Revision History
P a g e 100
Version Description Author Date
1.1 TBLUserLogin
P a g e 101
department_id (FK)
1.3 TblEmployeeDependent
1.4 TblDepartment
P a g e 102
departmentID (PK) departmentName
1.5 TblHospital
hospitalID (PK) hospitalName hospitalAddress
1.6 TblMedicalQuota
P a g e 103
3NF: Transitive Dependency is also not exists as non-key Attributes are not dependent on each
other) so there will not be any changes in the table and remain the same.
1.7 TblMedicalClaim
claimId (PK) claimPayment claimDescription claimType
1.8 TblMedicalBilling
billingID (PK) medicalDescription medicalExpenses BillingMonth
P a g e 104
AddedOn BillNo quotaID(FK employeeID(FK hospitalID(FK)
BillType ) )
1.9 TblDependentClaim
dependentClaimId(PK) ClaimId(FK) dependentId(FK)
1.10 TBLMedicalRequestIssue
mRequestId(PK) dateTime TreatmentType consultantName
P a g e 105
1NF: Primary Key is not repeating so, it is in 1NF
2NF: Partial Function Dependency also not exists because of so it is in 2NF
3NF: Transitive Dependency is also not exists as non-key Attributes are not dependent on each
other) so there will not be any changes in the table and remain the same.
1.13 TblDependentRequest
1.12 TblSecurityQuestions
securityQId(PK) ansOne ansTwo ansThree
ansFour userId(FK)
1.11 TblSop
sopID sopDescription
1.14 TblSignature
SignId(PK) Signature Designation UserId(FK)
Domain Model
107 | P a g e
Version 1.2
Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
11thSep, 2020
Revision History
109 | P a g e
110 | P a g e
Relational Model
Version 1.2
Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
11th Sep, 2020
Revision History
111 | P a g e
Version Description Author Date
Table of User:
1.1 TBLUSERLOGIN
112 | P a g e
EmployeeCNIC nVarchar(50) Not Null No No
employeeContact nVarchar(50) Not Null No No
EmployeeDOB Varchar(50) Not Null No No
employeeBPS Varchar(50) Not Null No No
picture Image Allow Null No No
departmentID Int Not Null No Yes
Table of EmployeeDependent:
1.3 TBLEMPLOYEEDEPENDENT
Table of Department:
1.4 TBLDEPARTMENT
Table of Hospital:
1.5 TBLHOSPITAL
Table of MedicalClaim:
1.6 TBLMEDICALCLAIM
113 | P a g e
claimPayment int Not Null No No
Table of MedicalQuota:
1.7 TBLMEDICALQUOTA
Table of MedicalBilling:
1.8 TBLMEDICALBILLING
114 | P a g e
employeeID Varchar(50) Not Null No Yes
Table of SOP:
1.10 TBLSOP
115 | P a g e
Attributes Data Types Constraints Primary Key Foreign Key
Table of Signature:
1.14 TBLSIGNATURE
116 | P a g e
Features Accessibility
Version 1.0
Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
11th Sep, 2020
117 | P a g e
Revision History
118 | P a g e
Administration Access:
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:
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
119 | P a g e
1. Login and Change password
2. Forget password
3. Add security questions
4. View, monitor the application status and can also approve/disapprove application
5. Search and monitor the imbursement status
6. Search bill and can also get reports of the bills
3. CHAPTER
CONSTRUCTION
120 | P a g e
Class Diagram
Version 1.2
Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
11th Sep, 2020
121 | P a g e
Revision History
122 | P a g e
123 | P a g e
Implementation Code
Version 1.1
Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
12th Sep, 2020
Revision History
124 | P a g e
This cover the code of the Hassnain Rafique
1.0 22nd Aug, 2020
system Wasaf Ul Hassan
Implementation Code:
EF-Model:
125 | P a g e
AddUser.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
126 | P a g e
using System.Windows.Forms;
using DAL;
namespace MBMS
{
public partial class AddUser : MetroFramework.Forms.MetroForm
{
public AddUser()
{
InitializeComponent();
}
if (rdbAssistant.Checked)
{
obj.userType = rdbAssistant.Text;
}
dc.tblUserLogins.Add(obj);
}
catch (Exception ex)
{
127 | P a g e
MessageBox.Show(ex.Message);
}
}
else if (btnSubmit.Text=="Update")
{
try
{
string UserID = metroGrid2.SelectedRows[0].Cells[0].Value.ToString();
var result = (from u in dc.tblUserLogins where u.userID == UserID select u).SingleOrDefault();
if (result != null)
{
result.userName = txtName.Text;
result.userID = txtUserId.Text;
result.userPassword = txtPassword.Text;
if (dc.SaveChanges() > 0)
{
lblErrorMessage1.Visible = true;
lblErrorMessage1.ForeColor = Color.Green;
lblErrorMessage1.Text = "User Information is Updated Successfully";
txtUserId.Text = "";
txtName.Text = "";
txtPassword.Text = "";
txtUserId.ReadOnly = false;
btnSubmit.Text = "Add";
metroGrid2.DataSource = getAllRecords();
}
}
}
catch (Exception ex)
{
lblErrorMessage1.Visible = true;
lblErrorMessage1.ForeColor = Color.Red;
lblErrorMessage1.Text = ex.Message;
}
}
this.BackColor = Color.White;
}
public List<tblUserLogin> getAllRecords()
{
MBMSEntities dc = new MBMSEntities();
try
{
var result = from u in dc.tblUserLogins
orderby u.userName
128 | P a g e
select u;
return result.ToList();
}
catch (Exception)
{
throw;
}
}
try
{
}
}
catch (Exception ex)
{
lblErrorMessage1.Visible = true;
lblErrorMessage1.ForeColor = Color.Red;
lblErrorMessage1.Text = ex.Message;
}
129 | P a g e
}
}
namespace MBMS
{
public partial class FormAboutUs : MetroFramework.Forms.MetroForm
{
public FormAboutUs()
{
InitializeComponent();
}
namespace MBMS
{
public partial class FormApplicationStatus : MetroFramework.Forms.MetroForm
{
string _userID;
public FormApplicationStatus(string userID)
{
InitializeComponent();
_userID = userID;
130 | P a g e
}
MBMSEntities dc = new MBMSEntities();
private void FormApplicationStatus_Load(object sender, EventArgs e)
{
radGridView2.TableElement.RowHeight = 30;
this.tblMedicalRequestIssueTableAdapter1.Fill(this.mBMSDataApplicationStatus.tblMedicalRequestIssue);
}
int? OPDUsage;
int? IPDUsage;
int? OPDRemaining;
int? IPDRemaining;
if (e.ColumnIndex == 8)
{
FormARApplicationStatus.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
131 | P a g e
using System.Data.SqlClient;
namespace MBMS
{
public partial class FormARApplicationStatus : MetroFramework.Forms.MetroForm
{
string _userID;
public FormARApplicationStatus(string userID)
{
InitializeComponent();
_userID = userID;
}
MBMSEntities dc = new MBMSEntities();
private void FormApplicationStatus_Load(object sender, EventArgs e)
{
radGridView2.TableElement.RowHeight = 30;
this.tblMedicalRequestIssueTableAdapter1.Fill(this.mBMSDataApplicationStatus.tblMedicalRequestIssue);
this.tblMedicalRequestIssueTableAdapter.Fill(this.mBMSDataSetApplicationStatus.tblMedicalRequestIssue);
}
int? OPDUsage;
int? IPDUsage;
int? OPDRemaining;
int? IPDRemaining;
if (e.ColumnIndex == 8)
{
namespace MBMS
{
public partial class FormAssistantMainPage : MetroFramework.Forms.MetroForm
{
string _userID;
public FormAssistantMainPage(string userID)
{
InitializeComponent();
_userID = userID;
}
133 | P a g e
if (panelEmployee.Height == 41)
{
panelEmployee.Height = 127;
}
else
{
panelEmployee.Height = 41;
}
}
134 | P a g e
}
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;
}
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;
135 | P a g e
try
{
throw;
}
}
private void btnNext_Click(object sender, EventArgs e)
{
MBMSEntities dc = new MBMSEntities();
try
{
drpEmployee.Text = "";
txtAmount.Text = "0";
radGridView1.DataSource = getBillingRecord();
136 | P a g e
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
137 | P a g e
}
}
return 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();
}
FormChangePassword.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using DAL;
namespace MBMS
{
138 | P a g e
public partial class FormChangePassword : MetroFramework.Forms.MetroForm
{
public FormChangePassword(string userID)
{
InitializeComponent();
txtUserID.Text = userID;
txtUserID.ReadOnly = true;
lblErrorMessage12.Visible = true;
lblErrorMessage12.ForeColor = Color.Green;
lblErrorMessage12.Text = "Your password is changed your new password is " + "'" +
txtNewPswd.Text + "'";
txtOldPswd.Text = "";
txtNewPswd.Text = "";
txtConfirmPswd.Text = "";
}
}
else
{
lblErrorMessage12.Visible = true;
lblErrorMessage12.ForeColor = Color.Red;
lblErrorMessage12.Text = "New password and confirm password didn't match";
}
}
else
{
lblErrorMessage12.Visible = true;
139 | P a g e
lblErrorMessage12.ForeColor = Color.Red;
lblErrorMessage12.Text = "Old Password Is inCorrect";
}
}
}
catch (Exception)
{
throw;
}
}
FormClaimSearch.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
using RadGridReportingLite;
using Telerik.Reporting;
using Telerik.Reporting.Processing;
using Telerik.WinControls.UI;
140 | P a g e
namespace MBMS
{
document.Watermark.ImagePath = filename ;
document.Watermark.ImageHOffset = 325;
document.Watermark.ImageVOffset = 360;
document.Watermark.ImageOpacity = 50;
document.FooterFont = new Font("Arial", 12);
document.RightFooter = UserID.userName;
document.LeftFooter = "Printed on [Date Printed] [Time Printed].";
document.ReverseFooterOnEvenPages = true;
document.AssociatedObject = this.radGridView1;
RadPrintPreviewDialog dialog = new RadPrintPreviewDialog(document);
dialog.ShowDialog();
}
public string getLogoPath()
{
string fileName = "";
var parent = Directory.GetParent(Directory.GetCurrentDirectory()).Parent;
if (parent != null)
141 | P a g e
{
var directoryInfo = parent.Parent;
string startDirectory = null;
if (directoryInfo != null)
{
startDirectory = directoryInfo.FullName;
}
if (startDirectory != null)
{
String[] subdirs = Directory.GetDirectories(startDirectory);
foreach (var item in subdirs)
{
if (item.Contains("Icons"))
{
fileName= item + "/Logo.PNG";
}
}
}
}
return fileName;
}
private void btnExport_Click(object sender, EventArgs e)
{
FormOptions form = new FormOptions();
form.ShowDialog(this);
if (form.DialogResult == DialogResult.OK)
{
RadGridReport report = new RadGridReport(String.Format("Report {0}", "Medical Claim"));
report.FitToPageSize = form.FitToPage;
report.UseGridColors = form.UseGridColors;
report.AllMargins = form.SetAllMargins;
report.PaperKind = form.PaperKind;
report.PageLandScape = form.IsLandScape;
report.ReportWindowState = FormWindowState.Maximized;
report.ReportSize = new Size(800, 350);
report.RepeatTableHeader = form.RepeatHeaderRow;
report.ReportForm(this.radGridView1);
}
}
FormDepartment.cs
142 | P a g e
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
namespace MBMS
{
public partial class FormDepartment : MetroFramework.Forms.MetroForm
{
public FormDepartment()
{
InitializeComponent();
}
try
{
tblDepartment obj = new tblDepartment();
obj.departmentName = txtDepartment.Text;
dc.tblDepartments.Add(obj);
if (txtDepartment.Text == "")
{
lblErrorMessage6.Visible = true;
lblErrorMessage6.ForeColor = Color.Red;
lblErrorMessage6.Text = "Please enter department name";
}
else if (dc.SaveChanges() > 0)
{
lblErrorMessage6.Visible = true;
lblErrorMessage6.ForeColor = Color.Green;
lblErrorMessage6.Text = "Department name is saved";
txtDepartment.Text = "";
GridDepartment.DataSource = getAllRecords();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
else if (btnSubmit.Text == "Update")
{
143 | P a g e
var result = (from u in dc.tblDepartments where u.departmentId == depID select u).SingleOrDefault();
if (result != null)
{
result.departmentName = txtDepartment.Text;
if (dc.SaveChanges() > 0)
{
lblErrorMessage6.Visible = true;
lblErrorMessage6.ForeColor = Color.Green;
lblErrorMessage6.Text = "Department name is Updated";
txtDepartment.Text = "";
btnSubmit.Text = "Add";
GridDepartment.DataSource = getAllRecords();
}
}
}
}
public List<tblDepartment> getAllRecords()
{
MBMSEntities dc = new MBMSEntities();
try
{
var result = from u in dc.tblDepartments orderby u.departmentId select u;
return result.ToList();
}
catch (Exception)
{
throw;
}
}
try
{
144 | P a g e
depID = Convert.ToInt32(GridDepartment.SelectedRows[0].Cells[0].Value.ToString());
tblDepartment obj = new tblDepartment();
var result = (from u in dc.tblDepartments where u.departmentId == depID select u).SingleOrDefault();
if (result != null)
{
btnSubmit.Text = "Update";
txtDepartment.Text = result.departmentName;
}
}
catch (Exception ex)
{
lblErrorMessage6.Text = ex.Message;
}
}
}
FormDRApplicationStatus.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
using System.Data.SqlClient;
namespace MBMS
{
public partial class FormDRApplicationStatus : MetroFramework.Forms.MetroForm
{
string _userID;
public FormDRApplicationStatus(string userID)
{
InitializeComponent();
_userID = userID;
}
MBMSEntities dc = new MBMSEntities();
private void FormApplicationStatus_Load(object sender, EventArgs e)
{
radGridView2.TableElement.RowHeight = 30;
this.tblMedicalRequestIssueTableAdapter2.Fill(this.mBMSDataSetDRApplicationStatus.tblMedicalRequestIssue);
this.tblMedicalRequestIssueTableAdapter1.Fill(this.mBMSDataApplicationStatus.tblMedicalRequestIssue);
this.tblMedicalRequestIssueTableAdapter.Fill(this.mBMSDataSetApplicationStatus.tblMedicalRequestIssue);
145 | P a g e
int? OPDUsage;
int? IPDUsage;
int? OPDRemaining;
int? IPDRemaining;
if (e.ColumnIndex == 8)
{
FormEmployeeInformation.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
namespace MBMS
{
public partial class FormEmployeeInformation : MetroFramework.Forms.MetroForm
{
string employeeID;
string fileName;
146 | P a g e
public FormEmployeeInformation(string empID)
{
InitializeComponent();
employeeID = empID;
}
public FormEmployeeInformation()
{
InitializeComponent();
this.tblDepartmentTableAdapter1.Fill(this.mBMSDataSet12.tblDepartment);
this.tblDependentTableAdapter2.Fill(this.mBMSDependent.tblDependent);
pictureBox1.Image = ConvertBinaryToImage(display.Picture);
}
cmbDepartment.SelectedValue = display.departmentId;
var displayQuota = (from v in dc.tblMedicalQuotas
where v.employeeId == display.employeeId
select v).SingleOrDefault();
if (displayQuota != null)
{
txtOPD.Text =Convert.ToString(displayQuota.OPD);
txtIPD.Text = Convert.ToString(displayQuota.IPD);
}
GridDependent.DataSource = getAllDependent();
147 | P a g e
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
img.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
return ms.ToArray();
}
Image ConvertBinaryToImage(byte[] data)
{
ms = new MemoryStream(data);
return Image.FromStream(ms);
}
private void btnAdd_Click(object sender, EventArgs e)
{
MBMSEntities dc = new MBMSEntities();
try
{
if (btnAdd.Text == "Add")
{
tblEmployee obj = new tblEmployee();
obj.employeeId = txtEmployeeNo.Text;
obj.employeeName = txtEmployeeName.Text;
obj.employeeFatherName = txtFname.Text;
if (cmbDesignation.SelectedIndex == 10)
{
obj.employeeDesigntion = txtDesignation.Text;
}
else
{
obj.employeeDesigntion = cmbDesignation.SelectedItem.ToString();
}
obj.employeeBPS = txtBPS.Text;
obj.employeeCNIC = txtCNIC.Text;
obj.employeeContact = txtContactNo.Text;
obj.employeeDOB = dtDOB.Value;
obj.employeeAddress = txtAddress.Text;
if (pictureBox1.Image != null)
{
obj.Picture = ConvertImageToBinary(pictureBox1.Image);
}
obj.departmentId = Convert.ToInt32(cmbDepartment.SelectedValue);
dc.tblEmployees.Add(obj);
tblMedicalQuota objQuota = new tblMedicalQuota();
objQuota.OPD = Convert.ToInt32(txtOPD.Text);
objQuota.IPD = Convert.ToInt32(txtIPD.Text);
148 | P a g e
objQuota.employeeId = txtEmployeeNo.Text;
dc.tblMedicalQuotas.Add(objQuota);
if (
txtEmployeeName.Text == "" ||
txtFname.Text == ""
||
txtBPS.Text == "" ||
txtCNIC.Text == "" ||
txtContactNo.Text == "" ||
txtAddress.Text == "" ||
pictureBox1.Image == null ||
(dtDOB.Value == DateTime.Today))
{
lblErrorMessage7.Visible = true;
lblErrorMessage7.ForeColor = Color.Red;
lblErrorMessage7.Text = "Please insert data properly";
return;
}
else if (dc.SaveChanges() > 0 )
{
txtEmployeeName.Text = "";
txtFname.Text = "";
txtDesignation.Text = "";
txtBPS.Text = "";
txtCNIC.Text = "";
txtContactNo.Text = "";
dtDependentDOB.Value = DateTime.Today;
txtAddress.Text = "";
pictureBox1.Image = null;
lblErrorMessage7.Visible = true;
lblErrorMessage7.Text = "Data is inserted successfully \nPlease go to dependent Tab to Add
Dependents";
lblErrorMessage7.ForeColor = Color.Green;
}
}
display.employeeId = txtEmployeeNo.Text;
display.employeeName = txtEmployeeName.Text;
display.employeeDesigntion = txtDesignation.Text;
if (cmbDesignation.SelectedIndex == 10)
{
display.employeeDesigntion = txtDesignation.Text;
}
else
{
display.employeeDesigntion = cmbDesignation.SelectedItem.ToString();
}
display.employeeBPS = txtBPS.Text;
display.employeeContact = txtContactNo.Text;
display.employeeCNIC = txtCNIC.Text;
display.employeeFatherName = txtFname.Text;
display.employeeAddress = txtAddress.Text;
149 | P a g e
display.employeeDOB = dtDOB.Value;
if (pictureBox1.Image != null)
{
display.Picture = ConvertImageToBinary(pictureBox1.Image);
}
display.departmentId = Convert.ToInt32(cmbDepartment.SelectedValue);
var displayQuota = (from v in dc.tblMedicalQuotas
where v.employeeId == display.employeeId
select v).SingleOrDefault();
if (displayQuota != null)
{
displayQuota.OPD = Convert.ToInt32(txtOPD.Text);
displayQuota.IPD = Convert.ToInt32(txtIPD.Text);
}
else
{
tblMedicalQuota objQuota = new tblMedicalQuota();
objQuota.OPD = Convert.ToInt32(txtOPD.Text);
objQuota.IPD = Convert.ToInt32(txtIPD.Text);
objQuota.employeeId = txtEmployeeNo.Text;
dc.tblMedicalQuotas.Add(objQuota);
}
if (dc.SaveChanges() > 0)
{
lblErrorMessage7.Visible = true;
lblErrorMessage7.Text = "Record Is Updated Successfully";
lblErrorMessage7.ForeColor = Color.Green;
}
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
pictureBox1.Image = Image.FromFile(fileName);
}
}
}
public List<tblDependent> getAllRecord()
{
MBMSEntities dc = new MBMSEntities();
try
{
150 | P a g e
var result = from u in dc.tblDependents orderby u.employeeId select u;
return result.ToList();
}
catch (Exception)
{
throw;
}
}
}
}
else if (btnAddDependent.Text=="Update")
{
151 | P a g e
update.dependentDOB = dtDependentDOB.Value;
if (pictureBox2.Image != null)
{
update.dependentPicture = ConvertImageToBinary(pictureBox2.Image);
}
update.dependentRelation = cmbRelation.Text;
if (dc.SaveChanges() > 0)
{
GridDependent.DataSource = getAllDependent();
lblErrorMessage11.Visible = true;
lblErrorMessage11.Text = "Data is Updated successfully";
lblErrorMessage11.ForeColor = Color.Green;
btnAddDependent.Text = "Add";
txtDependentName.Text = "";
txtDependentCNIC.Text = "";
cmbRelation.Text = "";
pictureBox2.Image = null;
}
}
}
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;
}
}
152 | P a g e
try
{
depID = Convert.ToInt32(GridDependent.SelectedRows[0].Cells[6].Value.ToString());
tblDependent obj = new tblDependent();
var result = (from u in dc.tblDependents where u.dependentId == depID select u).SingleOrDefault();
if (result != null)
{
btnAddDependent.Text = "Update";
txtDependentName.Text = result.dependentName;
txtDependentCNIC.Text = result.dependentCNIC;
cmbRelation.Text = result.dependentRelation;
if (result.dependentPicture != null)
{
pictureBox2.Image = ConvertBinaryToImage(result.dependentPicture);
}
dtDependentDOB.Value = result.dependentDOB.Value;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
pictureBox2.Image = Image.FromFile(fileName);
}
}
}
153 | P a g e
lblErrorMessage7.Text = "Please enter letter(s) only";
}
else
{
lblErrorMessage7.Visible = false;
}
}
154 | P a g e
lblErrorMessage7.Visible = true;
lblErrorMessage7.ForeColor = Color.Red;
lblErrorMessage7.Text = "Please enter number(s) only";
}
else
{
lblErrorMessage7.Visible = false;
}
}
155 | P a g e
lblErrorMessage11.Visible = true;
lblErrorMessage11.Text = "Your selected date is invalid";
dtDependentDOB.Value = DateTime.Today;
}
else if (DateTime.Today > dtDependentDOB.Value)
{
lblErrorMessage11.Visible = false;
}
}
156 | P a g e
txtDesignation.Visible = true;
label4.Visible = false;
label17.Visible = true;
}
else
{
label4.Visible = true;
label17.Visible = false;
txtDesignation.Visible = false;
}
}
}
}
FormEmployeeList.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
using Telerik.WinControls.UI;
namespace MBMS
{
public partial class FormEmployeeList : MetroFramework.Forms.MetroForm
{
string _userId;
public FormEmployeeList(string userID)
{
InitializeComponent();
_userId = userID;
}
this.tblEmployeeTableAdapter1.Fill(this.mBMSEmp.tblEmployee);
this.tblEmployeeTableAdapter.Fill(this.dataEmployeeList.tblEmployee);
radGridView1.TableElement.RowHeight = 35;
157 | P a g e
{
string empID = radGridView1.SelectedRows[0].Cells[0].Value.ToString();
FormEmployeeInformation obj = new FormEmployeeInformation(empID);
obj.Show();
}
else
{
MessageBox.Show("Sorry you can't proceed", "Minimum OPD Limit");
}
}
else if (result.IPD <= 50000)
{
if (MessageBox.Show("This Employee has minimum OPD amount limit of " + result.IPD+ " \n Do
you want to continue?", "Minimum IPD Limit", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) ==
DialogResult.Yes)
{
158 | P a g e
FormApplicationForm objApp = new FormApplicationForm(empID,_userId);
objApp.Show();
}
else
{
MessageBox.Show("Sorry you can't proceed", "Minimum IPD Limit");
}
}
else
{
FormApplicationForm objApp = new FormApplicationForm(empID, _userId);
objApp.Show();
}
}
else if (e.ColumnIndex == 13)
{
string empID = radGridView1.SelectedRows[0].Cells[0].Value.ToString();
FormMedicalClaimInfo objclaim = new FormMedicalClaimInfo(empID);
objclaim.Show();
}
}
}
}
FormForgetPassword.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using DAL;
using System.Collections;
namespace MBMS
{
159 | P a g e
private void button2_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
else if (cmbQuestions.Text == "What was your favorite place?")
{
if (txtAnswer.Text == result.ansTwo)
{
Q1Matched = true;
}
else
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Answer didn't match with " + cmbQuestions.Text;
}
}
else if (cmbQuestions.Text == "Who is your favourite Politician")
{
160 | P a g e
if (txtAnswer.Text == result.ansThree)
{
Q1Matched = true;
}
else
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Answer didn't match with " + cmbQuestions.Text;
}
}
else if (cmbQuestions.Text == "What is Your favourite Color?")
{
if (txtAnswer.Text == result.ansFour)
{
Q1Matched = true;
}
else
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Answer didn't match with " + cmbQuestions.Text;
}
}
if (cmbQuestions1.Text == "What was the name of your childhood friend?")
{
if (txtAnswer1.Text == result.ansOne)
{
Q2Matched = true;
}
else
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Answer didn't match with " + cmbQuestions1.Text;
}
}
else if (cmbQuestions1.Text == "What was your favorite place?")
{
if (txtAnswer1.Text == result.ansTwo)
{
Q2Matched = true;
}
else
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Answer didn't match with " + cmbQuestions1.Text;
//MessageBox.Show("Answer not Matched for " + cmbQuestions1.Text);
}
}
else if (cmbQuestions1.Text == "Who is your favourite Politician")
{
if (txtAnswer1.Text == result.ansThree)
{
Q2Matched = true;
}
else
161 | P a g e
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Answer didn't match with " + cmbQuestions1.Text;
}
}
else if (cmbQuestions1.Text == "What is Your favourite Color?")
{
if (txtAnswer1.Text == result.ansFour)
{
Q2Matched = true;
}
else
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Answer didn't match with " + cmbQuestions1.Text;
}
}
}
}
else
{
lblErrorMessage13.Visible = true;
lblErrorMessage13.ForeColor = Color.Red;
lblErrorMessage13.Text = "Please enter correct user id";
}
}
catch (Exception)
{
throw;
}
}
}
162 | P a g e
FormGenerateApplication.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
using System.Data.SqlClient;
using System.IO;
using DAL;
namespace MBMS
{
public partial class FormGenerateApplication : Form
{
string empID;
string hosID;
string _UserID;
int? max;
string treatment;
string _signature;
int? _OPDUsage;
int? _OPDRemaining;
int? _IPDUsage;
int? _IPDRemaining;
if (userID=="Admin")
{
rdbApproved.Visible = false;
163 | P a g e
rdbNotApproved.Visible = false;
btnSubmit.Visible = false;
}
else if (userID=="Assistant")
{
rdbApproved.Visible = false;
rdbNotApproved.Visible = false;
btnSubmit.Visible = false;
}
SqlConnection con = new SqlConnection("Data Source=DESKTOP-T542DJ9;Initial
Catalog=MBMS;Integrated Security=True");
SqlDataAdapter da = new SqlDataAdapter("Select * from viewMedicalRequests where EmployeeID='" +
empID + "' and TransactionID= '" + max+ "' union all SELECT tblEmployee.employeeId,
a.dependentId,tblEmployee.employeeName dependentName, tblEmployee.employeeCNIC dependentCNIC,
tblEmployee.employeeDOB dependentDOB, 'Self' AS dependentRelation , a.dateTime,
a.TransactionID,tblEmployee.Picture dependentPicture, dbo.tblEmployee.Picture FROM dbo.tblMedicalRequestIssue
AS a INNER JOIN dbo.tblEmployee ON a.employeeId = dbo.tblEmployee.employeeId and
a.EmployeeID='" + empID + "' and dependentid=-1 and TransactionID= '" + max + "'", con);
if (con.State == ConnectionState.Closed)
{
con.Open();
}
try
{
this.crystalReportViewer1.ReportSource = rpt;
crystalReportViewer1.Refresh();
}
}
catch (Exception)
{
164 | P a g e
throw;
}
}
if (result != null)
{
if (result1 == "Approved")
{
rdbApproved.Visible = false;
rdbNotApproved.Visible = false;
btnSubmit.Visible = false;
if (parent != null)
{
if (startDirectory != null)
{
if (sign!=null)
{
fileName = sign;//startDirectory + "/MBMS/signatures/" + signaturePath;
}
else
{
fileName = "";
}
}
}
}
else if (result1 == "Not Approved")
{
fileName = "";
rdbApproved.Visible = false;
rdbNotApproved.Visible = false;
btnSubmit.Visible = false;
}
else
{
fileName = "";
165 | P a g e
}
if (rdbApproved.Checked == true)
{
if (parent != null)
{
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)
{
if (startDirectory != null)
{
if (sign != null)
{
fileName = sign;//startDirectory + "/MBMS/signatures/" + signaturePath;
166 | P a g e
}
else
{
fileName = "";
}
}
}
}
else if (result1 == "Not Approved")
{
fileName = "";
rdbApproved.Visible = false;
rdbNotApproved.Visible = false;
btnSubmit.Visible = false;
}
else
{
fileName = "";
}
}
return fileName;
}
}
}
167 | P a g e
FormHome.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using MetroFramework.Forms;
namespace MBMS
{
public partial class FormHome : MetroFramework.Forms.MetroForm
{
public FormHome(string userID)
{
InitializeComponent();
lblUser.Text = userID;
CustomizeDesign(); //invoke method in the constructor because when form runs. all the initial components
must be initialized.
}
public Form currentChildForm;
//create another method to hide the submenu that were previously opened
private void ShowSubmenu(Panel Submenu) // since all the submenues are in the panel. this method provides the
visibility of the submenu(show or hide)
{
if (Submenu.Visible == false)
{
HideSubmenu(); // called this method to hide submenu if any of them is opened
Submenu.Visible = true;
}
else //otherwise if any submenu is opened we hide the submenue.
Submenu.Visible = false;
}
168 | P a g e
private void Practice_Load(object sender, EventArgs e)
{
this.ControlBox = false;
pictureBox4.Visible = false;
lblTitle.Location = new Point(250, 17);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 24);
IsMdiContainer = true;
MdiClient chld;
chld.BackColor = this.BackColor;
}
}
}
}
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();
}
169 | P a g e
//objUser.FormBorderStyle = MetroFramework.Forms.FormBorderStyle.None;// remove boarder
//objUser.Dock = DockStyle.Fill;// completely fill panel4
//objUser.ShadowType = MetroFormShadowType.None;
//objUser.Show();// show the form
}
170 | P a g e
private void lblLogo_Click(object sender, EventArgs e)
{
//when click on FUUAST, every control will be on its original position like when app starts
pnlUserSubMenu.Visible = false;
//pnlBillSubMenu.Visible = false;
pnlBillSubMenu.Visible = false;
if (currentChildForm == null)
{
}
else
{
currentChildForm.Close();
lblTitle.Text = "MEDICAL BILLING MANAGEMENT SYSTEM";
lblTitle.Location = new Point(580, 17);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 24);
}
}
171 | P a g e
OpenChildForm(new FormEmployeeInformation());
HideSubmenu();
//Thread WorkerThread = new Thread(t =>
//{
//})
//{ IsBackground = true };
//WorkerThread.Start();
}
//pnlReimbursementSubMenu.Visible = false;
}
else if (pnlDesktopMenu.Width == 87)
{
pnlBillSubMenu.Visible = false;
}
}
}
private void btnMedicalClaim_Click_1(object sender, EventArgs e)
{
OpenChildForm(new FormPendingClaims());
172 | P a g e
private void btnSystemLog_Click(object sender, EventArgs e)
{
OpenChildForm(new FormSOPs());
HideSubmenu();
{
pictureBox4.Visible = false;
pnlHideShow.Visible = true;
pnlFUUAST.Width = 232;
pnlDesktopMenu.Width = 232;
picLogo.Visible = true;
}
}
173 | P a g e
private void pictureBox4_Click(object sender, EventArgs e)
{
if (pnlDesktopMenu.Width == 232 || pnlFUUAST.Width == 232)
{
pictureBox4.Visible = true;
pnlFUUAST.Width = 87;
pnlDesktopMenu.Width = 87;
pnlHideShow.Visible = false;
}
else
{
lblTitle.Location = new Point(580, 17);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 24);
picLogo.Visible = true;
pnlHideShow.Visible = true;
pnlFUUAST.Width = 232;
pnlDesktopMenu.Width = 232;
pictureBox4.Visible = false;
}
}
174 | P a g e
private void btnEmployeeList_MouseEnter(object sender, EventArgs e)
{
this.btnEmployeeList.BackColor = Color.FromArgb(0, 177, 89);
}
175 | P a g e
{
this.btnMedicalClaim.BackColor = Color.FromArgb(0, 177, 89);
}
private void btnSOPs_MouseHover(object sender, EventArgs e)
{
this.btnSOPs.BackColor = Color.FromArgb(0, 177, 89);
}
176 | P a g e
private void btnApplicationStatus_MouseHover(object sender, EventArgs e)
{
this.btnApplicationStatus.BackColor = Color.FromArgb(0, 177, 89);
}
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;
177 | P a g 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;
chld.BackColor = this.BackColor;
}
}
}
}
178 | P a g e
ChildForm.ShadowType = MetroFormShadowType.None;
ChildForm.Show();
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);
}
}
HideSubmenu();
}
179 | P a g e
private void btnEmployee_Click_1(object sender, EventArgs e)
{
MBMSEntities dc = new MBMSEntities();
var result = (from u in dc.tblUserLogins where u.userID == lblUser.Text select u.userType).SingleOrDefault();
if(result== "Additional Registrar")
{
OpenChildForm(new FormARApplicationStatus(lblUser.Text));
HideSubmenu();
}
else if (result == "Assistant Registrar")
{
OpenChildForm(new FormApplicationStatus(lblUser.Text));
HideSubmenu();
}
else if (result == "Deputy Registrar")
{
OpenChildForm(new FormDRApplicationStatus(lblUser.Text));
HideSubmenu();
}
}
else if (pnlDesktopMenu.Width == 87)
{
pnlBillSubMenu.Visible = false;
}
}
180 | P a g e
OpenChildForm(new FormSOPs());
HideSubmenu();
}
{
pictureBox4.Visible = false;
pnlHideShow.Visible = true;
pnlFUUAST.Width = 232;
pnlDesktopMenu.Width = 232;
picLogo.Visible = true;
}
}
181 | P a g e
pictureBox4.Visible = true;
pnlFUUAST.Width = 87;
pnlDesktopMenu.Width = 87;
pnlHideShow.Visible = false;
}
else
{
lblTitle.Location = new Point(580, 17);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 24);
picLogo.Visible = true;
pnlHideShow.Visible = true;
pnlFUUAST.Width = 232;
pnlDesktopMenu.Width = 232;
pictureBox4.Visible = false;
}
}
182 | P a g e
private void btnBill_MouseHover(object sender, EventArgs e)
{
this.btnBill.BackColor = Color.FromArgb(0, 177, 89);
}
183 | P a g e
}
}
}
namespace MetroFramework.Forms
{
class FormStyle2
{
public static System.Windows.Forms.FormBorderStyle None { get; internal set; }
}
}
FormHomeAssistant.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using MetroFramework.Forms;
namespace MBMS
{
public partial class FormHomeAssistant : MetroFramework.Forms.MetroForm
{
public FormHomeAssistant(string userID)
{
InitializeComponent();
lblUser.Text = userID;
CustomizeDesign(); //invoke method in the constructor because when form runs. all the initial components
must be initialized.
}
public Form currentChildForm;
//create another method to hide the submenu that were previously opened
184 | P a g e
private void ShowSubmenu(Panel Submenu) // since all the submenues are in the panel. this method provides the
visibility of the submenu(show or hide)
{
if (Submenu.Visible == false)
{
HideSubmenu(); // called this method to hide submenu if any of them is opened
Submenu.Visible = true;
}
else //otherwise if any submenu is opened we hide the submenue.
Submenu.Visible = false;
}
private void Practice_Load(object sender, EventArgs e)
{
this.ControlBox = false;
pictureBox4.Visible = false;
lblTitle.Location = new Point(250, 17);
lblTitle.Font = new Font(lblTitle.Font.FontFamily, 24);
IsMdiContainer = true;
MdiClient chld;
chld.BackColor = this.BackColor;
}
}
}
}
public void OpenChildForm(MetroForm ChildForm) //create method to open child form in the panel
{
if (currentChildForm != null)
{
//open only form
currentChildForm.Close();
}
currentChildForm = ChildForm;
ChildForm.TopLevel = false;
ChildForm.FormBorderStyle = MetroFramework.Forms.FormBorderStyle.None;
ChildForm.Dock = DockStyle.Fill;
pnlDesktop.Controls.Add(ChildForm);
pnlDesktop.Tag = ChildForm;
ChildForm.BringToFront();
ChildForm.ShadowType = MetroFormShadowType.None;
ChildForm.Show();
185 | P a g e
//blTitle.Text = ChildForm.Text;
//Thread WorkerThread = new Thread(t =>
//{
//})
//{ IsBackground = true };
//WorkerThread.Start();
}
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);
}
}
}
}
186 | P a g e
private void btnEmployee_Click_1(object sender, EventArgs e)
{
OpenChildForm(new FormEmployeeInformation());
HideSubmenu();
}
}
else if (pnlDesktopMenu.Width == 87)
{
pnlBillSubMenu.Visible = false;
}
}
}
private void btnMedicalClaim_Click_1(object sender, EventArgs e)
{
OpenChildForm(new FormPendingClaims());
187 | P a g e
private void metroRadioButton2_CheckedChanged(object sender, EventArgs e)
{
188 | P a g e
pnlDesktopMenu.Width = 87;
pictureBox4.Visible = true;
picLogo.Visible = false;
HideSubmenu();
}
else
{
pictureBox4.Visible = false;
pnlHideShow.Visible = true;
pnlFUUAST.Width = 232;
pnlDesktopMenu.Width = 232;
picLogo.Visible = true;
}
}
{
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;
}
}
189 | P a g e
private void btnEmployee_MouseEnter(object sender, EventArgs e)
{
this.btnEmployee.BackColor = Color.FromArgb(0, 177, 89);
}
190 | P a g e
{
this.btnBill.BackColor = Color.FromArgb(0, 177, 89);
}
191 | P a g e
}
namespace MetroFramework.Forms
{
class FormStyle
{
public static System.Windows.Forms.FormBorderStyle None { get; internal set; }
192 | P a g e
}
}
FormHospital.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
namespace MBMS
{
public partial class FormHospital : MetroFramework.Forms.MetroForm
{
public FormHospital()
{
InitializeComponent();
}
try
{
tblHospital obj = new tblHospital();
obj.hospitalName = txtHospital.Text;
obj.hospitalAddress = txtAddress.Text;
dc.tblHospitals.Add(obj);
if (txtHospital.Text == "" || txtAddress.Text=="")
{
lblErrorMessage8.Visible = true;
lblErrorMessage8.ForeColor = Color.Red;
lblErrorMessage8.Text = "Please fill required field";
}
else if (dc.SaveChanges() > 0)
{
lblErrorMessage8.Visible = true;
lblErrorMessage8.ForeColor = Color.Green;
lblErrorMessage8.Text = "Hospital Information is saved";
txtHospital.Text = "";
txtAddress.Text = "";
193 | P a g e
GridHospital.DataSource = GetAllRecords();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
else if (btnSubmit.Text == "Update")
{
var result = (from u in dc.tblHospitals where u.hospitalId == HosID select u).SingleOrDefault();
if (result != null)
{
result.hospitalName = txtHospital.Text;
result.hospitalAddress = txtAddress.Text;
if (dc.SaveChanges() > 0)
{
lblErrorMessage8.Visible = true;
lblErrorMessage8.ForeColor = Color.Green;
lblErrorMessage8.Text = "Hospital information is Updated";
txtHospital.Text = "";
txtAddress.Text = "";
btnSubmit.Text = "Add";
GridHospital.DataSource = GetAllRecords();
}
}
}
}
public List<tblHospital> GetAllRecords()
{
MBMSEntities dc = new MBMSEntities();
try
{
var result = from u in dc.tblHospitals orderby u.hospitalId select u;
return result.ToList();
}
catch (Exception)
{
throw;
}
}
194 | P a g e
lblErrorMessage8.Visible = false;
}
}
int HosID=-1;
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;
}
}
}
FormLog.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MBMS
{
195 | P a g e
public partial class FormLog : MetroFramework.Forms.MetroForm
{
public FormLog()
{
InitializeComponent();
}
}
}
private void Form1_Load(object sender, EventArgs e)
{
this.ControlBox = false;
this.viewApplicationLogTableAdapter.Fill(this.mBMSDataSetApplicationLog.ViewApplicationLog);
radGridView1.TableElement.RowHeight = 35;
}
}
}
FormMedicalClaimInfo.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
196 | P a g e
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
namespace MBMS
{
public partial class FormMedicalClaimInfo : MetroFramework.Forms.MetroForm
{
string employeeID;
public FormMedicalClaimInfo(string empID)
{
employeeID = empID;
InitializeComponent();
}
MBMSEntities dc = new MBMSEntities();
private void frmMedicalClaimInfo_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'mBMSDataSet10.tblDependent' table. You can move, or
remove it, as needed.
this.tblDependentTableAdapter.Fill(this.mBMSDataSet10.tblDependent);
try
{
var display = (from u in dc.tblEmployees where u.employeeId == employeeID select u).SingleOrDefault();
if(display!= null)
{
txtEmployeeId.Text = display.employeeId;
txtEmployeeName.Text = display.employeeName;
txtCNIC.Text = display.employeeCNIC;
txtDesignation.Text = display.employeeDesigntion;
txtContact.Text = display.employeeContact;
txtBPS.Text = display.employeeBPS;
txtAddress.Text = display.employeeAddress;
radGridView1.DataSource = getdependentRecord();
}
}
catch (Exception)
{
throw;
}
}
197 | P a g e
bool isSelected = Convert.ToBoolean(row.Cells["column1"].Value);
if (isSelected)
{
createMedicalClaim = true;
}
}
if (chkSelf.Checked == false && createMedicalClaim == false)
{
lblErrorMessage9.Visible = true;
lblErrorMessage9.ForeColor = Color.Green;
lblErrorMessage9.Text = "Please select dependent/Patient";
}
else
{
string treatmenttype = string.Empty; ;
tblMedicalClaim obj = new tblMedicalClaim();
obj.employeeId = txtEmployeeId.Text;
obj.claimStatus = "Pending";
obj.hospitalName = txtHospitalName.Text;
obj.claimType = cmbBillType.SelectedItem.ToString();
obj.claimPayment = Convert.ToInt32(txtClaimAmount.Text);
obj.claimDescription = txtDescription.Text;
obj.claimDate = DateTime.Now;
if (rdbTreatment.Checked)
{
obj.treatmentType = rdbTreatment.Text;
obj.admitOn = dtpAdmit.Value;
obj.dischargeOn = dtpDischarge.Value;
treatmenttype = rdbTreatment.Text;
}
else if (rdbFollow.Checked)
{
obj.treatmentType = rdbFollowUp.Text;
obj.consultantName = txtConsultName.Text;
treatmenttype = rdbFollow.Text;
}
else if (rdbLabTest.Checked)
{
obj.treatmentType = rdbLabTest.Text;
obj.labTest = txtLabTest.Text;
treatmenttype = rdbLabTest.Text;
}
dc.tblMedicalClaims.Add(obj);
if (dc.SaveChanges() > 0)
{
int? maxNumber = 0;
var getMaxTransaction = (from u in dc.tblMedicalRequestIssues //Select max
number/Transaction
select u).Max(x => x.TransactionID);
if (getMaxTransaction != null)
{
maxNumber = getMaxTransaction + 1; //Increment On Transaction Column
if (chkSelf.Checked)
{
tblDependentClaim objdependentClaim = new tblDependentClaim();
198 | P a g e
objdependentClaim.dependentId = -1;
objdependentClaim.claimId = obj.claimId;
dc.tblDependentClaims.Add(objdependentClaim);
}
foreach (var row in radGridView1.Rows)
{
}
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);
}
}
199 | P a g e
dtpAdmit.Visible = true;
label11.Visible = true;
dtpDischarge.Visible = true;
if (rdbTreatment.Checked != true)
{
label9.Visible = false;
dtpAdmit.Visible = false;
label11.Visible = false;
dtpDischarge.Visible = false;
}
}
200 | P a g e
{
if (DateTime.Today < dtpAdmit.Value)
{
lblErrorMessage9.Visible = true;
lblErrorMessage9.ForeColor = Color.Red;
lblErrorMessage9.Text = "Your selected date is invalid";
dtpAdmit.Value = DateTime.Today;
}
else if (DateTime.Today > dtpAdmit.Value)
{
// if(DateTime.MinValue <= )
lblErrorMessage9.Visible = false;
}
}
}
}
FormNewPassword.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
namespace MBMS
{
public partial class FormNewPassword : MetroFramework.Forms.MetroForm
{
string _UserId;
public FormNewPassword(string UserID)
201 | P a g e
{
InitializeComponent();
_UserId = UserID;
}
{
display.userPassword = txtNewPswd.Text;
if (dc.SaveChanges() > 0)
{
}
}
FormPendingClaim.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
202 | P a g e
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
using Telerik.WinControls.UI;
namespace MBMS
{
public partial class FormPendingClaims : MetroFramework.Forms.MetroForm
{
public FormPendingClaims()
{
InitializeComponent();
}
FormProcessClaim.cs
203 | P a g e
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
namespace MBMS
{
public partial class FormProcessClaim : MetroFramework.Forms.MetroForm
{
int _claimID;
public FormProcessClaim(int claimID)
{
InitializeComponent();
_claimID = claimID;
}
}
MBMSEntities dc = new MBMSEntities();
private void FormProcessClaim_Load(object sender, EventArgs e)
{
204 | P a g e
result.claimType = cmbBillType.SelectedItem.ToString();
}
else if (rdbNotApproved.Checked)
{
result.claimStatus = "Not Approved";
result.notApprovedReason = txtReason.Text;
}
var result1 = (from u in dc.tblMedicalQuotas where u.employeeId == result.employeeId select
u).FirstOrDefault();
if (result1 != null)
{
if (cmbBillType.SelectedItem == "OPD")
{
result1.OPD = result1.OPD - Convert.ToInt32(txtImbAmount.Text);
}
else if (cmbBillType.SelectedItem == "IPD")
{
result1.IPD = result1.IPD - Convert.ToInt32(txtImbAmount.Text);
}
}
if (dc.SaveChanges() > 0)
{
lblErrorMessage11.Visible = true;
lblErrorMessage11.ForeColor = Color.Green;
lblErrorMessage11.Text = "Amount is submitted successfully";
this.Close();
}
}
}
catch (Exception)
{
throw;
}
}
205 | P a g e
else
{
lblErrorMessage11.Visible = false;
}
}
}
}
FormSearchBill.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Telerik.WinControls.UI;
using DAL;
using System.IO;
namespace MBMS
{
public partial class FormSearchBill : MetroFramework.Forms.MetroForm
{
string _UserID;
public FormSearchBill(string UserId)
{
InitializeComponent();
_UserID = UserId;
}
document.Watermark.ImagePath = filename;
206 | P a g e
document.Watermark.ImageHOffset = 325;
document.Watermark.ImageVOffset = 360;
document.Watermark.ImageOpacity = 50;
document.FooterFont = new Font("Arial", 12);
document.RightFooter = UserID.userName;
document.LeftFooter = "Printed on [Date Printed] [Time Printed].";
document.ReverseFooterOnEvenPages = true;
document.AssociatedObject = this.radGridView1;
RadPrintPreviewDialog dialog = new RadPrintPreviewDialog(document);
dialog.ShowDialog();
}
public string getLogoPath()
{
string fileName = "";
var parent = Directory.GetParent(Directory.GetCurrentDirectory()).Parent;
if (parent != null)
{
var directoryInfo = parent.Parent;
string startDirectory = null;
if (directoryInfo != null)
{
startDirectory = directoryInfo.FullName;
}
if (startDirectory != null)
{
String[] subdirs = Directory.GetDirectories(startDirectory);
foreach (var item in subdirs)
{
if (item.Contains("Icons"))
{
fileName = item + "/Logo.PNG";
}
}
}
}
return fileName;
}
}
}
FormSecurityQuestions.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
namespace MBMS
{
public partial class FormSecurityQuestions : MetroFramework.Forms.MetroForm
{
string ID;
public FormSecurityQuestions(string userID)
207 | P a g e
{
InitializeComponent();
txtUserID.Text = userID;
txtUserID.ReadOnly = true;
ID = userID;
}
}
}
else
{
lblErrorMessage10.Visible = true;
lblErrorMessage10.ForeColor = Color.Green;
lblErrorMessage10.Text = "Answeres are already been saved";
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
208 | P a g e
private void FormSecurityQuestions_Load(object sender, EventArgs e)
{
this.ControlBox = false;
MBMSEntities dc = new MBMSEntities();
{
tblSecurityQuestion questions = new tblSecurityQuestion();
try
{
}
if (txtQone.Text != "" && txtQtwo.Text != "" && txtQthree.Text != "" && txtQfour.Text != "")
{
txtQone.ReadOnly = true;
txtQtwo.ReadOnly = true;
txtQthree.ReadOnly = true;
txtQfour.ReadOnly = true;
}
}
// throw;
}
209 | P a g e
if (!char.IsLetter(ch) && (ch != 8) && (ch != 46) && (ch != 32))
{
e.Handled = true;
lblErrorMessage10.Visible = true;
lblErrorMessage10.ForeColor = Color.Red;
lblErrorMessage10.Text = "Please enter letter(s) only";
}
else
{
lblErrorMessage10.Visible = false;
}
}
}
}
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;
210 | P a g e
using (OpenFileDialog ofd = new OpenFileDialog() { Filter = "JPEG|*.jpg|PNG|*.png", ValidateNames =
true, Multiselect = false })
{
if (ofd.ShowDialog() == DialogResult.OK)
{
pictureBox1.Image = new Bitmap(ofd.FileName);
fileName = ofd.FileName;
pictureBox1.Image = Image.FromFile(fileName);
}
}
}
}
}
else
{
MessageBox.Show("Please Select Signature");
}
}
else if (btnAdd.Text=="Add")
{
tblSign obj = new tblSign();
obj.userID = txtUserID.Text;
obj.designation = txtDesignation.Text;
if (pictureBox1.Image != null)
{
obj.sign = fileName;
dc.tblSigns.Add(obj);
if (dc.SaveChanges() > 0)
{
MessageBox.Show("Record inserted Successfully");
btnAdd.Text = "Update";
}
}
else
{
MessageBox.Show("Please Select Signature");
211 | P a g e
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
FileStream fs;
pictureBox1.Image = newImage;
btnAdd.Text = "Update";
}
}
}
FormSOP’s.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
namespace MBMS
{
public partial class FormSOPs : MetroFramework.Forms.MetroForm
{
212 | P a g e
public FormSOPs()
{
InitializeComponent();
}
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";
}
}
}
213 | P a g e
if (ofd.ShowDialog() == DialogResult.OK)
{
FileStream fs = File.OpenRead(ofd.FileName);
var assemblyPath = System.Reflection.Assembly.GetExecutingAssembly().Location;
var assemblyParentPath = Path.GetDirectoryName(assemblyPath);
var imageDir = Path.Combine(assemblyParentPath, "Image");
if (!Directory.Exists(imageDir))
Directory.CreateDirectory(imageDir);
}
}
}
}
}
FormViewApplication.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
using System.Data.SqlClient;
namespace MBMS
{
public partial class FormViewApplication : MetroFramework.Forms.MetroForm
{
214 | P a g e
string _userID;
public FormViewApplication(string userID)
{
InitializeComponent();
_userID = userID;
}
MBMSEntities dc = new MBMSEntities();
private void FormApplicationStatus_Load(object sender, EventArgs e)
{
radGridView2.TableElement.RowHeight = 30;
this.tblMedicalRequestIssueTableAdapter2.Fill(this.mBMSViewApplication.tblMedicalRequestIssue);
}
int? OPDUsage;
int? IPDUsage;
int? OPDRemaining;
int? IPDRemaining;
if (e.ColumnIndex == 7)
{
FrmLogin.cs
using DAL;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
215 | P a g e
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Threading;
namespace MBMS
{
public partial class FrmLogin : Form
{
public FrmLogin()
{
InitializeComponent();
}
try
{
var result = (from u in dc.tblUserLogins
where u.userID == txtUserName.Text && u.userPassword == txtPassword.Text
select u).SingleOrDefault();
if (result != null)
{
if (result.userType == "Admin")
{
FormHome obj = new FormHome(result.userID);
obj.OpenChildForm(new FormEmployeeList(result.userID));
obj.Show();
this.Hide();
obj.WindowState = FormWindowState.Maximized;
}
else if (result.userType == "Assistant Registrar")
{
FormHomeAdditionalRegistrar objAssistant = new FormHomeAdditionalRegistrar(result.userID);
objAssistant.Show();
this.Hide();
objAssistant.WindowState = FormWindowState.Maximized;
}
else if (result.userType == "Additional Registrar")
{
FormHomeAdditionalRegistrar objAdditional = new FormHomeAdditionalRegistrar(result.userID);
objAdditional.Show();
this.Hide();
objAdditional.WindowState = FormWindowState.Maximized;
}
else if (result.userType == "Deputy Registrar")
{
FormHomeAdditionalRegistrar objAdditional = new FormHomeAdditionalRegistrar(result.userID);
objAdditional.Show();
216 | P a g e
this.Hide();
objAdditional.WindowState = FormWindowState.Maximized;
}
else
{
FormHomeAssistant obj = new FormHomeAssistant(result.userID);
obj.Show();
this.Hide();
obj.WindowState = FormWindowState.Maximized;
}
}
else
{
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;
}
}
}
217 | P a g e
Application.Exit();
}
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;
}
218 | P a g e
}
rpt.SetParameterValue("Designation", display.employeeDesigntion);
if (display1.treatmentType== "Admission/Treatment")
{
treatmentResult = "Admit on: " + display1.admitOn.Value.ToString("dd/MM/yyyy") +" "+ "
Discharge on: " + display1.dischargeOn.Value.ToString("dd/MM/yyy");
}
else if(display1.treatmentType == "Follow Up")
{
treatmentResult = display1.consultantName;
}
else if (display1.treatmentType == "Lab Test")
{
treatmentResult = display1.labTest;
}
else if (display1.treatmentType == "Check Up Only")
{
treatmentResult = "";
}
rpt.SetParameterValue("Treatment Result", treatmentResult);
219 | P a g e
}
this.crystalReportViewer1.ReportSource = rpt;
crystalReportViewer1.Refresh();
}
}
catch (Exception)
{
throw;
}
}
}
}
SopPrint.cs
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DAL;
using System.Data.SqlClient;
namespace MBMS
{
public partial class sopPrint : Form
{
string _Sop;
public sopPrint(string SOP)
{
InitializeComponent();
_Sop = SOP;
}
220 | P a g e
var display = (from u in dc.tblSOPs where u.sopDescription != "" select u).SingleOrDefault();
if (display != null)
{
DataView dv = new DataView();
dv.Table = ds.Tables[0];
MBMS.CrystalReportSOP rpt = new MBMS.CrystalReportSOP();
rpt.SetDataSource(dv);
this.crystalReportViewer.ReportSource = rpt;
crystalReportViewer.Refresh();
}
}
catch (Exception)
{
throw;
}
}
}
}
221 | P a g e
Test Cases
Version 1.1
Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
22nd Aug, 2020
Revision History
222 | P a g e
Version Description Author Date
223 | P a g e
Test case ID: TC-01
Test Case Name: Process Login
Test Case Wasaf Ul Use Test 8/18/2020
created by: Hassan created on:
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
224 | P a g e
Test Case Wasaf Ul Hassan Test Case 8/18/2020
Created By: Created On:
Updated By: Hassnain Rafique Updated On: 8/18/2020
Test Case Description: This Test case describes that user can change the password
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
Priority: High
Frequency Less frequent in use
Test Acceptance: Passed
225 | P a g e
Test Case Name: Forget Password
Test Case Description: This Test case describes that can user get the forgotten
password
Testing Requirement:
Testing Condition: System must be in running state.
226 | P a g e
Priority: High
Test Case Description: This Test case describes that can user add a new user
Primary Actor: <Administrator>
227 | P a g e
Frequency : Less frequent in use
Test Acceptance: Passed
Test Case Description: This Test case describes that can user update a user
228 | P a g e
Test case ID: TC-06
Test Case Name: Add Department
Test Case Wasaf Ul Hassan Test Case 8/18/2020
created by: created on:
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
229 | P a g e
Test case ID: TC-07
Test Case Name: Update Department
Test Case created by: Wasaf Ul Hassan Test Case created on: 8/18/2020
Test Case Updated By: Hassnain Rafique Test Case Updated On: 8/18/2020
Test Case Description: This Test case describes that can user update
the departments
230 | P a g e
Test Acceptance: Passed
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
231 | P a g e
Test Case Hassnain Rafique Test Case 8/18/2020
Updated By: Updated On:
Test Case Description: This Test case describes that can user add a new hospital
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
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
232 | P a g e
User Action System Response
1 User Selects update department.
-
2 System will enable the user to update
department
3 User will enter the
- Information i.e hospital name and
hospital address.
4 System will insert all the information to the
system and confirmation message will be
shown.
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.
Priority: High.
Frequency Less frequent
Test Acceptance: Passed
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
233 | P a g e
Main success scenario:
User Action System Response
1- User selects the hospital tab
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
234 | P a g e
4- System will process and insert all the
information into the system and
confirmation message will be shown.
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.
Priority: High.
Frequency Most frequent
Test Acceptance: Passed
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.
235 | P a g e
4- System will verify the information and
show the employees’ information to the
user.
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.
Priority: High
Frequency Most frequent in use
Test Acceptance: Passed
236 | P a g e
-
2 System will enable the user to update information of
- the employee
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.
Priority: High.
Frequency Most frequent
Test Acceptance: Passed
237 | P a g e
Primary Actor: <Administrator><Assistant>
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
Priority: High
Frequency Most frequent in use
Test Acceptance: Passed
238 | P a g e
Test Case Hassnain Rafique Test Case 8/19/2020
Updated By: Updated On:
Test Case Description: This Test case describes that can user Search employee
dependent information from the System.
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.
Priority: High
Frequency Most frequent in use
Test Acceptance: Passed
239 | P a g e
Test case ID: TC-17
Test Case Name: Update Employee Dependent
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:
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
240 | P a g e
Priority: High
Frequency Less frequent in use
Test Acceptance: Passed
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.
241 | P a g e
Expected Result: Quota information will be successfully changed
Actual Result: Quota information is successfully changed
Priority: Low
Frequency Less frequent in use
Test Acceptance: Passed
Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have search rights.
Input Data:
Expected Result: User will successfully search quota
Actual Result: Search quota is successfully done by the user
Priority: Low
Frequency Less frequent
Test Acceptance: Passed
242 | P a g e
Test case ID: TC-20
Test Case Name: Update
Quota
Test Case Wasaf Ul Hassan Test Case 8/19/2020
created by: created on:
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.
243 | P a g e
Frequency Less frequent
Test Acceptance: Passed
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
244 | P a g e
Frequency Less frequent in use
Test Acceptance: Passed
Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
Input Data: Treatment type, patient information
245 | P a g e
Expected Result: Application will be successfully generated
Priority: High
Frequency Most frequent in use
Test Acceptance: Passed
Testing Requirement
Testing Condition: System must be in running state.
User must be logged into the system.
User must have employee information
Priority: High
Frequency Most frequent in use
Test Acceptance: Passed
Test Case Description: This Test case describes that can user search medical claim
of the employee
247 | P a g e
3- User will search for the
desired employee
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
248 | P a g e
tab from the menu
2- System processes and employee medical claim
information is shown to the user
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
Priority: High.
Frequency Most frequent in use
Test Acceptance: Passed
249 | P a g e
Test Case Hassnain Test Case 8/19/2020
Updated By: Rafique Updated On:
Test Case Description: This Test case describes that can user
View medical claim
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
250 | P a g e
Primary Actor: <Administrator>
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
Priority: High
Frequency Most frequent in use
251 | P a g e
Test Case Description: This Test case describes that can user search bill of the
employee from the system
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
252 | P a g e
User Action System Response
1- User will select the bill tab from
the menu
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
Priority: High.
Frequency Most frequent in use
Test Acceptance: Passed
253 | P a g e
Primary Actor: <Administrator>
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
254 | P a g e
Test Case Description: This Test case describes that can user
Update SOPs for the employees
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
255 | P a g e
Test Case Hassnain Rafique Test Case 8/19/2020
Updated By: Updated On:
Test Case Description: This Test case describes that can user print SOPs
Priority: High.
Frequency Less frequent
Test Acceptance: Passed
256 | P a g e
Test Case Description: This Test case describes that can user
Check status of the application
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
257 | P a g e
4. CHAPTER
TRANSITION
258 | P a g e
User Guide
Version 1.0
Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
259 | P a g e
12nd Sep, 2020
Revision History
260 | P a g e
Login:
Forgot Password:
Forgot Password:Where you can answer correctly of specific question and recover password
AdminHomePage:
261 | P a g e
Admin Home Screen:This screen is most frequently used. In grid, VIEW button is to update
employee and dependent information. PERFORMA button is to view Medical Application where,
after selecting specied data you can generate medical application and request forward to authourized
person. If employee medical quota is below from specific range than system gave notification agaist
that employee. And RE-IMBRUSEMENT button is to view medical claim form, where employee can
claim amount by providing information and after approving employee case, employee claim amount
is released.
Add User:
262 | P a g e
Add User: By providing User Name,ID,Password. And also update data by clicking on UPDATE
button
Change Password:
263 | P a g e
Change Password: By Providing OLD and NEW password
Security Questions:
264 | P a g e
Security Questions:After first time login you first answer the specified questions, through which you
can able to recover password.
Add Employee:
265 | P a g e
Add Employee: After adding employee Information, go to next tab to add dependent of that
employee
Add Dependent:
266 | P a g e
Add Dependent: You can add multiple dependents according to specific employee and also update
Update Employee:
267 | P a g e
Update Employee: By clicking on view button on Employee List Tab, and then Update employee
and Its dependent Information
Medical Application:
268 | P a g e
Medical Application:Select the desired data and select signature and patient and after clicking
Submit Application request is forwarded to that person whose signature is to be selected.
Application Status:
269 | P a g e
Application Status: Check the Status of Medical Application, Which One Is Approved,Not
Approved and pending.
Medical Re-Imbrusement:
270 | P a g e
Re-Imbrusement:By entering Compulsory data that is required for Medical Claim and Click next.
Then Claim letter is generated and employee claim status is set as Pending.
Add Department:
271 | P a g e
Department:Add and Update Department
Add Hospital:
272 | P a g e
Hospital:Add and Update Hospital
Add Bill:
273 | P a g e
Add Bill: Add bill by proving detail and also generate report of bills information in multiple ways.
System automatically deduct amount from employee medical quota
Search Bill:
274 | P a g e
Search Bill: Many Filters are available for searching, so you can search according your need
Imbrusement Status:
275 | P a g e
Status:After Employee Claim cases is clear from Medical Committee, than Employee claim status
can be updated(Approved Or Not). If approved, than amount is automatically deducted from
employee medical quota.
Search Claim:
276 | P a g e
Search Claim:Search Claim Information According to user need
SOPs:
277 | P a g e
SOP:write SOP’s on system and also add SOP PDF file into the system and can also take a print of
SOP’s
Application Log:
278 | P a g e
Log:User can Monitor the log of Applications. Who generate when, Application Form
279 | P a g e
Assistant Home Screen
280 | P a g e
Assistant Registrar Home Screen: After Login user can see the medical Application Requests. He
can than approved or disapproved application by Clicking on view.
Update Status:
281 | P a g e
Update Status: User can Approve or Not Approve application. If user select “Not approve”
application then he provide Reason and then Click OK
Add Signature:
282 | P a g e
Add Signature: User add their scanned signature into the system, which can be printed on employee
medical application after approval of application.
283 | P a g e
Additional Registrar Home Screen: As same As Assistant Registrar Home Screen
284 | P a g e
Deputy Registrar Home Screen: As same As Assistant Registrar Home Screen
285 | P a g e
5. CHAPTER
PROJECT
MANAGEMENT
Version 1.0
286 | P a g e
Prepared by
Hassnain Rafique
&
Wasaf Ul Hassan
12nd Sep, 2020
Revision History
287 | P a g e
5.1 Project Development Plan
5.1.1 Introduction
5.1.1.1 Purpose
This document describes the whole plan for the development of “Medical Billing System This plan
describes all the activities that are to be performed during the development of MBMS. These
activities are described phase by phase.
5.1.1.2 Scope
This software development plan identifies the activities to be carried out for the completion of
project. These activities are discussed later in the document.
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.
288 | P a g e
• Data Model
• Design Model
• Risk Information Sheet
• Entity Relationship Diagram
• Test Cases
Project Manager
289 | P a g e
5.1.2.2 External Interfaces
The project team will work independently requirements are gathered from internet and
studying related systems. Every module will be tested by the team. Through prototype the missing
requirements will be included. Every functionality objected by the public will be modified or
clarified by the team.
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.
290 | P a g e
Tester (Hassnain Tester, tests the implemented modules by the programmer. He
Rafique,Wasaf ul Hassan) makes sure that the programmer has made the “things right”.
He establishes the test standards to which the system should
conform for acceptance.
Inception Phase The Inception phase will develop the software requirements. It will
identify all the functional and non-functional requirements. It will
Elaboration Phase Elaboration phase will result in the overall architecture and design
of the system. The conceptual model of system will be mapped to
the software model. The database design will be finalized. A
prototype will be developed with no functionality available at that
level. The software development plan will be revised if needed.
291 | P a g e
Construction Phase Construction phase will include the overall implementation of
business logic of the system. All the modules will be implemented
one by one and at the end they will be integrated. All the necessary
requirements will be completed to deploy system.
Transition Phase User manuals will be prepared for the user guidance, if required
and the system will be deployed properly in the environment of the
user after acceptance test.
292 | P a g e
• Visual Studio as development tool.
• Crystal Reports software for generating reports and through Queries.
This project will be deployed at FUUAST, Islamabad. All the necessary software will
be installing as they would be required.
293 | P a g e