{"openapi":"3.1.0","info":{"title":"MedNode AI API","version":"1.0.0"},"paths":{"/health":{"get":{"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/otp/send":{"post":{"summary":"Send Otp","operationId":"send_otp_api_auth_otp_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOTPRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/forgot-password/reset":{"post":{"summary":"Forgot Password Reset","operationId":"forgot_password_reset_api_auth_forgot_password_reset_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordResetRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/register":{"post":{"summary":"Register","operationId":"register_api_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/login":{"post":{"summary":"Login","operationId":"login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/change-password":{"post":{"summary":"Change Password","operationId":"change_password_api_auth_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/2fa/setup":{"get":{"summary":"Setup 2Fa","operationId":"setup_2fa_api_auth_2fa_setup_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFASetupResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/2fa/enable":{"post":{"summary":"Enable 2Fa","operationId":"enable_2fa_api_auth_2fa_enable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFAEnableRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/2fa/disable":{"post":{"summary":"Disable 2Fa","operationId":"disable_2fa_api_auth_2fa_disable_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MFAEnableRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/auth/logout":{"post":{"summary":"Logout","operationId":"logout_api_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/auth/register":{"post":{"summary":"Doctor Register","operationId":"doctor_register_api_doctor_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorRegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/auth/login":{"post":{"summary":"Doctor Login","operationId":"doctor_login_api_doctor_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/auth/logout":{"post":{"summary":"Doctor Logout","operationId":"doctor_logout_api_doctor_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/me":{"get":{"summary":"Doctor Me","operationId":"doctor_me_api_doctor_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorMeResponse"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"summary":"Doctor Update Me","operationId":"doctor_update_me_api_doctor_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorMeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/auth/change-password":{"post":{"summary":"Doctor Change Password","operationId":"doctor_change_password_api_doctor_auth_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/me":{"get":{"summary":"Me","operationId":"me_api_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"summary":"Update Me","operationId":"update_me_api_me_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/me/language":{"put":{"summary":"Set Preferred Language","description":"Set the patient's spoken language.\n\nAn explicit correction here outranks anything detection learned, and is the\nonly reliable fix for the eight languages Deepgram cannot identify — the\nfirst voice note from a new Tamil or Bengali speaker has nothing to go on.","operationId":"set_preferred_language_api_me_language_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreferredLanguageRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/me/verify-phone":{"post":{"summary":"Verify My Phone","description":"Complete phone verification for an account created in degraded mode.\n\nThe user requests a fresh OTP via /api/auth/otp/send (purpose=register) and\nsubmits it here. On success uploads unlock.","operationId":"verify_my_phone_api_me_verify_phone_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyMyPhoneRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/me/email/send-verification":{"post":{"summary":"Send My Email Verification","description":"Email a 6-digit confirmation code to the account's address.","operationId":"send_my_email_verification_api_me_email_send_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendEmailVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/me/verify-email":{"post":{"summary":"Verify My Email","description":"Confirm the emailed code, marking the address verified.","operationId":"verify_my_email_api_me_verify_email_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyMyEmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/me/avatar":{"post":{"summary":"Upload My Avatar","description":"Upload or replace the patient's profile photo.","operationId":"upload_my_avatar_api_me_avatar_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_my_avatar_api_me_avatar_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"summary":"Delete My Avatar","description":"Remove the patient's profile photo (falls back to initials).","operationId":"delete_my_avatar_api_me_avatar_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/profile":{"get":{"summary":"Get Profile","operationId":"get_profile_api_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientProfileResponse"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"summary":"Update Profile","operationId":"update_profile_api_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientProfileUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/audit/logs":{"get":{"summary":"List Audit Logs","operationId":"list_audit_logs_api_audit_logs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/ccd":{"get":{"summary":"Get Ccd","operationId":"get_ccd_api_ccd_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/insights":{"get":{"summary":"Get My Insights","operationId":"get_my_insights_api_insights_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Spend 1 insight credit to force a fresh analysis when over the monthly limit","default":false,"title":"Refresh"},"description":"Spend 1 insight credit to force a fresh analysis when over the monthly limit"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/users":{"get":{"summary":"Admin Users List","description":"Return all registered patients + doctors.\nRequires a valid patient JWT (Bearer token) and the caller's phone must be 8380844380.\nEvery other caller — authenticated or not — receives 403.","operationId":"admin_users_list_api_admin_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/admin/email-test":{"post":{"summary":"Admin Email Test","description":"Send a test welcome email to verify Brevo is working. Protected by X-Admin-Key.","operationId":"admin_email_test_api_admin_email_test_post","parameters":[{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"X-Admin-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/promo-blast":{"post":{"summary":"Admin Promo Blast","description":"Send the Pro welcome/promo email to ALL real patients who have an email address.\nSkips test accounts and patients with no email.\nProtected by X-Admin-Key header.","operationId":"admin_promo_blast_api_admin_promo_blast_post","parameters":[{"name":"X-Admin-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/reminders/trigger":{"post":{"summary":"Admin Trigger Reminders","description":"Manually trigger the reminder scheduler (admin only).\nRequires X-Admin-Key header matching ADMIN_SECRET env var.","operationId":"admin_trigger_reminders_api_admin_reminders_trigger_post","parameters":[{"name":"X-Admin-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/reminders/pending":{"get":{"summary":"Admin List Pending Reminders","description":"List pending follow-up reminders (admin only).","operationId":"admin_list_pending_reminders_api_admin_reminders_pending_get","parameters":[{"name":"X-Admin-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/health-summary/pdf":{"get":{"summary":"Download Health Summary Pdf","description":"Generate and return a PDF health summary. Requires Pro or Pro Plus plan.","operationId":"download_health_summary_pdf_api_health_summary_pdf_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/chat/messages":{"get":{"summary":"Get Chat Messages","operationId":"get_chat_messages_api_chat_messages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ChatMessageItem"},"type":"array","title":"Response Get Chat Messages Api Chat Messages Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/chat/send":{"post":{"summary":"Send Chat Message","operationId":"send_chat_message_api_chat_send_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/symptom-check":{"post":{"summary":"Symptom Check","operationId":"symptom_check_api_patient_symptom_check_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SymptomCheckRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/symptom-doctors":{"get":{"summary":"Symptom Doctors","description":"Return doctors whose specialty matches the AI-suggested specialist type.","operationId":"symptom_doctors_api_patient_symptom_doctors_get","parameters":[{"name":"specialty","in":"query","required":false,"schema":{"type":"string","default":"","title":"Specialty"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rag/reindex":{"post":{"summary":"Rag Reindex","operationId":"rag_reindex_api_rag_reindex_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"mine","title":"Scope"}},{"name":"phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},{"name":"X-Admin-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/rag/status":{"get":{"summary":"Rag Status","operationId":"rag_status_api_rag_status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"mine","title":"Scope"}},{"name":"phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},{"name":"X-Admin-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/vault/records":{"get":{"summary":"Vault List Records","operationId":"vault_list_records_api_vault_records_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"document_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"}},{"name":"dependent_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dependent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VaultListItem"},"title":"Response Vault List Records Api Vault Records Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/vault/records/{record_id}":{"get":{"summary":"Vault Get Record","operationId":"vault_get_record_api_vault_records__record_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientRecordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/vault/records/{record_id}/status":{"get":{"summary":"Vault Record Status","description":"Lightweight polling endpoint for async upload progress.\nReturns { id, status: 'pending'|'processing'|'done'|'failed', document_type }","operationId":"vault_record_status_api_vault_records__record_id__status_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/vault/records/{record_id}/tags":{"get":{"summary":"List Record Tags","operationId":"list_record_tags_api_vault_records__record_id__tags_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RecordTagListItem"},"title":"Response List Record Tags Api Vault Records  Record Id  Tags Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Add Record Tag","operationId":"add_record_tag_api_vault_records__record_id__tags_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/_TagBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordTagListItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/vault/records/{record_id}/tags/{tag_id}":{"delete":{"summary":"Delete Record Tag","operationId":"delete_record_tag_api_vault_records__record_id__tags__tag_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}},{"name":"tag_id","in":"path","required":true,"schema":{"type":"integer","title":"Tag Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/vault/records/{record_id}/document-url":{"get":{"summary":"Vault Get Record Document Url","operationId":"vault_get_record_document_url_api_vault_records__record_id__document_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}},{"name":"ttl_minutes","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Ttl Minutes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/vault/upload":{"post":{"summary":"Vault Upload Document","description":"Returns 202 Accepted immediately after blob upload.\nHeavy OCR / AI extraction runs as a background asyncio task —\nno external broker needed. Poll GET /api/vault/records/{id}/status for completion.","operationId":"vault_upload_document_api_vault_upload_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_vault_upload_document_api_vault_upload_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/metrics":{"get":{"summary":"List Metrics","operationId":"list_metrics_api_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/HealthMetricResponse"},"type":"array","title":"Response List Metrics Api Metrics Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Metric","operationId":"create_metric_api_metrics_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthMetricCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthMetricResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/providers":{"get":{"summary":"List Providers","operationId":"list_providers_api_providers_get","parameters":[{"name":"specialty","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specialty"}},{"name":"location","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"}},{"name":"telehealth","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Telehealth"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProviderListItem"},"title":"Response List Providers Api Providers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/appointments":{"get":{"summary":"List Appointments","operationId":"list_appointments_api_appointments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AppointmentResponse"},"type":"array","title":"Response List Appointments Api Appointments Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Appointment","operationId":"create_appointment_api_appointments_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/appointments/{appointment_id}":{"patch":{"summary":"Update Appointment","operationId":"update_appointment_api_appointments__appointment_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/appointments/{appointment_id}/cancel":{"post":{"summary":"Cancel Appointment","operationId":"cancel_appointment_api_appointments__appointment_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/history/events":{"get":{"summary":"History Events","operationId":"history_events_api_history_events_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/HistoryEvent"},"type":"array","title":"Response History Events Api History Events Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/history/summary":{"get":{"summary":"Get History Summary","operationId":"get_history_summary_api_history_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/cdst":{"get":{"summary":"Get Cdst Assessment","description":"Deterministic clinical decision support over the patient's lab values.\n\nGuideline rules only — no AI call, so it is free and does not touch the\nmonthly insights quota. `record_id` restricts the assessment to a single\nrecord; otherwise the latest value of every test across recent records\nis used.","operationId":"get_cdst_assessment_api_patient_cdst_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"record_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/history/events/manual":{"post":{"summary":"Create Manual History Event","operationId":"create_manual_history_event_api_history_events_manual_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManualHistoryEventCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryEvent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/shares":{"get":{"summary":"List Shares","operationId":"list_shares_api_shares_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ShareListItem"},"type":"array","title":"Response List Shares Api Shares Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Share","operationId":"create_share_api_shares_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/shares/{share_id}/revoke":{"post":{"summary":"Revoke Share","operationId":"revoke_share_api_shares__share_id__revoke_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"share_id","in":"path","required":true,"schema":{"type":"integer","title":"Share Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shared/{token}/vault":{"get":{"summary":"Shared Vault","operationId":"shared_vault_api_shared__token__vault_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/VaultListItem"},"title":"Response Shared Vault Api Shared  Token  Vault Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shared/{token}/vault/{record_id}/document-url":{"get":{"summary":"Shared Vault Document Url","operationId":"shared_vault_document_url_api_shared__token__vault__record_id__document_url_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}},{"name":"ttl_minutes","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Ttl Minutes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shared/{token}/history":{"get":{"summary":"Shared History","operationId":"shared_history_api_shared__token__history_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HistoryEvent"},"title":"Response Shared History Api Shared  Token  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shared/{token}/appointments":{"get":{"summary":"Shared Appointments","operationId":"shared_appointments_api_shared__token__appointments_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AppointmentResponse"},"title":"Response Shared Appointments Api Shared  Token  Appointments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shared/{token}/insights":{"get":{"summary":"Shared Insights","operationId":"shared_insights_api_shared__token__insights_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/shared/{token}/summary":{"get":{"summary":"Shared History Summary","operationId":"shared_history_summary_api_shared__token__summary_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhook/twilio/whatsapp":{"post":{"summary":"Twilio Whatsapp Webhook","operationId":"twilio_whatsapp_webhook_webhook_twilio_whatsapp_post","parameters":[{"name":"X-Twilio-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Twilio-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/comments":{"get":{"summary":"List Patient Comments","operationId":"list_patient_comments_api_comments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DoctorCommentResponse"},"type":"array","title":"Response List Patient Comments Api Comments Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/shared/{token}/comments":{"get":{"summary":"Shared List Comments","operationId":"shared_list_comments_api_shared__token__comments_get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DoctorCommentResponse"},"title":"Response Shared List Comments Api Shared  Token  Comments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Shared Create Comment","operationId":"shared_create_comment_api_shared__token__comments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorCommentCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorCommentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhook/whatsapp":{"get":{"summary":"Verify Webhook","operationId":"verify_webhook_webhook_whatsapp_get","parameters":[{"name":"hub.mode","in":"query","required":true,"schema":{"type":"string","title":"Hub.Mode"}},{"name":"hub.verify_token","in":"query","required":true,"schema":{"type":"string","title":"Hub.Verify Token"}},{"name":"hub.challenge","in":"query","required":false,"schema":{"type":"string","title":"Hub.Challenge"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Receive Whatsapp Webhook","operationId":"receive_whatsapp_webhook_webhook_whatsapp_post","parameters":[{"name":"X-Twilio-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Twilio-Signature"}},{"name":"X-Hub-Signature-256","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Hub-Signature-256"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/upload":{"post":{"summary":"Upload Document","description":"Handle document uploads from the patient portal (own vault only).","operationId":"upload_document_api_upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_phone","in":"query","required":true,"schema":{"type":"string","title":"Patient Phone"}},{"name":"document_type","in":"query","required":true,"schema":{"type":"string","title":"Document Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientRecordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health/azure":{"get":{"summary":"Azure Health","operationId":"azure_health_health_azure_get","parameters":[{"name":"check_openai","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Check Openai"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patients/{phone}/records":{"get":{"summary":"Get Patient Records","description":"Retrieve all records for a specific patient phone number","operationId":"get_patient_records_api_patients__phone__records_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"phone","in":"path","required":true,"schema":{"type":"string","title":"Phone"}},{"name":"share_token","in":"query","required":true,"schema":{"type":"string","title":"Share Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PatientRecordResponse"},"title":"Response Get Patient Records Api Patients  Phone  Records Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/records/{record_id}":{"get":{"summary":"Get Record","operationId":"get_record_api_records__record_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientRecordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/records/{record_id}/re-extract":{"post":{"summary":"Re Extract Record","description":"Re-run AI extraction on an already-uploaded record.\n\nLets a patient repair a record whose medications/labs were mis-read the\nfirst time (common with handwritten Indian prescriptions) without having to\nupload the document again. Re-reads the stored file, rebuilds fhir_data and\nre-indexes it for search/chat.","operationId":"re_extract_record_api_records__record_id__re_extract_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/records/{record_id}/document-url":{"get":{"summary":"Get Record Document Url","operationId":"get_record_document_url_api_records__record_id__document_url_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}},{"name":"ttl_minutes","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Ttl Minutes"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patients/{phone}/insights":{"get":{"summary":"Get Patient Insights","operationId":"get_patient_insights_api_patients__phone__insights_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"phone","in":"path","required":true,"schema":{"type":"string","title":"Phone"}},{"name":"share_token","in":"query","required":true,"schema":{"type":"string","title":"Share Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/profile":{"get":{"summary":"Get Doctor Profile","operationId":"get_doctor_profile_api_doctor_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorProfileResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"summary":"Update Doctor Profile","operationId":"update_doctor_profile_api_doctor_profile_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorProfileUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/profile/avatar":{"post":{"summary":"Upload Doctor Avatar","description":"Upload or replace the doctor's profile photo.\n\nDoctorProfile.profile_image_url existed as a column and schema field but had\nno endpoint to populate it — this activates it.","operationId":"upload_doctor_avatar_api_doctor_profile_avatar_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_doctor_avatar_api_doctor_profile_avatar_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"summary":"Delete Doctor Avatar","operationId":"delete_doctor_avatar_api_doctor_profile_avatar_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorProfileResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/patients/{patient_id}/records":{"get":{"summary":"Doctor List Patient Records","description":"Return all uploaded records for a patient the doctor has access to.","operationId":"doctor_list_patient_records_api_doctor_patients__patient_id__records_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PatientRecordResponse"},"title":"Response Doctor List Patient Records Api Doctor Patients  Patient Id  Records Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/patients/{patient_id}/diagnoses":{"get":{"summary":"List Patient Diagnoses","operationId":"list_patient_diagnoses_api_doctor_patients__patient_id__diagnoses_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PatientDiagnosisResponse"},"title":"Response List Patient Diagnoses Api Doctor Patients  Patient Id  Diagnoses Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Patient Diagnosis","operationId":"create_patient_diagnosis_api_doctor_patients__patient_id__diagnoses_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientDiagnosisCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientDiagnosisResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/followup-tasks":{"get":{"summary":"List My Followup Tasks","operationId":"list_my_followup_tasks_api_doctor_followup_tasks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/FollowupTaskResponse"},"type":"array","title":"Response List My Followup Tasks Api Doctor Followup Tasks Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Followup Task Root","description":"Create a followup task (root route — patient_user_id must be in body).","operationId":"create_followup_task_root_api_doctor_followup_tasks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowupTaskCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowupTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/patients/{patient_id}/followup-tasks":{"get":{"summary":"List Patient Followup Tasks","operationId":"list_patient_followup_tasks_api_doctor_patients__patient_id__followup_tasks_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FollowupTaskResponse"},"title":"Response List Patient Followup Tasks Api Doctor Patients  Patient Id  Followup Tasks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Followup Task","operationId":"create_followup_task_api_doctor_patients__patient_id__followup_tasks_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowupTaskCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowupTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/patients":{"get":{"summary":"List Doctor Patients","description":"Return all patients ever associated with this doctor via any pathway:\nexplicit link, appointment, prescription, diagnosis, or follow-up task.\nUses a single UNION query instead of N+1 loops for performance.","operationId":"list_doctor_patients_api_doctor_patients_get","security":[{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"},"title":"Response List Doctor Patients Api Doctor Patients Get"}}}}}},"post":{"summary":"Create Doctor Patient","operationId":"create_doctor_patient_api_doctor_patients_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"as_doctor_id","in":"query","required":false,"schema":{"type":"integer","title":"As Doctor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorPatientCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorPatientListItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/dashboard/overview":{"get":{"summary":"Get Doctor Dashboard Overview","operationId":"get_doctor_dashboard_overview_api_doctor_dashboard_overview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorDashboardOverviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/patients/{patient_id}":{"get":{"summary":"Get Doctor Patient","operationId":"get_doctor_patient_api_doctor_patients__patient_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorPatientListItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/patients/{patient_id}/charts":{"get":{"summary":"Get Doctor Patient Charts","operationId":"get_doctor_patient_charts_api_doctor_patients__patient_id__charts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}},{"name":"types","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated metric types","title":"Types"},"description":"Comma-separated metric types"},{"name":"from_at","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From At"}},{"name":"to_at","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To At"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorChartsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/patients/{patient_id}/insights":{"get":{"summary":"Get Doctor Patient Insights","operationId":"get_doctor_patient_insights_api_doctor_patients__patient_id__insights_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}},{"name":"from_at","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From At"}},{"name":"to_at","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To At"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorInsightsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/patients/{patient_id}/adherence":{"get":{"summary":"Get Doctor Patient Adherence","description":"Doctor: medication adherence for a linked patient (clinical context).","operationId":"get_doctor_patient_adherence_api_doctor_patients__patient_id__adherence_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":7,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/patients/{patient_id}/chat":{"post":{"summary":"Doctor Patient Chat","operationId":"doctor_patient_chat_api_doctor_patients__patient_id__chat_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorChatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/patients/{patient_id}/notes":{"get":{"summary":"List Doctor Patient Notes","operationId":"list_doctor_patient_notes_api_doctor_patients__patient_id__notes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DoctorPatientNoteResponse"},"title":"Response List Doctor Patient Notes Api Doctor Patients  Patient Id  Notes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Create Doctor Patient Note","operationId":"create_doctor_patient_note_api_doctor_patients__patient_id__notes_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorPatientNoteCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorPatientNoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/patients/{patient_id}/snapshot":{"post":{"summary":"Create Patient Snapshot","description":"Doctor manually saves a clinical snapshot of a patient's data.","operationId":"create_patient_snapshot_api_doctor_patients__patient_id__snapshot_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/clinical-records":{"get":{"summary":"List Doctor Clinical Records","description":"Return all clinical snapshots stored in this doctor's context.","operationId":"list_doctor_clinical_records_api_doctor_clinical_records_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/clinical-records/{record_id}":{"get":{"summary":"Get Doctor Clinical Record","description":"Get a single clinical record snapshot.","operationId":"get_doctor_clinical_record_api_doctor_clinical_records__record_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/config":{"get":{"summary":"Get Public Config","description":"Public config — returns non-sensitive app settings (e.g. WhatsApp URL).","operationId":"get_public_config_api_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/patient/next-actions":{"get":{"summary":"Get Patient Next Actions","description":"Returns a prioritised list of AI-generated + rule-based action items\npersonalised to the patient's current health data.","operationId":"get_patient_next_actions_api_patient_next_actions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/saved-shares":{"get":{"summary":"List Doctor Saved Shares","description":"List all patient share tokens bookmarked by this doctor.","operationId":"list_doctor_saved_shares_api_doctor_saved_shares_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Save Doctor Share","description":"Doctor saves a patient-generated share token to their account so they can\nquickly access that patient's data from the dashboard without re-entering the code.","operationId":"save_doctor_share_api_doctor_saved_shares_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/saved-shares/{saved_id}":{"delete":{"summary":"Remove Doctor Saved Share","description":"Doctor removes a saved share token from their dashboard.","operationId":"remove_doctor_saved_share_api_doctor_saved_shares__saved_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"saved_id","in":"path","required":true,"schema":{"type":"integer","title":"Saved Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/clinic":{"get":{"summary":"Get Clinic","operationId":"get_clinic_api_doctor_clinic_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Clinic","description":"Create a clinic — the caller becomes its owner.","operationId":"create_clinic_api_doctor_clinic_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"summary":"Update Clinic","operationId":"update_clinic_api_doctor_clinic_patch","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/clinic/staff":{"post":{"summary":"Add Clinic Staff","description":"Owner adds a staff member (doctor or receptionist) with login credentials.","operationId":"add_clinic_staff_api_doctor_clinic_staff_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/clinic/staff/{staff_id}":{"patch":{"summary":"Update Clinic Staff","operationId":"update_clinic_staff_api_doctor_clinic_staff__staff_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"staff_id","in":"path","required":true,"schema":{"type":"integer","title":"Staff Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Remove Clinic Staff","operationId":"remove_clinic_staff_api_doctor_clinic_staff__staff_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"staff_id","in":"path","required":true,"schema":{"type":"integer","title":"Staff Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/clinic/doctors":{"get":{"summary":"List Clinic Doctors","description":"Doctors in the caller's clinic — used by receptionist/owner to pick whose queue/appts to manage.","operationId":"list_clinic_doctors_api_doctor_clinic_doctors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/prescriptions":{"post":{"summary":"Create Prescription","description":"Write a new digital prescription for a patient.\n\nExpiry is auto-computed from the longest medication duration.\ne.g. if meds are '7 days', '5 days', '10 days' → expiry_date = today + 10 days.\nMedications marked 'Ongoing' / 'Lifelong' etc. are excluded from the calculation\n(those never drive expiry).  If ALL medications are ongoing, no expiry is set.\n\nSide-effects (after response is sent):\n• Sends prescription welcome WhatsApp to patient\n• Auto-creates dose-time medication reminders (Pro/Pro-Plus patients)","operationId":"create_prescription_api_doctor_prescriptions_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrescriptionCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrescriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Prescriptions","description":"List all prescriptions written by this doctor, optionally filtered.","operationId":"list_prescriptions_api_doctor_prescriptions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"query","required":false,"schema":{"type":"integer","title":"Patient Id"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PrescriptionResponse"},"title":"Response List Prescriptions Api Doctor Prescriptions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/prescriptions/check-safety":{"post":{"summary":"Check Prescription Safety Endpoint","description":"AI drug-interaction & allergy screen for a draft prescription.\n\nGathers the patient's known allergies (profile + the Rx allergy note) and their\nother active medications, then returns a structured safety result. Advisory only.","operationId":"check_prescription_safety_endpoint_api_doctor_prescriptions_check_safety_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/prescription-templates":{"get":{"summary":"List Rx Templates","operationId":"list_rx_templates_api_doctor_prescription_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Rx Template","operationId":"create_rx_template_api_doctor_prescription_templates_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/prescription-templates/{template_id}":{"delete":{"summary":"Delete Rx Template","operationId":"delete_rx_template_api_doctor_prescription_templates__template_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/drug-suggestions":{"get":{"summary":"Drug Suggestions","description":"Autocomplete for medicine names: doctor's recently-used drugs + curated list.","operationId":"drug_suggestions_api_doctor_drug_suggestions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":0,"default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/lab-tests":{"get":{"summary":"Lab Test Suggestions","operationId":"lab_test_suggestions_api_doctor_lab_tests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/lab-orders":{"post":{"summary":"Create Lab Order","operationId":"create_lab_order_api_doctor_lab_orders_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Lab Orders","operationId":"list_lab_orders_api_doctor_lab_orders_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"patient_user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Patient User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/lab-orders/{order_id}":{"patch":{"summary":"Update Lab Order","operationId":"update_lab_order_api_doctor_lab_orders__order_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Lab Order","operationId":"delete_lab_order_api_doctor_lab_orders__order_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/lab-orders":{"get":{"summary":"Patient Lab Orders","description":"Patient sees tests their doctors have ordered for them.","operationId":"patient_lab_orders_api_patient_lab_orders_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/lab/auth/register":{"post":{"summary":"Lab Register","operationId":"lab_register_api_lab_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabRegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lab/auth/login":{"post":{"summary":"Lab Login","operationId":"lab_login_api_lab_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lab/auth/logout":{"post":{"summary":"Lab Logout","operationId":"lab_logout_api_lab_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/lab/me":{"get":{"summary":"Lab Me","operationId":"lab_me_api_lab_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabMeResponse"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"summary":"Lab Update Me","operationId":"lab_update_me_api_lab_me_patch","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabMeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/lab/auth/change-password":{"post":{"summary":"Lab Change Password","operationId":"lab_change_password_api_lab_auth_change_password_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/lab/dashboard":{"get":{"summary":"Lab Dashboard","operationId":"lab_dashboard_api_lab_dashboard_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/lab/tests":{"get":{"summary":"Lab List Tests","operationId":"lab_list_tests_api_lab_tests_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Lab Add Test","operationId":"lab_add_test_api_lab_tests_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/lab/tests/{test_id}":{"patch":{"summary":"Lab Update Test","operationId":"lab_update_test_api_lab_tests__test_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"integer","title":"Test Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Lab Delete Test","operationId":"lab_delete_test_api_lab_tests__test_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"integer","title":"Test Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lab/packages":{"get":{"summary":"Lab List Packages","operationId":"lab_list_packages_api_lab_packages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Lab Add Package","operationId":"lab_add_package_api_lab_packages_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/lab/packages/{package_id}":{"delete":{"summary":"Lab Delete Package","operationId":"lab_delete_package_api_lab_packages__package_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"package_id","in":"path","required":true,"schema":{"type":"integer","title":"Package Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lab/bookings":{"get":{"summary":"Lab List Bookings","operationId":"lab_list_bookings_api_lab_bookings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lab/bookings/{booking_id}":{"patch":{"summary":"Lab Update Booking","operationId":"lab_update_booking_api_lab_bookings__booking_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lab/bookings/{booking_id}/result-file":{"post":{"summary":"Lab Upload Result File","operationId":"lab_upload_result_file_api_lab_bookings__booking_id__result_file_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_lab_upload_result_file_api_lab_bookings__booking_id__result_file_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Lab Booking Result File","description":"Signed URL for the owning lab to view a report it uploaded.","operationId":"lab_booking_result_file_api_lab_bookings__booking_id__result_file_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/labs":{"get":{"summary":"List Labs","operationId":"list_labs_api_labs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/labs/{lab_id}":{"get":{"summary":"Get Lab","operationId":"get_lab_api_labs__lab_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lab_id","in":"path","required":true,"schema":{"type":"integer","title":"Lab Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lab-tests/search":{"get":{"summary":"Search Lab Tests","description":"Find which labs offer a given test (used to book a doctor-recommended test).","operationId":"search_lab_tests_api_lab_tests_search_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":0,"default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/lab-bookings":{"get":{"summary":"My Lab Bookings","operationId":"my_lab_bookings_api_patient_lab_bookings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Lab Booking","operationId":"create_lab_booking_api_patient_lab_bookings_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/lab-bookings/{booking_id}/cancel":{"post":{"summary":"Cancel Lab Booking","operationId":"cancel_lab_booking_api_patient_lab_bookings__booking_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/lab-bookings/{booking_id}/result-file":{"get":{"summary":"Patient Lab Booking Result File","description":"Return a short-lived signed URL for the patient to view/download the\nlab report. The blob container is private, so a raw URL is not viewable —\nwe mint a read-only SAS link scoped to this patient's own booking.","operationId":"patient_lab_booking_result_file_api_patient_lab_bookings__booking_id__result_file_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/lab-bookings/{booking_id}/messages":{"get":{"summary":"Patient List Booking Messages","operationId":"patient_list_booking_messages_api_patient_lab_bookings__booking_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Patient Post Booking Message","operationId":"patient_post_booking_message_api_patient_lab_bookings__booking_id__messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lab/bookings/{booking_id}/messages":{"get":{"summary":"Lab List Booking Messages","operationId":"lab_list_booking_messages_api_lab_bookings__booking_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Lab Post Booking Message","operationId":"lab_post_booking_message_api_lab_bookings__booking_id__messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lab/bookings/{booking_id}/resolve-query":{"post":{"summary":"Lab Resolve Booking Query","operationId":"lab_resolve_booking_query_api_lab_bookings__booking_id__resolve_query_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications":{"get":{"summary":"Patient List Notifications","operationId":"patient_list_notifications_api_notifications_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/unread-count":{"get":{"summary":"Patient Unread Count","operationId":"patient_unread_count_api_notifications_unread_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/notifications/{notif_id}/read":{"post":{"summary":"Patient Mark Notification Read","operationId":"patient_mark_notification_read_api_notifications__notif_id__read_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"notif_id","in":"path","required":true,"schema":{"type":"integer","title":"Notif Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/notifications/read-all":{"post":{"summary":"Patient Mark All Notifications Read","operationId":"patient_mark_all_notifications_read_api_notifications_read_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/lab/notifications":{"get":{"summary":"Lab List Notifications","operationId":"lab_list_notifications_api_lab_notifications_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lab/notifications/unread-count":{"get":{"summary":"Lab Unread Count","operationId":"lab_unread_count_api_lab_notifications_unread_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/lab/notifications/{notif_id}/read":{"post":{"summary":"Lab Mark Notification Read","operationId":"lab_mark_notification_read_api_lab_notifications__notif_id__read_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"notif_id","in":"path","required":true,"schema":{"type":"integer","title":"Notif Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lab/notifications/read-all":{"post":{"summary":"Lab Mark All Notifications Read","operationId":"lab_mark_all_notifications_read_api_lab_notifications_read_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/prescriptions/{rx_id}":{"get":{"summary":"Get Prescription","operationId":"get_prescription_api_doctor_prescriptions__rx_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rx_id","in":"path","required":true,"schema":{"type":"integer","title":"Rx Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrescriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update Prescription Status","description":"Update prescription status (active / expired / cancelled).","operationId":"update_prescription_status_api_doctor_prescriptions__rx_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rx_id","in":"path","required":true,"schema":{"type":"integer","title":"Rx Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_update_prescription_status_api_doctor_prescriptions__rx_id__patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Prescription Full","description":"Full update of a prescription — updates all provided fields.","operationId":"update_prescription_full_api_doctor_prescriptions__rx_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rx_id","in":"path","required":true,"schema":{"type":"integer","title":"Rx Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrescriptionFullUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrescriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Prescription","description":"Permanently delete a prescription (doctor only).","operationId":"delete_prescription_api_doctor_prescriptions__rx_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rx_id","in":"path","required":true,"schema":{"type":"integer","title":"Rx Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/patients/{patient_id}/prescriptions":{"get":{"summary":"Get Patient Prescriptions","description":"Get all prescriptions written for a specific patient by this doctor.","operationId":"get_patient_prescriptions_api_doctor_patients__patient_id__prescriptions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PrescriptionResponse"},"title":"Response Get Patient Prescriptions Api Doctor Patients  Patient Id  Prescriptions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/prescriptions/{rx_id}/extend":{"post":{"summary":"Extend Prescription","description":"Doctor extends a prescription's expiry by `days` days.\n\nIf the prescription is already expired, the extension starts from today.\nIf it's still active, extension adds `days` to the existing expiry_date.\nThe prescription is reactivated if it was expired.","operationId":"extend_prescription_api_doctor_prescriptions__rx_id__extend_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rx_id","in":"path","required":true,"schema":{"type":"integer","title":"Rx Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_extend_prescription_api_doctor_prescriptions__rx_id__extend_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/prescriptions/{rx_id}/duplicate":{"post":{"summary":"Duplicate Prescription","description":"Clone an existing prescription as a new active prescription.","operationId":"duplicate_prescription_api_doctor_prescriptions__rx_id__duplicate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rx_id","in":"path","required":true,"schema":{"type":"integer","title":"Rx Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrescriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/prescriptions/{rx_id}/send-whatsapp":{"post":{"summary":"Send Prescription Whatsapp","description":"Send the prescription details to the patient via WhatsApp.","operationId":"send_prescription_whatsapp_api_doctor_prescriptions__rx_id__send_whatsapp_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rx_id","in":"path","required":true,"schema":{"type":"integer","title":"Rx Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/prescriptions":{"get":{"summary":"List Patient Prescriptions View","description":"Patient: view all prescriptions written for them (read-only).","operationId":"list_patient_prescriptions_view_api_patient_prescriptions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/uploaded-prescriptions":{"get":{"summary":"List Uploaded Prescriptions","description":"Returns prescription documents the patient uploaded to the vault,\nwith extracted medication list, active reminder count, and expiry.","operationId":"list_uploaded_prescriptions_api_patient_uploaded_prescriptions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/uploaded-prescriptions/{record_id}/setup-reminders":{"post":{"summary":"Setup Reminders For Uploaded Rx","description":"Patient (Pro/Pro Plus) can call this to:\n  1. Create dose-time MedicationReminder rows from the uploaded prescription's\n     extracted medications.\n  2. Re-send the WhatsApp prescription summary.\n\nSafe to call multiple times — duplicate reminders are suppressed.","operationId":"setup_reminders_for_uploaded_rx_api_patient_uploaded_prescriptions__record_id__setup_reminders_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"record_id","in":"path","required":true,"schema":{"type":"integer","title":"Record Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/prescriptions/{rx_id}/request-renewal":{"post":{"summary":"Patient Request Renewal","description":"Patient requests their doctor to renew/extend a prescription.\n\n- Marks renewal_requested_at = now on the prescription row\n- Sends a WhatsApp notification to the doctor (if doctor has a phone)\n- Returns 409 if a renewal request is already pending","operationId":"patient_request_renewal_api_patient_prescriptions__rx_id__request_renewal_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rx_id","in":"path","required":true,"schema":{"type":"integer","title":"Rx Id"}}],"requestBody":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Body_patient_request_renewal_api_patient_prescriptions__rx_id__request_renewal_post"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/prescriptions/{rx_id}/reminders":{"post":{"summary":"Enable Prescription Reminders","description":"Enable daily WhatsApp medication reminders for every medicine in this\nprescription. `body.days` controls how many days the series runs.\nIdempotent — calling again extends the end_date if longer.","operationId":"enable_prescription_reminders_api_doctor_prescriptions__rx_id__reminders_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rx_id","in":"path","required":true,"schema":{"type":"integer","title":"Rx Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnableRemindersRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get Prescription Reminders","description":"Doctor view: all reminder rows for a prescription.","operationId":"get_prescription_reminders_api_doctor_prescriptions__rx_id__reminders_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rx_id","in":"path","required":true,"schema":{"type":"integer","title":"Rx Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MedicationReminderResponse"},"title":"Response Get Prescription Reminders Api Doctor Prescriptions  Rx Id  Reminders Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/reminders":{"get":{"summary":"List Patient Reminders","description":"Patient: list all their medication reminders.","operationId":"list_patient_reminders_api_patient_reminders_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MedicationReminderResponse"},"title":"Response List Patient Reminders Api Patient Reminders Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/reminders/{rem_id}":{"patch":{"summary":"Patch Patient Reminder","description":"Patient: pause/resume a reminder or update its end date.","operationId":"patch_patient_reminder_api_patient_reminders__rem_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rem_id","in":"path","required":true,"schema":{"type":"integer","title":"Rem Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchReminderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicationReminderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Patient Reminder","description":"Patient: permanently delete a medication reminder.","operationId":"delete_patient_reminder_api_patient_reminders__rem_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rem_id","in":"path","required":true,"schema":{"type":"integer","title":"Rem Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/reminders/{rem_id}/resend":{"post":{"summary":"Resend Patient Reminder","description":"Patient: force-resend a specific medication reminder right now via WhatsApp.\nResets last_sent_date to NULL first so the message goes through even if\nit was already sent today.  Useful when a delivery was lost or missed.","operationId":"resend_patient_reminder_api_patient_reminders__rem_id__resend_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rem_id","in":"path","required":true,"schema":{"type":"integer","title":"Rem Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/reminders/stop-all":{"post":{"summary":"Stop All Patient Reminders","description":"Patient: pause every active medication reminder at once.","operationId":"stop_all_patient_reminders_api_patient_reminders_stop_all_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/dependents":{"get":{"summary":"List Dependents","description":"List family members managed under this account, with record counts.","operationId":"list_dependents_api_patient_dependents_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Add Dependent","operationId":"add_dependent_api_patient_dependents_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/dependents/{dependent_id}":{"patch":{"summary":"Update Dependent","operationId":"update_dependent_api_patient_dependents__dependent_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"dependent_id","in":"path","required":true,"schema":{"type":"integer","title":"Dependent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Dependent","description":"Delete a dependent. Their records are kept but un-attributed (dependent_id → NULL).","operationId":"delete_dependent_api_patient_dependents__dependent_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"dependent_id","in":"path","required":true,"schema":{"type":"integer","title":"Dependent Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/reminders/{rem_id}/log":{"post":{"summary":"Log Dose App","description":"Patient marks a dose taken/skipped from the app.","operationId":"log_dose_app_api_patient_reminders__rem_id__log_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rem_id","in":"path","required":true,"schema":{"type":"integer","title":"Rem Id"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","default":{},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/adherence":{"get":{"summary":"Adherence Summary","description":"Adherence stats: streak, taken/skipped totals, per-medicine %, recent log.","operationId":"adherence_summary_api_patient_adherence_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/analytics":{"get":{"summary":"Doctor Analytics","description":"Practice analytics: volume, cancellation/repeat rates, busy times, top diagnoses, rating.","operationId":"doctor_analytics_api_doctor_analytics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/support/chat":{"post":{"summary":"Support Chat","description":"Agentic customer-support chat.  The AI agent has read-only access to\nthe authenticated patient's account, appointments, insights, subscription,\nand medication reminders via function-calling tools — no clinical records,\nno other users' data.  Out-of-scope queries are redirected to human support.","operationId":"support_chat_api_support_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SupportChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/availability":{"get":{"summary":"Get Availability Slots","operationId":"get_availability_slots_api_doctor_availability_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AppointmentSlotResponse"},"type":"array","title":"Response Get Availability Slots Api Doctor Availability Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Add Availability Slot","description":"Add a recurring weekly availability slot.","operationId":"add_availability_slot_api_doctor_availability_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentSlotCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppointmentSlotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/availability/{slot_id}":{"delete":{"summary":"Remove Availability Slot","operationId":"remove_availability_slot_api_doctor_availability__slot_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"slot_id","in":"path","required":true,"schema":{"type":"integer","title":"Slot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/weekly-periods":{"get":{"summary":"Get Weekly Periods","description":"Get all weekly period schedules for the logged-in doctor.","operationId":"get_weekly_periods_api_doctor_weekly_periods_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WeeklyPeriodsDayResponse"},"type":"array","title":"Response Get Weekly Periods Api Doctor Weekly Periods Get"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"summary":"Set Weekly Periods","description":"Create or replace the period schedule for a recurring day-of-week.","operationId":"set_weekly_periods_api_doctor_weekly_periods_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyPeriodsSet"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyPeriodsDayResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/weekly-periods/{day_of_week}":{"delete":{"summary":"Delete Weekly Periods","operationId":"delete_weekly_periods_api_doctor_weekly_periods__day_of_week__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"day_of_week","in":"path","required":true,"schema":{"type":"integer","title":"Day Of Week"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/availability/weekly":{"get":{"summary":"Get Weekly Summary Legacy","operationId":"get_weekly_summary_legacy_api_doctor_availability_weekly_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WeeklyDaySummary"},"type":"array","title":"Response Get Weekly Summary Legacy Api Doctor Availability Weekly Get"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"summary":"Set Weekly Availability","operationId":"set_weekly_availability_api_doctor_availability_weekly_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyAvailabilitySet"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WeeklyDaySummary"},"type":"array","title":"Response Set Weekly Availability Api Doctor Availability Weekly Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/availability/weekly/{day_of_week}":{"delete":{"summary":"Clear Weekly Day","operationId":"clear_weekly_day_api_doctor_availability_weekly__day_of_week__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"day_of_week","in":"path","required":true,"schema":{"type":"integer","title":"Day Of Week"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/date-availability":{"post":{"summary":"Upsert Date Availability","operationId":"upsert_date_availability_api_doctor_date_availability_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorDateAvailabilityCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorDateAvailabilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Date Availability","operationId":"list_date_availability_api_doctor_date_availability_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"year","in":"query","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"month","in":"query","required":true,"schema":{"type":"integer","maximum":12,"minimum":1,"title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DoctorDateAvailabilityResponse"},"title":"Response List Date Availability Api Doctor Date Availability Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/date-availability/{avail_id}":{"delete":{"summary":"Delete Date Availability","operationId":"delete_date_availability_api_doctor_date_availability__avail_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"avail_id","in":"path","required":true,"schema":{"type":"integer","title":"Avail Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/availability/calendar":{"get":{"summary":"Get Availability Calendar","operationId":"get_availability_calendar_api_doctor_availability_calendar_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"year","in":"query","required":true,"schema":{"type":"integer","title":"Year"}},{"name":"month","in":"query","required":true,"schema":{"type":"integer","maximum":12,"minimum":1,"title":"Month"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CalendarDayInfo"},"title":"Response Get Availability Calendar Api Doctor Availability Calendar Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/appointments":{"post":{"summary":"Create Booked Appointment","description":"Doctor (or clinic receptionist) books/creates an appointment for a patient.","operationId":"create_booked_appointment_api_doctor_appointments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"as_doctor_id","in":"query","required":false,"schema":{"type":"integer","title":"As Doctor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookedAppointmentCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookedAppointmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Booked Appointments","description":"List all booked appointments for this doctor (or a clinic colleague).","operationId":"list_booked_appointments_api_doctor_appointments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","title":"Status"}},{"name":"date_from","in":"query","required":false,"schema":{"type":"string","title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"type":"string","title":"Date To"}},{"name":"as_doctor_id","in":"query","required":false,"schema":{"type":"integer","title":"As Doctor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BookedAppointmentResponse"},"title":"Response List Booked Appointments Api Doctor Appointments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/appointments/{appt_id}":{"patch":{"summary":"Update Booked Appointment","operationId":"update_booked_appointment_api_doctor_appointments__appt_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appt_id","in":"path","required":true,"schema":{"type":"integer","title":"Appt Id"}},{"name":"as_doctor_id","in":"query","required":false,"schema":{"type":"integer","title":"As Doctor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookedAppointmentUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BookedAppointmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Cancel Booked Appointment","operationId":"cancel_booked_appointment_api_doctor_appointments__appt_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appt_id","in":"path","required":true,"schema":{"type":"integer","title":"Appt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/queue/{slug}":{"get":{"summary":"Public Queue Display","description":"Public queue board. Polls every ~5s from the TV/waiting room page.","operationId":"public_queue_display_api_queue__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/queue":{"get":{"summary":"Get My Queue","description":"Doctor's own queue state + today's list (or a clinic colleague's).","operationId":"get_my_queue_api_doctor_queue_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"as_doctor_id","in":"query","required":false,"schema":{"type":"integer","title":"As Doctor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Queue","description":"Doctor (or clinic receptionist) sets current token, status, or message.","operationId":"update_queue_api_doctor_queue_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"as_doctor_id","in":"query","required":false,"schema":{"type":"integer","title":"As Doctor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/queue/patients":{"get":{"summary":"Get Queue Patients","description":"Return today's patient list with token numbers for the doctor's queue panel.","operationId":"get_queue_patients_api_doctor_queue_patients_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"as_doctor_id","in":"query","required":false,"schema":{"type":"integer","title":"As Doctor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object"},"title":"Response Get Queue Patients Api Doctor Queue Patients Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/queue/complete":{"post":{"summary":"Queue Complete Current","description":"Mark the currently-serving patient as completed + send review WhatsApp.","operationId":"queue_complete_current_api_doctor_queue_complete_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"as_doctor_id","in":"query","required":false,"schema":{"type":"integer","title":"As Doctor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/queue/next":{"post":{"summary":"Queue Next Token","description":"Mark current patient completed (+ send review) and advance to next confirmed patient.","operationId":"queue_next_token_api_doctor_queue_next_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"as_doctor_id","in":"query","required":false,"schema":{"type":"integer","title":"As Doctor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/queue/slug":{"put":{"summary":"Update Queue Slug","description":"Let doctor customise their queue URL slug.","operationId":"update_queue_slug_api_doctor_queue_slug_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueSlugUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","title":"Response Update Queue Slug Api Doctor Queue Slug Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/public/stats":{"get":{"summary":"Public Platform Stats","description":"Real platform counts + genuine verified patient reviews for the homepage.\n\nEverything here is computed from live data. Nothing is seeded, padded or\ninvented — the homepage hides any block whose real numbers are too small\nto be meaningful, which is handled client-side against `display_ready`.","operationId":"public_platform_stats_api_public_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/public/doctors/{doctor_id}/rating":{"get":{"summary":"Public Doctor Rating","description":"Public aggregate rating + recent reviews for a doctor.","operationId":"public_doctor_rating_api_public_doctors__doctor_id__rating_get","parameters":[{"name":"doctor_id","in":"path","required":true,"schema":{"type":"integer","title":"Doctor Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorRatingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public/review/{appointment_id}":{"post":{"summary":"Submit Public Review","description":"Public review endpoint — no login required, secured by HMAC token.","operationId":"submit_public_review_api_public_review__appointment_id__post","parameters":[{"name":"appointment_id","in":"path","required":true,"schema":{"type":"integer","title":"Appointment Id"}},{"name":"t","in":"query","required":true,"schema":{"type":"string","description":"HMAC review token from notification link","title":"T"},"description":"HMAC review token from notification link"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewSubmitRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/reviews":{"get":{"summary":"Get My Reviews","description":"Doctor sees their own reviews and aggregate rating.","operationId":"get_my_reviews_api_doctor_reviews_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorRatingResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/follow-ups":{"post":{"summary":"Create Follow Up","description":"Set a follow-up reminder for a patient.","operationId":"create_follow_up_api_doctor_follow_ups_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorFollowUpCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorFollowUpResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Follow Ups","description":"List all follow-up reminders. upcoming=true → only future or today.","operationId":"list_follow_ups_api_doctor_follow_ups_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","title":"Status"}},{"name":"upcoming","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Upcoming"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DoctorFollowUpResponse"},"title":"Response List Follow Ups Api Doctor Follow Ups Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/follow-ups/{fu_id}":{"patch":{"summary":"Update Follow Up","operationId":"update_follow_up_api_doctor_follow_ups__fu_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"fu_id","in":"path","required":true,"schema":{"type":"integer","title":"Fu Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorFollowUpUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DoctorFollowUpResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Follow Up","operationId":"delete_follow_up_api_doctor_follow_ups__fu_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"fu_id","in":"path","required":true,"schema":{"type":"integer","title":"Fu Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/patients/{patient_id}/follow-ups":{"get":{"summary":"Get Patient Follow Ups","operationId":"get_patient_follow_ups_api_doctor_patients__patient_id__follow_ups_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DoctorFollowUpResponse"},"title":"Response Get Patient Follow Ups Api Doctor Patients  Patient Id  Follow Ups Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/medical-certificates":{"post":{"summary":"Create Medical Certificate","description":"Generate and save a medical certificate for a patient.","operationId":"create_medical_certificate_api_doctor_medical_certificates_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicalCertificateCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicalCertificateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Medical Certificates","operationId":"list_medical_certificates_api_doctor_medical_certificates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"query","required":false,"schema":{"type":"integer","title":"Patient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MedicalCertificateResponse"},"title":"Response List Medical Certificates Api Doctor Medical Certificates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/medical-certificates/{cert_id}":{"get":{"summary":"Get Medical Certificate","operationId":"get_medical_certificate_api_doctor_medical_certificates__cert_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cert_id","in":"path","required":true,"schema":{"type":"integer","title":"Cert Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MedicalCertificateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/patients/{patient_id}/medical-certificates":{"get":{"summary":"Get Patient Medical Certificates","operationId":"get_patient_medical_certificates_api_doctor_patients__patient_id__medical_certificates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MedicalCertificateResponse"},"title":"Response Get Patient Medical Certificates Api Doctor Patients  Patient Id  Medical Certificates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/patients/{patient_id}/soap-autofill":{"get":{"summary":"Soap Autofill","description":"Pre-fill a SOAP note draft based on the patient's latest diagnoses,\nnotes, and clinical records. The doctor can review and edit before saving.","operationId":"soap_autofill_api_doctor_patients__patient_id__soap_autofill_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SOAPAutofillResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/patients/{patient_id}/risk-timeline":{"get":{"summary":"Patient Risk Timeline","description":"Visual timeline showing patient's diagnoses, key health metric changes,\nprescriptions, and risk flags over time. Used to spot clinical trends.","operationId":"patient_risk_timeline_api_doctor_patients__patient_id__risk_timeline_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"patient_id","in":"path","required":true,"schema":{"type":"integer","title":"Patient Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RiskTimelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/subscription/status":{"get":{"summary":"Subscription Status","description":"Return current plan, usage and limits for the logged-in patient.","operationId":"subscription_status_api_subscription_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/subscription/plans":{"get":{"summary":"List Plans","description":"Return all plans (public, no auth needed).","operationId":"list_plans_api_subscription_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/subscription/create-order":{"post":{"summary":"Subscription Create Order","description":"Create a Razorpay order for a plan upgrade or credit-pack purchase.","operationId":"subscription_create_order_api_subscription_create_order_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubCreateOrderRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/subscription/create-subscription":{"post":{"summary":"Subscription Create Subscription","description":"Create a Razorpay Subscription (mandate/autopay flow).\nReturns subscription_id for the frontend Razorpay.js checkout.\nIf the user is on a free trial that hasn't expired, the first charge\nis deferred to after the trial ends (start_at = trial_end_date).","operationId":"subscription_create_subscription_api_subscription_create_subscription_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubCreateSubscriptionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/subscription/verify-subscription":{"post":{"summary":"Subscription Verify Mandate","description":"Called after Razorpay mandate checkout completes.\nVerifies HMAC, activates plan, sends WhatsApp + email confirmation.","operationId":"subscription_verify_mandate_api_subscription_verify_subscription_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubVerifySubscriptionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/subscription/verify":{"post":{"summary":"Subscription Verify","description":"Verify Razorpay payment signature and activate plan / add credits.","operationId":"subscription_verify_api_subscription_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/subscription/cancel":{"post":{"summary":"Subscription Cancel","description":"Cancel the current subscription.\n- Cancels the Razorpay mandate (if any) at cycle end.\n- Access continues until plan_expires_at (no refund, per policy).\n- Sets status = 'cancelled'; plan_expires_at is preserved.\n- Free plan users cannot cancel (nothing to cancel).","operationId":"subscription_cancel_api_subscription_cancel_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/kyc/status":{"get":{"summary":"Kyc Status","description":"Return the latest KYC record for the logged-in user (or null if none).","operationId":"kyc_status_api_kyc_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/kyc/document-types":{"get":{"summary":"Kyc Document Types","description":"Return supported document types with labels and format hints (public endpoint).","operationId":"kyc_document_types_api_kyc_document_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/kyc/verify":{"post":{"summary":"Kyc Verify","description":"Submit a KYC verification request via Decentro.\n\n- Auto-generates a unique reference_id\n- Calls Decentro /kyc/public_registry/validate\n- Stores the result (ID number is masked before storage)\n- Returns the verification result","operationId":"kyc_verify_api_kyc_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KYCVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/auth/login":{"post":{"summary":"Admin Login","description":"Admin CRM login — only siddhappa1997@gmail.com with the correct password.","operationId":"admin_login_api_admin_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/auth/verify":{"get":{"summary":"Admin Verify","description":"Lightweight token verification — used by frontend layout to check session.","operationId":"admin_verify_api_admin_auth_verify_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/auth/logout":{"post":{"summary":"Admin Logout","operationId":"admin_logout_api_admin_auth_logout_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/dashboard":{"get":{"summary":"Admin Dashboard","description":"High-level KPIs for the admin CRM dashboard.","operationId":"admin_dashboard_api_admin_crm_dashboard_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/users":{"get":{"summary":"Admin Crm Users","description":"Full user list with search, filter, plan & activity data.","operationId":"admin_crm_users_api_admin_crm_users_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"plan","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"}},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Channel"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/users/{user_id}":{"get":{"summary":"Admin Crm User Detail","description":"Full profile + activity for a single user.","operationId":"admin_crm_user_detail_api_admin_crm_users__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Admin Crm Update User","description":"Update name / email / DOB / gender for a patient.","operationId":"admin_crm_update_user_api_admin_crm_users__user_id__patch","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/grant-plan":{"post":{"summary":"Admin Grant Plan","description":"Grant a paid plan to a user (no payment required — admin override).","operationId":"admin_grant_plan_api_admin_crm_grant_plan_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGrantPlanRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/send-email":{"post":{"summary":"Admin Send Email","description":"Send a custom email to selected users.","operationId":"admin_send_email_api_admin_crm_send_email_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/activity":{"get":{"summary":"Admin Crm Activity","description":"Global activity feed across all users.","operationId":"admin_crm_activity_api_admin_crm_activity_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/subscriptions":{"get":{"summary":"Admin Crm Subscriptions","description":"All active paid subscriptions.","operationId":"admin_crm_subscriptions_api_admin_crm_subscriptions_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/kyc":{"get":{"summary":"Admin Crm Kyc","description":"All KYC verifications.","operationId":"admin_crm_kyc_api_admin_crm_kyc_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/incomplete-profiles":{"get":{"summary":"Admin Incomplete Profiles","description":"Return all users (WhatsApp or email) who haven't completed their profile (no full_name).","operationId":"admin_incomplete_profiles_api_admin_crm_incomplete_profiles_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/request-profile-completion":{"post":{"summary":"Admin Request Profile Completion","description":"Send a WhatsApp message to every user who hasn't set their name,\nasking them to complete registration. Returns a count of messages sent.","operationId":"admin_request_profile_completion_api_admin_crm_request_profile_completion_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/appointments":{"get":{"summary":"Admin Crm Appointments","description":"Admin: all booked appointments across every doctor with optional filters.","operationId":"admin_crm_appointments_api_admin_crm_appointments_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"doctor_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Doctor Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/wa-templates":{"get":{"summary":"Admin Crm Wa Templates","description":"Admin: show status of all WhatsApp template env vars.","operationId":"admin_crm_wa_templates_api_admin_crm_wa_templates_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/broadcast-wa":{"post":{"summary":"Admin Broadcast Wa","description":"Admin: send a free-form WhatsApp message to all patients who have a phone number.\nBody: { message: str, plan_filter?: str }  (plan_filter = \"pro\" | \"pro_plus\" etc.)\nReturns dry-run count if dry_run=true in body.","operationId":"admin_broadcast_wa_api_admin_crm_broadcast_wa_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/doctors":{"get":{"summary":"Admin Crm Doctors","description":"List all doctors with profile + appointment stats.","operationId":"admin_crm_doctors_api_admin_crm_doctors_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"verified","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verified"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/doctors/{doctor_id}/verify":{"patch":{"summary":"Admin Verify Doctor","description":"Toggle doctor verification status.","operationId":"admin_verify_doctor_api_admin_crm_doctors__doctor_id__verify_patch","parameters":[{"name":"doctor_id","in":"path","required":true,"schema":{"type":"integer","title":"Doctor Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/revenue":{"get":{"summary":"Admin Crm Revenue","description":"Revenue analytics: MRR, plan breakdown, churn, monthly trend.","operationId":"admin_crm_revenue_api_admin_crm_revenue_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/labs":{"get":{"summary":"Admin List Labs","operationId":"admin_list_labs_api_admin_labs_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Admin Create Lab","operationId":"admin_create_lab_api_admin_labs_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/labs/{lab_id}":{"patch":{"summary":"Admin Update Lab","operationId":"admin_update_lab_api_admin_labs__lab_id__patch","parameters":[{"name":"lab_id","in":"path","required":true,"schema":{"type":"integer","title":"Lab Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Admin Delete Lab","operationId":"admin_delete_lab_api_admin_labs__lab_id__delete","parameters":[{"name":"lab_id","in":"path","required":true,"schema":{"type":"integer","title":"Lab Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/labs/{lab_id}/approve":{"post":{"summary":"Admin Approve Lab","operationId":"admin_approve_lab_api_admin_labs__lab_id__approve_post","parameters":[{"name":"lab_id","in":"path","required":true,"schema":{"type":"integer","title":"Lab Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/labs/{lab_id}/tests":{"post":{"summary":"Admin Add Lab Test","operationId":"admin_add_lab_test_api_admin_labs__lab_id__tests_post","parameters":[{"name":"lab_id","in":"path","required":true,"schema":{"type":"integer","title":"Lab Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/lab-tests/{test_id}":{"delete":{"summary":"Admin Delete Lab Test","operationId":"admin_delete_lab_test_api_admin_lab_tests__test_id__delete","parameters":[{"name":"test_id","in":"path","required":true,"schema":{"type":"integer","title":"Test Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/labs/{lab_id}/packages":{"post":{"summary":"Admin Add Lab Package","operationId":"admin_add_lab_package_api_admin_labs__lab_id__packages_post","parameters":[{"name":"lab_id","in":"path","required":true,"schema":{"type":"integer","title":"Lab Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/lab-packages/{package_id}":{"delete":{"summary":"Admin Delete Lab Package","operationId":"admin_delete_lab_package_api_admin_lab_packages__package_id__delete","parameters":[{"name":"package_id","in":"path","required":true,"schema":{"type":"integer","title":"Package Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/lab-bookings":{"get":{"summary":"Admin List Lab Bookings","operationId":"admin_list_lab_bookings_api_admin_lab_bookings_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/lab-bookings/{booking_id}":{"patch":{"summary":"Admin Update Lab Booking","operationId":"admin_update_lab_booking_api_admin_lab_bookings__booking_id__patch","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"integer","title":"Booking Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/payments":{"get":{"summary":"Admin Crm Payments","description":"All Razorpay paid users: amounts, IDs, billing cycle, expiry, metrics.","operationId":"admin_crm_payments_api_admin_crm_payments_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"plan","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"}},{"name":"method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/at-risk":{"get":{"summary":"Admin Crm At Risk","description":"Revenue at risk: failed (halted) charges, expiring mandates, expired & cancelled-with-access.","operationId":"admin_crm_at_risk_api_admin_crm_at_risk_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/dunning-nudge/{user_id}":{"post":{"summary":"Admin Dunning Nudge","description":"Send a WhatsApp renewal/recovery nudge to an at-risk subscriber.","operationId":"admin_dunning_nudge_api_admin_crm_dunning_nudge__user_id__post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/ai-costs":{"get":{"summary":"Admin Crm Ai Costs","description":"Estimated AI cost & gross margin. We don't log raw tokens yet, so cost is\nestimated from PatientUsage counters × tunable per-operation rates (env-overridable).","operationId":"admin_crm_ai_costs_api_admin_crm_ai_costs_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/funnel":{"get":{"summary":"Admin Crm Funnel","description":"Acquisition funnel + monthly signup cohorts.","operationId":"admin_crm_funnel_api_admin_crm_funnel_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/users/{user_id}/notes":{"get":{"summary":"Admin Get Customer Notes","operationId":"admin_get_customer_notes_api_admin_crm_users__user_id__notes_get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Admin Add Customer Note","operationId":"admin_add_customer_note_api_admin_crm_users__user_id__notes_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/users/{user_id}/notes/{note_id}":{"delete":{"summary":"Admin Delete Customer Note","operationId":"admin_delete_customer_note_api_admin_crm_users__user_id__notes__note_id__delete","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/export":{"get":{"summary":"Admin Crm Export","description":"Export a dataset as CSV (users | payments | subscriptions).","operationId":"admin_crm_export_api_admin_crm_export_get","parameters":[{"name":"dataset","in":"query","required":false,"schema":{"type":"string","default":"users","title":"Dataset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/test-med-reminder":{"post":{"summary":"Admin Test Med Reminder","description":"Send a one-off medication reminder for testing the adherence loop.\nCreates a same-day reminder row (last_sent_date=today, expires today) so a\n'reply 1/2' or button tap logs a dose. Returns whether the number is an\nonboarded patient (required for the reply to be attributed).","operationId":"admin_test_med_reminder_api_admin_crm_test_med_reminder_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/revoke-session/{user_id}":{"post":{"summary":"Admin Revoke Session","description":"Force logout a patient by revoking all their active sessions.","operationId":"admin_revoke_session_api_admin_crm_revoke_session__user_id__post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/crm/users/{user_id}/block":{"post":{"summary":"Admin Block User","description":"Block or unblock a patient account.\n\nBlocking sets a flag and revokes every active session, so access stops\nimmediately rather than when the current token expires. Nothing is deleted —\nmedical records, billing history and the audit trail are preserved, and the\naction is fully reversible.","operationId":"admin_block_user_api_admin_crm_users__user_id__block_post","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminBlockUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/lang/languages":{"get":{"summary":"List Languages","description":"Return supported languages for the language selector UI.","operationId":"list_languages_api_lang_languages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/lang/transcribe":{"post":{"summary":"Transcribe Audio","description":"Convert a voice note to text.\nAccepts WAV/MP3/OGG/WEBM audio. Returns transcript + detected language.\nCounts against the same monthly voice allowance as a saved voice note —\nboth paths bill us for the same transcription.","operationId":"transcribe_audio_api_lang_transcribe_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_transcribe_audio_api_lang_transcribe_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/lang/translate":{"post":{"summary":"Translate Text","description":"Translate text between any supported language and English.\nBody: { \"text\": str, \"source_lang\": str, \"target_lang\": str }","operationId":"translate_text_api_lang_translate_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/lang/translate-batch":{"post":{"summary":"Translate Text Batch","description":"Translate a list of English strings to the target language in one call.\nBody: { \"texts\": List[str], \"target_lang\": str }\nReturns: { \"translations\": List[str], \"target_lang\": str }","operationId":"translate_text_batch_api_lang_translate_batch_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/lang/detect":{"post":{"summary":"Detect Text Language","description":"Detect the language of a text snippet. Body: { \"text\": str }","operationId":"detect_text_language_api_lang_detect_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/lang/speak":{"post":{"summary":"Speak Text","description":"Convert text to speech audio.\nBody: { \"text\": str, \"language_code\": str, \"speaker\"?: str }\nReturns: WAV audio file","operationId":"speak_text_api_lang_speak_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/subscription/reactivate":{"post":{"summary":"Subscription Reactivate","description":"Reactivate a cancelled subscription (restores status to active). For testing/support use.","operationId":"subscription_reactivate_api_subscription_reactivate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/razorpay/webhook":{"post":{"summary":"Razorpay Webhook","description":"Razorpay webhook — verify HMAC signature then handle all payment/subscription events.\nWe embed user_id + plan/pack in order/subscription notes so we can activate without\nthe frontend needing to call /verify (safety net for closed-browser cases).","operationId":"razorpay_webhook_api_razorpay_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/account/export":{"get":{"summary":"Export My Data","description":"Download a complete copy of the patient's own data (DPDP / data portability).\n\nReturns a single JSON document with profile, records, metrics, appointments,\nprescriptions, reminders + adherence, dependents, notes and history.","operationId":"export_my_data_api_account_export_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/emergency-card":{"get":{"summary":"Get Emergency Card","description":"Return (and lazily create) the patient's public emergency-card token + data.","operationId":"get_emergency_card_api_patient_emergency_card_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/emergency-card/regenerate":{"post":{"summary":"Regenerate Emergency Card","description":"Rotate the emergency token (invalidates any previously shared/printed QR).","operationId":"regenerate_emergency_card_api_patient_emergency_card_regenerate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/emergency/{token}":{"get":{"summary":"Public Emergency Card","description":"PUBLIC (no auth) — first responders scan the QR to see safety-critical info.","operationId":"public_emergency_card_api_emergency__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/delete-request":{"post":{"summary":"Request Account Deletion","description":"Patient requests deletion of their account and all associated data.\n\nCreates a pending request.  Admin will process it within 3–24 hours.\nAll health records, chat history, and personal data will be permanently deleted.","operationId":"request_account_deletion_api_account_delete_request_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Payload","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/account/delete-request/status":{"get":{"summary":"Get Deletion Request Status","description":"Check if a deletion request exists for the current user.","operationId":"get_deletion_request_status_api_account_delete_request_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/admin/subscriptions/reconcile":{"post":{"summary":"Admin Reconcile Subscriptions","description":"Force a Razorpay reconciliation pass (admin only).\n\nSame logic as the daily loop: any subscription Razorpay has charged past the\nlocally stored expiry is repaired. Only extends access, never revokes.","operationId":"admin_reconcile_subscriptions_api_admin_subscriptions_reconcile_post","parameters":[{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","description":"Report what would change without writing","default":false,"title":"Dry Run"},"description":"Report what would change without writing"},{"name":"X-Admin-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/subscription/status":{"get":{"summary":"Clinic Sub Status","description":"Trial/plan state for the portal banner. Creates the trial on first call.","operationId":"clinic_sub_status_api_doctor_subscription_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/subscription/plans":{"get":{"summary":"Clinic Sub Plans","description":"Public clinic plan catalogue (per-seat pricing).","operationId":"clinic_sub_plans_api_doctor_subscription_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/doctor/subscription/checkout":{"post":{"summary":"Clinic Sub Checkout","description":"Create the autopay mandate and return Razorpay's hosted checkout URL.\n\nReceptionists cannot subscribe — billing is the owner's decision.","operationId":"clinic_sub_checkout_api_doctor_subscription_checkout_post","requestBody":{"content":{"application/json":{"schema":{"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/subscription/cancel":{"post":{"summary":"Clinic Sub Cancel","description":"Cancel at the end of the paid period — never mid-cycle.","operationId":"clinic_sub_cancel_api_doctor_subscription_cancel_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/billing/invoices":{"post":{"summary":"Billing Create Invoice","description":"Raise a consultation invoice. Optionally WhatsApp the receipt to the patient.","operationId":"billing_create_invoice_api_doctor_billing_invoices_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"as_doctor_id","in":"query","required":false,"schema":{"type":"integer","title":"As Doctor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Billing List Invoices","description":"Invoices for the caller's clinic (or just their own if solo).","operationId":"billing_list_invoices_api_doctor_billing_invoices_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date_from","in":"query","required":false,"schema":{"type":"string","title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"type":"string","title":"Date To"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/billing/invoices/{invoice_id}":{"get":{"summary":"Billing Get Invoice","operationId":"billing_get_invoice_api_doctor_billing_invoices__invoice_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Billing Update Invoice","description":"Mark paid, void, or adjust a discount. Voided invoices are immutable.","operationId":"billing_update_invoice_api_doctor_billing_invoices__invoice_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/billing/invoices/{invoice_id}/send-whatsapp":{"post":{"summary":"Billing Send Receipt","description":"Re-send the receipt to the patient on WhatsApp.","operationId":"billing_send_receipt_api_doctor_billing_invoices__invoice_id__send_whatsapp_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"invoice_id","in":"path","required":true,"schema":{"type":"integer","title":"Invoice Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/billing/summary":{"get":{"summary":"Billing Collection Summary","description":"Daily collection for cash reconciliation.","operationId":"billing_collection_summary_api_doctor_billing_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"date","in":"query","required":false,"schema":{"type":"string","description":"YYYY-MM-DD; defaults to today","title":"Date"},"description":"YYYY-MM-DD; defaults to today"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/deletion-requests":{"get":{"summary":"Admin List Deletion Requests","description":"List account deletion requests (admin only).","operationId":"admin_list_deletion_requests_api_admin_deletion_requests_get","parameters":[{"name":"status_filter","in":"query","required":false,"schema":{"type":"string","default":"pending","title":"Status Filter"}},{"name":"X-Admin-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/admin/deletion-requests/{request_id}/process":{"post":{"summary":"Admin Process Deletion","description":"Process an account deletion request — permanently deletes all user data (admin only).","operationId":"admin_process_deletion_api_admin_deletion_requests__request_id__process_post","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"integer","title":"Request Id"}},{"name":"X-Admin-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","default":{},"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/notes":{"get":{"summary":"List Patient Notes","description":"Return all personal notes for the authenticated patient, newest first.","operationId":"list_patient_notes_api_patient_notes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientNoteResponse"},"type":"array","title":"Response List Patient Notes Api Patient Notes Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Patient Note","description":"Create a personal health note for the authenticated patient.","operationId":"create_patient_note_api_patient_notes_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientNoteCreateRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientNoteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/notes/{note_id}":{"delete":{"summary":"Delete Patient Note","description":"Delete a personal note (patient can only delete their own notes).","operationId":"delete_patient_note_api_patient_notes__note_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/voice-notes":{"get":{"summary":"List Voice Notes","description":"Return all voice notes for the authenticated patient, newest first.","operationId":"list_voice_notes_api_patient_voice_notes_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Upload Voice Note","description":"Upload a voice recording → store in Azure Blob → transcribe via Deepgram.","operationId":"upload_voice_note_api_patient_voice_notes_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_voice_note_api_patient_voice_notes_post"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/voice-notes/{note_id}/audio":{"get":{"summary":"Get Voice Note Audio Url","description":"Return a short-lived SAS URL for streaming/downloading the audio blob.","operationId":"get_voice_note_audio_url_api_patient_voice_notes__note_id__audio_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/voice-notes/{note_id}":{"patch":{"summary":"Rename Voice Note","description":"Update the title of a voice note.","operationId":"rename_voice_note_api_patient_voice_notes__note_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Voice Note","description":"Delete voice note + its Azure blob.","operationId":"delete_voice_note_api_patient_voice_notes__note_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"note_id","in":"path","required":true,"schema":{"type":"integer","title":"Note Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/onboarded-doctors":{"get":{"summary":"List Onboarded Doctors","description":"Return all registered doctors (with profile). Auth not required so patients can browse.","operationId":"list_onboarded_doctors_api_patient_onboarded_doctors_get","parameters":[{"name":"specialty","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specialty"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OnboardedDoctorItem"},"title":"Response List Onboarded Doctors Api Patient Onboarded Doctors Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/doctors/{doctor_id}/available-slots":{"get":{"summary":"Get Doctor Available Slots","description":"Return available time slots for a doctor on a given date.\nPriority: date-specific override > weekly period template > legacy slots > default.\n?grouped=true returns slots grouped by named period (morning/afternoon/evening/night).","operationId":"get_doctor_available_slots_api_patient_doctors__doctor_id__available_slots_get","parameters":[{"name":"doctor_id","in":"path","required":true,"schema":{"type":"integer","title":"Doctor Id"}},{"name":"date","in":"query","required":true,"schema":{"type":"string","description":"Date in YYYY-MM-DD format","title":"Date"},"description":"Date in YYYY-MM-DD format"},{"name":"grouped","in":"query","required":false,"schema":{"type":"boolean","description":"Return slots grouped by period","default":false,"title":"Grouped"},"description":"Return slots grouped by period"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/book-appointment":{"post":{"summary":"Patient Book Appointment","description":"Patient books an appointment with an onboarded doctor.","operationId":"patient_book_appointment_api_patient_book_appointment_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientBookAppointmentRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientBookedAppointmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/my-appointments":{"get":{"summary":"Patient List My Appointments","description":"List all appointments booked by this patient with onboarded doctors.","operationId":"patient_list_my_appointments_api_patient_my_appointments_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatientBookedAppointmentResponse"},"type":"array","title":"Response Patient List My Appointments Api Patient My Appointments Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/my-appointments/{appt_id}":{"patch":{"summary":"Patient Update Appointment","description":"Patient reschedules their own appointment.","operationId":"patient_update_appointment_api_patient_my_appointments__appt_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appt_id","in":"path","required":true,"schema":{"type":"integer","title":"Appt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientBookedAppointmentUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatientBookedAppointmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Patient Cancel Appointment","description":"Patient cancels their own appointment.","operationId":"patient_cancel_appointment_api_patient_my_appointments__appt_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appt_id","in":"path","required":true,"schema":{"type":"integer","title":"Appt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/my-appointments/{appt_id}/resend-wa":{"post":{"summary":"Patient Resend Wa Confirmation","description":"Resend the WhatsApp booking confirmation for an appointment.\nOptionally supply ?phone=XXXXXXXXXX to send to a different number.\nUseful when the account phone is different from the user's actual WhatsApp.","operationId":"patient_resend_wa_confirmation_api_patient_my_appointments__appt_id__resend_wa_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"appt_id","in":"path","required":true,"schema":{"type":"integer","title":"Appt Id"}},{"name":"phone","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Override WA phone (E.164 or 10-digit Indian)","title":"Phone"},"description":"Override WA phone (E.164 or 10-digit Indian)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/scribe/builtin-templates":{"get":{"summary":"Scribe Builtin Templates","description":"Return the built-in SOAP / DAP / BIRP template definitions.","operationId":"scribe_builtin_templates_api_doctor_scribe_builtin_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/scribe/templates":{"get":{"summary":"Scribe List Templates","operationId":"scribe_list_templates_api_doctor_scribe_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Scribe Create Template","operationId":"scribe_create_template_api_doctor_scribe_templates_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScribeTemplateCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/doctor/scribe/templates/{template_id}":{"patch":{"summary":"Scribe Update Template","operationId":"scribe_update_template_api_doctor_scribe_templates__template_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScribeTemplateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Scribe Delete Template","operationId":"scribe_delete_template_api_doctor_scribe_templates__template_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/scribe/sessions":{"get":{"summary":"Scribe List Sessions","operationId":"scribe_list_sessions_api_doctor_scribe_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Scribe Create Session","description":"Create a new scribe session (call at recording start).","operationId":"scribe_create_session_api_doctor_scribe_sessions_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScribeSessionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/scribe/sessions/{session_id}":{"get":{"summary":"Scribe Get Session","operationId":"scribe_get_session_api_doctor_scribe_sessions__session_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Scribe Update Session","description":"Edit SOAP fields manually after generation.","operationId":"scribe_update_session_api_doctor_scribe_sessions__session_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScribeSOAPUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Scribe Delete Session","operationId":"scribe_delete_session_api_doctor_scribe_sessions__session_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/scribe/sessions/{session_id}/upload-audio":{"post":{"summary":"Scribe Upload Audio","description":"Upload the recorded audio blob.\nStores it in Azure Blob Storage under scribe/{doctor_id}/{session_id}/audio.webm\nand updates session status to 'uploaded'.","operationId":"scribe_upload_audio_api_doctor_scribe_sessions__session_id__upload_audio_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_scribe_upload_audio_api_doctor_scribe_sessions__session_id__upload_audio_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/scribe/sessions/{session_id}/transcribe":{"post":{"summary":"Scribe Transcribe","description":"Transcribe the uploaded audio using Deepgram and immediately generate\nSOAP notes from the transcript. Returns transcript + SOAP immediately\n(synchronous for simplicity at clinic scale).","operationId":"scribe_transcribe_api_doctor_scribe_sessions__session_id__transcribe_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/scribe/sessions/{session_id}/transcribe-text":{"post":{"summary":"Scribe Transcribe Text","description":"Accept a manually-typed or client-transcribed text and generate SOAP notes.\nUsed when audio upload is skipped (e.g. browser doesn't support MediaRecorder\nor user prefers to type).","operationId":"scribe_transcribe_text_api_doctor_scribe_sessions__session_id__transcribe_text_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_scribe_transcribe_text_api_doctor_scribe_sessions__session_id__transcribe_text_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/doctor/scribe/sessions/{session_id}/save-to-record":{"post":{"summary":"Scribe Save To Record","description":"Save the SOAP note as a PatientDiagnosis entry in the doctor's clinical record.","operationId":"scribe_save_to_record_api_doctor_scribe_sessions__session_id__save_to_record_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScribeSaveDiagnosis"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/diet-plan/access":{"get":{"summary":"Diet Plan Access","description":"Returns {enabled: bool} — used by frontend to show/hide the feature.","operationId":"diet_plan_access_api_patient_diet_plan_access_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/diet-plan/generate":{"post":{"summary":"Diet Plan Generate","operationId":"diet_plan_generate_api_patient_diet_plan_generate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DietPlanGenerateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/diet-plans":{"get":{"summary":"List Diet Plans","operationId":"list_diet_plans_api_patient_diet_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/diet-plans/{plan_id}":{"get":{"summary":"Get Diet Plan","operationId":"get_diet_plan_api_patient_diet_plans__plan_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Diet Plan","operationId":"delete_diet_plan_api_patient_diet_plans__plan_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/diet-plans/{plan_id}/regen-day":{"post":{"summary":"Regen Diet Plan Day","operationId":"regen_diet_plan_day_api_patient_diet_plans__plan_id__regen_day_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"plan_id","in":"path","required":true,"schema":{"type":"integer","title":"Plan Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegenDayRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/instant-scan/access":{"get":{"summary":"Instant Scan Access","description":"Check whether this patient has access to the Instant Scan feature.","operationId":"instant_scan_access_api_patient_instant_scan_access_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/instant-scan/extract":{"post":{"summary":"Instant Scan Extract","description":"Upload a photo of a lab report → GPT-4o Vision extracts all values instantly.\nReturns structured JSON with test name, value, unit, reference range, abnormal flag.\nGated to beta phones only.","operationId":"instant_scan_extract_api_patient_instant_scan_extract_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_instant_scan_extract_api_patient_instant_scan_extract_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/instant-scan/save":{"post":{"summary":"Instant Scan Save","description":"Save extracted lab values as a PatientRecord (FHIR bundle).\nIntegrates seamlessly with existing health timeline, insights, and trends.","operationId":"instant_scan_save_api_patient_instant_scan_save_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstantScanSavePayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/mental-health/access":{"get":{"summary":"Mental Health Access","description":"Check whether this patient has access to the Mental Health Check-in feature.","operationId":"mental_health_access_api_patient_mental_health_access_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/mental-health/checkin":{"post":{"summary":"Mental Health Checkin","description":"Submit a mental health check-in. Creates or updates today's record.\nGenerates an AI insight and returns crisis resources if score <= 8.","operationId":"mental_health_checkin_api_patient_mental_health_checkin_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MentalHealthCheckinPayload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patient/mental-health/history":{"get":{"summary":"Mental Health History","description":"Return mental health check-in history for charting (default: last 90 days).","operationId":"mental_health_history_api_patient_mental_health_history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":7,"default":90,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patient/mental-health/today":{"get":{"summary":"Mental Health Today","description":"Return today's check-in if it exists.","operationId":"mental_health_today_api_patient_mental_health_today_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"AdminBlockUserRequest":{"properties":{"blocked":{"type":"boolean","title":"Blocked"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["blocked"],"title":"AdminBlockUserRequest"},"AdminEmailRequest":{"properties":{"user_ids":{"items":{"type":"integer"},"type":"array","title":"User Ids"},"subject":{"type":"string","title":"Subject"},"html_body":{"type":"string","title":"Html Body"},"text_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Body"}},"type":"object","required":["user_ids","subject","html_body"],"title":"AdminEmailRequest"},"AdminGrantPlanRequest":{"properties":{"user_id":{"type":"integer","title":"User Id"},"plan_id":{"type":"string","title":"Plan Id"},"days":{"type":"integer","title":"Days","default":30}},"type":"object","required":["user_id","plan_id"],"title":"AdminGrantPlanRequest"},"AdminLoginRequest":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"AdminLoginRequest"},"AdminUpdateUserRequest":{"properties":{"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"dob":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dob"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"}},"type":"object","title":"AdminUpdateUserRequest"},"AppointmentCreateRequest":{"properties":{"provider_name":{"type":"string","title":"Provider Name"},"start_at":{"type":"string","format":"date-time","title":"Start At"},"end_at":{"type":"string","format":"date-time","title":"End At"},"mode":{"type":"string","title":"Mode"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["provider_name","start_at","end_at","mode"],"title":"AppointmentCreateRequest"},"AppointmentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"provider_name":{"type":"string","title":"Provider Name"},"start_at":{"type":"string","format":"date-time","title":"Start At"},"end_at":{"type":"string","format":"date-time","title":"End At"},"mode":{"type":"string","title":"Mode"},"status":{"type":"string","title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"telehealth_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telehealth Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","provider_name","start_at","end_at","mode","status","created_at","updated_at"],"title":"AppointmentResponse"},"AppointmentSlotCreate":{"properties":{"day_of_week":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"Day Of Week"},"start_time":{"type":"string","title":"Start Time"},"end_time":{"type":"string","title":"End Time"},"slot_duration":{"type":"integer","title":"Slot Duration","default":30}},"type":"object","required":["day_of_week","start_time","end_time"],"title":"AppointmentSlotCreate"},"AppointmentSlotResponse":{"properties":{"id":{"type":"integer","title":"Id"},"doctor_user_id":{"type":"integer","title":"Doctor User Id"},"day_of_week":{"type":"integer","title":"Day Of Week"},"start_time":{"type":"string","title":"Start Time"},"end_time":{"type":"string","title":"End Time"},"slot_duration":{"type":"integer","title":"Slot Duration"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","doctor_user_id","day_of_week","start_time","end_time","slot_duration","is_active","created_at"],"title":"AppointmentSlotResponse"},"AppointmentUpdateRequest":{"properties":{"provider_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Name"},"start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start At"},"end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End At"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"AppointmentUpdateRequest"},"AuthResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"user":{"$ref":"#/components/schemas/MeResponse"}},"type":"object","required":["access_token","user"],"title":"AuthResponse"},"Body_extend_prescription_api_doctor_prescriptions__rx_id__extend_post":{"properties":{"days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Days"}},"type":"object","required":["days"],"title":"Body_extend_prescription_api_doctor_prescriptions__rx_id__extend_post"},"Body_instant_scan_extract_api_patient_instant_scan_extract_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_instant_scan_extract_api_patient_instant_scan_extract_post"},"Body_lab_upload_result_file_api_lab_bookings__booking_id__result_file_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_lab_upload_result_file_api_lab_bookings__booking_id__result_file_post"},"Body_patient_request_renewal_api_patient_prescriptions__rx_id__request_renewal_post":{"properties":{"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","title":"Body_patient_request_renewal_api_patient_prescriptions__rx_id__request_renewal_post"},"Body_scribe_transcribe_text_api_doctor_scribe_sessions__session_id__transcribe_text_post":{"properties":{"transcript":{"type":"string","title":"Transcript"}},"type":"object","required":["transcript"],"title":"Body_scribe_transcribe_text_api_doctor_scribe_sessions__session_id__transcribe_text_post"},"Body_scribe_upload_audio_api_doctor_scribe_sessions__session_id__upload_audio_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"duration_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Seconds"}},"type":"object","required":["file"],"title":"Body_scribe_upload_audio_api_doctor_scribe_sessions__session_id__upload_audio_post"},"Body_transcribe_audio_api_lang_transcribe_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"language_code":{"type":"string","title":"Language Code","default":"unknown"},"duration_seconds":{"type":"number","title":"Duration Seconds","default":0.0}},"type":"object","required":["file"],"title":"Body_transcribe_audio_api_lang_transcribe_post"},"Body_update_prescription_status_api_doctor_prescriptions__rx_id__patch":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"Body_update_prescription_status_api_doctor_prescriptions__rx_id__patch"},"Body_upload_doctor_avatar_api_doctor_profile_avatar_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_doctor_avatar_api_doctor_profile_avatar_post"},"Body_upload_my_avatar_api_me_avatar_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_my_avatar_api_me_avatar_post"},"Body_upload_voice_note_api_patient_voice_notes_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"duration_seconds":{"type":"number","title":"Duration Seconds","default":0.0}},"type":"object","required":["file"],"title":"Body_upload_voice_note_api_patient_voice_notes_post"},"Body_vault_upload_document_api_vault_upload_post":{"properties":{"document_type":{"type":"string","title":"Document Type"},"file":{"type":"string","format":"binary","title":"File"},"dependent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dependent Id"}},"type":"object","required":["document_type","file"],"title":"Body_vault_upload_document_api_vault_upload_post"},"BookedAppointmentCreateRequest":{"properties":{"patient_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Patient User Id"},"patient_name":{"type":"string","maxLength":200,"minLength":1,"title":"Patient Name"},"patient_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Phone"},"appointment_date":{"type":"string","format":"date","title":"Appointment Date"},"appointment_time":{"type":"string","title":"Appointment Time"},"duration_minutes":{"type":"integer","title":"Duration Minutes","default":30},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"mode":{"type":"string","title":"Mode","default":"in_person"}},"type":"object","required":["patient_name","appointment_date","appointment_time"],"title":"BookedAppointmentCreateRequest"},"BookedAppointmentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"doctor_user_id":{"type":"integer","title":"Doctor User Id"},"patient_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Patient User Id"},"patient_name":{"type":"string","title":"Patient Name"},"patient_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Phone"},"patient_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Email"},"appointment_date":{"type":"string","format":"date","title":"Appointment Date"},"appointment_time":{"type":"string","title":"Appointment Time"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"status":{"type":"string","title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"mode":{"type":"string","title":"Mode"},"meeting_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meeting Url"},"token_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Token Number"},"review_sent":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Review Sent"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","doctor_user_id","patient_name","appointment_date","appointment_time","duration_minutes","status","mode","created_at","updated_at"],"title":"BookedAppointmentResponse"},"BookedAppointmentUpdateRequest":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"appointment_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Appointment Date"},"appointment_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Appointment Time"}},"type":"object","title":"BookedAppointmentUpdateRequest"},"CalendarDayInfo":{"properties":{"date":{"type":"string","title":"Date"},"day_of_week":{"type":"integer","title":"Day Of Week"},"status":{"type":"string","title":"Status"},"periods":{"anyOf":[{"items":{"$ref":"#/components/schemas/PeriodConfig"},"type":"array"},{"type":"null"}],"title":"Periods"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"booked_count":{"type":"integer","title":"Booked Count","default":0},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"override_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Override Id"}},"type":"object","required":["date","day_of_week","status"],"title":"CalendarDayInfo"},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","maxLength":4096,"title":"Current Password"},"new_password":{"type":"string","maxLength":128,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"ChatMessageItem":{"properties":{"id":{"type":"integer","title":"Id"},"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"display_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Content"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","role","content","created_at"],"title":"ChatMessageItem"},"ChatSendRequest":{"properties":{"message":{"type":"string","maxLength":2000,"minLength":1,"title":"Message"},"language":{"type":"string","title":"Language","default":"en-IN"}},"type":"object","required":["message"],"title":"ChatSendRequest"},"ChatSendResponse":{"properties":{"reply":{"type":"string","title":"Reply"},"translated_reply":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Translated Reply"},"language":{"type":"string","title":"Language","default":"en-IN"},"messages":{"items":{"$ref":"#/components/schemas/ChatMessageItem"},"type":"array","title":"Messages"},"sources":{"items":{"$ref":"#/components/schemas/ChatSource"},"type":"array","title":"Sources","default":[]}},"type":"object","required":["reply","messages"],"title":"ChatSendResponse"},"ChatSource":{"properties":{"record_id":{"type":"integer","title":"Record Id"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"},"record_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Record Date"}},"type":"object","required":["record_id"],"title":"ChatSource","description":"A vault record the assistant drew on for its answer."},"ClinicalSummary":{"properties":{"patient_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Name"},"date_of_birth":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date Of Birth"},"active_medications":{"items":{"$ref":"#/components/schemas/Medication"},"type":"array","title":"Active Medications"},"lab_results":{"items":{"$ref":"#/components/schemas/LabResult"},"type":"array","title":"Lab Results"},"diagnoses":{"items":{"type":"string"},"type":"array","title":"Diagnoses"},"procedures":{"items":{"type":"string"},"type":"array","title":"Procedures"},"allergies":{"items":{"type":"string"},"type":"array","title":"Allergies"},"extracted_from":{"type":"string","title":"Extracted From","default":""},"extraction_date":{"type":"string","format":"date-time","title":"Extraction Date"},"document_type":{"type":"string","title":"Document Type","default":""},"fhir_bundle":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Fhir Bundle"}},"type":"object","title":"ClinicalSummary","description":"FHIR-compliant clinical summary extracted from medical documents"},"CollectionSummaryResponse":{"properties":{"date":{"type":"string","title":"Date"},"total_collected_inr":{"type":"integer","title":"Total Collected Inr"},"invoice_count":{"type":"integer","title":"Invoice Count"},"unpaid_inr":{"type":"integer","title":"Unpaid Inr"},"unpaid_count":{"type":"integer","title":"Unpaid Count"},"by_payment_mode":{"type":"object","title":"By Payment Mode"},"by_doctor":{"items":{"type":"object"},"type":"array","title":"By Doctor"}},"type":"object","required":["date","total_collected_inr","invoice_count","unpaid_inr","unpaid_count","by_payment_mode","by_doctor"],"title":"CollectionSummaryResponse"},"DietPlanGenerateRequest":{"properties":{"duration_days":{"type":"integer","title":"Duration Days","default":7},"diet_type":{"type":"string","title":"Diet Type","default":"vegetarian"},"cuisine":{"type":"string","title":"Cuisine","default":"Indian"},"goal":{"type":"string","title":"Goal","default":"balanced health"},"notes":{"type":"string","title":"Notes","default":""}},"type":"object","title":"DietPlanGenerateRequest"},"DoctorChartPoint":{"properties":{"t":{"type":"string","format":"date-time","title":"T"},"v":{"type":"number","title":"V"}},"type":"object","required":["t","v"],"title":"DoctorChartPoint"},"DoctorChartSeries":{"properties":{"metric_type":{"type":"string","title":"Metric Type"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"points":{"items":{"$ref":"#/components/schemas/DoctorChartPoint"},"type":"array","title":"Points"},"normal_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Normal Min"},"normal_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Normal Max"}},"type":"object","required":["metric_type"],"title":"DoctorChartSeries"},"DoctorChartsResponse":{"properties":{"patient_id":{"type":"integer","title":"Patient Id"},"from_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From At"},"to_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To At"},"series":{"items":{"$ref":"#/components/schemas/DoctorChartSeries"},"type":"array","title":"Series"}},"type":"object","required":["patient_id"],"title":"DoctorChartsResponse"},"DoctorChatCitation":{"properties":{"record_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Record Id"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"},"record_created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Record Created At"},"quote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quote"}},"type":"object","title":"DoctorChatCitation"},"DoctorChatQualitySignals":{"properties":{"used_patient_context":{"type":"boolean","title":"Used Patient Context"},"missing_data":{"items":{"type":"string"},"type":"array","title":"Missing Data"}},"type":"object","required":["used_patient_context"],"title":"DoctorChatQualitySignals"},"DoctorChatRequest":{"properties":{"message":{"type":"string","maxLength":2000,"minLength":1,"title":"Message"}},"type":"object","required":["message"],"title":"DoctorChatRequest"},"DoctorChatResponse":{"properties":{"answer":{"type":"string","title":"Answer"},"citations":{"items":{"$ref":"#/components/schemas/DoctorChatCitation"},"type":"array","title":"Citations"},"quality":{"$ref":"#/components/schemas/DoctorChatQualitySignals"}},"type":"object","required":["answer","quality"],"title":"DoctorChatResponse"},"DoctorCommentCreateRequest":{"properties":{"comment":{"type":"string","maxLength":4000,"minLength":1,"title":"Comment"},"target":{"type":"string","title":"Target","description":"profile | record | summary","default":"summary"},"record_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Record Id"},"is_diagnosis":{"type":"boolean","title":"Is Diagnosis","default":false}},"type":"object","required":["comment"],"title":"DoctorCommentCreateRequest"},"DoctorCommentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"patient_user_id":{"type":"integer","title":"Patient User Id"},"doctor_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Doctor User Id"},"share_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Share Id"},"record_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Record Id"},"target":{"type":"string","title":"Target"},"comment":{"type":"string","title":"Comment"},"is_diagnosis":{"type":"boolean","title":"Is Diagnosis"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"doctor":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Doctor"}},"type":"object","required":["id","patient_user_id","target","comment","is_diagnosis","created_at","updated_at"],"title":"DoctorCommentResponse"},"DoctorDashboardAbnormalLab":{"properties":{"test_name":{"type":"string","title":"Test Name"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","required":["test_name"],"title":"DoctorDashboardAbnormalLab"},"DoctorDashboardAbnormalTestCount":{"properties":{"test_name":{"type":"string","title":"Test Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["test_name","count"],"title":"DoctorDashboardAbnormalTestCount"},"DoctorDashboardOverviewResponse":{"properties":{"doctor_id":{"type":"integer","title":"Doctor Id"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"totals":{"$ref":"#/components/schemas/DoctorDashboardTotals"},"risk_distribution":{"$ref":"#/components/schemas/DoctorDashboardRiskDistribution"},"record_activity":{"items":{"$ref":"#/components/schemas/DoctorDashboardRecordActivityPoint"},"type":"array","title":"Record Activity"},"top_alert_patients":{"items":{"$ref":"#/components/schemas/DoctorDashboardPatientAlert"},"type":"array","title":"Top Alert Patients"},"top_abnormal_tests":{"items":{"$ref":"#/components/schemas/DoctorDashboardAbnormalTestCount"},"type":"array","title":"Top Abnormal Tests"}},"type":"object","required":["doctor_id","generated_at","totals","risk_distribution"],"title":"DoctorDashboardOverviewResponse"},"DoctorDashboardPatientAlert":{"properties":{"patient_id":{"type":"integer","title":"Patient Id"},"full_name":{"type":"string","title":"Full Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"last_record_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Record At"},"risk_level":{"type":"string","enum":["high","moderate","low","none"],"title":"Risk Level"},"risk_summary":{"$ref":"#/components/schemas/DoctorDashboardRiskDistribution"},"abnormal_labs":{"items":{"$ref":"#/components/schemas/DoctorDashboardAbnormalLab"},"type":"array","title":"Abnormal Labs"}},"type":"object","required":["patient_id","full_name","risk_level","risk_summary"],"title":"DoctorDashboardPatientAlert"},"DoctorDashboardRecordActivityPoint":{"properties":{"date":{"type":"string","title":"Date"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["date","count"],"title":"DoctorDashboardRecordActivityPoint"},"DoctorDashboardRiskDistribution":{"properties":{"high":{"type":"integer","title":"High","default":0},"moderate":{"type":"integer","title":"Moderate","default":0},"low":{"type":"integer","title":"Low","default":0},"none":{"type":"integer","title":"None","default":0}},"type":"object","title":"DoctorDashboardRiskDistribution"},"DoctorDashboardTotals":{"properties":{"total_patients":{"type":"integer","title":"Total Patients","default":0},"patients_with_records_30d":{"type":"integer","title":"Patients With Records 30D","default":0},"new_records_7d":{"type":"integer","title":"New Records 7D","default":0},"high_risk_patients":{"type":"integer","title":"High Risk Patients","default":0},"moderate_risk_patients":{"type":"integer","title":"Moderate Risk Patients","default":0},"open_tasks":{"type":"integer","title":"Open Tasks","default":0},"overdue_tasks":{"type":"integer","title":"Overdue Tasks","default":0}},"type":"object","title":"DoctorDashboardTotals"},"DoctorDateAvailabilityCreate":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"is_available":{"type":"boolean","title":"Is Available","default":true},"periods":{"anyOf":[{"items":{"$ref":"#/components/schemas/PeriodConfig"},"type":"array"},{"type":"null"}],"title":"Periods"},"max_tokens":{"anyOf":[{"type":"integer","maximum":500.0,"minimum":1.0},{"type":"null"}],"title":"Max Tokens"},"notes":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Notes"}},"type":"object","required":["date"],"title":"DoctorDateAvailabilityCreate"},"DoctorDateAvailabilityResponse":{"properties":{"id":{"type":"integer","title":"Id"},"doctor_user_id":{"type":"integer","title":"Doctor User Id"},"date":{"type":"string","format":"date","title":"Date"},"is_available":{"type":"boolean","title":"Is Available"},"periods":{"anyOf":[{"items":{"$ref":"#/components/schemas/PeriodConfig"},"type":"array"},{"type":"null"}],"title":"Periods"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","doctor_user_id","date","is_available","created_at","updated_at"],"title":"DoctorDateAvailabilityResponse"},"DoctorFollowUpCreateRequest":{"properties":{"patient_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Patient User Id"},"patient_name":{"type":"string","maxLength":200,"minLength":1,"title":"Patient Name"},"patient_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Phone"},"follow_up_date":{"type":"string","format":"date","title":"Follow Up Date"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["patient_name","follow_up_date"],"title":"DoctorFollowUpCreateRequest"},"DoctorFollowUpResponse":{"properties":{"id":{"type":"integer","title":"Id"},"doctor_user_id":{"type":"integer","title":"Doctor User Id"},"patient_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Patient User Id"},"patient_name":{"type":"string","title":"Patient Name"},"patient_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Phone"},"follow_up_date":{"type":"string","format":"date","title":"Follow Up Date"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","doctor_user_id","patient_name","follow_up_date","status","created_at","updated_at"],"title":"DoctorFollowUpResponse"},"DoctorFollowUpUpdateRequest":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"follow_up_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Follow Up Date"}},"type":"object","title":"DoctorFollowUpUpdateRequest"},"DoctorInsightFlag":{"properties":{"metric_type":{"type":"string","title":"Metric Type"},"level":{"type":"string","enum":["info","warning"],"title":"Level"},"message":{"type":"string","title":"Message"}},"type":"object","required":["metric_type","level","message"],"title":"DoctorInsightFlag"},"DoctorInsightsResponse":{"properties":{"patient_id":{"type":"integer","title":"Patient Id"},"from_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From At"},"to_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To At"},"summary":{"type":"string","title":"Summary"},"flags":{"items":{"$ref":"#/components/schemas/DoctorInsightFlag"},"type":"array","title":"Flags"}},"type":"object","required":["patient_id","summary"],"title":"DoctorInsightsResponse"},"DoctorLoginRequest":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","maxLength":4096,"title":"Password"}},"type":"object","required":["email","password"],"title":"DoctorLoginRequest"},"DoctorMeResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"hospital_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hospital Name"},"clinic_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Clinic Id"},"role":{"type":"string","title":"Role","default":"doctor"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","created_at"],"title":"DoctorMeResponse"},"DoctorPatientCreateRequest":{"properties":{"full_name":{"type":"string","maxLength":200,"minLength":1,"title":"Full Name"},"phone":{"type":"string","maxLength":20,"minLength":7,"title":"Phone"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth"}},"type":"object","required":["full_name","phone"],"title":"DoctorPatientCreateRequest"},"DoctorPatientListItem":{"properties":{"id":{"type":"integer","title":"Id"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","created_at"],"title":"DoctorPatientListItem"},"DoctorPatientNoteCreateRequest":{"properties":{"kind":{"type":"string","title":"Kind","default":"note"},"note":{"type":"string","maxLength":5000,"minLength":1,"title":"Note"}},"type":"object","required":["note"],"title":"DoctorPatientNoteCreateRequest"},"DoctorPatientNoteResponse":{"properties":{"id":{"type":"integer","title":"Id"},"doctor_user_id":{"type":"integer","title":"Doctor User Id"},"patient_user_id":{"type":"integer","title":"Patient User Id"},"kind":{"type":"string","title":"Kind"},"note":{"type":"string","title":"Note"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","doctor_user_id","patient_user_id","kind","note","created_at"],"title":"DoctorPatientNoteResponse"},"DoctorProfileResponse":{"properties":{"id":{"type":"integer","title":"Id"},"doctor_user_id":{"type":"integer","title":"Doctor User Id"},"specialty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specialty"},"license_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Number"},"qualification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualification"},"experience_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Experience Years"},"clinic_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clinic Address"},"clinic_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clinic Phone"},"hospital_affiliations":{"items":{"type":"string"},"type":"array","title":"Hospital Affiliations"},"verified":{"type":"boolean","title":"Verified"},"profile_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Image Url"},"availability":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Availability"},"queue_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Queue Slug"},"registration_council":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Council"},"signature_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","doctor_user_id","verified","created_at","updated_at"],"title":"DoctorProfileResponse"},"DoctorProfileUpdateRequest":{"properties":{"specialty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specialty"},"license_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Number"},"qualification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualification"},"experience_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Experience Years"},"clinic_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clinic Address"},"clinic_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clinic Phone"},"hospital_affiliations":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Hospital Affiliations"},"profile_image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Profile Image Url"},"availability":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Availability"},"registration_council":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Council"},"signature_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature Url"}},"type":"object","title":"DoctorProfileUpdateRequest"},"DoctorRatingResponse":{"properties":{"doctor_id":{"type":"integer","title":"Doctor Id"},"doctor_name":{"type":"string","title":"Doctor Name"},"average_rating":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Rating"},"total_reviews":{"type":"integer","title":"Total Reviews"},"recommend_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recommend Percent"},"five_star":{"type":"integer","title":"Five Star","default":0},"four_star":{"type":"integer","title":"Four Star","default":0},"three_star":{"type":"integer","title":"Three Star","default":0},"reviews":{"items":{"$ref":"#/components/schemas/ReviewResponse"},"type":"array","title":"Reviews","default":[]}},"type":"object","required":["doctor_id","doctor_name","total_reviews"],"title":"DoctorRatingResponse"},"DoctorRegisterRequest":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","maxLength":128,"title":"Password"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"hospital_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hospital Name"}},"type":"object","required":["email","password"],"title":"DoctorRegisterRequest"},"DoctorUpdateRequest":{"properties":{"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"hospital_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hospital Name"}},"type":"object","title":"DoctorUpdateRequest"},"EnableRemindersRequest":{"properties":{"days":{"type":"integer","maximum":365.0,"minimum":1.0,"title":"Days","default":30}},"type":"object","title":"EnableRemindersRequest","description":"Doctor enables reminders for a prescription with a duration in days."},"FollowupTaskCreateRequest":{"properties":{"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"priority":{"type":"string","title":"Priority","default":"medium"},"status":{"type":"string","title":"Status","default":"pending"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"patient_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Patient User Id"}},"type":"object","required":["title"],"title":"FollowupTaskCreateRequest"},"FollowupTaskResponse":{"properties":{"id":{"type":"integer","title":"Id"},"patient_user_id":{"type":"integer","title":"Patient User Id"},"created_by":{"type":"integer","title":"Created By"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"priority":{"type":"string","title":"Priority"},"status":{"type":"string","title":"Status"},"due_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due Date"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","patient_user_id","created_by","title","priority","status","created_at","updated_at"],"title":"FollowupTaskResponse"},"ForgotPasswordResetRequest":{"properties":{"phone":{"type":"string","title":"Phone"},"otp_code":{"type":"string","title":"Otp Code"},"new_password":{"type":"string","maxLength":128,"title":"New Password"}},"type":"object","required":["phone","otp_code","new_password"],"title":"ForgotPasswordResetRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthMetricCreateRequest":{"properties":{"metric_type":{"type":"string","title":"Metric Type"},"value":{"type":"string","title":"Value"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"recorded_at":{"type":"string","format":"date-time","title":"Recorded At"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["metric_type","value","recorded_at"],"title":"HealthMetricCreateRequest"},"HealthMetricResponse":{"properties":{"id":{"type":"integer","title":"Id"},"metric_type":{"type":"string","title":"Metric Type"},"value":{"type":"string","title":"Value"},"unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit"},"recorded_at":{"type":"string","format":"date-time","title":"Recorded At"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","metric_type","value","recorded_at","created_at"],"title":"HealthMetricResponse"},"HistoryEvent":{"properties":{"id":{"type":"integer","title":"Id"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"kind":{"type":"string","title":"Kind"},"title":{"type":"string","title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"}},"type":"object","required":["id","occurred_at","kind","title"],"title":"HistoryEvent"},"InstantScanSavePayload":{"properties":{"lab_results":{"items":{},"type":"array","title":"Lab Results"},"report_date":{"type":"string","title":"Report Date","default":""},"lab_name":{"type":"string","title":"Lab Name","default":""},"document_type":{"type":"string","title":"Document Type","default":"Lab Report"}},"type":"object","required":["lab_results"],"title":"InstantScanSavePayload"},"InvoiceCreateRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/InvoiceItem"},"type":"array","minItems":1,"title":"Items"},"patient_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Patient Name"},"patient_phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Patient Phone"},"patient_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Patient User Id"},"appointment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Appointment Id"},"discount_inr":{"type":"integer","minimum":0.0,"title":"Discount Inr","default":0},"tax_inr":{"type":"integer","minimum":0.0,"title":"Tax Inr","default":0},"payment_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Mode"},"status":{"type":"string","title":"Status","default":"paid"},"notes":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Notes"},"send_whatsapp":{"type":"boolean","title":"Send Whatsapp","default":false}},"type":"object","required":["items"],"title":"InvoiceCreateRequest"},"InvoiceItem":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"qty":{"type":"integer","maximum":999.0,"minimum":1.0,"title":"Qty","default":1},"rate":{"type":"integer","maximum":10000000.0,"minimum":0.0,"title":"Rate"},"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount"}},"type":"object","required":["name","rate"],"title":"InvoiceItem"},"InvoiceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"invoice_number":{"type":"string","title":"Invoice Number"},"doctor_user_id":{"type":"integer","title":"Doctor User Id"},"doctor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doctor Name"},"clinic_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clinic Name"},"patient_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Name"},"patient_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Phone"},"patient_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Patient User Id"},"appointment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Appointment Id"},"items":{"items":{"type":"object"},"type":"array","title":"Items","default":[]},"subtotal_inr":{"type":"integer","title":"Subtotal Inr"},"discount_inr":{"type":"integer","title":"Discount Inr"},"tax_inr":{"type":"integer","title":"Tax Inr"},"total_inr":{"type":"integer","title":"Total Inr"},"payment_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Mode"},"status":{"type":"string","title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","invoice_number","doctor_user_id","subtotal_inr","discount_inr","tax_inr","total_inr","status","created_at"],"title":"InvoiceResponse"},"InvoiceUpdateRequest":{"properties":{"payment_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Mode"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"notes":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Notes"},"discount_inr":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Discount Inr"}},"type":"object","title":"InvoiceUpdateRequest"},"KYCVerifyRequest":{"properties":{"document_type":{"type":"string","title":"Document Type"},"id_number":{"type":"string","title":"Id Number"}},"type":"object","required":["document_type","id_number"],"title":"KYCVerifyRequest"},"LabLoginRequest":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","maxLength":4096,"title":"Password"}},"type":"object","required":["email","password"],"title":"LabLoginRequest"},"LabMeResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"name":{"type":"string","title":"Name"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"license_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Number"},"rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rating"},"nabl_accredited":{"type":"boolean","title":"Nabl Accredited","default":false},"home_collection":{"type":"boolean","title":"Home Collection","default":true},"about":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"About"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_approved":{"type":"boolean","title":"Is Approved","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","created_at"],"title":"LabMeResponse"},"LabRegisterRequest":{"properties":{"email":{"type":"string","title":"Email"},"password":{"type":"string","maxLength":128,"title":"Password"},"name":{"type":"string","title":"Name"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Name"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"license_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"License Number"},"nabl_accredited":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Nabl Accredited","default":false},"home_collection":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Home Collection","default":true},"about":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"About"}},"type":"object","required":["email","password","name"],"title":"LabRegisterRequest"},"LabResult":{"properties":{"test_name":{"type":"string","title":"Test Name"},"value":{"type":"string","title":"Value"},"unit":{"type":"string","title":"Unit"},"reference_range":{"type":"string","title":"Reference Range"},"is_abnormal":{"type":"boolean","title":"Is Abnormal","default":false},"test_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Date"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"low":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Low"},"high":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"High"},"severity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Severity"}},"type":"object","required":["test_name","value","unit","reference_range"],"title":"LabResult"},"LoginRequest":{"properties":{"identifier":{"type":"string","title":"Identifier"},"password":{"type":"string","maxLength":4096,"title":"Password"},"otp_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Otp Code"}},"type":"object","required":["identifier","password"],"title":"LoginRequest"},"MFAEnableRequest":{"properties":{"otp_code":{"type":"string","title":"Otp Code"}},"type":"object","required":["otp_code"],"title":"MFAEnableRequest"},"MFASetupResponse":{"properties":{"secret":{"type":"string","title":"Secret"},"otpauth_url":{"type":"string","title":"Otpauth Url"}},"type":"object","required":["secret","otpauth_url"],"title":"MFASetupResponse"},"ManualHistoryEventCreateRequest":{"properties":{"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"title":{"type":"string","title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"}},"type":"object","required":["occurred_at","title"],"title":"ManualHistoryEventCreateRequest"},"MeResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_2fa_enabled":{"type":"boolean","title":"Is 2Fa Enabled","default":false},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"phone_verified":{"type":"boolean","title":"Phone Verified","default":true},"email_verified":{"type":"boolean","title":"Email Verified","default":false},"preferred_language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preferred Language"}},"type":"object","required":["id","created_at"],"title":"MeResponse"},"MedicalCertificateCreateRequest":{"properties":{"patient_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Patient User Id"},"patient_name":{"type":"string","maxLength":200,"minLength":1,"title":"Patient Name"},"patient_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Phone"},"patient_age":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Age"},"patient_gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Gender"},"certificate_type":{"type":"string","title":"Certificate Type","default":"rest_advised"},"diagnosis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Diagnosis"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"recommendations":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendations"},"is_confidential":{"type":"boolean","title":"Is Confidential","default":false}},"type":"object","required":["patient_name","start_date"],"title":"MedicalCertificateCreateRequest"},"MedicalCertificateResponse":{"properties":{"id":{"type":"integer","title":"Id"},"doctor_user_id":{"type":"integer","title":"Doctor User Id"},"patient_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Patient User Id"},"patient_name":{"type":"string","title":"Patient Name"},"patient_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Phone"},"patient_age":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Age"},"patient_gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Gender"},"certificate_type":{"type":"string","title":"Certificate Type"},"diagnosis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Diagnosis"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"recommendations":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendations"},"is_confidential":{"type":"boolean","title":"Is Confidential"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","doctor_user_id","patient_name","certificate_type","start_date","is_confidential","created_at"],"title":"MedicalCertificateResponse"},"Medication":{"properties":{"name":{"type":"string","title":"Name"},"dosage":{"type":"string","title":"Dosage"},"frequency":{"type":"string","title":"Frequency"},"pharmacological_class":{"type":"string","title":"Pharmacological Class"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"}},"type":"object","required":["name","dosage","frequency","pharmacological_class"],"title":"Medication"},"MedicationReminderResponse":{"properties":{"id":{"type":"integer","title":"Id"},"prescription_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Prescription Id"},"patient_phone":{"type":"string","title":"Patient Phone"},"doctor_name":{"type":"string","title":"Doctor Name"},"medicine_name":{"type":"string","title":"Medicine Name"},"dose_label":{"type":"string","title":"Dose Label"},"reminder_hour":{"type":"integer","title":"Reminder Hour"},"reminder_minute":{"type":"integer","title":"Reminder Minute"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"is_active":{"type":"boolean","title":"Is Active"},"last_sent_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Sent Date"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","patient_phone","doctor_name","medicine_name","dose_label","reminder_hour","reminder_minute","start_date","is_active","created_at"],"title":"MedicationReminderResponse"},"MentalHealthCheckinPayload":{"properties":{"mood":{"type":"integer","title":"Mood"},"energy":{"type":"integer","title":"Energy"},"anxiety":{"type":"integer","title":"Anxiety"},"sleep":{"type":"integer","title":"Sleep"},"focus":{"type":"integer","title":"Focus"},"notes":{"type":"string","title":"Notes","default":""}},"type":"object","required":["mood","energy","anxiety","sleep","focus"],"title":"MentalHealthCheckinPayload"},"OnboardedDoctorItem":{"properties":{"id":{"type":"integer","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"hospital_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hospital Name"},"specialty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specialty"},"verified":{"type":"boolean","title":"Verified","default":false},"qualification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qualification"},"experience_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Experience Years"},"queue_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Queue Slug"}},"type":"object","required":["id","full_name"],"title":"OnboardedDoctorItem"},"PatchReminderRequest":{"properties":{"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"}},"type":"object","title":"PatchReminderRequest"},"PatientBookAppointmentRequest":{"properties":{"doctor_user_id":{"type":"integer","title":"Doctor User Id"},"appointment_date":{"type":"string","format":"date","title":"Appointment Date"},"appointment_time":{"type":"string","maxLength":8,"minLength":4,"title":"Appointment Time"},"duration_minutes":{"type":"integer","title":"Duration Minutes","default":30},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"},"mode":{"type":"string","title":"Mode","default":"in_person"},"patient_name":{"type":"string","maxLength":200,"minLength":1,"title":"Patient Name"},"patient_phone":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"title":"Patient Phone"},"patient_email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Patient Email"}},"type":"object","required":["doctor_user_id","appointment_date","appointment_time","patient_name"],"title":"PatientBookAppointmentRequest"},"PatientBookedAppointmentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"doctor_user_id":{"type":"integer","title":"Doctor User Id"},"doctor_name":{"type":"string","title":"Doctor Name"},"doctor_specialty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Doctor Specialty"},"hospital_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hospital Name"},"patient_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Patient User Id"},"patient_name":{"type":"string","title":"Patient Name"},"patient_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Phone"},"patient_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Email"},"appointment_date":{"type":"string","format":"date","title":"Appointment Date"},"appointment_time":{"type":"string","title":"Appointment Time"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"status":{"type":"string","title":"Status"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"mode":{"type":"string","title":"Mode"},"meeting_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meeting Url"},"token_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Token Number"},"wa_phone_sent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wa Phone Sent"},"queue_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Queue Slug"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","doctor_user_id","doctor_name","patient_name","appointment_date","appointment_time","duration_minutes","status","mode","created_at","updated_at"],"title":"PatientBookedAppointmentResponse"},"PatientBookedAppointmentUpdateRequest":{"properties":{"appointment_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Appointment Date"},"appointment_time":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Appointment Time"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"}},"type":"object","title":"PatientBookedAppointmentUpdateRequest"},"PatientDiagnosisCreateRequest":{"properties":{"title":{"type":"string","title":"Title"},"soap_subjective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Soap Subjective"},"soap_objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Soap Objective"},"soap_assessment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Soap Assessment"},"soap_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Soap Plan"},"attachments":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Attachments"},"patient_can_comment":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Patient Can Comment","default":true}},"type":"object","required":["title"],"title":"PatientDiagnosisCreateRequest"},"PatientDiagnosisResponse":{"properties":{"id":{"type":"integer","title":"Id"},"patient_user_id":{"type":"integer","title":"Patient User Id"},"doctor_user_id":{"type":"integer","title":"Doctor User Id"},"title":{"type":"string","title":"Title"},"soap_subjective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Soap Subjective"},"soap_objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Soap Objective"},"soap_assessment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Soap Assessment"},"soap_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Soap Plan"},"attachments":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Attachments"},"patient_can_comment":{"type":"boolean","title":"Patient Can Comment"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","patient_user_id","doctor_user_id","title","patient_can_comment","created_at","updated_at"],"title":"PatientDiagnosisResponse"},"PatientNoteCreateRequest":{"properties":{"kind":{"type":"string","title":"Kind","default":"note"},"note":{"type":"string","maxLength":5000,"minLength":1,"title":"Note"}},"type":"object","required":["note"],"title":"PatientNoteCreateRequest"},"PatientNoteResponse":{"properties":{"id":{"type":"integer","title":"Id"},"patient_user_id":{"type":"integer","title":"Patient User Id"},"kind":{"type":"string","title":"Kind"},"note":{"type":"string","title":"Note"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","patient_user_id","kind","note","created_at"],"title":"PatientNoteResponse"},"PatientProfileResponse":{"properties":{"user_id":{"type":"integer","title":"User Id"},"blood_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blood Type"},"allergies":{"items":{"type":"string"},"type":"array","title":"Allergies"},"chronic_conditions":{"items":{"type":"string"},"type":"array","title":"Chronic Conditions"},"family_history":{"items":{"type":"string"},"type":"array","title":"Family History"},"emergency_contacts":{"items":{"type":"object"},"type":"array","title":"Emergency Contacts"},"insurance_info":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Insurance Info"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["user_id","created_at","updated_at"],"title":"PatientProfileResponse"},"PatientProfileUpdateRequest":{"properties":{"blood_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Blood Type"},"allergies":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allergies"},"chronic_conditions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Chronic Conditions"},"family_history":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Family History"},"emergency_contacts":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"Emergency Contacts"},"insurance_info":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Insurance Info"}},"type":"object","title":"PatientProfileUpdateRequest"},"PatientRecordResponse":{"properties":{"id":{"type":"integer","title":"Id"},"patient_phone":{"type":"string","title":"Patient Phone"},"document_type":{"type":"string","title":"Document Type"},"raw_file_url":{"type":"string","title":"Raw File Url"},"fhir_data":{"$ref":"#/components/schemas/ClinicalSummary"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"processing_status":{"type":"string","title":"Processing Status","default":"done"}},"type":"object","required":["id","patient_phone","document_type","raw_file_url","fhir_data","created_at"],"title":"PatientRecordResponse"},"PeriodConfig":{"properties":{"name":{"type":"string","title":"Name"},"start_time":{"type":"string","title":"Start Time"},"end_time":{"type":"string","title":"End Time"},"slot_duration":{"type":"integer","title":"Slot Duration","default":30}},"type":"object","required":["name","start_time","end_time"],"title":"PeriodConfig"},"PreferredLanguageRequest":{"properties":{"language_code":{"type":"string","title":"Language Code"}},"type":"object","required":["language_code"],"title":"PreferredLanguageRequest"},"PrescriptionCreateRequest":{"properties":{"patient_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Patient User Id"},"patient_name":{"type":"string","maxLength":200,"minLength":1,"title":"Patient Name"},"patient_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Phone"},"patient_age":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Age"},"patient_gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Gender"},"appointment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Appointment Id"},"diagnosis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Diagnosis"},"vitals":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Vitals"},"allergies_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allergies Note"},"medications":{"items":{"$ref":"#/components/schemas/PrescriptionMedLine"},"type":"array","title":"Medications"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"follow_up_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Follow Up Date"},"safety_check":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Safety Check"}},"type":"object","required":["patient_name"],"title":"PrescriptionCreateRequest"},"PrescriptionFullUpdateRequest":{"properties":{"patient_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Name"},"patient_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Phone"},"patient_age":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Age"},"patient_gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Gender"},"appointment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Appointment Id"},"diagnosis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Diagnosis"},"vitals":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Vitals"},"allergies_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allergies Note"},"medications":{"anyOf":[{"items":{"$ref":"#/components/schemas/PrescriptionMedLine"},"type":"array"},{"type":"null"}],"title":"Medications"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"follow_up_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Follow Up Date"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"safety_check":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Safety Check"}},"type":"object","title":"PrescriptionFullUpdateRequest","description":"Full update of a prescription — all fields optional."},"PrescriptionMedLine":{"properties":{"name":{"type":"string","title":"Name"},"dosage":{"type":"string","title":"Dosage"},"frequency":{"type":"string","title":"Frequency"},"duration":{"type":"string","title":"Duration"},"route":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Route"},"meal_timing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meal Timing"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"}},"type":"object","required":["name","dosage","frequency","duration"],"title":"PrescriptionMedLine"},"PrescriptionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"doctor_user_id":{"type":"integer","title":"Doctor User Id"},"patient_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Patient User Id"},"patient_name":{"type":"string","title":"Patient Name"},"patient_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Phone"},"patient_age":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Age"},"patient_gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Gender"},"appointment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Appointment Id"},"diagnosis":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Diagnosis"},"vitals":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Vitals"},"allergies_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allergies Note"},"rx_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rx Number"},"medications":{"items":{"$ref":"#/components/schemas/PrescriptionMedLine"},"type":"array","title":"Medications"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"follow_up_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Follow Up Date"},"status":{"type":"string","title":"Status"},"expiry_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiry Date"},"renewal_requested":{"type":"boolean","title":"Renewal Requested","default":false},"safety_check":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Safety Check"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","doctor_user_id","patient_name","status","created_at","updated_at"],"title":"PrescriptionResponse"},"ProviderListItem":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"specialty":{"type":"string","title":"Specialty"},"location":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Location"},"insurance_accepted":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Insurance Accepted"},"rating":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rating"},"telehealth_supported":{"type":"boolean","title":"Telehealth Supported"}},"type":"object","required":["id","name","specialty","telehealth_supported"],"title":"ProviderListItem"},"QueueSlugUpdateRequest":{"properties":{"queue_slug":{"type":"string","maxLength":60,"minLength":3,"pattern":"^[a-z0-9-]+$","title":"Queue Slug"}},"type":"object","required":["queue_slug"],"title":"QueueSlugUpdateRequest"},"QueueStateResponse":{"properties":{"doctor_id":{"type":"integer","title":"Doctor Id"},"doctor_name":{"type":"string","title":"Doctor Name"},"specialty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specialty"},"hospital_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hospital Name"},"queue_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Queue Slug"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"current_token":{"type":"integer","title":"Current Token"},"status":{"type":"string","title":"Status"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"total_today":{"type":"integer","title":"Total Today"},"waiting":{"type":"integer","title":"Waiting"},"next_tokens":{"items":{"type":"integer"},"type":"array","title":"Next Tokens"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["doctor_id","doctor_name","current_token","status","total_today","waiting","next_tokens","updated_at"],"title":"QueueStateResponse"},"QueueUpdateRequest":{"properties":{"current_token":{"anyOf":[{"type":"integer","maximum":9999.0,"minimum":0.0},{"type":"null"}],"title":"Current Token"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"message":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"title":"Message"}},"type":"object","title":"QueueUpdateRequest"},"RecordTagListItem":{"properties":{"id":{"type":"integer","title":"Id"},"record_id":{"type":"integer","title":"Record Id"},"tag":{"type":"string","title":"Tag"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","record_id","tag","created_at"],"title":"RecordTagListItem"},"RegenDayRequest":{"properties":{"day_number":{"type":"integer","title":"Day Number"}},"type":"object","required":["day_number"],"title":"RegenDayRequest"},"RegisterRequest":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"password":{"type":"string","maxLength":128,"title":"Password"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"phone_otp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Otp"}},"type":"object","required":["password"],"title":"RegisterRequest"},"ReviewResponse":{"properties":{"id":{"type":"integer","title":"Id"},"rating":{"type":"integer","title":"Rating"},"review_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Review Text"},"would_recommend":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Would Recommend"},"is_verified":{"type":"boolean","title":"Is Verified"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"patient_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Name"}},"type":"object","required":["id","rating","is_verified","created_at"],"title":"ReviewResponse"},"ReviewSubmitRequest":{"properties":{"rating":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Rating"},"review_text":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Review Text"},"would_recommend":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Would Recommend"}},"type":"object","required":["rating"],"title":"ReviewSubmitRequest"},"RiskTimelinePoint":{"properties":{"date":{"type":"string","title":"Date"},"label":{"type":"string","title":"Label"},"type":{"type":"string","title":"Type"},"detail":{"type":"string","title":"Detail"},"severity":{"type":"string","title":"Severity"}},"type":"object","required":["date","label","type","detail","severity"],"title":"RiskTimelinePoint"},"RiskTimelineResponse":{"properties":{"patient_id":{"type":"integer","title":"Patient Id"},"patient_name":{"type":"string","title":"Patient Name"},"points":{"items":{"$ref":"#/components/schemas/RiskTimelinePoint"},"type":"array","title":"Points"}},"type":"object","required":["patient_id","patient_name","points"],"title":"RiskTimelineResponse"},"SOAPAutofillResponse":{"properties":{"soap_subjective":{"type":"string","title":"Soap Subjective","default":""},"soap_assessment":{"type":"string","title":"Soap Assessment","default":""},"soap_plan":{"type":"string","title":"Soap Plan","default":""},"suggested_title":{"type":"string","title":"Suggested Title","default":""},"icd10_suggestions":{"items":{"type":"string"},"type":"array","title":"Icd10 Suggestions","default":[]}},"type":"object","title":"SOAPAutofillResponse"},"ScribeSOAPUpdate":{"properties":{"soap_subjective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Soap Subjective"},"soap_objective":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Soap Objective"},"soap_assessment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Soap Assessment"},"soap_plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Soap Plan"},"extra_sections":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Extra Sections"},"chief_complaint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chief Complaint"},"patient_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Name"}},"type":"object","title":"ScribeSOAPUpdate"},"ScribeSaveDiagnosis":{"properties":{"patient_user_id":{"type":"integer","title":"Patient User Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"}},"type":"object","required":["patient_user_id"],"title":"ScribeSaveDiagnosis"},"ScribeSessionCreate":{"properties":{"patient_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Name"},"patient_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Patient User Id"},"appointment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Appointment Id"},"template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Template Id"},"language_code":{"type":"string","title":"Language Code","default":"en-IN"}},"type":"object","title":"ScribeSessionCreate"},"ScribeTemplateCreate":{"properties":{"name":{"type":"string","title":"Name"},"specialty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specialty"},"sections":{"items":{},"type":"array","title":"Sections"},"is_default":{"type":"boolean","title":"Is Default","default":false}},"type":"object","required":["name","sections"],"title":"ScribeTemplateCreate"},"ScribeTemplateUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"specialty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specialty"},"sections":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Sections"},"is_default":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Default"}},"type":"object","title":"ScribeTemplateUpdate"},"SendEmailVerificationRequest":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"SendEmailVerificationRequest"},"SendOTPRequest":{"properties":{"phone":{"type":"string","title":"Phone"},"purpose":{"type":"string","title":"Purpose"}},"type":"object","required":["phone","purpose"],"title":"SendOTPRequest"},"ShareCreateRequest":{"properties":{"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"expires_in_days":{"type":"integer","title":"Expires In Days","default":30},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"}},"type":"object","title":"ShareCreateRequest"},"ShareCreateResponse":{"properties":{"id":{"type":"integer","title":"Id"},"token":{"type":"string","title":"Token"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["id","token","expires_at"],"title":"ShareCreateResponse"},"ShareListItem":{"properties":{"id":{"type":"integer","title":"Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"}},"type":"object","required":["id","scopes","created_at","expires_at"],"title":"ShareListItem"},"SubCreateOrderRequest":{"properties":{"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id"},"credit_pack_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credit Pack Id"},"billing_period":{"type":"string","title":"Billing Period","default":"monthly"}},"type":"object","title":"SubCreateOrderRequest"},"SubCreateSubscriptionRequest":{"properties":{"plan_id":{"type":"string","title":"Plan Id"},"billing_period":{"type":"string","title":"Billing Period","default":"monthly"}},"type":"object","required":["plan_id"],"title":"SubCreateSubscriptionRequest"},"SubVerifyRequest":{"properties":{"razorpay_order_id":{"type":"string","title":"Razorpay Order Id"},"razorpay_payment_id":{"type":"string","title":"Razorpay Payment Id"},"razorpay_signature":{"type":"string","title":"Razorpay Signature"},"plan_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Id"},"credit_pack_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credit Pack Id"},"billing_period":{"type":"string","title":"Billing Period","default":"monthly"}},"type":"object","required":["razorpay_order_id","razorpay_payment_id","razorpay_signature"],"title":"SubVerifyRequest"},"SubVerifySubscriptionRequest":{"properties":{"razorpay_subscription_id":{"type":"string","title":"Razorpay Subscription Id"},"razorpay_payment_id":{"type":"string","title":"Razorpay Payment Id"},"razorpay_signature":{"type":"string","title":"Razorpay Signature"},"plan_id":{"type":"string","title":"Plan Id"},"billing_period":{"type":"string","title":"Billing Period","default":"monthly"}},"type":"object","required":["razorpay_subscription_id","razorpay_payment_id","razorpay_signature","plan_id"],"title":"SubVerifySubscriptionRequest"},"SupportChatRequest":{"properties":{"message":{"type":"string","maxLength":2000,"minLength":1,"title":"Message"},"history":{"anyOf":[{"items":{"type":"object"},"type":"array"},{"type":"null"}],"title":"History"}},"type":"object","required":["message"],"title":"SupportChatRequest"},"SupportChatResponse":{"properties":{"reply":{"type":"string","title":"Reply"},"escalate":{"type":"boolean","title":"Escalate","default":false}},"type":"object","required":["reply"],"title":"SupportChatResponse"},"SymptomCheckRequest":{"properties":{"messages":{"items":{"type":"object"},"type":"array","title":"Messages"}},"type":"object","required":["messages"],"title":"SymptomCheckRequest"},"UpdateMeRequest":{"properties":{"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"}},"type":"object","title":"UpdateMeRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VaultListItem":{"properties":{"id":{"type":"integer","title":"Id"},"document_type":{"type":"string","title":"Document Type"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"extracted_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extracted From"},"patient_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Patient Name"},"extraction_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Extraction Date"},"processing_status":{"type":"string","title":"Processing Status","default":"done"},"dependent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Dependent Id"}},"type":"object","required":["id","document_type","created_at"],"title":"VaultListItem"},"VerifyMyEmailRequest":{"properties":{"otp_code":{"type":"string","title":"Otp Code"}},"type":"object","required":["otp_code"],"title":"VerifyMyEmailRequest"},"VerifyMyPhoneRequest":{"properties":{"otp_code":{"type":"string","title":"Otp Code"}},"type":"object","required":["otp_code"],"title":"VerifyMyPhoneRequest"},"WeeklyAvailabilitySet":{"properties":{"day_of_week":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"Day Of Week"},"start_time":{"type":"string","pattern":"^\\d{2}:\\d{2}$","title":"Start Time"},"end_time":{"type":"string","pattern":"^\\d{2}:\\d{2}$","title":"End Time"},"slot_duration":{"type":"integer","maximum":120.0,"minimum":5.0,"title":"Slot Duration","default":30}},"type":"object","required":["day_of_week","start_time","end_time"],"title":"WeeklyAvailabilitySet","description":"Set the entire day's range for a day-of-week. Replaces any existing slots for that day."},"WeeklyDaySummary":{"properties":{"day_of_week":{"type":"integer","title":"Day Of Week"},"start_time":{"type":"string","title":"Start Time"},"end_time":{"type":"string","title":"End Time"},"slot_duration":{"type":"integer","title":"Slot Duration"},"slot_count":{"type":"integer","title":"Slot Count"}},"type":"object","required":["day_of_week","start_time","end_time","slot_duration","slot_count"],"title":"WeeklyDaySummary"},"WeeklyPeriodsDayResponse":{"properties":{"id":{"type":"integer","title":"Id"},"day_of_week":{"type":"integer","title":"Day Of Week"},"periods":{"items":{"$ref":"#/components/schemas/PeriodConfig"},"type":"array","title":"Periods"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"is_active":{"type":"boolean","title":"Is Active"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","day_of_week","periods","is_active","updated_at"],"title":"WeeklyPeriodsDayResponse"},"WeeklyPeriodsSet":{"properties":{"day_of_week":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"Day Of Week"},"periods":{"items":{"$ref":"#/components/schemas/PeriodConfig"},"type":"array","title":"Periods"},"max_tokens":{"anyOf":[{"type":"integer","maximum":500.0,"minimum":1.0},{"type":"null"}],"title":"Max Tokens"}},"type":"object","required":["day_of_week","periods"],"title":"WeeklyPeriodsSet","description":"Set multiple named periods for a recurring day-of-week."},"_TagBody":{"properties":{"tag":{"type":"string","title":"Tag"}},"type":"object","required":["tag"],"title":"_TagBody"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}