% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convert.R
\name{chapters_to_map}
\alias{chapters_to_map}
\title{Convert chapters to lists of codes for use as a comorbidity map}
\usage{
chapters_to_map(x, defined = TRUE)
}
\arguments{
\item{x}{Either a chapter list itself, or the name of one, e.g.
\code{icd9_sub_chapters}}

\item{defined}{Single logical value, if \code{TRUE}, the default, only
officially defined ICD-9 (currently ICD-9-CM) codes will be used in the
expansion, not any syntactically possible ICD-9 code.}
}
\description{
The chapter headings can be converted into the full set of their children,
and then used to look-up which chapter, sub-chapter, or 'major' a given code
belongs. Always returns a map with short-form ICD-9 codes. These can be
converted in bulk with \code{lapply} and \code{short_to_decimal}.
}
\keyword{internal}
\keyword{manip}
