% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api-export-bundles.R
\name{normalize_conquest_overlap_files}
\alias{normalize_conquest_overlap_files}
\title{Normalize extracted ConQuest overlap files to the \code{mfrmr} review contract}
\usage{
normalize_conquest_overlap_files(
  population_file,
  item_file,
  case_file,
  population_delimiter = c("auto", "comma", "tab", "semicolon", ",", "\\t", ";"),
  item_delimiter = c("auto", "comma", "tab", "semicolon", ",", "\\t", ";"),
  case_delimiter = c("auto", "comma", "tab", "semicolon", ",", "\\t", ";"),
  conquest_population_term = "auto",
  conquest_population_estimate = "auto",
  conquest_item_id = "auto",
  conquest_item_estimate = "auto",
  conquest_case_person = "auto",
  conquest_case_estimate = "auto",
  keep_extra_columns = TRUE
)
}
\arguments{
\item{population_file}{Path to an extracted ConQuest population-parameter
table in CSV/TSV/TXT form.}

\item{item_file}{Path to an extracted ConQuest item-estimate table in
CSV/TSV/TXT form.}

\item{case_file}{Path to an extracted ConQuest case-level EAP table in
CSV/TSV/TXT form.}

\item{population_delimiter}{Delimiter for \code{population_file}. \code{"auto"}
chooses comma, tab, or semicolon from the file extension/header line.}

\item{item_delimiter}{Delimiter for \code{item_file}. \code{"auto"} chooses from the
file extension/header line.}

\item{case_delimiter}{Delimiter for \code{case_file}. \code{"auto"} chooses from the
file extension/header line.}

\item{conquest_population_term}{Column in \code{population_file} that stores
parameter names. \code{"auto"} tries conservative aliases such as \code{Parameter}
and \code{Term}.}

\item{conquest_population_estimate}{Column in \code{population_file} that stores
parameter estimates. \code{"auto"} tries aliases such as \code{Estimate} and \code{Est}.}

\item{conquest_item_id}{Column in \code{item_file} that stores the item
identifier as extracted by the user. \code{"auto"} tries aliases such as
\code{ResponseVar}, \code{ItemID}, \code{Item}, and \code{Label}.}

\item{conquest_item_estimate}{Column in \code{item_file} that stores item
estimates. \code{"auto"} tries aliases such as \code{Estimate}, \code{Est}, and
\code{Facility}.}

\item{conquest_case_person}{Column in \code{case_file} that stores person IDs.
\code{"auto"} tries conservative aliases such as \code{Person}, \code{PID}, and
\verb{Sequence ID}.}

\item{conquest_case_estimate}{Column in \code{case_file} that stores case EAP
estimates. \code{"auto"} tries conservative aliases such as \code{Estimate},
\code{EAP_1}, and \code{EAP}.}

\item{keep_extra_columns}{If \code{TRUE}, keep all remaining columns after the
standardized identifier and estimate columns.}
}
\value{
A named list with class \code{mfrm_conquest_overlap_tables}.
}
\description{
Normalize extracted ConQuest overlap files to the \code{mfrmr} review contract
}
\details{
This helper is a thin file-wrapper around \code{\link[=normalize_conquest_overlap_tables]{normalize_conquest_overlap_tables()}}.
It is intentionally limited to already extracted tabular files and does not
parse raw ConQuest report text.

The recommended workflow is:
\enumerate{
\item export an exact-overlap bundle with \code{\link[=build_conquest_overlap_bundle]{build_conquest_overlap_bundle()}};
\item extract the relevant ConQuest tables to CSV/TSV/TXT files;
\item call \code{normalize_conquest_overlap_files()} on those files;
\item pass the result to \code{\link[=review_conquest_overlap]{review_conquest_overlap()}}.
}

Read \code{summary(normalized)$normalization_scope} before review to confirm
that the files were treated as extracted tables, not raw ConQuest report
text, and to check duplicate-ID / non-numeric-estimate pre-review flags.
}
\examples{
\donttest{
bundle <- build_conquest_overlap_bundle()
tmp_dir <- tempdir()
pop_path <- file.path(tmp_dir, "cq_pop.csv")
item_path <- file.path(tmp_dir, "cq_item.tsv")
case_path <- file.path(tmp_dir, "cq_case.csv")
utils::write.csv(
  data.frame(
    Term = bundle$mfrmr_population$Parameter,
    Est = bundle$mfrmr_population$Estimate
  ),
  pop_path,
  row.names = FALSE
)
utils::write.table(
  data.frame(
    Item = bundle$mfrmr_item_estimates$ResponseVar,
    Est = bundle$mfrmr_item_estimates$Estimate
  ),
  item_path,
  sep = "\t",
  row.names = FALSE
)
utils::write.csv(
  data.frame(
    PID = bundle$mfrmr_case_eap$Person,
    EAP = bundle$mfrmr_case_eap$Estimate
  ),
  case_path,
  row.names = FALSE
)
normalized <- normalize_conquest_overlap_files(
  population_file = pop_path,
  item_file = item_path,
  case_file = case_path,
  conquest_population_term = "Term",
  conquest_population_estimate = "Est",
  conquest_item_id = "Item",
  conquest_item_estimate = "Est",
  conquest_case_person = "PID",
  conquest_case_estimate = "EAP"
)
summary(normalized)$normalization_scope
review <- review_conquest_overlap(bundle, normalized)
summary(review)$summary
}
}
\seealso{
\code{\link[=normalize_conquest_overlap_tables]{normalize_conquest_overlap_tables()}}, \code{\link[=review_conquest_overlap]{review_conquest_overlap()}}
}
