0

Sorry I am new to Visual Basic and SODA. I am trying to query/import data from

http://data.cms.gov/resource/qcn7-gc3g.json

into a VB project.

For example if a user enters an NPI number, I would want the application to auto populate the first and last name. I dont need help with the latter, but I do need help with talking to the SODA API dataset. Thanks in advance!

Tripp Kinetics
  • 5,178
  • 2
  • 23
  • 37
tbat
  • 11
  • I'm stuck on how to even get started. I am not familiar with the language at all. I mainly develop web apps. If this is the wrong place to ask, I apologize for wasting your time. – tbat Jul 02 '14 at 18:30
  • Np, just that usually a bit of trial and error is useful to see to get an understanding of where the problem lies. – hnk Jul 02 '14 at 18:42

2 Answers2

1

This is old, so maybe you have moved on but...

About a month after your post, we released the SODA.NET library, which is also available as a Nuget Package. This is an SDK written on top of SODA, with some helper methods and classes.

The example code is written in C#, but from within VB.NET you should be able to do the same types of things

'client provides access to a given host (data.cms.gov)
Dim client as New SodaClient("data.cms.gov", "YOUR_APP_TOKEN")

'a resource reference provides access to that resource's data (using the 4x4)
'we are modeling each record in the resource as a Dictionary(Of String, Object)
Dim resource = client.GetResource(Of Dictionary(Of String, Object))("qcn7-gc3g")

'a SoqlQuery defines how you want to query a given resource
Dim queryForNPI as New SoqlQuery().Where("npi = 1801093968")

'execute a query and get the results back as a Dictionary(Of String, Object)
Dim results = resource.Query(Of Dictionary(Of String, Object))(queryForNPI)
kaveman
  • 4,339
  • 25
  • 44
0

I'm not very experienced with Visual Basic myself, but there seem to be some good examples on how to access a simple REST API from a VB app:

http://www.visualstudio.com/en-us/integrate/get-started/get-started-rest-basics-vsi.aspx

It's a rather large dataset, so you'll want to look up the doctor by NPI number directly, using a URL like this:

https://data.cms.gov/resource/qcn7-gc3g.json?npi=1801093968

chrismetcalf
  • 1,556
  • 1
  • 8
  • 7