I hadn't seen the reference to ALM being an attendant in an insane asylum. The CSA index reference is the one which misled so many people. It refers to AKM (the Texan) who served with the six-month 2nd Texas State Troops. You may have noticed that a large number of index entries refer to the same service file. In this case there are two different index references for the same CSR. Unfortunately one of them matched the initials of your ancestor and also happened to reference a Confederate medical officer.
Hopefully you can find some reasonable explanation for the Confederate service of Dr. A. L. Middleton.