The purpose of the article is to study the judicial practice and identify the problem of the lack of an objective medical and social prognosis of the public danger of a mentally ill (deranged) person in order to further apply compulsory medical measures, their replacement or cancellation. As a consequence, individuals who no longer pose such danger are unreasonably subjected for a long time to restrictions on civil, political, economic, social, and cultural human and civil rights and freedoms guaranteed by the Constitution of the Russian Federation and the universally recognized principles and rules of international law. The methodological basis of the research is both philosophical (dialectical, analytical) and generally scientific methods (analysis, synthesis, abstraction, generalization, induction). The work resulted in the conclusion that there is a similar problem in foreign forensic psychiatry and law and order, identifying similarities and differences in approaches to solving it, with regard to the national specifics of providing psychiatric care to the population, including in a compulsory manner. The novelty of the work is that given the objective and subjective difficulties that domestic forensic psychiatry experiences in creating a prognostic methodology of public danger of such patients, a proposal is made to consider, for these purposes, the time period during which the patient does not commit crime. Although the proposed criterion is not of a medical nature, it is always in the sight of doctors and lawyers (judge, prosecutor) when resolving legal situations related to compulsory medical measures. The authors of the article expect that in combination with the clinical variables of the risk of violence, this will allow to achieve an objective prognosis and avoid the unjustified use of medical (restrictive) measures.