{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/optum/json-schema/optum-code-schema.json",
  "title": "Code",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/optum-code-information-apis-api-openapi.yml#/components/schemas/Code",
  "type": "object",
  "properties": {
    "codeType": {
      "type": "string"
    },
    "shortDescription": {
      "type": "string"
    },
    "fullDescription": {
      "type": "string"
    },
    "fullDictionaryTerms": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "image": {
      "$ref": "#/$defs/Link"
    },
    "edits": {
      "uniqueItems": true,
      "type": "array",
      "items": {
        "$ref": "#/$defs/Link"
      }
    },
    "notes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Link"
      }
    },
    "prev": {
      "$ref": "#/$defs/Link"
    },
    "next": {
      "$ref": "#/$defs/Link"
    },
    "pcsChar1Description": {
      "type": "string"
    },
    "pcsChar2Description": {
      "type": "string"
    },
    "pcsChar3Description": {
      "type": "string"
    },
    "codes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Code"
      }
    },
    "codeNote": {
      "type": "string"
    },
    "codeStatus": {
      "type": "string",
      "enum": [
        "ACTIVE",
        "DELETED",
        "INVALID"
      ]
    },
    "indent1": {
      "type": "integer",
      "format": "int32"
    },
    "indent2": {
      "type": "integer",
      "format": "int32"
    },
    "codeInfo": {
      "type": "string"
    },
    "mappingInformation": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Link"
      }
    },
    "backwardMappingCodes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "references": {
      "uniqueItems": true,
      "type": "array",
      "items": {
        "$ref": "#/$defs/Link"
      }
    },
    "billedTogether": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CodeGroup"
      }
    },
    "favorite": {
      "type": "boolean"
    },
    "nonBillable": {
      "type": "boolean"
    },
    "nextCode": {
      "type": "boolean"
    },
    "code": {
      "type": "string"
    }
  },
  "$defs": {
    "Code": {
      "type": "object",
      "properties": {
        "codeType": {
          "type": "string"
        },
        "shortDescription": {
          "type": "string"
        },
        "fullDescription": {
          "type": "string"
        },
        "fullDictionaryTerms": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "image": {
          "$ref": "#/$defs/Link"
        },
        "edits": {
          "uniqueItems": true,
          "type": "array",
          "items": {
            "$ref": "#/$defs/Link"
          }
        },
        "notes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Link"
          }
        },
        "prev": {
          "$ref": "#/$defs/Link"
        },
        "next": {
          "$ref": "#/$defs/Link"
        },
        "pcsChar1Description": {
          "type": "string"
        },
        "pcsChar2Description": {
          "type": "string"
        },
        "pcsChar3Description": {
          "type": "string"
        },
        "codes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Code"
          }
        },
        "codeNote": {
          "type": "string"
        },
        "codeStatus": {
          "type": "string",
          "enum": [
            "ACTIVE",
            "DELETED",
            "INVALID"
          ]
        },
        "indent1": {
          "type": "integer",
          "format": "int32"
        },
        "indent2": {
          "type": "integer",
          "format": "int32"
        },
        "codeInfo": {
          "type": "string"
        },
        "mappingInformation": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Link"
          }
        },
        "backwardMappingCodes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "references": {
          "uniqueItems": true,
          "type": "array",
          "items": {
            "$ref": "#/$defs/Link"
          }
        },
        "billedTogether": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/CodeGroup"
          }
        },
        "favorite": {
          "type": "boolean"
        },
        "nonBillable": {
          "type": "boolean"
        },
        "nextCode": {
          "type": "boolean"
        },
        "code": {
          "type": "string"
        }
      }
    },
    "CodeGroup": {
      "type": "object",
      "properties": {
        "codes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "desc": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "Link": {
      "type": "object",
      "properties": {
        "value": {
          "type": "string"
        },
        "href": {
          "type": "string"
        },
        "iconName": {
          "type": "string"
        },
        "routerLink": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "tag": {
          "type": "string"
        },
        "label": {
          "type": "string"
        },
        "addonName": {
          "type": "string"
        },
        "addonId": {
          "type": "string"
        }
      }
    }
  }
}