rxfoundry.clients.swifty_api.PrescriberApi

All URIs are relative to /api

Method

HTTP request

Description

get_prescriber

GET /swifty/1/prescribers/{prescriber_id}

Get a prescriber by UUID or NPI

get_prescribers

GET /swifty/1/prescribers

Get all prescribers

get_prescriber

Prescriber get_prescriber(prescriber_id)

Get a prescriber by UUID or NPI

Example

  • Bearer (opaque) Authentication (opaque_token):

import rxfoundry.clients.swifty_api
from rxfoundry.clients.swifty_api.models.prescriber import Prescriber
from rxfoundry.clients.swifty_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = rxfoundry.clients.swifty_api.Configuration(
    host = "/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (opaque): opaque_token
configuration = rxfoundry.clients.swifty_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with rxfoundry.clients.swifty_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = rxfoundry.clients.swifty_api.PrescriberApi(api_client)
    prescriber_id = 'prescriber_id_example' # str | Prescriber UUID or NPI

    try:
        # Get a prescriber by UUID or NPI
        api_response = api_instance.get_prescriber(prescriber_id)
        print("The response of PrescriberApi->get_prescriber:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling PrescriberApi->get_prescriber: %s\n" % e)

Parameters

Name

Type

Description

Notes

prescriber_id

str

Prescriber UUID or NPI

Return type

Prescriber

Authorization

opaque_token

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

HTTP response details

Status code

Description

Response headers

200

A single prescriber

-

404

No prescriber found

-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_prescribers

List[Prescriber] get_prescribers(q=q, page=page, results_per_page=results_per_page, deep=deep)

Get all prescribers

Example

  • Bearer (opaque) Authentication (opaque_token):

import rxfoundry.clients.swifty_api
from rxfoundry.clients.swifty_api.models.prescriber import Prescriber
from rxfoundry.clients.swifty_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to /api
# See configuration.py for a list of all supported configuration parameters.
configuration = rxfoundry.clients.swifty_api.Configuration(
    host = "/api"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (opaque): opaque_token
configuration = rxfoundry.clients.swifty_api.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with rxfoundry.clients.swifty_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = rxfoundry.clients.swifty_api.PrescriberApi(api_client)
    q = 'q_example' # str | Filter prescribers by query.  Searches by NPI, first name, last name, practice address street one, practice address city, practice address state. (optional)
    page = 1 # int | The page number to return.  Defaults to 1. (optional) (default to 1)
    results_per_page = 10 # int | The number of results to return per page.  Defaults to 10. (optional) (default to 10)
    deep = False # bool | Whether to return contained objecst for the prescriber or just minimal information.  Defaults to false. (optional) (default to False)

    try:
        # Get all prescribers
        api_response = api_instance.get_prescribers(q=q, page=page, results_per_page=results_per_page, deep=deep)
        print("The response of PrescriberApi->get_prescribers:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling PrescriberApi->get_prescribers: %s\n" % e)

Parameters

Name

Type

Description

Notes

q

str

Filter prescribers by query. Searches by NPI, first name, last name, practice address street one, practice address city, practice address state.

[optional]

page

int

The page number to return. Defaults to 1.

[optional] [default to 1]

results_per_page

int

The number of results to return per page. Defaults to 10.

[optional] [default to 10]

deep

bool

Whether to return contained objecst for the prescriber or just minimal information. Defaults to false.

[optional] [default to False]

Return type

List[Prescriber]

Authorization

opaque_token

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

HTTP response details

Status code

Description

Response headers

200

A list of all prescribers

* X-Total-Count - Total number of prescriptions available
* X-Page - Current page number
* X-Per-Page - Number of prescriptions per page
* X-Total-Pages - Total number of pages available
* X-Scores - A dictionary of search scores for each prescriber

404

No prescribers found

-

[Back to top] [Back to API list] [Back to Model list] [Back to README]