Medical optimization of stable and unstable patients