Mahalo Research + CareAcademic digital-health research

Delivering a Safety-First Behavioural Intervention Across Research and Care Workflows

How the National University of Singapore and Mahalo built Fenotype: a governed intermittent-fasting companion with participant coaching, nurse oversight, deterministic safety gates, and auditable AI-assisted routing.

Read the storyDiscuss a similar program
Customer
National University of Singapore
Program
Fenotype
Area
Intermittent fasting, metabolic behaviour change and digital coaching
Deployment
Participant web, mobile, and WhatsApp experiences with a nurse-facing administration and safety portal

“Mahalo has been highly responsive in translating detailed research feedback into practical improvements. Fenotype gives us a way to study a conversational behavioural intervention while retaining the structure, safety logic and inspectability required for research.”

— Yoann Sapanel, National University of Singapore

Executive summary

The program

Fenotype is a clinical-grade behavioural intervention built by the Institute for Digital Medicine at the NUS Yong Loo Lin School of Medicine. It supports intermittent-fasting study participants through a WhatsApp-style companion while giving nurses and researchers a control room for enrolment, safety review, adherence, content, analytics, simulation, and audit. The system combines deterministic state and safety rules with AI-assisted classification. The model labels intent and urgency; approved messages and knowledge provide the participant-facing clinical content.

The programme needed to coach participants every day without asking a clinician to type every reply and without allowing a general-purpose model to improvise medical advice. Web chat, mobile, and WhatsApp all enter one shared message pipeline. Participants can start and end fasts, ask questions, log weight and blood pressure, receive scheduled support, and complete behavioural activities. Study staff enrol participants, maintain approved content, monitor safety and adherence, inspect conversations, and test the real engine against simulated scenarios.

The challenge

Complexity lived across the whole program

Conversation must remain bounded

Participants ask open-ended questions, but clinical wording must come from approved content or a controlled education path rather than unrestricted model output.

Safety must run first

Crisis, symptom, blood-pressure, medication, pregnancy, and fasting-risk signals need deterministic handling before ordinary conversation or AI classification.

Research and care work happen together

Participant coaching, biometrics, adherence, nurse review, scheduled activities, and research analytics need one operational record.

Personalisation must remain inspectable

Goals, preferences, adherence, barriers, and recent context can shape support only when each decision remains traceable.

The intervention needs its own test laboratory

Researchers and clinical reviewers need simulation, adversarial scenarios, evaluation, and regression workflows before changing live behaviour.

Why Mahalo

A one-purpose form builder would have addressed only the simplest data-collection needs. A fully bespoke application could have reproduced the workflows but would have required the customer to fund and maintain a separate product foundation. Mahalo provided a configurable middle path: reusable clinical-research and connected-care infrastructure adapted around the programme. Five characteristics were especially relevant: 1. Configurable journeys. Participant, patient and staff experiences could be shaped around the programme rather than forced into a fixed generic sequence. 2. Longitudinal operation. Activities, content, reminders, follow-up and data could be organised over time. 3. Role-aware access. Researchers, clinicians, coaches, administrators and participants could receive different capabilities and visibility. 4. Integration readiness. Devices, external systems, identity services, data sources and exports could be incorporated where the programme required them. 5. Delivery partnership. Mahalo remained involved in interpretation, configuration, testing, release and support rather than handing over an isolated codebase.

Program requirements

  • Participant access through web chat, mobile, and WhatsApp using one shared pipeline.
  • Deterministic safety extraction and a hard safety gate before any model call.
  • AI-assisted intent, sentiment, and urgency classification without AI-authored clinical replies.
  • Approved Message Library and Knowledge Base content with governed publishing.
  • A state machine for fasting, pauses, diagnostic handling, and withdrawal.
  • Nurse safety queues, sticky safety context, duplicate-alert suppression, and review tools.
  • Weight, blood-pressure, fasting, adherence, and questionnaire capture.
  • Scheduled reminders, daily behavioural questions, and idempotent proactive messaging.
  • Admin dashboards for enrolment, safety, adherence, analytics, content, and observability.
  • Simulation, BioTwin, evaluation, QA sign-off, and regression testing against the real engine.
  • Durable interaction, mechanism-decision, router, usage, and safety audit records.

