TheraScore AI
Executive Briefing
Ref: BS-2026-THERASCORE-0915 • Verified Azure & Svelte Blueprint

How to Evaluate This Psychotherapy Quality & Clinical Supervision Platform

This production control plane processes recorded therapy sessions, strips 18 HIPAA identifiers pre-inference, and generates objective DBT Adherence Rating Scale (DBT-ARS) & CBT CTRS competence scorecards with verbatim timestamped anchors and automated SOAP clinical documentation.

PATH 01

DBT & CBT Scorecards

Inspect item-level scoring (1–5 scale) anchored to verbatim dialogue, historical validation, and chain analysis.

Open Scorecard
PATH 02

Diarized Audio Scrubbing

Scrub audio waveform and sync with therapist/patient utterances and real-time clinical tags.

Scrub Audio
PATH 03

SOAP Clinical Notes

Review automated Subjective, Objective, Assessment, and Plan notes with ICD-10 diagnostic codes and risk levels.

Review SOAP
PATH 04

HIPAA PHI Redaction

Test the inline pre-inference redaction engine that masks names, locations, dates, and medical record numbers.

Test Redactor
3-Layer Clinical Defense:1. HIPAA Safe Harbor De-ID (<15ms)→2. Dual AI Reasoner (Azure OpenAI / Gemini)→3. Supervisor Sign-off & Audit Log
DBT Adherence
Linehan Validated
88.5%+12.4%

Pass Threshold: 75.0% (Level 5 Validation & Chain Verified)

CBT Competence
CTRS Scale
76.0%(44/66 CTRS)

Guided discovery & Socratic dialogue evaluated

Baseline: 36Current: 44Max: 66
HIPAA PHI Shield
Zero Leakage
100%Safe Harbor

48 identifiers scrubbed before LLM ingestion

18 Safe Harbor Rules Active
Pipeline SLA
Sub-2s Engine
1.18s(1180ms)

Diarization, scoring & note drafting in parallel

Azure Speech + LLM Real-time
Supervisor ROI
78% Efficiency
4.2 hrs/ therapist / wk

Automated transcript audit replaces manual tape review

Annual Labor Saved$18,480/yr
Select Session:
Ref: SESS-2026-DBT-882
Therapist: Dr. Sarah Chen, PsyD
Supervisor: Dr. Marcus Vance, ABPP (DBT Mentor)
CLEAN_MASKED
01:2550:15

Diarized Session Transcript & Dialogue Anchor Trace

12 Speaker Turns
Therapist[00:15]
Agenda SettingDBT Target Hierarchy

Welcome back, M. Let's start with our standard agenda. We need to check your diary card from the past week, prioritize targets according to the DBT hierarchy, and review the urges you logged on Thursday evening.

Patient[00:48]
PHI Redacted
Target 1: Life-Threatening Behavior Urge

Thursday was really rough. My supervisor at [WORKPLACE_1] made a sarcastic comment in front of the whole department. By 8 PM I was sitting on my bathroom floor holding my medication bottle, and the urge to overdose was an 8 out of 10.

Therapist[01:22]
Validation Level 5 (Context)Acceptance Strategy

I am so glad you reached for your skills and are sitting here safely today. An 8 out of 10 urge is excruciating to sit with. Given your history with sudden public shame triggers, it makes complete sense your nervous system went into full survival alarm.

Patient[02:05]
Coaching Barrier

I felt so humiliated. I thought about texting you for skills coaching, but I felt like I was being a burden again.

Therapist[02:30]
Consultation AgreementChain Analysis Induction

Remember our DBT consultation agreement: you cannot be a burden by asking for skills coaching before engaging in target behavior. You only burn the bridge if you act on the urge. Let's do a complete behavioral chain analysis on Thursday evening from the moment of that meeting.

Therapist[12:40]
Chain Analysis: Vulnerability Factors

Let's pin the exact vulnerability factors leading into Thursday. Did you have adequate sleep Wednesday night, and had you taken your prescribed sertraline?

Patient[13:10]
Vulnerability Factor Identified

No, I stayed up until 3 AM reading emails, and I skipped breakfast. So my tank was already empty when my manager walked in.

Therapist[14:22]
Prompting EventCognitive Links

Right. An empty tank lowers distress tolerance threshold dramatically. The prompting event was the comment at 10:15 AM. What was the immediate automatic cognitive link?

Patient[15:05]
CatastrophizingCognitive Link

My thought was: 'Everyone knows I'm incompetent. I will be fired by Friday, and I'll end up evicted.'

Therapist[15:35]
Physiological AssessmentSkill ReplacementChange Strategy

