diff --git a/README.md b/README.md index 0e94e8d..d3c9c71 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,12 @@ There are three ways to configure the SDK when instantiating a `BlueButton` clas ## Sample Usage: Obtain Access Grant, Probe Scope, and Access Data -Below are code snippets showing the SDK used with Python server and Flask. +Below are code snippets showing the SDK used with Python server and Flask. This code walks through: + +- Obtaining an access token with scope ([Scopes](https://bluebutton.cms.gov/developers/#scopes)) chosen by a user +- Passing the token to query for FHIR data +- Using URL links from the response to page through data +- Using the SDK paging support to return all data in one call ```python from flask import Flask @@ -218,26 +223,39 @@ def authorization_callback(): scopes = auth_token.scope # iterate scope entries here or check if a permission is in the scope - if "patient/Patient.read" in scopes: - # patient info access granted + if "patient/Patient.r" in scopes or "patient/Patient.rs" in scopes: + # patient read access granted, similarly can check: + # "patient/Patient.s", or "patient/Patient.rs" """ 1. access token scope where demographic info included: scope: [ - "patient/Coverage.read", - "patient/ExplanationOfBenefit.read", - "patient/Patient.read", - "profile", - "openid", + "profile", + "openid", + "patient/Patient.r", + "patient/Patient.s", + "patient/Patient.rs", + "patient/ExplanationOfBenefit.r", + "patient/ExplanationOfBenefit.s", + "patient/ExplanationOfBenefit.rs", + "patient/Coverage.r", + "patient/Coverage.s", + "patient/Coverage.rs", + "launch/patient", ] - 2. access token scope where demographic info not included: + 2. access token scope where demographic info (profile patient/Patient.r patient/Patient.s patient/Patient.rs) not included: scope: [ - "patient/Coverage.read", - "patient/ExplanationOfBenefit.read", "openid", + "patient/ExplanationOfBenefit.r", + "patient/ExplanationOfBenefit.s", + "patient/ExplanationOfBenefit.rs", + "patient/Coverage.r", + "patient/Coverage.s", + "patient/Coverage.rs", + "launch/patient", ] """ config = { diff --git a/cms_bluebutton/version.py b/cms_bluebutton/version.py index 976498a..92192ee 100644 --- a/cms_bluebutton/version.py +++ b/cms_bluebutton/version.py @@ -1 +1 @@ -__version__ = "1.0.3" +__version__ = "1.0.4"