% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/orm_priority.R
\name{orm_priority}
\alias{orm_priority}
\title{Compute risk priority scores and traffic light classification}
\usage{
orm_priority(
  result,
  min_records = 2L,
  wrdi_high = 0.7,
  wrdi_low = 0.3,
  context_rcs_threshold = 15,
  lang = getOption("orisma.lang", "en")
)
}
\arguments{
\item{result}{An \code{orisma_result} object.}

\item{min_records}{Integer. Min records for evaluation. Default \code{2}.}

\item{wrdi_high}{Numeric. WRDI threshold for high disconnection. Default \code{0.7}.}

\item{wrdi_low}{Numeric. WRDI threshold for low disconnection. Default \code{0.3}.}

\item{context_rcs_threshold}{Numeric. RCS above which a category is
considered a context category (dominant topic) rather than a risk.
Default \code{15}.}

\item{lang}{Character. \code{"en"} or \code{"es"}.}
}
\value{
A list with two data frames: \verb{$risks} (priority-classified risk
categories) and \verb{$context} (dominant topic categories).
}
\description{
\code{orm_priority()} assigns a priority level to each detected risk category
using three criteria combined into a single priority score:
\itemize{
\item \strong{Frequency} (RCS): how saturated is this category in the literature
\item \strong{Disconnection} (WRDI): how far is the research from real worker data
\item \strong{Evidence volume}: number of records
}

Categories whose RCS exceeds \code{context_rcs_threshold} are flagged as
\strong{context categories} (the dominant topic of the corpus, not a risk per se)
and are reported separately rather than mixed with risk categories.

Priority levels for non-context categories:
\itemize{
\item \strong{RED}: WRDI >= wrdi_high AND RCS >= 1. Over-studied technically but
no worker data. Urgent preventive gap.
\item \strong{AMBER}: Moderate evidence OR partial worker data.
\item \strong{GREEN}: WRDI < wrdi_low. Good worker data connection.
\item \strong{GREY}: n_records < min_records. Insufficient evidence.
}
}