That is a severe catastrophe escalation. And the physiological response followed immediately: racing heart, dissociation, knot in the throat. Where in that chain could we have injected TIPP or ACCEPTS before you reached the bathroom floor at 8 PM?

Patient[16:40]
TIPP Skill Solution

I could have done cold water temperature dive right in the office restroom at 11 AM instead of stewing in ruminative brooding all afternoon.

Therapist[17:15]
Behavioral RehearsalSolution Analysis

Exactly. Cold water dive activates the mammalian dive reflex and down-regulates sympathetic arousal within 60 seconds. Let's rehearse that right now so your body encodes the motor sequence.

Click any dialogue turn to scrub the audio playerAzure Speech SDK Diarized

DBT Adherence & Competence Rubric

Scored against gold standard Linehan DBT-ARS / Beck CTRS

88.5% Adherent
#1Level 5 Validation: Historical / Contextual Normalization
5 / 5 • EXEMPLARY
Anchor: 01:22 - 01:55

Observed: Therapist explicitly linked current extreme emotional reaction to past trauma and public shame vulnerability, validating that emotional response was understandable without validating the suicidal urge.

"Given your history with sudden public shame triggers, it makes complete sense your nervous system went into full survival alarm."
Supervisor Coaching: Maintain this clean boundary. Excellent clinical modeling for DBT trainees.
#2Micro-Analysis of Links in Dysfunctional Chain
5 / 5 • EXEMPLARY
Anchor: 12:40 - 16:15

