rxfoundry.clients.swifty_api.PrescriptionApi

All URIs are relative to /api

Method

HTTP request

Description

create_pharmacist_verification

POST /swifty/1/prescriptions/{prescription_id}/pv

Create a new prescription verification setting

get_prescription

GET /swifty/1/prescriptions/{prescription_id}

Get a prescription by UUID or RxNumber

get_prescription_change_requests

GET /swifty/1/prescriptions/{prescription_id}/change_requests

Get all prescription change requests for a prescription

get_prescriptions

GET /swifty/1/prescriptions

Get all prescriptions

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):

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

Return type

Prescription

Authorization

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] [Back to Model list] [Back to README]

get_prescription

Prescription get_prescription(prescription_id, deep=deep)

Get a prescription by UUID or RxNumber

Example

  • Bearer (opaque) Authentication (opaque_token):

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

Authorization

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] [Back to Model list] [Back to README]

get_prescription_change_requests

List[PrescriptionChangeRequestAndResponse] get_prescription_change_requests(prescription_id, status=status)

Get all prescription change requests for a prescription

Example

  • Bearer (opaque) Authentication (opaque_token):

import rxfoundry.clients.swifty_api
from rxfoundry.clients.swifty_api.models.prescription_change_request_and_response import PrescriptionChangeRequestAndResponse
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 | 
    status = 'status_example' # str | Whether the message has been completed or not (optional)

    try:
        # Get all prescription change requests for a prescription
        api_response = api_instance.get_prescription_change_requests(prescription_id, status=status)
        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

status

str

Whether the message has been completed or not

[optional]

Return type

List[PrescriptionChangeRequestAndResponse]

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 prescription change requests for the prescription

-

400

Invalid input

-

404

Prescription not found

-

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

get_prescriptions

List[Prescription] get_prescriptions(rx_number=rx_number, external_id=external_id, 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):

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.  This takes precedence over all other prescription identifying fields if set. (optional)
    external_id = 'external_id_example' # str | An external id to find the prescription by.  Format is {slug}:{external_id}. (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] | Filter prescriptions by flags: - `needs_pv0` - needs pv0 verification.  pv0 is a review that is meant to approximate a pv1 review.  It is not a standard board of pharmacy workflow step. - `needs_pv1` - needs pv1 verification.  pv1 is a review to ensure the prescription is accurate and that there are no adverse effects for the patient to take the medication based upon data provided by the patient (current medications, pregnacy status, allergies, current conditions).  This is a standard board of pharmacy prescription workflow step. - `needs_pv2` - needs pv2 verification.  pv2 is a final review to make sure the right medication has been dispensed to the patient in the correct quantity.  This is a standard board of pharmacy prescription workflow step. - `needs_patient` - prescription has no matched patient - `has_open_issues` - issues have been flagged for the prescription that need to be reviewed - `has_pv0` - prescription has been verified at pv0 level - `has_pv1` - prescription has been verified at pv1 level - `has_pv2` - prescription has been verified at pv2 level - `has_patient` - patient has been successfully matched to the prescription - `notified` - a notification has been sent to the patient portal for this prescription - `not_notified` - a notification has not been sent to the patient portal for this prescription - `on_formulary` - prescription is on the formulary for the virtual pharmacy - `not_on_formulary` - prescription is not on the formulary for the virtual pharmacy - `transferred` - the prescription has been transferred to a dispensing pharmacy - `not_transferred` - the prescription has not been transferred to a dispensing pharmacy - `transfer_requested` - the prescription has been requested to be transferred to a dispensing pharmacy, but has not yet transferred - `open_change_request` - a change request has been requested for this prescription, but has not yet completed - `approved_change_request` - the most recent change request has been approved for this prescription - `denied_change_request` - the most recent change request has been denied for this prescription  (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, external_id=external_id, 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. This takes precedence over all other prescription identifying fields if set.

[optional]

external_id

str

An external id to find the prescription by. Format is {slug}:{external_id}.

[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]

Filter prescriptions by flags: - `needs_pv0` - needs pv0 verification. pv0 is a review that is meant to approximate a pv1 review. It is not a standard board of pharmacy workflow step. - `needs_pv1` - needs pv1 verification. pv1 is a review to ensure the prescription is accurate and that there are no adverse effects for the patient to take the medication based upon data provided by the patient (current medications, pregnacy status, allergies, current conditions). This is a standard board of pharmacy prescription workflow step. - `needs_pv2` - needs pv2 verification. pv2 is a final review to make sure the right medication has been dispensed to the patient in the correct quantity. This is a standard board of pharmacy prescription workflow step. - `needs_patient` - prescription has no matched patient - `has_open_issues` - issues have been flagged for the prescription that need to be reviewed - `has_pv0` - prescription has been verified at pv0 level - `has_pv1` - prescription has been verified at pv1 level - `has_pv2` - prescription has been verified at pv2 level - `has_patient` - patient has been successfully matched to the prescription - `notified` - a notification has been sent to the patient portal for this prescription - `not_notified` - a notification has not been sent to the patient portal for this prescription - `on_formulary` - prescription is on the formulary for the virtual pharmacy - `not_on_formulary` - prescription is not on the formulary for the virtual pharmacy - `transferred` - the prescription has been transferred to a dispensing pharmacy - `not_transferred` - the prescription has not been transferred to a dispensing pharmacy - `transfer_requested` - the prescription has been requested to be transferred to a dispensing pharmacy, but has not yet transferred - `open_change_request` - a change request has been requested for this prescription, but has not yet completed - `approved_change_request` - the most recent change request has been approved for this prescription - `denied_change_request` - the most recent change request has been denied for this prescription

[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]

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 prescriptions

* X-Total-Count - Total number of workflows available
* X-Page - Current page number
* X-Per-Page - Number of workflows per page
* X-Total-Pages - Total number of pages available

404

No prescriptions found

-

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

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):

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

[optional]

Return type

Prescription

Authorization

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] [Back to Model list] [Back to README]