BCDA swagger patient data automatic processing clarification

86 views
Skip to first unread message

Srinivas Barige

unread,
Aug 21, 2020, 11:25:32 AM8/21/20
to Developer Group - Beneficiary Claims Data API
I have got the primary function of BCDA swagger sandbox data working on the website
and have downloaded the sample patient  NDJSON file. 

I wanted to refactor and reuse any tools or methods that has been used successfully
able to connect to the swagger.
After successful connection, create automatic sequential steps to 
create authorization tokens and bearer tokens,
validate token and get the metadata details and the bulk data (any of Patient, 
overage or Explanation of Benefit)  after creating the job id and 
using the job id to check status of job completion and get the data file 
without the first line being "can't parse JSON.  Raw result:"

After getting the file, anyone successful in parsing the NDJSON file of BCDA 
(any data file like patient, coverage or Explanation of Benefits).
It would be nice to know if they have successfully parsed and inserted the data 
to a SQL database or any flat file like CSV.
What method you were able to use in parsing ( python, .NET library or SQL script)?

Please let me know if there are any suggestions or recommended way by CMS
or any other standards.

Srini
LT ACO

Muhammad Ishtiaq.

unread,
Aug 27, 2020, 3:56:32 AM8/27/20
to Developer Group - Beneficiary Claims Data API
Team,
i am facing the same problem. Please share any solution or suggestion.

This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.

--
You received this message because you are subscribed to the Google Groups "Developer Group - Beneficiary Claims Data API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bc-api+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bc-api/21bfd358-1cee-4f2c-b360-94fcfeb1b955n%40googlegroups.com.

Elissa (Moderator)

unread,
Sep 2, 2020, 12:02:31 AM9/2/20
to Developer Group - Beneficiary Claims Data API
Hi! Thank you both for this great question. We did a little more investigation into your question, and it turns out this is a known issue with Swagger. When rendering the data file in the browser, Swagger expects to parse JSON-formatted data, but in accordance with the bulk FHIR spec, BCDA's data is newline delimited JSON (NDJSON). Swagger thus sees a format it doesn't expect, and so throws the error. 

Other Swagger users have reported this issue to Swagger on GitHub. Since Swagger has not yet implemented a fix for the error in the browser, there are a few things you can do as a workaround:
  • Download the data from Swagger UI using the "Download" button in the lower right-hand corner of the response window. The file will still have the "can't parse" message in the first line, so you'll want to delete that line in order to parse the file programmatically.
  • Beginning this Thursday, BCDA will enable you to generate client code in any of dozens of languages using an OpenAPI v3 JSON schema file, which should allow you to interact with the production API and retrieve your ACO's data using Python, Go, or your other favorite language. You can follow the PR and its release in our static site GitHub repo, and we'll update the group when it goes live.

Please let us know how else we can assist, and thanks for raising this issue to the rest of the community.

Warm regards,

Elissa Frankle Olinsky
Human-Centered Team lead, BCDA
Reply all
Reply to author
Forward
0 new messages