Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KSA RPA Service

A Java RPA (Robotic Process Automation) platform for Saudi health insurance operations. The system automates the full prior authorization lifecycle — scraping pending approvals from a hospital HIS web portal using Selenium WebDriver, routing each request to the correct insurance payer portal (Waseel network or standalone portals), submitting approvals, and writing the responses back — all without human intervention.

Built for Accumed as part of a hospital management system integration in KSA.


What It Does

The RPA engine handles four approval workflows, each running as a scheduled multi-threaded job:

Job Description
No Action Taken Picks up new approval requests that haven't been submitted yet — logs into HIS, opens each claim, submits to the payer portal, and updates the approval status back in HIS
Under Process Follows up on previously submitted approvals — checks inquiry status on payer portals and updates HIS records
Need More Details Handles approvals that require additional clinical information (follow-up flow)
Approval Processes final approved/rejected responses and saves them to HIS

For each claim, the automation:

  1. Logs into the HIS web portal via Firefox WebDriver
  2. Navigates to the Approval Maintenance screen
  3. Reads claim details (patient name, company, PIN, services list, diagnoses, clinical info)
  4. Routes to the correct payer based on insurer name:
    • Waseel Portal: AXA, NCCI, SAICO, TAKAFUL, MEDIVISA, MALATH, ALSAGR, WALLA, ALLIANZ, MedGulf, Tawuniya, Enaya
    • Mednet Portal: MEDNET (separate Selenium flow)
    • Globemed Portal: GLOBE (separate Selenium flow)
    • TCS Portal: TCS (separate Selenium flow)
  5. Logs into the payer portal and retrieves the approval status + reference number
  6. Updates each service line in HIS with the correct approval status, reference number, and payer comments
  7. Saves the claim result to an Excel report (Pass / Fall / Locked)

Also Includes: Waseel SOAP Eligibility

Alongside the RPA browser automation, the service also submits insurance eligibility checks via the Waseel UHUD SOAP API (transaction type 1.1) — directly from code without browser automation.


Monitoring Dashboard

A JSF/PrimeFaces web UI provides a live statistics dashboard:

  • Passed — approved claims processed successfully
  • Failed — claims that encountered portal errors or invalid data
  • Locked — claims that were locked by another user in HIS

Reports are read from Excel files generated during processing (ApprovalExcelFile.xlsx, FallExcelFile.xlsx, HoldExcelFile.xlsx).


Tech Stack

Layer Technology
Language Java (NetBeans Web Application)
Scheduler Quartz Scheduler
Browser Automation Selenium WebDriver (Firefox + Chrome)
Web Service (Eligibility) Waseel UHUD SOAP API
Web UI JSF 2.1 + PrimeFaces 6.2 (XHTML)
Database Microsoft SQL Server (JDBC)
Reporting Apache POI (Excel .xlsx)
Multithreading Java Threads (one thread per claim)
Deployment Java EE Web Application (WAR)

Project Structure

src/java/com/accumed/
├── servlet/
│   └── RPA_Startup.java                  # Servlet that starts Quartz scheduler on app deployment
├── jobSchedular/
│   ├── AuthourizationJob.java            # Quartz cron setup
│   └── AuthorizationJobSchedularController.java  # Executes HISScruper jobs
├── hissystem/
│   ├── HISScruper.java                   # Core RPA engine — HIS scraping + payer routing
│   ├── Claim.java                        # Claim data model
│   ├── Activity.java                     # Service/activity line item
│   ├── Eligibility.java / Eligibility_request.java  # Eligibility data models
│   ├── WriteData.java                    # Excel report writer (Pass/Fall/Locked)
│   └── Utils.java                        # Config: paths, accounts, thread sleep, state maps
├── payers/
│   ├── WaseelService.java                # Waseel portal automation (login, approval, inquiry)
│   ├── approval/
│   │   ├── wassel/                       # Per-insurer Selenium flows (AXA, Malath, Saico, etc.)
│   │   ├── mednet/MednetPayerApproval.java
│   │   ├── globemed/globemedPayerApproval.java
│   │   └── tcs/TCSApproval.java
│   └── eligibility/
│       ├── wassel/WaseelEligibility.java # SOAP eligibility integration
│       └── mednet/MednetEligibility.java
├── rpa/bean/
│   └── RpaStatistic.java                 # JSF managed bean — dashboard statistics
├── cchi/
│   └── InsuranceHIDP.java               # CCHI/HIDP insurance integration
└── utils/
    └── Utils.java / ClaimStatus.java     # Shared utilities

web/
├── Login.xhtml                           # Login page (JSF)
├── Pages/rpaStatistic/statistic.xhtml   # Live statistics dashboard
└── template.xhtml                        # Page layout template

Supported Payers

Payer Integration Method
NCCI, AXA, SAICO, TAKAFUL, MEDIVISA, MALATH, ALSAGR, WALLA, ALLIANZ, MedGulf, Tawuniya, Enaya Waseel Portal (Selenium) + SOAP API
MEDNET Mednet Portal (Selenium)
GLOBE Globemed Portal (Selenium)
TCS TCS Portal (Selenium)

Configuration

Edit Utils.java to configure:

HIS_SYSTEM_ELIGIBILITY_PATH   — URL of the HIS web portal
CHROME_DRIVER_PATH             — Path to ChromeDriver binary
ACCOUNTS                       — Login credentials per payer portal (Waseel, Mednet, etc.)
threadSleap                    — Selenium wait duration (ms)

Running the Service

Deploy the WAR to a Java EE application server (e.g., GlassFish, Tomcat). On startup, RPA_Startup servlet initializes the Quartz scheduler automatically. The dashboard is accessible at /Pages/rpaStatistic/statistic.xhtml.


License

Private — built for a client (Accumed).

About

Java RPA platform that automates Saudi health insurance prior authorizations — scrapes a hospital HIS portal with Selenium, routes claims to Waseel/Mednet/Globemed/TCS payer portals, submits approvals, and writes results back automatically.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

Contributors

Languages