Issue #461: Add a script service for accessing patient data
Improved generic types to allow extended classes