{
  "name": "Process ADR intake and PV cases with Claude AI and Google Sheets",
  "nodes": [
    {
      "id": "5f98098a-a599-4669-99a2-8b3a36043e3c",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        -112
      ],
      "parameters": {
        "width": 780,
        "height": 1292,
        "content": "## Adverse Drug Event (ADR) Intake & PV Case Processing with Claude AI\n\nThis workflow automates end-to-end pharmacovigilance (PV) case processing. It ingests ADR reports from web forms or emails, extr"
      }
    },
    {
      "id": "85f9d189-69e8-4ba7-ad91-13732aec9337",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        788,
        408
      ],
      "parameters": {
        "width": 440,
        "height": 328,
        "content": "## 1. ADR Ingestion & Validation"
      }
    },
    {
      "id": "9c2612f2-28d4-4957-8e03-5a7c37520fa7",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1258,
        260
      ],
      "parameters": {
        "width": 956,
        "height": 684,
        "content": "## 2. Dedup Wait + AI Medical Coding"
      }
    },
    {
      "id": "c1bbc8d2-7927-44a4-aa7f-56940b20d61d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2272,
        368
      ],
      "parameters": {
        "width": 816,
        "height": 460,
        "content": "## 3. Signal Enrichment + Regulatory Clock Wait"
      }
    },
    {
      "id": "d05a9b20-6f0e-4f44-a774-bb098e8ed836",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3124,
        244
      ],
      "parameters": {
        "width": 1192,
        "height": 716,
        "content": "## 4. Persist, Alert, Expedited Report & Audit"
      }
    },
    {
      "id": "9178d557-c81b-4588-86a7-0164dbba9a46",
      "name": "Receive ADR Report",
      "type": "n8n-nodes-base.webhook",
      "position": [
        848,
        576
      ]
    },
    {
      "id": "b2b71541-dbc9-4506-af7e-5371b9e34c78",
      "name": "Validate and Normalize ADR Intake",
      "type": "n8n-nodes-base.code",
      "position": [
        1072,
        576
      ]
    },
    {
      "id": "faf1a413-7d4f-48a1-b2c0-3ae3395671f1",
      "name": "Wait — Deduplication Window (10 min)",
      "type": "n8n-nodes-base.wait",
      "position": [
        1296,
        576
      ]
    },
    {
      "id": "b92d6830-cae8-4340-b1d0-37ec7fd2d00e",
      "name": "Check for Duplicate ADR Submission",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1520,
        504
      ]
    },
    {
      "id": "b14c4048-5c91-4435-b35b-2d1d0149160f",
      "name": "Is Duplicate — Skip or Proceed",
      "type": "n8n-nodes-base.if",
      "position": [
        1744,
        576
      ]
    },
    {
      "id": "cd852ee1-e866-4b83-96cb-4dd208417232",
      "name": "Claude AI Medical Coding and Causality Assessment",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1968,
        576
      ]
    },
    {
      "id": "eb0c0f94-ede3-469b-b6aa-4e8839585b1c",
      "name": "Claude AI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        2040,
        800
      ]
    },
    {
      "id": "4e9d5cd9-64bc-4bcb-a99a-d8e99a046413",
      "name": "Parse AI Medical Coding Output",
      "type": "n8n-nodes-base.code",
      "position": [
        2320,
        576
      ]
    },
    {
      "id": "b6a6a676-c42f-44db-a000-1469c53b7d5f",
      "name": "Signal Detection — Query Historical PV Database",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2544,
        512
      ]
    },
    {
      "id": "a75daf25-7175-458b-a176-1f005a512d55",
      "name": "Compute Disproportionality Signal (PRR/ROR)",
      "type": "n8n-nodes-base.code",
      "position": [
        2768,
        576
      ]
    },
    {
      "id": "f9772a5b-1e12-4521-93f2-f6dc2c90327d",
      "name": "Wait — Regulatory Clock Confirmation (30 min)",
      "type": "n8n-nodes-base.wait",
      "position": [
        2992,
        576
      ]
    },
    {
      "id": "203d1777-3620-431d-8446-552585d40f92",
      "name": "Persist PV Case to Database",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3440,
        384
      ]
    },
    {
      "id": "0bc1d177-06a4-4299-9ae4-37dba3db27eb",
      "name": "Expedited Report Required?",
      "type": "n8n-nodes-base.if",
      "position": [
        3216,
        672
      ]
    },
    {
      "id": "5bcd3293-4cb6-42c8-a370-88d963701dce",
      "name": "Alert PV Team — Expedited Report Required",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        3440,
        576
      ]
    },
    {
      "id": "919d867a-081c-4470-9e8e-049cf889ef44",
      "name": "Acknowledge ADR Report to Reporter",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        3440,
        768
      ]
    },
    {
      "id": "0eea15a5-9552-4366-b709-971c2b467c84",
      "name": "Build Final PV Case Response",
      "type": "n8n-nodes-base.code",
      "position": [
        3664,
        576
      ]
    },
    {
      "id": "d1458a47-e34b-4cf3-a1aa-b933a7185627",
      "name": "Write to Regulatory Audit Log",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3888,
        576
      ]
    },
    {
      "id": "7d238f97-6a2a-4849-875a-8a617e382edf",
      "name": "Send PV Case Intake Response",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        4112,
        576
      ]
    }
  ],
  "connections": {
    "Claude AI Model": {
      "ai_languageModel": [
        [
          {
            "node": "Claude AI Medical Coding and Causality Assessment",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Receive ADR Report": {
      "main": [
        [
          {
            "node": "Validate and Normalize ADR Intake",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Expedited Report Required?": {
      "main": [
        [
          {
            "node": "Alert PV Team — Expedited Report Required",
            "type": "main",
            "index": 0
          },
          {
            "node": "Acknowledge ADR Report to Reporter",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Acknowledge ADR Report to Reporter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Persist PV Case to Database": {
      "main": [
        [
          {
            "node": "Build Final PV Case Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Final PV Case Response": {
      "main": [
        [
          {
            "node": "Write to Regulatory Audit Log",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write to Regulatory Audit Log": {
      "main": [
        [
          {
            "node": "Send PV Case Intake Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse AI Medical Coding Output": {
      "main": [
        [
          {
            "node": "Signal Detection — Query Historical PV Database",
            "type": "main",
            "index": 0
          },
          {
            "node": "Compute Disproportionality Signal (PRR/ROR)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Duplicate — Skip or Proceed": {
      "main": [
        [
          {
            "node": "Claude AI Medical Coding and Causality Assessment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate and Normalize ADR Intake": {
      "main": [
        [
          {
            "node": "Wait — Deduplication Window (10 min)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Acknowledge ADR Report to Reporter": {
      "main": [
        [
          {
            "node": "Build Final PV Case Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for Duplicate ADR Submission": {
      "main": [
        [
          {
            "node": "Is Duplicate — Skip or Proceed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait — Deduplication Window (10 min)": {
      "main": [
        [
          {
            "node": "Check for Duplicate ADR Submission",
            "type": "main",
            "index": 0
          },
          {
            "node": "Is Duplicate — Skip or Proceed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Alert PV Team — Expedited Report Required": {
      "main": [
        [
          {
            "node": "Build Final PV Case Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compute Disproportionality Signal (PRR/ROR)": {
      "main": [
        [
          {
            "node": "Wait — Regulatory Clock Confirmation (30 min)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait — Regulatory Clock Confirmation (30 min)": {
      "main": [
        [
          {
            "node": "Persist PV Case to Database",
            "type": "main",
            "index": 0
          },
          {
            "node": "Expedited Report Required?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude AI Medical Coding and Causality Assessment": {
      "main": [
        [
          {
            "node": "Parse AI Medical Coding Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Signal Detection — Query Historical PV Database": {
      "main": [
        [
          {
            "node": "Compute Disproportionality Signal (PRR/ROR)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}