To get Observable to work with FHIR you need ..
- An observable and a fork of the app
- The app registered - we will use Cerner’s sandbox
1st - Fork the Observable
FHIR and Observable
This connects to a sandbox FHIR server. Not to be used in Prod (obviously) First you sign in via the button below - use nancyfhir and password Cerner01 (public knowledge on their google doc) This is the code and state returned from the auth server as params in the url We need to take the code and get an access token Make the fetch to get access token And here's the signin function.
This will give you a url you can register as your redirect url for the app
2nd - Register the url
Log into code-console.cerner.com
Click Log in
Create a new App
Give it a name, make it a patient access app, online, public, and give it the url of your Observable notebook.
Use R4 APIs (they will be around longer than DSTU2)
Choose “Patient Product APIs” > AllergyIntolerance, Condition, DocRef, Encounter, MedRequest, Observation, Patient, ServiceRequest
Accept the Terms 🙂
You will be redirected to the App page. Find your app and get the client_id
Replace the “redirect_uri” and “client_id” mutables in your Observable Notebook and click the little play buttons
Now, find the “Sign In” button and click it.
Use Nancy Smart (not her proxies)
Click Allow Access
If you see some error, it is likely because it takes about 5-10 min for an app to percolate through and actually get registered. Try again in 5-10 min
Now enjoy the results!