@@ -167,7 +167,12 @@ There are three ways to configure the SDK when instantiating a `BlueButton` clas
167167
168168## Sample Usage: Obtain Access Grant, Probe Scope, and Access Data<a id =" usage " ></a >
169169
170- Below are code snippets showing the SDK used with Python server and Flask.
170+ Below are code snippets showing the SDK used with Python server and Flask. This code walks through:
171+
172+ - Obtaining an access token with scope ([ Scopes] ( https://bluebutton.cms.gov/developers/#scopes ) ) chosen by a user
173+ - Passing the token to query for FHIR data
174+ - Using URL links from the response to page through data
175+ - Using the SDK paging support to return all data in one call
171176
172177``` python
173178from flask import Flask
@@ -218,26 +223,39 @@ def authorization_callback():
218223 scopes = auth_token.scope
219224
220225 # iterate scope entries here or check if a permission is in the scope
221- if " patient/Patient.read" in scopes:
222- # patient info access granted
226+ if " patient/Patient.r" in scopes or " patient/Patient.rs" in scopes:
227+ # patient read access granted, similarly can check:
228+ # "patient/Patient.s", or "patient/Patient.rs"
223229
224230 """
225231 1. access token scope where demographic info included:
226232
227233 scope: [
228- "patient/Coverage.read",
229- "patient/ExplanationOfBenefit.read",
230- "patient/Patient.read",
231- "profile",
232- "openid",
234+ "profile",
235+ "openid",
236+ "patient/Patient.r",
237+ "patient/Patient.s",
238+ "patient/Patient.rs",
239+ "patient/ExplanationOfBenefit.r",
240+ "patient/ExplanationOfBenefit.s",
241+ "patient/ExplanationOfBenefit.rs",
242+ "patient/Coverage.r",
243+ "patient/Coverage.s",
244+ "patient/Coverage.rs",
245+ "launch/patient",
233246 ]
234247
235- 2. access token scope where demographic info not included:
248+ 2. access token scope where demographic info (profile patient/Patient.r patient/Patient.s patient/Patient.rs) not included:
236249
237250 scope: [
238- "patient/Coverage.read",
239- "patient/ExplanationOfBenefit.read",
240251 "openid",
252+ "patient/ExplanationOfBenefit.r",
253+ "patient/ExplanationOfBenefit.s",
254+ "patient/ExplanationOfBenefit.rs",
255+ "patient/Coverage.r",
256+ "patient/Coverage.s",
257+ "patient/Coverage.rs",
258+ "launch/patient",
241259 ]
242260 """
243261 config = {
0 commit comments