Патч
Some checks failed
Build And Push / publish (push) Has been cancelled

This commit is contained in:
2025-11-27 13:28:58 +03:00
parent 45a4123708
commit f3c9cb42d6
12 changed files with 172 additions and 88 deletions

View File

@ -2,6 +2,10 @@ from logging import getLogger
from fastapi import APIRouter
from shared.redis import client as cache
from . import schema as s
logger = getLogger(__name__)
router = APIRouter(
prefix='/vitacore',
@ -12,5 +16,14 @@ router = APIRouter(
@router.post('/hospComplaint')
async def callback():
pass
async def callback(complaint: s.HospComplaint):
value = await cache.get(f'complaint:{complaint.patID}')
value = value.decode() if value else ''
return s.ComplaintData(
patId=complaint.patID,
complaints=(
f'{value} | {complaint.eventId} | {complaint.datetime} | '
f'{complaint.MO_id}'
),
)