{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mednode-in/json-schema/mednode-in-prescription-full-update-request-schema.json",
  "title": "PrescriptionFullUpdateRequest",
  "description": "Full update of a prescription — all fields optional.",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mednode-in-openapi.json#/components/schemas/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": "#/$defs/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",
  "$defs": {
    "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"
    }
  }
}