Introduction
Excerpt |
---|
This sample will demonstrate how to retrieve the current user within an app, using the SMART on FHIR JavaScript client. |
SMART on FHIR Authorization
...
After successful authorization, retrieve the resulting SMART FHIR client. The current user's fully qualified FHIR URL is on the FHIR client at userId.
Ex: https://open-api.hspconsortiumlogicahealth.org/data/Practitioner/COREPRACTITIONER1
Code Block | ||||
---|---|---|---|---|
| ||||
var currentUserFhirUrl; FHIR.oauth2.ready(function(fhirClient){ currentUserFhirUrl = fhirClient.userId; }); |
...