When doctors working in the structures mentioned by the provisions of articles D. 115-3 and D. 115-6 of the Penitentiary Code consider that the state of health of a pre-trial detainee is not compatible with continued detention or with the prison regime applied to him or her, the competent judicial authority shall be informed by the head of the prison, under the conditions set out in the provisions of Article D. 115-25 of the same code.