You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We now have a valid access token, and can use it to send requests to the FHIR endpoint to retrieve our patient's data. See http://docs.smarthealthit.org/authorization/#4-app-accesses-clinical-data-via-fhir-api
242
242
243
-
We will depend on the `fhir-client.js` library to retrieve these resources using some available APIs:
243
+
We will depend on the `fhir-client.js` library to retrieve these resources using a couple of the available APIs:
244
244
245
245
-`smart.patient.read()`: This returns the context for the patient the app was launched for.
246
246
-`smart.patient.api.fetchAll()`: This will use the fhir.js API to retrieve a complete set of resources for the patient in context.
247
-
-`smart.byCodes()`:
247
+
-`smart.byCodes()`: A utility function that returns a function to search a given resource for specific codes returned from that response.
248
248
249
249
Here's the relevant code in `example-smart-app.js`:
250
250
@@ -261,15 +261,18 @@ var obv = smart.patient.api.fetchAll({
We'll walk through the code first, and then modify it to retrieve the data you require for your specific patient.
269
274
270
-
Also, the `fhir-client.js` library defines several more API’s that will come in handy while developing smart app. Check them out here:
271
-
272
-
http://docs.smarthealthit.org/clients/javascript/
275
+
As an aside, the `fhir-client.js` library defines several more API’s that will come in handy while developing smart app. Check them out here: http://docs.smarthealthit.org/clients/javascript/
273
276
274
277
275
278
## 11.1 Modify `example-smart-app.js` to grab desired data
0 commit comments