Moved 43 weight-based drug entries out of calculators.js string literals
into a structured JSON reference. Renderers now iterate JSON → S.drugRow.
Sections extracted (43 drugs):
- anaphylaxis (7), sedation (11), agitation (11), antiemetics (7), seizure (7)
Out of scope: seizure refractory drips (compound strings), NRP, antimicrobial
empiric regimens (already structured), airway/cardiac/tox/trauma/respiratory
/sepsis/burns sections (fine as-is or no drugs).
New:
- public/data/drugs.json — { version, last_reviewed, sections.<key>.drugs[] }
- public/js/drugs-loader.js — fetches JSON on boot, exposes window._DRUGS +
window._DRUGS_READY Promise. Non-fatal: each calc function has a matching
*_FALLBACK constant so a 404 on drugs.json doesn't break anything.
Schema:
- dose_mg_per_kg | dose_mg_per_kg_low/high (for ranges) | max_mg | unit |
route | notes | source | optional special-cases (weight bands, age-dep text)
Added one unit test asserting drugs.json loads + has all 5 sections with
non-empty drugs arrays. 37/37 unit tests + 26/26 Playwright e2e tests pass.
38 lines
499 B
Text
38 lines
499 B
Text
node_modules/
|
|
.env
|
|
.env.local
|
|
.env.production
|
|
data/
|
|
!public/data/
|
|
*.db
|
|
*.db-journal
|
|
*.db-wal
|
|
.DS_Store
|
|
Thumbs.db
|
|
*.log
|
|
npm-debug.log*
|
|
.vscode/
|
|
.idea/
|
|
*.swp
|
|
dist/
|
|
build/
|
|
|
|
# Android TWA
|
|
android/.gradle/
|
|
android/app/build/
|
|
android/build/
|
|
android/local.properties
|
|
android/captures/
|
|
android/.idea/
|
|
*.apk
|
|
*.aab
|
|
*.keystore
|
|
*.jks
|
|
public/models/
|
|
.env.backup-*
|
|
*.env.backup*
|
|
|
|
# e2e test artifacts (keep config + specs, skip results + installed deps)
|
|
e2e/node_modules/
|
|
e2e/test-results/
|
|
e2e/playwright-report/
|