This commit is contained in:
2025-09-26 16:54:21 +03:00
parent eae517af1c
commit d15666d0e8
2 changed files with 25 additions and 24 deletions

View File

@ -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

View File

@ -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='Информация о представителе',
)