White paper on crime 2010 Part3/Chapter5/Section3/1
The Act on Medical Care and Treatment for Insane Persons, etc. covers  persons who were not prosecuted although deemed to have committed the designated act (acts provided in certain articles of the Penal Code including homicide, etc.) because they are considered insane or to be of a diminished capacity, and  anyone found not guilty for the designated act in a final judgment on the grounds of being insane or given a mitigated sentence on the grounds of being of a diminished capacity (excluding those sentenced to imprisonment with or without work without suspension of execution of the sentence and also have a specific term to serve).
A hearing is held in principle for any such person upon application by public prosecutors. A collegiate court body of a district court, which is made up of a judge and a mental health examiner (psychiatrist), holds the hearing and determines the necessity for medical treatment and then the details of that treatment. Fig. 3-5-3-2 shows the number of persons for whom public prosecutors applied for hearings and the number of persons finally disposed at hearings over the last 5 years. The number of persons for whom public prosecutors applied for hearings was 314 in 2009 and the number of persons involving a decision on a need for hospitalization or outpatient treatment 255.
Table 3-5-3-3 shows the number of persons for whom public prosecutors applied for hearings and the number of persons finally disposed at hearings by type of designated act in 2009.
At the hearings the court can request the director of a probation office to investigate the living conditions of any such person by rehabilitation coordinators (officials of probation offices that are psychiatric social workers or other certified social workers and thus possess specialized knowledge on the health and welfare of persons with mental disorders). The number of cases involving directors of probation offices receiving a request to investigate the living conditions was 306 in 2009 (Source: Annual Report of Statistics on Rehabilitation).