# rxfoundry.clients.swifty_api.AsyncApi All URIs are relative to */api* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_async_prescription**](AsyncApi.md#create_async_prescription) | **POST** /swifty/1/async/prescription | Create a new prescription that will be processed asynchronously. [**create_patient_activity**](AsyncApi.md#create_patient_activity) | **POST** /swifty/1/async/patient_activity | Receive notification of patient data activity from an external system. This will be processed asynchronously. [**create_prescription_transfer_request**](AsyncApi.md#create_prescription_transfer_request) | **POST** /swifty/1/async/prescription/request_transfer | Create a new prescription transfer request that will be processed asynchronously. [**create_workflow_request**](AsyncApi.md#create_workflow_request) | **POST** /swifty/1/async/workflow/request | Create a new workflow request that will be processed asynchronously. Only use this endpoint if instructed to do so by Swifty support team. [**get_async_prescription**](AsyncApi.md#get_async_prescription) | **GET** /swifty/1/async/prescription/{message_id} | Check the processing status of a previously submitted prescription [**get_async_prescriptions**](AsyncApi.md#get_async_prescriptions) | **GET** /swifty/1/async/prescription | Get all prescriptions that have been processed asynchronously [**get_patient_activity**](AsyncApi.md#get_patient_activity) | **GET** /swifty/1/async/patient_activity/{message_id} | Check the processing status of a previously submitted patient activity # **create_async_prescription** > AsynchronousResponse create_async_prescription(prescription_data) Create a new prescription that will be processed asynchronously. ### Example * Bearer (opaque) Authentication (opaque_token): ```python import rxfoundry.clients.swifty_api from rxfoundry.clients.swifty_api.models.asynchronous_response import AsynchronousResponse from rxfoundry.clients.swifty_api.models.prescription_data import PrescriptionData 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.AsyncApi(api_client) prescription_data = rxfoundry.clients.swifty_api.PrescriptionData() # PrescriptionData | try: # Create a new prescription that will be processed asynchronously. api_response = api_instance.create_async_prescription(prescription_data) print("The response of AsyncApi->create_async_prescription:\n") pprint(api_response) except Exception as e: print("Exception when calling AsyncApi->create_async_prescription: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **prescription_data** | [**PrescriptionData**](PrescriptionData.md)| | ### Return type [**AsynchronousResponse**](AsynchronousResponse.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** | Event created successfully | - | **400** | Invalid input | - | [[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_patient_activity** > AsynchronousResponse create_patient_activity(patient_activity_notification) Receive notification of patient data activity from an external system. This will be processed asynchronously. ### Example * Bearer (opaque) Authentication (opaque_token): ```python import rxfoundry.clients.swifty_api from rxfoundry.clients.swifty_api.models.asynchronous_response import AsynchronousResponse from rxfoundry.clients.swifty_api.models.patient_activity_notification import PatientActivityNotification 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.AsyncApi(api_client) patient_activity_notification = rxfoundry.clients.swifty_api.PatientActivityNotification() # PatientActivityNotification | try: # Receive notification of patient data activity from an external system. This will be processed asynchronously. api_response = api_instance.create_patient_activity(patient_activity_notification) print("The response of AsyncApi->create_patient_activity:\n") pprint(api_response) except Exception as e: print("Exception when calling AsyncApi->create_patient_activity: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **patient_activity_notification** | [**PatientActivityNotification**](PatientActivityNotification.md)| | ### Return type [**AsynchronousResponse**](AsynchronousResponse.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** | Event created successfully | - | **400** | Invalid input | - | [[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_transfer_request** > AsynchronousResponse create_prescription_transfer_request(prescription_transfer_request) Create a new prescription transfer request that will be processed asynchronously. ### Example * Bearer (opaque) Authentication (opaque_token): ```python import rxfoundry.clients.swifty_api from rxfoundry.clients.swifty_api.models.asynchronous_response import AsynchronousResponse from rxfoundry.clients.swifty_api.models.prescription_transfer_request import PrescriptionTransferRequest 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.AsyncApi(api_client) prescription_transfer_request = rxfoundry.clients.swifty_api.PrescriptionTransferRequest() # PrescriptionTransferRequest | try: # Create a new prescription transfer request that will be processed asynchronously. api_response = api_instance.create_prescription_transfer_request(prescription_transfer_request) print("The response of AsyncApi->create_prescription_transfer_request:\n") pprint(api_response) except Exception as e: print("Exception when calling AsyncApi->create_prescription_transfer_request: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **prescription_transfer_request** | [**PrescriptionTransferRequest**](PrescriptionTransferRequest.md)| | ### Return type [**AsynchronousResponse**](AsynchronousResponse.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** | Event created successfully | - | **400** | Invalid input | - | [[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_workflow_request** > AsynchronousResponse create_workflow_request(workflow_request) Create a new workflow request that will be processed asynchronously. Only use this endpoint if instructed to do so by Swifty support team. ### Example * Bearer (opaque) Authentication (opaque_token): ```python import rxfoundry.clients.swifty_api from rxfoundry.clients.swifty_api.models.asynchronous_response import AsynchronousResponse from rxfoundry.clients.swifty_api.models.workflow_request import WorkflowRequest 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.AsyncApi(api_client) workflow_request = rxfoundry.clients.swifty_api.WorkflowRequest() # WorkflowRequest | try: # Create a new workflow request that will be processed asynchronously. Only use this endpoint if instructed to do so by Swifty support team. api_response = api_instance.create_workflow_request(workflow_request) print("The response of AsyncApi->create_workflow_request:\n") pprint(api_response) except Exception as e: print("Exception when calling AsyncApi->create_workflow_request: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **workflow_request** | [**WorkflowRequest**](WorkflowRequest.md)| | ### Return type [**AsynchronousResponse**](AsynchronousResponse.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** | Event created successfully | - | **400** | Invalid input | - | [[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_async_prescription** > PrescriptionData get_async_prescription(message_id, deep=deep) Check the processing status of a previously submitted prescription ### Example * Bearer (opaque) Authentication (opaque_token): ```python import rxfoundry.clients.swifty_api from rxfoundry.clients.swifty_api.models.prescription_data import PrescriptionData 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.AsyncApi(api_client) message_id = 'message_id_example' # str | deep = False # bool | (optional) (default to False) try: # Check the processing status of a previously submitted prescription api_response = api_instance.get_async_prescription(message_id, deep=deep) print("The response of AsyncApi->get_async_prescription:\n") pprint(api_response) except Exception as e: print("Exception when calling AsyncApi->get_async_prescription: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **message_id** | **str**| | **deep** | **bool**| | [optional] [default to False] ### Return type [**PrescriptionData**](PrescriptionData.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** | The current processing status | - | **404** | Could not find message with message_id | - | [[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_async_prescriptions** > List[PrescriptionData] get_async_prescriptions(patient_uuid=patient_uuid, pharmacy_uuid=pharmacy_uuid, prescriber_uuid=prescriber_uuid, medication_uuid=medication_uuid, page=page, results_per_page=results_per_page) Get all prescriptions that have been processed asynchronously ### Example * Bearer (opaque) Authentication (opaque_token): ```python import rxfoundry.clients.swifty_api from rxfoundry.clients.swifty_api.models.prescription_data import PrescriptionData 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.AsyncApi(api_client) patient_uuid = 'patient_uuid_example' # str | (optional) pharmacy_uuid = 'pharmacy_uuid_example' # str | (optional) prescriber_uuid = 'prescriber_uuid_example' # str | (optional) medication_uuid = 'medication_uuid_example' # str | (optional) page = 1 # int | (optional) (default to 1) results_per_page = 10 # int | (optional) (default to 10) try: # Get all prescriptions that have been processed asynchronously api_response = api_instance.get_async_prescriptions(patient_uuid=patient_uuid, pharmacy_uuid=pharmacy_uuid, prescriber_uuid=prescriber_uuid, medication_uuid=medication_uuid, page=page, results_per_page=results_per_page) print("The response of AsyncApi->get_async_prescriptions:\n") pprint(api_response) except Exception as e: print("Exception when calling AsyncApi->get_async_prescriptions: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **patient_uuid** | **str**| | [optional] **pharmacy_uuid** | **str**| | [optional] **prescriber_uuid** | **str**| | [optional] **medication_uuid** | **str**| | [optional] **page** | **int**| | [optional] [default to 1] **results_per_page** | **int**| | [optional] [default to 10] ### Return type [**List[PrescriptionData]**](PrescriptionData.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 that have been sent in matching the filters | * 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) # **get_patient_activity** > PatientActivityMessage get_patient_activity(message_id, deep=deep) Check the processing status of a previously submitted patient activity ### Example * Bearer (opaque) Authentication (opaque_token): ```python import rxfoundry.clients.swifty_api from rxfoundry.clients.swifty_api.models.patient_activity_message import PatientActivityMessage 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.AsyncApi(api_client) message_id = 'message_id_example' # str | deep = False # bool | (optional) (default to False) try: # Check the processing status of a previously submitted patient activity api_response = api_instance.get_patient_activity(message_id, deep=deep) print("The response of AsyncApi->get_patient_activity:\n") pprint(api_response) except Exception as e: print("Exception when calling AsyncApi->get_patient_activity: %s\n" % e) ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **message_id** | **str**| | **deep** | **bool**| | [optional] [default to False] ### Return type [**PatientActivityMessage**](PatientActivityMessage.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** | The current processing status | - | **404** | Could not find message with message_id | - | [[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)