Extrahiere klinische Daten aus medizinischen Dokumenten mit PDF Vector und HIPAA-Konformität

Fortgeschritten

Dies ist ein Document Extraction, AI Summarization, Multimodal AI-Bereich Automatisierungsworkflow mit 9 Nodes. Hauptsächlich werden If, Code, Postgres, GoogleDrive, ManualTrigger und andere Nodes verwendet. Extrahieren Sie klinische Daten aus medizinischen Dokumenten mit PDF Vector und HIPAA-Konformität

Voraussetzungen
  • PostgreSQL-Datenbankverbindungsdaten
  • Google Drive API-Anmeldedaten
Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "meta": {
    "instanceId": "placeholder"
  },
  "nodes": [
    {
      "id": "overview-note",
      "name": "HIPAA-Überblick",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        50,
        50
      ],
      "parameters": {
        "color": 1,
        "width": 350,
        "height": 200,
        "content": "## 🏥 Medical Records Processor\n\n⚠️ **HIPAA COMPLIANT WORKFLOW**\n\n• **Secure** SFTP intake only\n• **Extracts** clinical data with PHI removal\n• **Codes** ICD-10 & CPT automatically\n• **Formats** HL7 FHIR standard\n• **Integrates** with Epic/Cerner"
      },
      "typeVersion": 1
    },
    {
      "id": "security-note",
      "name": "Sicherheitsanforderungen",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        50,
        270
      ],
      "parameters": {
        "color": 1,
        "width": 280,
        "height": 180,
        "content": "## 🔐 Security Setup\n\n**REQUIRED:**\n• Encryption at rest\n• TLS 1.3 minimum\n• Audit logging ON\n• PHI de-identification\n• Access controls\n\n⚠️ Review with compliance!"
      },
      "typeVersion": 1
    },
    {
      "id": "coding-note",
      "name": "Klinische Codes",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        650,
        450
      ],
      "parameters": {
        "width": 260,
        "height": 150,
        "content": "## 📋 Clinical Coding\n\n**Automatic mapping:**\n• Diagnoses → ICD-10\n• Procedures → CPT\n• Medications → NDC\n\n💡 No PHI in logs!"
      },
      "typeVersion": 1
    },
    {
      "id": "manual-trigger",
      "name": "Manueller Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "notes": "Process medical record",
      "position": [
        250,
        300
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "google-drive",
      "name": "Google Drive - Medizinische Unterlagen abrufen",
      "type": "n8n-nodes-base.googleDrive",
      "notes": "Retrieve record from Drive",
      "position": [
        450,
        300
      ],
      "parameters": {
        "fileId": "={{ $json.fileId }}",
        "operation": "download"
      },
      "typeVersion": 3
    },
    {
      "id": "pdfvector-extract",
      "name": "PDF Vector - Medizinische Daten extrahieren",
      "type": "n8n-nodes-pdfvector.pdfVector",
      "notes": "Extract medical information",
      "position": [
        650,
        300
      ],
      "parameters": {
        "prompt": "Extract medical information from this document or image including patient ID (not name), visit date, chief complaint, diagnoses with ICD codes, medications with dosages, vital signs, lab results with values and reference ranges, procedures performed, and follow-up instructions. Do not extract patient names, SSN, or other identifying information. Use OCR if this is a scanned document or medical image.",
        "schema": "{\"type\":\"object\",\"properties\":{\"patientRecord\":{\"type\":\"object\",\"properties\":{\"patientId\":{\"type\":\"string\"},\"visitDate\":{\"type\":\"string\"},\"visitType\":{\"type\":\"string\"},\"provider\":{\"type\":\"string\"},\"facility\":{\"type\":\"string\"}}},\"clinicalData\":{\"type\":\"object\",\"properties\":{\"chiefComplaint\":{\"type\":\"string\"},\"historyOfPresentIllness\":{\"type\":\"string\"},\"reviewOfSystems\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}},\"diagnoses\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"description\":{\"type\":\"string\"},\"icdCode\":{\"type\":\"string\"},\"type\":{\"type\":\"string\"},\"status\":{\"type\":\"string\"}}}},\"medications\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"dosage\":{\"type\":\"string\"},\"frequency\":{\"type\":\"string\"},\"route\":{\"type\":\"string\"},\"startDate\":{\"type\":\"string\"},\"status\":{\"type\":\"string\"}}}},\"vitalSigns\":{\"type\":\"object\",\"properties\":{\"bloodPressure\":{\"type\":\"string\"},\"heartRate\":{\"type\":\"string\"},\"temperature\":{\"type\":\"string\"},\"respiratoryRate\":{\"type\":\"string\"},\"oxygenSaturation\":{\"type\":\"string\"},\"weight\":{\"type\":\"string\"},\"height\":{\"type\":\"string\"},\"bmi\":{\"type\":\"string\"}}},\"labResults\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"testName\":{\"type\":\"string\"},\"value\":{\"type\":\"string\"},\"unit\":{\"type\":\"string\"},\"referenceRange\":{\"type\":\"string\"},\"flag\":{\"type\":\"string\"},\"collectionDate\":{\"type\":\"string\"}}}},\"procedures\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"name\":{\"type\":\"string\"},\"cptCode\":{\"type\":\"string\"},\"date\":{\"type\":\"string\"}}}},\"plan\":{\"type\":\"object\",\"properties\":{\"followUp\":{\"type\":\"string\"},\"instructions\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}},\"referrals\":{\"type\":\"array\",\"items\":{\"type\":\"string\"}}}}},\"required\":[\"patientRecord\",\"diagnoses\"],\"additionalProperties\":false}",
        "resource": "document",
        "inputType": "file",
        "operation": "extract",
        "binaryPropertyName": "data"
      },
      "typeVersion": 1
    },
    {
      "id": "process-validate",
      "name": "Daten verarbeiten und validieren",
      "type": "n8n-nodes-base.code",
      "notes": "Validate and prepare data",
      "position": [
        850,
        300
      ],
      "parameters": {
        "jsCode": "// Process and validate medical data\nconst medicalData = $input.first().json.data;\n\n// Create audit log entry\nconst auditLog = {\n  action: 'Medical Record Processed',\n  timestamp: new Date().toISOString(),\n  recordType: 'Clinical Document',\n  patientId: medicalData.patientRecord.patientId,\n  userId: 'system-automated',\n  ipAddress: 'internal-process'\n};\n\n// Validate critical fields\nconst validationResults = {\n  hasPatientId: !!medicalData.patientRecord?.patientId,\n  hasVisitDate: !!medicalData.patientRecord?.visitDate,\n  hasDiagnoses: medicalData.diagnoses?.length > 0,\n  hasValidIcdCodes: true\n};\n\n// Validate ICD codes format\nif (medicalData.diagnoses) {\n  medicalData.diagnoses.forEach(diagnosis => {\n    if (diagnosis.icdCode && !diagnosis.icdCode.match(/^[A-Z][0-9]{2}(\\.[0-9]{1,2})?$/)) {\n      validationResults.hasValidIcdCodes = false;\n    }\n  });\n}\n\n// Flag abnormal lab results\nconst abnormalLabs = [];\nif (medicalData.labResults) {\n  medicalData.labResults.forEach(lab => {\n    if (lab.flag && (lab.flag === 'H' || lab.flag === 'L' || lab.flag === 'Critical')) {\n      abnormalLabs.push({\n        test: lab.testName,\n        value: lab.value,\n        flag: lab.flag\n      });\n    }\n  });\n}\n\n// Check for drug interactions (simplified)\nconst medications = medicalData.medications || [];\nconst potentialInteractions = [];\n// This is a simplified check - in production, use a proper drug interaction API\nif (medications.length > 1) {\n  // Example: Check for common dangerous combinations\n  const medNames = medications.map(m => m.name.toLowerCase());\n  if (medNames.some(m => m.includes('warfarin')) && medNames.some(m => m.includes('aspirin'))) {\n    potentialInteractions.push('Warfarin + Aspirin: Increased bleeding risk');\n  }\n}\n\n// Prepare processed record\nconst processedRecord = {\n  // Core data\n  patientRecord: medicalData.patientRecord,\n  clinicalData: medicalData.clinicalData,\n  diagnoses: medicalData.diagnoses,\n  medications: medicalData.medications,\n  vitalSigns: medicalData.vitalSigns,\n  labResults: medicalData.labResults,\n  procedures: medicalData.procedures,\n  plan: medicalData.plan,\n  \n  // Analysis results\n  alerts: {\n    abnormalLabs,\n    potentialInteractions\n  },\n  \n  // Metadata\n  validation: validationResults,\n  processedAt: new Date().toISOString(),\n  dataClassification: 'PHI - Protected Health Information',\n  retentionYears: 7,\n  \n  // Compliance\n  auditLog\n};\n\nreturn [{ json: processedRecord }];"
      },
      "typeVersion": 2
    },
    {
      "id": "check-valid",
      "name": "Valider Datensatz?",
      "type": "n8n-nodes-base.if",
      "position": [
        1050,
        300
      ],
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{ $json.validation.hasPatientId }}",
              "value2": true
            },
            {
              "value1": "={{ $json.validation.hasDiagnoses }}",
              "value2": true
            }
          ]
        },
        "combineOperation": "all"
      },
      "typeVersion": 1
    },
    {
      "id": "secure-storage",
      "name": "In sicherer Datenbank speichern",
      "type": "n8n-nodes-base.postgres",
      "notes": "HIPAA-compliant storage",
      "position": [
        1250,
        250
      ],
      "parameters": {
        "table": "medical_records",
        "columns": "patient_id,visit_date,diagnoses,medications,lab_results,processed_at,data_classification",
        "operation": "insert"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "check-valid": {
      "main": [
        [
          {
            "node": "secure-storage",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "manual-trigger": {
      "main": [
        [
          {
            "node": "google-drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "process-validate": {
      "main": [
        [
          {
            "node": "check-valid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "google-drive": {
      "main": [
        [
          {
            "node": "pdfvector-extract",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "pdfvector-extract": {
      "main": [
        [
          {
            "node": "process-validate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Häufig gestellte Fragen

Wie verwende ich diesen Workflow?

Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.

Für welche Szenarien ist dieser Workflow geeignet?

Fortgeschritten - Dokumentenextraktion, KI-Zusammenfassung, Multimodales KI

Ist es kostenpflichtig?

Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.

Workflow-Informationen
Schwierigkeitsgrad
Fortgeschritten
Anzahl der Nodes9
Kategorie3
Node-Typen7
Schwierigkeitsbeschreibung

Für erfahrene Benutzer, mittelkomplexe Workflows mit 6-15 Nodes

Autor
PDF Vector

PDF Vector

@pdfvector

A fully featured PDF APIs for developers - Parse any PDF or Word document, extract structured data, and access millions of academic papers - all through simple APIs.

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34