ABSTRACT
Background. Pain affects 39 to 55 percent of stroke survivors and substantial proportions of patients with multiple sclerosis, Parkinson disease, spinal cord injury, and peripheral neuropathy. Three independent systematic reviews (Lee et al., 2022; Triantafyllidis et al., 2023; Boege et al., 2024) have flagged the same gap: existing mobile applications focus on monitoring rather than management. Validated body-map pain tools such as Stanford CHOIR, the Michigan Electronic Body Map, and GeoPain stop at data collection, are condition-agnostic, and require clinic-side integration that is not available to patients in low-resource settings.
Objective. To design and implement an open-source self-management prototype, PainMap, that combines anatomical body-map pain entry with condition-aware pain ontology and a transparent, peer-reviewed-source-cited recommendation engine, deployable on free infrastructure for cross-condition use in any healthcare setting.
Methods. PainMap was built in Python with Streamlit, using SQLite for persistent storage and PBKDF2-HMAC-SHA256 (100,000 iterations, per-user salt) for authentication. The 53-region body-map UI matches the resolution of Stanford CHOIR. The pain ontology covers stroke, multiple sclerosis, Parkinson disease, spinal cord injury, peripheral neuropathy, and cerebral palsy, with 80 condition-specific pain types derived from IASP, NICE, Cochrane and Royal College of Physicians guidelines. The recommendation engine maps each pain type to a list of cited interventions, plus region- and intensity-driven red-flag prompts. A nine-language interface (English, Yoruba, Igbo, Hausa, Nigerian Pidgin, Spanish, French, Portuguese, Arabic) supports cross-cultural use. The full source code is released under the MIT licence.
Results. Functional verification confirmed end-to-end working capability across all modules: authentication, persistent log storage, body-map region selection, condition-aware ontology resolution, recommendation retrieval with citation, longitudinal pattern detection, clinical PDF export, and CSV raw export. Initial dogfooding by the author (a person living with foot drop) generated functional logs demonstrating the integrated workflow. The full prototype, including 80 cited recommendations and a Lagos-seeded local-resources directory, is publicly accessible.
Conclusion. PainMap demonstrates that a cross-condition, recommendation-led, free-living, open-source neurological pain self-management tool is feasible at zero infrastructure cost. The transparent, source-cited recommendation engine addresses the management gap repeatedly identified by systematic reviews. PainMap is positioned for formal feasibility, usability, and acceptability evaluation in stroke and other neurological populations, particularly in low- and middle-income contexts where existing tools are inaccessible.