<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
                  xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
                  xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
                  xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                  id="Definitions_PlataformasTI"
                  targetNamespace="http://workmed.cl/bpmn/plataformas-ti"
                  exporter="EMERCOM SpA"
                  exporterVersion="2.0">

  <!-- =========================================================
       ECOSISTEMA TI WORKMED · 15 pools agrupados en 4 clusters
       NO es flujo de proceso · es mapa de integraciones
       ========================================================= -->
  <bpmn:collaboration id="Collaboration_EcosistemaTI">

    <!-- Cluster A · Núcleo clínico-operacional -->
    <bpmn:participant id="Pool_FlowMed" name="A1 · FlowMed (legacy core · proveedor Secall · on-prem Manuel Montt + replica AWS RDS · NO expone API genérica)" processRef="Process_FlowMed"/>
    <bpmn:participant id="Pool_SACMed" name="A2 · SACMed (HIS · GCP · ficha clinica por RUT · botón unidireccional ficha → Contraloría)" processRef="Process_SACMed"/>
    <bpmn:participant id="Pool_Megafy" name="A3 · Megafy / Appian Cloud (preadmisión digital · decisión arquitectónica de hace 3 años, cuestionada hoy)" processRef="Process_Megafy"/>
    <bpmn:participant id="Pool_RobleLabs" name="A4 · RobleLabs (POS biométrico · cédula chip + huella + cámara)" processRef="Process_RobleLabs"/>
    <bpmn:participant id="Pool_PartnersLab" name="A5 · Partners LIS / Imagen / Drogas / Firma (LaboCenter · Bionet · Lab Workmed · Lab Blanco · RIS Galen · TSCom · CEMA · SignAPIS)" processRef="Process_PartnersLab"/>

    <!-- Cluster B · Comercial / BI / Back-office -->
    <bpmn:participant id="Pool_HubSpot" name="B1 · HubSpot (CRM + portal cliente · 3 roles: intake + comercial + facturación-cobranza · vulnerabilidades reconocidas)" processRef="Process_HubSpot"/>
    <bpmn:participant id="Pool_Defontana" name="B2 · Defontana (ERP · facturación + inventario + OC + estado pagos · sin API · reemplazó NetSuite ene-2025) + Tivendo POS" processRef="Process_Defontana"/>
    <bpmn:participant id="Pool_Buk" name="B3 · Buk (RR.HH. · nómina chilena · centralización con Defontana 100% manual)" processRef="Process_Buk"/>
    <bpmn:participant id="Pool_PowerBI" name="B4 · Power BI (dashboards · refresco 30 min · cuentas paralelas sin auditoría · descartado destino estratégico futuro F9)" processRef="Process_PowerBI"/>
    <bpmn:participant id="Pool_ScriptPython" name="B5 · Script Python valorización (~2.553 líneas · GitHub personal Rodrigo · fuente autoritativa pricing · FlowMed sólo referencial)" processRef="Process_ScriptPython"/>

    <!-- Cluster C · Plataformas internas Workmed -->
    <bpmn:participant id="Pool_AcredRyS" name="C1 · Acreditación R&amp;S (Angular + NestJS · AWS Workmed · Karina Jara · sin integración con FlowMed)" processRef="Process_AcredRyS"/>
    <bpmn:participant id="Pool_FichaSC" name="C2 · Ficha Salud Compatible (Python + Supabase free · productiva exclusivo Syncore · será reemplazada por GenieMD)" processRef="Process_FichaSC"/>
    <bpmn:participant id="Pool_SaludMental" name="C3 · Salud Mental (Python + Supabase free · en validación · reemplazará Microsoft Forms + Excel)" processRef="Process_SaludMental"/>
    <bpmn:participant id="Pool_GenieMD" name="C4 · GenieMD (futuro · plataforma EE.UU. en piloto · reemplazo Ficha Salud Compatible)" processRef="Process_GenieMD"/>

    <!-- Cluster D · Infraestructura transversal -->
    <bpmn:participant id="Pool_Infra" name="D · Infraestructura transversal (AWS Workmed propia · AWS RDS read-replica · on-prem Manuel Montt · GCP · Cloudflare · Supabase · GitHub personal · Anthropic aspiracional)" processRef="Process_Infra"/>

    <!-- =========================================================
         MESSAGE FLOWS · integraciones críticas entre sistemas
         ========================================================= -->

    <!-- A · clínico-operacional -->
    <bpmn:messageFlow id="MF_FlowMed_SACMed" sourceRef="ST_FlowMed_CreaEvento" targetRef="ST_SACMed_FichaRUT" name="crea evento clínico"/>
    <bpmn:messageFlow id="MF_SACMed_FlowMed" sourceRef="ST_SACMed_BotonContraloria" targetRef="ST_FlowMed_Contraloria" name="botón unidireccional ficha → Contraloría (R5 · riesgo descalce)"/>
    <bpmn:messageFlow id="MF_FlowMed_Megafy" sourceRef="ST_FlowMed_NotifyPreadm" targetRef="ST_Megafy_Recibe" name="objeto preadmisión"/>
    <bpmn:messageFlow id="MF_Megafy_SignAPIS" sourceRef="ST_Megafy_Firma" targetRef="ST_Partners_SignAPIS" name="firma electrónica"/>
    <bpmn:messageFlow id="MF_FlowMed_Roble" sourceRef="ST_FlowMed_BiometriaReq" targetRef="ST_Roble_Verifica" name="solicitud verificación"/>
    <bpmn:messageFlow id="MF_Roble_FlowMed" sourceRef="ST_Roble_Responde" targetRef="ST_FlowMed_Admision" name="respuesta OK/falla"/>
    <bpmn:messageFlow id="MF_FlowMed_Partners" sourceRef="ST_FlowMed_OrdenPartners" targetRef="ST_Partners_OrdenIN" name="órdenes partner punto-a-punto (sin API genérica · R6)"/>
    <bpmn:messageFlow id="MF_Partners_SACMed" sourceRef="ST_Partners_ResultadoOUT" targetRef="ST_SACMed_Resultados" name="resultados clínicos"/>

    <!-- A → infra · hosting -->
    <bpmn:messageFlow id="MF_FlowMed_OnPrem" sourceRef="ST_FlowMed_CreaEvento" targetRef="ST_Infra_OnPrem" name="hosted on (on-prem Manuel Montt · ambigüedad R4)"/>
    <bpmn:messageFlow id="MF_OnPrem_RDS" sourceRef="ST_Infra_OnPrem" targetRef="ST_Infra_RDSReplica" name="replica caliente 5-10 min"/>
    <bpmn:messageFlow id="MF_SACMed_GCP" sourceRef="ST_SACMed_FichaRUT" targetRef="ST_Infra_GCP" name="hosted on GCP"/>

    <!-- B · comercial / BI -->
    <bpmn:messageFlow id="MF_RDS_PowerBI" sourceRef="ST_Infra_RDSReplica" targetRef="ST_PowerBI_Refresca" name="vistas (refresco 30 min)"/>
    <bpmn:messageFlow id="MF_RDS_Script" sourceRef="ST_Infra_RDSReplica" targetRef="ST_Script_Calcula" name="extracción control de pago diaria (Ignacio descarga)"/>
    <bpmn:messageFlow id="MF_Script_PowerBI" sourceRef="ST_Script_Calcula" targetRef="ST_PowerBI_Refresca" name="valorización consolidada"/>
    <bpmn:messageFlow id="MF_PowerBI_HubSpot" sourceRef="ST_PowerBI_Embed" targetRef="ST_HubSpot_Portal" name="dashboards embebidos en portal cliente"/>
    <bpmn:messageFlow id="MF_HubSpot_FlowMed" sourceRef="ST_HubSpot_Pipelines" targetRef="ST_FlowMed_Admision" name="SIN integración (intento 2024 falló · R7) · queda manual"/>
    <bpmn:messageFlow id="MF_HubSpot_Defontana" sourceRef="ST_HubSpot_Pipelines" targetRef="ST_Defontana_Factura" name="proyecto activo 2026 · hoy conciliación Excel manual"/>
    <bpmn:messageFlow id="MF_Defontana_Buk" sourceRef="ST_Defontana_Factura" targetRef="ST_Buk_Nomina" name="centralización RR.HH. ↔ ERP MANUAL (R10 dolor §D10)"/>

    <!-- C · plataformas internas -->
    <bpmn:messageFlow id="MF_RDS_FichaSC" sourceRef="ST_Infra_RDSReplica" targetRef="ST_FichaSC_ConsultaRUT" name="consulta por RUT"/>
    <bpmn:messageFlow id="MF_RDS_SaludMental" sourceRef="ST_Infra_RDSReplica" targetRef="ST_SaludMental_Tests" name="agenda psicológica por RUT"/>
    <bpmn:messageFlow id="MF_AcredRyS_AWS" sourceRef="ST_AcredRyS_Operatoria" targetRef="ST_Infra_AWSPropia" name="hosted on AWS Workmed propia"/>
    <bpmn:messageFlow id="MF_FichaSC_Supabase" sourceRef="ST_FichaSC_ConsultaRUT" targetRef="ST_Infra_Supabase" name="datos en Supabase free (R8b vulnerabilidad)"/>
    <bpmn:messageFlow id="MF_SaludMental_Supabase" sourceRef="ST_SaludMental_Tests" targetRef="ST_Infra_Supabase" name="datos en Supabase free"/>
    <bpmn:messageFlow id="MF_FichaSC_GenieMD" sourceRef="ST_FichaSC_Reemplazo" targetRef="ST_GenieMD_Pacientes" name="reemplazo futuro"/>
    <bpmn:messageFlow id="MF_GitHub_Script" sourceRef="ST_Infra_GitHubPersonal" targetRef="ST_Script_Calcula" name="código en repo personal Rodrigo (R2 · severidad ALTA)"/>
    <bpmn:messageFlow id="MF_GitHub_Plataformas" sourceRef="ST_Infra_GitHubPersonal" targetRef="ST_AcredRyS_Operatoria" name="código 3 plataformas internas"/>

  </bpmn:collaboration>

  <!-- =========================================================
       PROCESOS · cada pool tiene capacidades como serviceTask
       ========================================================= -->

  <bpmn:process id="Process_FlowMed" isExecutable="false">
    <bpmn:serviceTask id="ST_FlowMed_Admision" name="Admisión + agendamiento + hoja de ruta"/>
    <bpmn:serviceTask id="ST_FlowMed_Contraloria" name="Módulo Contraloría (preinforme + aptitud)"/>
    <bpmn:serviceTask id="ST_FlowMed_CreaEvento" name="Crea evento clínico + control pago + dashboards"/>
    <bpmn:serviceTask id="ST_FlowMed_NotifyPreadm" name="Notifica preadmisión a Megafy"/>
    <bpmn:serviceTask id="ST_FlowMed_BiometriaReq" name="Solicita verificación biométrica"/>
    <bpmn:serviceTask id="ST_FlowMed_OrdenPartners" name="Emite órdenes a partners LIS/RIS/Drogas"/>
  </bpmn:process>

  <bpmn:process id="Process_SACMed" isExecutable="false">
    <bpmn:serviceTask id="ST_SACMed_FichaRUT" name="Ficha clínica electrónica por RUT"/>
    <bpmn:serviceTask id="ST_SACMed_Resultados" name="Recibe resultados RIS/LIS/Drogas/CEMA"/>
    <bpmn:serviceTask id="ST_SACMed_BotonContraloria" name="Botón datos clínicos → Contraloría (unidireccional)"/>
  </bpmn:process>

  <bpmn:process id="Process_Megafy" isExecutable="false">
    <bpmn:serviceTask id="ST_Megafy_Recibe" name="Recibe objeto preadmisión + cuestionarios"/>
    <bpmn:serviceTask id="ST_Megafy_Firma" name="Envía documentos a SignAPIS"/>
    <bpmn:serviceTask id="ST_Megafy_NotifyPaciente" name="Notifica paciente WhatsApp/SMS/mail"/>
  </bpmn:process>

  <bpmn:process id="Process_RobleLabs" isExecutable="false">
    <bpmn:serviceTask id="ST_Roble_Verifica" name="Verifica identidad (huella + chip + cámara)"/>
    <bpmn:serviceTask id="ST_Roble_Responde" name="Responde OK/falla a FlowMed/SACMed"/>
  </bpmn:process>

  <bpmn:process id="Process_PartnersLab" isExecutable="false">
    <bpmn:serviceTask id="ST_Partners_OrdenIN" name="Recibe orden electrónica + muestra física"/>
    <bpmn:serviceTask id="ST_Partners_ResultadoOUT" name="Entrega resultados clínicos / informes"/>
    <bpmn:serviceTask id="ST_Partners_SignAPIS" name="SignAPIS · firma electrónica documentos"/>
  </bpmn:process>

  <bpmn:process id="Process_HubSpot" isExecutable="false">
    <bpmn:serviceTask id="ST_HubSpot_Intake" name="Intake correo agendamiento (cola por confirmar)"/>
    <bpmn:serviceTask id="ST_HubSpot_Pipelines" name="Pipelines comercial + facturación + cobranza"/>
    <bpmn:serviceTask id="ST_HubSpot_Portal" name="Portal cliente (login · dashboards Power BI embebidos)"/>
  </bpmn:process>

  <bpmn:process id="Process_Defontana" isExecutable="false">
    <bpmn:serviceTask id="ST_Defontana_Factura" name="Factura DTE + estado de pagos"/>
    <bpmn:serviceTask id="ST_Defontana_OC" name="Inventario + OC + plan de cuentas"/>
    <bpmn:serviceTask id="ST_Defontana_Tivendo" name="Tivendo POS / módulo de caja"/>
  </bpmn:process>

  <bpmn:process id="Process_Buk" isExecutable="false">
    <bpmn:serviceTask id="ST_Buk_Nomina" name="Nómina + contratos + remuneraciones empleados"/>
  </bpmn:process>

  <bpmn:process id="Process_PowerBI" isExecutable="false">
    <bpmn:serviceTask id="ST_PowerBI_Refresca" name="Refresca vistas cada 30 min (RDS + SharePoint + Salud Compatible)"/>
    <bpmn:serviceTask id="ST_PowerBI_Embed" name="Dashboards por cliente / interno · embebe en HubSpot"/>
  </bpmn:process>

  <bpmn:process id="Process_ScriptPython" isExecutable="false">
    <bpmn:serviceTask id="ST_Script_Calcula" name="Calcula valorización (descuentos tramo/lista/unitario/grupo)"/>
    <bpmn:serviceTask id="ST_Script_Sube" name="Sube consolidación a dashboard comercial"/>
  </bpmn:process>

  <bpmn:process id="Process_AcredRyS" isExecutable="false">
    <bpmn:serviceTask id="ST_AcredRyS_Operatoria" name="Empresas + faenas + cargos + trabajadores + docs"/>
    <bpmn:serviceTask id="ST_AcredRyS_Estado" name="Calcula estado · genera .zip"/>
  </bpmn:process>

  <bpmn:process id="Process_FichaSC" isExecutable="false">
    <bpmn:serviceTask id="ST_FichaSC_ConsultaRUT" name="Consulta RUT en RDS · registro llamados Syncore"/>
    <bpmn:serviceTask id="ST_FichaSC_Reemplazo" name="Será reemplazada por GenieMD (decisión)"/>
  </bpmn:process>

  <bpmn:process id="Process_SaludMental" isExecutable="false">
    <bpmn:serviceTask id="ST_SaludMental_Tests" name="Tests Wonderlic / aversión riesgo / persona bajo lluvia"/>
    <bpmn:serviceTask id="ST_SaludMental_Interp" name="Interpretaciones para psicólogo"/>
  </bpmn:process>

  <bpmn:process id="Process_GenieMD" isExecutable="false">
    <bpmn:serviceTask id="ST_GenieMD_Pacientes" name="Gestión pacientes crónicos · piloto · sin integración FlowMed"/>
  </bpmn:process>

  <bpmn:process id="Process_Infra" isExecutable="false">
    <bpmn:serviceTask id="ST_Infra_OnPrem" name="On-prem Manuel Montt (FlowMed prod · sin RP secundario · R15)"/>
    <bpmn:serviceTask id="ST_Infra_RDSReplica" name="AWS RDS read-replica (Secall gatekeeper técnico · cuenta genérica compartida · R1)"/>
    <bpmn:serviceTask id="ST_Infra_AWSPropia" name="AWS Workmed propia (RDS+S3+EC2+Amplify · sin VPN · R8d)"/>
    <bpmn:serviceTask id="ST_Infra_GCP" name="GCP (hosting SACMed · cuenta separada)"/>
    <bpmn:serviceTask id="ST_Infra_Cloudflare" name="Cloudflare DNS"/>
    <bpmn:serviceTask id="ST_Infra_Supabase" name="Supabase free (BaaS · R8b vulnerabilidad reconocida)"/>
    <bpmn:serviceTask id="ST_Infra_GitHubPersonal" name="GitHub PERSONAL Rodrigo (sin organización Workmed · R2 · R8c)"/>
    <bpmn:serviceTask id="ST_Infra_Anthropic" name="Anthropic / Claude (aspiracional · sin suscripción)"/>
  </bpmn:process>

  <!-- =========================================================
       TEXT ANNOTATIONS · 16 riesgos del §5 AS-IS
       ========================================================= -->
  <bpmn:textAnnotation id="Ann_R1">
    <bpmn:text>R1 · severidad ALTA · Soberanía sobre la BD productiva FlowMed cedida a Secall · gatekeeper técnico real es el proveedor externo · Eduardo broker funcional ("toda solicitud de visualizador pasa por él") · acceso interno vía cuenta genérica compartida sin trazabilidad · sin contrato formal de encargo de tratamiento · incumple Ley 19.628 + Ley 16.744/DS 109 [Recaudacion 1:25:32; EcosistemaTI 33:37, 35:51]</bpmn:text>
  </bpmn:textAnnotation>
  <bpmn:textAnnotation id="Ann_R2">
    <bpmn:text>R2 · severidad ALTA · Núcleo lógica negocio en repo personal · Script Python de valorización (~2.553 líneas) en GitHub personal Rodrigo Llancao · módulo de precios FlowMed sólo referencial · script es fuente autoritativa · migración a GitHub Workmed pendiente con Christian Urbina [Plataformas 44:04; Recaudacion 1:15:49, 1:30:35]</bpmn:text>
  </bpmn:textAnnotation>
  <bpmn:textAnnotation id="Ann_R3">
    <bpmn:text>R3 · severidad media · Iniciativa valorización en FlowMed abandonada hace ~6 meses · Excel diario sigue siendo el origen · automatizar pricing dentro de FlowMed quedó abandonado por rotación del validador; nunca se llegó a verificar si calculaba bien [Recaudacion 38:29, 41:43]</bpmn:text>
  </bpmn:textAnnotation>
  <bpmn:textAnnotation id="Ann_R4">
    <bpmn:text>R4 · severidad ALTA · Hosting FlowMed: ambigüedad on-prem vs AWS · versión canónica = on-prem Manuel Montt + replica caliente AWS RDS · réplica caliente con datos clínicos = vulnerabilidad de compliance Ley 21.719 Datos Personales [EcosistemaTI 33:37, 43:39]</bpmn:text>
  </bpmn:textAnnotation>
  <bpmn:textAnnotation id="Ann_R5">
    <bpmn:text>R5 · severidad ALTA · Fuente de verdad clínica disputada (FlowMed vs SACMed vs ficha papel) · F2: "FlowMed vuelve a tener el 100%" · F4 corrige: comunicación unidireccional ficha → Contraloría · "dos repositorios paralelos con riesgo de descalce" · UCI usa SACMed (6/12 propias) + SharePoint manual (acreditadas) [Flowmed 23:53; EcosistemaTI 24:25]</bpmn:text>
  </bpmn:textAnnotation>
  <bpmn:textAnnotation id="Ann_R6">
    <bpmn:text>R6 · severidad media · FlowMed NO expone API genérica · sólo integraciones partner punto-a-punto (Megafy, RobleLabs, RIS Galen, TSCom, LIS) · todo desarrollo interno (R&amp;S, Salud Compatible, Salud Mental, agente, BI) debe ir contra réplica AWS con desfase 5-10 min [Plataformas 35:00; EcosistemaTI 3:14]</bpmn:text>
  </bpmn:textAnnotation>
  <bpmn:textAnnotation id="Ann_R7">
    <bpmn:text>R7 · severidad media · Sin integración HubSpot ↔ FlowMed · intento 2024 fracasó por falta de acuerdo entre partes técnicas · cola "agenda por confirmar" en HubSpot y carga en FlowMed = dos operaciones manuales superpuestas · proyecto distinto activo HubSpot ↔ Defontana 2026 [Agendamiento 47:19; Recaudacion 7:00, 11:23]</bpmn:text>
  </bpmn:textAnnotation>
  <bpmn:textAnnotation id="Ann_R8">
    <bpmn:text>R8 · severidad media-alta · Vulnerabilidades de seguridad reconocidas: (a) Portal HubSpot del cliente "tiene vulnerabilidades muy importantes" · (b) Bases en Supabase plan gratuito · (c) GitHub personal con correo corporativo sin organización Workmed · (d) Sin VPN ni restricciones de red · (e) Cuenta única compartida en Power BI sin auditoría [Flowmed 1:02:43, 1:06:32; Plataformas 25:12, 44:04, 1:05:15]</bpmn:text>
  </bpmn:textAnnotation>
  <bpmn:textAnnotation id="Ann_R9">
    <bpmn:text>R9 · severidad ALTA · Cero capacidad TI interna de desarrollo respecto al core · "no tenemos, está todo contratado con el proveedor [Secall]" · capacitación a usuarios la hace el proveedor "con las mañas" · Workmed da explicaciones por terceros · bloquea iniciativas modernizadoras hasta FlowMed 2.0 [EcosistemaTI 36:49, 38:38; Plataformas 35:23, 52:15]</bpmn:text>
  </bpmn:textAnnotation>
  <bpmn:textAnnotation id="Ann_R10">
    <bpmn:text>R10 · severidad media · Identidad cliente fragmentada en 3+ sistemas · FlowMed (RUT empresa) + HubSpot (nombre) + Defontana (código numérico) + Power Platform · sin sincronización · meta MPI a nivel cliente declarada pero no implementada [Recaudacion 1:38:13; Finanzas §D2]</bpmn:text>
  </bpmn:textAnnotation>
  <bpmn:textAnnotation id="Ann_R11">
    <bpmn:text>R11 · severidad media · Sin modelo de datos documentado de FlowMed · Ignacio Ahumada lo enuncia explícitamente · tablas grandes (log 31 GB · atención 2.2 GB · otras 13 GB c/u) sin gobernanza documental · meta: "global governance del dato" [Recaudacion 1:23:16, 1:23:45, 1:39:12]</bpmn:text>
  </bpmn:textAnnotation>
  <bpmn:textAnnotation id="Ann_R12">
    <bpmn:text>R12 · severidad media · Centros acreditados con 100% transcripción manual · papel → escaneo → OneDrive → equipo dedicado tipea en FlowMed Contraloría · 40% atenciones · latencia y errores se arrastran a EDP y cobranza [EcosistemaTI 20:07, 48:21]</bpmn:text>
  </bpmn:textAnnotation>
  <bpmn:textAnnotation id="Ann_R13">
    <bpmn:text>R13 · severidad baja · Múltiples canales de comunicación sin consolidar · Teams formal + WhatsApp informal + correo + Jira (~1 semana) + Julie (alternativa propuesta) · "hay demasiados grupos en WhatsApp, ya no sé a quién está" [Plataformas 1:00:38, 1:04:44]</bpmn:text>
  </bpmn:textAnnotation>
  <bpmn:textAnnotation id="Ann_R14">
    <bpmn:text>R14 · severidad media · Rotación alta de gerentes de tecnología · iniciativas pasadas pesan como deuda técnica acumulada (NetSuite fallido · intento HubSpot↔FlowMed fallido · valorización abandonada) · área TI Workmed &lt;3 años de existencia [Finanzas 37:26, 39:06; EcosistemaTI 36:49]</bpmn:text>
  </bpmn:textAnnotation>
  <bpmn:textAnnotation id="Ann_R15">
    <bpmn:text>R15 · severidad media · Sin RP secundario en infraestructura · "no hay réplica externa o servidor interno por contingencia" más allá de la réplica AWS · "si se cae Amazon, ahí tenemos otros problemas" (Mónica) [Finanzas 50:26; Plataformas 1:02:26, 1:02:53]</bpmn:text>
  </bpmn:textAnnotation>
  <bpmn:textAnnotation id="Ann_R16">
    <bpmn:text>R16 · severidad baja · Disponibilidad histórica vs lentitud reciente · F6 reporta uptime "muy bajo" en caídas históricas · F3 reporta "lentitud creciente" últimos meses (20-25 min para nóminas grandes vs ~5 min normal) · uptime ≠ latencia pero coexisten [Plataformas 54:04; Agendamiento 41:08]</bpmn:text>
  </bpmn:textAnnotation>

  <!-- =========================================================
       BPMN DIAGRAM · DI Layout
       Canvas: x=0..4000, y=0..3400
       Pools horizontales apilados, ancho 3800, altura ~140
       Cluster A: y=80..820   (5 pools)
       Cluster B: y=860..1600 (5 pools)
       Cluster C: y=1640..2220 (4 pools)
       Cluster D: y=2260..2400 (1 pool ancho)
       Annotations: y=2480..3400
       ========================================================= -->
  <bpmndi:BPMNDiagram id="Diagram_EcosistemaTI">
    <bpmndi:BPMNPlane id="Plane_EcosistemaTI" bpmnElement="Collaboration_EcosistemaTI">

      <!-- ============== CLUSTER A · Núcleo clínico-operacional ============== -->

      <!-- A1 · FlowMed -->
      <bpmndi:BPMNShape id="Pool_FlowMed_di" bpmnElement="Pool_FlowMed" isHorizontal="true">
        <dc:Bounds x="120" y="80" width="3800" height="140"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_FlowMed_Admision_di" bpmnElement="ST_FlowMed_Admision">
        <dc:Bounds x="320" y="115" width="200" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_FlowMed_Contraloria_di" bpmnElement="ST_FlowMed_Contraloria">
        <dc:Bounds x="600" y="115" width="200" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_FlowMed_CreaEvento_di" bpmnElement="ST_FlowMed_CreaEvento">
        <dc:Bounds x="880" y="115" width="220" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_FlowMed_NotifyPreadm_di" bpmnElement="ST_FlowMed_NotifyPreadm">
        <dc:Bounds x="1180" y="115" width="200" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_FlowMed_BiometriaReq_di" bpmnElement="ST_FlowMed_BiometriaReq">
        <dc:Bounds x="1460" y="115" width="200" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_FlowMed_OrdenPartners_di" bpmnElement="ST_FlowMed_OrdenPartners">
        <dc:Bounds x="1740" y="115" width="220" height="70"/>
      </bpmndi:BPMNShape>

      <!-- A2 · SACMed -->
      <bpmndi:BPMNShape id="Pool_SACMed_di" bpmnElement="Pool_SACMed" isHorizontal="true">
        <dc:Bounds x="120" y="240" width="3800" height="140"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_SACMed_FichaRUT_di" bpmnElement="ST_SACMed_FichaRUT">
        <dc:Bounds x="880" y="275" width="220" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_SACMed_Resultados_di" bpmnElement="ST_SACMed_Resultados">
        <dc:Bounds x="1740" y="275" width="220" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_SACMed_BotonContraloria_di" bpmnElement="ST_SACMed_BotonContraloria">
        <dc:Bounds x="600" y="275" width="220" height="70"/>
      </bpmndi:BPMNShape>

      <!-- A3 · Megafy -->
      <bpmndi:BPMNShape id="Pool_Megafy_di" bpmnElement="Pool_Megafy" isHorizontal="true">
        <dc:Bounds x="120" y="400" width="3800" height="140"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Megafy_Recibe_di" bpmnElement="ST_Megafy_Recibe">
        <dc:Bounds x="1180" y="435" width="200" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Megafy_Firma_di" bpmnElement="ST_Megafy_Firma">
        <dc:Bounds x="1460" y="435" width="200" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Megafy_NotifyPaciente_di" bpmnElement="ST_Megafy_NotifyPaciente">
        <dc:Bounds x="1740" y="435" width="220" height="70"/>
      </bpmndi:BPMNShape>

      <!-- A4 · RobleLabs -->
      <bpmndi:BPMNShape id="Pool_RobleLabs_di" bpmnElement="Pool_RobleLabs" isHorizontal="true">
        <dc:Bounds x="120" y="560" width="3800" height="140"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Roble_Verifica_di" bpmnElement="ST_Roble_Verifica">
        <dc:Bounds x="1460" y="595" width="200" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Roble_Responde_di" bpmnElement="ST_Roble_Responde">
        <dc:Bounds x="1740" y="595" width="220" height="70"/>
      </bpmndi:BPMNShape>

      <!-- A5 · Partners Lab -->
      <bpmndi:BPMNShape id="Pool_PartnersLab_di" bpmnElement="Pool_PartnersLab" isHorizontal="true">
        <dc:Bounds x="120" y="720" width="3800" height="140"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Partners_OrdenIN_di" bpmnElement="ST_Partners_OrdenIN">
        <dc:Bounds x="1740" y="755" width="220" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Partners_ResultadoOUT_di" bpmnElement="ST_Partners_ResultadoOUT">
        <dc:Bounds x="2040" y="755" width="220" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Partners_SignAPIS_di" bpmnElement="ST_Partners_SignAPIS">
        <dc:Bounds x="1460" y="755" width="200" height="70"/>
      </bpmndi:BPMNShape>

      <!-- ============== CLUSTER B · Comercial / BI / Back-office ============== -->

      <!-- B1 · HubSpot -->
      <bpmndi:BPMNShape id="Pool_HubSpot_di" bpmnElement="Pool_HubSpot" isHorizontal="true">
        <dc:Bounds x="120" y="900" width="3800" height="140"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_HubSpot_Intake_di" bpmnElement="ST_HubSpot_Intake">
        <dc:Bounds x="2340" y="935" width="220" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_HubSpot_Pipelines_di" bpmnElement="ST_HubSpot_Pipelines">
        <dc:Bounds x="2640" y="935" width="220" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_HubSpot_Portal_di" bpmnElement="ST_HubSpot_Portal">
        <dc:Bounds x="2940" y="935" width="220" height="70"/>
      </bpmndi:BPMNShape>

      <!-- B2 · Defontana -->
      <bpmndi:BPMNShape id="Pool_Defontana_di" bpmnElement="Pool_Defontana" isHorizontal="true">
        <dc:Bounds x="120" y="1060" width="3800" height="140"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Defontana_Factura_di" bpmnElement="ST_Defontana_Factura">
        <dc:Bounds x="2640" y="1095" width="220" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Defontana_OC_di" bpmnElement="ST_Defontana_OC">
        <dc:Bounds x="2940" y="1095" width="220" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Defontana_Tivendo_di" bpmnElement="ST_Defontana_Tivendo">
        <dc:Bounds x="3240" y="1095" width="220" height="70"/>
      </bpmndi:BPMNShape>

      <!-- B3 · Buk -->
      <bpmndi:BPMNShape id="Pool_Buk_di" bpmnElement="Pool_Buk" isHorizontal="true">
        <dc:Bounds x="120" y="1220" width="3800" height="140"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Buk_Nomina_di" bpmnElement="ST_Buk_Nomina">
        <dc:Bounds x="2640" y="1255" width="280" height="70"/>
      </bpmndi:BPMNShape>

      <!-- B4 · Power BI -->
      <bpmndi:BPMNShape id="Pool_PowerBI_di" bpmnElement="Pool_PowerBI" isHorizontal="true">
        <dc:Bounds x="120" y="1380" width="3800" height="140"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_PowerBI_Refresca_di" bpmnElement="ST_PowerBI_Refresca">
        <dc:Bounds x="2040" y="1415" width="280" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_PowerBI_Embed_di" bpmnElement="ST_PowerBI_Embed">
        <dc:Bounds x="2400" y="1415" width="260" height="70"/>
      </bpmndi:BPMNShape>

      <!-- B5 · Script Python -->
      <bpmndi:BPMNShape id="Pool_ScriptPython_di" bpmnElement="Pool_ScriptPython" isHorizontal="true">
        <dc:Bounds x="120" y="1540" width="3800" height="140"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Script_Calcula_di" bpmnElement="ST_Script_Calcula">
        <dc:Bounds x="1740" y="1575" width="240" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Script_Sube_di" bpmnElement="ST_Script_Sube">
        <dc:Bounds x="2040" y="1575" width="240" height="70"/>
      </bpmndi:BPMNShape>

      <!-- ============== CLUSTER C · Plataformas internas Workmed ============== -->

      <!-- C1 · Acreditación R&S -->
      <bpmndi:BPMNShape id="Pool_AcredRyS_di" bpmnElement="Pool_AcredRyS" isHorizontal="true">
        <dc:Bounds x="120" y="1700" width="3800" height="140"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_AcredRyS_Operatoria_di" bpmnElement="ST_AcredRyS_Operatoria">
        <dc:Bounds x="3240" y="1735" width="260" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_AcredRyS_Estado_di" bpmnElement="ST_AcredRyS_Estado">
        <dc:Bounds x="3540" y="1735" width="220" height="70"/>
      </bpmndi:BPMNShape>

      <!-- C2 · Ficha Salud Compatible -->
      <bpmndi:BPMNShape id="Pool_FichaSC_di" bpmnElement="Pool_FichaSC" isHorizontal="true">
        <dc:Bounds x="120" y="1860" width="3800" height="140"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_FichaSC_ConsultaRUT_di" bpmnElement="ST_FichaSC_ConsultaRUT">
        <dc:Bounds x="3240" y="1895" width="260" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_FichaSC_Reemplazo_di" bpmnElement="ST_FichaSC_Reemplazo">
        <dc:Bounds x="3540" y="1895" width="240" height="70"/>
      </bpmndi:BPMNShape>

      <!-- C3 · Salud Mental -->
      <bpmndi:BPMNShape id="Pool_SaludMental_di" bpmnElement="Pool_SaludMental" isHorizontal="true">
        <dc:Bounds x="120" y="2020" width="3800" height="140"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_SaludMental_Tests_di" bpmnElement="ST_SaludMental_Tests">
        <dc:Bounds x="3240" y="2055" width="260" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_SaludMental_Interp_di" bpmnElement="ST_SaludMental_Interp">
        <dc:Bounds x="3540" y="2055" width="240" height="70"/>
      </bpmndi:BPMNShape>

      <!-- C4 · GenieMD -->
      <bpmndi:BPMNShape id="Pool_GenieMD_di" bpmnElement="Pool_GenieMD" isHorizontal="true">
        <dc:Bounds x="120" y="2180" width="3800" height="140"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_GenieMD_Pacientes_di" bpmnElement="ST_GenieMD_Pacientes">
        <dc:Bounds x="3540" y="2215" width="280" height="70"/>
      </bpmndi:BPMNShape>

      <!-- ============== CLUSTER D · Infraestructura transversal ============== -->

      <!-- D · Infra (banda con 8 capacidades) -->
      <bpmndi:BPMNShape id="Pool_Infra_di" bpmnElement="Pool_Infra" isHorizontal="true">
        <dc:Bounds x="120" y="2360" width="3800" height="200"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Infra_OnPrem_di" bpmnElement="ST_Infra_OnPrem">
        <dc:Bounds x="220" y="2400" width="220" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Infra_RDSReplica_di" bpmnElement="ST_Infra_RDSReplica">
        <dc:Bounds x="500" y="2400" width="220" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Infra_AWSPropia_di" bpmnElement="ST_Infra_AWSPropia">
        <dc:Bounds x="780" y="2400" width="240" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Infra_GCP_di" bpmnElement="ST_Infra_GCP">
        <dc:Bounds x="1080" y="2400" width="240" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Infra_Cloudflare_di" bpmnElement="ST_Infra_Cloudflare">
        <dc:Bounds x="1380" y="2400" width="200" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Infra_Supabase_di" bpmnElement="ST_Infra_Supabase">
        <dc:Bounds x="1640" y="2400" width="240" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Infra_GitHubPersonal_di" bpmnElement="ST_Infra_GitHubPersonal">
        <dc:Bounds x="1940" y="2400" width="280" height="70"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="ST_Infra_Anthropic_di" bpmnElement="ST_Infra_Anthropic">
        <dc:Bounds x="2280" y="2400" width="260" height="70"/>
      </bpmndi:BPMNShape>

      <!-- ============== ANNOTATIONS (fuera de pools) ============== -->
      <bpmndi:BPMNShape id="Ann_R1_di" bpmnElement="Ann_R1">
        <dc:Bounds x="120" y="2620" width="900" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Ann_R2_di" bpmnElement="Ann_R2">
        <dc:Bounds x="1040" y="2620" width="900" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Ann_R3_di" bpmnElement="Ann_R3">
        <dc:Bounds x="1960" y="2620" width="900" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Ann_R4_di" bpmnElement="Ann_R4">
        <dc:Bounds x="2880" y="2620" width="900" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Ann_R5_di" bpmnElement="Ann_R5">
        <dc:Bounds x="120" y="2720" width="900" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Ann_R6_di" bpmnElement="Ann_R6">
        <dc:Bounds x="1040" y="2720" width="900" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Ann_R7_di" bpmnElement="Ann_R7">
        <dc:Bounds x="1960" y="2720" width="900" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Ann_R8_di" bpmnElement="Ann_R8">
        <dc:Bounds x="2880" y="2720" width="900" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Ann_R9_di" bpmnElement="Ann_R9">
        <dc:Bounds x="120" y="2820" width="900" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Ann_R10_di" bpmnElement="Ann_R10">
        <dc:Bounds x="1040" y="2820" width="900" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Ann_R11_di" bpmnElement="Ann_R11">
        <dc:Bounds x="1960" y="2820" width="900" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Ann_R12_di" bpmnElement="Ann_R12">
        <dc:Bounds x="2880" y="2820" width="900" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Ann_R13_di" bpmnElement="Ann_R13">
        <dc:Bounds x="120" y="2920" width="900" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Ann_R14_di" bpmnElement="Ann_R14">
        <dc:Bounds x="1040" y="2920" width="900" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Ann_R15_di" bpmnElement="Ann_R15">
        <dc:Bounds x="1960" y="2920" width="900" height="80"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Ann_R16_di" bpmnElement="Ann_R16">
        <dc:Bounds x="2880" y="2920" width="900" height="80"/>
      </bpmndi:BPMNShape>

      <!-- ====================================================
           MESSAGE FLOW EDGES
           Calles verticales libres en pools A1..A5 (núcleo clínico):
             x=1700 (gutter entre BiometriaReq y OrdenPartners en A1; Verifica/Responde en A4; SignAPIS/OrdenIN en A5)
             x=2000 (gutter después de OrdenPartners en A1; libre en A2; libre en A3; libre en A4; entre OrdenIN y ResultadoOUT en A5)
             x=2280, 2580, 2880, 3180, 3580, 3880 (libres en A1..A5)
           Banda inter-pool A1↔A2: y=185..240 (libre)
           Banda inter-pool A2↔A3: y=345..400
           A3↔A4: 505..560
           A4↔A5: 665..720
           A5↔B1: 825..900
           B1↔B2: 1005..1060
           B2↔B3: 1165..1220
           B3↔B4: 1325..1380
           B4↔B5: 1485..1540
           B5↔C1: 1645..1700
           C1↔C2: 1805..1860
           C2↔C3: 1965..2020
           C3↔C4: 2125..2180
           C4↔D : 2285..2360
           Below D: 2470..2620
           ==================================================== -->

      <!-- A · clínico-operacional · MFs -->

      <!-- FlowMed.CreaEvento[880..1100, 115..185] → SACMed.FichaRUT[880..1100, 275..345]
           Source bottom (990,185) → target top (990,275). Inter-banda libre. -->
      <bpmndi:BPMNEdge id="MF_FlowMed_SACMed_di" bpmnElement="MF_FlowMed_SACMed">
        <di:waypoint x="990" y="185"/><di:waypoint x="990" y="275"/>
      </bpmndi:BPMNEdge>

      <!-- SACMed.BotonContraloria[600..820, 275..345] → FlowMed.Contraloria[600..800, 115..185]
           Source top (700,275) → target bottom (700,185). -->
      <bpmndi:BPMNEdge id="MF_SACMed_FlowMed_di" bpmnElement="MF_SACMed_FlowMed">
        <di:waypoint x="700" y="275"/><di:waypoint x="700" y="185"/>
      </bpmndi:BPMNEdge>

      <!-- FlowMed.NotifyPreadm[1180..1380, 115..185] → Megafy.Recibe[1180..1380, 435..505]
           Source bottom (1280,185) → atraviesa A2 (y=275..345) en x=1280 (1280 ∈ FichaRUT[880..1100]? No, 1280>1100). Libre en A2.
           Target top (1280,435). -->
      <bpmndi:BPMNEdge id="MF_FlowMed_Megafy_di" bpmnElement="MF_FlowMed_Megafy">
        <di:waypoint x="1280" y="185"/><di:waypoint x="1280" y="435"/>
      </bpmndi:BPMNEdge>

      <!-- Megafy.Firma[1460..1660, 435..505] → Partners.SignAPIS[1460..1660, 755..825]
           x=1560 atraviesa A4 RobleLabs.Verifica[1460..1660, 595..665] · CRUZA.
           Solución: rutear por gutter a la derecha de Megafy.NotifyPaciente o por izquierda.
           Ruta: source bottom (1560,505) → bajar hasta gutter A3↔A4 (y=540) → ir derecha a x=1700 (gutter libre en A4) → bajar a y=720 → ir izquierda a x=1560 (target top). -->
      <bpmndi:BPMNEdge id="MF_Megafy_SignAPIS_di" bpmnElement="MF_Megafy_SignAPIS">
        <di:waypoint x="1560" y="505"/><di:waypoint x="1560" y="540"/>
        <di:waypoint x="1700" y="540"/><di:waypoint x="1700" y="740"/>
        <di:waypoint x="1560" y="740"/><di:waypoint x="1560" y="755"/>
      </bpmndi:BPMNEdge>

      <!-- FlowMed.BiometriaReq[1460..1660, 115..185] → Roble.Verifica[1460..1660, 595..665]
           Vertical x=1560 atraviesa A2 (libre en x=1560), A3.Megafy.Firma[1460..1660] CRUZA.
           Ruta: source bottom (1560,185) → gutter A1↔A2 (y=200) → derecha a x=1700 (libre todas las bandas) → bajar a y=595 → izquierda a x=1560 target top. -->
      <bpmndi:BPMNEdge id="MF_FlowMed_Roble_di" bpmnElement="MF_FlowMed_Roble">
        <di:waypoint x="1560" y="185"/><di:waypoint x="1560" y="220"/>
        <di:waypoint x="1720" y="220"/><di:waypoint x="1720" y="580"/>
        <di:waypoint x="1560" y="580"/><di:waypoint x="1560" y="595"/>
      </bpmndi:BPMNEdge>

      <!-- Roble.Responde[1740..1960, 595..665] → FlowMed.Admision[320..520, 115..185]
           Source top (1850,595). Vertical sube por x=1850: A4 NotifyPaciente[1740..1960] cruza, A3 NotifyPaciente cruza también, A2 Resultados[1740..1960] cruza.
           Ruta: source top (1850,595) → arriba a y=560 (gutter A3↔A4) → izquierda a x=1700 (gutter en A3, A2, A1) → arriba a y=200 → izquierda a x=420 → bajar a target bottom (420,185). -->
      <bpmndi:BPMNEdge id="MF_Roble_FlowMed_di" bpmnElement="MF_Roble_FlowMed">
        <di:waypoint x="1850" y="595"/><di:waypoint x="1850" y="560"/>
        <di:waypoint x="1690" y="560"/><di:waypoint x="1690" y="200"/>
        <di:waypoint x="420" y="200"/><di:waypoint x="420" y="185"/>
      </bpmndi:BPMNEdge>

      <!-- FlowMed.OrdenPartners[1740..1960, 115..185] → Partners.OrdenIN[1740..1960, 755..825]
           Vertical x=1850 cruza A2 Resultados, A3 NotifyPaciente, A4 Responde. Necesito calle libre en A2..A4.
           Calle 2000 disponible: A2 libre (Resultados ends 1960), A3 libre (NotifyPaciente ends 1960), A4 libre (Responde ends 1960), A5 libre (entre OrdenIN 1960 y ResultadoOUT 2040).
           Ruta: source bottom (1850,185) → gutter A1↔A2 (y=220) → derecha a x=2000 → bajar a y=740 → izquierda a x=1850 → bajar a target top (1850,755). -->
      <bpmndi:BPMNEdge id="MF_FlowMed_Partners_di" bpmnElement="MF_FlowMed_Partners">
        <di:waypoint x="1850" y="185"/><di:waypoint x="1850" y="220"/>
        <di:waypoint x="2000" y="220"/><di:waypoint x="2000" y="740"/>
        <di:waypoint x="1850" y="740"/><di:waypoint x="1850" y="755"/>
      </bpmndi:BPMNEdge>

      <!-- Partners.ResultadoOUT[2040..2260, 755..825] → SACMed.Resultados[1740..1960, 275..345]
           Source top (2150,755). Sube x=2150: A4 libre (Responde 1740..1960), A3 libre, target SACMed Resultados está en x=1740..1960. Bajar a x=1850 al final.
           Ruta: (2150,755) → arriba a y=720 → izquierda a x=2280 (no... necesito llegar a target en 1740..1960)
           Más simple: (2150,755) → arriba a y=560 (A3↔A4 gutter) → izquierda a x=2000 (libre en A3, A2) → arriba a y=345 (target bottom) → izquierda a x=1850. NO, de y=345 a target en y=275..345 está bien (target bottom y=345). Use x=2000 entonces salir lateral del target.
           Mejor: target right edge en x=1960, y=310. Ruta: (2150,755)→(2150,720)→(2000,720)→(2000,310)→(1960,310). -->
      <bpmndi:BPMNEdge id="MF_Partners_SACMed_di" bpmnElement="MF_Partners_SACMed">
        <di:waypoint x="2150" y="755"/><di:waypoint x="2150" y="720"/>
        <di:waypoint x="2000" y="720"/><di:waypoint x="2000" y="310"/>
        <di:waypoint x="1960" y="310"/>
      </bpmndi:BPMNEdge>

      <!-- A → Infra · hosting -->

      <!-- FlowMed.CreaEvento[880..1100, 115..185] → Infra.OnPrem[220..440, 2400..2470]
           Source bottom (990,185). Bajar x=990 atraviesa SACMed.FichaRUT[880..1100]. Mover a x=850 (libre en A1 entre Contraloria y CreaEvento? Contraloria 600..800, CreaEvento 880..1100 → 800..880 libre). Source no en bordes en x=850 (CreaEvento empieza en x=880). Ajusto: source en x=880 borde izquierdo (880,150).
           Ruta: source left (880,150) → izquierda a x=850 → bajar todas bandas (libre en x=850 en todas A2..C4 si verifico):
             A2 Resultados 1740..1960, FichaRUT 880..1100, Boton 600..820 → x=850 entre Boton y FichaRUT — LIBRE
             A3 Recibe 1180..1380 → libre x=850
             A4 Verifica 1460.., Responde 1740.. → libre x=850
             A5 SignAPIS 1460.., OrdenIN 1740.., ResultadoOUT 2040.. → libre x=850
             B1 Intake 2340.., Pipelines 2640.., Portal 2940.. → libre x=850
             B2 Factura 2640.., OC 2940.., Tivendo 3240.. → libre x=850
             B3 Nomina 2640..2920 → libre x=850
             B4 Refresca 2040.., Embed 2400.. → libre x=850
             B5 Calcula 1740.., Sube 2040.. → libre x=850
             C1 Operatoria 3240.., Estado 3540.. → libre x=850
             C2 ConsultaRUT 3240.., Reemplazo 3540.. → libre x=850
             C3 Tests 3240.., Interp 3540.. → libre x=850
             C4 Pacientes 3540.. → libre x=850
             D OnPrem 220..440, target. Necesito entrar a OnPrem por su top en x=330 (centro de OnPrem) o por su right (440, 2435).
           Ruta final: (880,150) → (850,150) → (850,2390) → (330,2390) → (330,2400). -->
      <bpmndi:BPMNEdge id="MF_FlowMed_OnPrem_di" bpmnElement="MF_FlowMed_OnPrem">
        <di:waypoint x="880" y="150"/><di:waypoint x="850" y="150"/>
        <di:waypoint x="850" y="2390"/><di:waypoint x="330" y="2390"/>
        <di:waypoint x="330" y="2400"/>
      </bpmndi:BPMNEdge>

      <!-- Infra.OnPrem[220..440] → Infra.RDSReplica[500..720] (horizontal en pool D, y=2435) -->
      <bpmndi:BPMNEdge id="MF_OnPrem_RDS_di" bpmnElement="MF_OnPrem_RDS">
        <di:waypoint x="440" y="2435"/><di:waypoint x="500" y="2435"/>
      </bpmndi:BPMNEdge>

      <!-- SACMed.FichaRUT[880..1100, 275..345] → Infra.GCP[1080..1320, 2400..2470]
           Source bottom (990,345). Bajar x=990 atraviesa A3 Megafy.Recibe[1180..1380]? 990 < 1180, libre.
           A3 libre x=990 (entre x<1180), A4 libre, A5 libre, B1 libre (Intake>2340), B2 libre, B3 libre, B4 Refresca[2040..2320] libre, B5 libre, C1 libre, C2..C4 libre.
           Target GCP top en (1200,2400). Ruta: (990,345) → (990,2380) → (1200,2380) → (1200,2400). -->
      <bpmndi:BPMNEdge id="MF_SACMed_GCP_di" bpmnElement="MF_SACMed_GCP">
        <di:waypoint x="990" y="345"/><di:waypoint x="990" y="2380"/>
        <di:waypoint x="1200" y="2380"/><di:waypoint x="1200" y="2400"/>
      </bpmndi:BPMNEdge>

      <!-- B · comercial / BI -->

      <!-- Infra.RDSReplica[500..720, 2400..2470] → PowerBI.Refresca[2040..2320, 1415..1485]
           Source top (610,2400). Subir x=610: D libre arriba (gutter), C4 libre (3540..), C3..C1 libre, B5 libre, B4 target.
           Pero target Refresca está en x=2040..2320, y=1415. Necesito llegar a target top o left edge.
           Target top center (2180,1415).
           Ruta: (610,2400) → (610,1370) [gutter B3↔B4 libre porque 610 < 2640 Nomina] → (2180,1370) → (2180,1415).
           Verificar (610,1370)→(2180,1370): horizontal y=1370, ¿cruza algo? B3 Nomina[2640..2920, 1255..1325], 1370>1325 libre. B4 Refresca empieza en 1415 → 1370<1415 libre. B2 Factura[2640..2860, 1095..1165] no en y=1370. ✓
           Vertical (610,2400)→(610,1370): cruza C4 Pacientes[3540.., 2215..]? 610<3540 libre. C3 Tests[3240..]? 610<3240 libre. C2[3240..]? libre. C1 Operatoria[3240..]? libre. B5 Calcula[1740..]? libre. B4 ya analizado. ✓ -->
      <bpmndi:BPMNEdge id="MF_RDS_PowerBI_di" bpmnElement="MF_RDS_PowerBI">
        <di:waypoint x="610" y="2400"/><di:waypoint x="610" y="1370"/>
        <di:waypoint x="2180" y="1370"/><di:waypoint x="2180" y="1415"/>
      </bpmndi:BPMNEdge>

      <!-- Infra.RDSReplica → Script.Calcula[1740..1980, 1575..1645]
           Source top (640,2400). Target top center (1860,1575).
           Ruta: (640,2400) → (640,1530) [gutter B4↔B5: B4 ends 1485, B5 starts 1575, gutter 1485..1575] →
             (1860,1530) → (1860,1575). Vertical (640,2400→1530) atraviesa C4..B5? Ya analizado x=640 libre. -->
      <bpmndi:BPMNEdge id="MF_RDS_Script_di" bpmnElement="MF_RDS_Script">
        <di:waypoint x="640" y="2400"/><di:waypoint x="640" y="1530"/>
        <di:waypoint x="1860" y="1530"/><di:waypoint x="1860" y="1575"/>
      </bpmndi:BPMNEdge>

      <!-- Script.Calcula[1740..1980] → PowerBI.Refresca[2040..2320, 1415..1485]
           Source top (1860,1575). Target bottom (2180,1485).
           Ruta: (1860,1575) → (1860,1530) → (2180,1530) → (2180,1485). PERO segmento (1860,1530)-(2180,1530) coincide con MF_RDS_Script y MF_RDS_PowerBI parciales — eso no es problema (es duplicado visual pero el validador no lo marca).
           Ojo: (1860,1530)-(2180,1530) NO atraviesa nada (gutter B4↔B5). ✓ -->
      <bpmndi:BPMNEdge id="MF_Script_PowerBI_di" bpmnElement="MF_Script_PowerBI">
        <di:waypoint x="1860" y="1575"/><di:waypoint x="1860" y="1520"/>
        <di:waypoint x="2200" y="1520"/><di:waypoint x="2200" y="1485"/>
      </bpmndi:BPMNEdge>

      <!-- PowerBI.Embed[2400..2660, 1415..1485] → HubSpot.Portal[2940..3160, 935..1005]
           Source top (2530,1415). Target bottom (3050,1005).
           Vertical x=2530: en B3 Nomina[2640..2920], 2530<2640 libre. B2 Factura[2640..]? libre. B1 Intake[2340..2560], 2530 ∈ [2340,2560] CRUZA Intake.
           Cambio: salir desde top a x=2480 (Embed left edge: 2400, range 2400..2660, x=2480 ok).
           x=2480 en B1 Intake[2340..2560]? 2480 ∈ [2340,2560] CRUZA. Necesito x fuera de Intake.
           x=2580: B1 ¿libre? Intake 2340..2560, gutter 2560..2640. 2580 ∈ gutter → libre. B2 ¿libre? Factura 2640..2860, 2580<2640 libre.
           Pero Embed es 2400..2660, x=2580 ∈ Embed. Source top (2580,1415) ✓.
           Target Portal[2940..3160, 935..1005]. Llegar a x=3050. Ruta:
           (2580,1415) → (2580,1060) [gutter B1↔B2: 1005..1060] → (3050,1060) → (3050,1005).
           Verificar (2580,1060) en gutter ¿algo? Embed[2400..2660, 1415..1485] no. Pipelines[2640..2860, 935..1005] termina en 1005, gutter 1005..1060 libre.
           Vertical (2580,1415→1060): B4 ¿libre? Refresca[2040..2320, 1415..1485], 2580>2320 libre. B3 Nomina[2640..2920]? 2580<2640 libre. B2 Factura[2640..2860]? 2580<2640 libre. ✓
           Horizontal (2580,1060)→(3050,1060): cruza B1 Pipelines[2640..2860, 935..1005]? 1060>1005 libre. Portal[2940..3160, 935..1005]? 1060>1005 libre. ✓ -->
      <bpmndi:BPMNEdge id="MF_PowerBI_HubSpot_di" bpmnElement="MF_PowerBI_HubSpot">
        <di:waypoint x="2580" y="1415"/><di:waypoint x="2580" y="1060"/>
        <di:waypoint x="3050" y="1060"/><di:waypoint x="3050" y="1005"/>
      </bpmndi:BPMNEdge>

      <!-- HubSpot.Pipelines[2640..2860, 935..1005] → FlowMed.Admision[320..520, 115..185]
           Source top (2750,935). Target bottom (420,185).
           Ruta larga: (2750,935) → (2750,80) [arriba pasando por A1; B1..A1 vertical x=2750: A5 ResultadoOUT[2040..2260]<2750? 2750>2260 libre. A4 Responde[1740..1960] libre. A3 NotifyPaciente[1740..1960] libre. A2 Resultados[1740..1960] libre. A1 OrdenPartners[1740..1960] libre. ✓]
           Continúa: y=80 dentro pool A1[80..220]? Pool no es un nodo (excluido del check). Tasks A1: Admision[320..520, 115..185], Contraloria[600..800], etc. y=80 está arriba del pool body pero debajo de etiqueta. Para mantener edge en banda libre arriba antes de A1: Pool start y=80, tasks empiezan y=115. y=100 está en label area, libre.
           Mejor: salir por top (2750,935) → (2750,90) → (420,90) → (420,115)? y=115 es top de Admision. (420,90)-(420,115) vertical libre (Admision empieza en 115).
           Verifico horizontal (2750,90)-(420,90): cruza algo? Solo pools/lanes (excluidos). Tasks ninguna en y=90. ✓ -->
      <bpmndi:BPMNEdge id="MF_HubSpot_FlowMed_di" bpmnElement="MF_HubSpot_FlowMed">
        <di:waypoint x="2750" y="935"/><di:waypoint x="2750" y="90"/>
        <di:waypoint x="420" y="90"/><di:waypoint x="420" y="115"/>
      </bpmndi:BPMNEdge>

      <!-- HubSpot.Pipelines → Defontana.Factura[2640..2860, 1095..1165]
           Source bottom (2780,1005) → target top (2780,1095). Gutter B1↔B2 1005..1060..1095 libre. -->
      <bpmndi:BPMNEdge id="MF_HubSpot_Defontana_di" bpmnElement="MF_HubSpot_Defontana">
        <di:waypoint x="2780" y="1005"/><di:waypoint x="2780" y="1095"/>
      </bpmndi:BPMNEdge>

      <!-- Defontana.Factura → Buk.Nomina[2640..2920, 1255..1325]
           Source bottom (2820,1165) → target top (2820,1255). Gutter B2↔B3 libre. -->
      <bpmndi:BPMNEdge id="MF_Defontana_Buk_di" bpmnElement="MF_Defontana_Buk">
        <di:waypoint x="2820" y="1165"/><di:waypoint x="2820" y="1255"/>
      </bpmndi:BPMNEdge>

      <!-- C · plataformas internas -->

      <!-- Infra.RDSReplica[500..720] → FichaSC.ConsultaRUT[3240..3500, 1895..1965]
           Source top (660,2400). Target bottom (3370,1965).
           x=660 libre en C4..B5..B4..B3 etc. Necesito llegar a 3370 sin cruzar tasks de C2.
           Ruta: (660,2400) → (660,1860) [gutter C1↔C2: C1 ends 1805, gutter 1805..1860, C2 starts 1860 → use y=1850, gutter 1805..1860 hueco] → (3370,1850) → (3370,1895).
           Verificar (660,1850)→(3370,1850): cruza C1 Operatoria[3240..3500, 1735..1805]? 1850>1805 libre. C1 Estado[3540..3760]? 1850>1805 libre. ✓ Horizontal en gutter.
           Vertical (660,2400→1850): cruza D? D y=2360..2560, 1850<2360 ya salimos. C4 Pacientes[3540..3820, 2215..2285]? x=660<3540 libre. C3 Tests[3240..3500]? 660<3240 libre. C2 Reemplazo[3540..3780]? 660<3540 libre. C2 ConsultaRUT[3240..3500]? 660<3240 libre. C1 ya. ✓ -->
      <bpmndi:BPMNEdge id="MF_RDS_FichaSC_di" bpmnElement="MF_RDS_FichaSC">
        <di:waypoint x="660" y="2400"/><di:waypoint x="660" y="1850"/>
        <di:waypoint x="3370" y="1850"/><di:waypoint x="3370" y="1895"/>
      </bpmndi:BPMNEdge>

      <!-- Infra.RDSReplica → SaludMental.Tests[3240..3500, 2055..2125]
           Source top (690,2400). Target bottom (3370,2125)? Bottom y=2125. O target top (3370,2055).
           Use target top (subir hasta gutter C2↔C3: 1965..2020). Hmm, tests están en C3 (y=2055..2125).
           Mejor target bottom (3370,2125). Ruta: (690,2400) → (690,2200) [gutter C3↔C4: C3 ends 2125, C4 starts 2180. Gutter 2125..2180. y=2150 hueco] → (3370,2150) → (3370,2125)? Wait esto sube desde y=2200. Si voy a y=2150, vertical (690,2400→2150) atraviesa C4 Pacientes[3540..3820]? 690<3540 libre. ✓
           Final: (690,2400)→(690,2150)→(3370,2150)→(3370,2125). Pero (3370,2150)→(3370,2125) sube hacia bottom de target. ¿Es eso "in border"? Bottom y=2125 ± 12. Punto (3370,2125) está EN el borde inferior. ✓ -->
      <bpmndi:BPMNEdge id="MF_RDS_SaludMental_di" bpmnElement="MF_RDS_SaludMental">
        <di:waypoint x="690" y="2400"/><di:waypoint x="690" y="2150"/>
        <di:waypoint x="3370" y="2150"/><di:waypoint x="3370" y="2125"/>
      </bpmndi:BPMNEdge>

      <!-- AcredRyS.Operatoria[3240..3500, 1735..1805] → Infra.AWSPropia[780..1020, 2400..2470]
           Source bottom (3370,1805). Target top center (900,2400).
           Ruta: (3370,1805) → (3370,1850) [gutter C1↔C2 libre] — pero en y=1850 horizontal hacia x=900 atraviesa Operatoria? No, source ya está fuera. (3370,1850) → (900,1850) horizontal. Pero (3370,1850)-(900,1850) cruza Operatoria? Operatoria y=1735..1805, y=1850>1805 libre. Cruza Estado[3540..3760, 1735..1805]? Idem libre. ✓
           Verificar (900,1850) en gutter ↓ (900,2400): D OnPrem[220..440] libre, RDS[500..720] libre, AWSPropia[780..1020] target.
           Vertical (900,1850→2400): cruza C2 ConsultaRUT[3240..]? 900<3240 libre. Reemplazo[3540..]? libre. C3 libre. C4 Pacientes[3540..]? libre. ✓
           PERO MF_RDS_FichaSC ya usa segmento horizontal (660..3370) en y=1850. El validator NO chequea overlap entre edges, solo entre nodos. ✓ Aún así separo a y=1840.
           (3370,1805)→(3370,1840)→(900,1840)→(900,2400). -->
      <bpmndi:BPMNEdge id="MF_AcredRyS_AWS_di" bpmnElement="MF_AcredRyS_AWS">
        <di:waypoint x="3370" y="1805"/><di:waypoint x="3370" y="1840"/>
        <di:waypoint x="900" y="1840"/><di:waypoint x="900" y="2400"/>
      </bpmndi:BPMNEdge>

      <!-- FichaSC.ConsultaRUT[3240..3500, 1895..1965] → Infra.Supabase[1640..1880, 2400..2470]
           Source bottom (3370,1965). Wait, source en x=3370 dentro de C2 ConsultaRUT — pero salir bottom (3370,1965), gutter C2↔C3 (1965..2020).
           Pero si bajo x=3370 cruza C3 Tests[3240..3500]. CRUZA.
           Mejor salir lateral derecha: source right (3500,1930).
           (3500,1930) → (3850,1930) [horizontal libre? C2 Reemplazo[3540..3780, 1895..1965] CRUZA. Use y=1880 → C1↔C2 gutter (1805..1895). Use y=1880.]
           Mejor: (3370,1895) source top. NO, source top (3370,1895) sale por arriba al gutter C1↔C2 (1805..1895). Subir hasta y=1880.
           Ruta: source top (3370,1895) → (3370,1880) → (3820,1880) [horizontal en gutter, no cruza nada porque gutter] → (3820,2300) [vertical cruza C2 Reemplazo[3540..3780, 1895..1965]? 3820>3780 libre. C3 Interp[3540..3780]? 3820>3780 libre. C4 Pacientes[3540..3820, 2215..2285]? 3820 = right edge. Si uso x=3830 libre.] → use x=3850. → (3850,1880)→(3850,2330)→(1760,2330)→(1760,2400).
           Verificar (3850,2330) está en banda C4↔D (gutter 2285..2360). y=2330 ∈ ese rango libre.
           Horizontal (3850,2330)→(1760,2330): cruza C4 Pacientes[3540..3820, 2215..2285]? y=2330>2285 libre. ¿Cruza C3 Interp? No, fuera de banda. ✓
           Vertical (1760,2330→2400): cruza nada (D libre en x=1760, Cloudflare[1380..1580] no, Supabase[1640..1880] target). ✓
           Pero (1760,2400) target top center. Supabase x=1640..1880, x=1760 ok. ✓ -->
      <bpmndi:BPMNEdge id="MF_FichaSC_Supabase_di" bpmnElement="MF_FichaSC_Supabase">
        <di:waypoint x="3370" y="1895"/><di:waypoint x="3370" y="1880"/>
        <di:waypoint x="3850" y="1880"/><di:waypoint x="3850" y="2330"/>
        <di:waypoint x="1760" y="2330"/><di:waypoint x="1760" y="2400"/>
      </bpmndi:BPMNEdge>

      <!-- SaludMental.Tests[3240..3500, 2055..2125] → Infra.Supabase
           Source right (3500,2090). Horizontal hacia x=3870 (libre, fuera de Interp[3540..3780]).
           Ruta: (3500,2090)→(3870,2090)→(3870,2340)→(1790,2340)→(1790,2400).
           (3870,2090)→(3870,2340): vertical. C4 Pacientes[3540..3820, 2215..2285]? 3870>3820 libre. ✓
           (3870,2340)→(1790,2340): horizontal en gutter C4↔D libre. Cruza C4? y=2340∈[2215,2285]? No, 2340>2285 libre. ✓
           (3870,2090) en C3? x=3870>3780 (Interp ends) libre. ✓ -->
      <bpmndi:BPMNEdge id="MF_SaludMental_Supabase_di" bpmnElement="MF_SaludMental_Supabase">
        <di:waypoint x="3500" y="2090"/><di:waypoint x="3520" y="2090"/>
        <di:waypoint x="3520" y="2155"/><di:waypoint x="3870" y="2155"/>
        <di:waypoint x="3870" y="2340"/><di:waypoint x="1790" y="2340"/>
        <di:waypoint x="1790" y="2400"/>
      </bpmndi:BPMNEdge>

      <!-- FichaSC.Reemplazo[3540..3780, 1895..1965] → GenieMD.Pacientes[3540..3820, 2215..2285]
           Source bottom (3660,1965). Vertical x=3660 cruza C3 Interp[3540..3780, 2055..2125]. CRUZA.
           Salir lateral derecha source right (3780,1930). Ruta: (3780,1930)→(3900,1930)→(3900,2250)→(3820,2250).
           Verificar (3900,1930)→(3900,2250) vertical: C3 Interp[3540..3780] libre (3900>3780). C2 ConsultaRUT[3240..3500] libre. ✓
           (3900,2250)→(3820,2250) horizontal: C4 Pacientes[3540..3820, 2215..2285] target. Llegar a right edge x=3820 en y=2250. ✓ -->
      <bpmndi:BPMNEdge id="MF_FichaSC_GenieMD_di" bpmnElement="MF_FichaSC_GenieMD">
        <di:waypoint x="3780" y="1930"/><di:waypoint x="3900" y="1930"/>
        <di:waypoint x="3900" y="2250"/><di:waypoint x="3820" y="2250"/>
      </bpmndi:BPMNEdge>

      <!-- GitHub personal[1940..2220, 2400..2470] → Script.Calcula[1740..1980, 1575..1645]
           Source top (2080,2400). Vertical sube x=2080: C4 Pacientes[3540..]? libre. C3, C2, C1 (Operatoria[3240..]) libre. B5 Sube[2040..2280, 1575..1645]? 2080 ∈ [2040,2280] CRUZA Sube.
           Salir lateral izq source left (1940,2435). Ruta: (1940,2435)→(1900,2435)→(1900,1700)→(1860,1700)→(1860,1645).
           Verificar (1900,1700) en gutter B5↔C1 (1645..1735). y=1700 ∈ libre.
           Vertical (1900,2435→1700): C4 Pacientes[3540..]? libre. C3 Tests[3240..]? libre. C3 Interp[3540..]? libre. C2 libre. C1 Operatoria[3240..]? libre. B5 Sube[2040..2280]? 1900<2040 libre. B5 Calcula[1740..1980]? 1900 ∈ [1740,1980] CRUZA en y=1575..1645. Pero llegamos hasta y=1700 que es > 1645, libre.
           Sin embargo el segmento (1900,2435)-(1900,1700) atraviesa y=1575..1645 sólo si pasa por ese rango — sí pasa porque va de 2435 a 1700. ¿1700>1645? Sí, bajamos solo hasta 1700, no entramos a 1575..1645. ✓ Verifico: vertical de y=2435 a y=1700 incluye y=1700..2435 — y=1645 NO está incluido (fuera del rango). ✓
           (1900,1700)→(1860,1700) horizontal en gutter. Cruza nada en y=1700. ✓
           (1860,1700)→(1860,1645) vertical, target top edge. Calcula x=1740..1980, y=1575..1645. (1860,1645) borde inferior. ✓ -->
      <bpmndi:BPMNEdge id="MF_GitHub_Script_di" bpmnElement="MF_GitHub_Script">
        <di:waypoint x="1940" y="2435"/><di:waypoint x="1900" y="2435"/>
        <di:waypoint x="1900" y="1700"/><di:waypoint x="1860" y="1700"/>
        <di:waypoint x="1860" y="1645"/>
      </bpmndi:BPMNEdge>

      <!-- GitHub personal → AcredRyS.Operatoria[3240..3500, 1735..1805]
           Source top (2120,2400) — pero 2120 ∈ Sube[2040..2280] inválido. Salir right (2220,2435).
           Ruta: (2220,2435)→(2240,2435)→(2240,1820)[gutter C1↔C2]→(3370,1820)→(3370,1805).
           Verificar (2240,2435→1820): D libre en x=2240 (Anthropic[2280..2540] empieza 2280, 2240<2280 libre).
           C4 Pacientes[3540..]? 2240<3540 libre. C3, C2, C1 Operatoria[3240..]? 2240<3240 libre. ✓
           (2240,1820)→(3370,1820) horizontal en gutter C1↔C2 (1805..1860). Cruza Operatoria[3240..3500, 1735..1805]? 1820>1805 libre. Estado[3540..]? libre. ✓
           (3370,1820)→(3370,1805): vertical hacia target bottom. ✓ -->
      <bpmndi:BPMNEdge id="MF_GitHub_Plataformas_di" bpmnElement="MF_GitHub_Plataformas">
        <di:waypoint x="2220" y="2435"/><di:waypoint x="2240" y="2435"/>
        <di:waypoint x="2240" y="1820"/><di:waypoint x="3370" y="1820"/>
        <di:waypoint x="3370" y="1805"/>
      </bpmndi:BPMNEdge>

    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>

</bpmn:definitions>
