Patient number formula