Upon receipt of a certificate of the Veterans Administration or such other agency of the United States that facilities are available for the care or treatment of any person committed to a state psychiatric hospital or institution or for the care or treatment of persons similarly afflicted, and that the person is eligible for care or treatment, the superintendent of the state psychiatric hospital or institution may cause the transfer of the person to the Veterans Administration or other agency of the United States for care or treatment. Upon effecting any such transfer, the committing court or proper officer of the court shall be notified of the transfer by the transferring agency. No person shall be transferred to the Veterans Administration or other agency of the United States if he is confined because of conviction of any felony or misdemeanor or if he has been acquitted of the charge solely on the ground of insanity, unless before transfer, the court or other authority originally committing the person enters an order for the transfer after appropriate motion and hearing. Any person transferred as provided in this section shall be deemed to be committed to the Veterans Administration or other agency of the United States under the original commitment.