بسم الله الرحمن الرحيم
In the above mentioned case, if the child was born weak and underweight then too you should have said azan in his right ear and iqamah in his left ear immediately after his birth. And if the child was to be put in the machine then too with the permission of the doctor you should have said azan and iqamah near the machine with normal volume. However, if azan and iqamah has not been said yet, then you should say it at the earliest and make no further delay. (Fatawa Mahmoodia, 5, 456, Question: 2255, pub. Idarah Siddiq Dhabel, Ahsanul Fatawa, vol. 2, p. 276, pub. HM Saeed, Karachi).
Get some dates chewed by some pious person and apply it to his palate and choose some good name for the child and if possible do his aqiqah on the seventh day or 14th day. In case, you cannot do it on the 14th day then you can do it on the 21st day. Aqiqah is mustahab, it protects the child against various calamities and misfortunes.
Allah knows Best!
Darul Uloom Deoband