Hi
I am trying to use fhir-client-jquery.js library for my standalone application. I am able to authenticate the user and receive the access token, refresh token, token_type "Bearer" using this code
var clientId = 'my-client-id';
var standalone = 'user/Patient.read user/Observation.read online_access openid profile';
var params = {
'client_id': clientId,
'scope': standalone
};
FHIR.oauth2.authorize(params);
but I am unable to proceed further using this code
var callback = function(){
extractData().then(
//Display Patient Demographics and Observations if extractData was success
function(p) {
drawVisualization(p);
},
//Display 'Failed to call FHIR Service' if extractData failed
function() {
$('#loading').hide();
$('#errors').html('<p> Failed to call FHIR Service </p>');
}
);
};
FHIR.oauth2.ready(callback);
Could someone please help
- Point to the functions in the fhir-client-jquery.js library I
need to call to fetch Patient & Observation resource while passing the
access_token. Is there a sample code?
- List the request headers I need to pass and endpoint to call before I can fetch a FHIR resource.
Cerner-Correlation-ID:
f5a49f27-4f82-4ed1-a505-cc4f2244bc13
Thanks,
~Daya