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
Copy file name to clipboardExpand all lines: README.md
+38-19Lines changed: 38 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -30,8 +30,8 @@ Once CommonHealth Developer Edition is installed, you will need to add a sample
30
30
The CommonHealth Client SDK consists of two modules: commonhealth-client and commonhealth-common. CommonHealthClient contains the bulk of functionality for the SDK, while common contains types shared between the CommonHealth application and the CommonHealth Client SDK. You'll need to add the following to your application's list of dependencies:
The release artifacts are made avalable via the Maven Central repository, so you will need to have the following in your list of dependency repositories:
@@ -187,17 +187,19 @@ Client applications should follow the principle of least privilege and only requ
187
187
188
188
Client applications must define a `ScopeRequest`, which encapsulates a set of `Scope` objects. Each `Scope` object **must** contain a data type (`DataType`) an access type (`Scope.Access`). If you would like to limit the scope of access to a defined set of codes, you may also provide a list of `ScopedCodeAllowListEntry` objects. `ScopeRequest` contains a `Builder` class to help with implementation.
189
189
190
-
The following sample creates a `ScopeRequest` object requesting read access to all currently available clinical data types:
190
+
The following sample creates a `ScopeRequest` object requesting read access to all currently available FHIR data types:
191
191
192
192
```
193
-
val allDataTypes: List<DataType.ClinicalResource> = listOf(
@@ -294,16 +296,15 @@ In order to fetch data, the SDK provides the `readSampleQuery` method on the `Co
294
296
295
297
```
296
298
suspend fun readSampleQuery(
297
-
context: Context,
298
-
connectionAlias: String,
299
-
dataTypes: Set<DataType>,
300
-
before: Date? = null,
301
-
after: Date? = null,
302
-
fetchedAfter: Date? = null
303
-
): List<DataQueryResult>
299
+
context: Context,
300
+
connectionAlias: String,
301
+
dataTypes: Set<DataType.FHIRResource>,
302
+
beforeAfterDatePair: Pair<Date?, Date?>,
303
+
fetchedAfter: Date? = null
304
+
): List<SampleDataQueryResult>
304
305
```
305
306
306
-
As you can see, the method returns a list of `SampleDataQueryResult` instances. For requests for clinical data, these can be cast to `FHIRSampleDataQueryResult` instances. Each `FHIRSampleDataQueryResult` instance contains the following:
307
+
As you can see, the method returns a list of `SampleDataQueryResult` instances. For requests for FHIR data, these can be cast to `FHIRSampleDataQueryResult` instances. Each `FHIRSampleDataQueryResult` instance contains the following:
307
308
308
309
- resourceType: DataType.FHIRResource - the type of the resource
309
310
- json: String - JSON string representation of the FHIR resource
@@ -341,6 +342,18 @@ Upon receiving the NEW_DATA_AVAILABLE notification, you can invoke a method on t
341
342
342
343
Using these can help you identify when and if you need to pull data from CommonHealth, or if data has been deleted in CommonHealth and should be removed from your local datastore, if persisted.
343
344
345
+
### Using CMS Blue Button Sandbox -- new in v1.6.2 and currently in beta
346
+
347
+
_Note: This feature is currently in beta and should not yet be used in production applications. We'd love your feedback as you start using it; please open a Github issue, or email developers [at] commonhealth.org with any thoughts that you have. Thank you!_
348
+
349
+
Client applications can now request to read Insurance data from CommonHealth. This data flows similarly to the existing clinical data types.
350
+
351
+
Important note: CMS requires a client id and secret. [Register with CMS](https://sandbox.bluebutton.cms.gov/v1/accounts/create) to get a client id and secret.
352
+
353
+
Be sure to register your sandbox app with our redirect url: org.thecommonsproject.android.phr.developer://oauth/redirect
354
+
355
+
We can\'t use our own so you\'ll have to provide one. We will save this id and secret only locally, for your development convenience. We never send this client id/secret anywhere except to the authorization server for OAuth.
356
+
344
357
### Reading Verifiable Credentials (SMART® Health Cards) -- new in v1.3.15 and currently in beta
345
358
346
359
_Note: This feature is currently in beta and should not yet be used in production applications. We'd love your feedback as you start using it; please open a Github issue, or email developers [at] commonhealth.org with any thoughts that you have. Thank you!_
@@ -375,6 +388,12 @@ CommonHealth performs SMART® Health Card validation prior to ingesting the card
375
388
376
389
Registering with CommonHealth is not required to begin testing integrations with CommonHealth Developer Edition. However, if you have a client application that you would like to use in staging or production environments, you'll need to register the application with CommonHealth. This is similar to registering an OAuth client, where you would specify information such as required scope, authorization redirect URI, etc. Please reach out to developers [at] commonhealth.org for more information.
377
390
391
+
## Upgrading from v1.3.15 to v1.6.2
392
+
`v1.6.12` introduced insurance data:
393
+
394
+
- Support for Insurance data through the CMS Blue Button 2.0 Sandbox. This will require you to register with CMS an app with a redirect url to CommonHealth, and then for you to provide the client id/secret locally into CommonHealth so that you can download the data. Please see section "Using CMS Blue Button Sandbox" above.
0 commit comments