Skip to content
Frontend architecture

Patient Movement Capture Is a State Machine

A production patient portal that connects onboarding, AI-assisted intake, movement assessment, exercises, reports, billing, appointments, and remote care across tenant-configured healthcare journeys.

Written by Montasim
3 min read

The visible feature was only the surface

Patients need to complete intake, assessments, guided movements, exercises, appointments, payments, and result review without navigating disconnected healthcare tools. The portal must keep those journeys understandable while adapting to different tenants, devices, clinical programs, and service configurations.

The system also had to respect concrete constraints. Camera, audio, browser capability, network quality, and local ML performance vary across patient devices and directly affect clinical workflow reliability. Tenant-specific features and branded journeys must coexist without duplicating the application or leaking one organization’s configuration into another. Assessment and payment flows cross multiple services, redirects, session states, and expiry conditions that must recover predictably. Patient-facing errors and progress states must remain clear without exposing internal healthcare or infrastructure details.

My role covered frontend architecture and product engineering within the mymedicalhub team, with responsibility for patient journeys, movement and computer-vision workflows, tenant configuration, payments, reporting, and reliability.

I turned the constraints into boundaries

A React application composes tenant-aware patient journeys, Redux and focused context boundaries coordinate long-running workflows, browser media and ML adapters support movement analysis, and guarded service integrations connect assessments, reporting, payments, appointments, and remote assistance.

Tenant feature state and theme configuration select supported journeys without maintaining a separate frontend for every healthcare organization.

Preparation, person detection, countdown, recording, processing, retake, and completion are coordinated explicitly so late media events cannot restart a finished assessment.

Payment, direct-to-consumer, mobile, callback, and remote-assistance redirects preserve the minimum required context and validate expiry or return states before resuming a workflow.

Compatibility, network, and performance checks give patients actionable guidance before unreliable media or ML execution compromises an assessment.

The key decision: Keep tenant behavior configuration-driven.

The implementation had to prove the model

I delivered the work across the full path: Contributed extensively across movement assessment, reports, patient dashboards, authentication, payment, tenant-feature, chatbot, and remote-assistance surfaces. Refined camera and recording lifecycle behavior, including selection changes, completion guards, retake rules, audio shutdown, and person-in-frame requirements. Implemented and maintained tenant-aware UI, report interpretation, assessment history, payment continuation, and authenticated redirect behavior. Added focused component and workflow tests while iterating on a large production React codebase shared by a multidisciplinary product team.

The result is concrete: Patients can move through onboarding, assessment, exercise, reporting, payment, and remote-care journeys in one tenant-aware portal. Movement capture handles more device, tenant, and lifecycle edge cases without silently recording invalid or stale state. Feature configuration supports multiple healthcare programs while preserving a shared application foundation. Operational warnings and recovery paths surface earlier, reducing avoidable failures during patient-facing clinical workflows.

The senior engineering lesson was that solving the visible workflow is only half the job. The architecture must also make constraints, failure modes, evidence, and ownership explicit enough for the next change to remain safe.

Working through a similar challenge?

Share your context, constraints, and timeline to start a focused conversation.

Leave a reply

Respond to the article or continue the discussion.

Ctrl + Enter to post

Your email stays private. Comments are stored securely.