MODEL PENAL CODE
(1) When a person prosecuted for a [felony of the third degree,] misdemeanor or petty misdemeanor is a chronic alcoholic, narcotic addict [or prostitute] or person suffering from mental abnormality and the Court is authorized by law to order the civil commitment of such person to a hospital or other institution for medical, psychiatric or other rehabilitative treatment, the Court may order such commitment and dismiss the prosecution.
The order of commitment may be made after conviction, in which event the Court may set aside the verdict or judgment of conviction and dismiss the prosecution.
(2) The Court shall not make an order under Subsection (1) of
this Section unless it is of the view that it will substantially further
the rehabilitation of the defendant and will not jeopardize the protection
of the public.