Skip to content

RhythmicDias/Neuropedia-Invoice-Validator

Repository files navigation

Neuropedia Invoice Validator

Neuropedia Invoice Validator Logo

A secure Chrome Extension for automated clinical billing invoice verification.
Bridges Gmail invoices, the EMR patient portal, and a Google Sheets audit ledger.

Manifest V3 Version 1.0 MIT License Chrome Extension


Overview

Neuropedia Invoice Validator automates a repetitive, error-prone billing reconciliation workflow in a pediatric neurology clinical setting. It:

  • Scans Gmail for transactional invoice emails from epg.support@etisalat.ae within a configured date/time range.
  • Verifies patients against the clinic's web-based EMR (Electronic Medical Records) portal by auto-filling search fields and reading results from the DOM.
  • Logs verified records to a Google Sheets cloud ledger via a Google Apps Script Web App endpoint.

⚠️ For Internal Clinical Use Only — This extension is not intended for public distribution. It handles sensitive billing data in strict compliance with clinic data policies.


Features

Feature Description
📧 Gmail Inbox Scanner Scans a time range for Etisalat billing invoice emails via the GAS backend
🔍 EMR Auto-Verification Auto-fills MRN/Mobile in the EMR portal and reads the patient name back
✅ Batch Verification Verifies all queue items in sequence with the "Verify All (EMR)" button
📱 Mobile Fallback Secondary search by phone number when MRN lookup fails
🟡 Self-Verified Override Manual approval for edge cases (e.g., dual-sibling invoices)
📊 Google Sheets Logging Posts verified rows directly to a configurable spreadsheet tab
🔒 Logs Privacy Toggle Show/hide the system activity console to prevent casual screen viewing
❓ Built-in How-To Guide Locally hosted setup guide, accessible from the sidebar footer

Installation (Developer / Unpacked)

Chrome Web Store distribution is not applicable for this internal-use extension.

  1. Clone or download this repository.
  2. Open Chrome and navigate to chrome://extensions/.
  3. Enable Developer Mode (toggle in the top-right corner).
  4. Click Load unpacked and select the src/ folder inside this project.
  5. The Neuropedia Invoice Validator extension icon will appear in your Chrome toolbar.

Initial Setup

1. Google Sheet

Create a Google Sheet with the following column headers in row 1:

Transaction Date | Patient Name | MRN | Transaction Amount | Billing Amount | Payment Link Charges | Transaction ID | Transaction Invoice No | Approval Code

2. Google Apps Script Web App

  1. Open your Google Sheet → Extensions → Apps Script.
  2. Paste the contents of script.gs into the editor.
  3. Click Deploy → New Deployment → Type: Web App.
  4. Set Execute as: Me and Who has access: Anyone.
  5. Copy the generated Web App URL.

If you see a Google account error, open the sheet in an Incognito window first.

3. Extension Settings

  1. Click the extension icon in Chrome → open the Settings cog (⚙️).
  2. Paste the Web App URL into the "Google Apps Script Web App URL" field.
  3. Enter your target Sheet Tab Name (e.g., Sheet1).
  4. Enter your EMR domain URLs (one per line).
  5. Click Save Settings.

Project Structure

Jibin_Invoice_Widget/
│
├── script.gs                   # Google Apps Script backend (deploy to GAS)
├── SKILL.md                    # Agent skill specification (internal)
├── invoice.png                 # Reference invoice image (internal)
│
└── src/                        # Chrome Extension source (load unpacked from here)
    ├── manifest.json
    ├── icons/
    │   ├── icon16.png
    │   ├── icon32.png
    │   ├── icon48.png
    │   └── icon128.png
    ├── background/
    │   └── background.js
    ├── content/
    │   ├── gmail_scraper.js
    │   └── emr_automator.js
    ├── options/
    │   ├── options.html
    │   ├── options.css
    │   └── options.js
    └── sidebar/
        ├── sidebar.html
        ├── sidebar.css
        ├── sidebar.js
        └── howto.html

Data Flow

Gmail (Etisalat Invoice Emails)
        │
        ▼  [GAS Web App scans via GmailApp API]
Extension Sidebar
        │
        ▼  [Auto-injects EMR search via content script]
EMR Portal (DOM Automation)
        │
        ▼  [fetch() POST to GAS Web App endpoint]
Google Sheets Audit Ledger

Security & Privacy

  • No external telemetry — patient data never leaves the browser except to your own Google Workspace.
  • Sandboxed storage — all queue data is stored in chrome.storage.local, isolated from websites.
  • Webhook URL acts as private API key — keep the GAS Web App URL confidential.
  • Logs visibility toggle — hides the activity log console for screen privacy in shared workspaces.

See SECURITY.md for the full vulnerability disclosure policy.


License

This project is licensed under the MIT License — see LICENSE for details.

© 2026 Stephen Dias

About

Automatically scan your inbox for all received Invoices, extract detail, and check against EMR for verification. Works only with Gmail and SimplexHimes EMR. Made specifically for Neuropedia Group of Clinics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors