Basically, if you see that one feature depends another, dependency need to be moved into the Foundation layer.
Also, it is not really required to move whole Consultants feature. You need to add a new Foundation project, which will have, for example, a templates and corresponding classes (or interfaces) for _Employee
and _Hospital
and a code, that will be responsible to retrieve or build Employees and Hospitals data. For example a service, which will return a Employee (an instance of _Employee
) by ID, or a list of Employees by HospitalID or a hospital data itself.
Then, Consultants and Hospitals features can inherit and extend (if required) the _Employee
, _Hospital
and being responsible to display a Consultant data and use this Foundation module for get a base Employee data.
This all is abstract. The main idea to move the modules dependency on one level up.