Portal look: aligned header and footer, 7-day chart, today's reasons, pass rate
Header, breadcrumb, page and footer share one 1180px column; the header marks the current page; a footer sits at the bottom of every page. Dashboard: pass rate on Checked today, a Last 7 days Pass / Fail / Review chart, today's Fail and Review reasons grouped with counts, and three equal cards (Claim status, Runs, Find a claim). Motion is movement only and off under prefers-reduced-motion. Context.md brought up to date. Snapshot of local 9d5ac63 (tree scanned: no real claim ids, no patient data). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ba15a574ab
commit
120fd6808a
5 files changed
+295
-39
No files matched your search
@@ -9,6 +9,7 @@ Claim numbers here are made up.
|
||||
"""
|
||||
|
||||
import io
|
||||
import re
|
||||
import sys
|
||||
import json
|
||||
import pathlib
|
||||
@@ -227,6 +228,63 @@ def the_dashboard_tiles_are_todays_counts():
|
||||
in html
|
||||
|
||||
|
||||
@case
|
||||
def the_dashboard_shows_todays_pass_rate():
|
||||
today = date.today()
|
||||
html = _client(FakeRepo(days=[_day(today, 30, 2, 24, 5, 1)]))[0] \
|
||||
.get("/").text
|
||||
assert '<span class="rate">80% pass</span>' in html
|
||||
html = _client(FakeRepo(days=[]))[0].get("/").text
|
||||
assert 'class="rate"' not in html, "no claims today: no rate"
|
||||
|
||||
|
||||
@case
|
||||
def the_dashboard_shows_the_last_seven_days_oldest_first():
|
||||
today = date.today()
|
||||
days = [_day(today - timedelta(days=i), 10 + i, 1, 8, 2, i % 2)
|
||||
for i in range(9)] # newest first, as repo
|
||||
html = _client(FakeRepo(days=days))[0].get("/").text
|
||||
assert 'id="week"' in html
|
||||
shown = re.findall(r'data-day="([\d-]+)"', html)
|
||||
assert shown == [(today - timedelta(days=i)).isoformat()
|
||||
for i in range(6, -1, -1)], shown
|
||||
assert f'href="/day/{(today - timedelta(days=3)).isoformat()}"' in html
|
||||
assert 'data-n="13"' in html, "a day's claims count"
|
||||
|
||||
|
||||
@case
|
||||
def the_dashboard_lists_todays_top_fail_and_review_reasons():
|
||||
run = datetime.combine(date.today(), datetime.min.time()) \
|
||||
+ timedelta(hours=10)
|
||||
tele = "Telehealth (POS 02, modifier 93 on 99213)"
|
||||
rows = ([_row(f"90000{i}", "Fail", i, run, comments=tele)
|
||||
for i in range(1, 4)]
|
||||
+ [_row("9000005", "Fail", 5, run, comments="ICD <pointer>"),
|
||||
_row("9000006", "Review", 6, run, comments="Could not search"),
|
||||
_row("9000007", "Pass", 7, run, comments="Clean claims")])
|
||||
html = _client(FakeRepo(days=[_day(date.today(), 6, 1, 1, 4, 1)],
|
||||
rows=rows))[0].get("/").text
|
||||
box = html.split('id="reasons"', 1)[1].split("</section>", 1)[0]
|
||||
assert box.index(tele) < box.index("ICD <pointer>") \
|
||||
< box.index("Could not search"), box
|
||||
assert '<b class="Fail">3</b>' in box, "grouped, with its count"
|
||||
assert "Clean claims" not in box, "Pass is not a reason"
|
||||
html = _client(FakeRepo(rows=[]))[0].get("/").text
|
||||
assert "No Fail or Review today" in html
|
||||
|
||||
|
||||
@case
|
||||
def every_page_has_the_footer_and_marks_where_you_are():
|
||||
client, _ = _client()
|
||||
for path in _PAGES:
|
||||
html = client.get(path).text
|
||||
foot = html.split('<footer class="foot">', 1)[1]
|
||||
assert "Ecare India" in foot and "patient data" in foot, path
|
||||
html = client.get("/days").text
|
||||
assert '<a href="/days" class="on" aria-current="page">Claim status</a>' \
|
||||
in html, "the page you are on is marked in the header"
|
||||
|
||||
|
||||
@case
|
||||
def an_old_one_run_link_goes_to_that_runs_day():
|
||||
client, repo = _client()
|
||||
|
||||
Reference in new issue
Block a user