Praise be to Allaah.
If the doctors want to mess about with the body, dissecting it and experimenting on the body of a Muslim child, this is not permissible. But if they want to take samples for testing, this is OK.
Shaykh Ibraaheem al-Khudayri
She should be buried after being washed (ghusl) and shrouded, and after the funeral prayer has been offered, even if she was a foetus, so long as the soul had been breathed into her.