The Mahalo solution

A configurable foundation shaped around the workflow

One participant pipeline

Web, mobile, and WhatsApp messages enter the same controlled handler, carrying channel context without creating separate conversational logic.

Deterministic safety orchestration

Fixed signal extraction and sticky safety routes run before classification, knowledge retrieval, coaching, or question handling.

AI with a narrow job

The model classifies intent, sentiment, and urgency. Approved templates, message-library content, and grounded knowledge provide participant-facing clinical wording.

Nurse-facing control room

Staff enrol participants, monitor safety and adherence, review flagged turns, manage approved content, inspect analytics, and control feature rollout.

Longitudinal behaviour support

A state machine, scheduled questions, reminders, fasting events, measurements, and mechanism selection coordinate support over time.

Testing before rollout

Simulation, adversarial BioTwin scenarios, evaluation sets, QA checklists, shadow routing, and emergency switches make changes reviewable and reversible.

Participant or patient journey

  1. 01Complete eligibility, baseline, and personalisation onboarding.
  2. 02Use the web, mobile, or WhatsApp channel assigned to the programme.
  3. 03Start and end fasts and view the current fasting state.
  4. 04Receive scheduled questions, reminders, education, and behavioural support.
  5. 05Ask questions and receive approved or grounded programme information.
  6. 06Log weight, blood pressure, and other supported measurements.
  7. 07Enter a deterministic safety pathway when a concerning signal is detected.
  8. 08Continue with support adapted to study state, adherence, and approved preferences.

Research or care-team journey

  1. 01Enrol participants and review completion of eligibility, baseline, and personalisation.
  2. 02Monitor the safety queue, flagged messages, adherence, analytics, and participant timelines.
  3. 03Review and publish approved Message Library and Knowledge Base content.
  4. 04Inspect why a response or behavioural mechanism was selected.
  5. 05Run simulation, BioTwin, integration, evaluation, and QA workflows.
  6. 06Stage experimental conversation features behind flags and shadow logs.
  7. 07Use audit and OpenAI usage records to review system behaviour and cost.
  8. 08Disable experimental AI paths immediately through the emergency switch when required.

Information flow

One operational record across the program

Participant experience

Onboarding, activities, content, reports, and communication.

Mahalo workflow services

Configured program logic, timing, permissions, and longitudinal data.

Research and care teams

Oversight, review, configuration, exceptions, and follow-up.

Approved systems and exports

Connected devices, external systems, and structured downstream use.

Platform components

Capabilities used

  • Web, mobile, and WhatsApp participation
  • OTP mobile access
  • Deterministic safety gate
  • Sticky safety context
  • Approved Message Library
  • Grounded Knowledge Base
  • AI-assisted classification
  • Fasting state machine
  • Biometrics and adherence
  • Scheduled proactive messaging
  • Nurse safety monitor
  • Analytics and observability
  • Simulation and BioTwin testing
  • Evaluation and QA harness
  • Feature flags and emergency switch
  • Interaction and decision audit

Implementation and delivery

Built through controlled iteration

Fenotype was rebuilt around the live operating model documented in its canonical technical guide. One React and Node application serves the participant and staff surfaces, while PostgreSQL and pgvector preserve the longitudinal record, approved knowledge, safety context, adherence, measurements, and audit evidence. The message pipeline is intentionally ordered: request validation, deterministic safety extraction, a hard safety gate, answer grading, AI-assisted classification, state transition, grounded response selection, final auditing, persistence, and nurse-alert creation. Experimental natural-conversation features remain off by default and can be force-disabled independently of the core programme.

