Yeah, that's possible that the token I'm using is the root cause of the issue, but I'm not sure where to look for the patient id.
As I mentioned before, I'm using
https://code.cerner.com/developer/smart-on-fhir in order to initiate provider flow and the console indeed asks me to use a specific patient from the list. After that it goes to the authorization site and asks for standard login/password (portal/portal) and then redirects me back to my application with a token.
The thing is I'm not seeing any patient ids in that auth request. Here is my auth request for Wilma Smart (a standard test patient):
FORM DATA:
code:
f26665f8-c571-4494-ac1b-a2241bcd36b2
grant_type:
authorization_code
redirect_uri:
client_id:
610bf39e-e89f-4a6b-b675-1015516d6f7d
And the result is the token with requested patient id:
{
. . .
access_token: "eyJraWQ. . ."
expires_in: 570
id_token: "eyJraWQ. . ."
patient: "12724065"refresh_token: "eyJp. . ."
scope: "launch online_access openid patient/Observation.read patient/Patient.read profile"
smart_style_url: "
https://smart.cerner.com/styles/smart-v1.json"
tenant: "ec2458f2-1e24-41c8-b71b-0e701af7583d"
token_type: "Bearer"
user: "12742069"
username: "portal"
. . .
}
Can you please suggest on how to properly pick the right one we need?