From 96c4565b9cf9fef5dc4ff32d332fc45ce3b36e71 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 6 May 2026 07:31:32 +0200 Subject: [PATCH] feat: add clinical assistant MCP search --- docker-compose.yml | 9 + public/components/admin.html | 40 +++- public/components/assistant.html | 121 ++++++++++ public/index.html | 6 + public/js/admin.js | 132 +++++++++++ public/js/clinicalAssistant.js | 316 +++++++++++++++++++++++++ server.js | 1 + src/routes/adminConfig.js | 60 ++++- src/routes/clinicalAssistant.js | 380 +++++++++++++++++++++++++++++++ 9 files changed, 1063 insertions(+), 2 deletions(-) create mode 100644 public/components/assistant.html create mode 100644 public/js/clinicalAssistant.js create mode 100644 src/routes/clinicalAssistant.js diff --git a/docker-compose.yml b/docker-compose.yml index 4b1ae41..bd13b9e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,6 +6,8 @@ services: - "127.0.0.1:3552:3000" env_file: - .env + environment: + CLINICAL_ASSISTANT_MCP_URL: http://mcp:8000/mcp volumes: - scribe-logs:/app/data/logs depends_on: @@ -13,6 +15,9 @@ services: condition: service_healthy restart: unless-stopped container_name: pediatric-ai-scribe + networks: + - default + - mcp-server_default healthcheck: test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000/api/health"] interval: 30s @@ -43,3 +48,7 @@ services: volumes: pgdata: scribe-logs: + +networks: + mcp-server_default: + external: true diff --git a/public/components/admin.html b/public/components/admin.html index 41ee921..9f2ebc6 100644 --- a/public/components/admin.html +++ b/public/components/admin.html @@ -342,6 +342,45 @@ + +
+
+

Clinical Assistant

+ Uses indexed Nextcloud resources through direct MCP +
+
+
+ + +
+
+ + + + +
+
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ + +
+
+
+
@@ -419,4 +458,3 @@
- diff --git a/public/components/assistant.html b/public/components/assistant.html new file mode 100644 index 0000000..f7fc179 --- /dev/null +++ b/public/components/assistant.html @@ -0,0 +1,121 @@ +
+
+

AI Clinical Assistant

+

Ask focused clinical questions over indexed Nextcloud books/resources. Answers should synthesize retrieved evidence and cite book/resource titles with pages.

+
+
+ + Ready +
+
+ +
+
+
+
+ Clinical Question + Admin model +
+
+ + +
+
+ +
+
+ +

Evidence-first pediatric assistant

+

Ask a real clinical question. Short greetings or vague inputs get a short clarifying response instead of unnecessary textbook output.

+
+ + + +
+
+
+ +
+ + +
+
+ + +
+ + diff --git a/public/index.html b/public/index.html index 18be574..13df0a1 100644 --- a/public/index.html +++ b/public/index.html @@ -270,6 +270,10 @@ Diagrams +