codedx 0.3.0__tar.gz → 0.3.1__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.
- {codedx-0.3.0 → codedx-0.3.1}/CHANGELOG.md +6 -1
- {codedx-0.3.0 → codedx-0.3.1}/PKG-INFO +9 -8
- {codedx-0.3.0 → codedx-0.3.1}/README.md +8 -7
- {codedx-0.3.0 → codedx-0.3.1}/hatch_build.py +13 -2
- {codedx-0.3.0 → codedx-0.3.1}/pyproject.toml +3 -1
- {codedx-0.3.0 → codedx-0.3.1}/.gitignore +0 -0
- {codedx-0.3.0 → codedx-0.3.1}/src/codedx/__init__.py +0 -0
- {codedx-0.3.0 → codedx-0.3.1}/src/codedx/_core.py +0 -0
- {codedx-0.3.0 → codedx-0.3.1}/src/codedx/chapters.py +0 -0
- {codedx-0.3.0 → codedx-0.3.1}/src/codedx/icd10cm.py +0 -0
- {codedx-0.3.0 → codedx-0.3.1}/src/codedx/icd10se.py +0 -0
- {codedx-0.3.0 → codedx-0.3.1}/src/codedx/icd10who.py +0 -0
- {codedx-0.3.0 → codedx-0.3.1}/src/codedx/ksh97p.py +0 -0
- {codedx-0.3.0 → codedx-0.3.1}/src/codedx/rehab.py +0 -0
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.1 — 2026-06-08
|
|
4
|
+
|
|
5
|
+
- Migrate KSH97-P downloads from Socialstyrelsen to Ehälsomyndigheten Confluence
|
|
6
|
+
|
|
3
7
|
## 0.3.0 — 2026-06-08
|
|
4
8
|
|
|
5
9
|
### Added
|
|
@@ -11,7 +15,8 @@
|
|
|
11
15
|
|
|
12
16
|
## 0.2.0
|
|
13
17
|
|
|
14
|
-
-
|
|
18
|
+
- ICD-10-SE and history file now downloaded from Ehälsomyndigheten (replacing Socialstyrelsen URLs)
|
|
19
|
+
- Retired code lookup now uses the comprehensive history file (`historik-icd-10-se-1997-2026.xlsx`) covering all codes 1997–2026, instead of the partial inactivation list
|
|
15
20
|
|
|
16
21
|
## 0.1.0
|
|
17
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codedx
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Swedish medical coding used for diagnosis codes
|
|
5
5
|
Author-email: Ludvig Hult <ludvig.hult@gmail.com>
|
|
6
6
|
Requires-Python: >=3.12
|
|
@@ -46,13 +46,14 @@ Dots are dropped throughout, matching what is typically found in databases: `A01
|
|
|
46
46
|
pip install codedx
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
Downloads data at install time
|
|
49
|
+
Downloads data at install time. Raw files are not redistributed due to licence restrictions.
|
|
50
50
|
|
|
51
|
-
##
|
|
51
|
+
## Data sources
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
- ICD-10-SE and history file now downloaded from Ehälsomyndigheten (replacing Socialstyrelsen URLs)
|
|
55
|
-
- Retired code lookup now uses the comprehensive history file (`historik-icd-10-se-1997-2026.xlsx`) covering all codes 1997–2026, instead of the partial inactivation list
|
|
53
|
+
Classification files come from two Swedish authorities:
|
|
56
54
|
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
**Ehälsomyndigheten** maintains ICD-10-SE and KSH97-P. Files are downloaded from their Confluence collaboration platform. KSH97-P (primary care classification) is being phased out in favour of ICD-10-SE.
|
|
56
|
+
|
|
57
|
+
**Socialstyrelsen** retains responsibility for the NordDRG system and the associated rehab function codes (UA/UB series). These files are downloaded from Socialstyrelsen's website.
|
|
58
|
+
|
|
59
|
+
WHO ICD-10 (English) and ICD-10-CM are downloaded from WHO and the US CDC respectively.
|
|
@@ -36,13 +36,14 @@ Dots are dropped throughout, matching what is typically found in databases: `A01
|
|
|
36
36
|
pip install codedx
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
Downloads data at install time
|
|
39
|
+
Downloads data at install time. Raw files are not redistributed due to licence restrictions.
|
|
40
40
|
|
|
41
|
-
##
|
|
41
|
+
## Data sources
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
- ICD-10-SE and history file now downloaded from Ehälsomyndigheten (replacing Socialstyrelsen URLs)
|
|
45
|
-
- Retired code lookup now uses the comprehensive history file (`historik-icd-10-se-1997-2026.xlsx`) covering all codes 1997–2026, instead of the partial inactivation list
|
|
43
|
+
Classification files come from two Swedish authorities:
|
|
46
44
|
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
**Ehälsomyndigheten** maintains ICD-10-SE and KSH97-P. Files are downloaded from their Confluence collaboration platform. KSH97-P (primary care classification) is being phased out in favour of ICD-10-SE.
|
|
46
|
+
|
|
47
|
+
**Socialstyrelsen** retains responsibility for the NordDRG system and the associated rehab function codes (UA/UB series). These files are downloaded from Socialstyrelsen's website.
|
|
48
|
+
|
|
49
|
+
WHO ICD-10 (English) and ICD-10-CM are downloaded from WHO and the US CDC respectively.
|
|
@@ -5,6 +5,7 @@ import zipfile
|
|
|
5
5
|
|
|
6
6
|
import certifi
|
|
7
7
|
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
|
|
8
|
+
from hatchling.metadata.plugin.interface import MetadataHookInterface
|
|
8
9
|
|
|
9
10
|
_DATA = pathlib.Path("src/codedx/data")
|
|
10
11
|
|
|
@@ -32,8 +33,8 @@ _MULTI_ZIPS = [
|
|
|
32
33
|
"ksh97p.zip",
|
|
33
34
|
"KSH97-P tables (~400 KB)",
|
|
34
35
|
[
|
|
35
|
-
("ksh97p_2015.xls", "https://
|
|
36
|
-
("ksh97p_se_en.xls", "https://
|
|
36
|
+
("ksh97p_2015.xls", "https://samarbetsyta.ehalsomyndigheten.se/download/attachments/451267034/klassificering-kodtextfil-ksh97-p-2015.xls?version=2&modificationDate=1779623720433&api=v2"),
|
|
37
|
+
("ksh97p_se_en.xls", "https://samarbetsyta.ehalsomyndigheten.se/download/attachments/451267034/klassificering-kodtextfil-ksh97-primarvard-svensk-engelsk.xls?version=1&modificationDate=1779623743547&api=v2"),
|
|
37
38
|
],
|
|
38
39
|
),
|
|
39
40
|
(
|
|
@@ -60,6 +61,16 @@ def _download(url: str, dest: pathlib.Path) -> None:
|
|
|
60
61
|
f.write(chunk)
|
|
61
62
|
|
|
62
63
|
|
|
64
|
+
class CustomMetadataHook(MetadataHookInterface):
|
|
65
|
+
def update(self, metadata: dict) -> None:
|
|
66
|
+
readme = pathlib.Path("README.md").read_text(encoding="utf-8")
|
|
67
|
+
changelog = pathlib.Path("CHANGELOG.md").read_text(encoding="utf-8")
|
|
68
|
+
metadata["readme"] = {
|
|
69
|
+
"content-type": "text/markdown",
|
|
70
|
+
"text": readme + "\n\n" + changelog,
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
|
|
63
74
|
class CustomBuildHook(BuildHookInterface):
|
|
64
75
|
def initialize(self, version, build_data):
|
|
65
76
|
if self.target_name != "wheel":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "codedx"
|
|
3
|
-
version = "0.3.
|
|
3
|
+
version = "0.3.1"
|
|
4
4
|
description = "Swedish medical coding used for diagnosis codes"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -25,6 +25,8 @@ exclude = [
|
|
|
25
25
|
"/.gitignore",
|
|
26
26
|
]
|
|
27
27
|
|
|
28
|
+
[tool.hatch.metadata.hooks.custom]
|
|
29
|
+
|
|
28
30
|
[tool.hatch.build.hooks.custom]
|
|
29
31
|
|
|
30
32
|
[dependency-groups]
|
|
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
|