0

对不起,我是 Visual Basic 和 SODA 的新手。我正在尝试从

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

进入一个VB项目。

例如,如果用户输入 NPI 编号,我希望应用程序自动填充名字和姓氏。我不需要后者的帮助,但我确实需要与 SODA API 数据集交谈的帮助。提前致谢!

4

2 回答 2

1

这是旧的,所以也许你已经继续了,但是......

在您发布大约一个月后,我们发布了SODA.NET库,它也可以作为 Nuget 包使用。这是一个基于 SODA 编写的 SDK,带有一些辅助方法和类。

示例代码是用 C# 编写的,但在 VB.NET 中,您应该能够执行相同类型的操作

'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)
于 2015-06-08T21:30:55.003 回答
0

我自己对 Visual Basic 不是很有经验,但似乎有一些关于如何从 VB 应用程序访问简单 REST API 的很好的例子:

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

这是一个相当大的数据集,因此您需要直接通过 NPI 编号查找医生,使用如下 URL:

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

于 2014-07-03T22:55:27.477 回答