Finding All Data Scopes a Patient Consented To
To figure out what healthcare data a patient consented to release for a particular study, it may be helpful to not need to think about consent types. This will become more essential as more data consent types are added to the HealthEx system. Instead, you may want to be able to ask the question, "across all of the patient's consents, what data have they consented to release to this study?". This can be accomplished with the getPatientConsentDataScopes API.
To check consented data scopes, we'll need:
- The reference ID or MRN of a patient from your organization
- The ID of a study added by your organization
Identifying a Patient
You can identify the patients the same way you would for Basic Consent Checking.
Identifying a Study
First, you'll need to identify a study you're interested in. You'll need the study's ID.
To find a study's ID:
- Locate it in the HealthEx Application.
- Navigate to to the details page for the study in question.
- You can then find the study ID in the URL the page. For example, if the URL is
https://app.healthex.io/#/research-studies/694d61c2-3f1b-4dc8-aa1c-2012fc735e57/details, then694d61c2-3f1b-4dc8-aa1c-2012fc735e57is the study ID.
Example Values
For this example, we will use the following values:
- Patient ID:
19cff418-7d80 - Study ID:
694d61c2-3f1b
Making the API Call
To check what data scopes this patient has consented to for this study, you would make the following API call:
GET https://api.healthex.io/v1/patients/19cff418-7d80/consented-data-scopes/study/694d61c2-3f1b-4dc8 \
Accept: application/json
Authorization: Bearer <your JWT token>
This API requires you to pass a JWT token to authenticate. See the Authentication guide for more info.
The response body will look something like this:
{
"consentDataScopes": [
{
"resourceScope": "CONTACT_INFO",
"sensitivityScope": "NORMAL"
},
{
"resourceScope": "DIAGNOSES",
"sensitivityScope": "NORMAL"
},
{
"resourceScope": "DIAGNOSES",
"sensitivityScope": "SUBSTANCE_USE_OR_DRUG_ABUSE"
}
],
"consentRecordIds": [
"19",
"20"
]
}
All of the patient's consented data scopes, across all consents for this study, can be found in the consentDataScopes field.
For more details, see the getPatientConsentDataScopes API reference.
See Also
- Want to find the data consent scopes, but only for a specific consent type? See Basic Consent Checking
- Need to check consents for multiple patients in a study in one call? See Finding All Consented Patients For a Study