Closed kchapple closed 7 years ago
Add "endpoints" object to /user response https://github.com/LibreEHR/fhir/pull/50 https://github.com/LibreEHR/core/pull/20
For now $connection for /core/src/Emr/Eloquent/PatientData is taken from /core/src/Emr/Eloquent/AbstractModel.php and it couldn't be modified by RepositoryInterface::setConnection() method, Could you please provide me info how can I modify connection field for PatientData due to Auth::user() connection. Tried to modify PatientData::fetchAll() to
public function fetchAll()
{
$patient = new Patient();
$patient ->setConnection($this->connection);
return $patient->all();
}
and set AbstractModel
protected $connection = null;
but in didn't work for me.
Note to self. Also add actions array [ 'GET', POST' ] etc.
we need to add the users full patient endpoint to the /user response
Returned if account not registered: endpoints: [{ name: user host: gponline.com protocol: https path: /user }, { name: register host: gponline.com protocol: https path: /register }]
Returned on signin if account is registered: endpoints : [ { name: user host: gponline.com protocol: https path: /user }, { name: patient host: gponline.com protocol: https path: /fhir/smith/Patient/20 }]