Dynamically build the from statement
Refactored to generalize out patent specific

The refactoring prepares for the ability to use this code for other
primary entity types like inventor, assignee, and class by creating new
"spec" sets. Still some refactoring to do before it is fully achieved,
but largely there.