What this application does
KOPA Medical Billing Ops lets you import the monthly source files and review month-end billing reports for visits, providers, facilities, specialty collections, A/R, and transaction-to-section assignment.
Getting started
- Open the app and click Import Data.
- Select all required files (exact names required):
- Transaction Data →
TransactionDetail.xlsx
- Patient AR Data →
ResponsiblePartyArFlexible.xlsx
- Carrier AR Detail (CSV) →
CarrierArDetailFlexibleCSV.csv
- Click Start Import. The page reloads when finished.
Import replaces current database contents. All listed files are mandatory. After data is loaded, the button changes to Clear Data — confirm in the popup to wipe the database, then Import Data returns.
Screen layout
- Top bar — brand, period, Import Data, export-all actions, Help
- Left panel — report list by category
- Right panel — active report grid and controls
The selected report is highlighted in light grey.
Reports
Base Data — Unique Visits and Month Report for KOPA LLC (tabs 01–02).
Analysis Reports — Transaction Assignment plus end-of-month charge, collection, and practice production analysis (tabs 03–09).
CCM / AcuteCare / Cardiology — specialty patient and entity reports (tabs 10–18), including EoM - AcuteCare/Telehealth and Cardiology Collection.
WoundCare — Brown+ patient / provider / facility reports, EoM - WoundCare Collection, and WoundCare/Kopa end-of-month (tabs 19–24).
Physiatry — Williams+ patient / provider / facility reports and EoM Physiatry Collection (tabs 25–28); providers Rory Williams and Jimmy Dorival with charge codes 99305, 99306, 99308, 99309.
A/R / Summary — carrier A/R CSV reports and remaining summary / visit analysis reports.
A/R — Aging Summary (CSV) grouped by section → carrier → patient, and Carrier A/R by Section (CSV) (tabs 29–30).
Summary — Month End by Provider/Facility; Visits by Provider/Facility by Charge Entry Date; Charges by Provider by Charge Entry Date; EoM - Charge Analysis by Provider/Facility; Encounter Analysis by Provider/Facility (tabs 31–39).
Common controls
- Search Data — filter the current report; press Enter to apply.
- Group by … — toggle grouped vs flat detail rows (where available). Use + to expand.
- Show/Hide Columns — hide columns for display and export (saved per tab).
- View Export Options — popup grid of each report and its currently hidden columns; use Restore Defaults to reset.
- Export Report — Excel for the current report; EoM - Production Summary exports as PDF; Month Report for KOPA LLC exports as Word (.docx).
- Export All - Zip / Export All - Single — ZIP of individual files (Excel/PDF/Word), or one multi-sheet workbook plus PDF/Word files in a ZIP.
Tips
- Use the top-bar Include voids switch to include or exclude VOID transaction lines across all reports. On 01 : Unique Visits, VOID badges mark affected visits and transaction detail rows.
- Re-import when new monthly extracts arrive.
- Clear column filters when the card info shows filters active.
1. Functional architecture
Browser (Tabler UI)
│ HTTP
Flask app.py ──► Excel export (openpyxl)
│
import_excel.py ──► PostgreSQL (KOPA-DB)
schema · visits · transactions · A/R · meta
- Presentation — Jinja2 templates, Tabler CSS/JS
- Application — report routes, search/paging, import API, export
- Ingestion —
import_excel.py parses the three Excel sources
- Data — Postgres via
db.py / schema.sql
2. Tech stack
- Python 3 · Flask 3+ · PostgreSQL (psycopg2) · openpyxl
- UI: Tabler / Bootstrap · Jinja2
- Key files:
app.py, import_excel.py, schema.sql, db.py, templates/, docs/
3. Operations
- Install deps:
pip install -r requirements.txt
- Ensure Postgres database
KOPA-DB matches db.py
- Start:
python app.py → http://localhost:5000
- Import monthly Excel extracts via Import Data (or CLI
python import_excel.py)
- Validate period badge and sample report totals, then export as needed
4. How it works
Import: validate required filenames → temp save → apply schema → load transactions & A/R (Excel + CSV) → commit meta → reload UI.
Reports: route runs SQL aggregates → optional search/group/filters/paging → template + JS (expand, columns, export).
Export: re-renders report tables with current prefs; export-all walks the registered report catalog.
5. Data sources
TransactionDetail.xlsx — visits & transactions
CarrierArDetailFlexibleCSV.csv — line-level carrier A/R (reports 29 and 30)
ResponsiblePartyArFlexible.xlsx — patient/RP A/R aging
6. Environment notes
- DB credentials in
db.py are for local Ops use — change for shared deployments.
- Upload limit is 512 MB. Intended for trusted internal networks.