diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a5b56e..0b26bf2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: - name: Set up python uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.8 - name: Bootstrap poetry run: | curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 @@ -26,7 +26,7 @@ jobs: - name: Set up python uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.8 - name: Bootstrap poetry run: | curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 @@ -45,7 +45,7 @@ jobs: - name: Set up python uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.8 - name: Bootstrap poetry run: | curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1 diff --git a/poetry.lock b/poetry.lock index c23d386..bdeefd8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2,13 +2,13 @@ [[package]] name = "annotated-types" -version = "0.5.0" +version = "0.6.0" description = "Reusable constraint types to use with typing.Annotated" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "annotated_types-0.5.0-py3-none-any.whl", hash = "sha256:58da39888f92c276ad970249761ebea80ba544b77acddaa1a4d6cf78287d45fd"}, - {file = "annotated_types-0.5.0.tar.gz", hash = "sha256:47cdc3490d9ac1506ce92c7aaa76c579dc3509ff11e098fc867e5130ab7be802"}, + {file = "annotated_types-0.6.0-py3-none-any.whl", hash = "sha256:0641064de18ba7a25dee8f96403ebc39113d0cb953a01429249d5c7564666a43"}, + {file = "annotated_types-0.6.0.tar.gz", hash = "sha256:563339e807e53ffd9c267e99fc6d9ea23eb8443c08f112651963e24e22f84a5d"}, ] [package.dependencies] @@ -16,25 +16,25 @@ typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} [[package]] name = "anyio" -version = "3.7.1" +version = "4.3.0" description = "High level compatibility layer for multiple asynchronous event loop implementations" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "anyio-3.7.1-py3-none-any.whl", hash = "sha256:91dee416e570e92c64041bd18b900d1d6fa78dff7048769ce5ac5ddad004fbb5"}, - {file = "anyio-3.7.1.tar.gz", hash = "sha256:44a3c9aba0f5defa43261a8b3efb97891f2bd7d804e0e1f56419befa1adfc780"}, + {file = "anyio-4.3.0-py3-none-any.whl", hash = "sha256:048e05d0f6caeed70d731f3db756d35dcc1f35747c8c403364a8332c630441b8"}, + {file = "anyio-4.3.0.tar.gz", hash = "sha256:f75253795a87df48568485fd18cdd2a3fa5c4f7c5be8e5e36637733fce06fed6"}, ] [package.dependencies] -exceptiongroup = {version = "*", markers = "python_version < \"3.11\""} +exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} idna = ">=2.8" sniffio = ">=1.1" -typing-extensions = {version = "*", markers = "python_version < \"3.8\""} +typing-extensions = {version = ">=4.1", markers = "python_version < \"3.11\""} [package.extras] -doc = ["Sphinx", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme (>=1.2.2)", "sphinxcontrib-jquery"] -test = ["anyio[trio]", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>=4)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] -trio = ["trio (<0.22)"] +doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd-theme"] +test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] +trio = ["trio (>=0.23)"] [[package]] name = "certifi" @@ -83,44 +83,42 @@ files = [ {file = "h11-0.14.0.tar.gz", hash = "sha256:8f19fbbe99e72420ff35c00b27a34cb9937e902a8b810e2c88300c6f0a3b699d"}, ] -[package.dependencies] -typing-extensions = {version = "*", markers = "python_version < \"3.8\""} - [[package]] name = "httpcore" -version = "0.17.3" +version = "1.0.4" description = "A minimal low-level HTTP client." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "httpcore-0.17.3-py3-none-any.whl", hash = "sha256:c2789b767ddddfa2a5782e3199b2b7f6894540b17b16ec26b2c4d8e103510b87"}, - {file = "httpcore-0.17.3.tar.gz", hash = "sha256:a6f30213335e34c1ade7be6ec7c47f19f50c56db36abef1a9dfa3815b1cb3888"}, + {file = "httpcore-1.0.4-py3-none-any.whl", hash = "sha256:ac418c1db41bade2ad53ae2f3834a3a0f5ae76b56cf5aa497d2d033384fc7d73"}, + {file = "httpcore-1.0.4.tar.gz", hash = "sha256:cb2839ccfcba0d2d3c1131d3c3e26dfc327326fbe7a5dc0dbfe9f6c9151bb022"}, ] [package.dependencies] -anyio = ">=3.0,<5.0" certifi = "*" h11 = ">=0.13,<0.15" -sniffio = "==1.*" [package.extras] +asyncio = ["anyio (>=4.0,<5.0)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] +trio = ["trio (>=0.22.0,<0.25.0)"] [[package]] name = "httpx" -version = "0.24.1" +version = "0.27.0" description = "The next generation HTTP client." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "httpx-0.24.1-py3-none-any.whl", hash = "sha256:06781eb9ac53cde990577af654bd990a4949de37a28bdb4a230d434f3a30b9bd"}, - {file = "httpx-0.24.1.tar.gz", hash = "sha256:5853a43053df830c20f8110c5e69fe44d035d850b2dfe795e196f00fdb774bdd"}, + {file = "httpx-0.27.0-py3-none-any.whl", hash = "sha256:71d5465162c13681bff01ad59b2cc68dd838ea1f10e51574bac27103f00c91a5"}, + {file = "httpx-0.27.0.tar.gz", hash = "sha256:a0cb88a46f32dc874e04ee956e4c2764aba2aa228f650b06788ba6bda2962ab5"}, ] [package.dependencies] +anyio = "*" certifi = "*" -httpcore = ">=0.15.0,<0.18.0" +httpcore = "==1.*" idna = "*" sniffio = "*" @@ -141,26 +139,6 @@ files = [ {file = "idna-3.6.tar.gz", hash = "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca"}, ] -[[package]] -name = "importlib-metadata" -version = "6.7.0" -description = "Read metadata from Python packages" -optional = false -python-versions = ">=3.7" -files = [ - {file = "importlib_metadata-6.7.0-py3-none-any.whl", hash = "sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5"}, - {file = "importlib_metadata-6.7.0.tar.gz", hash = "sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4"}, -] - -[package.dependencies] -typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} -zipp = ">=0.5" - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -perf = ["ipython"] -testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] - [[package]] name = "iniconfig" version = "2.0.0" @@ -174,45 +152,49 @@ files = [ [[package]] name = "mypy" -version = "0.971" +version = "1.8.0" description = "Optional static typing for Python" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "mypy-0.971-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f2899a3cbd394da157194f913a931edfd4be5f274a88041c9dc2d9cdcb1c315c"}, - {file = "mypy-0.971-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:98e02d56ebe93981c41211c05adb630d1d26c14195d04d95e49cd97dbc046dc5"}, - {file = "mypy-0.971-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:19830b7dba7d5356d3e26e2427a2ec91c994cd92d983142cbd025ebe81d69cf3"}, - {file = "mypy-0.971-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:02ef476f6dcb86e6f502ae39a16b93285fef97e7f1ff22932b657d1ef1f28655"}, - {file = "mypy-0.971-cp310-cp310-win_amd64.whl", hash = "sha256:25c5750ba5609a0c7550b73a33deb314ecfb559c350bb050b655505e8aed4103"}, - {file = "mypy-0.971-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d3348e7eb2eea2472db611486846742d5d52d1290576de99d59edeb7cd4a42ca"}, - {file = "mypy-0.971-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3fa7a477b9900be9b7dd4bab30a12759e5abe9586574ceb944bc29cddf8f0417"}, - {file = "mypy-0.971-cp36-cp36m-win_amd64.whl", hash = "sha256:2ad53cf9c3adc43cf3bea0a7d01a2f2e86db9fe7596dfecb4496a5dda63cbb09"}, - {file = "mypy-0.971-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:855048b6feb6dfe09d3353466004490b1872887150c5bb5caad7838b57328cc8"}, - {file = "mypy-0.971-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:23488a14a83bca6e54402c2e6435467a4138785df93ec85aeff64c6170077fb0"}, - {file = "mypy-0.971-cp37-cp37m-win_amd64.whl", hash = "sha256:4b21e5b1a70dfb972490035128f305c39bc4bc253f34e96a4adf9127cf943eb2"}, - {file = "mypy-0.971-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:9796a2ba7b4b538649caa5cecd398d873f4022ed2333ffde58eaf604c4d2cb27"}, - {file = "mypy-0.971-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5a361d92635ad4ada1b1b2d3630fc2f53f2127d51cf2def9db83cba32e47c856"}, - {file = "mypy-0.971-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b793b899f7cf563b1e7044a5c97361196b938e92f0a4343a5d27966a53d2ec71"}, - {file = "mypy-0.971-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d1ea5d12c8e2d266b5fb8c7a5d2e9c0219fedfeb493b7ed60cd350322384ac27"}, - {file = "mypy-0.971-cp38-cp38-win_amd64.whl", hash = "sha256:23c7ff43fff4b0df93a186581885c8512bc50fc4d4910e0f838e35d6bb6b5e58"}, - {file = "mypy-0.971-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1f7656b69974a6933e987ee8ffb951d836272d6c0f81d727f1d0e2696074d9e6"}, - {file = "mypy-0.971-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d2022bfadb7a5c2ef410d6a7c9763188afdb7f3533f22a0a32be10d571ee4bbe"}, - {file = "mypy-0.971-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef943c72a786b0f8d90fd76e9b39ce81fb7171172daf84bf43eaf937e9f220a9"}, - {file = "mypy-0.971-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d744f72eb39f69312bc6c2abf8ff6656973120e2eb3f3ec4f758ed47e414a4bf"}, - {file = "mypy-0.971-cp39-cp39-win_amd64.whl", hash = "sha256:77a514ea15d3007d33a9e2157b0ba9c267496acf12a7f2b9b9f8446337aac5b0"}, - {file = "mypy-0.971-py3-none-any.whl", hash = "sha256:0d054ef16b071149917085f51f89555a576e2618d5d9dd70bd6eea6410af3ac9"}, - {file = "mypy-0.971.tar.gz", hash = "sha256:40b0f21484238269ae6a57200c807d80debc6459d444c0489a102d7c6a75fa56"}, + {file = "mypy-1.8.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:485a8942f671120f76afffff70f259e1cd0f0cfe08f81c05d8816d958d4577d3"}, + {file = "mypy-1.8.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:df9824ac11deaf007443e7ed2a4a26bebff98d2bc43c6da21b2b64185da011c4"}, + {file = "mypy-1.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2afecd6354bbfb6e0160f4e4ad9ba6e4e003b767dd80d85516e71f2e955ab50d"}, + {file = "mypy-1.8.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:8963b83d53ee733a6e4196954502b33567ad07dfd74851f32be18eb932fb1cb9"}, + {file = "mypy-1.8.0-cp310-cp310-win_amd64.whl", hash = "sha256:e46f44b54ebddbeedbd3d5b289a893219065ef805d95094d16a0af6630f5d410"}, + {file = "mypy-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:855fe27b80375e5c5878492f0729540db47b186509c98dae341254c8f45f42ae"}, + {file = "mypy-1.8.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4c886c6cce2d070bd7df4ec4a05a13ee20c0aa60cb587e8d1265b6c03cf91da3"}, + {file = "mypy-1.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d19c413b3c07cbecf1f991e2221746b0d2a9410b59cb3f4fb9557f0365a1a817"}, + {file = "mypy-1.8.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9261ed810972061388918c83c3f5cd46079d875026ba97380f3e3978a72f503d"}, + {file = "mypy-1.8.0-cp311-cp311-win_amd64.whl", hash = "sha256:51720c776d148bad2372ca21ca29256ed483aa9a4cdefefcef49006dff2a6835"}, + {file = "mypy-1.8.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:52825b01f5c4c1c4eb0db253ec09c7aa17e1a7304d247c48b6f3599ef40db8bd"}, + {file = "mypy-1.8.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:f5ac9a4eeb1ec0f1ccdc6f326bcdb464de5f80eb07fb38b5ddd7b0de6bc61e55"}, + {file = "mypy-1.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:afe3fe972c645b4632c563d3f3eff1cdca2fa058f730df2b93a35e3b0c538218"}, + {file = "mypy-1.8.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:42c6680d256ab35637ef88891c6bd02514ccb7e1122133ac96055ff458f93fc3"}, + {file = "mypy-1.8.0-cp312-cp312-win_amd64.whl", hash = "sha256:720a5ca70e136b675af3af63db533c1c8c9181314d207568bbe79051f122669e"}, + {file = "mypy-1.8.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:028cf9f2cae89e202d7b6593cd98db6759379f17a319b5faf4f9978d7084cdc6"}, + {file = "mypy-1.8.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4e6d97288757e1ddba10dd9549ac27982e3e74a49d8d0179fc14d4365c7add66"}, + {file = "mypy-1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f1478736fcebb90f97e40aff11a5f253af890c845ee0c850fe80aa060a267c6"}, + {file = "mypy-1.8.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42419861b43e6962a649068a61f4a4839205a3ef525b858377a960b9e2de6e0d"}, + {file = "mypy-1.8.0-cp38-cp38-win_amd64.whl", hash = "sha256:2b5b6c721bd4aabaadead3a5e6fa85c11c6c795e0c81a7215776ef8afc66de02"}, + {file = "mypy-1.8.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:5c1538c38584029352878a0466f03a8ee7547d7bd9f641f57a0f3017a7c905b8"}, + {file = "mypy-1.8.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ef4be7baf08a203170f29e89d79064463b7fc7a0908b9d0d5114e8009c3a259"}, + {file = "mypy-1.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7178def594014aa6c35a8ff411cf37d682f428b3b5617ca79029d8ae72f5402b"}, + {file = "mypy-1.8.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ab3c84fa13c04aeeeabb2a7f67a25ef5d77ac9d6486ff33ded762ef353aa5592"}, + {file = "mypy-1.8.0-cp39-cp39-win_amd64.whl", hash = "sha256:99b00bc72855812a60d253420d8a2eae839b0afa4938f09f4d2aa9bb4654263a"}, + {file = "mypy-1.8.0-py3-none-any.whl", hash = "sha256:538fd81bb5e430cc1381a443971c0475582ff9f434c16cd46d2c66763ce85d9d"}, + {file = "mypy-1.8.0.tar.gz", hash = "sha256:6ff8b244d7085a0b425b56d327b480c3b29cafbd2eff27316a004f9a7391ae07"}, ] [package.dependencies] -mypy-extensions = ">=0.4.3" +mypy-extensions = ">=1.0.0" tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} -typed-ast = {version = ">=1.4.0,<2", markers = "python_version < \"3.8\""} -typing-extensions = ">=3.10" +typing-extensions = ">=4.1.0" [package.extras] dmypy = ["psutil (>=4.0)"] -python2 = ["typed-ast (>=1.4.0,<2)"] +install-types = ["pip"] +mypyc = ["setuptools (>=50)"] reports = ["lxml"] [[package]] @@ -239,36 +221,33 @@ files = [ [[package]] name = "pluggy" -version = "1.2.0" +version = "1.4.0" description = "plugin and hook calling mechanisms for python" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pluggy-1.2.0-py3-none-any.whl", hash = "sha256:c2fd55a7d7a3863cba1a013e4e2414658b1d07b6bc57b3919e0c63c9abb99849"}, - {file = "pluggy-1.2.0.tar.gz", hash = "sha256:d12f0c4b579b15f5e054301bb226ee85eeeba08ffec228092f8defbaa3a4c4b3"}, + {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, + {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, ] -[package.dependencies] -importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} - [package.extras] dev = ["pre-commit", "tox"] testing = ["pytest", "pytest-benchmark"] [[package]] name = "pydantic" -version = "2.4.2" +version = "2.6.1" description = "Data validation using Python type hints" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pydantic-2.4.2-py3-none-any.whl", hash = "sha256:bc3ddf669d234f4220e6e1c4d96b061abe0998185a8d7855c0126782b7abc8c1"}, - {file = "pydantic-2.4.2.tar.gz", hash = "sha256:94f336138093a5d7f426aac732dcfe7ab4eb4da243c88f891d65deb4a2556ee7"}, + {file = "pydantic-2.6.1-py3-none-any.whl", hash = "sha256:0b6a909df3192245cb736509a92ff69e4fef76116feffec68e93a567347bae6f"}, + {file = "pydantic-2.6.1.tar.gz", hash = "sha256:4fd5c182a2488dc63e6d32737ff19937888001e2a6d86e94b3f233104a5d1fa9"}, ] [package.dependencies] annotated-types = ">=0.4.0" -pydantic-core = "2.10.1" +pydantic-core = "2.16.2" typing-extensions = ">=4.6.1" [package.extras] @@ -276,117 +255,90 @@ email = ["email-validator (>=2.0.0)"] [[package]] name = "pydantic-core" -version = "2.10.1" +version = "2.16.2" description = "" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "pydantic_core-2.10.1-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:d64728ee14e667ba27c66314b7d880b8eeb050e58ffc5fec3b7a109f8cddbd63"}, - {file = "pydantic_core-2.10.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:48525933fea744a3e7464c19bfede85df4aba79ce90c60b94d8b6e1eddd67096"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef337945bbd76cce390d1b2496ccf9f90b1c1242a3a7bc242ca4a9fc5993427a"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a1392e0638af203cee360495fd2cfdd6054711f2db5175b6e9c3c461b76f5175"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0675ba5d22de54d07bccde38997e780044dcfa9a71aac9fd7d4d7a1d2e3e65f7"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:128552af70a64660f21cb0eb4876cbdadf1a1f9d5de820fed6421fa8de07c893"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f6e6aed5818c264412ac0598b581a002a9f050cb2637a84979859e70197aa9e"}, - {file = "pydantic_core-2.10.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:ecaac27da855b8d73f92123e5f03612b04c5632fd0a476e469dfc47cd37d6b2e"}, - {file = "pydantic_core-2.10.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b3c01c2fb081fced3bbb3da78510693dc7121bb893a1f0f5f4b48013201f362e"}, - {file = "pydantic_core-2.10.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:92f675fefa977625105708492850bcbc1182bfc3e997f8eecb866d1927c98ae6"}, - {file = "pydantic_core-2.10.1-cp310-none-win32.whl", hash = "sha256:420a692b547736a8d8703c39ea935ab5d8f0d2573f8f123b0a294e49a73f214b"}, - {file = "pydantic_core-2.10.1-cp310-none-win_amd64.whl", hash = "sha256:0880e239827b4b5b3e2ce05e6b766a7414e5f5aedc4523be6b68cfbc7f61c5d0"}, - {file = "pydantic_core-2.10.1-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:073d4a470b195d2b2245d0343569aac7e979d3a0dcce6c7d2af6d8a920ad0bea"}, - {file = "pydantic_core-2.10.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:600d04a7b342363058b9190d4e929a8e2e715c5682a70cc37d5ded1e0dd370b4"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:39215d809470f4c8d1881758575b2abfb80174a9e8daf8f33b1d4379357e417c"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:eeb3d3d6b399ffe55f9a04e09e635554012f1980696d6b0aca3e6cf42a17a03b"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a7a7902bf75779bc12ccfc508bfb7a4c47063f748ea3de87135d433a4cca7a2f"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3625578b6010c65964d177626fde80cf60d7f2e297d56b925cb5cdeda6e9925a"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:caa48fc31fc7243e50188197b5f0c4228956f97b954f76da157aae7f67269ae8"}, - {file = "pydantic_core-2.10.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:07ec6d7d929ae9c68f716195ce15e745b3e8fa122fc67698ac6498d802ed0fa4"}, - {file = "pydantic_core-2.10.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e6f31a17acede6a8cd1ae2d123ce04d8cca74056c9d456075f4f6f85de055607"}, - {file = "pydantic_core-2.10.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d8f1ebca515a03e5654f88411420fea6380fc841d1bea08effb28184e3d4899f"}, - {file = "pydantic_core-2.10.1-cp311-none-win32.whl", hash = "sha256:6db2eb9654a85ada248afa5a6db5ff1cf0f7b16043a6b070adc4a5be68c716d6"}, - {file = "pydantic_core-2.10.1-cp311-none-win_amd64.whl", hash = "sha256:4a5be350f922430997f240d25f8219f93b0c81e15f7b30b868b2fddfc2d05f27"}, - {file = "pydantic_core-2.10.1-cp311-none-win_arm64.whl", hash = "sha256:5fdb39f67c779b183b0c853cd6b45f7db84b84e0571b3ef1c89cdb1dfc367325"}, - {file = "pydantic_core-2.10.1-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:b1f22a9ab44de5f082216270552aa54259db20189e68fc12484873d926426921"}, - {file = "pydantic_core-2.10.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8572cadbf4cfa95fb4187775b5ade2eaa93511f07947b38f4cd67cf10783b118"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:db9a28c063c7c00844ae42a80203eb6d2d6bbb97070cfa00194dff40e6f545ab"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:0e2a35baa428181cb2270a15864ec6286822d3576f2ed0f4cd7f0c1708472aff"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:05560ab976012bf40f25d5225a58bfa649bb897b87192a36c6fef1ab132540d7"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d6495008733c7521a89422d7a68efa0a0122c99a5861f06020ef5b1f51f9ba7c"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14ac492c686defc8e6133e3a2d9eaf5261b3df26b8ae97450c1647286750b901"}, - {file = "pydantic_core-2.10.1-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:8282bab177a9a3081fd3d0a0175a07a1e2bfb7fcbbd949519ea0980f8a07144d"}, - {file = "pydantic_core-2.10.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:aafdb89fdeb5fe165043896817eccd6434aee124d5ee9b354f92cd574ba5e78f"}, - {file = "pydantic_core-2.10.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f6defd966ca3b187ec6c366604e9296f585021d922e666b99c47e78738b5666c"}, - {file = "pydantic_core-2.10.1-cp312-none-win32.whl", hash = "sha256:7c4d1894fe112b0864c1fa75dffa045720a194b227bed12f4be7f6045b25209f"}, - {file = "pydantic_core-2.10.1-cp312-none-win_amd64.whl", hash = "sha256:5994985da903d0b8a08e4935c46ed8daf5be1cf217489e673910951dc533d430"}, - {file = "pydantic_core-2.10.1-cp312-none-win_arm64.whl", hash = "sha256:0d8a8adef23d86d8eceed3e32e9cca8879c7481c183f84ed1a8edc7df073af94"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:9badf8d45171d92387410b04639d73811b785b5161ecadabf056ea14d62d4ede"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:ebedb45b9feb7258fac0a268a3f6bec0a2ea4d9558f3d6f813f02ff3a6dc6698"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cfe1090245c078720d250d19cb05d67e21a9cd7c257698ef139bc41cf6c27b4f"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e357571bb0efd65fd55f18db0a2fb0ed89d0bb1d41d906b138f088933ae618bb"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b3dcd587b69bbf54fc04ca157c2323b8911033e827fffaecf0cafa5a892a0904"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9c120c9ce3b163b985a3b966bb701114beb1da4b0468b9b236fc754783d85aa3"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:15d6bca84ffc966cc9976b09a18cf9543ed4d4ecbd97e7086f9ce9327ea48891"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5cabb9710f09d5d2e9e2748c3e3e20d991a4c5f96ed8f1132518f54ab2967221"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:82f55187a5bebae7d81d35b1e9aaea5e169d44819789837cdd4720d768c55d15"}, - {file = "pydantic_core-2.10.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:1d40f55222b233e98e3921df7811c27567f0e1a4411b93d4c5c0f4ce131bc42f"}, - {file = "pydantic_core-2.10.1-cp37-none-win32.whl", hash = "sha256:14e09ff0b8fe6e46b93d36a878f6e4a3a98ba5303c76bb8e716f4878a3bee92c"}, - {file = "pydantic_core-2.10.1-cp37-none-win_amd64.whl", hash = "sha256:1396e81b83516b9d5c9e26a924fa69164156c148c717131f54f586485ac3c15e"}, - {file = "pydantic_core-2.10.1-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:6835451b57c1b467b95ffb03a38bb75b52fb4dc2762bb1d9dbed8de31ea7d0fc"}, - {file = "pydantic_core-2.10.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b00bc4619f60c853556b35f83731bd817f989cba3e97dc792bb8c97941b8053a"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0fa467fd300a6f046bdb248d40cd015b21b7576c168a6bb20aa22e595c8ffcdd"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:d99277877daf2efe074eae6338453a4ed54a2d93fb4678ddfe1209a0c93a2468"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:fa7db7558607afeccb33c0e4bf1c9a9a835e26599e76af6fe2fcea45904083a6"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aad7bd686363d1ce4ee930ad39f14e1673248373f4a9d74d2b9554f06199fb58"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:443fed67d33aa85357464f297e3d26e570267d1af6fef1c21ca50921d2976302"}, - {file = "pydantic_core-2.10.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:042462d8d6ba707fd3ce9649e7bf268633a41018d6a998fb5fbacb7e928a183e"}, - {file = "pydantic_core-2.10.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:ecdbde46235f3d560b18be0cb706c8e8ad1b965e5c13bbba7450c86064e96561"}, - {file = "pydantic_core-2.10.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ed550ed05540c03f0e69e6d74ad58d026de61b9eaebebbaaf8873e585cbb18de"}, - {file = "pydantic_core-2.10.1-cp38-none-win32.whl", hash = "sha256:8cdbbd92154db2fec4ec973d45c565e767ddc20aa6dbaf50142676484cbff8ee"}, - {file = "pydantic_core-2.10.1-cp38-none-win_amd64.whl", hash = "sha256:9f6f3e2598604956480f6c8aa24a3384dbf6509fe995d97f6ca6103bb8c2534e"}, - {file = "pydantic_core-2.10.1-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:655f8f4c8d6a5963c9a0687793da37b9b681d9ad06f29438a3b2326d4e6b7970"}, - {file = "pydantic_core-2.10.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e570ffeb2170e116a5b17e83f19911020ac79d19c96f320cbfa1fa96b470185b"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:64322bfa13e44c6c30c518729ef08fda6026b96d5c0be724b3c4ae4da939f875"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:485a91abe3a07c3a8d1e082ba29254eea3e2bb13cbbd4351ea4e5a21912cc9b0"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7c2b8eb9fc872e68b46eeaf835e86bccc3a58ba57d0eedc109cbb14177be531"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a5cb87bdc2e5f620693148b5f8f842d293cae46c5f15a1b1bf7ceeed324a740c"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:25bd966103890ccfa028841a8f30cebcf5875eeac8c4bde4fe221364c92f0c9a"}, - {file = "pydantic_core-2.10.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f323306d0556351735b54acbf82904fe30a27b6a7147153cbe6e19aaaa2aa429"}, - {file = "pydantic_core-2.10.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0c27f38dc4fbf07b358b2bc90edf35e82d1703e22ff2efa4af4ad5de1b3833e7"}, - {file = "pydantic_core-2.10.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:f1365e032a477c1430cfe0cf2856679529a2331426f8081172c4a74186f1d595"}, - {file = "pydantic_core-2.10.1-cp39-none-win32.whl", hash = "sha256:a1c311fd06ab3b10805abb72109f01a134019739bd3286b8ae1bc2fc4e50c07a"}, - {file = "pydantic_core-2.10.1-cp39-none-win_amd64.whl", hash = "sha256:ae8a8843b11dc0b03b57b52793e391f0122e740de3df1474814c700d2622950a"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:d43002441932f9a9ea5d6f9efaa2e21458221a3a4b417a14027a1d530201ef1b"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:fcb83175cc4936a5425dde3356f079ae03c0802bbdf8ff82c035f8a54b333521"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:962ed72424bf1f72334e2f1e61b68f16c0e596f024ca7ac5daf229f7c26e4208"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2cf5bb4dd67f20f3bbc1209ef572a259027c49e5ff694fa56bed62959b41e1f9"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:e544246b859f17373bed915182ab841b80849ed9cf23f1f07b73b7c58baee5fb"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:c0877239307b7e69d025b73774e88e86ce82f6ba6adf98f41069d5b0b78bd1bf"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:53df009d1e1ba40f696f8995683e067e3967101d4bb4ea6f667931b7d4a01357"}, - {file = "pydantic_core-2.10.1-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:a1254357f7e4c82e77c348dabf2d55f1d14d19d91ff025004775e70a6ef40ada"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:524ff0ca3baea164d6d93a32c58ac79eca9f6cf713586fdc0adb66a8cdeab96a"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f0ac9fb8608dbc6eaf17956bf623c9119b4db7dbb511650910a82e261e6600f"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:320f14bd4542a04ab23747ff2c8a778bde727158b606e2661349557f0770711e"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:63974d168b6233b4ed6a0046296803cb13c56637a7b8106564ab575926572a55"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:417243bf599ba1f1fef2bb8c543ceb918676954734e2dcb82bf162ae9d7bd514"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:dda81e5ec82485155a19d9624cfcca9be88a405e2857354e5b089c2a982144b2"}, - {file = "pydantic_core-2.10.1-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:14cfbb00959259e15d684505263d5a21732b31248a5dd4941f73a3be233865b9"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:631cb7415225954fdcc2a024119101946793e5923f6c4d73a5914d27eb3d3a05"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:bec7dd208a4182e99c5b6c501ce0b1f49de2802448d4056091f8e630b28e9a52"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:149b8a07712f45b332faee1a2258d8ef1fb4a36f88c0c17cb687f205c5dc6e7d"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4d966c47f9dd73c2d32a809d2be529112d509321c5310ebf54076812e6ecd884"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7eb037106f5c6b3b0b864ad226b0b7ab58157124161d48e4b30c4a43fef8bc4b"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:154ea7c52e32dce13065dbb20a4a6f0cc012b4f667ac90d648d36b12007fa9f7"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e562617a45b5a9da5be4abe72b971d4f00bf8555eb29bb91ec2ef2be348cd132"}, - {file = "pydantic_core-2.10.1-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:f23b55eb5464468f9e0e9a9935ce3ed2a870608d5f534025cd5536bca25b1402"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:e9121b4009339b0f751955baf4543a0bfd6bc3f8188f8056b1a25a2d45099934"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:0523aeb76e03f753b58be33b26540880bac5aa54422e4462404c432230543f33"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2e0e2959ef5d5b8dc9ef21e1a305a21a36e254e6a34432d00c72a92fdc5ecda5"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:da01bec0a26befab4898ed83b362993c844b9a607a86add78604186297eb047e"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f2e9072d71c1f6cfc79a36d4484c82823c560e6f5599c43c1ca6b5cdbd54f881"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:f36a3489d9e28fe4b67be9992a23029c3cec0babc3bd9afb39f49844a8c721c5"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f64f82cc3443149292b32387086d02a6c7fb39b8781563e0ca7b8d7d9cf72bd7"}, - {file = "pydantic_core-2.10.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:b4a6db486ac8e99ae696e09efc8b2b9fea67b63c8f88ba7a1a16c24a057a0776"}, - {file = "pydantic_core-2.10.1.tar.gz", hash = "sha256:0f8682dbdd2f67f8e1edddcbffcc29f60a6182b4901c367fc8c1c40d30bb0a82"}, + {file = "pydantic_core-2.16.2-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:3fab4e75b8c525a4776e7630b9ee48aea50107fea6ca9f593c98da3f4d11bf7c"}, + {file = "pydantic_core-2.16.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8bde5b48c65b8e807409e6f20baee5d2cd880e0fad00b1a811ebc43e39a00ab2"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2924b89b16420712e9bb8192396026a8fbd6d8726224f918353ac19c4c043d2a"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:16aa02e7a0f539098e215fc193c8926c897175d64c7926d00a36188917717a05"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:936a787f83db1f2115ee829dd615c4f684ee48ac4de5779ab4300994d8af325b"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:459d6be6134ce3b38e0ef76f8a672924460c455d45f1ad8fdade36796df1ddc8"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4f9ee4febb249c591d07b2d4dd36ebcad0ccd128962aaa1801508320896575ef"}, + {file = "pydantic_core-2.16.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:40a0bd0bed96dae5712dab2aba7d334a6c67cbcac2ddfca7dbcc4a8176445990"}, + {file = "pydantic_core-2.16.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:870dbfa94de9b8866b37b867a2cb37a60c401d9deb4a9ea392abf11a1f98037b"}, + {file = "pydantic_core-2.16.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:308974fdf98046db28440eb3377abba274808bf66262e042c412eb2adf852731"}, + {file = "pydantic_core-2.16.2-cp310-none-win32.whl", hash = "sha256:a477932664d9611d7a0816cc3c0eb1f8856f8a42435488280dfbf4395e141485"}, + {file = "pydantic_core-2.16.2-cp310-none-win_amd64.whl", hash = "sha256:8f9142a6ed83d90c94a3efd7af8873bf7cefed2d3d44387bf848888482e2d25f"}, + {file = "pydantic_core-2.16.2-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:406fac1d09edc613020ce9cf3f2ccf1a1b2f57ab00552b4c18e3d5276c67eb11"}, + {file = "pydantic_core-2.16.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ce232a6170dd6532096cadbf6185271e4e8c70fc9217ebe105923ac105da9978"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a90fec23b4b05a09ad988e7a4f4e081711a90eb2a55b9c984d8b74597599180f"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8aafeedb6597a163a9c9727d8a8bd363a93277701b7bfd2749fbefee2396469e"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9957433c3a1b67bdd4c63717eaf174ebb749510d5ea612cd4e83f2d9142f3fc8"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0d7a9165167269758145756db43a133608a531b1e5bb6a626b9ee24bc38a8f7"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dffaf740fe2e147fedcb6b561353a16243e654f7fe8e701b1b9db148242e1272"}, + {file = "pydantic_core-2.16.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f8ed79883b4328b7f0bd142733d99c8e6b22703e908ec63d930b06be3a0e7113"}, + {file = "pydantic_core-2.16.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:cf903310a34e14651c9de056fcc12ce090560864d5a2bb0174b971685684e1d8"}, + {file = "pydantic_core-2.16.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:46b0d5520dbcafea9a8645a8164658777686c5c524d381d983317d29687cce97"}, + {file = "pydantic_core-2.16.2-cp311-none-win32.whl", hash = "sha256:70651ff6e663428cea902dac297066d5c6e5423fda345a4ca62430575364d62b"}, + {file = "pydantic_core-2.16.2-cp311-none-win_amd64.whl", hash = "sha256:98dc6f4f2095fc7ad277782a7c2c88296badcad92316b5a6e530930b1d475ebc"}, + {file = "pydantic_core-2.16.2-cp311-none-win_arm64.whl", hash = "sha256:ef6113cd31411eaf9b39fc5a8848e71c72656fd418882488598758b2c8c6dfa0"}, + {file = "pydantic_core-2.16.2-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:88646cae28eb1dd5cd1e09605680c2b043b64d7481cdad7f5003ebef401a3039"}, + {file = "pydantic_core-2.16.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7b883af50eaa6bb3299780651e5be921e88050ccf00e3e583b1e92020333304b"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7bf26c2e2ea59d32807081ad51968133af3025c4ba5753e6a794683d2c91bf6e"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:99af961d72ac731aae2a1b55ccbdae0733d816f8bfb97b41909e143de735f522"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:02906e7306cb8c5901a1feb61f9ab5e5c690dbbeaa04d84c1b9ae2a01ebe9379"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5362d099c244a2d2f9659fb3c9db7c735f0004765bbe06b99be69fbd87c3f15"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3ac426704840877a285d03a445e162eb258924f014e2f074e209d9b4ff7bf380"}, + {file = "pydantic_core-2.16.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b94cbda27267423411c928208e89adddf2ea5dd5f74b9528513f0358bba019cb"}, + {file = "pydantic_core-2.16.2-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:6db58c22ac6c81aeac33912fb1af0e930bc9774166cdd56eade913d5f2fff35e"}, + {file = "pydantic_core-2.16.2-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:396fdf88b1b503c9c59c84a08b6833ec0c3b5ad1a83230252a9e17b7dfb4cffc"}, + {file = "pydantic_core-2.16.2-cp312-none-win32.whl", hash = "sha256:7c31669e0c8cc68400ef0c730c3a1e11317ba76b892deeefaf52dcb41d56ed5d"}, + {file = "pydantic_core-2.16.2-cp312-none-win_amd64.whl", hash = "sha256:a3b7352b48fbc8b446b75f3069124e87f599d25afb8baa96a550256c031bb890"}, + {file = "pydantic_core-2.16.2-cp312-none-win_arm64.whl", hash = "sha256:a9e523474998fb33f7c1a4d55f5504c908d57add624599e095c20fa575b8d943"}, + {file = "pydantic_core-2.16.2-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:ae34418b6b389d601b31153b84dce480351a352e0bb763684a1b993d6be30f17"}, + {file = "pydantic_core-2.16.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:732bd062c9e5d9582a30e8751461c1917dd1ccbdd6cafb032f02c86b20d2e7ec"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4b52776a2e3230f4854907a1e0946eec04d41b1fc64069ee774876bbe0eab55"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ef551c053692b1e39e3f7950ce2296536728871110e7d75c4e7753fb30ca87f4"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ebb892ed8599b23fa8f1799e13a12c87a97a6c9d0f497525ce9858564c4575a4"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aa6c8c582036275997a733427b88031a32ffa5dfc3124dc25a730658c47a572f"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e4ba0884a91f1aecce75202473ab138724aa4fb26d7707f2e1fa6c3e68c84fbf"}, + {file = "pydantic_core-2.16.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:7924e54f7ce5d253d6160090ddc6df25ed2feea25bfb3339b424a9dd591688bc"}, + {file = "pydantic_core-2.16.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69a7b96b59322a81c2203be537957313b07dd333105b73db0b69212c7d867b4b"}, + {file = "pydantic_core-2.16.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:7e6231aa5bdacda78e96ad7b07d0c312f34ba35d717115f4b4bff6cb87224f0f"}, + {file = "pydantic_core-2.16.2-cp38-none-win32.whl", hash = "sha256:41dac3b9fce187a25c6253ec79a3f9e2a7e761eb08690e90415069ea4a68ff7a"}, + {file = "pydantic_core-2.16.2-cp38-none-win_amd64.whl", hash = "sha256:f685dbc1fdadb1dcd5b5e51e0a378d4685a891b2ddaf8e2bba89bd3a7144e44a"}, + {file = "pydantic_core-2.16.2-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:55749f745ebf154c0d63d46c8c58594d8894b161928aa41adbb0709c1fe78b77"}, + {file = "pydantic_core-2.16.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b30b0dd58a4509c3bd7eefddf6338565c4905406aee0c6e4a5293841411a1286"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:18de31781cdc7e7b28678df7c2d7882f9692ad060bc6ee3c94eb15a5d733f8f7"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5864b0242f74b9dd0b78fd39db1768bc3f00d1ffc14e596fd3e3f2ce43436a33"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b8f9186ca45aee030dc8234118b9c0784ad91a0bb27fc4e7d9d6608a5e3d386c"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc6f6c9be0ab6da37bc77c2dda5f14b1d532d5dbef00311ee6e13357a418e646"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aa057095f621dad24a1e906747179a69780ef45cc8f69e97463692adbcdae878"}, + {file = "pydantic_core-2.16.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6ad84731a26bcfb299f9eab56c7932d46f9cad51c52768cace09e92a19e4cf55"}, + {file = "pydantic_core-2.16.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:3b052c753c4babf2d1edc034c97851f867c87d6f3ea63a12e2700f159f5c41c3"}, + {file = "pydantic_core-2.16.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e0f686549e32ccdb02ae6f25eee40cc33900910085de6aa3790effd391ae10c2"}, + {file = "pydantic_core-2.16.2-cp39-none-win32.whl", hash = "sha256:7afb844041e707ac9ad9acad2188a90bffce2c770e6dc2318be0c9916aef1469"}, + {file = "pydantic_core-2.16.2-cp39-none-win_amd64.whl", hash = "sha256:9da90d393a8227d717c19f5397688a38635afec89f2e2d7af0df037f3249c39a"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5f60f920691a620b03082692c378661947d09415743e437a7478c309eb0e4f82"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:47924039e785a04d4a4fa49455e51b4eb3422d6eaacfde9fc9abf8fdef164e8a"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e6294e76b0380bb7a61eb8a39273c40b20beb35e8c87ee101062834ced19c545"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fe56851c3f1d6f5384b3051c536cc81b3a93a73faf931f404fef95217cf1e10d"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9d776d30cde7e541b8180103c3f294ef7c1862fd45d81738d156d00551005784"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:72f7919af5de5ecfaf1eba47bf9a5d8aa089a3340277276e5636d16ee97614d7"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:4bfcbde6e06c56b30668a0c872d75a7ef3025dc3c1823a13cf29a0e9b33f67e8"}, + {file = "pydantic_core-2.16.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ff7c97eb7a29aba230389a2661edf2e9e06ce616c7e35aa764879b6894a44b25"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:9b5f13857da99325dcabe1cc4e9e6a3d7b2e2c726248ba5dd4be3e8e4a0b6d0e"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:a7e41e3ada4cca5f22b478c08e973c930e5e6c7ba3588fb8e35f2398cdcc1545"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:60eb8ceaa40a41540b9acae6ae7c1f0a67d233c40dc4359c256ad2ad85bdf5e5"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7beec26729d496a12fd23cf8da9944ee338c8b8a17035a560b585c36fe81af20"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:22c5f022799f3cd6741e24f0443ead92ef42be93ffda0d29b2597208c94c3753"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:eca58e319f4fd6df004762419612122b2c7e7d95ffafc37e890252f869f3fb2a"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:ed957db4c33bc99895f3a1672eca7e80e8cda8bd1e29a80536b4ec2153fa9804"}, + {file = "pydantic_core-2.16.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:459c0d338cc55d099798618f714b21b7ece17eb1a87879f2da20a3ff4c7628e2"}, + {file = "pydantic_core-2.16.2.tar.gz", hash = "sha256:0ba503850d8b8dcc18391f10de896ae51d37fe5fe43dbfb6a35c5c5cad271a06"}, ] [package.dependencies] @@ -406,7 +358,6 @@ files = [ [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} -importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" @@ -437,83 +388,18 @@ files = [ {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] -[[package]] -name = "typed-ast" -version = "1.5.5" -description = "a fork of Python 2 and 3 ast modules with type comment support" -optional = false -python-versions = ">=3.6" -files = [ - {file = "typed_ast-1.5.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:4bc1efe0ce3ffb74784e06460f01a223ac1f6ab31c6bc0376a21184bf5aabe3b"}, - {file = "typed_ast-1.5.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5f7a8c46a8b333f71abd61d7ab9255440d4a588f34a21f126bbfc95f6049e686"}, - {file = "typed_ast-1.5.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:597fc66b4162f959ee6a96b978c0435bd63791e31e4f410622d19f1686d5e769"}, - {file = "typed_ast-1.5.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d41b7a686ce653e06c2609075d397ebd5b969d821b9797d029fccd71fdec8e04"}, - {file = "typed_ast-1.5.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:5fe83a9a44c4ce67c796a1b466c270c1272e176603d5e06f6afbc101a572859d"}, - {file = "typed_ast-1.5.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d5c0c112a74c0e5db2c75882a0adf3133adedcdbfd8cf7c9d6ed77365ab90a1d"}, - {file = "typed_ast-1.5.5-cp310-cp310-win_amd64.whl", hash = "sha256:e1a976ed4cc2d71bb073e1b2a250892a6e968ff02aa14c1f40eba4f365ffec02"}, - {file = "typed_ast-1.5.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c631da9710271cb67b08bd3f3813b7af7f4c69c319b75475436fcab8c3d21bee"}, - {file = "typed_ast-1.5.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b445c2abfecab89a932b20bd8261488d574591173d07827c1eda32c457358b18"}, - {file = "typed_ast-1.5.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc95ffaaab2be3b25eb938779e43f513e0e538a84dd14a5d844b8f2932593d88"}, - {file = "typed_ast-1.5.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:61443214d9b4c660dcf4b5307f15c12cb30bdfe9588ce6158f4a005baeb167b2"}, - {file = "typed_ast-1.5.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:6eb936d107e4d474940469e8ec5b380c9b329b5f08b78282d46baeebd3692dc9"}, - {file = "typed_ast-1.5.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e48bf27022897577d8479eaed64701ecaf0467182448bd95759883300ca818c8"}, - {file = "typed_ast-1.5.5-cp311-cp311-win_amd64.whl", hash = "sha256:83509f9324011c9a39faaef0922c6f720f9623afe3fe220b6d0b15638247206b"}, - {file = "typed_ast-1.5.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:44f214394fc1af23ca6d4e9e744804d890045d1643dd7e8229951e0ef39429b5"}, - {file = "typed_ast-1.5.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:118c1ce46ce58fda78503eae14b7664163aa735b620b64b5b725453696f2a35c"}, - {file = "typed_ast-1.5.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be4919b808efa61101456e87f2d4c75b228f4e52618621c77f1ddcaae15904fa"}, - {file = "typed_ast-1.5.5-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:fc2b8c4e1bc5cd96c1a823a885e6b158f8451cf6f5530e1829390b4d27d0807f"}, - {file = "typed_ast-1.5.5-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:16f7313e0a08c7de57f2998c85e2a69a642e97cb32f87eb65fbfe88381a5e44d"}, - {file = "typed_ast-1.5.5-cp36-cp36m-win_amd64.whl", hash = "sha256:2b946ef8c04f77230489f75b4b5a4a6f24c078be4aed241cfabe9cbf4156e7e5"}, - {file = "typed_ast-1.5.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2188bc33d85951ea4ddad55d2b35598b2709d122c11c75cffd529fbc9965508e"}, - {file = "typed_ast-1.5.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0635900d16ae133cab3b26c607586131269f88266954eb04ec31535c9a12ef1e"}, - {file = "typed_ast-1.5.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:57bfc3cf35a0f2fdf0a88a3044aafaec1d2f24d8ae8cd87c4f58d615fb5b6311"}, - {file = "typed_ast-1.5.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:fe58ef6a764de7b4b36edfc8592641f56e69b7163bba9f9c8089838ee596bfb2"}, - {file = "typed_ast-1.5.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:d09d930c2d1d621f717bb217bf1fe2584616febb5138d9b3e8cdd26506c3f6d4"}, - {file = "typed_ast-1.5.5-cp37-cp37m-win_amd64.whl", hash = "sha256:d40c10326893ecab8a80a53039164a224984339b2c32a6baf55ecbd5b1df6431"}, - {file = "typed_ast-1.5.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:fd946abf3c31fb50eee07451a6aedbfff912fcd13cf357363f5b4e834cc5e71a"}, - {file = "typed_ast-1.5.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ed4a1a42df8a3dfb6b40c3d2de109e935949f2f66b19703eafade03173f8f437"}, - {file = "typed_ast-1.5.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:045f9930a1550d9352464e5149710d56a2aed23a2ffe78946478f7b5416f1ede"}, - {file = "typed_ast-1.5.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:381eed9c95484ceef5ced626355fdc0765ab51d8553fec08661dce654a935db4"}, - {file = "typed_ast-1.5.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:bfd39a41c0ef6f31684daff53befddae608f9daf6957140228a08e51f312d7e6"}, - {file = "typed_ast-1.5.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:8c524eb3024edcc04e288db9541fe1f438f82d281e591c548903d5b77ad1ddd4"}, - {file = "typed_ast-1.5.5-cp38-cp38-win_amd64.whl", hash = "sha256:7f58fabdde8dcbe764cef5e1a7fcb440f2463c1bbbec1cf2a86ca7bc1f95184b"}, - {file = "typed_ast-1.5.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:042eb665ff6bf020dd2243307d11ed626306b82812aba21836096d229fdc6a10"}, - {file = "typed_ast-1.5.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:622e4a006472b05cf6ef7f9f2636edc51bda670b7bbffa18d26b255269d3d814"}, - {file = "typed_ast-1.5.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1efebbbf4604ad1283e963e8915daa240cb4bf5067053cf2f0baadc4d4fb51b8"}, - {file = "typed_ast-1.5.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f0aefdd66f1784c58f65b502b6cf8b121544680456d1cebbd300c2c813899274"}, - {file = "typed_ast-1.5.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:48074261a842acf825af1968cd912f6f21357316080ebaca5f19abbb11690c8a"}, - {file = "typed_ast-1.5.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:429ae404f69dc94b9361bb62291885894b7c6fb4640d561179548c849f8492ba"}, - {file = "typed_ast-1.5.5-cp39-cp39-win_amd64.whl", hash = "sha256:335f22ccb244da2b5c296e6f96b06ee9bed46526db0de38d2f0e5a6597b81155"}, - {file = "typed_ast-1.5.5.tar.gz", hash = "sha256:94282f7a354f36ef5dbce0ef3467ebf6a258e370ab33d5b40c249fa996e590dd"}, -] - [[package]] name = "typing-extensions" -version = "4.7.1" -description = "Backported and Experimental Type Hints for Python 3.7+" +version = "4.9.0" +description = "Backported and Experimental Type Hints for Python 3.8+" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, - {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, + {file = "typing_extensions-4.9.0-py3-none-any.whl", hash = "sha256:af72aea155e91adfc61c3ae9e0e342dbc0cba726d6cba4b6c72c1f34e47291cd"}, + {file = "typing_extensions-4.9.0.tar.gz", hash = "sha256:23478f88c37f27d76ac8aee6c905017a143b0b1b886c3c9f66bc2fd94f9f5783"}, ] -[[package]] -name = "zipp" -version = "3.15.0" -description = "Backport of pathlib-compatible object wrapper for zip files" -optional = false -python-versions = ">=3.7" -files = [ - {file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"}, - {file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"}, -] - -[package.extras] -docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] - [metadata] lock-version = "2.0" -python-versions = "^3.7" -content-hash = "4ac84aae6b05a415337279868d39fe7ce44104dffcd6b159af9e12dcea350ba1" +python-versions = "^3.8" +content-hash = "3c8fae8de68e5484c48073bf191e51acbe3b9a32fd98e6b5e4d165e42a7fc7aa" diff --git a/pyproject.toml b/pyproject.toml index 776baf1..6f55cd9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "metriport" -version = "8.0.3-beta" +version = "0.0.329" description = "" readme = "README.md" authors = [] @@ -9,12 +9,13 @@ packages = [ ] [tool.poetry.dependencies] -python = "^3.7" +python = "^3.8" httpx = ">=0.21.2" -pydantic = ">= 1.9.2, < 2.5.0" +pydantic = ">= 1.9.2" +typing_extensions = ">= 4.0.0" [tool.poetry.dev-dependencies] -mypy = "0.971" +mypy = "^1.8.0" pytest = "^7.4.0" [build-system] diff --git a/src/metriport/__init__.py b/src/metriport/__init__.py index 60514b1..44084bc 100644 --- a/src/metriport/__init__.py +++ b/src/metriport/__init__.py @@ -1,8 +1,7 @@ # This file was auto-generated by Fern from our API Definition. -from . import commons -from . import fhir -from . import medical +from . import commons, fhir, medical +from .commons import Address, UsState from .environment import MetriportEnvironment -__all__ = ["MetriportEnvironment", "commons", "fhir", "medical"] +__all__ = ["Address", "MetriportEnvironment", "UsState", "commons", "fhir", "medical"] diff --git a/src/metriport/client.py b/src/metriport/client.py index ed9a2f8..ef65705 100644 --- a/src/metriport/client.py +++ b/src/metriport/client.py @@ -8,7 +8,31 @@ from .environment import MetriportEnvironment from .medical.client import AsyncMedicalClient, MedicalClient + class Metriport: + """ + Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propogate to these functions. + + Parameters: + - base_url: typing.Optional[str]. The base url to use for requests from the client. + + - environment: MetriportEnvironment. The environment to use for requests from the client. from .environment import MetriportEnvironment + + Defaults to MetriportEnvironment.PRODUCTION + + - api_key: str. + + - timeout: typing.Optional[float]. The timeout to be used, in seconds, for requests by default the timeout is 60 seconds. + + - httpx_client: typing.Optional[httpx.Client]. The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration. + --- + from metriport.client import Metriport + + client = Metriport( + api_key="YOUR_API_KEY", + ) + """ + def __init__( self, *, @@ -27,6 +51,29 @@ def __init__( class AsyncMetriport: + """ + Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propogate to these functions. + + Parameters: + - base_url: typing.Optional[str]. The base url to use for requests from the client. + + - environment: MetriportEnvironment. The environment to use for requests from the client. from .environment import MetriportEnvironment + + Defaults to MetriportEnvironment.PRODUCTION + + - api_key: str. + + - timeout: typing.Optional[float]. The timeout to be used, in seconds, for requests by default the timeout is 60 seconds. + + - httpx_client: typing.Optional[httpx.AsyncClient]. The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration. + --- + from metriport.client import AsyncMetriport + + client = AsyncMetriport( + api_key="YOUR_API_KEY", + ) + """ + def __init__( self, *, diff --git a/src/metriport/core/__init__.py b/src/metriport/core/__init__.py index 2414955..4c53b36 100644 --- a/src/metriport/core/__init__.py +++ b/src/metriport/core/__init__.py @@ -3,14 +3,19 @@ from .api_error import ApiError from .client_wrapper import AsyncClientWrapper, BaseClientWrapper, SyncClientWrapper from .datetime_utils import serialize_datetime +from .file import File, convert_file_dict_to_httpx_tuples from .jsonable_encoder import jsonable_encoder from .remove_none_from_dict import remove_none_from_dict +from .request_options import RequestOptions __all__ = [ "ApiError", "AsyncClientWrapper", "BaseClientWrapper", + "File", + "RequestOptions", "SyncClientWrapper", + "convert_file_dict_to_httpx_tuples", "jsonable_encoder", "remove_none_from_dict", "serialize_datetime", diff --git a/src/metriport/core/client_wrapper.py b/src/metriport/core/client_wrapper.py index 7195a47..c25447c 100644 --- a/src/metriport/core/client_wrapper.py +++ b/src/metriport/core/client_wrapper.py @@ -14,7 +14,7 @@ def get_headers(self) -> typing.Dict[str, str]: headers: typing.Dict[str, str] = { "X-Fern-Language": "Python", "X-Fern-SDK-Name": "metriport", - "X-Fern-SDK-Version": "8.0.2-beta", + "X-Fern-SDK-Version": "0.0.329", } headers["X-API-Key"] = self.api_key return headers diff --git a/src/metriport/core/file.py b/src/metriport/core/file.py new file mode 100644 index 0000000..cb0d40b --- /dev/null +++ b/src/metriport/core/file.py @@ -0,0 +1,38 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +# File typing inspired by the flexibility of types within the httpx library +# https://github.com/encode/httpx/blob/master/httpx/_types.py +FileContent = typing.Union[typing.IO[bytes], bytes, str] +File = typing.Union[ + # file (or bytes) + FileContent, + # (filename, file (or bytes)) + typing.Tuple[typing.Optional[str], FileContent], + # (filename, file (or bytes), content_type) + typing.Tuple[typing.Optional[str], FileContent, typing.Optional[str]], + # (filename, file (or bytes), content_type, headers) + typing.Tuple[typing.Optional[str], FileContent, typing.Optional[str], typing.Mapping[str, str]], +] + + +def convert_file_dict_to_httpx_tuples( + d: typing.Dict[str, typing.Union[File, typing.List[File]]] +) -> typing.List[typing.Tuple[str, File]]: + """ + The format we use is a list of tuples, where the first element is the + name of the file and the second is the file object. Typically HTTPX wants + a dict, but to be able to send lists of files, you have to use the list + approach (which also works for non-lists) + https://github.com/encode/httpx/pull/1032 + """ + + httpx_tuples = [] + for key, file_like in d.items(): + if isinstance(file_like, list): + for file_like_item in file_like: + httpx_tuples.append((key, file_like_item)) + else: + httpx_tuples.append((key, file_like)) + return httpx_tuples diff --git a/src/metriport/core/request_options.py b/src/metriport/core/request_options.py new file mode 100644 index 0000000..32e86b0 --- /dev/null +++ b/src/metriport/core/request_options.py @@ -0,0 +1,29 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing + +try: + from typing import NotRequired # type: ignore +except ImportError: + from typing_extensions import NotRequired # type: ignore + + +class RequestOptions(typing.TypedDict): + """ + Additional options for request-specific configuration when calling APIs via the SDK. + This is used primarily as an optional final parameter for service functions. + + Attributes: + - timeout_in_seconds: int. The number of seconds to await an API call before timing out. + + - additional_headers: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's header dict + + - additional_query_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's query parameters dict + + - additional_body_parameters: typing.Dict[str, typing.Any]. A dictionary containing additional parameters to spread into the request's body parameters dict + """ + + timeout_in_seconds: NotRequired[int] + additional_headers: NotRequired[typing.Dict[str, typing.Any]] + additional_query_parameters: NotRequired[typing.Dict[str, typing.Any]] + additional_body_parameters: NotRequired[typing.Dict[str, typing.Any]] diff --git a/src/metriport/fhir/types/access_policy.py b/src/metriport/fhir/types/access_policy.py index 75576b1..10e5189 100644 --- a/src/metriport/fhir/types/access_policy.py +++ b/src/metriport/fhir/types/access_policy.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .access_policy_ip_access_rule import AccessPolicyIpAccessRule from .access_policy_resource import AccessPolicyResource @@ -25,7 +23,7 @@ class AccessPolicy(pydantic.BaseModel): Access Policy for user or user group that defines how entities can or cannot access resources. """ - resource_type: typing_extensions.Literal["AccessPolicy"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["AccessPolicy"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/account.py b/src/metriport/fhir/types/account.py index 6455d88..06d1db8 100644 --- a/src/metriport/fhir/types/account.py +++ b/src/metriport/fhir/types/account.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .account_coverage import AccountCoverage from .account_guarantor import AccountGuarantor @@ -26,7 +24,7 @@ class Account(BaseResource): A financial tool for tracking value accrued for a particular purpose. In the healthcare field, used to track charges for a patient, cost centers, etc. """ - resource_type: typing_extensions.Literal["Account"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Account"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Unique identifier used to reference the account. Might or might not be intended for human use (e.g. credit card number)." ) diff --git a/src/metriport/fhir/types/activity_definition.py b/src/metriport/fhir/types/activity_definition.py index 331d4c5..e1c1dd3 100644 --- a/src/metriport/fhir/types/activity_definition.py +++ b/src/metriport/fhir/types/activity_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .activity_definition_dynamic_value import ActivityDefinitionDynamicValue from .activity_definition_participant import ActivityDefinitionParticipant @@ -40,7 +38,7 @@ class ActivityDefinition(BaseResource): This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context. """ - resource_type: typing_extensions.Literal["ActivityDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ActivityDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this activity definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this activity definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the activity definition is stored on different servers." ) diff --git a/src/metriport/fhir/types/adverse_event.py b/src/metriport/fhir/types/adverse_event.py index 9b90770..e983706 100644 --- a/src/metriport/fhir/types/adverse_event.py +++ b/src/metriport/fhir/types/adverse_event.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .adverse_event_actuality import AdverseEventActuality from .adverse_event_suspect_entity import AdverseEventSuspectEntity @@ -25,7 +23,7 @@ class AdverseEvent(BaseResource): Actual or potential/avoided event causing unintended physical injury resulting from or contributed to by medical care, a research study or other healthcare setting factors that requires additional monitoring, treatment, or hospitalization, or that results in death. """ - resource_type: typing_extensions.Literal["AdverseEvent"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["AdverseEvent"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[Identifier] = pydantic.Field( description="Business identifiers assigned to this adverse event by the performer or other systems which remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/agent.py b/src/metriport/fhir/types/agent.py index 4c0853c..7d16dbb 100644 --- a/src/metriport/fhir/types/agent.py +++ b/src/metriport/fhir/types/agent.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .agent_channel import AgentChannel from .agent_setting import AgentSetting @@ -27,7 +25,7 @@ class Agent(pydantic.BaseModel): Configuration details for an instance of the Medplum agent application. """ - resource_type: typing_extensions.Literal["Agent"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Agent"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/allergy_intolerance.py b/src/metriport/fhir/types/allergy_intolerance.py index 555664d..db2f24e 100644 --- a/src/metriport/fhir/types/allergy_intolerance.py +++ b/src/metriport/fhir/types/allergy_intolerance.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .age import Age from .allergy_intolerance_category_item import AllergyIntoleranceCategoryItem @@ -31,7 +29,7 @@ class AllergyIntolerance(BaseResource): Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance. """ - resource_type: typing_extensions.Literal["AllergyIntolerance"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["AllergyIntolerance"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/appointment.py b/src/metriport/fhir/types/appointment.py index f663e2a..72b6230 100644 --- a/src/metriport/fhir/types/appointment.py +++ b/src/metriport/fhir/types/appointment.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .appointment_participant import AppointmentParticipant from .appointment_status import AppointmentStatus @@ -29,7 +27,7 @@ class Appointment(BaseResource): A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s). """ - resource_type: typing_extensions.Literal["Appointment"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Appointment"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="This records identifiers associated with this appointment concern that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) diff --git a/src/metriport/fhir/types/appointment_response.py b/src/metriport/fhir/types/appointment_response.py index 4422f52..7ce1167 100644 --- a/src/metriport/fhir/types/appointment_response.py +++ b/src/metriport/fhir/types/appointment_response.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -24,7 +22,7 @@ class AppointmentResponse(BaseResource): A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection. """ - resource_type: typing_extensions.Literal["AppointmentResponse"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["AppointmentResponse"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="This records identifiers associated with this appointment response concern that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate." ) diff --git a/src/metriport/fhir/types/async_job.py b/src/metriport/fhir/types/async_job.py index 52329ba..485f1b6 100644 --- a/src/metriport/fhir/types/async_job.py +++ b/src/metriport/fhir/types/async_job.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .async_job_status import AsyncJobStatus from .code import Code @@ -24,7 +22,7 @@ class AsyncJob(pydantic.BaseModel): Contains details of long running asynchronous/background jobs. """ - resource_type: typing_extensions.Literal["AsyncJob"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["AsyncJob"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/audit_event.py b/src/metriport/fhir/types/audit_event.py index ee31560..5937c3f 100644 --- a/src/metriport/fhir/types/audit_event.py +++ b/src/metriport/fhir/types/audit_event.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .audit_event_action import AuditEventAction from .audit_event_agent import AuditEventAgent @@ -28,7 +26,7 @@ class AuditEvent(BaseResource): A record of an event made for purposes of maintaining a security log. Typical uses include detection of intrusion attempts and monitoring for inappropriate usage. """ - resource_type: typing_extensions.Literal["AuditEvent"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["AuditEvent"] = pydantic.Field(alias="resourceType") type: Coding = pydantic.Field( description="Identifier for a family of the event. For example, a menu item, program, rule, policy, function code, application name or URL. It identifies the performed function." ) diff --git a/src/metriport/fhir/types/basic.py b/src/metriport/fhir/types/basic.py index 8478cb1..67f5a85 100644 --- a/src/metriport/fhir/types/basic.py +++ b/src/metriport/fhir/types/basic.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -22,7 +20,7 @@ class Basic(BaseResource): Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification. """ - resource_type: typing_extensions.Literal["Basic"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Basic"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifier assigned to the resource for business purposes, outside the context of FHIR." ) diff --git a/src/metriport/fhir/types/binary.py b/src/metriport/fhir/types/binary.py index 2078291..3b0def0 100644 --- a/src/metriport/fhir/types/binary.py +++ b/src/metriport/fhir/types/binary.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_64_binary import Base64Binary from .code import Code @@ -24,7 +22,7 @@ class Binary(pydantic.BaseModel): A resource that represents the data of a single raw artifact as digital content accessible in its native format. A Binary resource can contain any content, whether text, image, pdf, zip archive, etc. """ - resource_type: typing_extensions.Literal["Binary"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Binary"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/biologically_derived_product.py b/src/metriport/fhir/types/biologically_derived_product.py index 97e40b4..a4e4aaf 100644 --- a/src/metriport/fhir/types/biologically_derived_product.py +++ b/src/metriport/fhir/types/biologically_derived_product.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .biologically_derived_product_collection import BiologicallyDerivedProductCollection @@ -28,7 +26,7 @@ class BiologicallyDerivedProduct(BaseResource): A material substance originating from a biological entity intended to be transplanted or infused into another (possibly the same) biological entity. """ - resource_type: typing_extensions.Literal["BiologicallyDerivedProduct"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["BiologicallyDerivedProduct"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="This records identifiers associated with this biologically derived product instance that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." ) diff --git a/src/metriport/fhir/types/body_structure.py b/src/metriport/fhir/types/body_structure.py index a9a542a..26f1854 100644 --- a/src/metriport/fhir/types/body_structure.py +++ b/src/metriport/fhir/types/body_structure.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .base_resource import BaseResource @@ -23,7 +21,7 @@ class BodyStructure(BaseResource): Record details about an anatomical structure. This resource may be used when a coded concept does not provide the necessary detail needed for the use case. """ - resource_type: typing_extensions.Literal["BodyStructure"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["BodyStructure"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifier for this instance of the anatomical structure." ) diff --git a/src/metriport/fhir/types/bot.py b/src/metriport/fhir/types/bot.py index 2b865a1..f6c171f 100644 --- a/src/metriport/fhir/types/bot.py +++ b/src/metriport/fhir/types/bot.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .bot_audit_event_destination_item import BotAuditEventDestinationItem @@ -29,7 +27,7 @@ class Bot(pydantic.BaseModel): Bot account for automated actions. """ - resource_type: typing_extensions.Literal["Bot"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Bot"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/bulk_data_export.py b/src/metriport/fhir/types/bulk_data_export.py index 7bed10f..639e4b2 100644 --- a/src/metriport/fhir/types/bulk_data_export.py +++ b/src/metriport/fhir/types/bulk_data_export.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .bulk_data_export_deleted import BulkDataExportDeleted from .bulk_data_export_error import BulkDataExportError @@ -27,7 +25,7 @@ class BulkDataExport(pydantic.BaseModel): User specific configuration for the Medplum application. """ - resource_type: typing_extensions.Literal["BulkDataExport"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["BulkDataExport"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/bundle.py b/src/metriport/fhir/types/bundle.py index ff36682..7ab2238 100644 --- a/src/metriport/fhir/types/bundle.py +++ b/src/metriport/fhir/types/bundle.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .bundle_entry import BundleEntry from .bundle_link import BundleLink @@ -29,7 +27,7 @@ class Bundle(pydantic.BaseModel): A container for a collection of resources. """ - resource_type: typing_extensions.Literal["Bundle"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Bundle"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/capability_statement.py b/src/metriport/fhir/types/capability_statement.py index 634922c..c94f572 100644 --- a/src/metriport/fhir/types/capability_statement.py +++ b/src/metriport/fhir/types/capability_statement.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -35,7 +33,7 @@ class CapabilityStatement(BaseResource): A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation. """ - resource_type: typing_extensions.Literal["CapabilityStatement"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CapabilityStatement"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this capability statement when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this capability statement is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the capability statement is stored on different servers." ) diff --git a/src/metriport/fhir/types/care_plan.py b/src/metriport/fhir/types/care_plan.py index c5a2f10..ac45b1a 100644 --- a/src/metriport/fhir/types/care_plan.py +++ b/src/metriport/fhir/types/care_plan.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -29,7 +27,7 @@ class CarePlan(BaseResource): Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions. """ - resource_type: typing_extensions.Literal["CarePlan"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CarePlan"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifiers assigned to this care plan by the performer or other systems which remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/care_team.py b/src/metriport/fhir/types/care_team.py index 3037466..725f7cc 100644 --- a/src/metriport/fhir/types/care_team.py +++ b/src/metriport/fhir/types/care_team.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -27,7 +25,7 @@ class CareTeam(BaseResource): The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care for a patient. """ - resource_type: typing_extensions.Literal["CareTeam"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CareTeam"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifiers assigned to this care team by the performer or other systems which remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/catalog_entry.py b/src/metriport/fhir/types/catalog_entry.py index e5d4b00..366ef06 100644 --- a/src/metriport/fhir/types/catalog_entry.py +++ b/src/metriport/fhir/types/catalog_entry.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .catalog_entry_related_entry import CatalogEntryRelatedEntry @@ -26,7 +24,7 @@ class CatalogEntry(BaseResource): Catalog entries are wrappers that contextualize items included in a catalog. """ - resource_type: typing_extensions.Literal["CatalogEntry"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CatalogEntry"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Used in supporting different identifiers for the same product, e.g. manufacturer code and retailer code." ) diff --git a/src/metriport/fhir/types/charge_item.py b/src/metriport/fhir/types/charge_item.py index cda32c3..e782866 100644 --- a/src/metriport/fhir/types/charge_item.py +++ b/src/metriport/fhir/types/charge_item.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -33,7 +31,7 @@ class ChargeItem(BaseResource): The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation. """ - resource_type: typing_extensions.Literal["ChargeItem"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ChargeItem"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifiers assigned to this event performer or other systems." ) diff --git a/src/metriport/fhir/types/charge_item_definition.py b/src/metriport/fhir/types/charge_item_definition.py index 7c9b540..5f25b88 100644 --- a/src/metriport/fhir/types/charge_item_definition.py +++ b/src/metriport/fhir/types/charge_item_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -32,7 +30,7 @@ class ChargeItemDefinition(BaseResource): The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system. """ - resource_type: typing_extensions.Literal["ChargeItemDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ChargeItemDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this charge item definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this charge item definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the charge item definition is stored on different servers." ) diff --git a/src/metriport/fhir/types/claim.py b/src/metriport/fhir/types/claim.py index 7034674..2e473e1 100644 --- a/src/metriport/fhir/types/claim.py +++ b/src/metriport/fhir/types/claim.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .claim_accident import ClaimAccident @@ -36,7 +34,7 @@ class Claim(BaseResource): A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement. """ - resource_type: typing_extensions.Literal["Claim"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Claim"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="A unique identifier assigned to this claim." ) diff --git a/src/metriport/fhir/types/claim_response.py b/src/metriport/fhir/types/claim_response.py index cfdad56..1f638cd 100644 --- a/src/metriport/fhir/types/claim_response.py +++ b/src/metriport/fhir/types/claim_response.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .base_resource import BaseResource @@ -34,7 +32,7 @@ class ClaimResponse(BaseResource): This resource provides the adjudication details from the processing of a Claim resource. """ - resource_type: typing_extensions.Literal["ClaimResponse"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ClaimResponse"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="A unique identifier assigned to this claim response." ) diff --git a/src/metriport/fhir/types/client_application.py b/src/metriport/fhir/types/client_application.py index 10221dd..f191727 100644 --- a/src/metriport/fhir/types/client_application.py +++ b/src/metriport/fhir/types/client_application.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -23,7 +21,7 @@ class ClientApplication(pydantic.BaseModel): Medplum client application for automated access. """ - resource_type: typing_extensions.Literal["ClientApplication"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ClientApplication"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/clinical_impression.py b/src/metriport/fhir/types/clinical_impression.py index c1de0db..c3bf759 100644 --- a/src/metriport/fhir/types/clinical_impression.py +++ b/src/metriport/fhir/types/clinical_impression.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -29,7 +27,7 @@ class ClinicalImpression(BaseResource): A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter, but this varies greatly depending on the clinical workflow. This resource is called "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score. """ - resource_type: typing_extensions.Literal["ClinicalImpression"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ClinicalImpression"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifiers assigned to this clinical impression by the performer or other systems which remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/code_system.py b/src/metriport/fhir/types/code_system.py index 93a32f0..7a82f82 100644 --- a/src/metriport/fhir/types/code_system.py +++ b/src/metriport/fhir/types/code_system.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -34,7 +32,7 @@ class CodeSystem(BaseResource): The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content. """ - resource_type: typing_extensions.Literal["CodeSystem"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CodeSystem"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this code system when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this code system is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the code system is stored on different servers. This is used in [Coding](datatypes.html#Coding).system." ) diff --git a/src/metriport/fhir/types/communication.py b/src/metriport/fhir/types/communication.py index 199e1b6..eb6d5a1 100644 --- a/src/metriport/fhir/types/communication.py +++ b/src/metriport/fhir/types/communication.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -28,7 +26,7 @@ class Communication(BaseResource): An occurrence of information being transmitted; e.g. an alert that was sent to a responsible provider, a public health agency that was notified about a reportable condition. """ - resource_type: typing_extensions.Literal["Communication"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Communication"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifiers assigned to this communication by the performer or other systems which remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/communication_request.py b/src/metriport/fhir/types/communication_request.py index 08dd6a2..4798717 100644 --- a/src/metriport/fhir/types/communication_request.py +++ b/src/metriport/fhir/types/communication_request.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -27,7 +25,7 @@ class CommunicationRequest(BaseResource): A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition. """ - resource_type: typing_extensions.Literal["CommunicationRequest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CommunicationRequest"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifiers assigned to this communication request by the performer or other systems which remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/compartment_definition.py b/src/metriport/fhir/types/compartment_definition.py index 5c9194f..13f23c6 100644 --- a/src/metriport/fhir/types/compartment_definition.py +++ b/src/metriport/fhir/types/compartment_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .compartment_definition_code import CompartmentDefinitionCode @@ -27,7 +25,7 @@ class CompartmentDefinition(BaseResource): A compartment definition that defines how resources are accessed on a server. """ - resource_type: typing_extensions.Literal["CompartmentDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CompartmentDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this compartment definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this compartment definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the compartment definition is stored on different servers." ) diff --git a/src/metriport/fhir/types/composition.py b/src/metriport/fhir/types/composition.py index 701d775..f65204d 100644 --- a/src/metriport/fhir/types/composition.py +++ b/src/metriport/fhir/types/composition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -29,7 +27,7 @@ class Composition(BaseResource): A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.). """ - resource_type: typing_extensions.Literal["Composition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Composition"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[Identifier] = pydantic.Field( description="A version-independent identifier for the Composition. This identifier stays constant as the composition is changed over time." ) diff --git a/src/metriport/fhir/types/concept_map.py b/src/metriport/fhir/types/concept_map.py index 5fb7146..e3d946a 100644 --- a/src/metriport/fhir/types/concept_map.py +++ b/src/metriport/fhir/types/concept_map.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -28,7 +26,7 @@ class ConceptMap(BaseResource): A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models. """ - resource_type: typing_extensions.Literal["ConceptMap"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ConceptMap"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this concept map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this concept map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the concept map is stored on different servers." ) diff --git a/src/metriport/fhir/types/condition.py b/src/metriport/fhir/types/condition.py index 849c071..f7bc8ae 100644 --- a/src/metriport/fhir/types/condition.py +++ b/src/metriport/fhir/types/condition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .age import Age from .annotation import Annotation @@ -29,7 +27,7 @@ class Condition(BaseResource): A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern. """ - resource_type: typing_extensions.Literal["Condition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Condition"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifiers assigned to this condition by the performer or other systems which remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/consent.py b/src/metriport/fhir/types/consent.py index 603ea9b..750187b 100644 --- a/src/metriport/fhir/types/consent.py +++ b/src/metriport/fhir/types/consent.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .base_resource import BaseResource @@ -28,7 +26,7 @@ class Consent(BaseResource): A record of a healthcare consumer’s choices, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time. """ - resource_type: typing_extensions.Literal["Consent"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Consent"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Unique identifier for this copy of the Consent Statement." ) diff --git a/src/metriport/fhir/types/contract.py b/src/metriport/fhir/types/contract.py index 9929cd8..805a282 100644 --- a/src/metriport/fhir/types/contract.py +++ b/src/metriport/fhir/types/contract.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .base_resource import BaseResource @@ -33,7 +31,7 @@ class Contract(BaseResource): Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement. """ - resource_type: typing_extensions.Literal["Contract"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Contract"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Unique identifier for this Contract or a derivative that references a Source Contract." ) diff --git a/src/metriport/fhir/types/coverage.py b/src/metriport/fhir/types/coverage.py index 88b55c5..713f619 100644 --- a/src/metriport/fhir/types/coverage.py +++ b/src/metriport/fhir/types/coverage.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -27,7 +25,7 @@ class Coverage(BaseResource): Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment. """ - resource_type: typing_extensions.Literal["Coverage"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Coverage"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="A unique identifier assigned to this coverage." ) diff --git a/src/metriport/fhir/types/coverage_eligibility_request.py b/src/metriport/fhir/types/coverage_eligibility_request.py index a6c827a..5285592 100644 --- a/src/metriport/fhir/types/coverage_eligibility_request.py +++ b/src/metriport/fhir/types/coverage_eligibility_request.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -29,7 +27,7 @@ class CoverageEligibilityRequest(BaseResource): The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy. """ - resource_type: typing_extensions.Literal["CoverageEligibilityRequest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CoverageEligibilityRequest"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="A unique identifier assigned to this coverage eligiblity request." ) diff --git a/src/metriport/fhir/types/coverage_eligibility_response.py b/src/metriport/fhir/types/coverage_eligibility_response.py index 9ae44c1..15ef1ba 100644 --- a/src/metriport/fhir/types/coverage_eligibility_response.py +++ b/src/metriport/fhir/types/coverage_eligibility_response.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -29,7 +27,7 @@ class CoverageEligibilityResponse(BaseResource): This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource. """ - resource_type: typing_extensions.Literal["CoverageEligibilityResponse"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["CoverageEligibilityResponse"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="A unique identifier assigned to this coverage eligiblity request." ) diff --git a/src/metriport/fhir/types/detected_issue.py b/src/metriport/fhir/types/detected_issue.py index 128233c..a3deca4 100644 --- a/src/metriport/fhir/types/detected_issue.py +++ b/src/metriport/fhir/types/detected_issue.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -28,7 +26,7 @@ class DetectedIssue(BaseResource): Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, etc. """ - resource_type: typing_extensions.Literal["DetectedIssue"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DetectedIssue"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifier associated with the detected issue record." ) diff --git a/src/metriport/fhir/types/device.py b/src/metriport/fhir/types/device.py index b41c17a..03f574b 100644 --- a/src/metriport/fhir/types/device.py +++ b/src/metriport/fhir/types/device.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -32,7 +30,7 @@ class Device(BaseResource): A type of a manufactured item that is used in the provision of healthcare without being substantially changed through that activity. The device may be a medical or non-medical device. """ - resource_type: typing_extensions.Literal["Device"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Device"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Unique instance identifiers assigned to a device by manufacturers other organizations or owners." ) diff --git a/src/metriport/fhir/types/device_definition.py b/src/metriport/fhir/types/device_definition.py index 2e7966c..18f1dfb 100644 --- a/src/metriport/fhir/types/device_definition.py +++ b/src/metriport/fhir/types/device_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -35,7 +33,7 @@ class DeviceDefinition(BaseResource): The characteristics, operational status and capabilities of a medical-related component of a medical device. """ - resource_type: typing_extensions.Literal["DeviceDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DeviceDefinition"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Unique instance identifiers assigned to a device by the software, manufacturers, other organizations or owners. For example: handle ID." ) diff --git a/src/metriport/fhir/types/device_metric.py b/src/metriport/fhir/types/device_metric.py index 1fdea77..11ab2ee 100644 --- a/src/metriport/fhir/types/device_metric.py +++ b/src/metriport/fhir/types/device_metric.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -27,7 +25,7 @@ class DeviceMetric(BaseResource): Describes a measurement, calculation or setting capability of a medical device. """ - resource_type: typing_extensions.Literal["DeviceMetric"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DeviceMetric"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Unique instance identifiers assigned to a device by the device or gateway software, manufacturers, other organizations or owners. For example: handle ID." ) diff --git a/src/metriport/fhir/types/device_request.py b/src/metriport/fhir/types/device_request.py index e72beec..bf37437 100644 --- a/src/metriport/fhir/types/device_request.py +++ b/src/metriport/fhir/types/device_request.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -30,7 +28,7 @@ class DeviceRequest(BaseResource): Represents a request for a patient to employ a medical device. The device may be an implantable device, or an external assistive device, such as a walker. """ - resource_type: typing_extensions.Literal["DeviceRequest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DeviceRequest"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifiers assigned to this order by the orderer or by the receiver." ) diff --git a/src/metriport/fhir/types/device_use_statement.py b/src/metriport/fhir/types/device_use_statement.py index 72ed6e4..a012264 100644 --- a/src/metriport/fhir/types/device_use_statement.py +++ b/src/metriport/fhir/types/device_use_statement.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -27,7 +25,7 @@ class DeviceUseStatement(BaseResource): A record of a device being used by a patient where the record is the result of a report from the patient or another clinician. """ - resource_type: typing_extensions.Literal["DeviceUseStatement"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DeviceUseStatement"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="An external identifier for this statement such as an IRI." ) diff --git a/src/metriport/fhir/types/diagnostic_report.py b/src/metriport/fhir/types/diagnostic_report.py index 017089b..e964406 100644 --- a/src/metriport/fhir/types/diagnostic_report.py +++ b/src/metriport/fhir/types/diagnostic_report.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .base_resource import BaseResource @@ -27,7 +25,7 @@ class DiagnosticReport(BaseResource): The findings and interpretation of diagnostic tests performed on patients, groups of patients, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting and provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. """ - resource_type: typing_extensions.Literal["DiagnosticReport"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DiagnosticReport"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifiers assigned to this report by the performer or other systems." ) diff --git a/src/metriport/fhir/types/document_manifest.py b/src/metriport/fhir/types/document_manifest.py index 2b00838..32d8c0e 100644 --- a/src/metriport/fhir/types/document_manifest.py +++ b/src/metriport/fhir/types/document_manifest.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -26,7 +24,7 @@ class DocumentManifest(BaseResource): A collection of documents compiled for a purpose together with metadata that applies to the collection. """ - resource_type: typing_extensions.Literal["DocumentManifest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DocumentManifest"] = pydantic.Field(alias="resourceType") master_identifier: typing.Optional[Identifier] = pydantic.Field( alias="masterIdentifier", description="A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.", diff --git a/src/metriport/fhir/types/document_reference.py b/src/metriport/fhir/types/document_reference.py index 16594af..9a908e2 100644 --- a/src/metriport/fhir/types/document_reference.py +++ b/src/metriport/fhir/types/document_reference.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -28,7 +26,7 @@ class DocumentReference(BaseResource): A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text. """ - resource_type: typing_extensions.Literal["DocumentReference"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DocumentReference"] = pydantic.Field(alias="resourceType") master_identifier: typing.Optional[Identifier] = pydantic.Field( alias="masterIdentifier", description="Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document.", diff --git a/src/metriport/fhir/types/domain_configuration.py b/src/metriport/fhir/types/domain_configuration.py index cbcfdee..4f93188 100644 --- a/src/metriport/fhir/types/domain_configuration.py +++ b/src/metriport/fhir/types/domain_configuration.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -23,7 +21,7 @@ class DomainConfiguration(pydantic.BaseModel): Domain specific configuration for the Medplum application. """ - resource_type: typing_extensions.Literal["DomainConfiguration"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["DomainConfiguration"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/effect_evidence_synthesis.py b/src/metriport/fhir/types/effect_evidence_synthesis.py index 66e4e02..18adf14 100644 --- a/src/metriport/fhir/types/effect_evidence_synthesis.py +++ b/src/metriport/fhir/types/effect_evidence_synthesis.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -35,7 +33,7 @@ class EffectEvidenceSynthesis(BaseResource): The EffectEvidenceSynthesis resource describes the difference in an outcome between exposures states in a population where the effect estimate is derived from a combination of research studies. """ - resource_type: typing_extensions.Literal["EffectEvidenceSynthesis"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["EffectEvidenceSynthesis"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this effect evidence synthesis when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this effect evidence synthesis is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the effect evidence synthesis is stored on different servers." ) diff --git a/src/metriport/fhir/types/encounter.py b/src/metriport/fhir/types/encounter.py index bab8357..74d9d75 100644 --- a/src/metriport/fhir/types/encounter.py +++ b/src/metriport/fhir/types/encounter.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -32,7 +30,7 @@ class Encounter(BaseResource): An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient. """ - resource_type: typing_extensions.Literal["Encounter"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Encounter"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifier(s) by which this encounter is known." ) diff --git a/src/metriport/fhir/types/endpoint.py b/src/metriport/fhir/types/endpoint.py index ad6cdf4..4a24982 100644 --- a/src/metriport/fhir/types/endpoint.py +++ b/src/metriport/fhir/types/endpoint.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -28,7 +26,7 @@ class Endpoint(BaseResource): The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b or a REST endpoint for another FHIR server. This may include any security context information. """ - resource_type: typing_extensions.Literal["Endpoint"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Endpoint"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifier for the organization that is used to identify the endpoint across multiple disparate systems." ) diff --git a/src/metriport/fhir/types/enrollment_request.py b/src/metriport/fhir/types/enrollment_request.py index 1d69eda..4ebec79 100644 --- a/src/metriport/fhir/types/enrollment_request.py +++ b/src/metriport/fhir/types/enrollment_request.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -23,7 +21,7 @@ class EnrollmentRequest(BaseResource): This resource provides the insurance enrollment details to the insurer regarding a specified coverage. """ - resource_type: typing_extensions.Literal["EnrollmentRequest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["EnrollmentRequest"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="The Response business identifier." ) diff --git a/src/metriport/fhir/types/enrollment_response.py b/src/metriport/fhir/types/enrollment_response.py index be2893e..a569abd 100644 --- a/src/metriport/fhir/types/enrollment_response.py +++ b/src/metriport/fhir/types/enrollment_response.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -24,7 +22,7 @@ class EnrollmentResponse(BaseResource): This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource. """ - resource_type: typing_extensions.Literal["EnrollmentResponse"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["EnrollmentResponse"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="The Response business identifier." ) diff --git a/src/metriport/fhir/types/episode_of_care.py b/src/metriport/fhir/types/episode_of_care.py index 71662f9..72b7b9c 100644 --- a/src/metriport/fhir/types/episode_of_care.py +++ b/src/metriport/fhir/types/episode_of_care.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -26,7 +24,7 @@ class EpisodeOfCare(BaseResource): An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time. """ - resource_type: typing_extensions.Literal["EpisodeOfCare"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["EpisodeOfCare"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="The EpisodeOfCare may be known by different identifiers for different contexts of use, such as when an external agency is tracking the Episode for funding purposes." ) diff --git a/src/metriport/fhir/types/event_definition.py b/src/metriport/fhir/types/event_definition.py index bb58977..4bef0a0 100644 --- a/src/metriport/fhir/types/event_definition.py +++ b/src/metriport/fhir/types/event_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -31,7 +29,7 @@ class EventDefinition(BaseResource): The EventDefinition resource provides a reusable description of when a particular event can occur. """ - resource_type: typing_extensions.Literal["EventDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["EventDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this event definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this event definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the event definition is stored on different servers." ) diff --git a/src/metriport/fhir/types/evidence.py b/src/metriport/fhir/types/evidence.py index d4ef1b9..1c6ce91 100644 --- a/src/metriport/fhir/types/evidence.py +++ b/src/metriport/fhir/types/evidence.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -31,7 +29,7 @@ class Evidence(BaseResource): The Evidence resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about. """ - resource_type: typing_extensions.Literal["Evidence"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Evidence"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this evidence when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence is stored on different servers." ) diff --git a/src/metriport/fhir/types/evidence_variable.py b/src/metriport/fhir/types/evidence_variable.py index d70c5b8..5c14452 100644 --- a/src/metriport/fhir/types/evidence_variable.py +++ b/src/metriport/fhir/types/evidence_variable.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -32,7 +30,7 @@ class EvidenceVariable(BaseResource): The EvidenceVariable resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about. """ - resource_type: typing_extensions.Literal["EvidenceVariable"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["EvidenceVariable"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this evidence variable when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this evidence variable is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the evidence variable is stored on different servers." ) diff --git a/src/metriport/fhir/types/example_scenario.py b/src/metriport/fhir/types/example_scenario.py index d3b607c..6c3ac1f 100644 --- a/src/metriport/fhir/types/example_scenario.py +++ b/src/metriport/fhir/types/example_scenario.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -31,7 +29,7 @@ class ExampleScenario(BaseResource): Example of workflow instance. """ - resource_type: typing_extensions.Literal["ExampleScenario"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ExampleScenario"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this example scenario when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this example scenario is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the example scenario is stored on different servers." ) diff --git a/src/metriport/fhir/types/explanation_of_benefit.py b/src/metriport/fhir/types/explanation_of_benefit.py index 4b5aa70..e0b579e 100644 --- a/src/metriport/fhir/types/explanation_of_benefit.py +++ b/src/metriport/fhir/types/explanation_of_benefit.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .base_resource import BaseResource @@ -43,7 +41,7 @@ class ExplanationOfBenefit(BaseResource): This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided. """ - resource_type: typing_extensions.Literal["ExplanationOfBenefit"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ExplanationOfBenefit"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="A unique identifier assigned to this explanation of benefit." ) diff --git a/src/metriport/fhir/types/family_member_history.py b/src/metriport/fhir/types/family_member_history.py index f70f047..e3c25f9 100644 --- a/src/metriport/fhir/types/family_member_history.py +++ b/src/metriport/fhir/types/family_member_history.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .age import Age from .annotation import Annotation @@ -31,7 +29,7 @@ class FamilyMemberHistory(BaseResource): Significant health conditions for a person related to the patient relevant in the context of care for the patient. """ - resource_type: typing_extensions.Literal["FamilyMemberHistory"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["FamilyMemberHistory"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifiers assigned to this family member history by the performer or other systems which remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/flag.py b/src/metriport/fhir/types/flag.py index 5f801ee..fd61cc4 100644 --- a/src/metriport/fhir/types/flag.py +++ b/src/metriport/fhir/types/flag.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -24,7 +22,7 @@ class Flag(BaseResource): Prospective warnings of potential issues when providing care to the patient. """ - resource_type: typing_extensions.Literal["Flag"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Flag"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifiers assigned to this flag by the performer or other systems which remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/goal.py b/src/metriport/fhir/types/goal.py index c03e42a..7478647 100644 --- a/src/metriport/fhir/types/goal.py +++ b/src/metriport/fhir/types/goal.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -25,7 +23,7 @@ class Goal(BaseResource): Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc. """ - resource_type: typing_extensions.Literal["Goal"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Goal"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifiers assigned to this goal by the performer or other systems which remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/graph_definition.py b/src/metriport/fhir/types/graph_definition.py index eccae72..f1da43f 100644 --- a/src/metriport/fhir/types/graph_definition.py +++ b/src/metriport/fhir/types/graph_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -29,7 +27,7 @@ class GraphDefinition(BaseResource): A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set. """ - resource_type: typing_extensions.Literal["GraphDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["GraphDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this graph definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this graph definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the graph definition is stored on different servers." ) diff --git a/src/metriport/fhir/types/group.py b/src/metriport/fhir/types/group.py index 88993f1..3f144d0 100644 --- a/src/metriport/fhir/types/group.py +++ b/src/metriport/fhir/types/group.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -26,7 +24,7 @@ class Group(BaseResource): Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization. """ - resource_type: typing_extensions.Literal["Group"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Group"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="A unique business identifier for this group." ) diff --git a/src/metriport/fhir/types/guidance_response.py b/src/metriport/fhir/types/guidance_response.py index 4522df8..497a8ec 100644 --- a/src/metriport/fhir/types/guidance_response.py +++ b/src/metriport/fhir/types/guidance_response.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -26,7 +24,7 @@ class GuidanceResponse(BaseResource): A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken. """ - resource_type: typing_extensions.Literal["GuidanceResponse"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["GuidanceResponse"] = pydantic.Field(alias="resourceType") request_identifier: typing.Optional[Identifier] = pydantic.Field( alias="requestIdentifier", description="The identifier of the request associated with this response. If an identifier was given as part of the request, it will be reproduced here to enable the requester to more easily identify the response in a multi-request scenario.", diff --git a/src/metriport/fhir/types/healthcare_service.py b/src/metriport/fhir/types/healthcare_service.py index 501e803..53c6a54 100644 --- a/src/metriport/fhir/types/healthcare_service.py +++ b/src/metriport/fhir/types/healthcare_service.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .base_resource import BaseResource @@ -28,7 +26,7 @@ class HealthcareService(BaseResource): The details of a healthcare service available at a location. """ - resource_type: typing_extensions.Literal["HealthcareService"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["HealthcareService"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="External identifiers for this item." ) diff --git a/src/metriport/fhir/types/imaging_study.py b/src/metriport/fhir/types/imaging_study.py index 14afcb6..1e0f663 100644 --- a/src/metriport/fhir/types/imaging_study.py +++ b/src/metriport/fhir/types/imaging_study.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -28,7 +26,7 @@ class ImagingStudy(BaseResource): Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context. A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities. """ - resource_type: typing_extensions.Literal["ImagingStudy"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ImagingStudy"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifiers for the ImagingStudy such as DICOM Study Instance UID, and Accession Number." ) diff --git a/src/metriport/fhir/types/immunization.py b/src/metriport/fhir/types/immunization.py index 6a5f156..2613584 100644 --- a/src/metriport/fhir/types/immunization.py +++ b/src/metriport/fhir/types/immunization.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -30,7 +28,7 @@ class Immunization(BaseResource): Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party. """ - resource_type: typing_extensions.Literal["Immunization"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Immunization"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="A unique identifier assigned to this immunization record." ) diff --git a/src/metriport/fhir/types/immunization_evaluation.py b/src/metriport/fhir/types/immunization_evaluation.py index a311f98..83bb4b1 100644 --- a/src/metriport/fhir/types/immunization_evaluation.py +++ b/src/metriport/fhir/types/immunization_evaluation.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -24,7 +22,7 @@ class ImmunizationEvaluation(BaseResource): Describes a comparison of an immunization event against published recommendations to determine if the administration is "valid" in relation to those recommendations. """ - resource_type: typing_extensions.Literal["ImmunizationEvaluation"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ImmunizationEvaluation"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="A unique identifier assigned to this immunization evaluation record." ) diff --git a/src/metriport/fhir/types/immunization_recommendation.py b/src/metriport/fhir/types/immunization_recommendation.py index 9e79f07..6ee0a68 100644 --- a/src/metriport/fhir/types/immunization_recommendation.py +++ b/src/metriport/fhir/types/immunization_recommendation.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .date_time import DateTime @@ -23,7 +21,7 @@ class ImmunizationRecommendation(BaseResource): A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification. """ - resource_type: typing_extensions.Literal["ImmunizationRecommendation"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ImmunizationRecommendation"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="A unique identifier assigned to this particular recommendation record." ) diff --git a/src/metriport/fhir/types/implementation_guide.py b/src/metriport/fhir/types/implementation_guide.py index 5305c55..e77b873 100644 --- a/src/metriport/fhir/types/implementation_guide.py +++ b/src/metriport/fhir/types/implementation_guide.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -33,7 +31,7 @@ class ImplementationGuide(BaseResource): A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts. """ - resource_type: typing_extensions.Literal["ImplementationGuide"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ImplementationGuide"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this implementation guide is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the implementation guide is stored on different servers." ) diff --git a/src/metriport/fhir/types/insurance_plan.py b/src/metriport/fhir/types/insurance_plan.py index f98719e..48b9d3d 100644 --- a/src/metriport/fhir/types/insurance_plan.py +++ b/src/metriport/fhir/types/insurance_plan.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -27,7 +25,7 @@ class InsurancePlan(BaseResource): Details of a Health Insurance product/plan provided by an organization. """ - resource_type: typing_extensions.Literal["InsurancePlan"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["InsurancePlan"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifiers assigned to this health insurance product which remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/invoice.py b/src/metriport/fhir/types/invoice.py index fa5c85e..586ccdd 100644 --- a/src/metriport/fhir/types/invoice.py +++ b/src/metriport/fhir/types/invoice.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -30,7 +28,7 @@ class Invoice(BaseResource): Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose. """ - resource_type: typing_extensions.Literal["Invoice"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Invoice"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifier of this Invoice, often used for reference in correspondence about this invoice or for tracking of payments." ) diff --git a/src/metriport/fhir/types/json_web_key.py b/src/metriport/fhir/types/json_web_key.py index 7e247cd..f7566ba 100644 --- a/src/metriport/fhir/types/json_web_key.py +++ b/src/metriport/fhir/types/json_web_key.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -22,7 +20,7 @@ class JsonWebKey(pydantic.BaseModel): A JSON object that represents a cryptographic key. The members of the object represent properties of the key, including its value. """ - resource_type: typing_extensions.Literal["JsonWebKey"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["JsonWebKey"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/library.py b/src/metriport/fhir/types/library.py index 4a3dbb9..8c515fe 100644 --- a/src/metriport/fhir/types/library.py +++ b/src/metriport/fhir/types/library.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .attachment import Attachment from .base_resource import BaseResource @@ -33,7 +31,7 @@ class Library(BaseResource): The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets. """ - resource_type: typing_extensions.Literal["Library"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Library"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this library when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this library is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the library is stored on different servers." ) diff --git a/src/metriport/fhir/types/linkage.py b/src/metriport/fhir/types/linkage.py index f378537..557c202 100644 --- a/src/metriport/fhir/types/linkage.py +++ b/src/metriport/fhir/types/linkage.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .linkage_item import LinkageItem @@ -21,7 +19,7 @@ class Linkage(BaseResource): Identifies two or more records (resource instances) that refer to the same real-world "occurrence". """ - resource_type: typing_extensions.Literal["Linkage"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Linkage"] = pydantic.Field(alias="resourceType") active: typing.Optional[bool] = pydantic.Field( description='Indicates whether the asserted set of linkages are considered to be "in effect".' ) diff --git a/src/metriport/fhir/types/list.py b/src/metriport/fhir/types/list.py index 5f95903..361ff96 100644 --- a/src/metriport/fhir/types/list.py +++ b/src/metriport/fhir/types/list.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -27,7 +25,7 @@ class List(BaseResource): A list is a curated collection of resources. """ - resource_type: typing_extensions.Literal["List"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["List"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifier for the List assigned for business purposes outside the context of FHIR." ) diff --git a/src/metriport/fhir/types/location.py b/src/metriport/fhir/types/location.py index 4814962..8f39da5 100644 --- a/src/metriport/fhir/types/location.py +++ b/src/metriport/fhir/types/location.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .address import Address from .base_resource import BaseResource @@ -29,7 +27,7 @@ class Location(BaseResource): Details and position information for a physical place where services are provided and resources and participants may be stored, found, contained, or accommodated. """ - resource_type: typing_extensions.Literal["Location"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Location"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Unique code or number identifying the location to its users." ) diff --git a/src/metriport/fhir/types/login.py b/src/metriport/fhir/types/login.py index bc6749f..9282938 100644 --- a/src/metriport/fhir/types/login.py +++ b/src/metriport/fhir/types/login.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -26,7 +24,7 @@ class Login(pydantic.BaseModel): Login event and session details. """ - resource_type: typing_extensions.Literal["Login"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Login"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/measure.py b/src/metriport/fhir/types/measure.py index 4ce8622..ae6c867 100644 --- a/src/metriport/fhir/types/measure.py +++ b/src/metriport/fhir/types/measure.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -33,7 +31,7 @@ class Measure(BaseResource): The Measure resource provides the definition of a quality measure. """ - resource_type: typing_extensions.Literal["Measure"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Measure"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this measure when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this measure is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the measure is stored on different servers." ) diff --git a/src/metriport/fhir/types/measure_report.py b/src/metriport/fhir/types/measure_report.py index 3eafa3e..3e90ecd 100644 --- a/src/metriport/fhir/types/measure_report.py +++ b/src/metriport/fhir/types/measure_report.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -28,7 +26,7 @@ class MeasureReport(BaseResource): The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation. """ - resource_type: typing_extensions.Literal["MeasureReport"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MeasureReport"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="A formal identifier that is used to identify this MeasureReport when it is represented in other formats or referenced in a specification, model, design or an instance." ) diff --git a/src/metriport/fhir/types/media.py b/src/metriport/fhir/types/media.py index 1937c1d..97be1a4 100644 --- a/src/metriport/fhir/types/media.py +++ b/src/metriport/fhir/types/media.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .attachment import Attachment @@ -29,7 +27,7 @@ class Media(BaseResource): A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference. """ - resource_type: typing_extensions.Literal["Media"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Media"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers." ) diff --git a/src/metriport/fhir/types/medication.py b/src/metriport/fhir/types/medication.py index 8b99402..e46a79b 100644 --- a/src/metriport/fhir/types/medication.py +++ b/src/metriport/fhir/types/medication.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -26,7 +24,7 @@ class Medication(BaseResource): This resource is primarily used for the identification and definition of a medication for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use. """ - resource_type: typing_extensions.Literal["Medication"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Medication"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifier for this medication." ) diff --git a/src/metriport/fhir/types/medication_administration.py b/src/metriport/fhir/types/medication_administration.py index 086e0c8..db86404 100644 --- a/src/metriport/fhir/types/medication_administration.py +++ b/src/metriport/fhir/types/medication_administration.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -28,7 +26,7 @@ class MedicationAdministration(BaseResource): Describes the event of a patient consuming or otherwise being administered a medication. This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner. """ - resource_type: typing_extensions.Literal["MedicationAdministration"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicationAdministration"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifiers associated with this Medication Administration that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/medication_dispense.py b/src/metriport/fhir/types/medication_dispense.py index 584347e..8252742 100644 --- a/src/metriport/fhir/types/medication_dispense.py +++ b/src/metriport/fhir/types/medication_dispense.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -29,7 +27,7 @@ class MedicationDispense(BaseResource): Indicates that a medication product is to be or has been dispensed for a named person/patient. This includes a description of the medication product (supply) provided and the instructions for administering the medication. The medication dispense is the result of a pharmacy system responding to a medication order. """ - resource_type: typing_extensions.Literal["MedicationDispense"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicationDispense"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifiers associated with this Medication Dispense that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/medication_knowledge.py b/src/metriport/fhir/types/medication_knowledge.py index d945632..a51c3d4 100644 --- a/src/metriport/fhir/types/medication_knowledge.py +++ b/src/metriport/fhir/types/medication_knowledge.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -35,7 +33,7 @@ class MedicationKnowledge(BaseResource): Information about a medication that is used to support knowledge. """ - resource_type: typing_extensions.Literal["MedicationKnowledge"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicationKnowledge"] = pydantic.Field(alias="resourceType") code: typing.Optional[CodeableConcept] = pydantic.Field( description="A code that specifies this medication, or a textual description if no code is available. Usage note: This could be a standard medication code such as a code from RxNorm, SNOMED CT, IDMP etc. It could also be a national or local formulary code, optionally with translations to other code systems." ) diff --git a/src/metriport/fhir/types/medication_request.py b/src/metriport/fhir/types/medication_request.py index ad1fe8e..21cf41b 100644 --- a/src/metriport/fhir/types/medication_request.py +++ b/src/metriport/fhir/types/medication_request.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -30,7 +28,7 @@ class MedicationRequest(BaseResource): An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationRequest" rather than "MedicationPrescription" or "MedicationOrder" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns. """ - resource_type: typing_extensions.Literal["MedicationRequest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicationRequest"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifiers associated with this medication request that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/medication_statement.py b/src/metriport/fhir/types/medication_statement.py index 00647cf..7662456 100644 --- a/src/metriport/fhir/types/medication_statement.py +++ b/src/metriport/fhir/types/medication_statement.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -27,7 +25,7 @@ class MedicationStatement(BaseResource): A record of a medication that is being consumed by a patient. A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future. The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician. A common scenario where this information is captured is during the history taking process during a patient visit or stay. The medication information may come from sources such as the patient's memory, from a prescription bottle, or from a list of medications the patient, clinician or other party maintains. The primary difference between a medication statement and a medication administration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication. A medication statement is often, if not always, less specific. There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise. As stated earlier, the medication statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains. Medication administration is more formal and is not missing detailed information. """ - resource_type: typing_extensions.Literal["MedicationStatement"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicationStatement"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifiers associated with this Medication Statement that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/medicinal_product.py b/src/metriport/fhir/types/medicinal_product.py index 32f809a..6c0161c 100644 --- a/src/metriport/fhir/types/medicinal_product.py +++ b/src/metriport/fhir/types/medicinal_product.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -27,7 +25,7 @@ class MedicinalProduct(BaseResource): Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use). """ - resource_type: typing_extensions.Literal["MedicinalProduct"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProduct"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifier for this product. Could be an MPID." ) diff --git a/src/metriport/fhir/types/medicinal_product_authorization.py b/src/metriport/fhir/types/medicinal_product_authorization.py index b9bf1d8..40ce4ca 100644 --- a/src/metriport/fhir/types/medicinal_product_authorization.py +++ b/src/metriport/fhir/types/medicinal_product_authorization.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -28,7 +26,7 @@ class MedicinalProductAuthorization(BaseResource): The regulatory authorization of a medicinal product. """ - resource_type: typing_extensions.Literal["MedicinalProductAuthorization"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductAuthorization"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifier for the marketing authorization, as assigned by a regulator." ) diff --git a/src/metriport/fhir/types/medicinal_product_contraindication.py b/src/metriport/fhir/types/medicinal_product_contraindication.py index a9eaba4..43aa7c1 100644 --- a/src/metriport/fhir/types/medicinal_product_contraindication.py +++ b/src/metriport/fhir/types/medicinal_product_contraindication.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -23,7 +21,7 @@ class MedicinalProductContraindication(BaseResource): The clinical particulars - indications, contraindications etc. of a medicinal product, including for regulatory purposes. """ - resource_type: typing_extensions.Literal["MedicinalProductContraindication"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductContraindication"] = pydantic.Field(alias="resourceType") subject: typing.Optional[typing.List[Reference]] = pydantic.Field( description="The medication for which this is an indication." ) diff --git a/src/metriport/fhir/types/medicinal_product_indication.py b/src/metriport/fhir/types/medicinal_product_indication.py index c435bbc..10ada4e 100644 --- a/src/metriport/fhir/types/medicinal_product_indication.py +++ b/src/metriport/fhir/types/medicinal_product_indication.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -24,7 +22,7 @@ class MedicinalProductIndication(BaseResource): Indication for the Medicinal Product. """ - resource_type: typing_extensions.Literal["MedicinalProductIndication"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductIndication"] = pydantic.Field(alias="resourceType") subject: typing.Optional[typing.List[Reference]] = pydantic.Field( description="The medication for which this is an indication." ) diff --git a/src/metriport/fhir/types/medicinal_product_ingredient.py b/src/metriport/fhir/types/medicinal_product_ingredient.py index 81d8cac..fe73c36 100644 --- a/src/metriport/fhir/types/medicinal_product_ingredient.py +++ b/src/metriport/fhir/types/medicinal_product_ingredient.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -24,7 +22,7 @@ class MedicinalProductIngredient(BaseResource): An ingredient of a manufactured item or pharmaceutical product. """ - resource_type: typing_extensions.Literal["MedicinalProductIngredient"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductIngredient"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[Identifier] = pydantic.Field( description="The identifier(s) of this Ingredient that are assigned by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate." ) diff --git a/src/metriport/fhir/types/medicinal_product_interaction.py b/src/metriport/fhir/types/medicinal_product_interaction.py index 406cb24..da39a31 100644 --- a/src/metriport/fhir/types/medicinal_product_interaction.py +++ b/src/metriport/fhir/types/medicinal_product_interaction.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -22,7 +20,7 @@ class MedicinalProductInteraction(BaseResource): The interactions of the medicinal product with other medicinal products, or other forms of interactions. """ - resource_type: typing_extensions.Literal["MedicinalProductInteraction"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductInteraction"] = pydantic.Field(alias="resourceType") subject: typing.Optional[typing.List[Reference]] = pydantic.Field( description="The medication for which this is a described interaction." ) diff --git a/src/metriport/fhir/types/medicinal_product_manufactured.py b/src/metriport/fhir/types/medicinal_product_manufactured.py index 4bc0c0d..3278ef5 100644 --- a/src/metriport/fhir/types/medicinal_product_manufactured.py +++ b/src/metriport/fhir/types/medicinal_product_manufactured.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -23,7 +21,7 @@ class MedicinalProductManufactured(BaseResource): The manufactured item as contained in the packaged medicinal product. """ - resource_type: typing_extensions.Literal["MedicinalProductManufactured"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductManufactured"] = pydantic.Field(alias="resourceType") manufactured_dose_form: CodeableConcept = pydantic.Field( alias="manufacturedDoseForm", description="Dose form as manufactured and before any transformation into the pharmaceutical product.", diff --git a/src/metriport/fhir/types/medicinal_product_packaged.py b/src/metriport/fhir/types/medicinal_product_packaged.py index 04089f2..dca50ec 100644 --- a/src/metriport/fhir/types/medicinal_product_packaged.py +++ b/src/metriport/fhir/types/medicinal_product_packaged.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -25,7 +23,7 @@ class MedicinalProductPackaged(BaseResource): A medicinal product in a container or package. """ - resource_type: typing_extensions.Literal["MedicinalProductPackaged"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductPackaged"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field(description="Unique identifier.") subject: typing.Optional[typing.List[Reference]] = pydantic.Field( description="The product with this is a pack for." diff --git a/src/metriport/fhir/types/medicinal_product_pharmaceutical.py b/src/metriport/fhir/types/medicinal_product_pharmaceutical.py index 4ab2102..222df8c 100644 --- a/src/metriport/fhir/types/medicinal_product_pharmaceutical.py +++ b/src/metriport/fhir/types/medicinal_product_pharmaceutical.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -26,7 +24,7 @@ class MedicinalProductPharmaceutical(BaseResource): A pharmaceutical product described in terms of its composition and dose form. """ - resource_type: typing_extensions.Literal["MedicinalProductPharmaceutical"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductPharmaceutical"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="An identifier for the pharmaceutical medicinal product." ) diff --git a/src/metriport/fhir/types/medicinal_product_undesirable_effect.py b/src/metriport/fhir/types/medicinal_product_undesirable_effect.py index b21e410..5c0d409 100644 --- a/src/metriport/fhir/types/medicinal_product_undesirable_effect.py +++ b/src/metriport/fhir/types/medicinal_product_undesirable_effect.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -22,7 +20,7 @@ class MedicinalProductUndesirableEffect(BaseResource): Describe the undesirable effects of the medicinal product. """ - resource_type: typing_extensions.Literal["MedicinalProductUndesirableEffect"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MedicinalProductUndesirableEffect"] = pydantic.Field(alias="resourceType") subject: typing.Optional[typing.List[Reference]] = pydantic.Field( description="The medication for which this is an indication." ) diff --git a/src/metriport/fhir/types/message_definition.py b/src/metriport/fhir/types/message_definition.py index 665bb13..feaa52d 100644 --- a/src/metriport/fhir/types/message_definition.py +++ b/src/metriport/fhir/types/message_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -33,7 +31,7 @@ class MessageDefinition(BaseResource): Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted. """ - resource_type: typing_extensions.Literal["MessageDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MessageDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="The business identifier that is used to reference the MessageDefinition and _is_ expected to be consistent from server to server." ) diff --git a/src/metriport/fhir/types/message_header.py b/src/metriport/fhir/types/message_header.py index 5c7477f..8ecc80b 100644 --- a/src/metriport/fhir/types/message_header.py +++ b/src/metriport/fhir/types/message_header.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -26,7 +24,7 @@ class MessageHeader(BaseResource): The header for a message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle. """ - resource_type: typing_extensions.Literal["MessageHeader"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MessageHeader"] = pydantic.Field(alias="resourceType") event_coding: typing.Optional[Coding] = pydantic.Field( alias="eventCoding", description='Code that identifies the event this message represents and connects it with its definition. Events defined as part of the FHIR specification have the system value "http://terminology.hl7.org/CodeSystem/message-events". Alternatively uri to the EventDefinition.', diff --git a/src/metriport/fhir/types/molecular_sequence.py b/src/metriport/fhir/types/molecular_sequence.py index 9149529..d3cf332 100644 --- a/src/metriport/fhir/types/molecular_sequence.py +++ b/src/metriport/fhir/types/molecular_sequence.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .identifier import Identifier @@ -28,7 +26,7 @@ class MolecularSequence(BaseResource): Raw data describing a biological sequence. """ - resource_type: typing_extensions.Literal["MolecularSequence"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["MolecularSequence"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="A unique identifier for this particular sequence instance. This is a FHIR-defined id." ) diff --git a/src/metriport/fhir/types/naming_system.py b/src/metriport/fhir/types/naming_system.py index fa3e150..cd232ba 100644 --- a/src/metriport/fhir/types/naming_system.py +++ b/src/metriport/fhir/types/naming_system.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -27,7 +25,7 @@ class NamingSystem(BaseResource): A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc. Represents a "System" used within the Identifier and Coding data types. """ - resource_type: typing_extensions.Literal["NamingSystem"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["NamingSystem"] = pydantic.Field(alias="resourceType") name: typing.Optional[str] = pydantic.Field( description="A natural language name identifying the naming system. This name should be usable as an identifier for the module by machine processing applications such as code generation." ) diff --git a/src/metriport/fhir/types/nutrition_order.py b/src/metriport/fhir/types/nutrition_order.py index 5f33085..7436852 100644 --- a/src/metriport/fhir/types/nutrition_order.py +++ b/src/metriport/fhir/types/nutrition_order.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -30,7 +28,7 @@ class NutritionOrder(BaseResource): A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident. """ - resource_type: typing_extensions.Literal["NutritionOrder"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["NutritionOrder"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifiers assigned to this order by the order sender or by the order receiver." ) diff --git a/src/metriport/fhir/types/observation.py b/src/metriport/fhir/types/observation.py index 6348a3f..4b12a73 100644 --- a/src/metriport/fhir/types/observation.py +++ b/src/metriport/fhir/types/observation.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -33,7 +31,7 @@ class Observation(BaseResource): Measurements and simple assertions made about a patient, device or other subject. """ - resource_type: typing_extensions.Literal["Observation"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Observation"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="A unique identifier assigned to this observation." ) diff --git a/src/metriport/fhir/types/observation_definition.py b/src/metriport/fhir/types/observation_definition.py index 525b8ac..b455837 100644 --- a/src/metriport/fhir/types/observation_definition.py +++ b/src/metriport/fhir/types/observation_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -25,7 +23,7 @@ class ObservationDefinition(BaseResource): Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service. """ - resource_type: typing_extensions.Literal["ObservationDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ObservationDefinition"] = pydantic.Field(alias="resourceType") publisher: typing.Optional[Reference] = pydantic.Field( description="The name of the individual or organization that published the ObservationDefinition." ) diff --git a/src/metriport/fhir/types/operation_definition.py b/src/metriport/fhir/types/operation_definition.py index d193576..ea91192 100644 --- a/src/metriport/fhir/types/operation_definition.py +++ b/src/metriport/fhir/types/operation_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -31,7 +29,7 @@ class OperationDefinition(BaseResource): A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction). """ - resource_type: typing_extensions.Literal["OperationDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["OperationDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this operation definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this operation definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the operation definition is stored on different servers." ) diff --git a/src/metriport/fhir/types/operation_outcome.py b/src/metriport/fhir/types/operation_outcome.py index d6b5d6f..e2b8e70 100644 --- a/src/metriport/fhir/types/operation_outcome.py +++ b/src/metriport/fhir/types/operation_outcome.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .operation_outcome_issue import OperationOutcomeIssue @@ -20,7 +18,7 @@ class OperationOutcome(BaseResource): A collection of error, warning, or information messages that result from a system action. """ - resource_type: typing_extensions.Literal["OperationOutcome"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["OperationOutcome"] = pydantic.Field(alias="resourceType") issue: typing.List[OperationOutcomeIssue] = pydantic.Field( description="An error, warning, or information message that results from a system action." ) diff --git a/src/metriport/fhir/types/organization.py b/src/metriport/fhir/types/organization.py index ff07b3f..cf0f023 100644 --- a/src/metriport/fhir/types/organization.py +++ b/src/metriport/fhir/types/organization.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .address import Address from .base_resource import BaseResource @@ -25,7 +23,7 @@ class Organization(BaseResource): A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc. """ - resource_type: typing_extensions.Literal["Organization"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Organization"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifier for the organization that is used to identify the organization across multiple disparate systems." ) diff --git a/src/metriport/fhir/types/organization_affiliation.py b/src/metriport/fhir/types/organization_affiliation.py index f035861..ebb69d5 100644 --- a/src/metriport/fhir/types/organization_affiliation.py +++ b/src/metriport/fhir/types/organization_affiliation.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -24,7 +22,7 @@ class OrganizationAffiliation(BaseResource): Defines an affiliation/assotiation/relationship between 2 distinct oganizations, that is not a part-of relationship/sub-division relationship. """ - resource_type: typing_extensions.Literal["OrganizationAffiliation"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["OrganizationAffiliation"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifiers that are specific to this role." ) diff --git a/src/metriport/fhir/types/parameters.py b/src/metriport/fhir/types/parameters.py index cde208f..100e602 100644 --- a/src/metriport/fhir/types/parameters.py +++ b/src/metriport/fhir/types/parameters.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -23,7 +21,7 @@ class Parameters(pydantic.BaseModel): This resource is a non-persisted resource used to pass information into and back from an [operation](operations.html). It has no other use, and there is no RESTful endpoint associated with it. """ - resource_type: typing_extensions.Literal["Parameters"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Parameters"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/password_change_request.py b/src/metriport/fhir/types/password_change_request.py index 54bd5f4..8b26019 100644 --- a/src/metriport/fhir/types/password_change_request.py +++ b/src/metriport/fhir/types/password_change_request.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -24,7 +22,7 @@ class PasswordChangeRequest(pydantic.BaseModel): Password change request for the 'forgot password' flow. """ - resource_type: typing_extensions.Literal["PasswordChangeRequest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["PasswordChangeRequest"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/patient.py b/src/metriport/fhir/types/patient.py index a49f018..8a1f818 100644 --- a/src/metriport/fhir/types/patient.py +++ b/src/metriport/fhir/types/patient.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .address import Address from .attachment import Attachment @@ -30,7 +28,7 @@ class Patient(BaseResource): Demographics and other administrative information about an individual or animal receiving care or other health-related services. """ - resource_type: typing_extensions.Literal["Patient"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Patient"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field(description="An identifier for this patient.") active: typing.Optional[bool] = pydantic.Field( description="Whether this patient record is in active use. Many systems use this property to mark as non-current patients, such as those that have not been seen for a period of time based on an organization's business rules. It is often used to filter patient lists to exclude inactive patients Deceased patients may also be marked as inactive for the same reasons, but may be active for some time after death." diff --git a/src/metriport/fhir/types/payment_notice.py b/src/metriport/fhir/types/payment_notice.py index bb1d2ca..982630c 100644 --- a/src/metriport/fhir/types/payment_notice.py +++ b/src/metriport/fhir/types/payment_notice.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -25,7 +23,7 @@ class PaymentNotice(BaseResource): This resource provides the status of the payment for goods and services rendered, and the request and response resource references. """ - resource_type: typing_extensions.Literal["PaymentNotice"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["PaymentNotice"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="A unique identifier assigned to this payment notice." ) diff --git a/src/metriport/fhir/types/payment_reconciliation.py b/src/metriport/fhir/types/payment_reconciliation.py index 0610d93..48afa35 100644 --- a/src/metriport/fhir/types/payment_reconciliation.py +++ b/src/metriport/fhir/types/payment_reconciliation.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -29,7 +27,7 @@ class PaymentReconciliation(BaseResource): This resource provides the details including amount of a payment and allocates the payment items being paid. """ - resource_type: typing_extensions.Literal["PaymentReconciliation"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["PaymentReconciliation"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="A unique identifier assigned to this payment reconciliation." ) diff --git a/src/metriport/fhir/types/person.py b/src/metriport/fhir/types/person.py index a229160..cf0c46c 100644 --- a/src/metriport/fhir/types/person.py +++ b/src/metriport/fhir/types/person.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .address import Address from .attachment import Attachment @@ -27,7 +25,7 @@ class Person(BaseResource): Demographics and administrative information about a person independent of a specific health-related context. """ - resource_type: typing_extensions.Literal["Person"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Person"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifier for a person within a particular scope." ) diff --git a/src/metriport/fhir/types/plan_definition.py b/src/metriport/fhir/types/plan_definition.py index eb3422f..6ef6a6a 100644 --- a/src/metriport/fhir/types/plan_definition.py +++ b/src/metriport/fhir/types/plan_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -33,7 +31,7 @@ class PlanDefinition(BaseResource): This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols. """ - resource_type: typing_extensions.Literal["PlanDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["PlanDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this plan definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the plan definition is stored on different servers." ) diff --git a/src/metriport/fhir/types/practitioner.py b/src/metriport/fhir/types/practitioner.py index 0b15f2d..ce15c9c 100644 --- a/src/metriport/fhir/types/practitioner.py +++ b/src/metriport/fhir/types/practitioner.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .address import Address from .attachment import Attachment @@ -27,7 +25,7 @@ class Practitioner(BaseResource): A person who is directly or indirectly involved in the provisioning of healthcare. """ - resource_type: typing_extensions.Literal["Practitioner"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Practitioner"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="An identifier that applies to this person in this role." ) diff --git a/src/metriport/fhir/types/practitioner_role.py b/src/metriport/fhir/types/practitioner_role.py index 13da77c..9cf7102 100644 --- a/src/metriport/fhir/types/practitioner_role.py +++ b/src/metriport/fhir/types/practitioner_role.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -26,7 +24,7 @@ class PractitionerRole(BaseResource): A specific set of Roles/Locations/specialties/services that a practitioner may perform at an organization for a period of time. """ - resource_type: typing_extensions.Literal["PractitionerRole"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["PractitionerRole"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business Identifiers that are specific to a role/location." ) diff --git a/src/metriport/fhir/types/procedure.py b/src/metriport/fhir/types/procedure.py index 5509896..f729ae5 100644 --- a/src/metriport/fhir/types/procedure.py +++ b/src/metriport/fhir/types/procedure.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .age import Age from .annotation import Annotation @@ -31,7 +29,7 @@ class Procedure(BaseResource): An action that is or was performed on or for a patient. This can be a physical intervention like an operation, or less invasive like long term services, counseling, or hypnotherapy. """ - resource_type: typing_extensions.Literal["Procedure"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Procedure"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifiers assigned to this procedure by the performer or other systems which remain constant as the resource is updated and is propagated from server to server." ) diff --git a/src/metriport/fhir/types/project.py b/src/metriport/fhir/types/project.py index 4bea5be..425353a 100644 --- a/src/metriport/fhir/types/project.py +++ b/src/metriport/fhir/types/project.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -26,7 +24,7 @@ class Project(pydantic.BaseModel): Encapsulation of resources for a specific project or organization. """ - resource_type: typing_extensions.Literal["Project"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Project"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/project_membership.py b/src/metriport/fhir/types/project_membership.py index 51ed87e..e766330 100644 --- a/src/metriport/fhir/types/project_membership.py +++ b/src/metriport/fhir/types/project_membership.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -24,7 +22,7 @@ class ProjectMembership(pydantic.BaseModel): Medplum project membership. A project membership grants a user access to a project. """ - resource_type: typing_extensions.Literal["ProjectMembership"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ProjectMembership"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/provenance.py b/src/metriport/fhir/types/provenance.py index 85becfe..8b5a318 100644 --- a/src/metriport/fhir/types/provenance.py +++ b/src/metriport/fhir/types/provenance.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -27,7 +25,7 @@ class Provenance(BaseResource): Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies. """ - resource_type: typing_extensions.Literal["Provenance"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Provenance"] = pydantic.Field(alias="resourceType") target: typing.List[Reference] = pydantic.Field( description="The Reference(s) that were generated or updated by the activity described in this resource. A provenance can point to more than one target if multiple resources were created/updated by the same activity." ) diff --git a/src/metriport/fhir/types/questionnaire.py b/src/metriport/fhir/types/questionnaire.py index d3c8a0e..815e96f 100644 --- a/src/metriport/fhir/types/questionnaire.py +++ b/src/metriport/fhir/types/questionnaire.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -32,7 +30,7 @@ class Questionnaire(BaseResource): A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection. """ - resource_type: typing_extensions.Literal["Questionnaire"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Questionnaire"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this questionnaire when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this questionnaire is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the questionnaire is stored on different servers." ) diff --git a/src/metriport/fhir/types/questionnaire_response.py b/src/metriport/fhir/types/questionnaire_response.py index 1430be7..7222b03 100644 --- a/src/metriport/fhir/types/questionnaire_response.py +++ b/src/metriport/fhir/types/questionnaire_response.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -25,7 +23,7 @@ class QuestionnaireResponse(BaseResource): A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to. """ - resource_type: typing_extensions.Literal["QuestionnaireResponse"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["QuestionnaireResponse"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[Identifier] = pydantic.Field( description="A business identifier assigned to a particular completed (or partially completed) questionnaire." ) diff --git a/src/metriport/fhir/types/related_person.py b/src/metriport/fhir/types/related_person.py index 12d8074..c99af8c 100644 --- a/src/metriport/fhir/types/related_person.py +++ b/src/metriport/fhir/types/related_person.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .address import Address from .attachment import Attachment @@ -29,7 +27,7 @@ class RelatedPerson(BaseResource): Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process. """ - resource_type: typing_extensions.Literal["RelatedPerson"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["RelatedPerson"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifier for a person within a particular scope." ) diff --git a/src/metriport/fhir/types/request_group.py b/src/metriport/fhir/types/request_group.py index 465b168..0856d8a 100644 --- a/src/metriport/fhir/types/request_group.py +++ b/src/metriport/fhir/types/request_group.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -28,7 +26,7 @@ class RequestGroup(BaseResource): A group of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one". """ - resource_type: typing_extensions.Literal["RequestGroup"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["RequestGroup"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Allows a service to provide a unique, business identifier for the request." ) diff --git a/src/metriport/fhir/types/research_definition.py b/src/metriport/fhir/types/research_definition.py index c5b4f35..e7747e2 100644 --- a/src/metriport/fhir/types/research_definition.py +++ b/src/metriport/fhir/types/research_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -31,7 +29,7 @@ class ResearchDefinition(BaseResource): The ResearchDefinition resource describes the conditional state (population and any exposures being compared within the population) and outcome (if specified) that the knowledge (evidence, assertion, recommendation) is about. """ - resource_type: typing_extensions.Literal["ResearchDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ResearchDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this research definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this research definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research definition is stored on different servers." ) diff --git a/src/metriport/fhir/types/research_element_definition.py b/src/metriport/fhir/types/research_element_definition.py index 8f606ad..a8b28d0 100644 --- a/src/metriport/fhir/types/research_element_definition.py +++ b/src/metriport/fhir/types/research_element_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -34,7 +32,7 @@ class ResearchElementDefinition(BaseResource): The ResearchElementDefinition resource describes a "PICO" element that knowledge (evidence, assertion, recommendation) is about. """ - resource_type: typing_extensions.Literal["ResearchElementDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ResearchElementDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this research element definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this research element definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the research element definition is stored on different servers." ) diff --git a/src/metriport/fhir/types/research_study.py b/src/metriport/fhir/types/research_study.py index 1d29f72..ddbb903 100644 --- a/src/metriport/fhir/types/research_study.py +++ b/src/metriport/fhir/types/research_study.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -30,7 +28,7 @@ class ResearchStudy(BaseResource): A process where a researcher or organization plans and then executes a series of steps intended to increase the field of healthcare-related knowledge. This includes studies of safety, efficacy, comparative effectiveness and other information about medications, devices, therapies and other interventional and investigative techniques. A ResearchStudy involves the gathering of information about human or animal subjects. """ - resource_type: typing_extensions.Literal["ResearchStudy"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ResearchStudy"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifiers assigned to this research study by the sponsor or other systems." ) diff --git a/src/metriport/fhir/types/research_subject.py b/src/metriport/fhir/types/research_subject.py index 58a67ae..fa46019 100644 --- a/src/metriport/fhir/types/research_subject.py +++ b/src/metriport/fhir/types/research_subject.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .identifier import Identifier @@ -23,7 +21,7 @@ class ResearchSubject(BaseResource): A physical entity which is the primary unit of operational and/or administrative interest in a study. """ - resource_type: typing_extensions.Literal["ResearchSubject"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ResearchSubject"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifiers assigned to this research subject for a study." ) diff --git a/src/metriport/fhir/types/risk_assessment.py b/src/metriport/fhir/types/risk_assessment.py index f0c8155..180013e 100644 --- a/src/metriport/fhir/types/risk_assessment.py +++ b/src/metriport/fhir/types/risk_assessment.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -26,7 +24,7 @@ class RiskAssessment(BaseResource): An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome. """ - resource_type: typing_extensions.Literal["RiskAssessment"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["RiskAssessment"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifier assigned to the risk assessment." ) diff --git a/src/metriport/fhir/types/risk_evidence_synthesis.py b/src/metriport/fhir/types/risk_evidence_synthesis.py index 864fb3c..cda2cb3 100644 --- a/src/metriport/fhir/types/risk_evidence_synthesis.py +++ b/src/metriport/fhir/types/risk_evidence_synthesis.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -34,7 +32,7 @@ class RiskEvidenceSynthesis(BaseResource): The RiskEvidenceSynthesis resource describes the likelihood of an outcome in a population plus exposure state where the risk estimate is derived from a combination of research studies. """ - resource_type: typing_extensions.Literal["RiskEvidenceSynthesis"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["RiskEvidenceSynthesis"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this risk evidence synthesis when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this risk evidence synthesis is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the risk evidence synthesis is stored on different servers." ) diff --git a/src/metriport/fhir/types/schedule.py b/src/metriport/fhir/types/schedule.py index ac8039a..8c6780c 100644 --- a/src/metriport/fhir/types/schedule.py +++ b/src/metriport/fhir/types/schedule.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -23,7 +21,7 @@ class Schedule(BaseResource): A container for slots of time that may be available for booking appointments. """ - resource_type: typing_extensions.Literal["Schedule"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Schedule"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field(description="External Ids for this item.") active: typing.Optional[bool] = pydantic.Field( description="Whether this schedule record is in active use or should not be used (such as was entered in error)." diff --git a/src/metriport/fhir/types/search_parameter.py b/src/metriport/fhir/types/search_parameter.py index 8206cab..f4c0d81 100644 --- a/src/metriport/fhir/types/search_parameter.py +++ b/src/metriport/fhir/types/search_parameter.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -33,7 +31,7 @@ class SearchParameter(BaseResource): A search parameter that defines a named search item that can be used to search/filter on a resource. """ - resource_type: typing_extensions.Literal["SearchParameter"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SearchParameter"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this search parameter when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this search parameter is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the search parameter is stored on different servers." ) diff --git a/src/metriport/fhir/types/service_request.py b/src/metriport/fhir/types/service_request.py index 6eadc0d..1d79bd1 100644 --- a/src/metriport/fhir/types/service_request.py +++ b/src/metriport/fhir/types/service_request.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -32,7 +30,7 @@ class ServiceRequest(BaseResource): A record of a request for service such as diagnostic investigations, treatments, or operations to be performed. """ - resource_type: typing_extensions.Literal["ServiceRequest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ServiceRequest"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifiers assigned to this order instance by the orderer and/or the receiver and/or order fulfiller." ) diff --git a/src/metriport/fhir/types/slot.py b/src/metriport/fhir/types/slot.py index d0c3212..21fe2be 100644 --- a/src/metriport/fhir/types/slot.py +++ b/src/metriport/fhir/types/slot.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -24,7 +22,7 @@ class Slot(BaseResource): A slot of time on a schedule that may be available for booking appointments. """ - resource_type: typing_extensions.Literal["Slot"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Slot"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field(description="External Ids for this item.") service_category: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( alias="serviceCategory", diff --git a/src/metriport/fhir/types/smart_app_launch.py b/src/metriport/fhir/types/smart_app_launch.py index 3ff07b0..2307772 100644 --- a/src/metriport/fhir/types/smart_app_launch.py +++ b/src/metriport/fhir/types/smart_app_launch.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -23,7 +21,7 @@ class SmartAppLaunch(pydantic.BaseModel): This resource contains context details for a SMART App Launch. """ - resource_type: typing_extensions.Literal["SmartAppLaunch"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SmartAppLaunch"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/specimen.py b/src/metriport/fhir/types/specimen.py index ccfaa30..4c8c927 100644 --- a/src/metriport/fhir/types/specimen.py +++ b/src/metriport/fhir/types/specimen.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -28,7 +26,7 @@ class Specimen(BaseResource): A sample to be used for analysis. """ - resource_type: typing_extensions.Literal["Specimen"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Specimen"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field(description="Id for specimen.") accession_identifier: typing.Optional[Identifier] = pydantic.Field( alias="accessionIdentifier", diff --git a/src/metriport/fhir/types/specimen_definition.py b/src/metriport/fhir/types/specimen_definition.py index 0735a43..4ff8d4e 100644 --- a/src/metriport/fhir/types/specimen_definition.py +++ b/src/metriport/fhir/types/specimen_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -22,7 +20,7 @@ class SpecimenDefinition(BaseResource): A kind of specimen with associated set of requirements. """ - resource_type: typing_extensions.Literal["SpecimenDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SpecimenDefinition"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[Identifier] = pydantic.Field( description="A business identifier associated with the kind of specimen." ) diff --git a/src/metriport/fhir/types/structure_definition.py b/src/metriport/fhir/types/structure_definition.py index 1172ffe..1c7f532 100644 --- a/src/metriport/fhir/types/structure_definition.py +++ b/src/metriport/fhir/types/structure_definition.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -36,7 +34,7 @@ class StructureDefinition(BaseResource): A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types. """ - resource_type: typing_extensions.Literal["StructureDefinition"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["StructureDefinition"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this structure definition when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure definition is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure definition is stored on different servers." ) diff --git a/src/metriport/fhir/types/structure_map.py b/src/metriport/fhir/types/structure_map.py index b134296..f1f1746 100644 --- a/src/metriport/fhir/types/structure_map.py +++ b/src/metriport/fhir/types/structure_map.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .canonical import Canonical @@ -30,7 +28,7 @@ class StructureMap(BaseResource): A Map of relationships between 2 structures that can be used to transform data. """ - resource_type: typing_extensions.Literal["StructureMap"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["StructureMap"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this structure map when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this structure map is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the structure map is stored on different servers." ) diff --git a/src/metriport/fhir/types/subscription.py b/src/metriport/fhir/types/subscription.py index 4b06550..8680f83 100644 --- a/src/metriport/fhir/types/subscription.py +++ b/src/metriport/fhir/types/subscription.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .contact_point import ContactPoint @@ -23,7 +21,7 @@ class Subscription(BaseResource): The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system can take an appropriate action. """ - resource_type: typing_extensions.Literal["Subscription"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Subscription"] = pydantic.Field(alias="resourceType") status: typing.Optional[SubscriptionStatus] = pydantic.Field( description="The status of the subscription, which marks the server state for managing the subscription." ) diff --git a/src/metriport/fhir/types/substance.py b/src/metriport/fhir/types/substance.py index 95b48b9..a2efff0 100644 --- a/src/metriport/fhir/types/substance.py +++ b/src/metriport/fhir/types/substance.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -24,7 +22,7 @@ class Substance(BaseResource): A homogeneous material with a definite composition. """ - resource_type: typing_extensions.Literal["Substance"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Substance"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Unique identifier for the substance." ) diff --git a/src/metriport/fhir/types/substance_nucleic_acid.py b/src/metriport/fhir/types/substance_nucleic_acid.py index 3c6ff26..52b663c 100644 --- a/src/metriport/fhir/types/substance_nucleic_acid.py +++ b/src/metriport/fhir/types/substance_nucleic_acid.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -21,7 +19,7 @@ class SubstanceNucleicAcid(BaseResource): Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction. """ - resource_type: typing_extensions.Literal["SubstanceNucleicAcid"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SubstanceNucleicAcid"] = pydantic.Field(alias="resourceType") sequence_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="sequenceType", description="The type of the sequence shall be specified based on a controlled vocabulary.", diff --git a/src/metriport/fhir/types/substance_polymer.py b/src/metriport/fhir/types/substance_polymer.py index b993b09..0c7a24e 100644 --- a/src/metriport/fhir/types/substance_polymer.py +++ b/src/metriport/fhir/types/substance_polymer.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -22,7 +20,7 @@ class SubstancePolymer(BaseResource): Todo. """ - resource_type: typing_extensions.Literal["SubstancePolymer"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SubstancePolymer"] = pydantic.Field(alias="resourceType") class_: typing.Optional[CodeableConcept] = pydantic.Field(alias="class", description="Todo.") geometry: typing.Optional[CodeableConcept] = pydantic.Field(description="Todo.") copolymer_connectivity: typing.Optional[typing.List[CodeableConcept]] = pydantic.Field( diff --git a/src/metriport/fhir/types/substance_protein.py b/src/metriport/fhir/types/substance_protein.py index d448087..eb3d8f9 100644 --- a/src/metriport/fhir/types/substance_protein.py +++ b/src/metriport/fhir/types/substance_protein.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -21,7 +19,7 @@ class SubstanceProtein(BaseResource): A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators. """ - resource_type: typing_extensions.Literal["SubstanceProtein"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SubstanceProtein"] = pydantic.Field(alias="resourceType") sequence_type: typing.Optional[CodeableConcept] = pydantic.Field( alias="sequenceType", description="The SubstanceProtein descriptive elements will only be used when a complete or partial amino acid sequence is available or derivable from a nucleic acid sequence.", diff --git a/src/metriport/fhir/types/substance_reference_information.py b/src/metriport/fhir/types/substance_reference_information.py index dfe87e5..a8c3577 100644 --- a/src/metriport/fhir/types/substance_reference_information.py +++ b/src/metriport/fhir/types/substance_reference_information.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .substance_reference_information_classification import SubstanceReferenceInformationClassification @@ -23,7 +21,7 @@ class SubstanceReferenceInformation(BaseResource): Todo. """ - resource_type: typing_extensions.Literal["SubstanceReferenceInformation"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SubstanceReferenceInformation"] = pydantic.Field(alias="resourceType") comment: typing.Optional[str] = pydantic.Field(description="Todo.") gene: typing.Optional[typing.List[SubstanceReferenceInformationGene]] = pydantic.Field(description="Todo.") gene_element: typing.Optional[typing.List[SubstanceReferenceInformationGeneElement]] = pydantic.Field( diff --git a/src/metriport/fhir/types/substance_source_material.py b/src/metriport/fhir/types/substance_source_material.py index 2fc0ec1..e14980b 100644 --- a/src/metriport/fhir/types/substance_source_material.py +++ b/src/metriport/fhir/types/substance_source_material.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -24,7 +22,7 @@ class SubstanceSourceMaterial(BaseResource): Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex. """ - resource_type: typing_extensions.Literal["SubstanceSourceMaterial"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SubstanceSourceMaterial"] = pydantic.Field(alias="resourceType") source_material_class: typing.Optional[CodeableConcept] = pydantic.Field( alias="sourceMaterialClass", description="General high level classification of the source material specific to the origin of the material.", diff --git a/src/metriport/fhir/types/substance_specification.py b/src/metriport/fhir/types/substance_specification.py index 7646488..25f898a 100644 --- a/src/metriport/fhir/types/substance_specification.py +++ b/src/metriport/fhir/types/substance_specification.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -29,7 +27,7 @@ class SubstanceSpecification(BaseResource): The detailed description of a substance, typically at a level beyond what is used for prescribing. """ - resource_type: typing_extensions.Literal["SubstanceSpecification"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SubstanceSpecification"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[Identifier] = pydantic.Field(description="Identifier by which this substance is known.") type: typing.Optional[CodeableConcept] = pydantic.Field( description="High level categorization, e.g. polymer or nucleic acid." diff --git a/src/metriport/fhir/types/supply_delivery.py b/src/metriport/fhir/types/supply_delivery.py index b080851..e5d984b 100644 --- a/src/metriport/fhir/types/supply_delivery.py +++ b/src/metriport/fhir/types/supply_delivery.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -26,7 +24,7 @@ class SupplyDelivery(BaseResource): Record of delivery of what is supplied. """ - resource_type: typing_extensions.Literal["SupplyDelivery"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SupplyDelivery"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Identifier for the supply delivery event that is used to identify it across multiple disparate systems." ) diff --git a/src/metriport/fhir/types/supply_request.py b/src/metriport/fhir/types/supply_request.py index dd5f5fc..313cb8c 100644 --- a/src/metriport/fhir/types/supply_request.py +++ b/src/metriport/fhir/types/supply_request.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -29,7 +27,7 @@ class SupplyRequest(BaseResource): A record of a request for a medication, substance or device used in the healthcare setting. """ - resource_type: typing_extensions.Literal["SupplyRequest"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["SupplyRequest"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="Business identifiers assigned to this SupplyRequest by the author and/or other systems. These identifiers remain constant as the resource is updated and propagates from server to server." ) diff --git a/src/metriport/fhir/types/task.py b/src/metriport/fhir/types/task.py index d8d3db0..b451b7c 100644 --- a/src/metriport/fhir/types/task.py +++ b/src/metriport/fhir/types/task.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .annotation import Annotation from .base_resource import BaseResource @@ -33,7 +31,7 @@ class Task(BaseResource): A task to be performed. """ - resource_type: typing_extensions.Literal["Task"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["Task"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="The business identifier for this task." ) diff --git a/src/metriport/fhir/types/terminology_capabilities.py b/src/metriport/fhir/types/terminology_capabilities.py index c6fc4f3..866d656 100644 --- a/src/metriport/fhir/types/terminology_capabilities.py +++ b/src/metriport/fhir/types/terminology_capabilities.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -35,7 +33,7 @@ class TerminologyCapabilities(BaseResource): A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation. """ - resource_type: typing_extensions.Literal["TerminologyCapabilities"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["TerminologyCapabilities"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this terminology capabilities when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this terminology capabilities is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the terminology capabilities is stored on different servers." ) diff --git a/src/metriport/fhir/types/test_report.py b/src/metriport/fhir/types/test_report.py index d6c5c12..220465f 100644 --- a/src/metriport/fhir/types/test_report.py +++ b/src/metriport/fhir/types/test_report.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .date_time import DateTime @@ -29,7 +27,7 @@ class TestReport(BaseResource): A summary of information based on the results of executing a TestScript. """ - resource_type: typing_extensions.Literal["TestReport"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["TestReport"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[Identifier] = pydantic.Field( description="Identifier for the TestScript assigned for external purposes outside the context of FHIR." ) diff --git a/src/metriport/fhir/types/test_script.py b/src/metriport/fhir/types/test_script.py index effa4a9..a67c52b 100644 --- a/src/metriport/fhir/types/test_script.py +++ b/src/metriport/fhir/types/test_script.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -36,7 +34,7 @@ class TestScript(BaseResource): A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification. """ - resource_type: typing_extensions.Literal["TestScript"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["TestScript"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this test script when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this test script is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the test script is stored on different servers." ) diff --git a/src/metriport/fhir/types/user.py b/src/metriport/fhir/types/user.py index 25c9bba..fa564a8 100644 --- a/src/metriport/fhir/types/user.py +++ b/src/metriport/fhir/types/user.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -23,7 +21,7 @@ class User(pydantic.BaseModel): Representation of a human user of the system. """ - resource_type: typing_extensions.Literal["User"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["User"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/user_configuration.py b/src/metriport/fhir/types/user_configuration.py index f4c3c2c..ad05350 100644 --- a/src/metriport/fhir/types/user_configuration.py +++ b/src/metriport/fhir/types/user_configuration.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .code import Code from .id import Id @@ -25,7 +23,7 @@ class UserConfiguration(pydantic.BaseModel): User specific configuration for the Medplum application. """ - resource_type: typing_extensions.Literal["UserConfiguration"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["UserConfiguration"] = pydantic.Field(alias="resourceType") id: typing.Optional[Id] = pydantic.Field( description="The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes." ) diff --git a/src/metriport/fhir/types/value_set.py b/src/metriport/fhir/types/value_set.py index 921eaad..e31741f 100644 --- a/src/metriport/fhir/types/value_set.py +++ b/src/metriport/fhir/types/value_set.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .codeable_concept import CodeableConcept @@ -29,7 +27,7 @@ class ValueSet(BaseResource): A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html). """ - resource_type: typing_extensions.Literal["ValueSet"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["ValueSet"] = pydantic.Field(alias="resourceType") url: typing.Optional[Uri] = pydantic.Field( description="An absolute URI that is used to identify this value set when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which at which an authoritative instance of this value set is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the value set is stored on different servers." ) diff --git a/src/metriport/fhir/types/verification_result.py b/src/metriport/fhir/types/verification_result.py index 4df5a2f..cd87890 100644 --- a/src/metriport/fhir/types/verification_result.py +++ b/src/metriport/fhir/types/verification_result.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -27,7 +25,7 @@ class VerificationResult(BaseResource): Describes validation requirements, source(s), status and dates for one or more elements. """ - resource_type: typing_extensions.Literal["VerificationResult"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["VerificationResult"] = pydantic.Field(alias="resourceType") target: typing.Optional[typing.List[Reference]] = pydantic.Field(description="A resource that was validated.") target_location: typing.Optional[typing.List[str]] = pydantic.Field( alias="targetLocation", description="The fhirpath location(s) within the resource that was validated." diff --git a/src/metriport/fhir/types/vision_prescription.py b/src/metriport/fhir/types/vision_prescription.py index c607659..763671b 100644 --- a/src/metriport/fhir/types/vision_prescription.py +++ b/src/metriport/fhir/types/vision_prescription.py @@ -3,8 +3,6 @@ import datetime as dt import typing -import typing_extensions - from ...core.datetime_utils import serialize_datetime from .base_resource import BaseResource from .code import Code @@ -24,7 +22,7 @@ class VisionPrescription(BaseResource): An authorization for the provision of glasses and/or contact lenses to a patient. """ - resource_type: typing_extensions.Literal["VisionPrescription"] = pydantic.Field(alias="resourceType") + resource_type: typing.Literal["VisionPrescription"] = pydantic.Field(alias="resourceType") identifier: typing.Optional[typing.List[Identifier]] = pydantic.Field( description="A unique identifier assigned to this vision prescription." ) diff --git a/src/metriport/medical/__init__.py b/src/metriport/medical/__init__.py index cc0dc8d..e735dde 100644 --- a/src/metriport/medical/__init__.py +++ b/src/metriport/medical/__init__.py @@ -1,51 +1,48 @@ # This file was auto-generated by Fern from our API Definition. -from .resources import ( - BaseFacility, - BasePatient, +from . import document, facility, fhir, organization, patient, webhooks +from .document import ( BulkGetDocumentUrlQuery, - ConsolidatedBundleUpload, - ConsolidatedCountResponse, - ConsolidatedWebhookStatus, - Contact, ConversionType, DocumentQuery, DocumentQueryStatus, DocumentUrl, - DriversLicense, - Facility, - FacilityId, + ListDocumentReferences, + Progress, + UploadDocumentResponse, +) +from .facility import BaseFacility, Facility, ListFacilitiesResponse +from .fhir import ( + ConsolidatedBundleUpload, + ConsolidatedCountResponse, Filter, - Filters, GetConsolidatedQueryStatusResponse, - ListDocumentReferences, - ListFacilitiesResponse, + PatientConsolidatedDataStatus, + StartConsolidatedQueryResponse, +) +from .organization import OrgType, Organization, OrganizationCreate +from .patient import ( + BasePatient, + Contact, + DriversLicense, + FacilityId, ListPatientsResponse, - MapiWebhookStatus, MedicalRecordStatus, - OrgType, - Organization, - OrganizationCreate, Patient, - PatientConsolidatedDataStatus, - PayloadPatient, PersonalIdentifier, PersonalIdentifier_DriversLicense, - Progress, RecordStatus, - StartConsolidatedQueryResponse, - UploadDocumentResponse, +) +from .webhooks import ( + ConsolidatedWebhookStatus, + Filters, + MapiWebhookStatus, + PayloadPatient, WebhookDocumentDataPayload, WebhookMetadataPayload, WebhookPatientConsolidatedDataPayload, WebhookPatientDocumentDataPayload, WebhookPatientPayload, - document, - facility, - fhir, - organization, - patient, - webhooks, ) __all__ = [ diff --git a/src/metriport/medical/client.py b/src/metriport/medical/client.py index 7bf133e..aa982f4 100644 --- a/src/metriport/medical/client.py +++ b/src/metriport/medical/client.py @@ -1,11 +1,11 @@ # This file was auto-generated by Fern from our API Definition. from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from .resources.document.client import AsyncDocumentClient, DocumentClient -from .resources.facility.client import AsyncFacilityClient, FacilityClient -from .resources.fhir.client import AsyncFhirClient, FhirClient -from .resources.organization.client import AsyncOrganizationClient, OrganizationClient -from .resources.patient.client import AsyncPatientClient, PatientClient +from .document.client import AsyncDocumentClient, DocumentClient +from .facility.client import AsyncFacilityClient, FacilityClient +from .fhir.client import AsyncFhirClient, FhirClient +from .organization.client import AsyncOrganizationClient, OrganizationClient +from .patient.client import AsyncPatientClient, PatientClient class MedicalClient: diff --git a/src/metriport/medical/resources/document/__init__.py b/src/metriport/medical/document/__init__.py similarity index 100% rename from src/metriport/medical/resources/document/__init__.py rename to src/metriport/medical/document/__init__.py diff --git a/src/metriport/medical/resources/document/client.py b/src/metriport/medical/document/client.py similarity index 56% rename from src/metriport/medical/resources/document/client.py rename to src/metriport/medical/document/client.py index dac2546..3f8e0f7 100644 --- a/src/metriport/medical/resources/document/client.py +++ b/src/metriport/medical/document/client.py @@ -4,11 +4,12 @@ import urllib.parse from json.decoder import JSONDecodeError -from ....core.api_error import ApiError -from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ....core.jsonable_encoder import jsonable_encoder -from ....core.remove_none_from_dict import remove_none_from_dict -from ....fhir.types.document_reference import DocumentReference +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.jsonable_encoder import jsonable_encoder +from ...core.remove_none_from_dict import remove_none_from_dict +from ...core.request_options import RequestOptions +from ...fhir.types.document_reference import DocumentReference from .types.bulk_get_document_url_query import BulkGetDocumentUrlQuery from .types.conversion_type import ConversionType from .types.document_query import DocumentQuery @@ -30,7 +31,12 @@ def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper def start_query( - self, *, patient_id: str, facility_id: str, request: typing.Optional[typing.Dict[str, str]] = None + self, + *, + patient_id: str, + facility_id: str, + request: typing.Optional[typing.Dict[str, str]] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> DocumentQuery: """ Triggers a document query for the specified patient across HIEs. @@ -52,6 +58,8 @@ def start_query( - facility_id: str. The ID of the Facility where the patient is receiving care. - request: typing.Optional[typing.Dict[str, str]]. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport @@ -67,10 +75,36 @@ def start_query( _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/query"), - params=remove_none_from_dict({"patientId": patient_id, "facilityId": facility_id}), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(DocumentQuery, _response.json()) # type: ignore @@ -80,7 +114,9 @@ def start_query( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def get_query_status(self, *, patient_id: str) -> DocumentQuery: + def get_query_status( + self, *, patient_id: str, request_options: typing.Optional[RequestOptions] = None + ) -> DocumentQuery: """ Returns the document query status for the specified patient. Can be used in to check the progress when the final status @@ -89,6 +125,8 @@ def get_query_status(self, *, patient_id: str) -> DocumentQuery: Parameters: - patient_id: str. The ID of the Patient for which to list available Documents. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport @@ -102,9 +140,32 @@ def get_query_status(self, *, patient_id: str) -> DocumentQuery: _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/query"), - params=remove_none_from_dict({"patientId": patient_id}), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {}))) + if request_options is not None + else None, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(DocumentQuery, _response.json()) # type: ignore @@ -121,6 +182,7 @@ def list( date_from: typing.Optional[str] = None, date_to: typing.Optional[str] = None, content: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> ListDocumentReferences: """ Lists all Documents that can be retrieved for a Patient. @@ -136,15 +198,38 @@ def list( - date_to: typing.Optional[str]. The end date (inclusive) for which to filter returned documents - formatted `YYYY-MM-DD` as per ISO 8601. If not provided, no end date filter will be applied. - content: typing.Optional[str]. Value to search within the document reference and the actual contents of the document (minimum 3 chars). + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document"), - params=remove_none_from_dict( - {"patientId": patient_id, "dateFrom": date_from, "dateTo": date_to, "content": content} + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + "dateFrom": date_from, + "dateTo": date_to, + "content": content, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) ), - headers=self._client_wrapper.get_headers(), - timeout=60, + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(ListDocumentReferences, _response.json()) # type: ignore @@ -154,7 +239,13 @@ def list( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def get_url(self, *, file_name: str, conversion_type: typing.Optional[ConversionType] = None) -> DocumentUrl: + def get_url( + self, + *, + file_name: str, + conversion_type: typing.Optional[ConversionType] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> DocumentUrl: """ Gets a downloadable URL for downloading the specified document. This endpoint returns a URL which you can use to download @@ -165,9 +256,11 @@ def get_url(self, *, file_name: str, conversion_type: typing.Optional[Conversion - file_name: str. The file name of the document - conversion_type: typing.Optional[ConversionType]. The doc type to convert to. Either `html` or `pdf`. - This parameter should only be used for converting XML/CDA files.--- + This parameter should only be used for converting XML/CDA files. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- from metriport.client import Metriport - from metriport.resources.medical import ConversionType + from metriport.medical import ConversionType client = Metriport( api_key="YOUR_API_KEY", @@ -180,9 +273,30 @@ def get_url(self, *, file_name: str, conversion_type: typing.Optional[Conversion _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/download-url"), - params=remove_none_from_dict({"fileName": file_name, "conversionType": conversion_type}), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "fileName": file_name, + "conversionType": conversion_type.value if conversion_type is not None else None, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(DocumentUrl, _response.json()) # type: ignore @@ -192,7 +306,9 @@ def get_url(self, *, file_name: str, conversion_type: typing.Optional[Conversion raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def create_document_reference(self, *, patient_id: str, request: DocumentReference) -> UploadDocumentResponse: + def create_document_reference( + self, *, patient_id: str, request: DocumentReference, request_options: typing.Optional[RequestOptions] = None + ) -> UploadDocumentResponse: """ Creates a DocumentReference and returns its ID and a URL to use for a medical document upload to our servers. @@ -200,9 +316,11 @@ def create_document_reference(self, *, patient_id: str, request: DocumentReferen - patient_id: str. The ID of the Patient for which to list available Documents. - request: DocumentReference. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport - from metriport.resources.fhir import ( + from metriport.fhir import ( Attachment, CodeableConcept, Coding, @@ -256,10 +374,35 @@ def create_document_reference(self, *, patient_id: str, request: DocumentReferen _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/upload"), - params=remove_none_from_dict({"patientId": patient_id}), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(UploadDocumentResponse, _response.json()) # type: ignore @@ -269,7 +412,9 @@ def create_document_reference(self, *, patient_id: str, request: DocumentReferen raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def start_bulk_get_document_url(self, *, patient_id: str) -> BulkGetDocumentUrlQuery: + def start_bulk_get_document_url( + self, *, patient_id: str, request_options: typing.Optional[RequestOptions] = None + ) -> BulkGetDocumentUrlQuery: """ Triggers a process to generate a list of download URLs for all of the patient's documents. The status of the process is returned in the response. Initially, it will be `processing`, @@ -279,6 +424,8 @@ def start_bulk_get_document_url(self, *, patient_id: str) -> BulkGetDocumentUrlQ Parameters: - patient_id: str. The ID of the patient for which to initiate the bulk URL generation. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport @@ -292,9 +439,32 @@ def start_bulk_get_document_url(self, *, patient_id: str) -> BulkGetDocumentUrlQ _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/download-url/bulk"), - params=remove_none_from_dict({"patientId": patient_id}), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {}))) + if request_options is not None + else None, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(BulkGetDocumentUrlQuery, _response.json()) # type: ignore @@ -310,7 +480,12 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper async def start_query( - self, *, patient_id: str, facility_id: str, request: typing.Optional[typing.Dict[str, str]] = None + self, + *, + patient_id: str, + facility_id: str, + request: typing.Optional[typing.Dict[str, str]] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> DocumentQuery: """ Triggers a document query for the specified patient across HIEs. @@ -332,6 +507,8 @@ async def start_query( - facility_id: str. The ID of the Facility where the patient is receiving care. - request: typing.Optional[typing.Dict[str, str]]. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport @@ -347,10 +524,36 @@ async def start_query( _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/query"), - params=remove_none_from_dict({"patientId": patient_id, "facilityId": facility_id}), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(DocumentQuery, _response.json()) # type: ignore @@ -360,7 +563,9 @@ async def start_query( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def get_query_status(self, *, patient_id: str) -> DocumentQuery: + async def get_query_status( + self, *, patient_id: str, request_options: typing.Optional[RequestOptions] = None + ) -> DocumentQuery: """ Returns the document query status for the specified patient. Can be used in to check the progress when the final status @@ -369,6 +574,8 @@ async def get_query_status(self, *, patient_id: str) -> DocumentQuery: Parameters: - patient_id: str. The ID of the Patient for which to list available Documents. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport @@ -382,9 +589,32 @@ async def get_query_status(self, *, patient_id: str) -> DocumentQuery: _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/query"), - params=remove_none_from_dict({"patientId": patient_id}), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {}))) + if request_options is not None + else None, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(DocumentQuery, _response.json()) # type: ignore @@ -401,6 +631,7 @@ async def list( date_from: typing.Optional[str] = None, date_to: typing.Optional[str] = None, content: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> ListDocumentReferences: """ Lists all Documents that can be retrieved for a Patient. @@ -416,15 +647,38 @@ async def list( - date_to: typing.Optional[str]. The end date (inclusive) for which to filter returned documents - formatted `YYYY-MM-DD` as per ISO 8601. If not provided, no end date filter will be applied. - content: typing.Optional[str]. Value to search within the document reference and the actual contents of the document (minimum 3 chars). + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document"), - params=remove_none_from_dict( - {"patientId": patient_id, "dateFrom": date_from, "dateTo": date_to, "content": content} + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + "dateFrom": date_from, + "dateTo": date_to, + "content": content, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) ), - headers=self._client_wrapper.get_headers(), - timeout=60, + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(ListDocumentReferences, _response.json()) # type: ignore @@ -434,7 +688,13 @@ async def list( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def get_url(self, *, file_name: str, conversion_type: typing.Optional[ConversionType] = None) -> DocumentUrl: + async def get_url( + self, + *, + file_name: str, + conversion_type: typing.Optional[ConversionType] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> DocumentUrl: """ Gets a downloadable URL for downloading the specified document. This endpoint returns a URL which you can use to download @@ -445,9 +705,11 @@ async def get_url(self, *, file_name: str, conversion_type: typing.Optional[Conv - file_name: str. The file name of the document - conversion_type: typing.Optional[ConversionType]. The doc type to convert to. Either `html` or `pdf`. - This parameter should only be used for converting XML/CDA files.--- + This parameter should only be used for converting XML/CDA files. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- from metriport.client import AsyncMetriport - from metriport.resources.medical import ConversionType + from metriport.medical import ConversionType client = AsyncMetriport( api_key="YOUR_API_KEY", @@ -460,9 +722,30 @@ async def get_url(self, *, file_name: str, conversion_type: typing.Optional[Conv _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/download-url"), - params=remove_none_from_dict({"fileName": file_name, "conversionType": conversion_type}), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "fileName": file_name, + "conversionType": conversion_type.value if conversion_type is not None else None, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(DocumentUrl, _response.json()) # type: ignore @@ -472,7 +755,9 @@ async def get_url(self, *, file_name: str, conversion_type: typing.Optional[Conv raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def create_document_reference(self, *, patient_id: str, request: DocumentReference) -> UploadDocumentResponse: + async def create_document_reference( + self, *, patient_id: str, request: DocumentReference, request_options: typing.Optional[RequestOptions] = None + ) -> UploadDocumentResponse: """ Creates a DocumentReference and returns its ID and a URL to use for a medical document upload to our servers. @@ -480,9 +765,11 @@ async def create_document_reference(self, *, patient_id: str, request: DocumentR - patient_id: str. The ID of the Patient for which to list available Documents. - request: DocumentReference. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport - from metriport.resources.fhir import ( + from metriport.fhir import ( Attachment, CodeableConcept, Coding, @@ -536,10 +823,35 @@ async def create_document_reference(self, *, patient_id: str, request: DocumentR _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/upload"), - params=remove_none_from_dict({"patientId": patient_id}), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(UploadDocumentResponse, _response.json()) # type: ignore @@ -549,7 +861,9 @@ async def create_document_reference(self, *, patient_id: str, request: DocumentR raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def start_bulk_get_document_url(self, *, patient_id: str) -> BulkGetDocumentUrlQuery: + async def start_bulk_get_document_url( + self, *, patient_id: str, request_options: typing.Optional[RequestOptions] = None + ) -> BulkGetDocumentUrlQuery: """ Triggers a process to generate a list of download URLs for all of the patient's documents. The status of the process is returned in the response. Initially, it will be `processing`, @@ -559,6 +873,8 @@ async def start_bulk_get_document_url(self, *, patient_id: str) -> BulkGetDocume Parameters: - patient_id: str. The ID of the patient for which to initiate the bulk URL generation. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport @@ -572,9 +888,32 @@ async def start_bulk_get_document_url(self, *, patient_id: str) -> BulkGetDocume _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/document/download-url/bulk"), - params=remove_none_from_dict({"patientId": patient_id}), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "patientId": patient_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {}))) + if request_options is not None + else None, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(BulkGetDocumentUrlQuery, _response.json()) # type: ignore diff --git a/src/metriport/medical/resources/document/types/__init__.py b/src/metriport/medical/document/types/__init__.py similarity index 100% rename from src/metriport/medical/resources/document/types/__init__.py rename to src/metriport/medical/document/types/__init__.py diff --git a/src/metriport/medical/resources/document/types/bulk_get_document_url_query.py b/src/metriport/medical/document/types/bulk_get_document_url_query.py similarity index 88% rename from src/metriport/medical/resources/document/types/bulk_get_document_url_query.py rename to src/metriport/medical/document/types/bulk_get_document_url_query.py index 793e01c..102842b 100644 --- a/src/metriport/medical/resources/document/types/bulk_get_document_url_query.py +++ b/src/metriport/medical/document/types/bulk_get_document_url_query.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .document_query_status import DocumentQueryStatus try: @@ -14,10 +14,7 @@ class BulkGetDocumentUrlQuery(pydantic.BaseModel): """ - from metriport.resources.medical import ( - BulkGetDocumentUrlQuery, - DocumentQueryStatus, - ) + from metriport.medical import BulkGetDocumentUrlQuery, DocumentQueryStatus BulkGetDocumentUrlQuery( status=DocumentQueryStatus.PROCESSING, diff --git a/src/metriport/medical/resources/document/types/conversion_type.py b/src/metriport/medical/document/types/conversion_type.py similarity index 100% rename from src/metriport/medical/resources/document/types/conversion_type.py rename to src/metriport/medical/document/types/conversion_type.py diff --git a/src/metriport/medical/resources/document/types/document_query.py b/src/metriport/medical/document/types/document_query.py similarity index 88% rename from src/metriport/medical/resources/document/types/document_query.py rename to src/metriport/medical/document/types/document_query.py index 49fb940..9b2ee32 100644 --- a/src/metriport/medical/resources/document/types/document_query.py +++ b/src/metriport/medical/document/types/document_query.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .progress import Progress try: @@ -14,11 +14,7 @@ class DocumentQuery(pydantic.BaseModel): """ - from metriport.resources.medical import ( - DocumentQuery, - DocumentQueryStatus, - Progress, - ) + from metriport.medical import DocumentQuery, DocumentQueryStatus, Progress DocumentQuery( download=Progress( diff --git a/src/metriport/medical/resources/document/types/document_query_status.py b/src/metriport/medical/document/types/document_query_status.py similarity index 100% rename from src/metriport/medical/resources/document/types/document_query_status.py rename to src/metriport/medical/document/types/document_query_status.py diff --git a/src/metriport/medical/resources/document/types/document_url.py b/src/metriport/medical/document/types/document_url.py similarity index 90% rename from src/metriport/medical/resources/document/types/document_url.py rename to src/metriport/medical/document/types/document_url.py index 1788bcd..73ff68d 100644 --- a/src/metriport/medical/resources/document/types/document_url.py +++ b/src/metriport/medical/document/types/document_url.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime try: import pydantic.v1 as pydantic # type: ignore @@ -15,7 +15,7 @@ class DocumentUrl(pydantic.BaseModel): """ A json object containing the URL will be returned. --- - from metriport.resources.medical import DocumentUrl + from metriport.medical import DocumentUrl DocumentUrl( url="abc123-def456", diff --git a/src/metriport/medical/resources/document/types/list_document_references.py b/src/metriport/medical/document/types/list_document_references.py similarity index 89% rename from src/metriport/medical/resources/document/types/list_document_references.py rename to src/metriport/medical/document/types/list_document_references.py index 0c392d9..cdc2d7f 100644 --- a/src/metriport/medical/resources/document/types/list_document_references.py +++ b/src/metriport/medical/document/types/list_document_references.py @@ -3,8 +3,8 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime -from .....fhir.types.document_reference import DocumentReference +from ....core.datetime_utils import serialize_datetime +from ....fhir.types.document_reference import DocumentReference try: import pydantic.v1 as pydantic # type: ignore diff --git a/src/metriport/medical/resources/document/types/progress.py b/src/metriport/medical/document/types/progress.py similarity index 91% rename from src/metriport/medical/resources/document/types/progress.py rename to src/metriport/medical/document/types/progress.py index 3e4bb6a..abf65c6 100644 --- a/src/metriport/medical/resources/document/types/progress.py +++ b/src/metriport/medical/document/types/progress.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .document_query_status import DocumentQueryStatus try: @@ -14,7 +14,7 @@ class Progress(pydantic.BaseModel): """ - from metriport.resources.medical import DocumentQueryStatus, Progress + from metriport.medical import DocumentQueryStatus, Progress Progress( status=DocumentQueryStatus.PROCESSING, diff --git a/src/metriport/medical/resources/document/types/upload_document_response.py b/src/metriport/medical/document/types/upload_document_response.py similarity index 91% rename from src/metriport/medical/resources/document/types/upload_document_response.py rename to src/metriport/medical/document/types/upload_document_response.py index 09a21b1..e049c22 100644 --- a/src/metriport/medical/resources/document/types/upload_document_response.py +++ b/src/metriport/medical/document/types/upload_document_response.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime try: import pydantic.v1 as pydantic # type: ignore @@ -13,7 +13,7 @@ class UploadDocumentResponse(pydantic.BaseModel): """ - from metriport.resources.medical import UploadDocumentResponse + from metriport.medical import UploadDocumentResponse UploadDocumentResponse( document_reference_id="", diff --git a/src/metriport/medical/resources/facility/__init__.py b/src/metriport/medical/facility/__init__.py similarity index 100% rename from src/metriport/medical/resources/facility/__init__.py rename to src/metriport/medical/facility/__init__.py diff --git a/src/metriport/medical/resources/facility/client.py b/src/metriport/medical/facility/client.py similarity index 54% rename from src/metriport/medical/resources/facility/client.py rename to src/metriport/medical/facility/client.py index b2c97fd..b42542e 100644 --- a/src/metriport/medical/resources/facility/client.py +++ b/src/metriport/medical/facility/client.py @@ -4,9 +4,11 @@ import urllib.parse from json.decoder import JSONDecodeError -from ....core.api_error import ApiError -from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ....core.jsonable_encoder import jsonable_encoder +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.jsonable_encoder import jsonable_encoder +from ...core.remove_none_from_dict import remove_none_from_dict +from ...core.request_options import RequestOptions from .types.base_facility import BaseFacility from .types.facility import Facility from .types.list_facilities_response import ListFacilitiesResponse @@ -24,16 +26,18 @@ class FacilityClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper - def create(self, *, request: BaseFacility) -> Facility: + def create(self, *, request: BaseFacility, request_options: typing.Optional[RequestOptions] = None) -> Facility: """ Creates a Facility in Metriport where your patients receive care. Parameters: - request: BaseFacility. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport import Address, UsState from metriport.client import Metriport - from metriport.resources.medical import BaseFacility + from metriport.medical import BaseFacility client = Metriport( api_key="YOUR_API_KEY", @@ -58,9 +62,26 @@ def create(self, *, request: BaseFacility) -> Facility: _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/facility"), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Facility, _response.json()) # type: ignore @@ -70,13 +91,15 @@ def create(self, *, request: BaseFacility) -> Facility: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def get(self, id: str) -> Facility: + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Facility: """ Get a Facility in Metriport where your patients receive care. Parameters: - id: str. The ID assigned to this Facility. This ID will be used - to uniquely identify this Facility in medical documents.--- + to uniquely identify this Facility in medical documents. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- from metriport.client import Metriport client = Metriport( @@ -89,8 +112,20 @@ def get(self, id: str) -> Facility: _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/facility/{id}"), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Facility, _response.json()) # type: ignore @@ -100,7 +135,9 @@ def get(self, id: str) -> Facility: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def update(self, id: str, *, request: BaseFacility) -> Facility: + def update( + self, id: str, *, request: BaseFacility, request_options: typing.Optional[RequestOptions] = None + ) -> Facility: """ Updates a Facility in Metriport where your patients receive care. @@ -108,10 +145,12 @@ def update(self, id: str, *, request: BaseFacility) -> Facility: - id: str. The ID of the Facility. - request: BaseFacility. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport import Address, UsState from metriport.client import Metriport - from metriport.resources.medical import BaseFacility + from metriport.medical import BaseFacility client = Metriport( api_key="YOUR_API_KEY", @@ -137,9 +176,26 @@ def update(self, id: str, *, request: BaseFacility) -> Facility: _response = self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/facility/{id}"), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Facility, _response.json()) # type: ignore @@ -149,10 +205,12 @@ def update(self, id: str, *, request: BaseFacility) -> Facility: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def list(self) -> ListFacilitiesResponse: + def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ListFacilitiesResponse: """ Lists all of your Facilities. + Parameters: + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport @@ -164,8 +222,20 @@ def list(self) -> ListFacilitiesResponse: _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/facility"), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(ListFacilitiesResponse, _response.json()) # type: ignore @@ -180,16 +250,20 @@ class AsyncFacilityClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper - async def create(self, *, request: BaseFacility) -> Facility: + async def create( + self, *, request: BaseFacility, request_options: typing.Optional[RequestOptions] = None + ) -> Facility: """ Creates a Facility in Metriport where your patients receive care. Parameters: - request: BaseFacility. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport import Address, UsState from metriport.client import AsyncMetriport - from metriport.resources.medical import BaseFacility + from metriport.medical import BaseFacility client = AsyncMetriport( api_key="YOUR_API_KEY", @@ -214,9 +288,26 @@ async def create(self, *, request: BaseFacility) -> Facility: _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/facility"), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Facility, _response.json()) # type: ignore @@ -226,13 +317,15 @@ async def create(self, *, request: BaseFacility) -> Facility: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def get(self, id: str) -> Facility: + async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Facility: """ Get a Facility in Metriport where your patients receive care. Parameters: - id: str. The ID assigned to this Facility. This ID will be used - to uniquely identify this Facility in medical documents.--- + to uniquely identify this Facility in medical documents. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- from metriport.client import AsyncMetriport client = AsyncMetriport( @@ -245,8 +338,20 @@ async def get(self, id: str) -> Facility: _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/facility/{id}"), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Facility, _response.json()) # type: ignore @@ -256,7 +361,9 @@ async def get(self, id: str) -> Facility: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def update(self, id: str, *, request: BaseFacility) -> Facility: + async def update( + self, id: str, *, request: BaseFacility, request_options: typing.Optional[RequestOptions] = None + ) -> Facility: """ Updates a Facility in Metriport where your patients receive care. @@ -264,10 +371,12 @@ async def update(self, id: str, *, request: BaseFacility) -> Facility: - id: str. The ID of the Facility. - request: BaseFacility. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport import Address, UsState from metriport.client import AsyncMetriport - from metriport.resources.medical import BaseFacility + from metriport.medical import BaseFacility client = AsyncMetriport( api_key="YOUR_API_KEY", @@ -293,9 +402,26 @@ async def update(self, id: str, *, request: BaseFacility) -> Facility: _response = await self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/facility/{id}"), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Facility, _response.json()) # type: ignore @@ -305,10 +431,12 @@ async def update(self, id: str, *, request: BaseFacility) -> Facility: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def list(self) -> ListFacilitiesResponse: + async def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> ListFacilitiesResponse: """ Lists all of your Facilities. + Parameters: + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport @@ -320,8 +448,20 @@ async def list(self) -> ListFacilitiesResponse: _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/facility"), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(ListFacilitiesResponse, _response.json()) # type: ignore diff --git a/src/metriport/medical/resources/facility/types/__init__.py b/src/metriport/medical/facility/types/__init__.py similarity index 100% rename from src/metriport/medical/resources/facility/types/__init__.py rename to src/metriport/medical/facility/types/__init__.py diff --git a/src/metriport/medical/resources/facility/types/base_facility.py b/src/metriport/medical/facility/types/base_facility.py similarity index 93% rename from src/metriport/medical/resources/facility/types/base_facility.py rename to src/metriport/medical/facility/types/base_facility.py index 0f34341..2ad2917 100644 --- a/src/metriport/medical/resources/facility/types/base_facility.py +++ b/src/metriport/medical/facility/types/base_facility.py @@ -3,8 +3,8 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime -from .....commons.types.address import Address +from ....commons.types.address import Address +from ....core.datetime_utils import serialize_datetime try: import pydantic.v1 as pydantic # type: ignore diff --git a/src/metriport/medical/resources/facility/types/facility.py b/src/metriport/medical/facility/types/facility.py similarity index 93% rename from src/metriport/medical/resources/facility/types/facility.py rename to src/metriport/medical/facility/types/facility.py index 1c254f7..abe0ba1 100644 --- a/src/metriport/medical/resources/facility/types/facility.py +++ b/src/metriport/medical/facility/types/facility.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .base_facility import BaseFacility try: @@ -15,7 +15,7 @@ class Facility(BaseFacility): """ from metriport import Address, UsState - from metriport.resources.medical import Facility + from metriport.medical import Facility Facility( id="2.16.840.1.113883.3.666.123", diff --git a/src/metriport/medical/resources/facility/types/list_facilities_response.py b/src/metriport/medical/facility/types/list_facilities_response.py similarity index 94% rename from src/metriport/medical/resources/facility/types/list_facilities_response.py rename to src/metriport/medical/facility/types/list_facilities_response.py index ab7fd6a..cbcf65e 100644 --- a/src/metriport/medical/resources/facility/types/list_facilities_response.py +++ b/src/metriport/medical/facility/types/list_facilities_response.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .facility import Facility try: diff --git a/src/metriport/medical/resources/fhir/__init__.py b/src/metriport/medical/fhir/__init__.py similarity index 100% rename from src/metriport/medical/resources/fhir/__init__.py rename to src/metriport/medical/fhir/__init__.py diff --git a/src/metriport/medical/resources/fhir/client.py b/src/metriport/medical/fhir/client.py similarity index 60% rename from src/metriport/medical/resources/fhir/client.py rename to src/metriport/medical/fhir/client.py index 82c6d9b..179727d 100644 --- a/src/metriport/medical/resources/fhir/client.py +++ b/src/metriport/medical/fhir/client.py @@ -4,11 +4,12 @@ import urllib.parse from json.decoder import JSONDecodeError -from ....core.api_error import ApiError -from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ....core.jsonable_encoder import jsonable_encoder -from ....core.remove_none_from_dict import remove_none_from_dict -from ....fhir.types.bundle import Bundle +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.jsonable_encoder import jsonable_encoder +from ...core.remove_none_from_dict import remove_none_from_dict +from ...core.request_options import RequestOptions +from ...fhir.types.bundle import Bundle from .types.consolidated_bundle_upload import ConsolidatedBundleUpload from .types.consolidated_count_response import ConsolidatedCountResponse from .types.get_consolidated_query_status_response import GetConsolidatedQueryStatusResponse @@ -36,6 +37,7 @@ def start_consolidated_query( date_to: typing.Optional[str] = None, conversion_type: typing.Optional[str] = None, request: typing.Optional[typing.Dict[str, str]] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> StartConsolidatedQueryResponse: """ Trigger a consolidated data query for the given patient @@ -54,6 +56,8 @@ def start_consolidated_query( - conversion_type: typing.Optional[str]. The doc type to convert to. Either `html` or `pdf`. - request: typing.Optional[typing.Dict[str, str]]. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport @@ -69,12 +73,38 @@ def start_consolidated_query( urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}/consolidated/query" ), - params=remove_none_from_dict( - {"resources": resources, "dateFrom": date_from, "dateTo": date_to, "conversionType": conversion_type} + params=jsonable_encoder( + remove_none_from_dict( + { + "resources": resources, + "dateFrom": date_from, + "dateTo": date_to, + "conversionType": conversion_type, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) ), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(StartConsolidatedQueryResponse, _response.json()) # type: ignore @@ -84,12 +114,16 @@ def start_consolidated_query( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def get_consolidated_query_status(self, id: str) -> GetConsolidatedQueryStatusResponse: + def get_consolidated_query_status( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> GetConsolidatedQueryStatusResponse: """ Get the status of querying for patient's consolidated data. Parameters: - id: str. The ID of the Patient + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport @@ -105,8 +139,20 @@ def get_consolidated_query_status(self, id: str) -> GetConsolidatedQueryStatusRe urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}/consolidated/query" ), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(GetConsolidatedQueryStatusResponse, _response.json()) # type: ignore @@ -116,7 +162,9 @@ def get_consolidated_query_status(self, id: str) -> GetConsolidatedQueryStatusRe raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def create_patient_consolidated(self, id: str, *, request: ConsolidatedBundleUpload) -> Bundle: + def create_patient_consolidated( + self, id: str, *, request: ConsolidatedBundleUpload, request_options: typing.Optional[RequestOptions] = None + ) -> Bundle: """ Create Patient's Consolidated Data with a FHIR Bundle. @@ -124,9 +172,11 @@ def create_patient_consolidated(self, id: str, *, request: ConsolidatedBundleUpl - id: str. The ID of the Patient - request: ConsolidatedBundleUpload. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport - from metriport.resources.medical import ConsolidatedBundleUpload + from metriport.medical import ConsolidatedBundleUpload client = Metriport( api_key="YOUR_API_KEY", @@ -162,9 +212,26 @@ def create_patient_consolidated(self, id: str, *, request: ConsolidatedBundleUpl _response = self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}/consolidated"), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Bundle, _response.json()) # type: ignore @@ -181,6 +248,7 @@ def count_patient_data( resources: typing.Optional[str] = None, date_from: typing.Optional[str] = None, date_to: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> ConsolidatedCountResponse: """ Get a count of a Patient's data per resource. @@ -196,15 +264,38 @@ def count_patient_data( - date_to: typing.Optional[str]. The end date (inclusive) for which to filter returned resources - formatted `YYYY-MM-DD` as per ISO 8601. If not provided, no end date filter will be applied. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. """ _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}/consolidated/count" ), - params=remove_none_from_dict({"resources": resources, "dateFrom": date_from, "dateTo": date_to}), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "resources": resources, + "dateFrom": date_from, + "dateTo": date_to, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(ConsolidatedCountResponse, _response.json()) # type: ignore @@ -228,6 +319,7 @@ async def start_consolidated_query( date_to: typing.Optional[str] = None, conversion_type: typing.Optional[str] = None, request: typing.Optional[typing.Dict[str, str]] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> StartConsolidatedQueryResponse: """ Trigger a consolidated data query for the given patient @@ -246,6 +338,8 @@ async def start_consolidated_query( - conversion_type: typing.Optional[str]. The doc type to convert to. Either `html` or `pdf`. - request: typing.Optional[typing.Dict[str, str]]. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport @@ -261,12 +355,38 @@ async def start_consolidated_query( urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}/consolidated/query" ), - params=remove_none_from_dict( - {"resources": resources, "dateFrom": date_from, "dateTo": date_to, "conversionType": conversion_type} + params=jsonable_encoder( + remove_none_from_dict( + { + "resources": resources, + "dateFrom": date_from, + "dateTo": date_to, + "conversionType": conversion_type, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) ), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(StartConsolidatedQueryResponse, _response.json()) # type: ignore @@ -276,12 +396,16 @@ async def start_consolidated_query( raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def get_consolidated_query_status(self, id: str) -> GetConsolidatedQueryStatusResponse: + async def get_consolidated_query_status( + self, id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> GetConsolidatedQueryStatusResponse: """ Get the status of querying for patient's consolidated data. Parameters: - id: str. The ID of the Patient + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport @@ -297,8 +421,20 @@ async def get_consolidated_query_status(self, id: str) -> GetConsolidatedQuerySt urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}/consolidated/query" ), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(GetConsolidatedQueryStatusResponse, _response.json()) # type: ignore @@ -308,7 +444,9 @@ async def get_consolidated_query_status(self, id: str) -> GetConsolidatedQuerySt raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def create_patient_consolidated(self, id: str, *, request: ConsolidatedBundleUpload) -> Bundle: + async def create_patient_consolidated( + self, id: str, *, request: ConsolidatedBundleUpload, request_options: typing.Optional[RequestOptions] = None + ) -> Bundle: """ Create Patient's Consolidated Data with a FHIR Bundle. @@ -316,9 +454,11 @@ async def create_patient_consolidated(self, id: str, *, request: ConsolidatedBun - id: str. The ID of the Patient - request: ConsolidatedBundleUpload. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport - from metriport.resources.medical import ConsolidatedBundleUpload + from metriport.medical import ConsolidatedBundleUpload client = AsyncMetriport( api_key="YOUR_API_KEY", @@ -354,9 +494,26 @@ async def create_patient_consolidated(self, id: str, *, request: ConsolidatedBun _response = await self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}/consolidated"), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Bundle, _response.json()) # type: ignore @@ -373,6 +530,7 @@ async def count_patient_data( resources: typing.Optional[str] = None, date_from: typing.Optional[str] = None, date_to: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> ConsolidatedCountResponse: """ Get a count of a Patient's data per resource. @@ -388,15 +546,38 @@ async def count_patient_data( - date_to: typing.Optional[str]. The end date (inclusive) for which to filter returned resources - formatted `YYYY-MM-DD` as per ISO 8601. If not provided, no end date filter will be applied. + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. """ _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin( f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}/consolidated/count" ), - params=remove_none_from_dict({"resources": resources, "dateFrom": date_from, "dateTo": date_to}), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + remove_none_from_dict( + { + "resources": resources, + "dateFrom": date_from, + "dateTo": date_to, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(ConsolidatedCountResponse, _response.json()) # type: ignore diff --git a/src/metriport/medical/resources/fhir/types/__init__.py b/src/metriport/medical/fhir/types/__init__.py similarity index 100% rename from src/metriport/medical/resources/fhir/types/__init__.py rename to src/metriport/medical/fhir/types/__init__.py diff --git a/src/metriport/medical/resources/fhir/types/consolidated_bundle_upload.py b/src/metriport/medical/fhir/types/consolidated_bundle_upload.py similarity index 94% rename from src/metriport/medical/resources/fhir/types/consolidated_bundle_upload.py rename to src/metriport/medical/fhir/types/consolidated_bundle_upload.py index 19ae219..abbeef5 100644 --- a/src/metriport/medical/resources/fhir/types/consolidated_bundle_upload.py +++ b/src/metriport/medical/fhir/types/consolidated_bundle_upload.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime try: import pydantic.v1 as pydantic # type: ignore @@ -13,7 +13,7 @@ class ConsolidatedBundleUpload(pydantic.BaseModel): """ - from metriport.resources.medical import ConsolidatedBundleUpload + from metriport.medical import ConsolidatedBundleUpload ConsolidatedBundleUpload( resource_type="Bundle", diff --git a/src/metriport/medical/resources/fhir/types/consolidated_count_response.py b/src/metriport/medical/fhir/types/consolidated_count_response.py similarity index 96% rename from src/metriport/medical/resources/fhir/types/consolidated_count_response.py rename to src/metriport/medical/fhir/types/consolidated_count_response.py index 8666da8..9e014f0 100644 --- a/src/metriport/medical/resources/fhir/types/consolidated_count_response.py +++ b/src/metriport/medical/fhir/types/consolidated_count_response.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .filter import Filter try: diff --git a/src/metriport/medical/resources/fhir/types/filter.py b/src/metriport/medical/fhir/types/filter.py similarity index 96% rename from src/metriport/medical/resources/fhir/types/filter.py rename to src/metriport/medical/fhir/types/filter.py index 2908c33..7ef15b3 100644 --- a/src/metriport/medical/resources/fhir/types/filter.py +++ b/src/metriport/medical/fhir/types/filter.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime try: import pydantic.v1 as pydantic # type: ignore diff --git a/src/metriport/medical/resources/fhir/types/get_consolidated_query_status_response.py b/src/metriport/medical/fhir/types/get_consolidated_query_status_response.py similarity index 92% rename from src/metriport/medical/resources/fhir/types/get_consolidated_query_status_response.py rename to src/metriport/medical/fhir/types/get_consolidated_query_status_response.py index 784c8fc..a5fad5a 100644 --- a/src/metriport/medical/resources/fhir/types/get_consolidated_query_status_response.py +++ b/src/metriport/medical/fhir/types/get_consolidated_query_status_response.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .patient_consolidated_data_status import PatientConsolidatedDataStatus try: @@ -14,7 +14,7 @@ class GetConsolidatedQueryStatusResponse(pydantic.BaseModel): """ - from metriport.resources.medical import ( + from metriport.medical import ( GetConsolidatedQueryStatusResponse, PatientConsolidatedDataStatus, ) diff --git a/src/metriport/medical/resources/fhir/types/patient_consolidated_data_status.py b/src/metriport/medical/fhir/types/patient_consolidated_data_status.py similarity index 100% rename from src/metriport/medical/resources/fhir/types/patient_consolidated_data_status.py rename to src/metriport/medical/fhir/types/patient_consolidated_data_status.py diff --git a/src/metriport/medical/resources/fhir/types/start_consolidated_query_response.py b/src/metriport/medical/fhir/types/start_consolidated_query_response.py similarity index 94% rename from src/metriport/medical/resources/fhir/types/start_consolidated_query_response.py rename to src/metriport/medical/fhir/types/start_consolidated_query_response.py index 30116e5..7038df8 100644 --- a/src/metriport/medical/resources/fhir/types/start_consolidated_query_response.py +++ b/src/metriport/medical/fhir/types/start_consolidated_query_response.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .patient_consolidated_data_status import PatientConsolidatedDataStatus try: diff --git a/src/metriport/medical/resources/organization/__init__.py b/src/metriport/medical/organization/__init__.py similarity index 100% rename from src/metriport/medical/resources/organization/__init__.py rename to src/metriport/medical/organization/__init__.py diff --git a/src/metriport/medical/resources/organization/client.py b/src/metriport/medical/organization/client.py similarity index 53% rename from src/metriport/medical/resources/organization/client.py rename to src/metriport/medical/organization/client.py index b5f3a9d..393fb0c 100644 --- a/src/metriport/medical/resources/organization/client.py +++ b/src/metriport/medical/organization/client.py @@ -4,11 +4,12 @@ import urllib.parse from json.decoder import JSONDecodeError -from ....core.api_error import ApiError -from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ....core.jsonable_encoder import jsonable_encoder -from ....core.remove_none_from_dict import remove_none_from_dict -from ....commons.types.address import Address +from ...commons.types.address import Address +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.jsonable_encoder import jsonable_encoder +from ...core.remove_none_from_dict import remove_none_from_dict +from ...core.request_options import RequestOptions from .types.org_type import OrgType from .types.organization import Organization from .types.organization_create import OrganizationCreate @@ -26,16 +27,20 @@ class OrganizationClient: def __init__(self, *, client_wrapper: SyncClientWrapper): self._client_wrapper = client_wrapper - def create(self, *, request: OrganizationCreate) -> Organization: + def create( + self, *, request: OrganizationCreate, request_options: typing.Optional[RequestOptions] = None + ) -> Organization: """ Registers your Organization in Metriport. Parameters: - request: OrganizationCreate. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport import Address, UsState from metriport.client import Metriport - from metriport.resources.medical import OrganizationCreate, OrgType + from metriport.medical import OrganizationCreate, OrgType client = Metriport( api_key="YOUR_API_KEY", @@ -58,9 +63,26 @@ def create(self, *, request: OrganizationCreate) -> Organization: _response = self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/organization"), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Organization, _response.json()) # type: ignore @@ -70,10 +92,12 @@ def create(self, *, request: OrganizationCreate) -> Organization: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - def get(self) -> Organization: + def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> Organization: """ Gets the Organization representing your legal corporate entity. + Parameters: + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import Metriport @@ -85,8 +109,20 @@ def get(self) -> Organization: _response = self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/organization"), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Organization, _response.json()) # type: ignore @@ -97,7 +133,14 @@ def get(self) -> Organization: raise ApiError(status_code=_response.status_code, body=_response_json) def update( - self, id: str, *, name: str, type: OrgType, location: Address, e_tag: typing.Optional[str] = None + self, + id: str, + *, + name: str, + type: OrgType, + location: Address, + e_tag: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> Organization: """ Updates your Organization's details. @@ -114,10 +157,12 @@ def update( - location: Address. - e_tag: typing.Optional[str]. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport import Address, UsState from metriport.client import Metriport - from metriport.resources.medical import OrgType + from metriport.medical import OrgType client = Metriport( api_key="YOUR_API_KEY", @@ -139,9 +184,27 @@ def update( _response = self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/organization/{id}"), - json=jsonable_encoder({"name": name, "type": type, "location": location}), - headers=remove_none_from_dict({**self._client_wrapper.get_headers(), "ETag": e_tag}), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder({"name": name, "type": type, "location": location}) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder({"name": name, "type": type, "location": location}), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + "ETag": e_tag, + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Organization, _response.json()) # type: ignore @@ -156,16 +219,20 @@ class AsyncOrganizationClient: def __init__(self, *, client_wrapper: AsyncClientWrapper): self._client_wrapper = client_wrapper - async def create(self, *, request: OrganizationCreate) -> Organization: + async def create( + self, *, request: OrganizationCreate, request_options: typing.Optional[RequestOptions] = None + ) -> Organization: """ Registers your Organization in Metriport. Parameters: - request: OrganizationCreate. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport import Address, UsState from metriport.client import AsyncMetriport - from metriport.resources.medical import OrganizationCreate, OrgType + from metriport.medical import OrganizationCreate, OrgType client = AsyncMetriport( api_key="YOUR_API_KEY", @@ -188,9 +255,26 @@ async def create(self, *, request: OrganizationCreate) -> Organization: _response = await self._client_wrapper.httpx_client.request( "POST", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/organization"), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Organization, _response.json()) # type: ignore @@ -200,10 +284,12 @@ async def create(self, *, request: OrganizationCreate) -> Organization: raise ApiError(status_code=_response.status_code, body=_response.text) raise ApiError(status_code=_response.status_code, body=_response_json) - async def get(self) -> Organization: + async def get(self, *, request_options: typing.Optional[RequestOptions] = None) -> Organization: """ Gets the Organization representing your legal corporate entity. + Parameters: + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport.client import AsyncMetriport @@ -215,8 +301,20 @@ async def get(self) -> Organization: _response = await self._client_wrapper.httpx_client.request( "GET", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/organization"), - headers=self._client_wrapper.get_headers(), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Organization, _response.json()) # type: ignore @@ -227,7 +325,14 @@ async def get(self) -> Organization: raise ApiError(status_code=_response.status_code, body=_response_json) async def update( - self, id: str, *, name: str, type: OrgType, location: Address, e_tag: typing.Optional[str] = None + self, + id: str, + *, + name: str, + type: OrgType, + location: Address, + e_tag: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, ) -> Organization: """ Updates your Organization's details. @@ -244,10 +349,12 @@ async def update( - location: Address. - e_tag: typing.Optional[str]. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. --- from metriport import Address, UsState from metriport.client import AsyncMetriport - from metriport.resources.medical import OrgType + from metriport.medical import OrgType client = AsyncMetriport( api_key="YOUR_API_KEY", @@ -269,9 +376,27 @@ async def update( _response = await self._client_wrapper.httpx_client.request( "PUT", urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/organization/{id}"), - json=jsonable_encoder({"name": name, "type": type, "location": location}), - headers=remove_none_from_dict({**self._client_wrapper.get_headers(), "ETag": e_tag}), - timeout=60, + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + json=jsonable_encoder({"name": name, "type": type, "location": location}) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder({"name": name, "type": type, "location": location}), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + "ETag": e_tag, + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, ) if 200 <= _response.status_code < 300: return pydantic.parse_obj_as(Organization, _response.json()) # type: ignore diff --git a/src/metriport/medical/resources/organization/types/__init__.py b/src/metriport/medical/organization/types/__init__.py similarity index 100% rename from src/metriport/medical/resources/organization/types/__init__.py rename to src/metriport/medical/organization/types/__init__.py diff --git a/src/metriport/medical/resources/organization/types/org_type.py b/src/metriport/medical/organization/types/org_type.py similarity index 100% rename from src/metriport/medical/resources/organization/types/org_type.py rename to src/metriport/medical/organization/types/org_type.py diff --git a/src/metriport/medical/resources/organization/types/organization.py b/src/metriport/medical/organization/types/organization.py similarity index 92% rename from src/metriport/medical/resources/organization/types/organization.py rename to src/metriport/medical/organization/types/organization.py index db89916..b708421 100644 --- a/src/metriport/medical/resources/organization/types/organization.py +++ b/src/metriport/medical/organization/types/organization.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .organization_create import OrganizationCreate try: @@ -15,7 +15,7 @@ class Organization(OrganizationCreate): """ from metriport import Address, UsState - from metriport.resources.medical import Organization, OrgType + from metriport.medical import Organization, OrgType Organization( id="2.16.840.1.113883.3.666.123", diff --git a/src/metriport/medical/resources/organization/types/organization_create.py b/src/metriport/medical/organization/types/organization_create.py similarity index 91% rename from src/metriport/medical/resources/organization/types/organization_create.py rename to src/metriport/medical/organization/types/organization_create.py index ee328a7..98eab10 100644 --- a/src/metriport/medical/resources/organization/types/organization_create.py +++ b/src/metriport/medical/organization/types/organization_create.py @@ -3,8 +3,8 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime -from .....commons.types.address import Address +from ....commons.types.address import Address +from ....core.datetime_utils import serialize_datetime from .org_type import OrgType try: diff --git a/src/metriport/medical/resources/patient/__init__.py b/src/metriport/medical/patient/__init__.py similarity index 100% rename from src/metriport/medical/resources/patient/__init__.py rename to src/metriport/medical/patient/__init__.py diff --git a/src/metriport/medical/patient/client.py b/src/metriport/medical/patient/client.py new file mode 100644 index 0000000..5d53465 --- /dev/null +++ b/src/metriport/medical/patient/client.py @@ -0,0 +1,801 @@ +# This file was auto-generated by Fern from our API Definition. + +import typing +import urllib.parse +from json.decoder import JSONDecodeError + +from ...core.api_error import ApiError +from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper +from ...core.jsonable_encoder import jsonable_encoder +from ...core.remove_none_from_dict import remove_none_from_dict +from ...core.request_options import RequestOptions +from .types.base_patient import BasePatient +from .types.list_patients_response import ListPatientsResponse +from .types.medical_record_status import MedicalRecordStatus +from .types.patient import Patient + +try: + import pydantic.v1 as pydantic # type: ignore +except ImportError: + import pydantic # type: ignore + +# this is used as the default value for optional parameters +OMIT = typing.cast(typing.Any, ...) + + +class PatientClient: + def __init__(self, *, client_wrapper: SyncClientWrapper): + self._client_wrapper = client_wrapper + + def create( + self, *, facility_id: str, request: BasePatient, request_options: typing.Optional[RequestOptions] = None + ) -> Patient: + """ + Creates a Patient in Metriport for the specified Facility where the patient is receiving care. + The more demographic info you can provide about a Patient, + the higher chances Metriport will be able to find a match. + For example, nicknames, old addresses, multiple phone numbers, + a pre-marital last name, etc. + + Parameters: + - facility_id: str. The ID of the Facility where the Patient is receiving care. + + - request: BasePatient. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from metriport import Address, UsState + from metriport.client import Metriport + from metriport.medical import BasePatient, PersonalIdentifier_DriversLicense + + client = Metriport( + api_key="YOUR_API_KEY", + ) + client.medical.patient.create( + facility_id="2.16.840.1.113883.3.666.5.2004.4.2005", + request=BasePatient( + first_name="Karen", + last_name="Lynch", + dob="1963-12-30", + gender_at_birth="F", + personal_identifiers=[ + PersonalIdentifier_DriversLicense( + type="driversLicense", + state=UsState.CA, + value="51227265", + ) + ], + address=[ + Address( + address_line_1="2261 Market Street", + address_line_2="#4818", + city="San Francisco", + state=UsState.CA, + zip="94114", + country="USA", + ) + ], + ), + ) + """ + _response = self._client_wrapper.httpx_client.request( + "POST", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/patient"), + params=jsonable_encoder( + remove_none_from_dict( + { + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Patient: + """ + Get a Patient + + Parameters: + - id: str. The ID of the Patient. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from metriport.client import Metriport + + client = Metriport( + api_key="YOUR_API_KEY", + ) + client.medical.patient.get( + id="2.16.840.1.113883.3.666.777", + ) + """ + _response = self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def update( + self, + id: str, + *, + facility_id: str, + request: BasePatient, + request_options: typing.Optional[RequestOptions] = None, + ) -> Patient: + """ + Updates the specified Patient. + + Parameters: + - id: str. The ID of the Patient to update. + + - facility_id: str. The ID of the Facility where the patient is receiving care. + + - request: BasePatient. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = self._client_wrapper.httpx_client.request( + "PUT", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), + params=jsonable_encoder( + remove_none_from_dict( + { + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def list( + self, *, facility_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None + ) -> ListPatientsResponse: + """ + Lists all Patients receiving care at the specified Facility, or all Patients if no Facility is specified. + + Parameters: + - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/patient"), + params=jsonable_encoder( + remove_none_from_dict( + { + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(ListPatientsResponse, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def delete( + self, + id: str, + *, + facility_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Removes the specified Patient. + + Parameters: + - id: str. The ID of the Patient to delete. + + - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = self._client_wrapper.httpx_client.request( + "DELETE", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), + params=jsonable_encoder( + remove_none_from_dict( + { + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_medical_record_summary( + self, patient_id: str, *, conversion_type: str, request_options: typing.Optional[RequestOptions] = None + ) -> str: + """ + Returns the URL for a medical record summary + + Parameters: + - patient_id: str. The ID of the Patient. + + - conversion_type: str. The type of conversion to perform. `html` or `pdf` + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{patient_id}/medical-record" + ), + params=jsonable_encoder( + remove_none_from_dict( + { + "conversionType": conversion_type, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(str, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + def get_medical_record_summary_status( + self, patient_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> MedicalRecordStatus: + """ + Returns the status of a medical record summary + + Parameters: + - patient_id: str. The ID of the Patient. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{patient_id}/medical-record-status" + ), + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(MedicalRecordStatus, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + +class AsyncPatientClient: + def __init__(self, *, client_wrapper: AsyncClientWrapper): + self._client_wrapper = client_wrapper + + async def create( + self, *, facility_id: str, request: BasePatient, request_options: typing.Optional[RequestOptions] = None + ) -> Patient: + """ + Creates a Patient in Metriport for the specified Facility where the patient is receiving care. + The more demographic info you can provide about a Patient, + the higher chances Metriport will be able to find a match. + For example, nicknames, old addresses, multiple phone numbers, + a pre-marital last name, etc. + + Parameters: + - facility_id: str. The ID of the Facility where the Patient is receiving care. + + - request: BasePatient. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from metriport import Address, UsState + from metriport.client import AsyncMetriport + from metriport.medical import BasePatient, PersonalIdentifier_DriversLicense + + client = AsyncMetriport( + api_key="YOUR_API_KEY", + ) + await client.medical.patient.create( + facility_id="2.16.840.1.113883.3.666.5.2004.4.2005", + request=BasePatient( + first_name="Karen", + last_name="Lynch", + dob="1963-12-30", + gender_at_birth="F", + personal_identifiers=[ + PersonalIdentifier_DriversLicense( + type="driversLicense", + state=UsState.CA, + value="51227265", + ) + ], + address=[ + Address( + address_line_1="2261 Market Street", + address_line_2="#4818", + city="San Francisco", + state=UsState.CA, + zip="94114", + country="USA", + ) + ], + ), + ) + """ + _response = await self._client_wrapper.httpx_client.request( + "POST", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/patient"), + params=jsonable_encoder( + remove_none_from_dict( + { + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> Patient: + """ + Get a Patient + + Parameters: + - id: str. The ID of the Patient. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + --- + from metriport.client import AsyncMetriport + + client = AsyncMetriport( + api_key="YOUR_API_KEY", + ) + await client.medical.patient.get( + id="2.16.840.1.113883.3.666.777", + ) + """ + _response = await self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def update( + self, + id: str, + *, + facility_id: str, + request: BasePatient, + request_options: typing.Optional[RequestOptions] = None, + ) -> Patient: + """ + Updates the specified Patient. + + Parameters: + - id: str. The ID of the Patient to update. + + - facility_id: str. The ID of the Facility where the patient is receiving care. + + - request: BasePatient. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = await self._client_wrapper.httpx_client.request( + "PUT", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), + params=jsonable_encoder( + remove_none_from_dict( + { + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + json=jsonable_encoder(request) + if request_options is None or request_options.get("additional_body_parameters") is None + else { + **jsonable_encoder(request), + **(jsonable_encoder(remove_none_from_dict(request_options.get("additional_body_parameters", {})))), + }, + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def list( + self, *, facility_id: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None + ) -> ListPatientsResponse: + """ + Lists all Patients receiving care at the specified Facility, or all Patients if no Facility is specified. + + Parameters: + - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = await self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/patient"), + params=jsonable_encoder( + remove_none_from_dict( + { + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(ListPatientsResponse, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def delete( + self, + id: str, + *, + facility_id: typing.Optional[str] = None, + request_options: typing.Optional[RequestOptions] = None, + ) -> None: + """ + Removes the specified Patient. + + Parameters: + - id: str. The ID of the Patient to delete. + + - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = await self._client_wrapper.httpx_client.request( + "DELETE", + urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), + params=jsonable_encoder( + remove_none_from_dict( + { + "facilityId": facility_id, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_medical_record_summary( + self, patient_id: str, *, conversion_type: str, request_options: typing.Optional[RequestOptions] = None + ) -> str: + """ + Returns the URL for a medical record summary + + Parameters: + - patient_id: str. The ID of the Patient. + + - conversion_type: str. The type of conversion to perform. `html` or `pdf` + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = await self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{patient_id}/medical-record" + ), + params=jsonable_encoder( + remove_none_from_dict( + { + "conversionType": conversion_type, + **( + request_options.get("additional_query_parameters", {}) + if request_options is not None + else {} + ), + } + ) + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(str, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) + + async def get_medical_record_summary_status( + self, patient_id: str, *, request_options: typing.Optional[RequestOptions] = None + ) -> MedicalRecordStatus: + """ + Returns the status of a medical record summary + + Parameters: + - patient_id: str. The ID of the Patient. + + - request_options: typing.Optional[RequestOptions]. Request-specific configuration. + """ + _response = await self._client_wrapper.httpx_client.request( + "GET", + urllib.parse.urljoin( + f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{patient_id}/medical-record-status" + ), + params=jsonable_encoder( + request_options.get("additional_query_parameters") if request_options is not None else None + ), + headers=jsonable_encoder( + remove_none_from_dict( + { + **self._client_wrapper.get_headers(), + **(request_options.get("additional_headers", {}) if request_options is not None else {}), + } + ) + ), + timeout=request_options.get("timeout_in_seconds") + if request_options is not None and request_options.get("timeout_in_seconds") is not None + else 60, + ) + if 200 <= _response.status_code < 300: + return pydantic.parse_obj_as(MedicalRecordStatus, _response.json()) # type: ignore + try: + _response_json = _response.json() + except JSONDecodeError: + raise ApiError(status_code=_response.status_code, body=_response.text) + raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/metriport/medical/resources/patient/types/__init__.py b/src/metriport/medical/patient/types/__init__.py similarity index 100% rename from src/metriport/medical/resources/patient/types/__init__.py rename to src/metriport/medical/patient/types/__init__.py diff --git a/src/metriport/medical/resources/patient/types/base_patient.py b/src/metriport/medical/patient/types/base_patient.py similarity index 95% rename from src/metriport/medical/resources/patient/types/base_patient.py rename to src/metriport/medical/patient/types/base_patient.py index cf520f1..0e6c1b1 100644 --- a/src/metriport/medical/resources/patient/types/base_patient.py +++ b/src/metriport/medical/patient/types/base_patient.py @@ -3,8 +3,8 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime -from .....commons.types.address import Address +from ....commons.types.address import Address +from ....core.datetime_utils import serialize_datetime from .contact import Contact from .personal_identifier import PersonalIdentifier diff --git a/src/metriport/medical/resources/patient/types/contact.py b/src/metriport/medical/patient/types/contact.py similarity index 91% rename from src/metriport/medical/resources/patient/types/contact.py rename to src/metriport/medical/patient/types/contact.py index d97a13d..efb15d6 100644 --- a/src/metriport/medical/resources/patient/types/contact.py +++ b/src/metriport/medical/patient/types/contact.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime try: import pydantic.v1 as pydantic # type: ignore @@ -13,7 +13,7 @@ class Contact(pydantic.BaseModel): """ - from metriport.resources.medical import Contact + from metriport.medical import Contact Contact( phone="1234567899", diff --git a/src/metriport/medical/resources/patient/types/drivers_license.py b/src/metriport/medical/patient/types/drivers_license.py similarity index 88% rename from src/metriport/medical/resources/patient/types/drivers_license.py rename to src/metriport/medical/patient/types/drivers_license.py index ec0a3ef..5590283 100644 --- a/src/metriport/medical/resources/patient/types/drivers_license.py +++ b/src/metriport/medical/patient/types/drivers_license.py @@ -3,9 +3,9 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime -from .....commons.types.us_state import UsState -from .....fhir.types.period import Period +from ....commons.types.us_state import UsState +from ....core.datetime_utils import serialize_datetime +from ....fhir.types.period import Period try: import pydantic.v1 as pydantic # type: ignore diff --git a/src/metriport/medical/resources/patient/types/facility_id.py b/src/metriport/medical/patient/types/facility_id.py similarity index 100% rename from src/metriport/medical/resources/patient/types/facility_id.py rename to src/metriport/medical/patient/types/facility_id.py diff --git a/src/metriport/medical/resources/patient/types/list_patients_response.py b/src/metriport/medical/patient/types/list_patients_response.py similarity index 93% rename from src/metriport/medical/resources/patient/types/list_patients_response.py rename to src/metriport/medical/patient/types/list_patients_response.py index f740cbe..3b5ec59 100644 --- a/src/metriport/medical/resources/patient/types/list_patients_response.py +++ b/src/metriport/medical/patient/types/list_patients_response.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .patient import Patient try: diff --git a/src/metriport/medical/resources/patient/types/medical_record_status.py b/src/metriport/medical/patient/types/medical_record_status.py similarity index 94% rename from src/metriport/medical/resources/patient/types/medical_record_status.py rename to src/metriport/medical/patient/types/medical_record_status.py index 774b4ed..a7f83f9 100644 --- a/src/metriport/medical/resources/patient/types/medical_record_status.py +++ b/src/metriport/medical/patient/types/medical_record_status.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .record_status import RecordStatus try: diff --git a/src/metriport/medical/resources/patient/types/patient.py b/src/metriport/medical/patient/types/patient.py similarity index 92% rename from src/metriport/medical/resources/patient/types/patient.py rename to src/metriport/medical/patient/types/patient.py index 41111c2..e790e5b 100644 --- a/src/metriport/medical/resources/patient/types/patient.py +++ b/src/metriport/medical/patient/types/patient.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .base_patient import BasePatient from .facility_id import FacilityId @@ -16,10 +16,7 @@ class Patient(BasePatient): """ from metriport import Address, UsState - from metriport.resources.medical import ( - Patient, - PersonalIdentifier_DriversLicense, - ) + from metriport.medical import Patient, PersonalIdentifier_DriversLicense Patient( id="2.16.840.1.113883.3.666.777", diff --git a/src/metriport/medical/resources/patient/types/personal_identifier.py b/src/metriport/medical/patient/types/personal_identifier.py similarity index 78% rename from src/metriport/medical/resources/patient/types/personal_identifier.py rename to src/metriport/medical/patient/types/personal_identifier.py index c86e041..11310a8 100644 --- a/src/metriport/medical/resources/patient/types/personal_identifier.py +++ b/src/metriport/medical/patient/types/personal_identifier.py @@ -4,13 +4,11 @@ import typing -import typing_extensions - from .drivers_license import DriversLicense class PersonalIdentifier_DriversLicense(DriversLicense): - type: typing_extensions.Literal["driversLicense"] + type: typing.Literal["driversLicense"] class Config: frozen = True @@ -20,7 +18,7 @@ class Config: """ from metriport import UsState -from metriport.resources.medical import PersonalIdentifier_DriversLicense +from metriport.medical import PersonalIdentifier_DriversLicense PersonalIdentifier_DriversLicense( type="driversLicense", diff --git a/src/metriport/medical/resources/patient/types/record_status.py b/src/metriport/medical/patient/types/record_status.py similarity index 94% rename from src/metriport/medical/resources/patient/types/record_status.py rename to src/metriport/medical/patient/types/record_status.py index f8adbe5..c7105a1 100644 --- a/src/metriport/medical/resources/patient/types/record_status.py +++ b/src/metriport/medical/patient/types/record_status.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime try: import pydantic.v1 as pydantic # type: ignore diff --git a/src/metriport/medical/resources/__init__.py b/src/metriport/medical/resources/__init__.py deleted file mode 100644 index e735dde..0000000 --- a/src/metriport/medical/resources/__init__.py +++ /dev/null @@ -1,94 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -from . import document, facility, fhir, organization, patient, webhooks -from .document import ( - BulkGetDocumentUrlQuery, - ConversionType, - DocumentQuery, - DocumentQueryStatus, - DocumentUrl, - ListDocumentReferences, - Progress, - UploadDocumentResponse, -) -from .facility import BaseFacility, Facility, ListFacilitiesResponse -from .fhir import ( - ConsolidatedBundleUpload, - ConsolidatedCountResponse, - Filter, - GetConsolidatedQueryStatusResponse, - PatientConsolidatedDataStatus, - StartConsolidatedQueryResponse, -) -from .organization import OrgType, Organization, OrganizationCreate -from .patient import ( - BasePatient, - Contact, - DriversLicense, - FacilityId, - ListPatientsResponse, - MedicalRecordStatus, - Patient, - PersonalIdentifier, - PersonalIdentifier_DriversLicense, - RecordStatus, -) -from .webhooks import ( - ConsolidatedWebhookStatus, - Filters, - MapiWebhookStatus, - PayloadPatient, - WebhookDocumentDataPayload, - WebhookMetadataPayload, - WebhookPatientConsolidatedDataPayload, - WebhookPatientDocumentDataPayload, - WebhookPatientPayload, -) - -__all__ = [ - "BaseFacility", - "BasePatient", - "BulkGetDocumentUrlQuery", - "ConsolidatedBundleUpload", - "ConsolidatedCountResponse", - "ConsolidatedWebhookStatus", - "Contact", - "ConversionType", - "DocumentQuery", - "DocumentQueryStatus", - "DocumentUrl", - "DriversLicense", - "Facility", - "FacilityId", - "Filter", - "Filters", - "GetConsolidatedQueryStatusResponse", - "ListDocumentReferences", - "ListFacilitiesResponse", - "ListPatientsResponse", - "MapiWebhookStatus", - "MedicalRecordStatus", - "OrgType", - "Organization", - "OrganizationCreate", - "Patient", - "PatientConsolidatedDataStatus", - "PayloadPatient", - "PersonalIdentifier", - "PersonalIdentifier_DriversLicense", - "Progress", - "RecordStatus", - "StartConsolidatedQueryResponse", - "UploadDocumentResponse", - "WebhookDocumentDataPayload", - "WebhookMetadataPayload", - "WebhookPatientConsolidatedDataPayload", - "WebhookPatientDocumentDataPayload", - "WebhookPatientPayload", - "document", - "facility", - "fhir", - "organization", - "patient", - "webhooks", -] diff --git a/src/metriport/medical/resources/patient/client.py b/src/metriport/medical/resources/patient/client.py deleted file mode 100644 index 7ce8c8f..0000000 --- a/src/metriport/medical/resources/patient/client.py +++ /dev/null @@ -1,468 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing -import urllib.parse -from json.decoder import JSONDecodeError - -from ....core.api_error import ApiError -from ....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper -from ....core.jsonable_encoder import jsonable_encoder -from ....core.remove_none_from_dict import remove_none_from_dict -from .types.base_patient import BasePatient -from .types.list_patients_response import ListPatientsResponse -from .types.medical_record_status import MedicalRecordStatus -from .types.patient import Patient - -try: - import pydantic.v1 as pydantic # type: ignore -except ImportError: - import pydantic # type: ignore - -# this is used as the default value for optional parameters -OMIT = typing.cast(typing.Any, ...) - - -class PatientClient: - def __init__(self, *, client_wrapper: SyncClientWrapper): - self._client_wrapper = client_wrapper - - def create(self, *, facility_id: str, request: BasePatient) -> Patient: - """ - Creates a Patient in Metriport for the specified Facility where the patient is receiving care. - The more demographic info you can provide about a Patient, - the higher chances Metriport will be able to find a match. - For example, nicknames, old addresses, multiple phone numbers, - a pre-marital last name, etc. - - Parameters: - - facility_id: str. The ID of the Facility where the Patient is receiving care. - - - request: BasePatient. - --- - from metriport import Address, UsState - from metriport.client import Metriport - from metriport.resources.medical import ( - BasePatient, - PersonalIdentifier_DriversLicense, - ) - - client = Metriport( - api_key="YOUR_API_KEY", - ) - client.medical.patient.create( - facility_id="2.16.840.1.113883.3.666.5.2004.4.2005", - request=BasePatient( - first_name="Karen", - last_name="Lynch", - dob="1963-12-30", - gender_at_birth="F", - personal_identifiers=[ - PersonalIdentifier_DriversLicense( - type="driversLicense", - state=UsState.CA, - value="51227265", - ) - ], - address=[ - Address( - address_line_1="2261 Market Street", - address_line_2="#4818", - city="San Francisco", - state=UsState.CA, - zip="94114", - country="USA", - ) - ], - ), - ) - """ - _response = self._client_wrapper.httpx_client.request( - "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/patient"), - params=remove_none_from_dict({"facilityId": facility_id}), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def get(self, id: str) -> Patient: - """ - Get a Patient - - Parameters: - - id: str. The ID of the Patient. - --- - from metriport.client import Metriport - - client = Metriport( - api_key="YOUR_API_KEY", - ) - client.medical.patient.get( - id="2.16.840.1.113883.3.666.777", - ) - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def update(self, id: str, *, facility_id: str, request: BasePatient) -> Patient: - """ - Updates the specified Patient. - - Parameters: - - id: str. The ID of the Patient to update. - - - facility_id: str. The ID of the Facility where the patient is receiving care. - - - request: BasePatient. - """ - _response = self._client_wrapper.httpx_client.request( - "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), - params=remove_none_from_dict({"facilityId": facility_id}), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def list(self, *, facility_id: typing.Optional[str] = None) -> ListPatientsResponse: - """ - Lists all Patients receiving care at the specified Facility, or all Patients if no Facility is specified. - - Parameters: - - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/patient"), - params=remove_none_from_dict({"facilityId": facility_id}), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(ListPatientsResponse, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def delete(self, id: str, *, facility_id: typing.Optional[str] = None) -> None: - """ - Removes the specified Patient. - - Parameters: - - id: str. The ID of the Patient to delete. - - - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. - """ - _response = self._client_wrapper.httpx_client.request( - "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), - params=remove_none_from_dict({"facilityId": facility_id}), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def get_medical_record_summary(self, patient_id: str, *, conversion_type: str) -> str: - """ - Returns the URL for a medical record summary - - Parameters: - - patient_id: str. The ID of the Patient. - - - conversion_type: str. The type of conversion to perform. `html` or `pdf` - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{patient_id}/medical-record" - ), - params=remove_none_from_dict({"conversionType": conversion_type}), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(str, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - def get_medical_record_summary_status(self, patient_id: str) -> MedicalRecordStatus: - """ - Returns the status of a medical record summary - - Parameters: - - patient_id: str. The ID of the Patient. - """ - _response = self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{patient_id}/medical-record-status" - ), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(MedicalRecordStatus, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - -class AsyncPatientClient: - def __init__(self, *, client_wrapper: AsyncClientWrapper): - self._client_wrapper = client_wrapper - - async def create(self, *, facility_id: str, request: BasePatient) -> Patient: - """ - Creates a Patient in Metriport for the specified Facility where the patient is receiving care. - The more demographic info you can provide about a Patient, - the higher chances Metriport will be able to find a match. - For example, nicknames, old addresses, multiple phone numbers, - a pre-marital last name, etc. - - Parameters: - - facility_id: str. The ID of the Facility where the Patient is receiving care. - - - request: BasePatient. - --- - from metriport import Address, UsState - from metriport.client import AsyncMetriport - from metriport.resources.medical import ( - BasePatient, - PersonalIdentifier_DriversLicense, - ) - - client = AsyncMetriport( - api_key="YOUR_API_KEY", - ) - await client.medical.patient.create( - facility_id="2.16.840.1.113883.3.666.5.2004.4.2005", - request=BasePatient( - first_name="Karen", - last_name="Lynch", - dob="1963-12-30", - gender_at_birth="F", - personal_identifiers=[ - PersonalIdentifier_DriversLicense( - type="driversLicense", - state=UsState.CA, - value="51227265", - ) - ], - address=[ - Address( - address_line_1="2261 Market Street", - address_line_2="#4818", - city="San Francisco", - state=UsState.CA, - zip="94114", - country="USA", - ) - ], - ), - ) - """ - _response = await self._client_wrapper.httpx_client.request( - "POST", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/patient"), - params=remove_none_from_dict({"facilityId": facility_id}), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def get(self, id: str) -> Patient: - """ - Get a Patient - - Parameters: - - id: str. The ID of the Patient. - --- - from metriport.client import AsyncMetriport - - client = AsyncMetriport( - api_key="YOUR_API_KEY", - ) - await client.medical.patient.get( - id="2.16.840.1.113883.3.666.777", - ) - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def update(self, id: str, *, facility_id: str, request: BasePatient) -> Patient: - """ - Updates the specified Patient. - - Parameters: - - id: str. The ID of the Patient to update. - - - facility_id: str. The ID of the Facility where the patient is receiving care. - - - request: BasePatient. - """ - _response = await self._client_wrapper.httpx_client.request( - "PUT", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), - params=remove_none_from_dict({"facilityId": facility_id}), - json=jsonable_encoder(request), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(Patient, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def list(self, *, facility_id: typing.Optional[str] = None) -> ListPatientsResponse: - """ - Lists all Patients receiving care at the specified Facility, or all Patients if no Facility is specified. - - Parameters: - - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", "medical/v1/patient"), - params=remove_none_from_dict({"facilityId": facility_id}), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(ListPatientsResponse, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def delete(self, id: str, *, facility_id: typing.Optional[str] = None) -> None: - """ - Removes the specified Patient. - - Parameters: - - id: str. The ID of the Patient to delete. - - - facility_id: typing.Optional[str]. The ID of the Facility where the patient is receiving care. - """ - _response = await self._client_wrapper.httpx_client.request( - "DELETE", - urllib.parse.urljoin(f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{id}"), - params=remove_none_from_dict({"facilityId": facility_id}), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def get_medical_record_summary(self, patient_id: str, *, conversion_type: str) -> str: - """ - Returns the URL for a medical record summary - - Parameters: - - patient_id: str. The ID of the Patient. - - - conversion_type: str. The type of conversion to perform. `html` or `pdf` - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{patient_id}/medical-record" - ), - params=remove_none_from_dict({"conversionType": conversion_type}), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(str, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) - - async def get_medical_record_summary_status(self, patient_id: str) -> MedicalRecordStatus: - """ - Returns the status of a medical record summary - - Parameters: - - patient_id: str. The ID of the Patient. - """ - _response = await self._client_wrapper.httpx_client.request( - "GET", - urllib.parse.urljoin( - f"{self._client_wrapper.get_base_url()}/", f"medical/v1/patient/{patient_id}/medical-record-status" - ), - headers=self._client_wrapper.get_headers(), - timeout=60, - ) - if 200 <= _response.status_code < 300: - return pydantic.parse_obj_as(MedicalRecordStatus, _response.json()) # type: ignore - try: - _response_json = _response.json() - except JSONDecodeError: - raise ApiError(status_code=_response.status_code, body=_response.text) - raise ApiError(status_code=_response.status_code, body=_response_json) diff --git a/src/metriport/medical/resources/webhooks/__init__.py b/src/metriport/medical/webhooks/__init__.py similarity index 100% rename from src/metriport/medical/resources/webhooks/__init__.py rename to src/metriport/medical/webhooks/__init__.py diff --git a/src/metriport/medical/resources/webhooks/types/__init__.py b/src/metriport/medical/webhooks/types/__init__.py similarity index 100% rename from src/metriport/medical/resources/webhooks/types/__init__.py rename to src/metriport/medical/webhooks/types/__init__.py diff --git a/src/metriport/medical/resources/webhooks/types/consolidated_webhook_status.py b/src/metriport/medical/webhooks/types/consolidated_webhook_status.py similarity index 100% rename from src/metriport/medical/resources/webhooks/types/consolidated_webhook_status.py rename to src/metriport/medical/webhooks/types/consolidated_webhook_status.py diff --git a/src/metriport/medical/resources/webhooks/types/filters.py b/src/metriport/medical/webhooks/types/filters.py similarity index 100% rename from src/metriport/medical/resources/webhooks/types/filters.py rename to src/metriport/medical/webhooks/types/filters.py diff --git a/src/metriport/medical/resources/webhooks/types/mapi_webhook_status.py b/src/metriport/medical/webhooks/types/mapi_webhook_status.py similarity index 100% rename from src/metriport/medical/resources/webhooks/types/mapi_webhook_status.py rename to src/metriport/medical/webhooks/types/mapi_webhook_status.py diff --git a/src/metriport/medical/resources/webhooks/types/payload_patient.py b/src/metriport/medical/webhooks/types/payload_patient.py similarity index 93% rename from src/metriport/medical/resources/webhooks/types/payload_patient.py rename to src/metriport/medical/webhooks/types/payload_patient.py index 1fc0f60..4625ee0 100644 --- a/src/metriport/medical/resources/webhooks/types/payload_patient.py +++ b/src/metriport/medical/webhooks/types/payload_patient.py @@ -3,8 +3,8 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime -from .....fhir.types.bundle import Bundle +from ....core.datetime_utils import serialize_datetime +from ....fhir.types.bundle import Bundle from .consolidated_webhook_status import ConsolidatedWebhookStatus from .filters import Filters diff --git a/src/metriport/medical/resources/webhooks/types/webhook_document_data_payload.py b/src/metriport/medical/webhooks/types/webhook_document_data_payload.py similarity index 93% rename from src/metriport/medical/resources/webhooks/types/webhook_document_data_payload.py rename to src/metriport/medical/webhooks/types/webhook_document_data_payload.py index f06c044..06535cc 100644 --- a/src/metriport/medical/resources/webhooks/types/webhook_document_data_payload.py +++ b/src/metriport/medical/webhooks/types/webhook_document_data_payload.py @@ -3,8 +3,8 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime -from .....fhir.types.codeable_concept import CodeableConcept +from ....core.datetime_utils import serialize_datetime +from ....fhir.types.codeable_concept import CodeableConcept try: import pydantic.v1 as pydantic # type: ignore diff --git a/src/metriport/medical/resources/webhooks/types/webhook_metadata_payload.py b/src/metriport/medical/webhooks/types/webhook_metadata_payload.py similarity index 95% rename from src/metriport/medical/resources/webhooks/types/webhook_metadata_payload.py rename to src/metriport/medical/webhooks/types/webhook_metadata_payload.py index 8252916..0700742 100644 --- a/src/metriport/medical/resources/webhooks/types/webhook_metadata_payload.py +++ b/src/metriport/medical/webhooks/types/webhook_metadata_payload.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime try: import pydantic.v1 as pydantic # type: ignore diff --git a/src/metriport/medical/resources/webhooks/types/webhook_patient_consolidated_data_payload.py b/src/metriport/medical/webhooks/types/webhook_patient_consolidated_data_payload.py similarity index 95% rename from src/metriport/medical/resources/webhooks/types/webhook_patient_consolidated_data_payload.py rename to src/metriport/medical/webhooks/types/webhook_patient_consolidated_data_payload.py index 10a6d3c..c6cbf0f 100644 --- a/src/metriport/medical/resources/webhooks/types/webhook_patient_consolidated_data_payload.py +++ b/src/metriport/medical/webhooks/types/webhook_patient_consolidated_data_payload.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .payload_patient import PayloadPatient from .webhook_metadata_payload import WebhookMetadataPayload diff --git a/src/metriport/medical/resources/webhooks/types/webhook_patient_document_data_payload.py b/src/metriport/medical/webhooks/types/webhook_patient_document_data_payload.py similarity index 95% rename from src/metriport/medical/resources/webhooks/types/webhook_patient_document_data_payload.py rename to src/metriport/medical/webhooks/types/webhook_patient_document_data_payload.py index 01e94e9..56b7c0b 100644 --- a/src/metriport/medical/resources/webhooks/types/webhook_patient_document_data_payload.py +++ b/src/metriport/medical/webhooks/types/webhook_patient_document_data_payload.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .webhook_metadata_payload import WebhookMetadataPayload from .webhook_patient_payload import WebhookPatientPayload diff --git a/src/metriport/medical/resources/webhooks/types/webhook_patient_payload.py b/src/metriport/medical/webhooks/types/webhook_patient_payload.py similarity index 96% rename from src/metriport/medical/resources/webhooks/types/webhook_patient_payload.py rename to src/metriport/medical/webhooks/types/webhook_patient_payload.py index d7d7ef0..4028126 100644 --- a/src/metriport/medical/resources/webhooks/types/webhook_patient_payload.py +++ b/src/metriport/medical/webhooks/types/webhook_patient_payload.py @@ -3,7 +3,7 @@ import datetime as dt import typing -from .....core.datetime_utils import serialize_datetime +from ....core.datetime_utils import serialize_datetime from .mapi_webhook_status import MapiWebhookStatus from .webhook_document_data_payload import WebhookDocumentDataPayload