weixin_33724046 2016-04-05 06:43 采纳率: 0%
浏览 85

如何集成NPI查找?

There's a site called NPI registry lookup which will show the information about the doctor you're searching for. i am getting this error XMLHttpRequest cannot load https://npiregistry.cms.hhs.gov/api/?number=1306935523. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:58202' is therefore not allowed access.

<script type="text/javascript">
            $(document).ready(function () {              
                $('#btnGetNpi').click(function () {                                 
                    $.ajax({
                        async: true,
                        crossDomain: true,
                        url: 'https://npiregistry.cms.hhs.gov/api/?number=' + $('#txtnpi').val(),
                        method: 'get',                       
                        dataType: 'json',
                        success: function (data) {
                            debugger;
                            resultElement.html('FirstName:' + data.basic[0].first_name);
                        },
                        error: function (jqXHR, exception) {
                            alert(exception);
                        }
                    });
                });
            });
    </script>

</div>
  • 写回答

2条回答 默认 最新

  • weixin_33701564 2017-03-17 03:27
    关注

    I'm not sure if this is what you're looking for, but the US Gov has a free API for doing NPI lookups, so you could pull your code from here: https://npiregistry.cms.hhs.gov/ It has a link to the API, which shows how to request info from the NPI db. There are several other websites that do this too, so you could crib code from them....

    Application Programming Interface (API) | Read-Only The API is a new, faster alternative to the downloadable NPPES data files. It allows systems to access NPPES public data in real-time, rather than through batched uploads. The API retrieves data from NPPES daily.

    NPPES Read API Interactive Test Application System administrators can use the interactive demo to experiment with generating queries. The API will generate its output at https://npiregistry.cms.hhs.gov/api/.

    There are several sites that do NPI lookups. Look at their code. Other sites do it. Copy the successful ones.

    Those of you who are coders should be able to make this sing!

    评论

报告相同问题?

悬赏问题

  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥50 我撰写的python爬虫爬不了 要爬的网址有反爬机制
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据