...
The execution path is not trivial so I'll walk through the process in english (below).
By necessity I do a lot of generalizing but I also link to the code.
In case you are curious, the key parts of the EAS data model are here
OK, off we go...
We start by doing to blanket validations and standardizing some values.
This is done in this db proc:
...