opennpi-scraper


Nameopennpi-scraper JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/Diego-Arrechea/opennpi-scraper
SummaryThe `opennpi-scraper` is designed for seamless interaction with the opennpi.com page
upload_time2024-02-05 04:03:01
maintainer
docs_urlNone
authorDiego Arrechea
requires_python>=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements requests beautifulsoup4
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # openNPI Scraper

## Introduction

The `opennpi-scraper` Python package enables efficient access to the OpenNPI database, facilitating detailed queries on healthcare providers and offering a streamlined interface for extracting National Provider Identifier (NPI) records. This tool is invaluable for healthcare research and data analysis, offering advanced search capabilities and detailed information retrieval.

## Features

- **Advanced Search Functionality:** Perform detailed searches using a variety of filters such as name, specialty, and location.
- **Detailed Information Retrieval:** Access comprehensive details about individual healthcare providers and doctors.
- **User-Friendly Interface:** Simplifies the extraction process with an easy-to-use API, designed for developers and researchers alike.

## Installation

To install `opennpi-scraper`, run the following command in your terminal:

```bash
pip install opennpi-scraper
```

## Usage

### Importing the Module

Start by importing the `openNPI` class from the `opennpi` package:

```python
from opennpi import openNPI
```

### Creating an Instance

Create an instance of the `openNPI` class:

```python
scraper = openNPI.Scraper()
```

### Fetching Details

Retrieve detailed information about healthcare providers and doctors by their NPI numbers.

#### Providers
```python
provider_info = scraper.get_provider_detail(NPI="1629848031")
print(provider_info)
```

#### Doctors
```python
doctor_info = scraper.get_doctor_detail(NPI="8224486550")
print(doctor_info)
```

**Returns:**
- A dictionary with the provider's or doctor's name and additional details extracted from their respective pages.

### Search

Conduct searches for healthcare providers or doctors based on specific criteria.

#### Providers Search Parameters

| Parameter   | Type  | Description                               |
|-------------|-------|-------------------------------------------|
| query       | str   | General search term.                      |
| taxonomy    | str   | Filter by the provider's specialty.       |
| state       | str   | State abbreviation.                       |
| city        | str   | City name.                                |
| zip         | str   | Postal code.                              |
| page        | int   | Page number of results to query.          |

**Returns:**
- A dictionary with `doctors` key containing a list of matching providers and `nextPage` indicating if more results are available.

```python
advanced_results = scraper.search_providers(query="John Doe", state="CA")
print(advanced_results)
```

#### Doctors Search Parameters

| Parameter   | Type  | Description                                       |
|-------------|-------|---------------------------------------------------|
| query       | str   | General search term.                              |
| specialty   | str   | Medical specialty of the doctor.                  |
| school      | str   | Medical school or university of the doctor.       |
| organization| str   | Organization or medical practice the doctor belongs to. |
| state       | str   | State abbreviation.                               |
| city        | str   | City name.                                        |
| zip         | str   | Postal code.                                      |
| page        | int   | Page number of results to query.                  |

**Returns:**
- A dictionary with `doctors` key containing a list of matching doctors and `nextPage` indicating if more results are available.

```python
advanced_results = scraper.search_doctors(school="Wayne State University School of Medicine", state = 'MI')
print(advanced_results)
```

## License

