{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/itsbaba-com/json-schema/itsbaba-com-medical-translate-request-schema.json",
  "title": "MedicalTranslateRequest",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hc-openapi.json#/components/schemas/MedicalTranslateRequest",
  "type": "object",
  "properties": {
    "audience": {
      "type": "string",
      "enum": [
        "clinician",
        "patient"
      ],
      "default": "clinician",
      "description": "Who reads the Hebrew. `clinician` (default) keeps shorthand such as BID and PO; `patient` writes dosing shorthand (BID, PRN) as plain words."
    },
    "reader_gender": {
      "type": "string",
      "enum": [
        "male",
        "female"
      ],
      "description": "Gender of the reader, the person the text calls \"you\". Omit when unknown."
    },
    "patient_gender": {
      "type": "string",
      "enum": [
        "male",
        "female"
      ],
      "description": "Gender of the patient in third-person references. Inferred from he/she when omitted."
    },
    "protected_terms": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "maxItems": 500,
      "description": "Kept verbatim. Pass the patient's medication and problem lists from the record. Up to 500, each up to 200 characters. Added to the account terms list for this request."
    },
    "redact_terms": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "maxItems": 200,
      "description": "Kept verbatim and never shown to the model (patient and staff names). Up to 200."
    },
    "glossary": {
      "type": "object",
      "additionalProperties": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "description": "English term → required Hebrew rendering. Up to 500 entries."
    },
    "date_order": {
      "type": "string",
      "enum": [
        "MDY",
        "DMY"
      ],
      "default": "MDY",
      "description": "How to read ambiguous numeric dates in the source. US records are MDY."
    },
    "date_style": {
      "type": "string",
      "enum": [
        "hebrew",
        "iso",
        "keep"
      ],
      "default": "hebrew",
      "description": "`hebrew` writes \"4 במרץ 2026\"; `iso` writes 2026-03-04; `keep` leaves unambiguous dates as written (an ambiguous one is still rewritten). A two-digit year is kept as written."
    },
    "bidi": {
      "type": "string",
      "enum": [
        "isolate",
        "none"
      ],
      "default": "isolate",
      "description": "`isolate` wraps English values in Unicode isolates so \"5 mg\" never renders as \"mg 5\". `none` returns plain text."
    },
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 20000,
      "description": "English text, 1 to 20,000 characters. Markdown lists, headings and tables keep their structure. Counts toward the monthly character quota."
    }
  },
  "required": [
    "text"
  ]
}