Q. A baby born with severe defects that is not expected to survive, should be given a Jewish name in shul? Does the halacha change if the baby survives thirty days?

A. on question 399 on this forum we wrote: “A number of consequential and significant reasons are mentioned for naming the newborn at the bris ceremony (Klolei Hamila p.94) also Avrohom Ovinu was given his full name only after he circumcised (ibid.) However, if the child was born premature or is ill, some Poskim maintain that he could be named before the bris, to permit praying for him (Oz Nid’bru 7: 73) Horav Shlomo Miller’s Shlit”a opinion is that it is better not to deviate from the norm of giving the name at the bris. When reciting the mi sheberach and other tefilos, one should mention just “tinok”, (infant) ben followed by his mother’s name.”
However, if due to the severity of the birth defects, the bris is not likely to be performed or it is a female and is also not expected to survive, Horav Shlomo Miller’s Shlit’a opinion is that it is better not to give a name before the baby has survived thirty days. A name will be given in the due process of the burial. If the baby does survive thirty days a name should be given then.

Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit”a