From 4a483d46ab3e0680f0faddd4ad2f51f75c8d78ce Mon Sep 17 00:00:00 2001 From: Miwory Date: Fri, 3 Apr 2026 10:55:23 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD?= =?UTF-8?q?=D1=8B=D0=B9=20=D1=84=D0=B8=D0=BA=D1=81=20=D0=90=D0=AD=D0=9C?= =?UTF-8?q?=D0=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- src/apps/users/v1/router.py | 5 +++-- src/clients/aemd/api.py | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f878e94..a684b1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "HospitalAssistantBackend" -version = "1.0.2" +version = "1.0.3" description = "Backend for Hospital Assistant" readme = "README.md" requires-python = ">=3.13,<3.14" diff --git a/src/apps/users/v1/router.py b/src/apps/users/v1/router.py index 0781daa..09bc141 100644 --- a/src/apps/users/v1/router.py +++ b/src/apps/users/v1/router.py @@ -207,7 +207,8 @@ async def get_aemd( return_items: list[s.AEMDReturnFile] = [] for item in items: - if item['DocKind'] not in parsable_ids: + DocKind = item['emdrId'].split('.')[0] + if DocKind not in parsable_ids: continue is_cached = await cache.get(f'aemd:{user.vita_id}:{item["emdrId"]}') @@ -216,7 +217,7 @@ async def get_aemd( s.AEMDReturnFile( emdrId=item['emdrId'], registrationDate=item['registrationDate'], - DocKind=item['DocKind'], + DocKind=DocKind, IsSemd=item['IsSemd'], isCached=bool(is_cached), ) diff --git a/src/clients/aemd/api.py b/src/clients/aemd/api.py index db75543..cb36700 100644 --- a/src/clients/aemd/api.py +++ b/src/clients/aemd/api.py @@ -49,7 +49,6 @@ class AEMD_API(AsyncClient): match req.status_code: case status.HTTP_200_OK: - print(req.text) envelope = s.Envelope.from_xml(req.text) case _: