rxfoundry.clients.swifty-api 0.0.630__tar.gz → 0.0.632__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/PKG-INFO +1 -1
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/README.md +7 -4
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/pyproject.toml +1 -1
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/__init__.py +3 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/api/async_api.py +9 -9
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/__init__.py +3 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/asynchronous_response.py +14 -4
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/patient_activity_notification.py +17 -17
- rxfoundry_clients_swifty_api-0.0.632/rxfoundry/clients/swifty_api/models/patient_activity_notification_activity_data.py +138 -0
- rxfoundry_clients_swifty_api-0.0.632/rxfoundry/clients/swifty_api/models/patient_address_data.py +98 -0
- rxfoundry_clients_swifty_api-0.0.632/rxfoundry/clients/swifty_api/models/patient_data.py +114 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/prescription_transfer_request.py +7 -8
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/workflow_request.py +5 -5
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry.clients.swifty_api.egg-info/PKG-INFO +1 -1
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry.clients.swifty_api.egg-info/SOURCES.txt +6 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/setup.py +2 -2
- rxfoundry_clients_swifty_api-0.0.632/test/test_patient_activity_notification_activity_data.py +73 -0
- rxfoundry_clients_swifty_api-0.0.632/test/test_patient_address_data.py +57 -0
- rxfoundry_clients_swifty_api-0.0.632/test/test_patient_data.py +67 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/__init__.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/__init__.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/api/__init__.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/api/code_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/api/fax_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/api/medication_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/api/patient_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/api/pharmacist_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/api/pharmacy_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/api/prescriber_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/api/prescription_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/api/token_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/api/user_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/api/version_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/api/virtual_pharmacy_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/api_client.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/api_response.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/configuration.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/exceptions.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/address.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/code.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/code_qualifier_code.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/error_message.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/fax.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/medication.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/medication_program_pricing.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/medication_variant.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/patient.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/patient_external_identifier.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/pharmacist.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/pharmacy.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/pharmacy_chain.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/pharmacy_other_identifier.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/pharmacy_program_pricing.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/prescriber.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/prescription.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/prescription_change_request.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/prescription_issue.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/prescription_patch.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/prescription_task.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/prescription_task_status.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/prescription_verification.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/pricing_program.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/surescripts_message.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/token.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/user.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/version.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/models/virtual_pharmacy.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/py.typed +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry/clients/swifty_api/rest.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry.clients.swifty_api.egg-info/dependency_links.txt +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry.clients.swifty_api.egg-info/requires.txt +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/rxfoundry.clients.swifty_api.egg-info/top_level.txt +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/setup.cfg +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_address.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_async_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_asynchronous_response.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_code.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_code_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_code_qualifier_code.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_error_message.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_fax.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_fax_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_medication.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_medication_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_medication_program_pricing.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_medication_variant.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_patient.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_patient_activity_notification.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_patient_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_patient_external_identifier.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_pharmacist.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_pharmacist_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_pharmacy.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_pharmacy_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_pharmacy_chain.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_pharmacy_other_identifier.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_pharmacy_program_pricing.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_prescriber.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_prescriber_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_prescription.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_prescription_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_prescription_change_request.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_prescription_issue.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_prescription_patch.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_prescription_task.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_prescription_task_status.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_prescription_transfer_request.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_prescription_verification.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_pricing_program.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_surescripts_message.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_token.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_token_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_user.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_user_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_version.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_version_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_virtual_pharmacy.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_virtual_pharmacy_api.py +0 -0
- {rxfoundry_clients_swifty_api-0.0.630 → rxfoundry_clients_swifty_api-0.0.632}/test/test_workflow_request.py +0 -0
|
@@ -80,7 +80,7 @@ with rxfoundry.clients.swifty_api.ApiClient(configuration) as api_client:
|
|
|
80
80
|
patient_activity_notification = rxfoundry.clients.swifty_api.PatientActivityNotification() # PatientActivityNotification |
|
|
81
81
|
|
|
82
82
|
try:
|
|
83
|
-
#
|
|
83
|
+
# Receive notification of patient data activity from an external system. This will be processed asynchronously.
|
|
84
84
|
api_response = api_instance.create_patient_activity(patient_activity_notification)
|
|
85
85
|
print("The response of AsyncApi->create_patient_activity:\n")
|
|
86
86
|
pprint(api_response)
|
|
@@ -95,9 +95,9 @@ All URIs are relative to */api*
|
|
|
95
95
|
|
|
96
96
|
Class | Method | HTTP request | Description
|
|
97
97
|
------------ | ------------- | ------------- | -------------
|
|
98
|
-
*AsyncApi* | [**create_patient_activity**](docs/AsyncApi.md#create_patient_activity) | **POST** /swifty/1/async/patient_activity |
|
|
99
|
-
*AsyncApi* | [**create_prescription_transfer_request**](docs/AsyncApi.md#create_prescription_transfer_request) | **POST** /swifty/1/async/prescription/request_transfer | Create a new prescription transfer request asynchronously
|
|
100
|
-
*AsyncApi* | [**create_workflow_request**](docs/AsyncApi.md#create_workflow_request) | **POST** /swifty/1/async/workflow/request | Create a new workflow request asynchronously
|
|
98
|
+
*AsyncApi* | [**create_patient_activity**](docs/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.
|
|
99
|
+
*AsyncApi* | [**create_prescription_transfer_request**](docs/AsyncApi.md#create_prescription_transfer_request) | **POST** /swifty/1/async/prescription/request_transfer | Create a new prescription transfer request that will be processed asynchronously.
|
|
100
|
+
*AsyncApi* | [**create_workflow_request**](docs/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.
|
|
101
101
|
*CodeApi* | [**get_codes**](docs/CodeApi.md#get_codes) | **GET** /swifty/1/codes | Get all codes for a typename
|
|
102
102
|
*FaxApi* | [**get_fax**](docs/FaxApi.md#get_fax) | **GET** /swifty/1/faxes/{fax_uuid} | Get a fax by ID
|
|
103
103
|
*FaxApi* | [**get_faxes**](docs/FaxApi.md#get_faxes) | **GET** /swifty/1/faxes | Get all faxes
|
|
@@ -137,6 +137,9 @@ Class | Method | HTTP request | Description
|
|
|
137
137
|
- [MedicationVariant](docs/MedicationVariant.md)
|
|
138
138
|
- [Patient](docs/Patient.md)
|
|
139
139
|
- [PatientActivityNotification](docs/PatientActivityNotification.md)
|
|
140
|
+
- [PatientActivityNotificationActivityData](docs/PatientActivityNotificationActivityData.md)
|
|
141
|
+
- [PatientAddressData](docs/PatientAddressData.md)
|
|
142
|
+
- [PatientData](docs/PatientData.md)
|
|
140
143
|
- [PatientExternalIdentifier](docs/PatientExternalIdentifier.md)
|
|
141
144
|
- [Pharmacist](docs/Pharmacist.md)
|
|
142
145
|
- [Pharmacy](docs/Pharmacy.md)
|
|
@@ -55,6 +55,9 @@ from rxfoundry.clients.swifty_api.models.medication_program_pricing import Medic
|
|
|
55
55
|
from rxfoundry.clients.swifty_api.models.medication_variant import MedicationVariant
|
|
56
56
|
from rxfoundry.clients.swifty_api.models.patient import Patient
|
|
57
57
|
from rxfoundry.clients.swifty_api.models.patient_activity_notification import PatientActivityNotification
|
|
58
|
+
from rxfoundry.clients.swifty_api.models.patient_activity_notification_activity_data import PatientActivityNotificationActivityData
|
|
59
|
+
from rxfoundry.clients.swifty_api.models.patient_address_data import PatientAddressData
|
|
60
|
+
from rxfoundry.clients.swifty_api.models.patient_data import PatientData
|
|
58
61
|
from rxfoundry.clients.swifty_api.models.patient_external_identifier import PatientExternalIdentifier
|
|
59
62
|
from rxfoundry.clients.swifty_api.models.pharmacist import Pharmacist
|
|
60
63
|
from rxfoundry.clients.swifty_api.models.pharmacy import Pharmacy
|
|
@@ -57,7 +57,7 @@ class AsyncApi:
|
|
|
57
57
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
58
58
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
59
59
|
) -> AsynchronousResponse:
|
|
60
|
-
"""
|
|
60
|
+
"""Receive notification of patient data activity from an external system. This will be processed asynchronously.
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
:param patient_activity_notification: (required)
|
|
@@ -124,7 +124,7 @@ class AsyncApi:
|
|
|
124
124
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
125
125
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
126
126
|
) -> ApiResponse[AsynchronousResponse]:
|
|
127
|
-
"""
|
|
127
|
+
"""Receive notification of patient data activity from an external system. This will be processed asynchronously.
|
|
128
128
|
|
|
129
129
|
|
|
130
130
|
:param patient_activity_notification: (required)
|
|
@@ -191,7 +191,7 @@ class AsyncApi:
|
|
|
191
191
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
192
192
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
193
193
|
) -> RESTResponseType:
|
|
194
|
-
"""
|
|
194
|
+
"""Receive notification of patient data activity from an external system. This will be processed asynchronously.
|
|
195
195
|
|
|
196
196
|
|
|
197
197
|
:param patient_activity_notification: (required)
|
|
@@ -331,7 +331,7 @@ class AsyncApi:
|
|
|
331
331
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
332
332
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
333
333
|
) -> AsynchronousResponse:
|
|
334
|
-
"""Create a new prescription transfer request asynchronously
|
|
334
|
+
"""Create a new prescription transfer request that will be processed asynchronously.
|
|
335
335
|
|
|
336
336
|
|
|
337
337
|
:param prescription_transfer_request: (required)
|
|
@@ -398,7 +398,7 @@ class AsyncApi:
|
|
|
398
398
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
399
399
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
400
400
|
) -> ApiResponse[AsynchronousResponse]:
|
|
401
|
-
"""Create a new prescription transfer request asynchronously
|
|
401
|
+
"""Create a new prescription transfer request that will be processed asynchronously.
|
|
402
402
|
|
|
403
403
|
|
|
404
404
|
:param prescription_transfer_request: (required)
|
|
@@ -465,7 +465,7 @@ class AsyncApi:
|
|
|
465
465
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
466
466
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
467
467
|
) -> RESTResponseType:
|
|
468
|
-
"""Create a new prescription transfer request asynchronously
|
|
468
|
+
"""Create a new prescription transfer request that will be processed asynchronously.
|
|
469
469
|
|
|
470
470
|
|
|
471
471
|
:param prescription_transfer_request: (required)
|
|
@@ -605,7 +605,7 @@ class AsyncApi:
|
|
|
605
605
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
606
606
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
607
607
|
) -> AsynchronousResponse:
|
|
608
|
-
"""Create a new workflow request asynchronously
|
|
608
|
+
"""Create a new workflow request that will be processed asynchronously. Only use this endpoint if instructed to do so by Swifty support team.
|
|
609
609
|
|
|
610
610
|
|
|
611
611
|
:param workflow_request: (required)
|
|
@@ -672,7 +672,7 @@ class AsyncApi:
|
|
|
672
672
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
673
673
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
674
674
|
) -> ApiResponse[AsynchronousResponse]:
|
|
675
|
-
"""Create a new workflow request asynchronously
|
|
675
|
+
"""Create a new workflow request that will be processed asynchronously. Only use this endpoint if instructed to do so by Swifty support team.
|
|
676
676
|
|
|
677
677
|
|
|
678
678
|
:param workflow_request: (required)
|
|
@@ -739,7 +739,7 @@ class AsyncApi:
|
|
|
739
739
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
740
740
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
741
741
|
) -> RESTResponseType:
|
|
742
|
-
"""Create a new workflow request asynchronously
|
|
742
|
+
"""Create a new workflow request that will be processed asynchronously. Only use this endpoint if instructed to do so by Swifty support team.
|
|
743
743
|
|
|
744
744
|
|
|
745
745
|
:param workflow_request: (required)
|
|
@@ -26,6 +26,9 @@ from rxfoundry.clients.swifty_api.models.medication_program_pricing import Medic
|
|
|
26
26
|
from rxfoundry.clients.swifty_api.models.medication_variant import MedicationVariant
|
|
27
27
|
from rxfoundry.clients.swifty_api.models.patient import Patient
|
|
28
28
|
from rxfoundry.clients.swifty_api.models.patient_activity_notification import PatientActivityNotification
|
|
29
|
+
from rxfoundry.clients.swifty_api.models.patient_activity_notification_activity_data import PatientActivityNotificationActivityData
|
|
30
|
+
from rxfoundry.clients.swifty_api.models.patient_address_data import PatientAddressData
|
|
31
|
+
from rxfoundry.clients.swifty_api.models.patient_data import PatientData
|
|
29
32
|
from rxfoundry.clients.swifty_api.models.patient_external_identifier import PatientExternalIdentifier
|
|
30
33
|
from rxfoundry.clients.swifty_api.models.pharmacist import Pharmacist
|
|
31
34
|
from rxfoundry.clients.swifty_api.models.pharmacy import Pharmacy
|
|
@@ -18,19 +18,29 @@ import pprint
|
|
|
18
18
|
import re # noqa: F401
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
23
|
from typing import Optional, Set
|
|
24
24
|
from typing_extensions import Self
|
|
25
25
|
|
|
26
26
|
class AsynchronousResponse(BaseModel):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
A response from an asynchronous request with a message identifier that can be used to query the status of the request
|
|
29
29
|
""" # noqa: E501
|
|
30
|
-
status: Optional[StrictStr] = None
|
|
31
|
-
message_id: Optional[StrictStr] = None
|
|
30
|
+
status: Optional[StrictStr] = Field(default=None, description="The status of the receipt of the request. Note this is not the status of the request itself")
|
|
31
|
+
message_id: Optional[StrictStr] = Field(default=None, description="The identifier for the request that can be later used to query the status of the request")
|
|
32
32
|
__properties: ClassVar[List[str]] = ["status", "message_id"]
|
|
33
33
|
|
|
34
|
+
@field_validator('status')
|
|
35
|
+
def status_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value is None:
|
|
38
|
+
return value
|
|
39
|
+
|
|
40
|
+
if value not in set(['SUCCESS', 'FAILURE']):
|
|
41
|
+
raise ValueError("must be one of enum values ('SUCCESS', 'FAILURE')")
|
|
42
|
+
return value
|
|
43
|
+
|
|
34
44
|
model_config = ConfigDict(
|
|
35
45
|
populate_by_name=True,
|
|
36
46
|
validate_assignment=True,
|
|
@@ -18,37 +18,33 @@ import pprint
|
|
|
18
18
|
import re # noqa: F401
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
|
-
from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from rxfoundry.clients.swifty_api.models.patient_activity_notification_activity_data import PatientActivityNotificationActivityData
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
26
27
|
class PatientActivityNotification(BaseModel):
|
|
27
28
|
"""
|
|
28
|
-
|
|
29
|
+
A notification that a patient or its related information has been created, updated, or deleted
|
|
29
30
|
""" # noqa: E501
|
|
30
|
-
|
|
31
|
-
external_system_slug:
|
|
32
|
-
object_type:
|
|
33
|
-
action:
|
|
34
|
-
|
|
31
|
+
external_patient_id: StrictStr = Field(description="The identifier for the patient in the context of the external system")
|
|
32
|
+
external_system_slug: StrictStr = Field(description="The identifier for the external system that is managing the patient record")
|
|
33
|
+
object_type: StrictStr = Field(description="The type of object that was created, updated, or deleted")
|
|
34
|
+
action: StrictStr = Field(description="The action that was taken on the object")
|
|
35
|
+
activity_data: Optional[PatientActivityNotificationActivityData] = None
|
|
36
|
+
__properties: ClassVar[List[str]] = ["external_patient_id", "external_system_slug", "object_type", "action", "activity_data"]
|
|
35
37
|
|
|
36
38
|
@field_validator('object_type')
|
|
37
39
|
def object_type_validate_enum(cls, value):
|
|
38
40
|
"""Validates the enum"""
|
|
39
|
-
if value
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if value not in set(['patient', 'insurance', 'allergies', 'conditions', 'medications']):
|
|
43
|
-
raise ValueError("must be one of enum values ('patient', 'insurance', 'allergies', 'conditions', 'medications')")
|
|
41
|
+
if value not in set(['patient', 'address', 'insurance', 'allergies', 'conditions', 'medications']):
|
|
42
|
+
raise ValueError("must be one of enum values ('patient', 'address', 'insurance', 'allergies', 'conditions', 'medications')")
|
|
44
43
|
return value
|
|
45
44
|
|
|
46
45
|
@field_validator('action')
|
|
47
46
|
def action_validate_enum(cls, value):
|
|
48
47
|
"""Validates the enum"""
|
|
49
|
-
if value is None:
|
|
50
|
-
return value
|
|
51
|
-
|
|
52
48
|
if value not in set(['created', 'updated', 'deleted']):
|
|
53
49
|
raise ValueError("must be one of enum values ('created', 'updated', 'deleted')")
|
|
54
50
|
return value
|
|
@@ -92,6 +88,9 @@ class PatientActivityNotification(BaseModel):
|
|
|
92
88
|
exclude=excluded_fields,
|
|
93
89
|
exclude_none=True,
|
|
94
90
|
)
|
|
91
|
+
# override the default output from pydantic by calling `to_dict()` of activity_data
|
|
92
|
+
if self.activity_data:
|
|
93
|
+
_dict['activity_data'] = self.activity_data.to_dict()
|
|
95
94
|
return _dict
|
|
96
95
|
|
|
97
96
|
@classmethod
|
|
@@ -104,10 +103,11 @@ class PatientActivityNotification(BaseModel):
|
|
|
104
103
|
return cls.model_validate(obj)
|
|
105
104
|
|
|
106
105
|
_obj = cls.model_validate({
|
|
107
|
-
"
|
|
106
|
+
"external_patient_id": obj.get("external_patient_id"),
|
|
108
107
|
"external_system_slug": obj.get("external_system_slug"),
|
|
109
108
|
"object_type": obj.get("object_type"),
|
|
110
|
-
"action": obj.get("action")
|
|
109
|
+
"action": obj.get("action"),
|
|
110
|
+
"activity_data": PatientActivityNotificationActivityData.from_dict(obj["activity_data"]) if obj.get("activity_data") is not None else None
|
|
111
111
|
})
|
|
112
112
|
return _obj
|
|
113
113
|
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
SwiftyRX API
|
|
5
|
+
|
|
6
|
+
API for the SwiftyRX Backend
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.DEV-0
|
|
9
|
+
Contact: paul.tindall@rxfoundry.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import json
|
|
18
|
+
import pprint
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
20
|
+
from typing import Any, List, Optional
|
|
21
|
+
from rxfoundry.clients.swifty_api.models.patient_address_data import PatientAddressData
|
|
22
|
+
from rxfoundry.clients.swifty_api.models.patient_data import PatientData
|
|
23
|
+
from pydantic import StrictStr, Field
|
|
24
|
+
from typing import Union, List, Set, Optional, Dict
|
|
25
|
+
from typing_extensions import Literal, Self
|
|
26
|
+
|
|
27
|
+
PATIENTACTIVITYNOTIFICATIONACTIVITYDATA_ONE_OF_SCHEMAS = ["PatientAddressData", "PatientData"]
|
|
28
|
+
|
|
29
|
+
class PatientActivityNotificationActivityData(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
PatientActivityNotificationActivityData
|
|
32
|
+
"""
|
|
33
|
+
# data type: PatientData
|
|
34
|
+
oneof_schema_1_validator: Optional[PatientData] = None
|
|
35
|
+
# data type: PatientAddressData
|
|
36
|
+
oneof_schema_2_validator: Optional[PatientAddressData] = None
|
|
37
|
+
actual_instance: Optional[Union[PatientAddressData, PatientData]] = None
|
|
38
|
+
one_of_schemas: Set[str] = { "PatientAddressData", "PatientData" }
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
47
|
+
if args:
|
|
48
|
+
if len(args) > 1:
|
|
49
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
50
|
+
if kwargs:
|
|
51
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
52
|
+
super().__init__(actual_instance=args[0])
|
|
53
|
+
else:
|
|
54
|
+
super().__init__(**kwargs)
|
|
55
|
+
|
|
56
|
+
@field_validator('actual_instance')
|
|
57
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
58
|
+
instance = PatientActivityNotificationActivityData.model_construct()
|
|
59
|
+
error_messages = []
|
|
60
|
+
match = 0
|
|
61
|
+
# validate data type: PatientData
|
|
62
|
+
if not isinstance(v, PatientData):
|
|
63
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `PatientData`")
|
|
64
|
+
else:
|
|
65
|
+
match += 1
|
|
66
|
+
# validate data type: PatientAddressData
|
|
67
|
+
if not isinstance(v, PatientAddressData):
|
|
68
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `PatientAddressData`")
|
|
69
|
+
else:
|
|
70
|
+
match += 1
|
|
71
|
+
if match > 1:
|
|
72
|
+
# more than 1 match
|
|
73
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in PatientActivityNotificationActivityData with oneOf schemas: PatientAddressData, PatientData. Details: " + ", ".join(error_messages))
|
|
74
|
+
elif match == 0:
|
|
75
|
+
# no match
|
|
76
|
+
raise ValueError("No match found when setting `actual_instance` in PatientActivityNotificationActivityData with oneOf schemas: PatientAddressData, PatientData. Details: " + ", ".join(error_messages))
|
|
77
|
+
else:
|
|
78
|
+
return v
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
82
|
+
return cls.from_json(json.dumps(obj))
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_json(cls, json_str: str) -> Self:
|
|
86
|
+
"""Returns the object represented by the json string"""
|
|
87
|
+
instance = cls.model_construct()
|
|
88
|
+
error_messages = []
|
|
89
|
+
match = 0
|
|
90
|
+
|
|
91
|
+
# deserialize data into PatientData
|
|
92
|
+
try:
|
|
93
|
+
instance.actual_instance = PatientData.from_json(json_str)
|
|
94
|
+
match += 1
|
|
95
|
+
except (ValidationError, ValueError) as e:
|
|
96
|
+
error_messages.append(str(e))
|
|
97
|
+
# deserialize data into PatientAddressData
|
|
98
|
+
try:
|
|
99
|
+
instance.actual_instance = PatientAddressData.from_json(json_str)
|
|
100
|
+
match += 1
|
|
101
|
+
except (ValidationError, ValueError) as e:
|
|
102
|
+
error_messages.append(str(e))
|
|
103
|
+
|
|
104
|
+
if match > 1:
|
|
105
|
+
# more than 1 match
|
|
106
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into PatientActivityNotificationActivityData with oneOf schemas: PatientAddressData, PatientData. Details: " + ", ".join(error_messages))
|
|
107
|
+
elif match == 0:
|
|
108
|
+
# no match
|
|
109
|
+
raise ValueError("No match found when deserializing the JSON string into PatientActivityNotificationActivityData with oneOf schemas: PatientAddressData, PatientData. Details: " + ", ".join(error_messages))
|
|
110
|
+
else:
|
|
111
|
+
return instance
|
|
112
|
+
|
|
113
|
+
def to_json(self) -> str:
|
|
114
|
+
"""Returns the JSON representation of the actual instance"""
|
|
115
|
+
if self.actual_instance is None:
|
|
116
|
+
return "null"
|
|
117
|
+
|
|
118
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
119
|
+
return self.actual_instance.to_json()
|
|
120
|
+
else:
|
|
121
|
+
return json.dumps(self.actual_instance)
|
|
122
|
+
|
|
123
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], PatientAddressData, PatientData]]:
|
|
124
|
+
"""Returns the dict representation of the actual instance"""
|
|
125
|
+
if self.actual_instance is None:
|
|
126
|
+
return None
|
|
127
|
+
|
|
128
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
129
|
+
return self.actual_instance.to_dict()
|
|
130
|
+
else:
|
|
131
|
+
# primitive type
|
|
132
|
+
return self.actual_instance
|
|
133
|
+
|
|
134
|
+
def to_str(self) -> str:
|
|
135
|
+
"""Returns the string representation of the actual instance"""
|
|
136
|
+
return pprint.pformat(self.model_dump())
|
|
137
|
+
|
|
138
|
+
|
rxfoundry_clients_swifty_api-0.0.632/rxfoundry/clients/swifty_api/models/patient_address_data.py
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
SwiftyRX API
|
|
5
|
+
|
|
6
|
+
API for the SwiftyRX Backend
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.DEV-0
|
|
9
|
+
Contact: paul.tindall@rxfoundry.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class PatientAddressData(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
PatientAddressData
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
address_line_one: Optional[StrictStr] = Field(default=None, description="The first line of the address")
|
|
31
|
+
address_line_two: Optional[StrictStr] = Field(default=None, description="The second line of the address")
|
|
32
|
+
city: Optional[StrictStr] = Field(default=None, description="The city")
|
|
33
|
+
state_province: Optional[StrictStr] = Field(default=None, description="The state or province using the two alphabetic character abbreviation (e.g. TX, CA, NY)")
|
|
34
|
+
postal_code: Optional[StrictStr] = Field(default=None, description="The postal code in 5 digit format")
|
|
35
|
+
country_code: Optional[StrictStr] = Field(default=None, description="The country code using the two alphabetic character abbreviation (e.g. US, CA, GB)")
|
|
36
|
+
__properties: ClassVar[List[str]] = ["address_line_one", "address_line_two", "city", "state_province", "postal_code", "country_code"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of PatientAddressData from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
return _dict
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
+
"""Create an instance of PatientAddressData from a dict"""
|
|
82
|
+
if obj is None:
|
|
83
|
+
return None
|
|
84
|
+
|
|
85
|
+
if not isinstance(obj, dict):
|
|
86
|
+
return cls.model_validate(obj)
|
|
87
|
+
|
|
88
|
+
_obj = cls.model_validate({
|
|
89
|
+
"address_line_one": obj.get("address_line_one"),
|
|
90
|
+
"address_line_two": obj.get("address_line_two"),
|
|
91
|
+
"city": obj.get("city"),
|
|
92
|
+
"state_province": obj.get("state_province"),
|
|
93
|
+
"postal_code": obj.get("postal_code"),
|
|
94
|
+
"country_code": obj.get("country_code")
|
|
95
|
+
})
|
|
96
|
+
return _obj
|
|
97
|
+
|
|
98
|
+
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
SwiftyRX API
|
|
5
|
+
|
|
6
|
+
API for the SwiftyRX Backend
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 0.1.DEV-0
|
|
9
|
+
Contact: paul.tindall@rxfoundry.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from datetime import date
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class PatientData(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
A patient's data that is used to manage a patient record within Swifty
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
last_name: StrictStr = Field(description="The patient's last name")
|
|
32
|
+
first_name: StrictStr = Field(description="The patient's first name")
|
|
33
|
+
middle_name: Optional[StrictStr] = Field(default=None, description="The patient's middle name")
|
|
34
|
+
suffix: Optional[StrictStr] = Field(default=None, description="The patient's suffix (e.g. Jr., Sr., III)")
|
|
35
|
+
prefix: Optional[StrictStr] = Field(default=None, description="The patient's prefix (e.g. Dr., Mrs., Ms.)")
|
|
36
|
+
gender_assigned_at_birth: StrictStr = Field(description="The gender assigned at birth. ('F' = Female, 'I' = Intersex, 'M' = Male, 'U' = Unspecified or Unknown). These values are based on the NCPDP Script Standard")
|
|
37
|
+
date_of_birth: date = Field(description="The patient's date of birth in the format YYYY-MM-DD")
|
|
38
|
+
primary_phone: StrictStr = Field(description="The patient's primary phone number. This could be a mobile phone number or a landline phone number. The format is a string based upon US numbers. For example, 555-555-5555 or (555) 555-5555")
|
|
39
|
+
alternate_phone: Optional[StrictStr] = Field(default=None, description="An alternate phone number for the patient. Similar rules apply here as in the primary_phone field")
|
|
40
|
+
email: StrictStr = Field(description="The patient's email address")
|
|
41
|
+
__properties: ClassVar[List[str]] = ["last_name", "first_name", "middle_name", "suffix", "prefix", "gender_assigned_at_birth", "date_of_birth", "primary_phone", "alternate_phone", "email"]
|
|
42
|
+
|
|
43
|
+
@field_validator('gender_assigned_at_birth')
|
|
44
|
+
def gender_assigned_at_birth_validate_enum(cls, value):
|
|
45
|
+
"""Validates the enum"""
|
|
46
|
+
if value not in set(['F', 'I', 'M', 'U']):
|
|
47
|
+
raise ValueError("must be one of enum values ('F', 'I', 'M', 'U')")
|
|
48
|
+
return value
|
|
49
|
+
|
|
50
|
+
model_config = ConfigDict(
|
|
51
|
+
populate_by_name=True,
|
|
52
|
+
validate_assignment=True,
|
|
53
|
+
protected_namespaces=(),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def to_str(self) -> str:
|
|
58
|
+
"""Returns the string representation of the model using alias"""
|
|
59
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
60
|
+
|
|
61
|
+
def to_json(self) -> str:
|
|
62
|
+
"""Returns the JSON representation of the model using alias"""
|
|
63
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
64
|
+
return json.dumps(self.to_dict())
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
68
|
+
"""Create an instance of PatientData from a JSON string"""
|
|
69
|
+
return cls.from_dict(json.loads(json_str))
|
|
70
|
+
|
|
71
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
72
|
+
"""Return the dictionary representation of the model using alias.
|
|
73
|
+
|
|
74
|
+
This has the following differences from calling pydantic's
|
|
75
|
+
`self.model_dump(by_alias=True)`:
|
|
76
|
+
|
|
77
|
+
* `None` is only added to the output dict for nullable fields that
|
|
78
|
+
were set at model initialization. Other fields with value `None`
|
|
79
|
+
are ignored.
|
|
80
|
+
"""
|
|
81
|
+
excluded_fields: Set[str] = set([
|
|
82
|
+
])
|
|
83
|
+
|
|
84
|
+
_dict = self.model_dump(
|
|
85
|
+
by_alias=True,
|
|
86
|
+
exclude=excluded_fields,
|
|
87
|
+
exclude_none=True,
|
|
88
|
+
)
|
|
89
|
+
return _dict
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
93
|
+
"""Create an instance of PatientData from a dict"""
|
|
94
|
+
if obj is None:
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
if not isinstance(obj, dict):
|
|
98
|
+
return cls.model_validate(obj)
|
|
99
|
+
|
|
100
|
+
_obj = cls.model_validate({
|
|
101
|
+
"last_name": obj.get("last_name"),
|
|
102
|
+
"first_name": obj.get("first_name"),
|
|
103
|
+
"middle_name": obj.get("middle_name"),
|
|
104
|
+
"suffix": obj.get("suffix"),
|
|
105
|
+
"prefix": obj.get("prefix"),
|
|
106
|
+
"gender_assigned_at_birth": obj.get("gender_assigned_at_birth"),
|
|
107
|
+
"date_of_birth": obj.get("date_of_birth"),
|
|
108
|
+
"primary_phone": obj.get("primary_phone"),
|
|
109
|
+
"alternate_phone": obj.get("alternate_phone"),
|
|
110
|
+
"email": obj.get("email")
|
|
111
|
+
})
|
|
112
|
+
return _obj
|
|
113
|
+
|
|
114
|
+
|
|
@@ -18,20 +18,19 @@ import pprint
|
|
|
18
18
|
import re # noqa: F401
|
|
19
19
|
import json
|
|
20
20
|
|
|
21
|
-
from
|
|
22
|
-
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
23
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
23
|
from typing import Optional, Set
|
|
25
24
|
from typing_extensions import Self
|
|
26
25
|
|
|
27
26
|
class PrescriptionTransferRequest(BaseModel):
|
|
28
27
|
"""
|
|
29
|
-
|
|
28
|
+
A request to transfer a prescription from Swifty based intake to a new pharmacy
|
|
30
29
|
""" # noqa: E501
|
|
31
|
-
prescription_number:
|
|
32
|
-
to_pharmacy_npi:
|
|
33
|
-
|
|
34
|
-
__properties: ClassVar[List[str]] = ["prescription_number", "to_pharmacy_npi", "
|
|
30
|
+
prescription_number: StrictStr = Field(description="The Swifty prescription number to transfer")
|
|
31
|
+
to_pharmacy_npi: StrictStr = Field(description="The NPI of the pharmacy to transfer to")
|
|
32
|
+
to_pharmacy_patient_id: Optional[StrictStr] = Field(default=None, description="The identifier for the patient in the context of the pharmacy being transferred to")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["prescription_number", "to_pharmacy_npi", "to_pharmacy_patient_id"]
|
|
35
34
|
|
|
36
35
|
model_config = ConfigDict(
|
|
37
36
|
populate_by_name=True,
|
|
@@ -86,7 +85,7 @@ class PrescriptionTransferRequest(BaseModel):
|
|
|
86
85
|
_obj = cls.model_validate({
|
|
87
86
|
"prescription_number": obj.get("prescription_number"),
|
|
88
87
|
"to_pharmacy_npi": obj.get("to_pharmacy_npi"),
|
|
89
|
-
"
|
|
88
|
+
"to_pharmacy_patient_id": obj.get("to_pharmacy_patient_id")
|
|
90
89
|
})
|
|
91
90
|
return _obj
|
|
92
91
|
|