# How your immune system fights an infection

> A process map exported from forks.world (https://forks.world). Author: Brian. Source: https://forks.world/p/cmv21nlb90002l206rdu6yn55
> It describes who does what, in what order, and with which technology. Read the plain-language sections first; the JSON at the end is the exact, complete data.

## Summary

- 16 steps across 2 layers
- Persona: The germ, Skin and first defenses, Innate immune cells, T cells and B cells, Memory cells

## Pain points

Where this process hurts, worst first:

- **Chemical alarms cause swelling, redness and fever** (How your immune system fights an infection; painful): Fever and swelling feel awful but are the immune system working

## How to read this file

- A process is made of **layers**. The main layer is the top level; any step of kind `subprocess` opens a detail layer with its own lanes and steps.
- **Lanes** are either persona (people/roles) or technology (systems). Each step belongs to one lane; `using` lists tools a person uses for that step.
- Step kinds: `start`, `task`, `decision` (its arrows carry the answer as a label), `subprocess`, `end`.

## How your immune system fights an infection

Lanes:
- The germ: person / role (id `germ`)
- Skin and first defenses: person / role (id `skin`)
- Innate immune cells: person / role (id `innate`)
- T cells and B cells: person / role (id `adaptive`)
- Memory cells: person / role (id `memory`)

Steps, in the order they run:

1. **A virus or bacteria gets in** [start; The germ; id `i1`]
   - then Skin, mucus and stomach acid try to block it
2. **Skin, mucus and stomach acid try to block it** [task; Skin and first defenses; id `i2`]
   - then Did it get past the barriers?
3. **Did it get past the barriers?** [decision; Skin and first defenses; id `i3`]
   - if "Yes" go to Macrophages and neutrophils swallow what they can; if "No" go to The germ is stopped at the door
4. **Macrophages and neutrophils swallow what they can** [subprocess; Innate immune cells; id `i4`], opens the detail layer "How a macrophage eats a germ"
   - then Chemical alarms cause swelling, redness and fever
5. **Chemical alarms cause swelling, redness and fever** [task; Innate immune cells; id `i5`] ⚠ PAIN POINT (painful): Fever and swelling feel awful but are the immune system working
   - then Dendritic cells show pieces of the germ to T cells
6. **Dendritic cells show pieces of the germ to T cells** [task; T cells and B cells; id `i6`]
   - then B cells make antibodies that lock onto the germ
7. **B cells make antibodies that lock onto the germ** [task; T cells and B cells; id `i7`]
   - then Killer T cells destroy infected cells
8. **Killer T cells destroy infected cells** [task; T cells and B cells; id `i8`]
   - then Is the infection cleared?
9. **Is the infection cleared?** [decision; The germ; id `i10`]
   - if "Yes" go to Memory cells remember the germ for years; if "No" go to B cells make antibodies that lock onto the germ
10. **Memory cells remember the germ for years** [subprocess; Memory cells; id `i11`], links to the published process "From lab idea to vaccine in your arm" (https://forks.world/p/cmv0ie1q40018jw06ksu339x2; full text at https://forks.world/api/public/cmv0ie1q40018jw06ksu339x2/export)
   - then Next time the response is fast, often before you feel sick
11. **Next time the response is fast, often before you feel sick** [end; Memory cells; id `i12`]
12. **The germ is stopped at the door** [end; Skin and first defenses; id `i9`]

```mermaid
flowchart LR
  subgraph l_germ["The germ"]
    n_i1(["A virus or bacteria gets in"])
    n_i10{"Is the infection cleared?"}
  end
  subgraph l_skin["Skin and first defenses"]
    n_i2["Skin, mucus and stomach acid try to block it"]
    n_i3{"Did it get past the barriers?"}
    n_i9(["The germ is stopped at the door"])
  end
  subgraph l_innate["Innate immune cells"]
    n_i4[["Macrophages and neutrophils swallow what they can"]]
    n_i5["Chemical alarms cause swelling, redness and fever"]
  end
  subgraph l_adaptive["T cells and B cells"]
    n_i6["Dendritic cells show pieces of the germ to T cells"]
    n_i7["B cells make antibodies that lock onto the germ"]
    n_i8["Killer T cells destroy infected cells"]
  end
  subgraph l_memory["Memory cells"]
    n_i11[["Memory cells remember the germ for years"]]
    n_i12(["Next time the response is fast, often before you feel sick"])
  end
  n_i1 --> n_i2
  n_i2 --> n_i3
  n_i3 -->|"Yes"| n_i4
  n_i3 -->|"No"| n_i9
  n_i4 --> n_i5
  n_i5 --> n_i6
  n_i6 --> n_i7
  n_i7 --> n_i8
  n_i8 --> n_i10
  n_i10 -->|"Yes"| n_i11
  n_i10 -->|"No"| n_i7
  n_i11 --> n_i12
```

### How a macrophage eats a germ (detail of step "Macrophages and neutrophils swallow what they can")

Lanes:
- Innate immune cells: person / role (id `innate`)
- The germ: person / role (id `germ`)

Steps, in the order they run:

1. **Receptors on the cell spot a pattern that is only found on germs** [start; Innate immune cells; id `w1`]
   - then The cell wraps around the germ and pulls it inside
2. **The cell wraps around the germ and pulls it inside** [task; Innate immune cells; id `w2`]
   - then Enzymes break the germ apart
3. **Enzymes break the germ apart** [task; Innate immune cells; id `w3`]
   - then Pieces of it are shown on the cell surface to call for help
4. **Pieces of it are shown on the cell surface to call for help** [end; Innate immune cells; id `w4`]

```mermaid
flowchart LR
  subgraph l_innate["Innate immune cells"]
    n_w1(["Receptors on the cell spot a pattern that is only found on germs"])
    n_w2["The cell wraps around the germ and pulls it inside"]
    n_w3["Enzymes break the germ apart"]
    n_w4(["Pieces of it are shown on the cell surface to call for help"])
  end
  n_w1 --> n_w2
  n_w2 --> n_w3
  n_w3 --> n_w4
```

## Full data (JSON)

```json
{
  "title": "How your immune system fights an infection",
  "maps": {
    "m_root": {
      "id": "m_root",
      "lanes": [
        {
          "id": "germ",
          "name": "The germ",
          "type": "person"
        },
        {
          "id": "skin",
          "name": "Skin and first defenses",
          "type": "person"
        },
        {
          "id": "innate",
          "name": "Innate immune cells",
          "type": "person"
        },
        {
          "id": "adaptive",
          "name": "T cells and B cells",
          "type": "person"
        },
        {
          "id": "memory",
          "name": "Memory cells",
          "type": "person"
        }
      ],
      "steps": [
        {
          "id": "i1",
          "kind": "start",
          "lane": "germ",
          "next": [
            {
              "to": "i2"
            }
          ],
          "uses": [],
          "label": "A virus or bacteria gets in"
        },
        {
          "id": "i2",
          "kind": "task",
          "lane": "skin",
          "next": [
            {
              "to": "i3"
            }
          ],
          "uses": [],
          "label": "Skin, mucus and stomach acid try to block it"
        },
        {
          "id": "i3",
          "kind": "decision",
          "lane": "skin",
          "next": [
            {
              "to": "i4",
              "label": "Yes"
            },
            {
              "to": "i9",
              "label": "No"
            }
          ],
          "uses": [],
          "label": "Did it get past the barriers?"
        },
        {
          "id": "i4",
          "kind": "subprocess",
          "lane": "innate",
          "next": [
            {
              "to": "i5"
            }
          ],
          "uses": [],
          "child": "m_swallow",
          "label": "Macrophages and neutrophils swallow what they can"
        },
        {
          "id": "i5",
          "kind": "task",
          "lane": "innate",
          "next": [
            {
              "to": "i6"
            }
          ],
          "pain": {
            "note": "Fever and swelling feel awful but are the immune system working",
            "level": 2
          },
          "uses": [],
          "label": "Chemical alarms cause swelling, redness and fever"
        },
        {
          "id": "i6",
          "kind": "task",
          "lane": "adaptive",
          "next": [
            {
              "to": "i7"
            }
          ],
          "uses": [],
          "label": "Dendritic cells show pieces of the germ to T cells"
        },
        {
          "id": "i7",
          "kind": "task",
          "lane": "adaptive",
          "next": [
            {
              "to": "i8"
            }
          ],
          "uses": [],
          "label": "B cells make antibodies that lock onto the germ"
        },
        {
          "id": "i8",
          "kind": "task",
          "lane": "adaptive",
          "next": [
            {
              "to": "i10"
            }
          ],
          "uses": [],
          "label": "Killer T cells destroy infected cells"
        },
        {
          "id": "i9",
          "kind": "end",
          "lane": "skin",
          "next": [],
          "uses": [],
          "label": "The germ is stopped at the door"
        },
        {
          "id": "i10",
          "kind": "decision",
          "lane": "germ",
          "next": [
            {
              "to": "i11",
              "label": "Yes"
            },
            {
              "to": "i7",
              "label": "No"
            }
          ],
          "uses": [],
          "label": "Is the infection cleared?"
        },
        {
          "id": "i11",
          "kind": "subprocess",
          "lane": "memory",
          "link": {
            "id": "cmv0ie1q40018jw06ksu339x2",
            "scope": "public",
            "title": "From lab idea to vaccine in your arm"
          },
          "next": [
            {
              "to": "i12"
            }
          ],
          "uses": [],
          "label": "Memory cells remember the germ for years"
        },
        {
          "id": "i12",
          "kind": "end",
          "lane": "memory",
          "next": [],
          "uses": [],
          "label": "Next time the response is fast, often before you feel sick"
        }
      ],
      "title": "How your immune system fights an infection",
      "parent": null
    },
    "m_swallow": {
      "id": "m_swallow",
      "lanes": [
        {
          "id": "innate",
          "name": "Innate immune cells",
          "type": "person"
        },
        {
          "id": "germ",
          "name": "The germ",
          "type": "person"
        }
      ],
      "steps": [
        {
          "id": "w1",
          "kind": "start",
          "lane": "innate",
          "next": [
            {
              "to": "w2"
            }
          ],
          "uses": [],
          "label": "Receptors on the cell spot a pattern that is only found on germs"
        },
        {
          "id": "w2",
          "kind": "task",
          "lane": "innate",
          "next": [
            {
              "to": "w3"
            }
          ],
          "uses": [],
          "label": "The cell wraps around the germ and pulls it inside"
        },
        {
          "id": "w3",
          "kind": "task",
          "lane": "innate",
          "next": [
            {
              "to": "w4"
            }
          ],
          "uses": [],
          "label": "Enzymes break the germ apart"
        },
        {
          "id": "w4",
          "kind": "end",
          "lane": "innate",
          "next": [],
          "uses": [],
          "label": "Pieces of it are shown on the cell surface to call for help"
        }
      ],
      "title": "How a macrophage eats a germ",
      "parent": {
        "map": "m_root",
        "step": "i4"
      }
    }
  }
}
```
