Фикс
This commit is contained in:
@ -7,6 +7,7 @@ from fastapi import APIRouter, Body, Depends, status
|
|||||||
|
|
||||||
from apps.users.auth import login
|
from apps.users.auth import login
|
||||||
from clients import clients as c
|
from clients import clients as c
|
||||||
|
from clients.vitacore import schema as s
|
||||||
from shared.redis import client as cache
|
from shared.redis import client as cache
|
||||||
|
|
||||||
from . import mock
|
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)
|
@router.post('/measurement', status_code=status.HTTP_202_ACCEPTED)
|
||||||
async def measurement(
|
async def measurement(
|
||||||
user: Annotated[str, Depends(login)],
|
user: Annotated[str, Depends(login)],
|
||||||
@ -85,23 +98,11 @@ async def get_departments():
|
|||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
@router.get('/getSpecs')
|
|
||||||
async def get_specs():
|
|
||||||
return mock.specs
|
|
||||||
|
|
||||||
|
|
||||||
@router.get('/findPat')
|
@router.get('/findPat')
|
||||||
async def find_pat(user: Annotated[str, Depends(login)]):
|
async def find_pat(user: Annotated[str, Depends(login)]):
|
||||||
return mock.findpat[0]
|
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')
|
@router.get('/getHosps')
|
||||||
async def get_hosps():
|
async def get_hosps():
|
||||||
return mock.hosps
|
return mock.hosps
|
||||||
|
|||||||
@ -41,24 +41,24 @@ class ProfileModel(BaseModel):
|
|||||||
)
|
)
|
||||||
docSer: str = Field(title='Серия документа', examples=['III-КБ'])
|
docSer: str = Field(title='Серия документа', examples=['III-КБ'])
|
||||||
docNum: str = Field(title='Номер документа', examples=['999999'])
|
docNum: str = Field(title='Номер документа', examples=['999999'])
|
||||||
ENP: str = Field(
|
# ENP: str = Field(
|
||||||
title='Единый номер полиса ОМС (16-ти значный)',
|
# title='Единый номер полиса ОМС (16-ти значный)', # noqa: RUF003
|
||||||
examples=['?'],
|
# examples=['?'],
|
||||||
)
|
# )
|
||||||
addressReal: str = Field(
|
addressReal: str = Field(
|
||||||
title='Адрес проживания',
|
title='Адрес проживания',
|
||||||
examples=[
|
examples=[
|
||||||
'420000, Татарстан Респ, г.Казань, ул.Магистральная (Большие Клыки), д.1, кв.1' # noqa: E501
|
'420000, Татарстан Респ, г.Казань, ул.Магистральная (Большие Клыки), д.1, кв.1' # noqa: E501
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
attachBranchId: str = Field(
|
# attachBranchId: str = Field(
|
||||||
title='Идентификатор СТП прикреплния',
|
# title='Идентификатор СТП прикреплния',
|
||||||
examples=['string'],
|
# examples=['string'],
|
||||||
)
|
# )
|
||||||
attachState: str = Field(
|
# attachState: str = Field(
|
||||||
title='Номер участка',
|
# title='Номер участка',
|
||||||
examples=['99'],
|
# examples=['99'],
|
||||||
)
|
# )
|
||||||
trustedPersons: list[TrustedPersonModel] = Field(
|
trustedPersons: list[TrustedPersonModel] = Field(
|
||||||
title='Информация о представителе',
|
title='Информация о представителе',
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user