Smart ePCR & CharityCode
🚀 Key Feature: Custom Semantic Search API
We deployed a lightweight Python microservice to handle vector-based queries. While the local app handles direct text matching, this API allows for fuzzy conceptual mapping (e.g., mapping a search for "floppy baby" directly to the "Hypotonia" clinical protocol) which would be too computationally heavy to store entirely on the edge device.
Inspiration
Our journey began with 24 hours embedded with the St John Ambulance (SJA) team. We identified a systemic efficiency gap: for every 20 minutes a volunteer spends in patient contact, they incur 60 minutes of administrative debt. The current software is so friction-heavy that medics often resort to "glove notes" (scribbling vital signs onto their latex gloves) just to avoid losing data during a shift.
We built Smart ePCR to reclaim that hour for the medics. However, we realised this wasn't just an SJA problem; it was a symptom of a larger disconnect in the third sector. Small charities lack the budget for dev teams, and students lack the high-impact projects needed for their portfolios. This led us to develop CharityCode, a platform designed to bridge this gap permanently.
What it does
Our solution is a dual-engine ecosystem designed for clinical impact and long-term scalability:
1. Smart ePCR: The Clinical Co-Pilot
A voice-first, offline-first application that streamlines post-incident reporting.
- Structured Dictation: Uses high-fidelity transcription to map verbal reports directly into NHS AEPR-compliant fields.
- JRCALC Logic Engine: A proprietary logic matrix that live-checks patient data against 400 pages of clinical guidelines.
- Safety Guardrails: Automatically flags missing mandatory checks, such as Sepsis screenings, and calculates NEWS2 scores instantly.
- *Powered by Semantic Search *: We deployed a lightweight Python microservice to handle vector-based queries. While the local app handles direct text matching, this API allows for fuzzy conceptual mapping (e.g., mapping a search for "floppy baby" directly to the "Hypotonia" clinical protocol) which would be too computationally heavy to store entirely on the edge device.
2. CharityCode: The Social Marketplace
A specialised gig-economy platform for the third sector.
- For Charities: Provides a trust layer via AI-automated code reviews, allowing non-technical staff to safely outsource tasks to students.
- For Students: A discovery engine for real-world tasks, offering verified proof of impact and professional portfolio growth.
How we built it
We engineered Smart ePCR as a true "Local-First" application to survive the chaotic, signal-dead environments medics work in.
1. The Offline-First Clinical Engine (Flutter & Hive)
We chose Flutter to ensure a native-performance experience across both iPadOS (used by ambulances) and Android.
- Zero-Latency Logic: Instead of querying a cloud database, we baked the entire JRCALC protocol matrix into the app using Hive. Hive is a lightweight, blazing-fast NoSQL database written in pure Dart.
- Why Hive?: It allows us to persist complex JSON state trees (patient data + protocol logic) instantly without the overhead of SQLite. This ensures that even if the device crashes, the "glove notes" are never lost.
2. Privacy-Centric Voice Dictation
We made a conscious architectural decision not to send patient audio to third-party clouds (like OpenAI).
- Native Power: We leverage the built-in Speech-to-Text engines on iOS and Android. This allows for dictation that is processed on-device (on supported models), maintaining strict patient data sovereignty.
- Workflow: The text output is immediately parsed by our logic engine, which extracts keywords (e.g., "Asthma", "BP 120/80") to populate the AEPR fields.
3. Secure NHS Integration
The app operates on a "Sync-When-Able" architecture.
- Local Sovereign: All data lives locally in the Hive box, encrypted at rest.
- The Handshake: When the device detects a trusted secure network (like a hospital Wi-Fi or secure 4G/5G), it initiates a handshake with the secure NHS backend to push the AEPR JSON payload, clearing the local cache to maintain device hygiene.
4. Optional Cloud Enhancement Layer (Hybrid Mode)
While the core app is 100% functional offline, we engineered a "progressive intelligence" layer that activates when connectivity is detected.
- LLM Refinement (Anthropic Claude API): For complex, unstructured narratives that defy simple regex patterns, we utilise a secure, anonymised pipe to Claude 3.5 Sonnet. This allows for high-level semantic parsing—for example, correctly distinguishing between "Patient has a history of angina" and "Patient denies history of angina"—before mapping it to the JSON structure.
The Submission Pipeline (CharityCode)
The marketplace runs on a pipeline powered by Supabase Edge Functions and Claude 4.5. When a student submits a GitHub link, the Edge Function clones the repo and pulls the code into a secure sandbox for analysis.
Security Vulnerability Ranking
We use a hierarchical ranking system to help non-technical charity coordinators understand project risks immediately:
| Severity | Definition | Examples |
|---|---|---|
| Critical (Red) | Immediate deal-breakers that flag the project as unsafe. | Hardcoded API keys, exposed DB passwords, SQL injection risks. |
| Medium (Orange) | Common slip-ups that require remediation before deployment. | Outdated libraries, missing input sanitisation, weak auth logic. |
| Low (Blue) | Minor issues that don't compromise core security. | Missing security headers, messy config files, linting errors. |
Scoring Logic
The final 0-100 score is a weighted aggregate of three pillars:
- Security First (50%): Any critical flag results in an automatic fail.
- Tech-Stack Fluency (30%): Evaluation of proper tool usage, such as TypeScript implementation.
- Cleanliness and Logic (20%): Assessment of modularity and documentation.
Technical Stack Summary
| Layer | Technology |
|---|---|
| Frontend | Flutter, Tailwind 4, Motion |
| Database | Hive (Local), Supabase (Cloud) |
| Intelligence | Claude 4.5, Claude 3.5 Sonnet, Python Microservice |
| Infrastructure | Supabase Edge Functions |
Challenges we ran into
- The "Trust Layer" Challenge: The biggest technical hurdle was ensuring the AI code review was reliable. We had to engineer complex prompts that forced the AI to provide evidence-based feedback, citing specific lines of code for every flag raised.
- Offline Logic Complexity: Because medical events often happen in signal-dead zones, SJA-AI had to run locally. We optimised our JSON engine to ensure sub-millisecond response times on mobile hardware without a cloud connection.
Accomplishments that we're proud of
- Ready to Roll: Both of our solutions are built on scalable architectures which are ready to be rolled out now. Try out CharityCode on our hosted service now. Sign up and start exploring our example tasks.
- Real-World Validation: Having an actual SJA medic confirm that the app "thinks like a medic".
- The Mic Drop Moment: Integrating a pipeline that can audit an entire GitHub repository in under 10 seconds.
- Premium UX: Using Tailwind 4 and Motion to create an interface that proves "Tech for Good" can look and feel world-class.
What's next?
- Short Term: A handover feature generating a QR code that hospital triage staff can scan to instantly ingest the digital report from Smart ePCR.
- Long Term: CharityCode as the global standard for student volunteering, turning every hour of help into a tangible asset for a student's career.
Log in or sign up for Devpost to join the conversation.