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

This commit is contained in:
2025-09-30 11:14:01 +03:00
parent 355ea5c921
commit 6bc0cf98a3
3 changed files with 56 additions and 5 deletions

View File

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