Skip to content

Instantly share code, notes, and snippets.

@daya
Last active October 2, 2018 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daya/65bd5a1d9f909d392a67e459c353061b to your computer and use it in GitHub Desktop.
Save daya/65bd5a1d9f909d392a67e459c353061b to your computer and use it in GitHub Desktop.
# extra classes required to bridge DSTU2 implementation to STU3 gem
module FHIR
# DSTU2->STU3 translation
class Conformance < FHIR::CapabilityStatement
end
end
url = "https://fhir-myrecord.sandboxcerner.com/dstu2/0b8a0111-e8e6-4c26-a91c-5069cbc6b1ca"
client_id = 'ea8c6477-cd97-4769-a791-2a91d7ad42b9'
client = FHIR::Client.new(url)
options = client.get_oauth2_metadata_from_conformance
pp options
client_secret = ""
client.set_oauth2_auth(client_id,client_secret,options[:authorize_url],options[:token_url])
client_secret = nil
client.set_oauth2_auth(client_id,client_secret,options[:authorize_url],options[:token_url])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment