assured-py 0.1.0a0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- assured_py-0.1.0a0/.env.example +4 -0
- assured_py-0.1.0a0/.github/workflows/ci.yml +29 -0
- assured_py-0.1.0a0/.github/workflows/codeql.yml +99 -0
- assured_py-0.1.0a0/.github/workflows/release.yml +106 -0
- assured_py-0.1.0a0/.gitignore +177 -0
- assured_py-0.1.0a0/.pre-commit-config.yaml +12 -0
- assured_py-0.1.0a0/.python-version +1 -0
- assured_py-0.1.0a0/.vscode/tasks.json +19 -0
- assured_py-0.1.0a0/API_Divergence.md +87 -0
- assured_py-0.1.0a0/Assured Platform API.json +9472 -0
- assured_py-0.1.0a0/PKG-INFO +105 -0
- assured_py-0.1.0a0/README.md +85 -0
- assured_py-0.1.0a0/main.py +6 -0
- assured_py-0.1.0a0/pyproject.toml +50 -0
- assured_py-0.1.0a0/src/assured/__init__.py +6 -0
- assured_py-0.1.0a0/src/assured/client.py +318 -0
- assured_py-0.1.0a0/src/assured/exceptions.py +35 -0
- assured_py-0.1.0a0/src/assured/models/__init__.py +1 -0
- assured_py-0.1.0a0/src/assured/models/common.py +29 -0
- assured_py-0.1.0a0/src/assured/models/credentialing.py +106 -0
- assured_py-0.1.0a0/src/assured/models/facilities.py +19 -0
- assured_py-0.1.0a0/src/assured/models/files.py +55 -0
- assured_py-0.1.0a0/src/assured/models/hospital_affiliations.py +72 -0
- assured_py-0.1.0a0/src/assured/models/payer_enrollment.py +97 -0
- assured_py-0.1.0a0/src/assured/models/practice_locations.py +39 -0
- assured_py-0.1.0a0/src/assured/models/provider_profile.py +442 -0
- assured_py-0.1.0a0/src/assured/models/providers.py +71 -0
- assured_py-0.1.0a0/src/assured/models/tasks.py +86 -0
- assured_py-0.1.0a0/src/assured/models/tax_entities.py +25 -0
- assured_py-0.1.0a0/src/assured/models/users.py +37 -0
- assured_py-0.1.0a0/src/assured/resources/__init__.py +1 -0
- assured_py-0.1.0a0/src/assured/resources/account.py +24 -0
- assured_py-0.1.0a0/src/assured/resources/credentialing.py +60 -0
- assured_py-0.1.0a0/src/assured/resources/facilities.py +39 -0
- assured_py-0.1.0a0/src/assured/resources/files.py +67 -0
- assured_py-0.1.0a0/src/assured/resources/hospital_affiliations.py +133 -0
- assured_py-0.1.0a0/src/assured/resources/payer_enrollment.py +131 -0
- assured_py-0.1.0a0/src/assured/resources/practice_locations.py +52 -0
- assured_py-0.1.0a0/src/assured/resources/provider_profile.py +460 -0
- assured_py-0.1.0a0/src/assured/resources/providers.py +134 -0
- assured_py-0.1.0a0/src/assured/resources/tasks.py +90 -0
- assured_py-0.1.0a0/src/assured/resources/tax_entities.py +48 -0
- assured_py-0.1.0a0/src/assured/resources/users.py +81 -0
- assured_py-0.1.0a0/src/assured/settings.py +57 -0
- assured_py-0.1.0a0/tests/__init__.py +1 -0
- assured_py-0.1.0a0/tests/conftest.py +41 -0
- assured_py-0.1.0a0/tests/test_credentialing.py +99 -0
- assured_py-0.1.0a0/tests/test_files.py +84 -0
- assured_py-0.1.0a0/tests/test_providers.py +163 -0
- assured_py-0.1.0a0/tests/test_tasks.py +93 -0
- assured_py-0.1.0a0/tests/test_users.py +120 -0
- assured_py-0.1.0a0/uv.lock +578 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [main]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [main]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
name: Test (Python ${{ matrix.python-version }})
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
strategy:
|
|
17
|
+
matrix:
|
|
18
|
+
python-version: ["3.13"]
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v5
|
|
21
|
+
- uses: actions/setup-python@v6
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip pytest
|
|
27
|
+
pip install -e ".[dev]"
|
|
28
|
+
- name: Run tests
|
|
29
|
+
run: pytest tests/ -v
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# For most projects, this workflow file will not need changing; you simply need
|
|
2
|
+
# to commit it to your repository.
|
|
3
|
+
#
|
|
4
|
+
# You may wish to alter this file to override the set of languages analyzed,
|
|
5
|
+
# or to provide custom queries or build logic.
|
|
6
|
+
#
|
|
7
|
+
# ******** NOTE ********
|
|
8
|
+
# We have attempted to detect the languages in your repository. Please check
|
|
9
|
+
# the `language` matrix defined below to confirm you have the correct set of
|
|
10
|
+
# supported CodeQL languages.
|
|
11
|
+
#
|
|
12
|
+
name: "CodeQL Advanced"
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
branches: [ "main" ]
|
|
17
|
+
pull_request:
|
|
18
|
+
branches: [ "main" ]
|
|
19
|
+
schedule:
|
|
20
|
+
- cron: '20 5 * * 2'
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
analyze:
|
|
24
|
+
name: Analyze (${{ matrix.language }})
|
|
25
|
+
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
|
26
|
+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
|
27
|
+
# - https://gh.io/supported-runners-and-hardware-resources
|
|
28
|
+
# - https://gh.io/using-larger-runners (GitHub.com only)
|
|
29
|
+
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
|
30
|
+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
|
31
|
+
permissions:
|
|
32
|
+
# required for all workflows
|
|
33
|
+
security-events: write
|
|
34
|
+
|
|
35
|
+
# required to fetch internal or private CodeQL packs
|
|
36
|
+
packages: read
|
|
37
|
+
|
|
38
|
+
# only required for workflows in private repositories
|
|
39
|
+
actions: read
|
|
40
|
+
contents: read
|
|
41
|
+
|
|
42
|
+
strategy:
|
|
43
|
+
fail-fast: false
|
|
44
|
+
matrix:
|
|
45
|
+
include:
|
|
46
|
+
- language: python
|
|
47
|
+
build-mode: none
|
|
48
|
+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
|
|
49
|
+
# Use `c-cpp` to analyze code written in C, C++ or both
|
|
50
|
+
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
|
51
|
+
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
|
52
|
+
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
|
53
|
+
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
|
54
|
+
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
|
55
|
+
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
|
56
|
+
steps:
|
|
57
|
+
- name: Checkout repository
|
|
58
|
+
uses: actions/checkout@v4
|
|
59
|
+
|
|
60
|
+
# Add any setup steps before running the `github/codeql-action/init` action.
|
|
61
|
+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
|
62
|
+
# or others). This is typically only required for manual builds.
|
|
63
|
+
# - name: Setup runtime (example)
|
|
64
|
+
# uses: actions/setup-example@v1
|
|
65
|
+
|
|
66
|
+
# Initializes the CodeQL tools for scanning.
|
|
67
|
+
- name: Initialize CodeQL
|
|
68
|
+
uses: github/codeql-action/init@v4
|
|
69
|
+
with:
|
|
70
|
+
languages: ${{ matrix.language }}
|
|
71
|
+
build-mode: ${{ matrix.build-mode }}
|
|
72
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
73
|
+
# By default, queries listed here will override any specified in a config file.
|
|
74
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
75
|
+
|
|
76
|
+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
|
77
|
+
# queries: security-extended,security-and-quality
|
|
78
|
+
|
|
79
|
+
# If the analyze step fails for one of the languages you are analyzing with
|
|
80
|
+
# "We were unable to automatically build your code", modify the matrix above
|
|
81
|
+
# to set the build mode to "manual" for that language. Then modify this step
|
|
82
|
+
# to build your code.
|
|
83
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
|
84
|
+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
|
85
|
+
- name: Run manual build steps
|
|
86
|
+
if: matrix.build-mode == 'manual'
|
|
87
|
+
shell: bash
|
|
88
|
+
run: |
|
|
89
|
+
echo 'If you are using a "manual" build mode for one or more of the' \
|
|
90
|
+
'languages you are analyzing, replace this with the commands to build' \
|
|
91
|
+
'your code, for example:'
|
|
92
|
+
echo ' make bootstrap'
|
|
93
|
+
echo ' make release'
|
|
94
|
+
exit 1
|
|
95
|
+
|
|
96
|
+
- name: Perform CodeQL Analysis
|
|
97
|
+
uses: github/codeql-action/analyze@v4
|
|
98
|
+
with:
|
|
99
|
+
category: "/language:${{matrix.language}}"
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
name: Release to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version:
|
|
7
|
+
description: Exact version to release (e.g. 1.2.3)
|
|
8
|
+
required: true
|
|
9
|
+
type: string
|
|
10
|
+
prerelease:
|
|
11
|
+
description: Mark GitHub release as prerelease
|
|
12
|
+
required: false
|
|
13
|
+
default: false
|
|
14
|
+
type: boolean
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: write
|
|
18
|
+
id-token: write
|
|
19
|
+
|
|
20
|
+
concurrency:
|
|
21
|
+
group: release-main
|
|
22
|
+
cancel-in-progress: false
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
release:
|
|
26
|
+
name: Release
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
environment:
|
|
29
|
+
name: pypi
|
|
30
|
+
url: https://pypi.org/p/assured-py
|
|
31
|
+
|
|
32
|
+
steps:
|
|
33
|
+
- name: Checkout latest main
|
|
34
|
+
uses: actions/checkout@v5
|
|
35
|
+
with:
|
|
36
|
+
ref: main
|
|
37
|
+
fetch-depth: 0
|
|
38
|
+
|
|
39
|
+
- name: Set up Python
|
|
40
|
+
uses: actions/setup-python@v6
|
|
41
|
+
with:
|
|
42
|
+
python-version: "3.13"
|
|
43
|
+
|
|
44
|
+
- name: Install tooling
|
|
45
|
+
run: |
|
|
46
|
+
python -m pip install --upgrade pip
|
|
47
|
+
pip install -e ".[dev]"
|
|
48
|
+
pip install hatch
|
|
49
|
+
|
|
50
|
+
- name: Prep Version Info
|
|
51
|
+
id: ver
|
|
52
|
+
run: |
|
|
53
|
+
NEW_VERSION="${{ inputs.version }}"
|
|
54
|
+
# Strip 'v' if accidentally included by user
|
|
55
|
+
NEW_VERSION="${NEW_VERSION#v}"
|
|
56
|
+
echo "version=${NEW_VERSION}" >> "$GITHUB_OUTPUT"
|
|
57
|
+
echo "tag=v${NEW_VERSION}" >> "$GITHUB_OUTPUT"
|
|
58
|
+
|
|
59
|
+
- name: Ensure tag does not exist
|
|
60
|
+
run: |
|
|
61
|
+
if git ls-remote --tags origin | grep -q "refs/tags/${{ steps.ver.outputs.tag }}$"; then
|
|
62
|
+
echo "Tag ${{ steps.ver.outputs.tag }} already exists"
|
|
63
|
+
exit 1
|
|
64
|
+
fi
|
|
65
|
+
|
|
66
|
+
- name: Create tag locally (for hatch-vcs)
|
|
67
|
+
run: |
|
|
68
|
+
git config user.name "github-actions[bot]"
|
|
69
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
70
|
+
git tag -a "${{ steps.ver.outputs.tag }}" -m "Release ${{ steps.ver.outputs.tag }}"
|
|
71
|
+
|
|
72
|
+
- name: Lint
|
|
73
|
+
run: |
|
|
74
|
+
ruff check .
|
|
75
|
+
ruff format --check .
|
|
76
|
+
|
|
77
|
+
- name: Test
|
|
78
|
+
run: pytest tests/ -v
|
|
79
|
+
|
|
80
|
+
- name: Build
|
|
81
|
+
run: hatch build
|
|
82
|
+
|
|
83
|
+
- name: Verify built version
|
|
84
|
+
run: |
|
|
85
|
+
ls dist/
|
|
86
|
+
if ! ls dist/ | grep -q "${{ steps.ver.outputs.version }}"; then
|
|
87
|
+
echo "ERROR: Built artifacts do not contain expected version ${{ steps.ver.outputs.version }}"
|
|
88
|
+
exit 1
|
|
89
|
+
fi
|
|
90
|
+
|
|
91
|
+
- name: Push tag
|
|
92
|
+
run: git push origin "${{ steps.ver.outputs.tag }}"
|
|
93
|
+
|
|
94
|
+
- name: Create GitHub release
|
|
95
|
+
env:
|
|
96
|
+
GH_TOKEN: ${{ github.token }}
|
|
97
|
+
run: |
|
|
98
|
+
gh release create "${{ steps.ver.outputs.tag }}" \
|
|
99
|
+
--title "${{ steps.ver.outputs.tag }}" \
|
|
100
|
+
--generate-notes \
|
|
101
|
+
$([ "${{ inputs.prerelease }}" = "true" ] && echo "--prerelease")
|
|
102
|
+
|
|
103
|
+
- name: Publish to PyPI
|
|
104
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
105
|
+
with:
|
|
106
|
+
packages-dir: dist/
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# =============================================
|
|
2
|
+
# Python .gitignore (reusable template)
|
|
3
|
+
# =============================================
|
|
4
|
+
|
|
5
|
+
# Byte-compiled / optimized / DLL files
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[codz]
|
|
8
|
+
*$py.class
|
|
9
|
+
|
|
10
|
+
# C extensions
|
|
11
|
+
*.so
|
|
12
|
+
|
|
13
|
+
# Distribution / packaging
|
|
14
|
+
.Python
|
|
15
|
+
build/
|
|
16
|
+
develop-eggs/
|
|
17
|
+
dist/
|
|
18
|
+
downloads/
|
|
19
|
+
eggs/
|
|
20
|
+
.eggs/
|
|
21
|
+
lib/
|
|
22
|
+
lib64/
|
|
23
|
+
parts/
|
|
24
|
+
sdist/
|
|
25
|
+
var/
|
|
26
|
+
wheels/
|
|
27
|
+
share/python-wheels/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
MANIFEST
|
|
32
|
+
|
|
33
|
+
# PyInstaller
|
|
34
|
+
*.manifest
|
|
35
|
+
*.spec
|
|
36
|
+
|
|
37
|
+
# Installer logs
|
|
38
|
+
pip-log.txt
|
|
39
|
+
pip-delete-this-directory.txt
|
|
40
|
+
|
|
41
|
+
# Unit test / coverage reports
|
|
42
|
+
htmlcov/
|
|
43
|
+
.tox/
|
|
44
|
+
.nox/
|
|
45
|
+
.coverage
|
|
46
|
+
.coverage.*
|
|
47
|
+
.cache
|
|
48
|
+
nosetests.xml
|
|
49
|
+
coverage.xml
|
|
50
|
+
*.cover
|
|
51
|
+
*.py.cover
|
|
52
|
+
.hypothesis/
|
|
53
|
+
.pytest_cache/
|
|
54
|
+
cover/
|
|
55
|
+
|
|
56
|
+
# Translations
|
|
57
|
+
*.mo
|
|
58
|
+
*.pot
|
|
59
|
+
|
|
60
|
+
# Environments / secrets
|
|
61
|
+
.env
|
|
62
|
+
.envrc
|
|
63
|
+
.venv
|
|
64
|
+
env/
|
|
65
|
+
venv/
|
|
66
|
+
ENV/
|
|
67
|
+
env.bak/
|
|
68
|
+
venv.bak/
|
|
69
|
+
config.json
|
|
70
|
+
|
|
71
|
+
# Virtual env tooling
|
|
72
|
+
# .python-version
|
|
73
|
+
# Pipfile.lock
|
|
74
|
+
# uv.lock
|
|
75
|
+
# poetry.lock
|
|
76
|
+
# poetry.toml
|
|
77
|
+
# pdm.lock
|
|
78
|
+
# pdm.toml
|
|
79
|
+
# pixi.lock
|
|
80
|
+
.pdm-python
|
|
81
|
+
.pdm-build/
|
|
82
|
+
.pixi
|
|
83
|
+
__pypackages__/
|
|
84
|
+
|
|
85
|
+
# Jupyter / IPython
|
|
86
|
+
*.ipynb
|
|
87
|
+
.ipynb_checkpoints/
|
|
88
|
+
profile_default/
|
|
89
|
+
ipython_config.py
|
|
90
|
+
|
|
91
|
+
# Django
|
|
92
|
+
*.log
|
|
93
|
+
local_settings.py
|
|
94
|
+
db.sqlite3
|
|
95
|
+
db.sqlite3-journal
|
|
96
|
+
|
|
97
|
+
# Flask
|
|
98
|
+
instance/
|
|
99
|
+
.webassets-cache
|
|
100
|
+
|
|
101
|
+
# Scrapy
|
|
102
|
+
.scrapy
|
|
103
|
+
|
|
104
|
+
# Sphinx documentation
|
|
105
|
+
docs/_build/
|
|
106
|
+
|
|
107
|
+
# PyBuilder
|
|
108
|
+
.pybuilder/
|
|
109
|
+
target/
|
|
110
|
+
|
|
111
|
+
# Celery
|
|
112
|
+
celerybeat-schedule
|
|
113
|
+
celerybeat.pid
|
|
114
|
+
|
|
115
|
+
# Redis
|
|
116
|
+
*.rdb
|
|
117
|
+
*.aof
|
|
118
|
+
*.pid
|
|
119
|
+
|
|
120
|
+
# RabbitMQ
|
|
121
|
+
mnesia/
|
|
122
|
+
rabbitmq/
|
|
123
|
+
rabbitmq-data/
|
|
124
|
+
|
|
125
|
+
# ActiveMQ
|
|
126
|
+
activemq-data/
|
|
127
|
+
|
|
128
|
+
# SageMath
|
|
129
|
+
*.sage.py
|
|
130
|
+
|
|
131
|
+
# Marimo
|
|
132
|
+
marimo/_static/
|
|
133
|
+
marimo/_lsp/
|
|
134
|
+
__marimo__/
|
|
135
|
+
|
|
136
|
+
# Streamlit
|
|
137
|
+
.streamlit/secrets.toml
|
|
138
|
+
|
|
139
|
+
# Linters / type checkers
|
|
140
|
+
.ruff_cache/
|
|
141
|
+
.mypy_cache/
|
|
142
|
+
.dmypy.json
|
|
143
|
+
dmypy.json
|
|
144
|
+
.pyre/
|
|
145
|
+
.pytype/
|
|
146
|
+
cython_debug/
|
|
147
|
+
|
|
148
|
+
# PyPI
|
|
149
|
+
.pypirc
|
|
150
|
+
|
|
151
|
+
# Spyder
|
|
152
|
+
.spyderproject
|
|
153
|
+
.spyproject
|
|
154
|
+
|
|
155
|
+
# Rope
|
|
156
|
+
.ropeproject
|
|
157
|
+
|
|
158
|
+
# Abstra
|
|
159
|
+
.abstra/
|
|
160
|
+
|
|
161
|
+
# mkdocs
|
|
162
|
+
/site
|
|
163
|
+
|
|
164
|
+
# IDE — VS Code
|
|
165
|
+
.vscode/*
|
|
166
|
+
!.vscode/settings.json
|
|
167
|
+
!.vscode/tasks.json
|
|
168
|
+
!.vscode/launch.json
|
|
169
|
+
!.vscode/extensions.json
|
|
170
|
+
!.vscode/*.code-snippets
|
|
171
|
+
!*.code-workspace
|
|
172
|
+
*.vsix
|
|
173
|
+
|
|
174
|
+
# IDE — JetBrains
|
|
175
|
+
.idea/
|
|
176
|
+
demo_ssn_rev_eng.py
|
|
177
|
+
rev-eng/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
# Ruff version
|
|
4
|
+
rev: v0.15.10
|
|
5
|
+
hooks:
|
|
6
|
+
# Run the linter.
|
|
7
|
+
- id: ruff
|
|
8
|
+
types_or: [python, pyi, jupyter, pyproject]
|
|
9
|
+
args: [--fix]
|
|
10
|
+
# Run the formatter.
|
|
11
|
+
- id: ruff-format
|
|
12
|
+
types_or: [python, pyi, jupyter]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "2.0.0",
|
|
3
|
+
"tasks": [
|
|
4
|
+
{
|
|
5
|
+
"label": "Run All Tests",
|
|
6
|
+
"type": "shell",
|
|
7
|
+
"command": "pytest",
|
|
8
|
+
"group": "test",
|
|
9
|
+
"problemMatcher": "$python"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"label": "Run Current Test File",
|
|
13
|
+
"type": "shell",
|
|
14
|
+
"command": "pytest ${file}",
|
|
15
|
+
"group": "test",
|
|
16
|
+
"problemMatcher": "$python"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Assured Platform API — Spec vs Reality
|
|
2
|
+
|
|
3
|
+
This document outlines the known discrepancies between the official OpenAPI specification (`Assured Platform API.json`) and the actual operational behavior of the production Assured Platform API as implemented in the `assured` SDK.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
> [!WARNING]
|
|
8
|
+
> These endpoints and payloads deviate from the documented spec. The `assured` SDK has been built to support **actual** production behavior, superseding the official OpenAPI schema in these cases.
|
|
9
|
+
|
|
10
|
+
## 1. Provider Personal Info (`provider-personal-info`)
|
|
11
|
+
|
|
12
|
+
**Spec:** Undocumented entirely in the OpenAPI spec.
|
|
13
|
+
**Reality:** The API exposes comprehensive GET and PATCH endpoints used to manage a provider's primary demographic, descriptive, and background context forms.
|
|
14
|
+
|
|
15
|
+
- **Methods:** `GET /api/v1/users/provider-personal-info/{profile_id}/` and `PATCH`.
|
|
16
|
+
- **Payload/Model:** Contains 55 fields encompassing demographics (name, DOB, SSN, NPI, CAQH ID), residency addresses, correspondence addresses, practice settings, languages, ECFMG status, visa/citizenship details, and military service records.
|
|
17
|
+
- **Quirk:** The API requires the *complete* model payload when making `PATCH` requests; omitting unmodified existing fields will trigger `HTTP 400 Validation Error`. Furthermore, `null` must be used strictly for nullable fields rather than omitting the key. The SDK's `update_personal_info` handles this automatically via fetch-merge-patch.
|
|
18
|
+
|
|
19
|
+
## 2. Provider Employment Endpoints
|
|
20
|
+
|
|
21
|
+
**Spec:** Documented as `GET / POST / PATCH / DELETE` on `/api/v1/users/provider-employments/`.
|
|
22
|
+
**Reality:** The platform has silently migrated to a `v1` endpoint for provider employments that carries a drastically different schema.
|
|
23
|
+
|
|
24
|
+
- **Endpoint:** Instead of `/api/v1/users/provider-employments/`, the API expects `/api/v1/users/provider-employment-v1/`.
|
|
25
|
+
- **Schema Differences:** The new endpoint requires/returns many additional and renamed fields.
|
|
26
|
+
- *Deprecated/Replaced Fields:* `is_current` (now `currently_employed`), `reason_for_leaving` (now `reason_for_discontinuance`).
|
|
27
|
+
- *New Fields explicitly required:* `type`, `gap_explanation`, `address`, `city`, `state`, `country`, `zip_code`, `phone_number`, `email_address`, `contact_information`, `document`.
|
|
28
|
+
- **Compatibility:** The SDK models (`Employment` and `EmploymentCreate`) include both the new specific `v1` fields and the older schema fields to ensure backward compatibility.
|
|
29
|
+
|
|
30
|
+
## 3. Provider Education Endpoints
|
|
31
|
+
|
|
32
|
+
**Spec:** The schema defines a simple model containing `institution_name`, `degree`, `start_date`, and `end_date`.
|
|
33
|
+
**Reality:** The actual endpoint requires a much richer location-oriented schema to track the exact identity and place of education.
|
|
34
|
+
|
|
35
|
+
- **Schema Differences:**
|
|
36
|
+
- *Deprecated/Replaced Fields:* `institution_name` generally superseded by `name`.
|
|
37
|
+
- *New Fields added:* `city`, `state`, `country`, `is_primary`, `address_street_1`, `address_street_2`, `postal_code`.
|
|
38
|
+
- **Compatibility:** Like employment, the SDK integrates these richer properties onto the SDK `Education` models while preserving `institution_name` for legacy use.
|
|
39
|
+
|
|
40
|
+
## 4. Provider Account vs Provider Profile IDs
|
|
41
|
+
|
|
42
|
+
**Spec:** Often implies a generic "Provider ID" is passed across routes.
|
|
43
|
+
**Reality:** The API is highly sensitive to the distinction between a Provider Account and a Provider Profile.
|
|
44
|
+
|
|
45
|
+
- **Provider Account ID:** The core identity record (UUID), passed to the list and invite endpoints.
|
|
46
|
+
- **Provider Profile ID:** A separate UUID 1:1 linked to the account, which must be used for nearly all `provider_profile` domains (Personal Info, Certifications, Licenses, Insurance, etc.). Mixing them up causes the API to fail with `404` or `422`.
|
|
47
|
+
- **SDK Solution:** Built a dedicated resolution helper via `client.providers.get_profile_id(account_id)` to gracefully bridge this gap automatically.
|
|
48
|
+
|
|
49
|
+
## 5. Encrypted SSN Endpoint
|
|
50
|
+
|
|
51
|
+
**Spec:** Not documented in the API behavior.
|
|
52
|
+
**Reality:** The platform requires SSNs to be submitted as a symmetrically encrypted token rather than plaintext.
|
|
53
|
+
|
|
54
|
+
- **Endpoint:** `PATCH /api/v1/users/retrieve-update-provider-ssn-sym-encrypted/{provider_profile_id}/`
|
|
55
|
+
- **Authentication:** Ironically, this specific profile endpoint rejects standard API Keys and strictly requires standard `Authorization: Bearer {jwt}` headers using a valid session JWT token.
|
|
56
|
+
- **Payload & Encryption:**
|
|
57
|
+
- Expects `{"ssn": "<Base64 Encoded Ciphertext>"}`
|
|
58
|
+
- The ciphertext must be encoded using an `AES-256-CTR` standard.
|
|
59
|
+
- The symmetric key is dynamically generated via a `SHA256` hash of the provided JWT token.
|
|
60
|
+
- A random 16-byte `IV` is prefixed against the ciphertext before Base64 encoding.
|
|
61
|
+
|
|
62
|
+
## 6. JWT Generation (Login)
|
|
63
|
+
|
|
64
|
+
**Spec:** No programmatic configuration or endpoint for acquiring Session JWTs.
|
|
65
|
+
**Reality:** The frontend relies on an undocumented login endpoint to generate the required JWTs.
|
|
66
|
+
|
|
67
|
+
- **Endpoint:** `POST /api/v1/users/login/`
|
|
68
|
+
- **Payload:** `{"email": "...", "password": "...", "remember": true}`
|
|
69
|
+
- **SDK Solution:** Exposed `await client.users.login(email, password)` and integrated a lazy caching mechanism securely into the `AssuredClient`. The client pulls credentials via `pydantic-settings` (`ASSURED_USER` and `ASSURED_PASS`) from the environment, automating JWT injection when standard API Key authentication isn't enough.
|
|
70
|
+
|
|
71
|
+
## 7. File Uploads and Presigned URLs
|
|
72
|
+
|
|
73
|
+
**Spec:** The OpenAPI spec expects generic REST models.
|
|
74
|
+
**Reality:** The entire document handling subsystem is built on heavily customized AWS storage APIs driven through the Assured Django interface.
|
|
75
|
+
|
|
76
|
+
- **Storage Extraction:** Files must be uploaded to `/api/v1/files/handle/` using a raw `multipart/form-data` payload containing a UUID `name` key, and the binary data under `file`. This endpoint specifically enforces JWT Bearer authentication. It returns an `s3://` object reference (`file_url`).
|
|
77
|
+
- **Temporary Access:** Due to S3 protections, URLs cannot be exposed safely. The SDK invokes `/api/v1/files/presign-s3-url/presign_s3_url/` feeding it back the `s3://` path which brokers a limited-time publicly accessible URL.
|
|
78
|
+
|
|
79
|
+
## 8. Provider Document Associations
|
|
80
|
+
|
|
81
|
+
**Spec:** Documents are typically grouped loosely without strict multi-stage processes explicitly outlined.
|
|
82
|
+
**Reality:** Linking an actual file binary to a Provider Profile is a two-step process.
|
|
83
|
+
|
|
84
|
+
- **Process:**
|
|
85
|
+
1. The user must first process the raw file via the JWT-restricted route `/api/v1/files/handle/` to extract the `s3://` URI.
|
|
86
|
+
2. The user then posts a specialized schema mapping the `document_url` to a `provider` id at `/api/v1/users/provider-documents/` (which *also* expects JWT constraints).
|
|
87
|
+
- **SDK Solution:** Built an abstraction `.upload_and_associate_document()` to bridge this workflow securely underneath a single execution wrapper while preserving accurate typing semantics!
|