Disclaimer: This article describes a software engineering project. It is not medical advice. The application does not diagnose, treat or prevent any condition, and nothing here recommends a specific treatment. Decisions about hair loss treatment belong to a licensed physician or dermatologist.
Assessing pattern hair loss and developing a consistent treatment routine is traditionally a manual, subjective process that leads to poor patient adherence. To solve this, I developed a specialized web application that automates and standardizes hair loss assessment using a sophisticated rule-based protocol engine. This project demonstrates how modern web frameworks can transform scattered health data into a structured, actionable daily regimen.
The Challenge of Inconsistent Hair Loss Treatment
Pattern hair loss is a highly prevalent condition, affecting up to 50% of women and 80% of men during their lifetime [4]. Despite its frequency, the process of diagnosing the severity of the condition and establishing an effective, long-term treatment protocol remains fragmented. Individuals typically rely on scattered online research, guesswork, and inconsistent self-assessment. Because professional dermatological consultations often come with high costs and long wait times, many patients turn to generic, one-size-fits-all solutions that are frequently ineffective [4].
From a clinical standpoint, traditional hair and scalp assessments have relied heavily on manual techniques such as dermoscopy and trichoscopy. These methods require specialized expertise and often yield subjective results based on the practitioner’s individual judgment [2]. When patients attempt to replicate this assessment at home, the subjectivity is magnified. This lack of a standardized approach leads to frustration, inefficiency, and suboptimal outcomes. Hair loss treatment is inherently a long process, making ease of use and a clear daily structure essential for treatment compliance [4]. Without a definitive roadmap, patients struggle to adhere to complex regimens involving multiple topical, oral, and mechanical interventions.
Building a Rule-Based Protocol Engine
To address the gap between subjective self-assessment and clinical precision, I engineered a specialized web application designed to automate and standardize the protocol generation process. Built with modern web technologies—specifically React 19, Vite, and Tailwind CSS—the application provides a fast, responsive, and highly structured user experience.
At the core of this application is a sophisticated rule-based protocol engine. Rather than relying on black-box machine learning models for initial triage, the application utilizes a deterministic decision tree. This engine maps discrete user inputs—such as self-reported severity, age, family history, and personal preferences—to predefined routine templates. The routine items themselves are content supplied and reviewed by the product owner; the engine only selects and schedules them according to documented rules.
The workflow is divided into several key automated features:
- Multi-Step Clinical Questionnaire: The application guides the user through a comprehensive data-gathering phase. By structuring the state management in React, the application dynamically adjusts follow-up questions based on previous answers, ensuring that all relevant contraindications and preferences are captured without overwhelming the user.
- Automated Staging: Using the data collected, the application performs automated Norwood (for men) or Ludwig (for women) staging. Standardizing alopecia evaluation through automated systems has been shown to significantly improve reproducibility and reduce the influence of personal biases [1].
- Tiered Regimen Generation: Based on the staging and user profile, the engine outputs a tiered, personalized regimen. It assembles the routine items that the rule set assigns to a profile and spaces them out so that nothing is scheduled on top of something else.
- Integrated Scheduler: To combat the drop-off in treatment compliance, the application features an integrated daily and weekly scheduler. It translates the medical protocol into a clear, day-by-day checklist, removing the guesswork from the patient’s daily routine.
Why Automated Assessment Matters for Health-Tech SMBs
For small to mid-sized businesses operating in the telehealth, dermatology, or wellness sectors, scaling personalized care is a significant operational hurdle. Manual assessments bottleneck patient intake and limit the number of clients a clinic can effectively manage. By automating the initial assessment and protocol generation, businesses can streamline their workflows and provide immediate value to the patient.
The industry is rapidly recognizing the value of automation in this space. Research indicates that automated hair detection systems and deep learning scalp analysis models can standardize alopecia evaluation, reducing human error and subjectivity [1, 5]. In fact, pilot studies evaluating automated assessments for female androgenetic alopecia have demonstrated accuracy rates as high as 94%, performing at the high caliber required of healthcare providers [3].
My application uses a deterministic rule-based engine rather than generative AI; the business value is consistency and convenience: the same inputs always produce the same, auditable output. For an SMB, deploying a structured web application means you can triage patients efficiently, reserve high-value physician time for complex cases, and provide patients with a customized, easy-to-follow regimen that improves long-term retention. Furthermore, establishing a standardized baseline through automated staging makes it much easier to track the progression of hair loss pre- and post-treatment using standardized metrics like the Severity of Alopecia Tool (SALT) [6].
How to Implement a Structured Protocol Workflow
If you are an IT lead or technical founder looking to build a similar automated assessment tool for a medical or wellness application, a structured approach to software architecture is critical. Here is a concrete, step-by-step checklist to guide your development process:
- Define the Clinical Decision Tree: Before writing any code, map out the entire clinical logic. Licensed clinicians must own and sign off this logic; work with them to define how specific inputs (e.g., age, Norwood stage, sensitivity to topical treatments) map to specific interventions. Document every edge case and contraindication.
- Architect the Data Schema: Design a rigid data structure for the user profile and the assessment results. Ensure that the schema can accommodate future additions, such as integrating image-based analysis or tracking longitudinal data (e.g., SALT scores over a 24-week period).
- Build a Dynamic Multi-Step Interface: Utilize a modern frontend framework like React to build the clinical questionnaire. The interface must be frictionless. Use state management to conditionally render questions based on previous inputs, keeping the user focused and reducing cognitive load.
- Develop the Staging and Protocol Engine: Implement the core logic as an isolated module. The engine should take the structured data from the questionnaire, calculate the Norwood/Ludwig stage, and query your intervention matrix to assemble the treatment protocol. Ensure this logic is heavily unit-tested.
- Integrate a Compliance Scheduler: A protocol is useless if the patient cannot follow it. Build a scheduling component that breaks down the tiered regimen into actionable daily and weekly tasks. For example, if a routine contains one weekly task and one twice-daily task, the scheduler must lay them out clearly so they do not overlap or confuse the user.
Common Mistakes in Automated Health Assessments
When developing automated assessment tools, technical teams frequently encounter several pitfalls that compromise the application’s utility and user adoption.
Overcomplicating the Initial Logic: A common mistake is attempting to implement complex machine learning models before establishing a solid baseline of deterministic rules. Start with a strict rule-based engine. Once you have standardized data inputs and a functioning protocol generator, you can evaluate ways to integrate AI for image analysis or predictive modeling later.
Neglecting the User Schedule: Generating a list of recommended treatments is not the same as generating a protocol. Simply telling a user to use five different interventions without providing a schedule leads to protocol fatigue. The application must dictate exactly when and how to apply the treatments.
Failing to Standardize Inputs: Allowing free-form text entry in clinical questionnaires destroys the ability to automate staging. Force users into standardized, quantifiable selections (e.g., visual sliders for hair density, specific multiple-choice options for family history) to ensure the protocol engine has clean data to process.
Key Takeaways
- Unstructured self-assessments are inconsistent, which makes routines hard to plan and easy to abandon.
- A rule-based web application can standardize a self-assessment (e.g. Norwood/Ludwig scale selection) and map the answers to routine templates defined by qualified professionals.
- Turning a routine into a clear daily checklist removes guesswork for the user and is designed to make the routine easier to follow.
- For health-tech SMBs, structured intake tools reduce manual data collection and make every intake follow the same format before a professional reviews it.
- Successful implementation requires a strict clinical decision tree, a frictionless multi-step user interface, and an integrated scheduler to transform medical recommendations into actionable daily tasks.
Sources
- Advances in Medicalized Hair Loss Solutions: A Review of Current Clinical Practices and Regenerative Medicine-Based Protocols with Focus on Off-Label Injectable Treatments [1]
- Exploring the Advancements and Applications of AI-Powered Hair Analysis Tools | JCAD – The Journal of Clinical and Aesthetic Dermatology [2]
- AI Model Creates Successful Treatment Regimens for Women with Hair Loss | Dermatology Times [3]
- Artificial Intelligence-Based Personalization of Treatment Regimen for Hair Loss: A 6-Month Clinical Trial – JDDonline – Journal of Drugs in Dermatology [4]
- Generative AI Tools: Evaluating Ways to Automate Your … [6]
Need a hand with this? CyberResonance helps small and mid-sized businesses with security audits, penetration testing and production-grade n8n automation. See the services or learn more about Kacper.

