Mandela alert-state classifier for an OTIS placement row.
Source:R/otis_causal.R
morie_otis_classify_mandela_combo.RdEncodes the bitfield of three binary alert flags
(MentalHealth, SuicideRisk, SuicideWatch) into the 8-state combo
label used by Ruhela's primary RF and maps the alert profile to a
Mandela-rule category (compliant / at-risk /
torture). This wraps the duration-aware
morie_siu_classify_mandela() when a row's
NumberConsecutiveDays_Segregation is supplied; with the
default flags-only mode the categorisation is "alert-only" and
degrades gracefully when duration is missing.
Arguments
- mh
Integer/logical 0/1 mental-health flag.
- sr
Integer/logical 0/1 suicide-risk flag.
- sw
Integer/logical 0/1 suicide-watch flag.
- days
Optional numeric consecutive-days-segregation. If supplied, delegates to
morie_siu_classify_mandela()for the prolonged-solitary determination.- hours_per_day
Optional numeric daily hours in segregation (default 22, the OTIS Restrictive Confinement convention).
Value
Named list with combo (integer 0..7), combo_label
(one of a1..a8), alert_count (0..3),
mandela_category, and notes.
Details
Mandela Rule 43-45 thresholds: > 15 consecutive days segregation = prolonged solitary = torture (UN GA 70/175). Anything >= 22h/day for >= 15 days is the canonical torture-eligible band.
Examples
morie_otis_classify_mandela_combo(1, 0, 0)
#> $combo
#> [1] 4
#>
#> $combo_label
#> [1] "a1"
#>
#> $alert_count
#> [1] 1
#>
#> $mandela_category
#> [1] "at-risk"
#>
#> $notes
#> [1] "alert-only classification (no duration)"
#>
morie_otis_classify_mandela_combo(1, 1, 1, days = 20, hours_per_day = 23)
#> $combo
#> [1] 7
#>
#> $combo_label
#> [1] "a7"
#>
#> $alert_count
#> [1] 3
#>
#> $mandela_category
#> [1] "torture"
#>
#> $notes
#> [1] "duration-aware classification"
#>