{
  "name": "Generate HIPAA-safe patient-friendly EMR summaries with GPT-4, PDF tools and Google Drive",
  "nodes": [
    {
      "id": "97fb4a8a-a776-4281-96d1-4852183fb3e0",
      "name": "Sticky_Intake",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5952,
        3584
      ],
      "parameters": {
        "width": 450,
        "height": 550,
        "content": "## 🛡️ PHASE 1: Intake & Atomic Splitting\nIngests raw EMR PDF. **Split Node** explodes the chart into atomic pages for isolated processing to prevent PII leakage across document sections."
      }
    },
    {
      "id": "eb8a7d69-ffa8-472c-b739-3279636b0d00",
      "name": "Sticky_Triage",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6432,
        3584
      ],
      "parameters": {
        "width": 550,
        "height": 550,
        "content": "## 🔬 PHASE 2: Clinical Classification\n**Code Node** identifies page types. **Switch Node** routes to specific redaction paths. This ensures Labs are treated differently than Imaging reports."
      }
    },
    {
      "id": "8b18a2de-adaf-45a6-ab47-ba80c0436f10",
      "name": "Sticky_Assembly",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6992,
        3568
      ],
      "parameters": {
        "width": 550,
        "height": 550,
        "content": "## 🚀 PHASE 3: Sanitization & Re-Assembly\nRedacts PII. AI generates layman summaries. **Merge Node** compiles the final patient-ready PDF for the portal."
      }
    },
    {
      "id": "dfac86c9-504e-4988-b9f1-f9956a45e84f",
      "name": "Sticky_AI_Intelligence",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        7568,
        3568
      ],
      "parameters": {
        "width": 550,
        "height": 550,
        "content": "## 🤖 PHASE 4: AI Intelligence Layer\nLeverages Claude AI for medical terminology translation, anomaly detection, and patient-friendly summaries."
      }
    },
    {
      "id": "48d85b20-9e32-464e-877b-1e859f82263d",
      "name": "HTTP: EMR PDF Intake",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6016,
        3888
      ]
    },
    {
      "id": "5644643c-20b3-4a12-a084-b6c1045c2fbf",
      "name": "Code: Clinical Classifier",
      "type": "n8n-nodes-base.code",
      "position": [
        6464,
        3888
      ]
    },
    {
      "id": "3906de09-eb18-4b10-8e55-419c8b933bb3",
      "name": "Switch: Redaction Path",
      "type": "n8n-nodes-base.switch",
      "position": [
        6656,
        3888
      ]
    },
    {
      "id": "0c989606-d169-420f-bf0a-eb46ca889de9",
      "name": "Code: HIPAA Redactor",
      "type": "n8n-nodes-base.code",
      "position": [
        6912,
        3888
      ]
    },
    {
      "id": "14ae5214-ddd8-484c-b6dc-b0405b67d8e2",
      "name": "Code: Anomaly Detector",
      "type": "n8n-nodes-base.code",
      "position": [
        7392,
        3888
      ]
    },
    {
      "id": "d356af35-fdcf-4de9-bdd6-b41af3fcf881",
      "name": "Merge: Combine Processed Pages",
      "type": "n8n-nodes-base.merge",
      "position": [
        7584,
        3888
      ]
    },
    {
      "id": "4402005a-b431-42fc-b008-3b35cf6045db",
      "name": "IF: Compliance Validator",
      "type": "n8n-nodes-base.if",
      "position": [
        7968,
        3920
      ]
    },
    {
      "id": "f518d72d-11a5-4ffc-bdfc-3f59a7bd3e40",
      "name": "Postgres: Audit Trail",
      "type": "n8n-nodes-base.postgres",
      "position": [
        8256,
        3824
      ]
    },
    {
      "id": "01c8013c-e50f-4b3f-a7e0-fdcf0cf20f28",
      "name": "Google Drive: Secure Storage",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        8256,
        3984
      ]
    },
    {
      "id": "3754eb7c-0a09-4910-b607-7a72744034d4",
      "name": "Twilio: Patient Alert",
      "type": "n8n-nodes-base.twilio",
      "position": [
        8480,
        3888
      ]
    },
    {
      "id": "c2460a2d-a300-4383-b139-743d18d7eafb",
      "name": "Email: Provider Alert (Urgent)",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        8256,
        3696
      ]
    },
    {
      "id": "f43fb3b0-0dfd-4c34-8824-74a84bde993e",
      "name": "Stop and Error: Failed Validation",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        7952,
        3712
      ]
    },
    {
      "id": "b8c7620f-a61f-4e2b-b20b-bfa36ad6aa3b",
      "name": "Sticky_QA1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8128,
        3568
      ],
      "parameters": {
        "width": 450,
        "height": 550,
        "content": "## ⚠️ PHASE 5: Quality Assurance\nError handling, validation checks, and compliance verification before final delivery."
      }
    },
    {
      "id": "2b80ecb3-2ac0-49e3-9c17-3bb3d5f392fd",
      "name": "Split PDF",
      "type": "n8n-nodes-htmlcsstopdf.htmlcsstopdf",
      "position": [
        6224,
        3888
      ]
    },
    {
      "id": "d50b7f21-3e9b-4352-90bc-95d63fe143eb",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        7120,
        3888
      ]
    },
    {
      "id": "e35627ed-0896-470d-9972-94736b36fea8",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        7120,
        4016
      ]
    },
    {
      "id": "292b1f35-9ccc-462b-928d-3ebe306b431b",
      "name": "Merge multiple PDFS into one",
      "type": "n8n-nodes-htmlcsstopdf.htmlcsstopdf",
      "position": [
        7776,
        3872
      ]
    },
    {
      "id": "f900d4fb-a754-43cd-a78e-9814dcd52bae",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5424,
        2880
      ],
      "parameters": {
        "width": 528,
        "height": 672,
        "content": "## 🏥Clinical Data Orchestrator: Multi-Stage Redaction & AI Summary Hub\n\nAn enterprise-grade engine for secure clinical document orchestration: Intake → Atomization → AI Triage → Secure Archival.\n\n### "
      }
    }
  ],
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "Code: Anomaly Detector",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split PDF": {
      "main": [
        [
          {
            "node": "Code: Clinical Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Code: HIPAA Redactor": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP: EMR PDF Intake": {
      "main": [
        [
          {
            "node": "Split PDF",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Postgres: Audit Trail": {
      "main": [
        [
          {
            "node": "Twilio: Patient Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code: Anomaly Detector": {
      "main": [
        [
          {
            "node": "Merge: Combine Processed Pages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Switch: Redaction Path": {
      "main": [
        [
          {
            "node": "Code: HIPAA Redactor",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code: HIPAA Redactor",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code: HIPAA Redactor",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code: HIPAA Redactor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF: Compliance Validator": {
      "main": [
        [
          {
            "node": "Postgres: Audit Trail",
            "type": "main",
            "index": 0
          },
          {
            "node": "Google Drive: Secure Storage",
            "type": "main",
            "index": 0
          },
          {
            "node": "Email: Provider Alert (Urgent)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Stop and Error: Failed Validation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code: Clinical Classifier": {
      "main": [
        [
          {
            "node": "Switch: Redaction Path",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive: Secure Storage": {
      "main": [
        [
          {
            "node": "Twilio: Patient Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge multiple PDFS into one": {
      "main": [
        [
          {
            "node": "IF: Compliance Validator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Email: Provider Alert (Urgent)": {
      "main": [
        [
          {
            "node": "Twilio: Patient Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge: Combine Processed Pages": {
      "main": [
        [
          {
            "node": "Merge multiple PDFS into one",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}