Добавлен эндпоинт getCurrHosp

This commit is contained in:
2025-09-30 10:58:51 +03:00
parent da772336ee
commit d553b93825
3 changed files with 117 additions and 5 deletions

View File

@ -113,3 +113,13 @@ class VITACORE_API(AsyncClient):
case _:
self.logger.error(req.json())
raise e.UnknownException
async def getCurrHosp(self, patId: str):
req = await self.get('/getCurrHosp', params={'patId': patId})
match req.status_code:
case st.HTTP_200_OK:
return s.HospitalizationsModel.model_validate(req.json())
case _:
self.logger.error(req.json())
raise e.UnknownException