File size: 8,359 Bytes
f59a149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// frontend/src/lib/mockData.js
// Realistic offline mock data for all endpoints

export const MOCK_SHOCKS = [
  {
    id: "shock_001",
    title: "Hebei Analgesic Stress — Factory Shutdown",
    event_type: "factory_shutdown",
    severity: "CRITICAL",
    province: "Hebei",
    sector: "pharma",
    affected_entities: ["paracetamol", "ceftriaxone", "amoxicillin"],
    risk_score: 87,
    days_to_stockout: 18,
    exposure_crore: 2340,
    created_at: new Date(Date.now() - 3 * 60 * 60 * 1000).toISOString(),
    description: "Major Hebei pharmaceutical manufacturing cluster shut down following environmental compliance enforcement. 3 key API factories offline.",
  },
  {
    id: "shock_002",
    title: "Inner Mongolia Rare Earth Export Ban",
    event_type: "export_ban",
    severity: "CRITICAL",
    province: "Inner Mongolia",
    sector: "rare_earth",
    affected_entities: ["neodymium", "dysprosium", "cerium"],
    risk_score: 79,
    days_to_stockout: 24,
    exposure_crore: 1840,
    created_at: new Date(Date.now() - 6 * 60 * 60 * 1000).toISOString(),
    description: "Chinese customs suspended neodymium and dysprosium export declarations pending strategic quota review.",
  },
  {
    id: "shock_003",
    title: "Shandong Port Closure — Yellow Sea Storm",
    event_type: "port_closure",
    severity: "HIGH",
    province: "Shandong",
    sector: "pharma",
    affected_entities: ["ciprofloxacin", "metformin"],
    risk_score: 61,
    days_to_stockout: 31,
    exposure_crore: 780,
    created_at: new Date(Date.now() - 12 * 60 * 60 * 1000).toISOString(),
    description: "Qingdao and Rizhao ports suspended operations due to Typhoon Khanun. Estimated 4-day delay on API shipments.",
  },
  {
    id: "shock_004",
    title: "Jiangsu API Contamination Alert",
    event_type: "contamination",
    severity: "HIGH",
    province: "Jiangsu",
    sector: "pharma",
    affected_entities: ["losartan", "amlodipine"],
    risk_score: 58,
    days_to_stockout: 40,
    exposure_crore: 540,
    created_at: new Date(Date.now() - 18 * 60 * 60 * 1000).toISOString(),
    description: "NDMA impurity detected in losartan API batch. Voluntary recall initiated by 2 manufacturers.",
  },
  {
    id: "shock_005",
    title: "Liaoning Steel-Pharma Corridor Disruption",
    event_type: "factory_shutdown",
    severity: "MEDIUM",
    province: "Liaoning",
    sector: "pharma",
    affected_entities: ["gentamicin", "amikacin"],
    risk_score: 38,
    days_to_stockout: 55,
    exposure_crore: 210,
    created_at: new Date(Date.now() - 36 * 60 * 60 * 1000).toISOString(),
    description: "Northeast pharma logistics corridor impacted by industrial accident near Shenyang.",
  },
];

