{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://viethomedoctor.com/.well-known/booking-schema.json",
  "title": "Viet Home Doctor booking request",
  "description": "Fields collected by an AI assistant before booking a home or hotel doctor visit. Check coverage via GET /api/serviceability. Submit either as MCP tool request_home_visit, or create a draft via POST /api/booking-drafts, or as a pre-filled link https://viethomedoctor.com/?<field>=<value>&…#contact using these same field names URL-encoded (plain variant), or as ?book=<base64url of this JSON object> (compact variant). Nothing is sent until the user taps Send on the form.",
  "type": "object",
  "additionalProperties": false,
  "required": ["name", "city", "accommodation", "patient_type", "symptoms", "urgency", "contact_channel", "contact_value", "consent"],
  "properties": {
    "name": { "type": "string", "minLength": 2, "maxLength": 80 },
    "city": { "type": "string", "enum": ["da-nang", "hoi-an", "ho-chi-minh", "phong-nha", "dong-hoi", "nha-trang", "hue", "hanoi", "da-lat"] },
    "accommodation": { "type": "string", "minLength": 5, "maxLength": 160, "description": "Hotel name and room, or address" },
    "patient_type": { "type": "string", "enum": ["adult", "child"] },
    "symptoms": { "type": "string", "minLength": 2, "maxLength": 500, "description": "Verbatim symptoms in patient's own words (never invent symptoms)" },
    "urgency": { "type": "string", "enum": ["as_soon_as_possible", "today", "scheduled"] },
    "preferred_time": { "type": "string", "maxLength": 60 },
    "contact_channel": { "type": "string", "enum": ["whatsapp", "zalo", "telegram", "kakaotalk", "wechat", "phone_call"] },
    "contact_value": { "type": "string", "minLength": 3, "maxLength": 40, "description": "E.164 number with + for whatsapp/zalo/kakaotalk/phone_call; @username for telegram; ID for wechat" },
    "email": { "type": "string", "format": "email", "maxLength": 120 },
    "language": { "type": "string", "enum": ["en","vi","ko","zh-hant","zh","th","ja","hi","ms","ru","fr","de","ar","es","id","tl","km","lo","ne"] },
    "consent": { "type": "boolean", "const": true },
    "src": { "type": "string", "const": "agent" },
    "agent": { "type": "string", "maxLength": 40, "description": "Name of the assistant, e.g. chatgpt, claude, gemini" }
  }
}
