feat: AI patient onboarding backend and documentation

This commit is contained in:
2026-08-27 12:15:09 +05:30
parent b9440772d1
commit 59c1372fe3
49 changed files with 4012 additions and 0 deletions
@@ -0,0 +1,32 @@
from app.ai.claude_client import ClaudeClient
from app.specialties.registry import get_specialty_config
class ValidationService:
def __init__(self):
self.claude = ClaudeClient()
async def validate_state_extraction(
self,
session,
conversation_history: list,
extracted_state: dict,
) -> dict:
specialty_config = get_specialty_config(session.category_code)
patient_context = {
"id": session.patient_id,
"name": session.patient_name,
"age": session.age,
"gender": session.gender,
"category": session.category_name,
}
validation = await self.claude.validate_extraction(
patient_context=patient_context,
specialty_config=specialty_config,
conversation_history=conversation_history,
extracted_data=extracted_state,
)
return validation