{
  "name": "Coordinate patient care and alerts with EHR/FHIR, GPT-4, Twilio, Gmail and Slack",
  "nodes": [
    {
      "id": "a7f521b0-b179-477f-937b-998217bd1b2f",
      "name": "Schedule: Poll APIs Every 2 Minutes",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -3872,
        80
      ]
    },
    {
      "id": "489b1835-c0bc-40e9-a64a-7ff3afa28631",
      "name": "Webhook: Real-Time Event Ingestion",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -3200,
        272
      ]
    },
    {
      "id": "8540bc8a-4bef-43c1-b078-cf17f931559a",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -3648,
        80
      ]
    },
    {
      "id": "6e313efb-9b26-4d6b-aa85-b1352f0a51a0",
      "name": "Fetch Flight & Weather Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3424,
        80
      ]
    },
    {
      "id": "9759fbf3-d8a3-4d88-bb1c-caed4fe8163b",
      "name": "Validate & Normalize Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -2976,
        176
      ]
    },
    {
      "id": "efa8778d-fbf1-49a7-b8af-d88cc217c51c",
      "name": "Check Idempotency & Deduplication",
      "type": "n8n-nodes-base.code",
      "position": [
        -2752,
        176
      ]
    },
    {
      "id": "55f7f73d-13d9-469e-8d58-3a67b8fb5b8c",
      "name": "Is Duplicate Event?",
      "type": "n8n-nodes-base.if",
      "position": [
        -2528,
        176
      ]
    },
    {
      "id": "d43f9352-2d1e-489b-964e-e95266a5e1ac",
      "name": "AI Agent: Disruption Prediction & Analysis",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -2272,
        160
      ]
    },
    {
      "id": "c14dbdc4-a623-4a8e-8286-4bcf95609cd4",
      "name": "OpenAI GPT-4",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -2272,
        480
      ]
    },
    {
      "id": "dcc8392e-dfac-46b4-a1c5-8656c0623d66",
      "name": "Structured Output: Disruption Analysis",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -2112,
        336
      ]
    },
    {
      "id": "3e49d10c-a9b3-4491-8fb9-092bed93d9a5",
      "name": "Apply Operational Rules Engine",
      "type": "n8n-nodes-base.code",
      "position": [
        -1824,
        160
      ]
    },
    {
      "id": "a2f02d04-1b7e-4d81-b17c-a1965e26506d",
      "name": "Route by Severity & Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1600,
        128
      ]
    },
    {
      "id": "1956a504-9912-4a47-bf6f-9b8c47d2b854",
      "name": "Store: Critical Events DB",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -1396,
        72
      ]
    },
    {
      "id": "412a9bec-8467-463b-ad4d-3bf26c74222d",
      "name": "Store: High Priority Events DB",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -52,
        288
      ]
    },
    {
      "id": "01dcf0fc-39a5-45a8-85c9-fe1a38bf9a28",
      "name": "Store: Medium Priority Events DB",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -52,
        480
      ]
    },
    {
      "id": "94ff6f62-9d6b-4e62-b4d1-66c5ba1224f9",
      "name": "Store: Low Priority Events DB",
      "type": "n8n-nodes-base.postgres",
      "position": [
        -1184,
        544
      ]
    },
    {
      "id": "79a49437-4a46-4729-9ad8-437b3d31ceaa",
      "name": "Alert: OCC Slack Channel",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1172,
        72
      ]
    },
    {
      "id": "80b91ab1-4a73-47b4-b935-96ce4e075a28",
      "name": "Email: Ground Staff Notification",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        -948,
        72
      ]
    },
    {
      "id": "2c3dabe7-32db-4cbb-8dbf-31436cf21a44",
      "name": "SMS: Customer Service Alert",
      "type": "n8n-nodes-base.twilio",
      "position": [
        -724,
        72
      ]
    },
    {
      "id": "db4e26fc-9ec7-4a58-9bf2-d0964a6ff2b6",
      "name": "Prepare Passenger Notification Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -500,
        72
      ]
    },
    {
      "id": "6fdd3c91-e1a1-4656-8a90-24b700a18bc7",
      "name": "Requires Rebooking?",
      "type": "n8n-nodes-base.if",
      "position": [
        -276,
        72
      ]
    },
    {
      "id": "db0f8677-c4af-4c14-ba9e-76f9812de2b6",
      "name": "Trigger Rebooking Workflow",
      "type": "n8n-nodes-base.code",
      "position": [
        0,
        48
      ]
    },
    {
      "id": "cfb3eb29-bb33-4233-81b2-307b77341e7a",
      "name": "Merge All Notification Paths",
      "type": "n8n-nodes-base.merge",
      "position": [
        172,
        184
      ]
    },
    {
      "id": "7e9e8503-1ca5-4050-b2df-4c530d7438b9",
      "name": "Generate Dashboard Metrics",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        396,
        216
      ]
    },
    {
      "id": "eb2ad27e-cc54-4ca9-8d93-65d5aa72896a",
      "name": "Store: Dashboard Metrics DB",
      "type": "n8n-nodes-base.postgres",
      "position": [
        620,
        216
      ]
    },
    {
      "id": "db8fd5fe-ff22-41d9-b705-0cc7ec523530",
      "name": "Rate Limit Handler",
      "type": "n8n-nodes-base.wait",
      "position": [
        -3200,
        80
      ]
    },
    {
      "id": "aab486b8-341f-420f-9b47-a5ede5ebc16b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2160,
        -480
      ],
      "parameters": {
        "width": 496,
        "height": 336,
        "content": "## Prerequisites\nActive EHR system with FHIR API access or HL7 integration capability.  \n## Use Cases\nAutomated appointment reminder campaigns reducing no-shows.\n## Customization\nModify risk scoring m"
      }
    },
    {
      "id": "604a0531-ec9e-46c7-a84a-171e100237dc",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2800,
        -416
      ],
      "parameters": {
        "width": 592,
        "height": 224,
        "content": "## Setup Steps\n1. Configure EHR/FHIR API credentialsfor patient data access\n2. Set up webhook endpoints for real-time clinical event notifications\n3. Add OpenAI API key for patient risk stratification"
      }
    },
    {
      "id": "9c9e53e5-6602-4fbe-8697-f033b07cad80",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3872,
        -416
      ],
      "parameters": {
        "width": 1024,
        "height": 272,
        "content": "## How It Works\nThis workflow automates end-to-end patient care coordination by monitoring appointment schedules, clinical events, and care milestones while orchestrating personalized communications a"
      }
    },
    {
      "id": "c994005b-caf5-4e5d-92a7-17589515ab96",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        -64
      ],
      "parameters": {
        "width": 1328,
        "height": 928,
        "content": "## Care Team Alerting \nRoutes high-risk patient cases to care coordinators via Slack with clinical context and recommended interventions.\n**Why** - Ensures timely human oversight for complex cases whi"
      }
    },
    {
      "id": "a27fa62d-330a-4755-a408-3b5a47513729",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1408,
        -64
      ],
      "parameters": {
        "width": 848,
        "height": 944,
        "content": "## Clinical Protocol Application \nApplies evidence-based care pathways for appointment reminders, medication adherence, post-discharge follow-ups based on patient conditions.\n**Why** - Ensures consist"
      }
    },
    {
      "id": "dbdcb684-21e4-4589-a147-c156f507f5a2",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2320,
        -64
      ],
      "parameters": {
        "width": 896,
        "height": 928,
        "content": "## Risk Stratification\nRoutes patient records through AI models calculating no-show probability, readmission risk, and care urgency scores.\n**Why** - Identifies patients requiring proactive interventi"
      }
    },
    {
      "id": "afb98920-0fee-4e42-bfe8-a1f3eb186dcd",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3936,
        -64
      ],
      "parameters": {
        "width": 1600,
        "height": 720,
        "content": "## Patient Data Ingestion \nFetches appointment schedules, clinical events, and patient demographics from EHR/FHIR APIs using scheduled triggers and webhooks.\n**Why** - Centralizes patient data from fr"
      }
    }
  ],
  "connections": {
    "OpenAI GPT-4": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent: Disruption Prediction & Analysis",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Structured Output: Disruption Analysis",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Rate Limit Handler": {
      "main": [
        [
          {
            "node": "Validate & Normalize Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Duplicate Event?": {
      "main": [
        [],
        [
          {
            "node": "AI Agent: Disruption Prediction & Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Requires Rebooking?": {
      "main": [
        [
          {
            "node": "Trigger Rebooking Workflow",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge All Notification Paths",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Fetch Flight & Weather Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Alert: OCC Slack Channel": {
      "main": [
        [
          {
            "node": "Email: Ground Staff Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Severity & Type": {
      "main": [
        [
          {
            "node": "Store: Critical Events DB",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Store: High Priority Events DB",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Store: Medium Priority Events DB",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Store: Low Priority Events DB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store: Critical Events DB": {
      "main": [
        [
          {
            "node": "Alert: OCC Slack Channel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate & Normalize Data": {
      "main": [
        [
          {
            "node": "Check Idempotency & Deduplication",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Dashboard Metrics": {
      "main": [
        [
          {
            "node": "Store: Dashboard Metrics DB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger Rebooking Workflow": {
      "main": [
        [
          {
            "node": "Merge All Notification Paths",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Flight & Weather Data": {
      "main": [
        [
          {
            "node": "Rate Limit Handler",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SMS: Customer Service Alert": {
      "main": [
        [
          {
            "node": "Prepare Passenger Notification Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge All Notification Paths": {
      "main": [
        [
          {
            "node": "Generate Dashboard Metrics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apply Operational Rules Engine": {
      "main": [
        [
          {
            "node": "Route by Severity & Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store: High Priority Events DB": {
      "main": [
        [
          {
            "node": "Merge All Notification Paths",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Email: Ground Staff Notification": {
      "main": [
        [
          {
            "node": "SMS: Customer Service Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Store: Medium Priority Events DB": {
      "main": [
        [
          {
            "node": "Merge All Notification Paths",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Check Idempotency & Deduplication": {
      "main": [
        [
          {
            "node": "Is Duplicate Event?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook: Real-Time Event Ingestion": {
      "main": [
        [
          {
            "node": "Validate & Normalize Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Passenger Notification Data": {
      "main": [
        [
          {
            "node": "Requires Rebooking?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule: Poll APIs Every 2 Minutes": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output: Disruption Analysis": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent: Disruption Prediction & Analysis",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent: Disruption Prediction & Analysis": {
      "main": [
        [
          {
            "node": "Apply Operational Rules Engine",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}