import type { Investigation } from '@/types/pmr'

export const investigations: Investigation[] = [
  {
    id: 'inv-pharmetrics',
    name: 'PharMetrics',
    requestedYear: 2025,
    reportedYear: 2025,
    status: 'Live',
    resultSummary: 'Live at medicines.charlwood.xyz',
    requestingClinician: 'A. Charlwood',
    methodology: 'First TypeScript project. Interactive health economics educational platform combining clinical trial statistics, health economics modules, and game-based learning. Features a risk calculator (ARR, RRR, NNT), five health economics education modules (NNT cost analysis, QALY, ICER with NICE thresholds, sensitivity analysis with Monte Carlo simulations, and budget impact analysis), and two educational games: Placebo Playground (a p-hacking simulator demonstrating how study parameters can be manipulated to achieve statistical significance) and Medical Trials Tycoon (a pharmaceutical business simulation exploring ethical trade-offs between patient outcomes and profit).',
    results: [
      'Risk calculator with interactive ARR, RRR, and NNT visualisations',
      'Five health economics modules covering NNT, QALY, ICER, sensitivity analysis, and budget impact',
      'P-hacking game teaching research manipulation through parameter adjustment',
      'Pharma business simulation with ethical decision-making and clinical trial mechanics',
      'Monte Carlo simulations and tornado charts for sensitivity analysis',
    ],
    techStack: ['React', 'TypeScript', 'Vite', 'Zustand', 'Recharts', 'D3', 'Styled Components'],
    skills: ['Health Economics', 'Data Visualisation', 'Educational Design'],
    externalUrl: 'https://medicines.charlwood.xyz',
    thumbnail: '/thumbnails/pharmmetrics.jpg',
  },
  {
    id: 'inv-switching-algorithm',
    name: 'Patient Switching Algorithm',
    requestedYear: 2025,
    reportedYear: 2025,
    status: 'Complete',
    resultSummary: '14,000 patients identified',
    requestingClinician: 'A. Charlwood',
    methodology: 'Python-based algorithm using real-world GP prescribing data to automatically identify patients on expensive drugs suitable for cost-effective alternatives. Compressed months of manual analysis into 3 days.',
    results: [
      '14,000 patients identified for cost-effective alternatives',
      '£2.6M annual savings potential identified',
      '£2M on target for delivery this financial year',
      'Novel GP payment system linking rewards to savings',
    ],
    techStack: ['Python', 'Pandas', 'SQL'],
    skills: ['Health Economics', 'Medicines Optimisation', 'Prescribing Analytics'],
    thumbnail: '/thumbnails/switchingdashboard.jpg',
  },
  {
    id: 'inv-blueteq-gen',
    name: 'Blueteq Generator',
    requestedYear: 2023,
    reportedYear: 2023,
    status: 'Complete',
    resultSummary: '70% reduction in forms',
    requestingClinician: 'A. Charlwood',
    methodology: 'Software automation of Blueteq prior approval form creation, reducing manual data entry and standardising form generation across high-cost drug pathways.',
    results: [
      '70% reduction in required Blueteq forms',
      '200 hours immediate savings',
      '7–8 hours ongoing weekly efficiency gains',
      'Integrated with secondary care activity databases',
    ],
    techStack: ['Python', 'SQL'],
    skills: ['High-Cost Drugs', 'Prior Approval', 'Process Automation'],
    thumbnail: '/thumbnails/blueteq.jpg',
  },
  {
    id: 'inv-cd-monitoring',
    name: 'CD Monitoring System',
    requestedYear: 2024,
    reportedYear: 2024,
    status: 'Complete',
    resultSummary: 'Population-scale OME tracking',
    requestingClinician: 'A. Charlwood',
    methodology: 'Python-based controlled drug monitoring system calculating oral morphine equivalents (OME) across all opioid prescriptions to track patient-level exposure over time.',
    results: [
      'Patient-level OME tracking over time',
      'High-risk patient identification',
      'Potential diversion detection',
      'Previously impossible population-scale analysis',
    ],
    techStack: ['Python', 'SQL'],
    skills: ['Controlled Drugs', 'Patient Safety', 'Prescribing Analytics'],
    thumbnail: '/thumbnails/ome.jpg',
  },
  {
    id: 'inv-nms-training',
    name: 'NMS National Training Video',
    requestedYear: 2018,
    reportedYear: 2018,
    status: 'Complete',
    resultSummary: 'Shared nationally across Tesco Pharmacy',
    requestingClinician: 'A. Charlwood',
    methodology: 'Self-produced training video covering the full New Medicine Service workflow — the three-stage consultation process (Engagement, Intervention, Follow-up), eligibility criteria for target conditions (asthma/COPD, hypertension, anticoagulation, type 2 diabetes), and practical techniques like the "star" prescription marking system. Features a patient case study demonstrating how NMS intervention corrected inhaler technique, and presents adherence data showing non-adherence halving from 20% to 10%. Created independently to address inconsistent NMS delivery across stores.',
    results: [
      'Shared across Tesco Pharmacy nationally to support delivery of the New Medicine Service',
      'Empowered non-pharmacist staff to identify and enrol eligible patients',
      'Improved consistency and quality of NMS engagement from non-pharmacist staff',
      'Supported successful uplift in NMS performance metrics across stores',

    ],
    techStack: ['Video Production'],
    skills: ['Training & Development', 'Clinical Services', 'Leadership'],
    externalUrl: 'https://www.youtube.com/watch?v=Rm1wcX92XlQ',
    thumbnail: '/thumbnails/nms.jpg',
  },
  {
    id: 'inv-pathway-analysis',
    name: 'Patient Pathway Analysis Platform',
    requestedYear: 2023,
    reportedYear: 2024,
    status: 'Complete',
    resultSummary: '9 interactive chart types, sub-50ms responses',
    requestingClinician: 'A. Charlwood',
    methodology: 'Interactive Dash web application for analysing high-cost drug patient pathways. Features a Snowflake→SQLite pre-computation pipeline feeding 9 interactive Plotly chart types including hierarchical icicle charts with Trust→Directorate→Drug→Pathway drill-down. Achieves ~93% GP diagnosis matching via SNOMED cluster mapping. Packaged as a standalone desktop application via PyWebView for secure NHS deployment without browser dependencies.',
    results: [
      '9 interactive chart types for pathway analysis',
      'Sub-50ms response times via pre-computed SQLite pipeline',
      '~93% GP diagnosis match rate using SNOMED clusters',
      'Standalone desktop packaging via PyWebView',
      'Trust-level compliance auditing across all high-cost drug pathways',
    ],
    techStack: ['Python', 'Dash', 'Plotly', 'Pandas', 'NumPy', 'SQLite', 'Snowflake', 'PyWebView'],
    skills: ['Health Economics', 'Clinical Pathways', 'Medicines Optimisation', 'Data Visualisation', 'NHS Secondary Care', 'Patient Safety'],
    demoUrl: 'https://demo.charlwood.xyz',
    thumbnail: '/thumbnails/pathways.jpg',
  },
]
