County protocols are stored as structured JSON files in content/protocols/. Each county has its own folder containing an index file and individual topic files.
Protocol knowledge NEVER relies on LLM model memory. Protocols are:
- Loaded from structured JSON at runtime
- Resolved by county, certification level, and tags
- Injected into LLM prompts when needed
- Versioned and auditable
content/protocols/<county_id>/
├── index.json # Required: pack metadata and topic file list
├── chest_pain.json # Topic file
├── respiratory_distress.json
├── hemorrhage.json
└── ...
Must validate against content/schemas/protocol_index.schema.json.
{
"county_id": "demo_county",
"county_name": "Demo County EMS",
"version": "2025.1",
"cert_levels": ["EMR", "EMT-B", "AEMT", "Paramedic"],
"topic_files": ["chest_pain.json", "hemorrhage.json"],
"destination_policy": "...",
"general_standing_orders": ["..."]
}Each topic file covers one clinical complaint/category.
| Field | Type | Description |
|---|---|---|
id |
string | Unique topic ID |
title |
string | Human-readable title |
tags |
string[] | Tags that scenarios use for matching |
| Field | Type | Description |
|---|---|---|
scope_of_practice |
object | cert_level → list of permitted interventions |
assessment_steps |
string[] | Ordered assessment steps |
treatment_steps |
string[] | Ordered treatment steps |
medications |
array | Medication permissions |
contraindication_snippets |
array | Contraindication rules |
destination_policy |
string | Transport destination guidance |
The ProtocolResolver service matches protocols by:
- County ID — the session's county setting
- Certification level — the learner's cert level
- Tags — matched against
county_protocol_tagsfrom the scenario
Only relevant protocol snippets are loaded, minimizing token usage when injected into LLM prompts.
- Create a new folder:
content/protocols/<county_id>/ - Create
index.jsonwith pack metadata - Create topic files for each clinical area
- Add tags that match your scenario
county_protocol_tags - Validate against schemas
- Test:
cd apps/api && pytest tests/test_protocol_resolver.py