Diagnostics and treatment with limited resources