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):
And the result is the token with requested patient id:
. . .
access_token: "eyJraWQ. . ."
id_token: "eyJraWQ. . ."patient: "12724065"
refresh_token: "eyJp. . ."
scope: "launch online_access openid patient/Observation.read patient/Patient.read profile"
. . .
Can you please suggest on how to properly pick the right one we need?