Added ability to add ordering constraints in pcsd

- Refactored to share code with adding location resources