Fetch Patient Demographics Information & Prescription information

59 views
Skip to first unread message

Mujahid Ahmed Aamir M

unread,
Mar 31, 2023, 8:54:40 AM3/31/23
to Developer Group for CMS Blue Button API
Hello

How can we fetch Patient Demographics Information & Prescription information using API? which is the API endpoint ? Can anyone help here?

Kirsten Hansen

unread,
Mar 31, 2023, 1:53:34 PM3/31/23
to Developer Group for CMS Blue Button API
Hello Mujahid,There are several resources on our developer sandbox site (https://sandbox.bluebutton.cms.gov) to help you.  The API Docs section has complete information about the Patient, Coverage, and EOB endpoints but here are the ones you specifically mentioned:
  • Patient endpoint for demographics: {{baseUrl}}/v2/fhir/Patient/
  • Prescription data - EOB endpoint with type filter = "PDE": {{baseUrl}}/v2/fhir/ExplanationOfBenefit/?type=PDE
Hope this helps,
Kirsten Hansen
Product Manager
Blue Button 2.0 API Team

Mujahid Ahmed Aamir M

unread,
Apr 5, 2023, 4:57:33 AM4/5/23
to Developer Group for CMS Blue Button API
Hey Thanks Kirsten,

We need to fetch Patient details using MBI(Medicare # / MBI). 
Can you let me know which API endpoint is used to get patient details using MBI as a parameter?

Thank you.

Kirsten Hansen

unread,
Apr 7, 2023, 2:34:04 PM4/7/23
to Developer Group for CMS Blue Button API

Copied response from this thread: https://groups.google.com/g/developer-group-for-cms-blue-button-api/c/2VXHCiEYD1M


Hi Mujahid,


When Medicare enrollees authenticate the sharing of their data via a Blue Button 2.0 API, they can choose if they want to share their demographic/personal data or not (the /patient endpoint, which includes MBI). For an example of what this choice looks like to end users, you can view the first screenshot visible in our documentation here. This means that app developers cannot count on always being able to call the /patient endpoint and getting an MBI back. Because of this, you can’t fetch patient details using MBI directly via the API. 


Instead of using MBI, the API uses a Patient ID that can be used to query a specific enrollee. This Patient ID is returned in the /ExplanationOfBenefit, /Patient, /Coverage and /userinfo endpoints. It’s also returned with the access token response after the patient authenticates via Medicare.gov.


For Medicare enrollees that do wish to share their personal data (/patient endpoint), we create an internal MBI-Patient ID mapping. As an app developer, you would have to keep track of the mapping between MBI to patient ID and access token if you have both.  


For example, if you are using an access token for a patient with the ID  -19990000000001, you could use the following calls listed in our documentation to get the MBI information (note this information is for v2 endpoint only):


  • HTTP GET {baseURL}/Patient

    • Here the patient ID is derived from the access token used.

  • HTTP GET {baseURL}/Patient/{id} or HTTP GET {baseURL}/Patient/-19990000000001

    • Here you are explicitly providing the patient ID.


In the case that the enrollee doesn’t allow demographic information to be shared, and the /Patient endpoint is not accessible, the Patient ID will still be available in the  /ExplanationOfBenefit endpoint to ensure the correct claims data is being delivered. 


For additional information, take a look at our documentation on Calling the API.


Sincerely,
Kirsten Hansen
Product Manager
The Blue Button 2.0 API Team
Reply all
Reply to author
Forward
0 new messages