aimedicalcoding 0.3.1__tar.gz → 0.3.3__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.
- {aimedicalcoding-0.3.1/aimedicalcoding.egg-info → aimedicalcoding-0.3.3}/PKG-INFO +1 -1
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/README.md +13 -4
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/serialize.py +24 -14
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3/aimedicalcoding.egg-info}/PKG-INFO +1 -1
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/docs/GAP_SCHEMA.md +6 -4
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/setup.py +1 -1
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/LICENSE +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/MANIFEST.in +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/README_PYPI.md +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/__init__.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/__main__.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/adapters/__init__.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/adapters/base.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/adapters/ccda/__init__.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/adapters/ccda/adapter.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/adapters/ccda/codes.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/adapters/ccda/narrative.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/adapters/ccda/sections.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/adapters/custom_json/__init__.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/adapters/custom_json/adapter.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/adapters/fhir/__init__.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/adapters/fhir/adapter.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/adapters/fhir/codes.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/adapters/fhir/mapping.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/api.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/core/__init__.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/core/checkdigits.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/core/models.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/core/system_registry.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/pipeline/__init__.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/pipeline/orchestrator.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/recovery/__init__.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/recovery/engine.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/__init__.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/base.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/cvx/__init__.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/cvx/handler.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/cvx/normalize.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/cvx/patterns.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/icd10cm/__init__.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/icd10cm/handler.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/icd10cm/icdformat.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/icd10cm/patterns.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/loinc/__init__.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/loinc/axes.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/loinc/handler.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/loinc/normalize.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/loinc/patterns.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/rxnorm/__init__.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/rxnorm/handler.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/rxnorm/normalize.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/rxnorm/patterns.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/snomed/__init__.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/snomed/handler.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/snomed/hierarchy.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/snomed/patterns.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/snomed/qualifiers.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/terminology/__init__.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/terminology/service.py +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding.egg-info/SOURCES.txt +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding.egg-info/dependency_links.txt +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding.egg-info/entry_points.txt +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding.egg-info/requires.txt +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding.egg-info/top_level.txt +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/docs/ARCHITECTURE.md +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/docs/OUTPUT_GUIDE.md +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/docs/patterns/CVX_pattern_analysis.md +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/docs/patterns/ICD10CM_pattern_analysis.md +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/docs/patterns/LOINC_pattern_analysis.md +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/docs/patterns/RxNorm_pattern_analysis.md +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/docs/patterns/SNOMED_pattern_analysis.md +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/pyproject.toml +0 -0
- {aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aimedicalcoding
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Detect missing/broken clinical codes (LOINC / SNOMED CT / RxNorm / ICD-10-CM / CVX) in CCDA and FHIR documents, with recovery evidence
|
|
5
5
|
Author: Aakash Kag, Vinay Shankar Miryala, Siva Karthik, Mohammed Rayaan
|
|
6
6
|
License: MIT
|
|
@@ -56,11 +56,20 @@ Run tests:
|
|
|
56
56
|
```bash
|
|
57
57
|
pytest
|
|
58
58
|
```
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
|
|
60
|
+
### Publish to PyPI
|
|
61
|
+
|
|
62
|
+
See **`PUBLISHING.md`** for the full release guide (version bump in `setup.py`,
|
|
63
|
+
clean build, `twine check`, upload, verify, troubleshooting). Short version:
|
|
64
|
+
|
|
65
|
+
```powershell
|
|
66
|
+
# bump version in setup.py first — PyPI rejects re-uploads of the same version
|
|
67
|
+
Remove-Item -Recurse -Force dist; python -m build
|
|
68
|
+
python -m twine check dist/*
|
|
69
|
+
python -m twine upload dist/* # credentials from ~/.pypirc
|
|
62
70
|
```
|
|
63
|
-
|
|
71
|
+
|
|
72
|
+
Alternative: private publish to AWS CodeArtifact (the repo is on CodeCommit):
|
|
64
73
|
```bash
|
|
65
74
|
aws codeartifact login --tool twine --domain <domain> --repository <repo>
|
|
66
75
|
twine upload --repository codeartifact dist/*
|
|
@@ -121,13 +121,18 @@ def _dedupe(items) -> list:
|
|
|
121
121
|
return out
|
|
122
122
|
|
|
123
123
|
|
|
124
|
-
# SNOMED search-term enrichment
|
|
125
|
-
#
|
|
126
|
-
#
|
|
127
|
-
#
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
124
|
+
# SNOMED search-term enrichment (Problems 11450-4, Allergies 48765-2, Social
|
|
125
|
+
# History 29762-2), matched by section LOINC or by the contexts those sections
|
|
126
|
+
# route to (FHIR resources often carry no meta.tag/section code). Which slot's
|
|
127
|
+
# labels get appended differs by section:
|
|
128
|
+
# - Social History -> CODE tag labels (the question, e.g. "Gender identity" —
|
|
129
|
+
# the value label is often a placeholder like "Not on file")
|
|
130
|
+
# - Problems / Allergies -> VALUE tag labels (the concept; the code tag is a
|
|
131
|
+
# generic marker like ASSERTION / "Problem" — appending it is noise)
|
|
132
|
+
_SNOMED_CODE_LABEL_SECTIONS = {"29762-2"}
|
|
133
|
+
_SNOMED_CODE_LABEL_CONTEXTS = {"social_history"}
|
|
134
|
+
_SNOMED_VALUE_LABEL_SECTIONS = {"11450-4", "48765-2"}
|
|
135
|
+
_SNOMED_VALUE_LABEL_CONTEXTS = {"problem", "allergy_substance", "allergy_reaction"}
|
|
131
136
|
|
|
132
137
|
|
|
133
138
|
def _recovery(record: NormalizedRecord, slot: str, system: str) -> dict:
|
|
@@ -141,13 +146,18 @@ def _recovery(record: NormalizedRecord, slot: str, system: str) -> dict:
|
|
|
141
146
|
terms = [stmt.display_name, stmt.original_text]
|
|
142
147
|
# add any normalized term the handler produced
|
|
143
148
|
terms += [ev.get("analyte_normalized"), ev.get("term_normalized"), ev.get("ingredient")]
|
|
144
|
-
# SNOMED only, Problems/Allergies/Social History only: append
|
|
145
|
-
#
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
# SNOMED only, Problems/Allergies/Social History only: append trailing
|
|
150
|
+
# label context from the section-appropriate slot (see constants above).
|
|
151
|
+
if system == System.SNOMEDCT.value:
|
|
152
|
+
if (stmt.section_code in _SNOMED_CODE_LABEL_SECTIONS
|
|
153
|
+
or stmt.context in _SNOMED_CODE_LABEL_CONTEXTS):
|
|
154
|
+
terms += [stmt.display_name, stmt.original_text]
|
|
155
|
+
elif (stmt.section_code in _SNOMED_VALUE_LABEL_SECTIONS
|
|
156
|
+
or stmt.context in _SNOMED_VALUE_LABEL_CONTEXTS):
|
|
157
|
+
if stmt.value:
|
|
158
|
+
terms += [stmt.value.coded_value.display
|
|
159
|
+
if stmt.value.coded_value else None,
|
|
160
|
+
stmt.value.original_text]
|
|
151
161
|
|
|
152
162
|
rec = {
|
|
153
163
|
"search_terms": _dedupe(terms),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aimedicalcoding
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Detect missing/broken clinical codes (LOINC / SNOMED CT / RxNorm / ICD-10-CM / CVX) in CCDA and FHIR documents, with recovery evidence
|
|
5
5
|
Author: Aakash Kag, Vinay Shankar Miryala, Siva Karthik, Mohammed Rayaan
|
|
6
6
|
License: MIT
|
|
@@ -89,10 +89,12 @@ Each record separates four concerns:
|
|
|
89
89
|
- `target.slot = "code"` (LOINC) → search `observation.code.display_text` / `.original_text`.
|
|
90
90
|
- `target.slot = "value"` (SNOMED value-slot) → search `observation.value.display_text` / `.original_text`.
|
|
91
91
|
`recovery.search_terms` already gives you the right ones, deduped.
|
|
92
|
-
For **SNOMED-CT** targets
|
|
93
|
-
Social History (29762-2)
|
|
94
|
-
|
|
95
|
-
|
|
92
|
+
For **SNOMED-CT** targets, extra label context is appended at the end,
|
|
93
|
+
section-specific: **Social History (29762-2)** appends the CODE tag's
|
|
94
|
+
`display_text`/`original_text` (the question — useful when the value label
|
|
95
|
+
is a placeholder like "Not on file"); **Problems (11450-4)** and
|
|
96
|
+
**Allergies (48765-2)** append the VALUE tag's labels (the concept — the
|
|
97
|
+
code tag there is a generic marker like ASSERTION/"Problem").
|
|
96
98
|
|
|
97
99
|
---
|
|
98
100
|
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="aimedicalcoding",
|
|
5
|
-
version="0.3.
|
|
5
|
+
version="0.3.3",
|
|
6
6
|
author="Aakash Kag, Vinay Shankar Miryala, Siva Karthik, Mohammed Rayaan",
|
|
7
7
|
description=(
|
|
8
8
|
"Detect missing/broken clinical codes (LOINC / SNOMED CT / RxNorm / "
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/adapters/custom_json/__init__.py
RENAMED
|
File without changes
|
{aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/adapters/custom_json/adapter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/icd10cm/icdformat.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding/systems/snomed/qualifiers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aimedicalcoding-0.3.1 → aimedicalcoding-0.3.3}/aimedicalcoding.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|