Transfer data from a parent doctype to a child

There is seriously no pun intended here but we are a maternity hospital and so it can get tricky…

In the Healthcare module I have customized the form “Consultation” to include a Field Type of “Table” in which I wish to record Baby birth details - a child table!

I have happily created a custom doctype of Baby which includes things like gender, weight, delivery date/time.

My last step is to record the patient id of the mother in the Baby table. So far I have tried to use a Link field type which nicely solicits the id of a patient but offers the clear opportunity to get it wrong so all I want is to do is to inherit the “patient id” from the parent consultation form.

I know this must be trivial but can’t track down a good example that I understand.