Does section 3 have to be discharged if patient sentenced to 37/41?

does section 3 have to be discharged if pt sentenced to 37/41?

No, as S. 40(5) is relevant …

Where a patient is admitted to a hospital in pursuance of a hospital order, or placed under guardianship by a guardianship order, any previous application, hospital order or guardianship order by virtue of which he was liable to be detained in a hospital or subject to guardianship shall cease to have effect; but if the first-mentioned order, or the conviction on which it was made, is quashed on appeal, this subsection shall not apply and section 22 above shall have effect as if during any period for which the patient was liable to be detained or subject to guardianship under the order, he had been detained in custody as mentioned in that section.