We also need to respond with accountRegistered boolean field to indicate to the client if the user has "registered" their patient profile or not.
We need to respond to /signin request with endpoints, so the client can fetch the signup data or get patient data. We have to potentially use a different GP database for each, but we don't want to pass a GP as parameter in the JSON payload with every request, so I think we we will put a provider ID (or a name key) in the API endpoint URL. So we would provide you a endpoint like "gponline.com/fhir/smith/..." in the /signin response. If the user is not registered the endpoint would be like gponline.com/register. The endpoint would also come back on the /register response.
Here is suggested spec:
Returned on Signin if account not registered:
endpoints: [{
name: user
host: gponline.com
protocol: https
path: /api/user/19
id: 19
}, {
name: register
host: gponline.com
protocol: https
path: /register
id: 19
}]
Returned on signin if account is registered:
endpoints : [ {
name: patient
host: gponline.com
protocol: https
path: /fhir/smith/Patient/20
id: 20
}]
We also need to respond with accountRegistered boolean field to indicate to the client if the user has "registered" their patient profile or not.
We need to respond to /signin request with endpoints, so the client can fetch the signup data or get patient data. We have to potentially use a different GP database for each, but we don't want to pass a GP as parameter in the JSON payload with every request, so I think we we will put a provider ID (or a name key) in the API endpoint URL. So we would provide you a endpoint like "gponline.com/fhir/smith/..." in the /signin response. If the user is not registered the endpoint would be like gponline.com/register. The endpoint would also come back on the /register response.
Here is suggested spec:
Returned on Signin if account not registered: endpoints: [{ name: user host: gponline.com protocol: https path: /api/user/19 id: 19 }, { name: register host: gponline.com protocol: https path: /register id: 19 }]
Returned on signin if account is registered: endpoints : [ { name: patient host: gponline.com protocol: https path: /fhir/smith/Patient/20 id: 20 }]