{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "schema:MedicalDevice",
  "title": "MedicalDevice",
  "description": "Any object used in a medical capacity, such as to diagnose or treat a patient.",
  "type": "object",
  "allOf": [
    {
      "description": "The most generic type of entity related to health and the practice of medicine.",
      "$ref": "schema:MedicalEntity"
    }
  ],
  "properties": {
    "adverseOutcome": {
      "description": "A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or otherwise life-threatening or requiring immediate medical attention), tag it as a seriousAdverseOutcome instead.",
      "oneOf": [
        { "$ref": "schema:MedicalEntity" },
        { "type": "array", "items": { "$ref": "schema:MedicalEntity" } }
      ]
    },
    "contraindication": {
      "description": "A contraindication for this therapy.",
      "oneOf": [
        {
          "anyOf": [
            { "type": "string" },
            { "$ref": "schema:MedicalContraindication" }
          ]
        },
        {
          "type": "array",
          "items": {
            "anyOf": [
              { "type": "string" },
              { "$ref": "schema:MedicalContraindication" }
            ]
          }
        }
      ]
    },
    "postOp": {
      "description": "A description of the postoperative procedures, care, and/or followups for this device.",
      "oneOf": [
        { "type": "string" },
        { "type": "array", "items": { "type": "string" } }
      ]
    },
    "preOp": {
      "description": "A description of the workup, testing, and other preparations required before implanting this device.",
      "oneOf": [
        { "type": "string" },
        { "type": "array", "items": { "type": "string" } }
      ]
    },
    "procedure": {
      "description": "A description of the procedure involved in setting up, using, and/or installing the device.",
      "oneOf": [
        { "type": "string" },
        { "type": "array", "items": { "type": "string" } }
      ]
    },
    "seriousAdverseOutcome": {
      "description": "A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition.",
      "oneOf": [
        { "$ref": "schema:MedicalEntity" },
        { "type": "array", "items": { "$ref": "schema:MedicalEntity" } }
      ]
    }
  }
}