What makes this program distinctive

  • Research and care operations on the same participant record.
  • Deterministic safety gates separated from AI classification.
  • Approved content as the source of participant-facing clinical wording.
  • The same message brain across web, mobile, and WhatsApp.
  • Simulation and adversarial testing as part of programme governance.
  • Experimental AI paths off by default with a force-disable switch.

Operational value

What the program established

A participant companion that remains bounded by the approved programme.

Deterministic safety handling before any model call.

One longitudinal record across coaching, biometrics, adherence, research activity, and nurse review.

AI used for classification and constrained education rather than autonomous clinical decisions.

A staff control room for content, safety, analytics, adherence, testing, and rollout.

Durable evidence showing what happened, why a route was chosen, and what content was delivered.

Delivery lessons

What carries into the next program

01

Design the real journey, not only the feature list

A product can technically contain all required features and still fail to represent the way participants and staff move through the programme. Sequence, timing, ownership and exception handling need explicit design.

02

Include external dependencies in the delivery plan

Devices, EHRs, payment processors, identity providers, AI models, content sources and institutional certification can determine the timeline. They are part of the product, even when Mahalo does not control them.

03

Test end-to-end operational scenarios

UAT should verify the complete result: what the participant did, what the staff member saw, what an external system recorded and what appeared in reporting or export.

04

Preserve traceability as the programme changes

Research and care programmes evolve. Approved changes should not make it impossible to reconstruct what was configured, tested, released and shown to users.

05

Separate implementation success from clinical outcomes

A well-delivered platform can improve operational capability. It does not by itself prove a clinical, behavioural or scientific result.

Mahalo perspective

“The goal was not to build a chatbot that could talk about everything. It was to create a governed digital companion that could support a fasting journey and recognise when ordinary coaching should stop and safety handling should begin.”

— Prasanna Gopinath, Founder and CEO, Mahalo Health

Related customer stories

UAB logo

Mahalo Research + Care

Unifying research and wellness delivery for NCHPAD at UAB

UABNCHPAD Connect / HERO! platform implementation

Mahalo Health delivered a unified digital research and wellness environment for the National Center on Health, Physical Activity and Disability at the University of Alabama at Birmingham. The program replaced fragmented REDCap data collection and separate wellness and telehealth tools with a configurable platform for participant recruitment, program delivery, surveys, scheduling, engagement, and operational data.

Read story
University of British Columbia logo

Mahalo Research

Advancing Type 2 Diabetes remission research with the University of British Columbia

University of British ColumbiaDECIDE — DiEt ChoIce to promote type 2 Diabetes rEmission

Mahalo Health partnered with the University of British Columbia Okanagan to digitize and operationalize DECIDE, a four-year implementation study comparing two dietary pathways for Type 2 Diabetes remission: a pharmacist-led standardized low-calorie diet and a registered-dietitian-led low-carbohydrate diet. The platform connected participant management, provider workflows, connected devices, CGM data, questionnaires, clinical measures, and longitudinal follow-up.

Read story
Northwestern University logo

Mahalo Research

Building an adaptive DCT platform for OTC hearing aid delivery

Northwestern UniversityiHear / Mahalo DCT

Northwestern University led the iHear study to design and evaluate an adaptive digital Hearing Healthcare platform for over-the-counter hearing aid delivery. Mahalo provided the decentralized clinical trial foundation for a 42-month, 1,000-participant SMART study spanning recruitment, screening, eConsent, staged randomization, electronic data capture, digital hearing assessment, connected devices, education, and participant support.

Read story

Build the program, not another disconnected app

Fenotype is not a generic chatbot or a theory page. It is an operating Research + Care programme: participants receive daily behavioural support, measurements and safety handling, while nurses and researchers run enrolment, content, review, adherence, analytics, testing, and audit from one governed environment.

Tell us where to start: Research Care Both — the walkthrough is tailored to your answer.