# rxfoundry.clients.swifty_api.PatientApi All URIs are relative to */api* Method | HTTP request | Description ------------- | ------------- | ------------- [**get_patient**](PatientApi.md#get_patient) | **GET** /swifty/1/patients/{patient_uuid} | Get patient by uuid [**get_patient_pharmacies**](PatientApi.md#get_patient_pharmacies) | **GET** /swifty/1/patients/{patient_uuid}/pharmacies | Get pharmacies near a patient [**get_patients**](PatientApi.md#get_patients) | **GET** /swifty/1/patients | Get all patients # **get_patient** > Patient get_patient(patient_uuid) Get patient by uuid ### Example * Bearer (opaque) Authentication (opaque_token): ```python import rxfoundry.clients.swifty_api from rxfoundry.clients.swifty_api.models.patient import Patient 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.PatientApi(api_client) patient_uuid = 'patient_uuid_example' # str | try: # Get patient by uuid api_response = api_instance.get_patient(patient_uuid) print("The response of PatientApi->get_patient:\n") pprint(api_response) except Exception as e: print("Exception when calling PatientApi->get_patient: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **patient_uuid** | **str**| | ### Return type [**Patient**](Patient.md) ### Authorization [opaque_token](../README.md#opaque_token) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | A single patient | - | **404** | No patient found | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_patient_pharmacies** > List[Pharmacy] get_patient_pharmacies(patient_uuid, distance=distance, networks=networks, page=page, results_per_page=results_per_page) Get pharmacies near a patient ### Example * Bearer (opaque) Authentication (opaque_token): ```python import rxfoundry.clients.swifty_api from rxfoundry.clients.swifty_api.models.pharmacy import Pharmacy 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.PatientApi(api_client) patient_uuid = 'patient_uuid_example' # str | distance = 10.0 # float | Distance in miles to search for pharmacies (optional) (default to 10.0) networks = ['networks_example'] # List[str] | Filter pharmacies by network(s) using the codes (optional) page = 1 # int | (optional) (default to 1) results_per_page = 10 # int | (optional) (default to 10) try: # Get pharmacies near a patient api_response = api_instance.get_patient_pharmacies(patient_uuid, distance=distance, networks=networks, page=page, results_per_page=results_per_page) print("The response of PatientApi->get_patient_pharmacies:\n") pprint(api_response) except Exception as e: print("Exception when calling PatientApi->get_patient_pharmacies: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **patient_uuid** | **str**| | **distance** | **float**| Distance in miles to search for pharmacies | [optional] [default to 10.0] **networks** | [**List[str]**](str.md)| Filter pharmacies by network(s) using the codes | [optional] **page** | **int**| | [optional] [default to 1] **results_per_page** | **int**| | [optional] [default to 10] ### Return type [**List[Pharmacy]**](Pharmacy.md) ### Authorization [opaque_token](../README.md#opaque_token) ### HTTP request headers - **Content-Type**: Not defined - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| **200** | Pharmacies near a patient | - | **404** | No patient found | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **get_patients** > List[Patient] get_patients(q=q, external_id=external_id, uuid_list=uuid_list, page=page, results_per_page=results_per_page, deep=deep) Get all patients ### Example * Bearer (opaque) Authentication (opaque_token): ```python import rxfoundry.clients.swifty_api from rxfoundry.clients.swifty_api.models.patient import Patient 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.PatientApi(api_client) q = 'q_example' # str | Filter patients by query. This takes precedence if set over remaining filters. Searches on first name, last name, date of birth (yyyy-mm-dd), home address and phone numbers in (555) 555-5555 format. (optional) external_id = 'external_id_example' # str | An external id to find the patient by. Format is {slug}:{external_id}. This takes precedence if set over remaining filters, but not used if q is set. (optional) uuid_list = ['uuid_list_example'] # List[str] | A list of uuid strings to filter by. Only used if q and external_id are not set. (optional) page = 1 # int | Page number to return. Defaults to 1. (optional) (default to 1) results_per_page = 10 # int | Number of results to return per page. Defaults to 10. (optional) (default to 10) deep = False # bool | If true, returns contained objects for the patient. If false, returns only the minimum fields. Defaults to false. (optional) (default to False) try: # Get all patients api_response = api_instance.get_patients(q=q, external_id=external_id, uuid_list=uuid_list, page=page, results_per_page=results_per_page, deep=deep) print("The response of PatientApi->get_patients:\n") pprint(api_response) except Exception as e: print("Exception when calling PatientApi->get_patients: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **q** | **str**| Filter patients by query. This takes precedence if set over remaining filters. Searches on first name, last name, date of birth (yyyy-mm-dd), home address and phone numbers in (555) 555-5555 format. | [optional] **external_id** | **str**| An external id to find the patient by. Format is {slug}:{external_id}. This takes precedence if set over remaining filters, but not used if q is set. | [optional] **uuid_list** | [**List[str]**](str.md)| A list of uuid strings to filter by. Only used if q and external_id are not set. | [optional] **page** | **int**| Page number to return. Defaults to 1. | [optional] [default to 1] **results_per_page** | **int**| Number of results to return per page. Defaults to 10. | [optional] [default to 10] **deep** | **bool**| If true, returns contained objects for the patient. If false, returns only the minimum fields. Defaults to false. | [optional] [default to False] ### Return type [**List[Patient]**](Patient.md) ### Authorization [opaque_token](../README.md#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 patients | * 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 patients found | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)