1

We are connected to the API for https://openpaymentsdata.cms.gov/. In some cases the data points differ (for example - quantity of general payments) between the raw API data versus what is seen on the live site.

What is the source for these data differences? Which is the correct data - the API or the live site? Best case scenario is the API is the correct data and the live site wasn't updated yet.
We'd like to reconcile this to pull the correct data, but if it can't be reconciled through the API then how can it best be explained? It seems almost like a dispute on the transaction(s) was initiated which changed one of the data points. If a dispute is initiated by the profile owner, does the API data change to reflect any updates?

This is my first attempt to reach out for an idea how these data differences occur.

Here's a random example. The profile URL: https://openpaymentsdata.cms.gov/physician/209169/

The quantity of general payments shown on the live site is: 139 The quantity of general payments pulled from the API is: 151

matisses
  • 11
  • 2
  • Could you share the API query that you used to obtain the 151 payments? – Tom Schenk Jr Jul 08 '19 at 16:22
  • The old query: [{"sum_total_amount_of_payment_usdollars":"2305.14","sum_number_of_payments_included_in_total_amount":"151"}] The new query removed the sum() function and used sum for general total amount and count number of transactions manually. – matisses Jul 09 '19 at 13:24
  • To add: The new query had the same results in the quantity pulled for general payments. I've reached out to dev for the entire new query text. – matisses Jul 09 '19 at 17:30
  • Thanks. The above item looks like the JSON result from the query. Do you happen to have the API call (the URL string) that was entered to get that result? – Tom Schenk Jr Jul 09 '19 at 20:32
  • Understood. The URL string for the current API call as it was sent to me from dev: https://openpaymentsdata.cms.gov/resource/bqf5-h6wd.json?physician_profile_id=209169&$$app_token=oXbsFwj7KElCMesuRAZEfTDfB&$select=total_amount_of_payment_usdollars,number_of_payments_included_in_total_amount&$limit=50000&$offset=0 – matisses Jul 10 '19 at 12:13
  • I've done a brief test of the new API call and it seems to be working to fetch the correct general payment quantities. I'll add an update after I finish properly testing. – matisses Jul 10 '19 at 14:29

1 Answers1

0

I see the issue here. Based on the API call https://openpaymentsdata.cms.gov/resource/bqf5-h6wd.json?physician_profile_id=209169&$$app_token=oXbsFwj7KElCMesuRAZEfTDfB&$select=total_amount_of_payment_usdollars,number_of_payments_included_in_total_amount&$limit=50000&$offset=0 you get a field called "number_of_payments_included_in_total_amount" which has a number associated with it. Most of these are "1", but the 136th entry has "13" assigned to it. You are summing across the field which equals 151.

However, the OpenPayments website appears to only be counting entries/rows. There are 139 entries/rows in the results.

Unfortunately, I don't know which one is accurate. It could be a misconfiguration of the OpenPayments website or it could be a misinterpretation of what number_of_payments_included_in_total_amount means. But, at least, it explains the difference in how you get your counts.

Tom Schenk Jr
  • 478
  • 2
  • 8