---
# System prepended metadata

title: '    flowchart'

---

# OP flow
``` mermaid
flowchart LR
subgraph datasources
    insee
    bodacc
    jal
    imr
    other[...]
end
imr --> q["triggers ?"]
datasources --> |call| datasource_complete
subgraph SQL
    subgraph enrichissement[Préparation des données]
        insee_triggers  
            --> surveillances_events_diff
        insee ---> |insert| insee_triggers
            .-> surveillance_datasource_freshness
            
        datasource_complete[/"datasource_complete()"/]
            --> |"vue_materialisée_refresh()"| surveillance_datasource_freshness
        
            
    end
    
    subgraph surveillance_de_masse
        surveillances_events_diff .-> surveillances_veilles
        crontab[crontab 5mn] --> surveillances_veilles
        modeles .-> surveillances_veilles
    end
    
    subgraph suivis
        surveillances_alertes
    end
    
    surveillance_datasource_freshness .-> surveillances_veilles
    
end
surveillances_veilles ==> send_notification ==> |aggregation| MAILS
subgraph MAILS
end

```