welcome to our community.
And thank you for sharing your situation with us in the community.
As to your question:
1. Did the doctor inform the Ausländerbehörde as well?
2. If yes, and they still came to proceed the deportation you could file an official complain to the BAMF head and the Ausländerbehörde and report it with your doctor to the local Flüchlingsrat and Pro Asyl.
3. A lawsuit is then possible if through the attempt of deprtation you have suffered by anything.
I hope I could answer your question, if you need further assistance please do let us know.