A man out on pretrial release allegedly opened fire at a Chicago hospital, killing one police officer and wounding another, prosecutors allege.