# Mermaid swimlane diagram in Markdown to PDF

A process runs in lanes, one per team, so it is clear who owns each step and where the work changes hands.

A process laid out in one lane per team, with steps that cross from lane to lane, for a patient referral between a clinic and a hospital.

- PDF: https://legivel.com/examples/mermaid-diagrams/swimlane-diagram.pdf
- Page: https://legivel.com/examples/mermaid-diagrams/swimlane-diagram
- Open in the editor: https://legivel.com/markdown-to-pdf?sample=mermaid-swimlane
- More mermaid diagrams in Markdown to PDF: https://legivel.com/examples/mermaid-diagrams

## Markdown source

````markdown
---
title: Referral process
author: Clinic administration
---

# Referral from the clinic to the hospital

A primary care clinic in Ontario refers patients to the regional hospital. Each lane is the team that owns the step.

```mermaid
swimlane
    subgraph gp[Family doctor]
        Exam[Examine patient] --> Refer[Write referral]
    end
    subgraph admin[Clinic office]
        Send[Send referral]
        Book[Tell patient the date]
    end
    subgraph hospital[Hospital clinic]
        Triage[Triage referral] --> Slot[Offer appointment]
    end
    Refer --> Send
    Send --> Triage
    Slot --> Book
```

The clinic office follows up when the hospital has not offered a date within ten working days.
````
