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 _: