{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/optum/json-schema/optum-apc-calculator-request-schema.json",
  "title": "ApcCalculatorRequest",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/optum-apc-calculator-apis-api-openapi.yml#/components/schemas/ApcCalculatorRequest",
  "required": [
    "dxCode",
    "dxCodeType",
    "fromDateStr",
    "gender",
    "provider",
    "thruDateStr"
  ],
  "type": "object",
  "properties": {
    "provider": {
      "maxLength": 2147483647,
      "minLength": 1,
      "type": "string",
      "description": "Terms to search for"
    },
    "fromDateStr": {
      "type": "string"
    },
    "thruDateStr": {
      "type": "string"
    },
    "gender": {
      "pattern": "^([MFUI])$",
      "type": "string"
    },
    "age": {
      "pattern": "^\\d{1,3}$",
      "type": "string"
    },
    "zipCode": {
      "pattern": "^(\\d{1,5}|)$",
      "type": "string"
    },
    "dxCode": {
      "type": "string"
    },
    "dxCodeType": {
      "pattern": "^(icd9|icd10)$",
      "type": "string"
    },
    "tobCode": {
      "pattern": "^(.{0,4}|)$",
      "type": "string"
    },
    "conditionCode": {
      "pattern": "^(.{1,2}|)$",
      "type": "string"
    },
    "claimLineList": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ClaimLine"
      }
    }
  },
  "$defs": {
    "ClaimLine": {
      "type": "object",
      "properties": {
        "cptHcpcs": {
          "type": "string"
        },
        "unit": {
          "type": "string"
        },
        "revCode": {
          "type": "string"
        },
        "modifiers": {
          "type": "string"
        },
        "dateStr": {
          "type": "string"
        },
        "charge": {
          "type": "string"
        },
        "cptHcpcsDesc": {
          "type": "string"
        }
      }
    }
  }
}