This project is licensed under the MIT License - see the `LICENSE.md` file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Diego-Arrechea/opennpi-scraper",
    "name": "opennpi-scraper",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Diego Arrechea",
    "author_email": "diego.arrechea.job@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/09/32/093ca4bd65a4d8e666be460603a72388d237ffe36ff1d5cab51fbaf9ec74/opennpi-scraper-0.1.1.tar.gz",
    "platform": null,
    "description": "# openNPI Scraper\r\n\r\n## Introduction\r\n\r\nThe `opennpi-scraper` Python package enables efficient access to the OpenNPI database, facilitating detailed queries on healthcare providers and offering a streamlined interface for extracting National Provider Identifier (NPI) records. This tool is invaluable for healthcare research and data analysis, offering advanced search capabilities and detailed information retrieval.\r\n\r\n## Features\r\n\r\n- **Advanced Search Functionality:** Perform detailed searches using a variety of filters such as name, specialty, and location.\r\n- **Detailed Information Retrieval:** Access comprehensive details about individual healthcare providers and doctors.\r\n- **User-Friendly Interface:** Simplifies the extraction process with an easy-to-use API, designed for developers and researchers alike.\r\n\r\n## Installation\r\n\r\nTo install `opennpi-scraper`, run the following command in your terminal:\r\n\r\n```bash\r\npip install opennpi-scraper\r\n```\r\n\r\n## Usage\r\n\r\n### Importing the Module\r\n\r\nStart by importing the `openNPI` class from the `opennpi` package:\r\n\r\n```python\r\nfrom opennpi import openNPI\r\n```\r\n\r\n### Creating an Instance\r\n\r\nCreate an instance of the `openNPI` class:\r\n\r\n```python\r\nscraper = openNPI.Scraper()\r\n```\r\n\r\n### Fetching Details\r\n\r\nRetrieve detailed information about healthcare providers and doctors by their NPI numbers.\r\n\r\n#### Providers\r\n```python\r\nprovider_info = scraper.get_provider_detail(NPI=\"1629848031\")\r\nprint(provider_info)\r\n```\r\n\r\n#### Doctors\r\n```python\r\ndoctor_info = scraper.get_doctor_detail(NPI=\"8224486550\")\r\nprint(doctor_info)\r\n```\r\n\r\n**Returns:**\r\n- A dictionary with the provider's or doctor's name and additional details extracted from their respective pages.\r\n\r\n### Search\r\n\r\nConduct searches for healthcare providers or doctors based on specific criteria.\r\n\r\n#### Providers Search Parameters\r\n\r\n| Parameter   | Type  | Description                               |\r\n|-------------|-------|-------------------------------------------|\r\n| query       | str   | General search term.                      |\r\n| taxonomy    | str   | Filter by the provider's specialty.       |\r\n| state       | str   | State abbreviation.                       |\r\n| city        | str   | City name.                                |\r\n| zip         | str   | Postal code.                              |\r\n| page        | int   | Page number of results to query.          |\r\n\r\n**Returns:**\r\n- A dictionary with `doctors` key containing a list of matching providers and `nextPage` indicating if more results are available.\r\n\r\n```python\r\nadvanced_results = scraper.search_providers(query=\"John Doe\", state=\"CA\")\r\nprint(advanced_results)\r\n```\r\n\r\n#### Doctors Search Parameters\r\n\r\n| Parameter   | Type  | Description                                       |\r\n|-------------|-------|---------------------------------------------------|\r\n| query       | str   | General search term.                              |\r\n| specialty   | str   | Medical specialty of the doctor.                  |\r\n| school      | str   | Medical school or university of the doctor.       |\r\n| organization| str   | Organization or medical practice the doctor belongs to. |\r\n| state       | str   | State abbreviation.                               |\r\n| city        | str   | City name.                                        |\r\n| zip         | str   | Postal code.                                      |\r\n| page        | int   | Page number of results to query.                  |\r\n\r\n**Returns:**\r\n- A dictionary with `doctors` key containing a list of matching doctors and `nextPage` indicating if more results are available.\r\n\r\n```python\r\nadvanced_results = scraper.search_doctors(school=\"Wayne State University School of Medicine\", state = 'MI')\r\nprint(advanced_results)\r\n```\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the `LICENSE.md` file for details.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "The `opennpi-scraper` is designed for seamless interaction with the opennpi.com page",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/Diego-Arrechea/opennpi-scraper"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c92751cd0957b88668dec27e3140680b983c4899aaf0796d66ca99a8f5f4479c",
                "md5": "c40bb4af1eaeee7cf141e0b39d8860a4",
                "sha256": "d1d2649593e4d17b5df9a3ea0f672748f331673ad0ac341a9d2564b7b7b55107"
            },
            "downloads": -1,
            "filename": "opennpi_scraper-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c40bb4af1eaeee7cf141e0b39d8860a4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6639,
            "upload_time": "2024-02-05T04:03:00",
            "upload_time_iso_8601": "2024-02-05T04:03:00.149023Z",
            "url": "https://files.pythonhosted.org/packages/c9/27/51cd0957b88668dec27e3140680b983c4899aaf0796d66ca99a8f5f4479c/opennpi_scraper-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0932093ca4bd65a4d8e666be460603a72388d237ffe36ff1d5cab51fbaf9ec74",
                "md5": "4bb9c723dfd09cd26a92fb3623cb976b",
                "sha256": "e904036f516dd75bc1f09eb76376eec73a767e8d77c43b1b36a81877e94e1da8"
            },
            "downloads": -1,
            "filename": "opennpi-scraper-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4bb9c723dfd09cd26a92fb3623cb976b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 6318,
            "upload_time": "2024-02-05T04:03:01",
            "upload_time_iso_8601": "2024-02-05T04:03:01.957135Z",
            "url": "https://files.pythonhosted.org/packages/09/32/093ca4bd65a4d8e666be460603a72388d237ffe36ff1d5cab51fbaf9ec74/opennpi-scraper-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-05 04:03:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Diego-Arrechea",
    "github_project": "opennpi-scraper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "beautifulsoup4",
            "specs": []
        }
    ],
    "lcname": "opennpi-scraper"
}
        
Elapsed time: 0.17268s