Files
aionboarding/ai-patient-onboarding/FLOW_FINAL_AUDIT_RESULTS.json
T

167 lines
4.6 KiB
JSON

{
"audit_timestamp": "2026-08-31T13:12:42Z",
"architecture_audit": {
"text_runtime_path": "POST /v1/onboarding/{id}/message -> AIOnboardingService -> AIOrchestrator.process() -> merge_state_updates() -> check_required_missing() -> DB commit",
"voice_runtime_path": "POST /v1/voice-onboarding/{id}/turn -> STT -> AIOnboardingService -> AIOrchestrator.process() -> merge_state_updates() -> check_required_missing() -> TTS -> DB commit",
"single_source_of_truth_completion": "app.ai.orchestrator.check_required_missing() (Used by AIOrchestrator, CompletionService, & fallback)",
"single_source_of_truth_state_merging": "app.ai.orchestrator.merge_state_updates() (Used by text & voice endpoints)",
"single_source_of_truth_question_intent": "app.services.contextual_normalizer.detect_previous_question_intent()",
"verified_consistent": true
},
"scenarios": {
"SCENARIO_A_ALL_AT_ONCE": {
"passed": true,
"extracted_symptoms": 4,
"extracted_meds": 1,
"extracted_allergies": 1,
"extracted_history": 1,
"completed": true,
"latency_ms": 9.97
},
"SCENARIO_B_OUT_OF_ORDER": {
"passed": true,
"symptoms": [
{
"name": "தலைவலி",
"duration": "3 days"
}
],
"medications": [
{
"name": "Metformin",
"dosage": "500 mg"
}
],
"allergies": [
{
"name": "Reported allergy",
"type": "unspecified"
}
],
"latency_ms": 11.5
},
"SCENARIO_C_CROSS_LANGUAGE_DEDUP": {
"passed": true,
"merged_symptoms": [
{
"name": "headache",
"duration": "3 days",
"additional_notes": "head feels heavy"
}
],
"latency_ms": 0.04
},
"SCENARIO_D_PATIENT_CORRECTION": {
"passed": true,
"final_duration": "5 days",
"latency_ms": 0.02
},
"SCENARIO_E_EXTRA_INFO": {
"passed": true,
"symptoms": [
{
"name": "தலைவலி",
"severity": "severe"
}
],
"latency_ms": 1.1
},
"SCENARIO_F_MULTIPLE_SYMPTOMS": {
"passed": true,
"symptom_count": 4,
"symptom_names": [
"உடல் வலி",
"தலைவலி",
"காய்ச்சல்",
"வாந்தி"
],
"latency_ms": 0.94
},
"SCENARIO_G_NOTHING_ELSE": {
"passed": true,
"latency_ms": 0.12
},
"SCENARIO_H_HISTORY_VOLUNTEERED": {
"passed": true,
"medical_history": [
{
"condition": "Diabetes"
}
],
"latency_ms": 1.36
},
"SCENARIO_I_MEDICATION_DETAIL": {
"passed": true,
"medications": [
{
"name": "Metformin",
"dosage": "500 mg"
},
{
"name": "BP Medication"
},
{
"name": "Tablets (unspecified)"
}
],
"no_fake_symptoms": true,
"latency_ms": 0.98
},
"SCENARIO_J_ALLERGY_DETAIL": {
"passed": true,
"allergies": [
{
"name": "Penicillin",
"reaction": "Rash / Skin reaction"
}
],
"latency_ms": 1.1
},
"SCENARIO_K_MENTAL_HEALTH": {
"passed": true,
"reply": "புரியுதுங்க. இந்த மன அழுத்தம் அல்லது கவலை எப்போலிருந்து இருக்குன்னு சொல்ல முடியுமா?",
"no_unrelated_questions": true,
"latency_ms": 2.03
},
"SCENARIO_L_EMERGENCY_AND_CRISIS": {
"passed": true,
"emergency_medical_108": true,
"crisis_tele_manas_14416": true,
"latency_ms": 1.69
},
"SCENARIO_M_MULTILINGUAL_DURATION": {
"passed": true,
"tamil_tanglish_pass": true,
"telugu_pass": true,
"kannada_pass": true,
"hindi_pass": true,
"latency_ms": 0.99
},
"SCENARIO_N_SPECIALTY_ADAPTATION": {
"passed": true,
"general_medicine": true,
"neurology": true,
"cardiology": true,
"dermatology": true,
"psychiatry": true,
"latency_ms": 0.17
},
"QUESTION_SELECTION_AND_NO_PREMATURE_COMPLETION": {
"passed": true,
"completed_after_duration_alone": false,
"repeated_duration_question": false
}
},
"performance_benchmarks": {},
"safety_audit": {},
"summary": {
"total_scenarios": 15,
"passed_scenarios": 15,
"failed_scenarios": 0,
"p0_failures": 0,
"p1_failures": 0,
"p2_failures": 0,
"p3_failures": 0,
"production_ready": true
}
}