This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "HospitalAssistantBackend"
|
name = "HospitalAssistantBackend"
|
||||||
version = "1.0.2"
|
version = "1.0.3"
|
||||||
description = "Backend for Hospital Assistant"
|
description = "Backend for Hospital Assistant"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.13,<3.14"
|
requires-python = ">=3.13,<3.14"
|
||||||
|
|||||||
@ -207,7 +207,8 @@ async def get_aemd(
|
|||||||
return_items: list[s.AEMDReturnFile] = []
|
return_items: list[s.AEMDReturnFile] = []
|
||||||
|
|
||||||
for item in items:
|
for item in items:
|
||||||
if item['DocKind'] not in parsable_ids:
|
DocKind = item['emdrId'].split('.')[0]
|
||||||
|
if DocKind not in parsable_ids:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
is_cached = await cache.get(f'aemd:{user.vita_id}:{item["emdrId"]}')
|
is_cached = await cache.get(f'aemd:{user.vita_id}:{item["emdrId"]}')
|
||||||
@ -216,7 +217,7 @@ async def get_aemd(
|
|||||||
s.AEMDReturnFile(
|
s.AEMDReturnFile(
|
||||||
emdrId=item['emdrId'],
|
emdrId=item['emdrId'],
|
||||||
registrationDate=item['registrationDate'],
|
registrationDate=item['registrationDate'],
|
||||||
DocKind=item['DocKind'],
|
DocKind=DocKind,
|
||||||
IsSemd=item['IsSemd'],
|
IsSemd=item['IsSemd'],
|
||||||
isCached=bool(is_cached),
|
isCached=bool(is_cached),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -49,7 +49,6 @@ class AEMD_API(AsyncClient):
|
|||||||
|
|
||||||
match req.status_code:
|
match req.status_code:
|
||||||
case status.HTTP_200_OK:
|
case status.HTTP_200_OK:
|
||||||
print(req.text)
|
|
||||||
envelope = s.Envelope.from_xml(req.text)
|
envelope = s.Envelope.from_xml(req.text)
|
||||||
|
|
||||||
case _:
|
case _:
|
||||||
|
|||||||
Reference in New Issue
Block a user