fix(api): provide pseudonymous patients access to doctor care
This commit is contained in:
+2
-1
@@ -43,6 +43,7 @@ from app.db.session import get_clinical_session, get_identity_session
|
||||
from app.dialog.contracts import Event, get_engine
|
||||
from app.integrations.base import integrations
|
||||
from app.scheduler import jobs as scheduler
|
||||
from app.services.anonymous_care import display_name as anonymous_name
|
||||
from app.services.monitoring import refresh_status
|
||||
|
||||
router = APIRouter(prefix="/api/v1")
|
||||
@@ -66,7 +67,7 @@ async def _patients(tokens: list[str]) -> dict[str, Patient]:
|
||||
|
||||
def _name(patients: dict[str, Patient], token: str) -> str:
|
||||
p = patients.get(token)
|
||||
return p.display_name if p else "Пациент"
|
||||
return p.display_name if p else anonymous_name(token)
|
||||
|
||||
|
||||
# ------------------------------------------------------------------ doctor dashboard
|
||||
|
||||
Reference in New Issue
Block a user