How to add the same patient name to child table's(doctype) patient field?

I need a help to add the same patient name which i have selected from patient list to child table’s patient field.

My scenario is like , In Patient Encounter a field patient is there which is linked to Patient doctype and in the same page i have one table is linked with another custom doctype. I added a custom field patient in there also.

So when i select a patient from encounter form the same patient name should come in the table’s patient field.

Is that possible ?
Please help me to achieve this.