% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/import.R
\name{.detect_col_with_label}
\alias{.detect_col_with_label}
\title{Label-aware column detection for ambiguous STEPS codes}
\usage{
.detect_col_with_label(data, safe_candidates, ambiguous = list(), label = NULL)
}
\arguments{
\item{data}{A data frame.}

\item{safe_candidates}{Character vector of unambiguous column names.}

\item{ambiguous}{Named list: each element is a character vector of
keywords that must appear in the column label for the code to match.
Names are the ambiguous column codes.
Example: \code{list(a1 = c("current", "30 day"), a5 = c("current", "30 day"))}}

\item{label}{Optional label for progress messages.}
}
\value{
The matched column name or NULL.
}
\description{
Some STEPS column codes (e.g., A1, A5) mean different things across
instrument versions.
This function first tries unambiguous candidate names, then checks
ambiguous codes only if their column label matches expected keywords.
}
\keyword{internal}
