From 942027c502585116baefcc5d41d1f6fc31de555b Mon Sep 17 00:00:00 2001 From: Daniel Date: Fri, 11 Sep 2026 13:58:02 +0200 Subject: [PATCH] fix: 'No therapy is required' is an answer, not a placeholder The first version of the check flagged it alongside 'No protocols are available'. The difference is whether the sentence is about the medicine or about the source. Two false positives down to none; the two real ones are both Pediatric Dentistry, whose source was a disclaimer. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01TqXevQJhxFrM7jJg82cgZN --- backend/scripts/mdm_pass.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/scripts/mdm_pass.py b/backend/scripts/mdm_pass.py index 1a448c5..376ae9a 100644 --- a/backend/scripts/mdm_pass.py +++ b/backend/scripts/mdm_pass.py @@ -267,7 +267,11 @@ def cmd_check(args) -> int: # promises an answer and then does not give it. Reported so an editor # can find them, not refused — a one-line prognosis is often the whole # honest answer. - placeholder = re.compile(r"^(no |none|not available|not specified|unavailable)", re.I) + # "No therapy is required" is a real answer; "No protocols are + # available" is the absence of one. The difference is whether the + # sentence is about the medicine or about the source. + placeholder = re.compile( + r"^(no|none)\b[^.]{0,60}\b(available|specified|provided|documented|given)\b", re.I) thin = [(a.title, s["title"], (s.get("content") or "").strip()) for a in good for s in clinical_of(a) if placeholder.match((s.get("content") or "").strip())]