Medical emergency information at a tap.
- NFC bracelet + hub: Patient wears a bracelet with a unique 15-character User ID. When tapped on the NFC scanner hub, the hub sends the ID over serial to the dashboard.
- Doctor portal (web): Clinics register at-risk patients and assign NFC bracelets. Patient data is stored encrypted; only the User ID lives on the tag (no PHI on the bracelet).
- EMT dashboard: Staff connect the NFC hub to their computer, open the dashboard, and tap a bracelet. They see patient info immediately, plus an AI summary and a risk/seriousness score from a trained model, all without on-the-spot rediagnosis.
| Path | Description |
|---|---|
| webapp/ | Django API + Next.js frontend + risk model (backend, frontend, train script, artifacts). |
| arduino_user_interface/ | Arduino (C++) firmware for the NFC hub: PN532 reader, 16x2 LCD, buzzer. Reads/writes User ID at 115200 baud. |
| 3D-print-models/ | STL files for the NFC scanner case and bracelet. |
| Layer | Stack |
|---|---|
| Hardware | Arduino Nano, PN532 NFC module, 16x2 LCD, active buzzer; 3D-printed enclosure and bracelet |
| Backend | Django 5+, Python 3.11+; SQLite; JWT auth; encrypted patient storage |
| Risk / AI | scikit-learn (risk model trained on UCI diabetic dataset); Ark API for AI text overview (proof-of-concept) |
| Frontend | Next.js 16, React 19, TypeScript, Tailwind CSS, Radix UI; Web Serial API for NFC hub |
| Firmware | Arduino IDE, C++; PN532 (I2C/SPI), LiquidCrystal |
Web app layout: webapp/config/ (Django settings), webapp/accounts/ (doctor auth), webapp/nfc_users/ (patients, NFC mapping, API, AI overview), webapp/risk_scoring/ (features, training, service), webapp/frontend/ (Next.js app).
- Python 3.11+
- Node.js 20+ and npm
- (Optional) NFC hub connected via USB for dashboard tap-to-read
From the repo root:
cd webapp
python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate
pip install -U pip
pip install -r requirements.txtEnvironment: Create webapp/.env:
AI_OVERVIEW_API_KEY=your_ark_api_key
AI_OVERVIEW_BASE_URL=https://api.ark-labs.cloud/api/v1
AI_OVERVIEW_MODEL=your_fast_model_name(Do not wrap values in quotes. Optional if you only need risk scores.)
Database:
python manage.py migrateCreate a doctor user (optional):
python manage.py create_doctor doctor@example.com yourpassword --first-name "Doctor" --last-name "User"The seriousness/risk score uses a scikit-learn model trained on the UCI diabetic dataset. Run once (or after pulling new code/data):
# From webapp, with venv activated
python manage.py train_risk_model --min-rows 25 --min-positives 5 --max-rows 50000- Training data:
webapp/risk_scoring/data/diabetic_data.csv - Artifacts:
webapp/risk_scoring/artifacts/risk_model_risk-v3-*.joblib
Custom CSV:
python manage.py train_risk_model --csv-path /path/to/data.csv --max-rows 10000Check which model is loaded:
python manage.py shell -c "from risk_scoring.service import RiskScoringService; print(RiskScoringService()._load_latest_model_payload().get('model_version'))"From the repo root:
cd webapp/frontend
npm installCreate webapp/frontend/.env.local if needed:
NEXT_PUBLIC_DJANGO_API_BASE_URL=http://127.0.0.1:8000Terminal 1 – backend:
cd webapp
.venv\Scripts\activate # Windows
# source .venv/bin/activate # macOS/Linux
python manage.py runserverTerminal 2 – frontend:
cd webapp/frontend
npm run dev- API: http://127.0.0.1:8000
- App: http://localhost:3000 (or the port Next.js shows)
- Hardware: Arduino Nano, PN532 (I2C), 16x2 LCD (4-bit), active buzzer. Wiring is in
arduino_user_interface/arduino_user_interface.ino. - Library: PN532 (e.g. PN532 + PN532_I2C in
Arduino/libraries). - Upload: Open the
.inoin Arduino IDE, select board and port, upload. - Serial: 115200 baud; commands
READorWRITE|userid; hub prints User ID when a tag is read.
In the web dashboard, use Connect to attach the hub via the browser’s Web Serial API (port is remembered in cookies). Tap a bracelet; the dashboard gets the User ID and fetches patient data and AI/risk results from the API.
Roughly 370,000 ED patients experience serious harm from diagnostic errors each year. Early decisions by EMTs and nurses can be life-or-death; lack of prior patient information leads to bias and misdiagnosis. TriageID aims to give emergency staff ready, rapid access to curated, at-risk patient information and AI-assisted insights.
Planned improvements from feedback:
- Run a local LLM for AI overview (instead of external API) for health security.
- Apple Watch / WearOS integration (NFC).
- Integration with NetCare (Alberta Health platform).
- Support multiple NFC bracelets per patient (e.g. if one is lost).
- DevPost DevPost Link
- Video Demo Video Demo
- Pitch deck: TriageID Pitch Deck
- Megh Mistry
- Kulgagan Bajwa
- Hasish Karri
- Hari Mallampalli

