Download the PHP package atiweb/edss-in-php without Composer
On this page you can find all versions of the php package atiweb/edss-in-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download atiweb/edss-in-php
More information about atiweb/edss-in-php
Files in atiweb/edss-in-php
Package edss-in-php
Short Description PHP implementation of the Expanded Disability Status Scale (EDSS) calculator based on the Kurtzke/Kappos scoring table
License MIT
Homepage https://github.com/atiweb/edss-in-php
Informations about the package edss-in-php
EDSS Calculator for PHP
PHP implementation of the Expanded Disability Status Scale (EDSS) calculator, based on the scoring table by Ludwig Kappos, MD (University Hospital Basel) and the Neurostatus-EDSS™ standard (Kurtzke, 1983).
This library calculates the EDSS score from 7 Functional System (FS) scores and an Ambulation score, used in the clinical assessment of Multiple Sclerosis.
Based on the JavaScript reference implementation (forked from adobrasinovic/edss).
Installation
Usage
Direct calculation with individual scores
Parameter names match the JS reference:
calculateEDSS(visualFunctionsScore, brainstemFunctionsScore, pyramidalFunctionsScore, cerebellarFunctionsScore, sensoryFunctionsScore, bowelAndBladderFunctionsScore, cerebralFunctionsScore, ambulationScore)
From an associative array
By default, calculateFromArray() expects English field names:
With REDCap Portuguese field names
If your data uses the Portuguese field names from REDCap/REDONE.br, pass the built-in FIELDS_REDCAP_PT mapping:
Custom field mapping
You can define your own field name mapping for any data source:
Score conversions
The Visual and Bowel & Bladder Functional Systems use a wider raw scale that is compressed for EDSS calculation:
Functional Systems
| # | Functional System | Raw Scale | Converted Scale | JS Parameter Name |
|---|---|---|---|---|
| 1 | Visual (Optic) | 0-6 | 0-4 | visualFunctionsScore |
| 2 | Brainstem | 0-5 | — | brainstemFunctionsScore |
| 3 | Pyramidal | 0-6 | — | pyramidalFunctionsScore |
| 4 | Cerebellar | 0-5 | — | cerebellarFunctionsScore |
| 5 | Sensory | 0-6 | — | sensoryFunctionsScore |
| 6 | Bowel & Bladder | 0-6 | 0-5 | bowelAndBladderFunctionsScore |
| 7 | Cerebral (Mental) | 0-5 | — | cerebralFunctionsScore |
| 8 | Ambulation | 0-16 | — | ambulationScore |
Note: The Ambulation score (≥3) directly determines the EDSS score (≥5.0). When Ambulation is 0-2, the EDSS is determined by the combination of FS scores.
Algorithm
The EDSS calculation follows a two-phase approach:
Phase 1: Ambulation-driven (EDSS ≥ 5.0)
When the Ambulation score is ≥ 3, it directly maps to an EDSS value:
| Ambulation | EDSS | Description |
|---|---|---|
| 3 | 5.0 | Walks 200-300m without help |
| 4 | 5.5 | Walks 100-200m without help |
| 5-7 | 6.0 | Assistance needed for walking |
| 8-9 | 6.5 | Bilateral/limited assistance |
| 10 | 7.0 | Wheelchair without help |
| 11 | 7.5 | Wheelchair with help |
| 12 | 8.0 | Restricted to bed/chair |
| 13 | 8.5 | Restricted to bed |
| 14 | 9.0 | Helpless bed patient |
| 15 | 9.5 | Totally helpless |
| 16 | 10.0 | Death due to MS |
Phase 2: FS-driven (EDSS 0 – 5.0)
When Ambulation is 0-2, the EDSS is calculated from the combination of the 7 FS scores based on the Kappos scoring table, considering:
- The maximum FS score and how many systems have that score
- The second-highest FS score and its frequency
- The Ambulation score (0, 1, or 2)
Field Name Mappings
The library includes built-in constants for field name mappings:
| Constant | Description | Example field |
|---|---|---|
FIELDS_DEFAULT |
English names (default) | visual_functions_score |
FIELDS_REDCAP_PT |
Portuguese REDCap names | edss_func_visuais |
You can also pass your own array<string, string> mapping to calculateFromArray().
Other implementations
| Language | Repository |
|---|---|
| JavaScript | atiweb/edss |
| Kotlin | atiweb/edss-in-kotlin |
| Flutter/Dart | atiweb/edss-in-flutter |
Testing
The test suite includes 70+ test cases covering:
- All EDSS ranges from 0 to 10
- Visual and Bowel/Bladder score conversions
- All ambulation-driven scores
- Edge cases for FS combinations
- The reference example from the JavaScript implementation
- Custom field mapping support
References
- Kurtzke JF. Rating neurologic impairment in multiple sclerosis: an expanded disability status scale (EDSS). Neurology. 1983;33(11):1444-1452.
- Neurostatus-EDSS™
- JavaScript reference implementation
License
MIT