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.
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:
- Logs into the HIS web portal via Firefox WebDriver
- Navigates to the Approval Maintenance screen
- Reads claim details (patient name, company, PIN, services list, diagnoses, clinical info)
- 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)
- Logs into the payer portal and retrieves the approval status + reference number
- Updates each service line in HIS with the correct approval status, reference number, and payer comments
- Saves the claim result to an Excel report (Pass / Fall / Locked)
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.
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).
| 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) |
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
| 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) |
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)
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.
Private — built for a client (Accumed).