[misc] Fixed possible security issue
[misc] Improved security
Issue #892: Patients owned by guests cannot be accessed through the patient service
Fixed.
[misc] Change the order of patient loading, since custom data may rely on features or diseases
[cleanup] Applied codestyle