§ 15A‑1022.1.  Procedure in accepting admissions of the existence of aggravating factors in felonies.
(a)	Before accepting a plea of guilty or no contest to a felony, the court shall determine whether the State intends to seek a sentence in the aggravated range. If the State does intend to seek an aggravated sentence, the court shall determine which factors the State seeks to establish. The court shall determine whether the State seeks a finding that a prior record level point should be found under G.S. 15A‑1340.14(b)(7). The court shall also determine whether the State has provided the notice to the defendant required by G.S. 15A‑1340.16(a6) or whether the defendant has waived his or her right to such notice.
(b)	In all cases in which a defendant admits to the existence of an aggravating factor or to a finding that a prior record level point should be found under G.S. 15A‑1340.14(b)(7), the court shall comply with the provisions of G.S. 15A‑1022(a). In addition, the court shall address the defendant personally and advise the defendant that:
(1)	He or she is entitled to have a jury determine the existence of any aggravating factors or points under G.S. 15A‑1340.14(b)(7); and
(2)	He or she has the right to prove the existence of any mitigating factors at a sentencing hearing before the sentencing judge.
(c)	Before accepting an admission to the existence of an aggravating factor or a prior record level point under G.S. 15A‑1340.14(b)(7), the court shall determine that there is a factual basis for the admission, and that the admission is the result of an informed choice by the defendant. The court may base its determination on the factors specified in G.S. 15A‑1022(c), as well as any other appropriate information.
(d)	A defendant may admit to the existence of an aggravating factor or to the existence of a prior record level point under G.S. 15A‑1340.14(b)(7) before or after the trial of the underlying felony.
(e)	The procedures specified in this Article for the handling of pleas of guilty are applicable to the handling of admissions to aggravating factors and prior record points under G.S. 15A‑1340.14(b)(7), unless the context clearly indicates that they are inappropriate. (2005‑145, s. 4.)