Dear @OluJacob,
There are different types of refugee protection statuses. As part of an asylum application, BAMF looks at whether the applicant is entitled to any of these. For full refugee status or subsidary protection, the fact that your child is receiving medical treament here is not relevant. However, if BAMF decides a person isn't entitled to full refugee status or subdisary protection, they have to **** at whether there are grounds for a deportation ban (in German Abschiebungsverbot). Such a deportation ban could be for health reasons but only in specific circumstances.
Here is what BAMF states specifically about this:
A considerable concrete danger can be considered to exist for health reasons if a return would cause life-threatening or serious diseases to become much worse. This is not contingent on the healthcare provided in the destination state being equivalent to that available in the Federal Republic of Germany. Adequate medical treatment is also deemed to be provided as a rule if this is only guaranteed in a part of the destination country.
If a national ban on deportation is issued, a person may not be returned to the country to which this ban on deportation applies. Those concerned are issued with a residence permit by the immigration authority.
https://***.bamf.de/EN/Themen/AsylFluechtlingsschutz/AblaufAsylverfahrens/Schutzformen/Abschiebeverbote/abschiebeverbote-node.html;jsessionid=602391AC2AB3AD9CBFE9C821EFC02D18.intranet261
Best,
Éanna