Observed: Systematically uncovered vulnerability factors (sleep deprivation, missed meal), prompting event (manager comment), cognitive links ('everyone knows I'm incompetent'), and somatic escalation.

"Let's pin the exact vulnerability factors... Did you have adequate sleep... The prompting event was the comment... What was the immediate automatic cognitive link?"
Supervisor Coaching: Ensure the patient generates the replacement links (as done here with TIPP) rather than the therapist lecturing.
#3Dialectical Balance of Acceptance vs. Change
4 / 5 • COMPETENT
Anchor: 02:30 - 03:15

Observed: Balanced warm validation of patient's isolation fears with firm behavioral contingency reminder regarding coaching rules and target hierarchy.

"You cannot be a burden by asking for skills coaching before engaging in target behavior. You only burn the bridge if you act on the urge."
Supervisor Coaching: Could introduce a dialectical metaphor (e.g., 'walking the middle path') to anchor the cognitive synthesis.
#4In-Session Behavioral Rehearsal & Skill Encoding
5 / 5 • EXEMPLARY
Anchor: 17:15 - 19:40

Observed: Guided immediate somatic rehearsal of the TIPP dive reflex and practiced cognitive restructuring for office restroom deployment.

"Let's rehearse that right now so your body encodes the motor sequence."
Supervisor Coaching: Assign specific daily practice logs between sessions.
#5Troubleshooting Commitment for Next Week
4 / 5 • COMPETENT
Anchor: 45:10 - 48:30

Observed: Obtained concrete verbal commitment for filling out daily diary card and executing skills coaching call before urge hits level 6.

"Let's agree: if your urge rises past a 5, your phone comes out to text skills coaching before you leave your desk."
Supervisor Coaching: Consider using 'playing devil's advocate' commitment strategy to test patient resolve.

Inline HIPAA Safe Harbor PHI De-Identification Engine

Pre-Inference Gate

Scans and masks 18 HIPAA Safe Harbor identifiers (Patient Names, MRNs, Dates, Locations, Phone/Email) prior to any LLM API transmission.

Raw Clinical Text (Contains Live PHI)415 characters
Notice: Raw text never sent to public LLMsUnsanitized State
Sanitized Safe Harbor Transcript
Click 'Execute PHI Scrub' to view sanitized text.
Cryptographic Token Vault (0 Tokens Scrubbed)Audit:

End-to-End Clinical Processing Architecture

Inngest & Azure Service Bus

Event-driven pipeline orchestration: from raw audio stream to HIPAA-sanitized scoring, anchored quotes, and EHR dispatch.

620ms
1. Audio Ingestion & Diarization
Diarized Multi-Speaker Chunks
Azure Speech Services OK
45ms
2. HIPAA PHI Safe Harbor Gate
Pre-Inference De-Identification
Inline LlmHealthcareFirewall OK
840ms
3. Dual-LLM Clinical Scoring
DBT-ARS & CTRS Item Engine
OpenAI gpt-4o-mini + Gemini Failover OK
110ms
4. Verbatim Quote Verification
Timestamp Evidence Anchoring
Acoustic-Text Correlation Subsystem OK
180ms
5. Clinical Notes & EHR Dispatch
SOAP/DAP & Supervisor Webhooks
Azure Service Bus OK

Step Telemetry & Resilience Spec: 3. Dual-LLM Clinical Scoring

Target SLA: < 1500ms
Idempotency Key: session_id + hash
Functional Purpose:

Bound by strict JSON schema. Scores Linehan DBT Validation/Chain Analysis or Beck CTRS Socratic discovery against gold standard guidelines.

Technology & Cloud ServiceOpenAI gpt-4o-mini + Gemini Failover
Failure Policy & Circuit BreakerAutomatic Sub-second Failover to Gemini 2.0 Flash
Verified Output PayloadSchema Validated
{"modality": "DBT", "overallAdherence": 87, "competencyStatus": "COMPETENT"}

Production-Ready Stack Blueprints (Jeremy Stack Aligned)

Svelte 5 • Azure DevOps • Python

Drop-in source code ready for immediate repository integration: Svelte 5 components, SvelteKit endpoints, Azure DevOps CI/CD, and Python FastAPI.

Svelte 5 reactive component leveraging $state, $derived, audio scrubbing, and Linehan DBT-ARS item badges.svelte
<script lang="ts">
  import type { TherapySession } from '$lib/types';
  import { ShieldCheck, Play, Pause, AlertTriangle } from 'lucide-svelte';

  // Svelte 5 Runes
  let { session }: { session: TherapySession } = $props();
  let isPlaying = $state(false);
  let currentTime = $state(0);

  let adherenceColor = $derived(
    session.dbtAdherenceScore >= 80 ? 'text-emerald-600 bg-emerald-50 border-emerald-200' :
    session.dbtAdherenceScore >= 65 ? 'text-amber-600 bg-amber-50 border-amber-200' :
    'text-rose-600 bg-rose-50 border-rose-200'
  );

  function togglePlay() {
    isPlaying = !isPlaying;
  }
</script>

<div class="rounded-xl border border-slate-200 dark:border-slate-800 bg-white dark:bg-slate-900 p-4 shadow-sm">
  <div class="flex items-center justify-between gap-2 mb-3">
    <div>
      <span class="text-xs font-bold uppercase tracking-wider text-slate-400">
        {session.modality} Session • {session.patientToken}
      </span>
      <h4 class="text-sm font-bold text-slate-900 dark:text-white">
        {session.clinicianName} ({session.date})
      </h4>
    </div>
    
    <div class="flex items-center gap-1.5">
      <span class="text-xs font-mono font-bold px-2.5 py-1 rounded-full border {adherenceColor}">
        {session.dbtAdherenceScore}% Adherence
      </span>
    </div>
  </div>

  <div class="flex items-center gap-3 p-2.5 rounded-lg bg-slate-50 dark:bg-slate-800/60 border border-slate-200 dark:border-slate-700">
    <button 
      onclick={togglePlay}
      class="h-8 w-8 rounded-full bg-teal-600 text-white flex items-center justify-center hover:bg-teal-700 transition"
      aria-label="Toggle Play"
    >
      {#if isPlaying}
        <Pause class="h-4 w-4" />
      {:else}
        <Play class="h-4 w-4 ml-0.5" />
      {/if}
    </button>
    <div class="flex-1">
      <div class="h-2 bg-slate-200 dark:bg-slate-700 rounded-full overflow-hidden">
        <div class="h-full bg-teal-600 transition-all duration-300" style="width: 42%;"></div>
      </div>
    </div>
    <span class="text-xs font-mono text-slate-500">14:22 / 52:00</span>
  </div>
</div>

Clinical Supervision ROI & Time-Savings Engine

100% Adherence Coverage vs 10% Manual Sampling

Model clinic economic impact: Replace manual 50-minute tape listening with instant AI scorecards and targeted supervisor coaching.

Clinic Scale Parameters
Active Clinicians8 therapists
Sessions / Clinician / Week24 sessions
Supervisor Loaded Hourly Rate$120/hr
Manual Audit Sampling Rate10% of sessions
Annual Session Volume:9,600
Annual LLM Token Burn:$36 / year
Annual Net Supervision Savings
$78,324

Net capital saved by eliminating 80% of passive tape-listening hours while maintaining 100% session adherence audits.

Clinical Hours Reclaimed
653 hrs / yr

Direct hours returned to clinical directors to see billable patients or conduct focused 1-on-1 skills coaching.

Quality Audit Coverage
100% Complete

Eliminates clinical malpractice blind spots: Every session scored against DBT-ARS & CTRS vs traditional 10% spot checks.

Platform ROI Multiplier
79x Net Return

Based on $0.0038/session inference cost against standard clinical supervisor loaded compensation.

Clinical Pipeline Telemetry & Audit Stream