The new algorithm of diagnostics