"""Report screen of the ClaimDesk Poster launcher: a table over the report table, filtered by batch.""" import sqlite3 from pathlib import Path DB = Path(__file__).parent / "data" / "poster.db" COLUMNS = ["clinic", "check_no", "file_status", "comments"] # what ops sees COLOURS = {"Completed": "green", "Deferred": "grey", "Error": "red", "Pending": "amber"} VERSION = "1.4.2" # shown in the launcher title bar def rows(batch_id): db = sqlite3.connect(DB) return db.execute(f"SELECT {', '.join(COLUMNS)} FROM report WHERE batch_id=?", (batch_id,)).fetchall()