# rxfoundry.clients.swifty_api.PrescriptionApi
All URIs are relative to */api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_pharmacist_verification**](PrescriptionApi.md#create_pharmacist_verification) | **POST** /swifty/1/prescriptions/{prescription_id}/pv | Create a new prescription verification setting
[**create_prescription_change_request**](PrescriptionApi.md#create_prescription_change_request) | **POST** /swifty/1/prescriptions/{prescription_id}/change_requests | Create a new prescription change request
[**get_prescription**](PrescriptionApi.md#get_prescription) | **GET** /swifty/1/prescriptions/{prescription_id} | Get a prescription by UUID or RxNumber
[**get_prescription_change_requests**](PrescriptionApi.md#get_prescription_change_requests) | **GET** /swifty/1/prescriptions/{prescription_id}/change_requests | Get a list of prescription change requests
[**get_prescriptions**](PrescriptionApi.md#get_prescriptions) | **GET** /swifty/1/prescriptions | Get all prescriptions
[**update_prescription**](PrescriptionApi.md#update_prescription) | **PATCH** /swifty/1/prescriptions/{prescription_id} | Update a prescription by UUID or RxNumber. Only \"patchable\" fields can be updated.
# **create_pharmacist_verification**
> Prescription create_pharmacist_verification(prescription_id, prescription_verification)
Create a new prescription verification setting
### Example
* Bearer (opaque) Authentication (opaque_token):
```python
import rxfoundry.clients.swifty_api
from rxfoundry.clients.swifty_api.models.prescription import Prescription
from rxfoundry.clients.swifty_api.models.prescription_verification import PrescriptionVerification
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.PrescriptionApi(api_client)
prescription_id = 'prescription_id_example' # str |
prescription_verification = rxfoundry.clients.swifty_api.PrescriptionVerification() # PrescriptionVerification |
try:
# Create a new prescription verification setting
api_response = api_instance.create_pharmacist_verification(prescription_id, prescription_verification)
print("The response of PrescriptionApi->create_pharmacist_verification:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PrescriptionApi->create_pharmacist_verification: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**prescription_id** | **str**| |
**prescription_verification** | [**PrescriptionVerification**](PrescriptionVerification.md)| |
### Return type
[**Prescription**](Prescription.md)
### Authorization
[opaque_token](../README.md#opaque_token)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | Prescription verification created successfully | - |
**400** | Invalid input | - |
**404** | Prescription not found | - |
**409** | Prescription verification already exists | - |
[[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)
# **create_prescription_change_request**
> List[PrescriptionChangeRequest] create_prescription_change_request(prescription_id, prescription_change_request=prescription_change_request)
Create a new prescription change request
### Example
* Bearer (opaque) Authentication (opaque_token):
```python
import rxfoundry.clients.swifty_api
from rxfoundry.clients.swifty_api.models.prescription_change_request import PrescriptionChangeRequest
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.PrescriptionApi(api_client)
prescription_id = 'prescription_id_example' # str |
prescription_change_request = rxfoundry.clients.swifty_api.PrescriptionChangeRequest() # PrescriptionChangeRequest | (optional)
try:
# Create a new prescription change request
api_response = api_instance.create_prescription_change_request(prescription_id, prescription_change_request=prescription_change_request)
print("The response of PrescriptionApi->create_prescription_change_request:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PrescriptionApi->create_prescription_change_request: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**prescription_id** | **str**| |
**prescription_change_request** | [**PrescriptionChangeRequest**](PrescriptionChangeRequest.md)| | [optional]
### Return type
[**List[PrescriptionChangeRequest]**](PrescriptionChangeRequest.md)
### Authorization
[opaque_token](../README.md#opaque_token)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | Prescription change request created successfully | - |
**400** | Invalid input | - |
**404** | Prescription not found | - |
**409** | Prescription change request already exists | - |
[[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_prescription**
> Prescription get_prescription(prescription_id, deep=deep)
Get a prescription by UUID or RxNumber
### Example
* Bearer (opaque) Authentication (opaque_token):
```python
import rxfoundry.clients.swifty_api
from rxfoundry.clients.swifty_api.models.prescription import Prescription
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.PrescriptionApi(api_client)
prescription_id = 'prescription_id_example' # str |
deep = False # bool | (optional) (default to False)
try:
# Get a prescription by UUID or RxNumber
api_response = api_instance.get_prescription(prescription_id, deep=deep)
print("The response of PrescriptionApi->get_prescription:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PrescriptionApi->get_prescription: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**prescription_id** | **str**| |
**deep** | **bool**| | [optional] [default to False]
### Return type
[**Prescription**](Prescription.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 prescription | - |
**404** | No prescription 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_prescription_change_requests**
> List[PrescriptionChangeRequest] get_prescription_change_requests(prescription_id)
Get a list of prescription change requests
### Example
* Bearer (opaque) Authentication (opaque_token):
```python
import rxfoundry.clients.swifty_api
from rxfoundry.clients.swifty_api.models.prescription_change_request import PrescriptionChangeRequest
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.PrescriptionApi(api_client)
prescription_id = 'prescription_id_example' # str |
try:
# Get a list of prescription change requests
api_response = api_instance.get_prescription_change_requests(prescription_id)
print("The response of PrescriptionApi->get_prescription_change_requests:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PrescriptionApi->get_prescription_change_requests: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**prescription_id** | **str**| |
### Return type
[**List[PrescriptionChangeRequest]**](PrescriptionChangeRequest.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 prescription change request | - |
**404** | No prescription change requests 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_prescriptions**
> List[Prescription] get_prescriptions(rx_number=rx_number, virtual_pharmacy_uuid=virtual_pharmacy_uuid, patient_uuid=patient_uuid, prescriber_uuid=prescriber_uuid, medication_uuid=medication_uuid, extra_filter=extra_filter, page=page, results_per_page=results_per_page, deep=deep)
Get all prescriptions
### Example
* Bearer (opaque) Authentication (opaque_token):
```python
import rxfoundry.clients.swifty_api
from rxfoundry.clients.swifty_api.models.prescription import Prescription
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.PrescriptionApi(api_client)
rx_number = 'rx_number_example' # str | Filter prescriptions by RX number (optional)
virtual_pharmacy_uuid = 'virtual_pharmacy_uuid_example' # str | Filter prescriptions by virtual pharmacy UUID (optional)
patient_uuid = 'patient_uuid_example' # str | Filter prescriptions by patient UUID (optional)
prescriber_uuid = 'prescriber_uuid_example' # str | Filter prescriptions by prescriber UUID (optional)
medication_uuid = 'medication_uuid_example' # str | Filter prescriptions by medication UUID (optional)
extra_filter = ['extra_filter_example'] # List[str] | (optional)
page = 1 # int | (optional) (default to 1)
results_per_page = 10 # int | (optional) (default to 10)
deep = False # bool | (optional) (default to False)
try:
# Get all prescriptions
api_response = api_instance.get_prescriptions(rx_number=rx_number, virtual_pharmacy_uuid=virtual_pharmacy_uuid, patient_uuid=patient_uuid, prescriber_uuid=prescriber_uuid, medication_uuid=medication_uuid, extra_filter=extra_filter, page=page, results_per_page=results_per_page, deep=deep)
print("The response of PrescriptionApi->get_prescriptions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PrescriptionApi->get_prescriptions: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**rx_number** | **str**| Filter prescriptions by RX number | [optional]
**virtual_pharmacy_uuid** | **str**| Filter prescriptions by virtual pharmacy UUID | [optional]
**patient_uuid** | **str**| Filter prescriptions by patient UUID | [optional]
**prescriber_uuid** | **str**| Filter prescriptions by prescriber UUID | [optional]
**medication_uuid** | **str**| Filter prescriptions by medication UUID | [optional]
**extra_filter** | [**List[str]**](str.md)| | [optional]
**page** | **int**| | [optional] [default to 1]
**results_per_page** | **int**| | [optional] [default to 10]
**deep** | **bool**| | [optional] [default to False]
### Return type
[**List[Prescription]**](Prescription.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 prescriptions | * 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
|
**404** | No prescriptions 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)
# **update_prescription**
> Prescription update_prescription(prescription_id, prescription_patch=prescription_patch)
Update a prescription by UUID or RxNumber. Only \"patchable\" fields can be updated.
### Example
* Bearer (opaque) Authentication (opaque_token):
```python
import rxfoundry.clients.swifty_api
from rxfoundry.clients.swifty_api.models.prescription import Prescription
from rxfoundry.clients.swifty_api.models.prescription_patch import PrescriptionPatch
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.PrescriptionApi(api_client)
prescription_id = 'prescription_id_example' # str |
prescription_patch = rxfoundry.clients.swifty_api.PrescriptionPatch() # PrescriptionPatch | (optional)
try:
# Update a prescription by UUID or RxNumber. Only \"patchable\" fields can be updated.
api_response = api_instance.update_prescription(prescription_id, prescription_patch=prescription_patch)
print("The response of PrescriptionApi->update_prescription:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PrescriptionApi->update_prescription: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**prescription_id** | **str**| |
**prescription_patch** | [**PrescriptionPatch**](PrescriptionPatch.md)| | [optional]
### Return type
[**Prescription**](Prescription.md)
### Authorization
[opaque_token](../README.md#opaque_token)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | Prescription updated successfully | - |
**404** | No prescription found | - |
**422** | Unprocessable Entity | - |
[[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)