Hi
I am new on Smart on FHIR. I need to integrate FHIR with rails. I found a gem fhir_client on
smarthealth.org. Here in this code "client = FHIR::Client.new(url)" used url but I unable to find it. I used this '
https://fhir.epic.com/interconnect-fhir-oauth/api/FHIR/R4' url for code. I made account on
https://fhir.epic.com. I created an application in sanbox mode.
Here is code for authentication
client = FHIR::Client.new(url)
client_id = 'example'
client_secret = 'secret'
options = client.get_oauth2_metadata_from_conformance
if options.empty?
puts 'This server does not support the expected OAuth2 extensions.'
else
client.set_oauth2_auth(client_id, client_secret, options[:authorize_url] ,options[:token_url], options[:site])
end
I used Non-Production Client ID and secrets.
I got error Invalid client. I don't know where I am doing wrong. If I aceess patient create api I got 401 error.
Thanks & Regard
Pawan