diff --git a/.gitignore b/.gitignore index c288485..6f80827 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ __pycache__/ src/build/ src/dist/ build_log.txt + +# Impeccable review screenshots (regenerated each review) +.impeccable/review/ diff --git a/.impeccable/surfaces/src-ui-login-html.md b/.impeccable/surfaces/src-ui-login-html.md new file mode 100644 index 0000000..5690148 --- /dev/null +++ b/.impeccable/surfaces/src-ui-login-html.md @@ -0,0 +1,24 @@ +--- +version: 1 +slug: "src-ui-login-html" +primary_target: "src/ui/login.html" +related_targets: [] +--- + +## Scope + +Operate. G2 sign-in page for the ops team, first build only: owl, password field, show/hide, sign in, test password, placeholder "run screen coming soon" after sign-in. Real password storage, lockout, per-person usernames and the run screen are undecided and out of scope. + +## Direction contract + +THESIS: A sign-in the owl watches. Refuses the faceless centered form with a logo above it: the owl sits on the card and reacts to what you type. + +OWN-WORLD: The user's pinned world, rendered natural, not game-like (user, 22 Oct: no pixel look). Deep navy night ground (#040b26) with small soft round stars (blue, teal, orange, white). A smooth, softly shaded orange owl like the user's reference: dome head with ear tufts, egg body, wide cream face disc, big brown eyes behind round black glasses, peach belly, darker wings, small feet. Dark outlined pill controls, like the user's HOOT button, for both the field and the button. Product name and all text in the platform UI face; standard stroke eye icon. + +STORY: The ops user sees the owl, types the G2 password, and the owl's eyes follow the typing. A wrong password makes the owl shake its head no and the text says what to do. The right one makes it hop and lets them in. + +FIRST VIEWPORT: Centered column. Product name "Charge Billed Automation", then the card with the owl perched on its top edge (feet on the border), password field with show/hide, full-width pill Sign in. The night sky fills the viewport. + +FORM: Pinned by the user (owl screenshot); no roll was run. seed: none (user-pinned direction) + +FINISH: unreviewed and undocumented is unfinished; this build ends with the finish review, the verdict, DESIGN.md, and every shipping raster carrying its provenance diff --git a/PRODUCT.md b/PRODUCT.md new file mode 100644 index 0000000..bf083a1 --- /dev/null +++ b/PRODUCT.md @@ -0,0 +1,66 @@ +# Product + + + +## Platform + +web + +## Stack + +delegated: a local page served by the bot itself with Python's standard-library `http.server`, bound to `127.0.0.1` and opened in the default browser on the ops user's Windows PC. It ships inside the existing PyInstaller exe (`src/ChargeBilledAutomation.spec`). Chosen because the ops team already runs that exe, starting a run needs a live process (a static HTML file cannot do that), it adds no new dependencies (Flask/Streamlit would), and claim data never leaves the PC. The bot itself stays Python (Selenium, pdfplumber, pandas, openpyxl). + +## Users + +The client's operations team (process owner: Sulthan Shafiq N). Three FTEs do this work by hand today: open Waystar, go account by account, open each claim PDF and copy fields into the Excel report template. With the bot, they start the run themselves and watch it, without the RPA developer and without reading a console window. + +Other people involved but not the primary users: the OTS RPA team (builds and maintains the bot), and managers (Vijayakumari G, Swaminathan) who follow report status. + +## Product Purpose + +Charge Billed Automation produces the **Charge Billed Report**: charges by procedure, pulled from Waystar CMS-1500 claim PDFs into Excel, one workbook per account. It exists because the client keeps asking for charge and payment reports by procedure, and capturing them by hand takes three people a long time. + +Success means the ops team can start a run, see where it is, and know at the end which claims are saved, which need a person to check, and which failed, without asking the developer. + +The UI to build first is **run and watch the bot**: start a run, see live progress per account and claim, and see which claims failed or need review and why. + +## Positioning + +The bot reads the PDF's text layer directly (`src/cms1500_text.py`) instead of OCR or manual copying, and it does not guess. Any claim with a missing or inconsistent field gets a plain review note (for example "No Insured ID (box 1a)" or "Line charges 120.00 != box 28 total 140.00") so a person checks only those claims, not every claim. + +## Operating Context + +- Runs on a Windows PC. The bot closes all Chrome windows, starts Chrome with a debug port (9222) and a dedicated profile, attaches Selenium, and logs in to Waystar (login.zirmed.com), including a security question. +- Settings come from `Input/input.xlsx` (proxy, portal URL, Waystar login, security answers). The Waystar password rotates monthly. +- Date range is fixed to the previous calendar month, so in practice it runs once a month. (Inferred from code; not confirmed as the schedule.) +- Steps today: close Chrome → read config → launch Chrome → attach → open Waystar → log in → process all accounts. Within an account it pages through the claims list, downloads each claim PDF, extracts it and saves rows in batches. +- Output per run date in `Output//`: `PDF Folder//.pdf`, `reports/.xlsx`, and a per-account log (Claim ID, Status, Remarks, Timestamp). Error screenshots go in `Screenshots/`. +- Runs resume: claims and accounts already in the log are skipped on the next run. +- Today all progress is console text tagged `[INFO]`, `[WARN]`, `[ERROR]`, `[SUCCESS]`, with numbered `[STEP n]` lines. +- `--selftest ` checks a build without Chrome or Waystar and prints counts only. + +## Capabilities and Constraints + +- Confirmed report columns: Claim ID, Rendering Provider #, Signature of Physician, Date of Birth, Insurance Name, Insured ID Number, Date of Service, Diagnosis Codes, CPT, POS, Modifier, Units, Charges, Line Charges, Review Notes. +- Terms the ops team uses: account (a practice, shown as "Name (ID)"), claim, CMS-1500 box numbers, Charge Billed Report. +- **PHI.** Claim PDFs, reports, logs and screenshots hold patient data (names, DOB, insured IDs). The UI stays on localhost, never sends data to an outside service, and shows counts, claim IDs and review notes rather than patient details unless the task needs them. +- **Credentials.** Waystar login and security answers live in `Input/input.xlsx`. The UI must never display them. +- Undecided: + - Account scope: every Waystar account or only specific ones (asked 10 Mar 2026, no answer). The code currently processes every account in the dropdown. + - Payment Report and Charge Reconciliation Report: confirmed as future reports, not started. Optimantra access for them needs a token approved by Ankit Sanghi (pending). + - A screen for reviewing and fixing flagged fields: not chosen for now. + - Whether a run can be stopped or paused from the UI. + +## Evidence on Hand + +- Real run output from April 2026 in `Output/` (several accounts). It is PHI: never copy it into designs, mockups, demos or screenshots. Use clearly fake sample data instead. +- Project history: `../PROJECT_DETAILS.md`, `../Communication_Summary.md`. +- Not in the folder: the client's Charge and Payment Excel templates, the PDF field list, and any measure of time saved per report (only the 3-FTE figure is known). Do not invent time-saved numbers, accuracy rates or client quotes. + +## Product Principles + +1. The ops team runs it alone. Every state is readable without the developer or the console. +2. Nothing fails silently. Every claim ends as saved, needs review, or failed, with its reason. +3. Flag, don't guess. A claim the bot can't read cleanly goes to a person with a plain note. +4. Patient data stays on this PC. +5. Pick up where it stopped. A rerun continues; it doesn't start over. diff --git a/src/ui/login.html b/src/ui/login.html new file mode 100644 index 0000000..e4f982e --- /dev/null +++ b/src/ui/login.html @@ -0,0 +1,421 @@ + + + + + +Sign in · Charge Billed Automation + + + + + +
+

Charge Billed Automation

+

Sign in to run the bot

+ +
+ + +
+ +
+ + +
+ + + +
+ + +
+
+ + + +