feat: AI patient onboarding backend and documentation
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user