Skip to content

Cognitive Assessments

Metricis provides a comprehensive suite of cognitive assessment tasks built on jsPsych 8.x.

Assessment Types

Tier 1: Screening Tasks

Quick screening assessments for initial cognitive evaluation:

  • Simple Reaction Time - Basic motor speed and alertness
  • Continuous Performance Test (CPT) - Sustained attention and response inhibition
  • Digit Span - Working memory capacity (forward/backward)

Tier 2: Deep Phenotyping

Comprehensive cognitive battery for detailed assessment:

  • N-Back - Working memory and executive function (1-back, 2-back, 3-back)
  • Trail Making Test (TMT) - Visual attention and task switching (Parts A & B)
  • Flanker Task - Selective attention and interference control
  • PROMIS Measures - Patient-reported outcomes (neurology bundles)

Task Configuration

Tasks are configured centrally in client/src/config.ts:

export const TASK_CONFIG = {
  simpleRT: {
    trials: 20,
    timeout: 5000,
    isi_range: [500, 1500],
  },
  cpt: {
    trials: 100,
    target_frequency: 0.3,
    stimulus_duration: 500,
    isi: 1000,
  },
  nback: {
    levels: [1, 2, 3],
    trials_per_level: 20,
    stimulus_duration: 500,
    isi: 2000,
  },
  digitSpan: {
    starting_length: 3,
    max_length: 9,
    trials_per_length: 2,
  },
};

Assessment Sessions

Session Flow

  1. Consent - Review and sign consent (if required)
  2. Welcome - Task overview and instructions
  3. Practice Trials - Familiarization with task interface
  4. Main Assessment - Actual task trials
  5. Breaks - Rest periods between tasks
  6. Completion - Summary and next steps

Session Management

// Start session
const session = await api.startSession({
  participant_id: "P001",
  battery_id: "battery_1",
});

// Run assessment
jsPsych.run(timeline);

// Submit data
await api.submitData({
  session_id: session.session_id,
  task_summaries: summaries,
  trials: jsPsych.data.get().values(),
});

Data Collection

Trial-Level Data

Each trial captures:

  • rt - Reaction time (ms)
  • response - Participant response
  • stimulus - Presented stimulus
  • correct - Response accuracy
  • task - Task identifier
  • trial_type - Trial type (e.g., target, distractor)
  • timestamp - Trial timestamp

Task Summaries

Computed metrics for each task:

{
  simple_rt: {
    mean_rt: 342.5,
    median_rt: 335.0,
    sd_rt: 45.2,
    accuracy: 0.95,
    num_trials: 20,
  },
  cpt: {
    hits: 28,
    misses: 2,
    false_alarms: 3,
    correct_rejections: 67,
    dprime: 2.5,
    beta: 1.2,
  },
}

Batteries

Batteries group tasks into collections for specific use cases:

Example: Neurology Battery

{
  "name": "Neurology Screening",
  "description": "Brief cognitive screening for neurology clinic",
  "estimated_minutes": 15,
  "tasks": [
    { "task_name": "simple_rt", "config": { "trials": 20 } },
    { "task_name": "digit_span", "config": { "max_length": 7 } },
    { "task_name": "promis", "config": { "bundle": "neurology" } }
  ]
}

Battery Builder

Researchers can create custom batteries in the portal:

  1. Select tasks from library
  2. Configure task parameters
  3. Set task order
  4. Preview estimated duration
  5. Save and assign to studies

Offline Support

Assessments work offline using IndexedDB:

// Store session data locally
await db.sessions.add({
  id: session_id,
  participant_id: participant_id,
  trials: trials,
  submitted: false,
});

// Sync when online
if (navigator.onLine) {
  const pending = await db.sessions.where('submitted').equals(false).toArray();
  for (const session of pending) {
    await api.submitData(session);
    await db.sessions.update(session.id, { submitted: true });
  }
}

Mobile Deployment

Assessments run natively on iOS and Android via Capacitor:

# Build for iOS
npm run build:mobile
npx cap open ios

# Build for Android
npm run build:mobile
npx cap open android

Adaptive Testing (CAT)

Computer Adaptive Testing adjusts difficulty based on performance:

// Adaptive N-Back
let currentLevel = 1;

function determineNextLevel(accuracy: number) {
  if (accuracy > 0.8) currentLevel++;
  if (accuracy < 0.5) currentLevel--;
  currentLevel = Math.max(1, Math.min(3, currentLevel));
}

Accessibility

  • Multi-language support - English/French via i18next
  • Large tap targets - Mobile-friendly interface
  • Clear instructions - Plain language explanations
  • Practice trials - Familiarization before assessment
  • Progress indicators - Visual feedback on completion

Quality Control

  • Attention checks - Detect inattentive responding
  • Validity indicators - Flag suspicious patterns
  • Completion rates - Track task abandonment
  • Technical issues - Log errors and device problems

Next Steps