From 5b5a84a1f6c5c0aea85d4f199e3699e7891f2380 Mon Sep 17 00:00:00 2001 From: jhadfield-NHS Date: Thu, 5 Feb 2026 10:32:15 +0000 Subject: [PATCH] Update app.py Adding mechanism to default any unmapped example requests by using the NHS number passed in as the example key. --- sandbox/app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sandbox/app.py b/sandbox/app.py index 0a606e7..224d797 100644 --- a/sandbox/app.py +++ b/sandbox/app.py @@ -167,6 +167,8 @@ def get_prism_prompt_for_example(patient_examples: dict, request: Request) -> st for patient_id, example in sorted_examples: if patient_id in request.full_path: return example + if request.full_path.find("patient-check/") > -1: + return "example_" + request.full_path[request.full_path.find("patient-check/")+14:] return None