Nested insert with an nested update inside

I am trying to do an insert of a structure with two nested structures inside. One of them i would like to be an insert but the other one an update.

            %Person{ ...}

I would like to create an appointment with a new History but with an old patient i have on the database.
How could i do that? Right now i am doing a multi.insert(:appointment) and the cast_assoc in appointments create History and Person structs.