Overriding fields from one content type which inherit from another content type Imagine we have 50 different professions in the same domain (medicine for example). In a region, we can have 5 doctors who have the same addresses, and in another region we can have 15 doctors in different addresses. We want their information to be stored in the database (e.g. addresses, telephone number).

So I decided to do this:


Content type 1 (general information): title, field_region, field_tel, field_email, etc.
Content type 2 (specific information): title, field_region, field_inherit_from, field_tel, field_email, etc.


Thus, when we want to add specific information to a profession X from region Y, we have to create a new content of content type 1 and then create content type 2 which will override specific fields from content type 1.

Keep in mind that a same region may have 10 professions who have same phone number, same email address but 7 professions have its own email address for instance.
Also, keep in mind that there is more than 15 different fields (so 10 different type of information about the professions).

How can I do this? I just don't know what the best way to do it is.
I am not sure if you are using D7 or D8, so will take a high level approach.

I would suggest that you will need to use an entity reference field on Content Type 2 (Person) to reference the item of Content Type 1 (Profession template) that will provide the default values for fields that are not filled in. They might even be the same content type if all the fields are the same, and all can accept default values (though if so watch out for recursion in the next step).

Now using a custom module, on node load, you can check for empty fields and replace their values with those of the referenced node.