diff --git a/docs/index.rst b/docs/index.rst index eac032b8..e72f887e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -29,7 +29,6 @@ Welcome to imednet's documentation! job_polling record_mapping airflow - veeva_integration test_skip_conditions live_test_plan live_tests diff --git a/docs/veeva_integration.rst b/docs/veeva_integration.rst deleted file mode 100644 index c30a103d..00000000 --- a/docs/veeva_integration.rst +++ /dev/null @@ -1,99 +0,0 @@ -Veeva Vault Integration -======================= - -The SDK provides a bridge to transfer data from iMednet to Veeva Vault. This integration allows you to export clinical data (Subjects, Visits, Forms, etc.) from an iMednet study and import it into Veeva Vault as object records or documents. - -.. note:: - This feature is currently in development. The API described below is subject to change. - -Prerequisites -------------- - -* Active iMednet API access (API Key, Security Key). -* Veeva Vault account with API access enabled. -* A Vault user with permissions to create/update the target objects (e.g., ``Subject__v``, ``Visit__v``). - -Installation ------------- - -The Veeva integration is part of the ``imednet`` package but requires no extra dependencies beyond the standard SDK installation. - -.. code-block:: bash - - pip install imednet - -Configuration -------------- - -You must configure connection details for both iMednet and Veeva Vault. - -iMednet Configuration -~~~~~~~~~~~~~~~~~~~~~ - -Follow the standard :doc:`configuration` guide to set up your iMednet credentials. - -Veeva Vault Configuration -~~~~~~~~~~~~~~~~~~~~~~~~~ - -You can provide Veeva credentials directly to the bridge or set them as environment variables: - -* ``VEEVA_VAULT_URL``: The base URL of your Vault (e.g., ``https://myvault.veevavault.com``). -* ``VEEVA_USERNAME``: Your Vault username. -* ``VEEVA_PASSWORD``: Your Vault password. -* ``VEEVA_CLIENT_ID``: (Optional) A custom client ID for tracking API usage. - -Usage ------ - -The primary interface is the ``VeevaVaultBridge`` class in ``imednet.integrations.veeva``. - -Basic Export -~~~~~~~~~~~~ - -Here is a simple example of exporting all subjects from an iMednet study to a Veeva Vault ``Study_Subject__v`` object. - -.. code-block:: python - - import os - from imednet import ImednetSDK - from imednet.integrations.veeva import VeevaVaultBridge - - # Initialize SDK - sdk = ImednetSDK(api_key="...", security_key="...") - - # Initialize Bridge - bridge = VeevaVaultBridge( - vault_url="https://myvault.veevavault.com", - username=os.getenv("VEEVA_USERNAME"), - password=os.getenv("VEEVA_PASSWORD") - ) - - # Run the export - result = bridge.export_subjects( - sdk=sdk, - study_key="MY_STUDY_KEY", - target_object="Study_Subject__v", - mapping={ - "subject_id": "name__v", - "site_id": "site__v" - } - ) - - print(f"Exported {result.success_count} records to Veeva Vault.") - -Data Mapping ------------- - -The bridge supports custom field mapping. You can provide a dictionary where keys are iMednet field names and values are Veeva Vault field API names. - -Supported Data Types --------------------- - -* **Subjects**: Maps iMednet subjects to Vault objects. -* **Visits**: Maps iMednet visits to Vault objects. -* **Forms**: Maps iMednet form data to Vault objects. - -Error Handling --------------- - -The bridge will raise ``VeevaIntegrationError`` if connection fails or if Vault returns an error response. Partial failures (e.g., some records failed to import) are reported in the result object. diff --git a/poetry.lock b/poetry.lock index fc1d01fe..c6447985 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2759,14 +2759,14 @@ test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess [[package]] name = "werkzeug" -version = "3.1.5" +version = "3.1.6" description = "The comprehensive WSGI web application library." optional = false python-versions = ">=3.9" groups = ["dev"] files = [ - {file = "werkzeug-3.1.5-py3-none-any.whl", hash = "sha256:5111e36e91086ece91f93268bb39b4a35c1e6f1feac762c9c822ded0a4e322dc"}, - {file = "werkzeug-3.1.5.tar.gz", hash = "sha256:6a548b0e88955dd07ccb25539d7d0cc97417ee9e179677d22c7041c8f078ce67"}, + {file = "werkzeug-3.1.6-py3-none-any.whl", hash = "sha256:7ddf3357bb9564e407607f988f683d72038551200c704012bb9a4c523d42f131"}, + {file = "werkzeug-3.1.6.tar.gz", hash = "sha256:210c6bede5a420a913956b4791a7f4d6843a43b6fcee4dfa08a65e93007d0d25"}, ] [package.dependencies] @@ -2800,4 +2800,4 @@ sqlalchemy = ["SQLAlchemy"] [metadata] lock-version = "2.1" python-versions = "^3.10" -content-hash = "f566c8f13cf3eb0c80d496ed8ecf21f9cdd87e0ad0277fe67db4440f8ab6bb09" +content-hash = "9eb342134be043a99cd62fb62e7c27ef7631d148f4038092163da233d629525e" diff --git a/pyproject.toml b/pyproject.toml index 4d308f2e..8981519a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,7 +80,7 @@ faker = "^24.9" pre-commit = "^4.2.0" virtualenv = "^20.36.1" isort = "^6.0.1" -werkzeug = "^3.1.5" +werkzeug = "^3.1.6" sphinx = "^6.2.0" sphinx-autodoc-typehints = "*" sphinx-rtd-theme = "^3.0.2"