patient management algorithms