node-on-fhir icon indicating copy to clipboard operation
node-on-fhir copied to clipboard

SMART on FHIR Connectivity

Open awatson1978 opened this issue 9 months ago • 0 comments

  • Smart App Debugger http://localhost:3000/smart-app-debugger

  • Confirm connectivity to SmartHealthIT, Epic

  • SMART on FHIR Client (NEW) The fhirclient library was having difficulties with the OAuth token exchange; so it was taken out and replaced with a home-grown object of helper functions.

Intended Syntax

SmartOnFhir({
  fhirServiceUrl: 'http://example.com/R4',
  redirect_uri: 'http://localhost:3000',
  client_id: 'my_web_app',
  client_secret: 'my_web_app
})
  .fetchCapabilityStatement()
  .fetchWellKnownSmartConfig()
  .exchangeCodeForAccessToken()
  .selectPatient()
  .fetchPatient()
  .fetchAndSelectPatient()
  .getResourceFrom('http://example.com/R4/Condition')
  .getResourceFrom('http://example.com/R4/Encounter')
  .getResourceFrom('http://example.com/R4/Immunization')
  .getResourceFrom('http://example.com/R4/Procedure');

awatson1978 avatar May 06 '24 23:05 awatson1978