(1) For purposes of this section:
(a) Civil action means a legal action seeking monetary damages, injunctive relief, declaratory relief, or any appeal filed in any court in this state that relates to or involves a prisoner's conditions of confinement. Civil action does not include a motion for postconviction relief or petition for habeas corpus relief;
(b) Conditions of confinement means any circumstance, situation, or event that involves a prisoner's custody, transportation, incarceration, or supervision;
(c) Correctional institution means any state or local facility that incarcerates or detains any adult accused of, charged with, convicted of, or sentenced for any crime;
(d) Frivolous means the law and evidence supporting a litigant's position is wholly without merit or rational argument; and
(e) Prisoner means any person who is incarcerated, imprisoned, or otherwise detained in a correctional institution.
(2)(a) A prisoner who has filed three or more civil actions, commenced after July 19, 2012, that have been found to be frivolous by a court of this state or a federal court for a case originating in this state shall not be permitted to proceed in forma pauperis for any further civil actions without leave of court. A court shall permit the prisoner to proceed in forma pauperis if the court determines that the person is in danger of serious bodily injury.
(b) A court may include in its final order or judgment in any civil action a finding that the action was frivolous.
(c) A finding under subdivision (2)(b) of this section shall be reflected in the docket entries of the case.
(d) This subsection does not apply to judicial review of disciplinary procedures in adult institutions administered by the Department of Correctional Services governed by sections 83-4,109 to 83-4,123.