Broadly speaking, we can say that modern expert opinion has replaced the mutual exclusion of medical and judicial discourses by a game that could be called the game of dual, medical and judicial, qualification. This practice, this technique of dual qualification, organizes the realm of that very strange notion, "perversity," that begins to emerge in the second half of the nineteenth century and that will dominate the entire field of this double determination and authorize the appearance of a range of manifestly obsolete, laughable, and puerile terms or elements in the discourse of experts who are justified as scientists. When you go through these expert medico-legal opinions ... you are struck by terms like laziness, pride, stubbornness, and nastiness. You are given biographical elements that do not in any way explain the action in question but are kinds of miniature warning signs, little scenes of childhood, little childish scenes that are presented as already analogous to the crime. It is a kind of scaled-down criminality for children characterized by the language used by parents or by the morality of children's books. In fact, the puerility of the terms, notions, and analysis at the heart of modern expert medico-legal opinion has a very precise function: it makes possible an exchange between juridical categories defined by the penal code, which stipulates that one can only punish when there is malice or a real intention to harm, and medical notions like "immaturity," "weak ego," "undeveloped superego," "character structure," and so on. You can see how notions like those of perversity make it possible to stitch together the series of categories defining malice and intentional harm and categories constituted within a more or less medical, or at any rate, psychiatric, psychopathological, or psychological discourse. The whole field of notions of perversity, converted into their puerile vocabulary, enables medical notions to function in the field of judicial power and, conversely, juridical notions to function in medicine's sphere of competence. This set of notions functions, then, as a switch point, and the weaker it is epistemologically, the better in functions.
Michel Foucault, Abnormal: Lectures at the College de France 1974-1975 (2003: 32-33)