Clinical Intelligence Dashboard

Viewing longitudinal record for PATIENT_000092 · Lena M.
Consent: pending
Clinical Intelligence Document

One question, one continuous answer

0
Patients
0
Clinical Notes
0
Queries
0
Responses
0
Federated Clinics
0
System Logs

OClinic Overview

Patients onboard through the clinic app with verified identity and consent. Clinicians start secure, timed sessions and query the Apertus-powered longitudinal record with XAI and CEAI transparency. Every answer is source-linked and every data movement is consent-gated.

Local Clinic Registry

Patients

GSynthetic Data Generation

Generate realistic but entirely fake psychiatric EHR-style records for research and prototyping. No real patient data is used.

Patient IDInstitutionAgeGenderPrimary DiagnosisConsentCreated
Evidence-Based Clinical Query

Ask a patient-specific question

Patient Companion

On-premise, consent-gated support

How to use the Patient Chat

  1. Your records stay local. SHRUNK runs on the clinic's controlled on-premise system.
  2. Provide or update consent before your visit. The application records your preference.
  3. This chat is for general support and non-urgent questions. It is not a diagnosis.
  4. Your clinician sees the conversation only with consent and an active secure session.
Consent status: Pending
Hello. I'm SHRUNK AI, your on-premise clinical assistant. For urgent concerns, contact your clinician or emergency services.
Doctor Workspace

Secure clinician session with XAI + CEAI

Secure session: not started
Swiss Sovereign Apertus Stack

Sovereign LLM pipeline status

Teacher (Base)

swiss-ai/Apertus-8B-2509

Teacher (Instruct)

swiss-ai/Apertus-8B-Instruct-2509

Mental-Health LoRA

models/apertus_mental_health_lora
EXISTS

Current Apertus LLM

Apertus clinical assistant (template mode)
NOT LOADED

Kaggle Apertus 70B

Set USE_KAGGLE_APERTUS in .env
NOT CONFIGURED

Distilled Student

models/apertus_mental_health_student
NOT DISTILLED

SSovereign Actions

Compression Pipeline

Teacher & Student Models

📚

Teacher (Apertus 8B / 70B)

swiss-ai/Apertus-8B-2509 or unsloth/Apertus-70B-Instruct-2509-GGUF

→
LoRA fine-tune
🖌

Mental-Health Adapter

Low-rank adapter on synthetic psychiatric EHR notes

→
Distill
🧠

Student (SmolLM)

HuggingFaceTB/SmolLM-135M-Instruct for edge / 4 GB GPUs

TTeacher Model

  • Base: swiss-ai/Apertus-8B-2509
  • Instruct: swiss-ai/Apertus-8B-Instruct-2509
  • Role: Generates high-quality clinical interpretation with safety guardrails.
  • Deployment: Runs on Kaggle for 70B demos; local CPU mode for 8B requires ≥16 GB RAM.

SStudent Model

  • Base: HuggingFaceTB/SmolLM-135M-Instruct
  • Role: A small, efficient model that can run on the local 4 GB GPU for edge inference.
  • Training: Distilled from the adapter-tuned teacher using synthetic psychiatric instruction data.
Explainable AI

Why the model said what it said

AAttention Weights

Visualize which note segments, symptoms, risk terms, and medication names the model attended to during generation.

FFeature Importance

Gradient-based importance scores note count, diagnosis variety, medication burden, risk level, and query complexity.

RRationale Generation

Produces a chain-of-thought, clinician-readable explanation that traces the path from retrieved evidence to interpretation.

CConfidence Scoring

Uncertainty quantification reports model certainty and flags low-confidence regions requiring verification.

XTry XAI

Clinical Evidence Alignment Index

Evidence alignment, not blind confidence

82

Strong alignment between retrieved evidence and clinical interpretation.

Tier: Green · Actionable

RReasoning Trace

  1. Retrieve longitudinal notes and patient-chat context.
  2. Rank evidence by recency, source type, and risk relevance.
  3. Compare interpretation against retrieved evidence.
  4. Flag missing data and safety thresholds.
  5. Generate clinician review recommendations.
Federated Control

Intelligence moves, PHI stays sealed

NNode Network

Bern Day Clinic
Active
🔐 PHI sealed
↔
Zurich Hospital
Peer
🔐 Consent required
↔
Lausanne EPD
Read-only
🔐 Summary only

Only de-identified, consent-gated clinical insights cross the airlock. Raw notes, identifiers, and free-text patient context never leave the originating clinic.

MMetrics

13
Queries Processed
2
Patients
23
Clinical Notes
3
Federated Rounds
3
Active Hospitals
1.6000
Final Loss
Concurrent Users

Multi-User Chatbot Simulation

Available Users

Select a user
Select a user from the left panel.
On-Premise Multi-Layer Architecture

How SHRUNK keeps PHI inside the clinic

🔐 On-premise by design. Each layer runs on clinic edge hardware. Patient data is encrypted at rest, retrieved locally, and never pooled in a central cloud.

1. Privacy & Compliance Active

Consent gating, audit logging, de-identification, and institutional access controls. PHI stays sealed inside the clinic.

2. Federated Retrieval Active

Local FAISS + sentence-transformers retrieve patient, similar-patient, and guideline notes. Cross-clinic sharing only transfers model updates.

3. Clinical Routing Active

Classifies queries and escalates high-risk cases to the clinician.

4. Decision Support Active

Evidence-based recommendations from Apertus, grounded in retrieved notes and clinical guidelines.

5. Knowledge Distillation Active

Teacher (Apertus 8B/70B) fine-tunes a small student (SmolLM) for safe, edge-deployable inference.

6. Edge Deployment Active

Resource-aware model selection: local Apertus, GGUF, or secure Kaggle 70B offloading — retrieval and routing remain local.

Node Configuration

Settings

System Configuration

Database PathLocal SQLite database file containing all PHI.
Server PortPort for the on-premise Flask server.

Consent & Access

Default Consent ModeWhen a patient record is created, start as pending until the patient actively consents.
Clinician Session PINPIN used to start a secure clinician session. Default is 0000.

Danger Zone

Warning: Actions in this section are irreversible and will delete local data.
Clear DatabaseDelete all patients, notes, queries, and responses from this clinic node.
Danger Zone

Clear Database

This will delete all patients, notes, queries, and responses from this clinic node. This action is for testing only.

In the live Flask app this calls /api/clear_database. In this static demo it resets the local patient data to defaults.