Strategic Nutrition clinical platform
Patient management for a group of nutritionists, from the visit to the final report.
AI drafts, the professional decides.
- My role
- Project lead and sole developer
- Duration
- More than 10 years, ongoing
- Industry
- Clinical nutrition, health data
From visit to report
- Step 1The visit is recorded
- Step 2, with AIAudio becomes text
- Step 3, with AIReport draft, section by section
- Step 4The nutritionist reviews and edits
- Step 5The final text goes into the patient record
The context
I’ve been working alongside nutritionist Lorenzo Bergami for more than ten years. What started as small-scale IT support has become the platform a group of nutritionists now uses to follow their patients, from the visit to the final report. In October 2024 we founded the non-profit association Strategic Nutrition ETS APS, where I serve as Vice President and IT lead.
The platform handles health data: security, consent and data retention are part of the architecture, not an add-on.
What I did
- A single patient record. Personal details, visits, body composition, medical history, questionnaires and reports, with progress charts and PDF reports.
- AI in the repetitive steps. It transcribes visits recorded in the browser, drafts the report section by section, extracts values from lab results, and summarizes questionnaires and previous reports. Every draft goes through the professional, who remains responsible for the clinical content.
- Consent and communication. Digital signature of forms with version history; email, certified email (PEC), text messages and reminders to patients; login via WhatsApp.
- Running the association. Members, fees, deadlines and payments in a dedicated module, replacing the spreadsheet.
The results
- 7active AI workflows, always reviewed by the professional
- 39,001visits restructured into a new database model, with zero unexpected differences on verification
- 10+years of continuous development, from supporting a single professional to running a whole association’s platform
How I worked
I gather needs from the nutritionists and turn them into priorities and small, frequent releases. For every change I have the AI analyze the existing code, approve a plan, have the AI write the code along with its tests, verify it in a staging environment and only then release. Decisions, and responsibility for the result, stay with me.
Have a project with similar needs?
Technical details
Architecture
- Clinical system kept separate from the AI module, with provider abstraction and task-based routing: models and vendors can be switched from configuration, with a quick rollback to the previous choice.
- Asynchronous queue on Action Scheduler with conditional state transitions: no job is ever processed twice.
- Classified errors, immediate and queued retries, automatic recovery of stuck jobs, regeneration of a single failed section.
- Tokens, estimated cost, duration and attempts are logged for every generation; the distance between AI draft and final text is measured per section and per prompt version.
Key interventions
- Visit data migration from an EAV model to 74 typed columns, through a single data-access layer, dual writes and a flag-controlled read switch. Across 39,001 visits: 0 unexpected differences and identical SQL results on 69 fields.
- Transcription pipeline migrated from whisper-1 to gpt-transcribe, reversible from configuration; thresholds calibrated on 49 real visits and 349 audio segments.
- Email, certified email and bounces: RFC 3464-compliant parser with 5 outcome classes, isolated SMTP profiles, idempotent certified-email queue, log of every message sent.
Security and privacy
- Direct identifiers stripped from prompts; the patient’s name is reinserted only on the server. Sending full reports requires specific consent.
- Without valid consent a job stays on hold, with retries and a 30-day expiry.
- Authorization by role and by individual patient (9 roles, 16 capabilities); nonces, prepared queries, output escaping, HMAC-signed webhooks, provider keys encrypted with libsodium.
- AI audit log, change and access logs, ten-year retention of clinical data, GDPR export and erasure.
By the numbers
61,023 lines of application code and 40,476 lines of tests, 68 suites with 6,085 automated checks, 35 custom tables, 15 REST routes, 9 server-side external integrations, 484 commits and 417 documented versions. Figures as of 18 November 2026.
Method
AI-assisted development with Claude Code since April 2026: 399 of 484 commits are co-signed by the assistant. Requirements, scope, technical decisions, verification and release remain my responsibility.
Technologies
- PHP
- JavaScript
- CSS
- MySQL
- WordPress
- Action Scheduler
- WP-CLI
- OpenAI API
- WhatsApp Cloud API