diff --git a/src/apps/users/v1/router.py b/src/apps/users/v1/router.py index 6d1754c..0c0d91b 100644 --- a/src/apps/users/v1/router.py +++ b/src/apps/users/v1/router.py @@ -7,6 +7,7 @@ from fastapi import APIRouter, Body, Depends, status from apps.users.auth import login from clients import clients as c +from clients.vitacore import schema as s from shared.redis import client as cache from . import mock @@ -20,6 +21,18 @@ router = APIRouter( ) +@router.get('/getProfile', response_model=s.ProfileModel) +async def get_profile(): + return await c.vitacore_api.getProfile( + 'b62e9f22-a871-4c52-96d6-559c707a716d' + ) + + +@router.get('/getSpecs') +async def get_specs(): + return mock.specs + + @router.post('/measurement', status_code=status.HTTP_202_ACCEPTED) async def measurement( user: Annotated[str, Depends(login)], @@ -85,23 +98,11 @@ async def get_departments(): return data -@router.get('/getSpecs') -async def get_specs(): - return mock.specs - - @router.get('/findPat') async def find_pat(user: Annotated[str, Depends(login)]): return mock.findpat[0] -@router.get('/getProfile') -async def get_profile(): - return await c.vitacore_api.getProfile( - 'b62e9f22-a871-4c52-96d6-559c707a716d' - ) - - @router.get('/getHosps') async def get_hosps(): return mock.hosps diff --git a/src/clients/vitacore/schema.py b/src/clients/vitacore/schema.py index bf00632..eb62a47 100644 --- a/src/clients/vitacore/schema.py +++ b/src/clients/vitacore/schema.py @@ -41,24 +41,24 @@ class ProfileModel(BaseModel): ) docSer: str = Field(title='Серия документа', examples=['III-КБ']) docNum: str = Field(title='Номер документа', examples=['999999']) - ENP: str = Field( - title='Единый номер полиса ОМС (16-ти значный)', - examples=['?'], - ) + # ENP: str = Field( + # title='Единый номер полиса ОМС (16-ти значный)', # noqa: RUF003 + # examples=['?'], + # ) addressReal: str = Field( title='Адрес проживания', examples=[ '420000, Татарстан Респ, г.Казань, ул.Магистральная (Большие Клыки), д.1, кв.1' # noqa: E501 ], ) - attachBranchId: str = Field( - title='Идентификатор СТП прикреплния', - examples=['string'], - ) - attachState: str = Field( - title='Номер участка', - examples=['99'], - ) + # attachBranchId: str = Field( + # title='Идентификатор СТП прикреплния', + # examples=['string'], + # ) + # attachState: str = Field( + # title='Номер участка', + # examples=['99'], + # ) trustedPersons: list[TrustedPersonModel] = Field( title='Информация о представителе', )