export const MOCK_GRAPH = {
  nodes: [
    { id: "hebei",           label: "Hebei Province",       type: "province", attributes: { current_risk: 95, buffer_days: 12, monthly_import_tonnes: 4200, strategic_priority: "TIER_1" } },
    { id: "inner_mongolia",  label: "Inner Mongolia",       type: "province", attributes: { current_risk: 79, buffer_days: 20, monthly_import_tonnes: 1800, strategic_priority: "TIER_1" } },
    { id: "shandong",        label: "Shandong Province",    type: "province", attributes: { current_risk: 61, buffer_days: 28, monthly_import_tonnes: 2900, strategic_priority: "TIER_2" } },
    { id: "pap",             label: "Para-Aminophenol",     type: "ksm",      attributes: { current_risk: 88, buffer_days: 8,  substitutability: 0.15 } },
    { id: "6apa",            label: "6-APA",                type: "ksm",      attributes: { current_risk: 72, buffer_days: 14, substitutability: 0.22 } },
    { id: "neodymium",       label: "Neodymium Oxide",      type: "ksm",      attributes: { current_risk: 76, buffer_days: 18, substitutability: 0.08 } },
    { id: "paracetamol_api", label: "Paracetamol API",      type: "api",      attributes: { current_risk: 85, buffer_days: 6,  substitutability: 0.18 } },
    { id: "amoxicillin_api", label: "Amoxicillin API",      type: "api",      attributes: { current_risk: 68, buffer_days: 16, substitutability: 0.31 } },
    { id: "cipro_api",       label: "Ciprofloxacin API",    type: "api",      attributes: { current_risk: 40, buffer_days: 35, substitutability: 0.45 } },
    { id: "paracetamol",     label: "Paracetamol",          type: "drug",     attributes: { current_risk: 82, buffer_days: 7,  patient_population_estimate: 85000000, nlem_tier: "TIER_1" } },
    { id: "ceftriaxone",     label: "Ceftriaxone",          type: "drug",     attributes: { current_risk: 74, buffer_days: 10, patient_population_estimate: 12000000, nlem_tier: "TIER_1" } },
    { id: "amoxicillin",     label: "Amoxicillin",          type: "drug",     attributes: { current_risk: 65, buffer_days: 18, patient_population_estimate: 42000000, nlem_tier: "TIER_2" } },
    { id: "ciprofloxacin",   label: "Ciprofloxacin",        type: "drug",     attributes: { current_risk: 38, buffer_days: 40, patient_population_estimate: 18000000, nlem_tier: "TIER_2" } },
  ],
  edges: [
    { source: "hebei",           target: "pap",             weight: 0.90 },
    { source: "hebei",           target: "6apa",            weight: 0.70 },
    { source: "inner_mongolia",  target: "neodymium",       weight: 0.85 },
    { source: "pap",             target: "paracetamol_api", weight: 0.85 },
    { source: "6apa",            target: "amoxicillin_api", weight: 0.68 },
    { source: "paracetamol_api", target: "paracetamol",     weight: 0.82 },
    { source: "paracetamol_api", target: "ceftriaxone",     weight: 0.60 },
    { source: "amoxicillin_api", target: "amoxicillin",     weight: 0.65 },
    { source: "shandong",        target: "cipro_api",       weight: 0.40 },
    { source: "cipro_api",       target: "ciprofloxacin",   weight: 0.38 },
  ],
  state_risk_aggregates: [
    { state_id: "MH", state_name: "Maharashtra",   risk_score: 74 },
    { state_id: "GJ", state_name: "Gujarat",        risk_score: 68 },
    { state_id: "TS", state_name: "Telangana",      risk_score: 61 },
    { state_id: "DL", state_name: "Delhi",          risk_score: 58 },
    { state_id: "KA", state_name: "Karnataka",      risk_score: 52 },
  ],
};

export const MOCK_QUERY_RESPONSE = {
  answer: "Based on current shock telemetry, **Paracetamol** and **Ceftriaxone** face highest downstream risk from the Hebei factory shutdown. Para-Aminophenol (PAP) is the critical bottleneck — India sources 73% from Hebei corridor.\n\nRecommended actions within 72 hours:\n• Activate DGFT strategic buffer release for Tier-1 APIs\n• Issue advance purchase order: 18 MT PAP from SE Asia spot market\n• Trigger substitution protocol for Amoxicillin (31% substitutability)\n\nEstimated exposure: ₹2,340 Cr across 85M patient population.",
  confidence: 0.87,
  response_mode: "demo",
  citations: [
    { source: "DGFT Circular 2024-API-09", snippet: "Buffer stock norms mandate 45-day API reserve for Schedule H medicines under supply chain stress.", url: "" },
    { source: "Hebei EPA Enforcement Notice", snippet: "12 pharmaceutical manufacturing units in Shijiazhuang suspended pending environmental compliance verification.", url: "" },
    { source: "IPC Supply Intelligence Brief", snippet: "Para-Aminophenol import concentration from Hebei: 73.4% of total Indian API procurement.", url: "" },
  ],
  suggested_drugs_to_inspect: ["paracetamol", "ceftriaxone", "amoxicillin"],
  matched_scenarios: ["Hebei analgesic stress", "API buffer depletion"],
};

export const MOCK_CORRIDORS = [
  { id: "c1", from: [39.9, 116.4], to: [28.7, 77.1], label: "Hebei → Delhi NCR",       volume: 0.9, disrupted: true,  province: "Hebei",         state: "Delhi" },
  { id: "c2", from: [36.7, 117.0], to: [19.1, 72.9], label: "Shandong → Mumbai",       volume: 0.7, disrupted: false, province: "Shandong",      state: "Maharashtra" },
  { id: "c3", from: [41.8, 123.4], to: [12.9, 77.6], label: "Liaoning → Bangalore",    volume: 0.5, disrupted: false, province: "Liaoning",      state: "Karnataka" },
  { id: "c4", from: [40.8, 111.7], to: [22.6, 88.4], label: "Inner Mongolia → Kolkata",volume: 0.6, disrupted: true,  province: "Inner Mongolia",state: "West Bengal" },
  { id: "c5", from: [32.1, 118.8], to: [17.4, 78.5], label: "Jiangsu → Hyderabad",     volume: 0.65,disrupted: false, province: "Jiangsu",      state: "Telangana" },
];