OC-5883: Programatically get subject-specific info and specific PForm URL

Includes merged code from OC-5884, OC-5826, OC-5983, OC-5839, OC-6052, OC-6050, OC-5795, OC-5722.
@jkeremian Do you know why we are doing this?