{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/optum/json-schema/optum-get-claim-format-response-schema.json",
  "title": "GetClaimFormatResponse",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/optum-payersheet-api-openapi.yml#/components/schemas/GetClaimFormatResponse",
  "properties": {
    "claimFormat": {
      "$ref": "#/$defs/JsonClaimFormat"
    }
  },
  "type": "object",
  "$defs": {
    "JsonClaimFormat": {
      "properties": {
        "billingSequence": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]*$",
          "maxLength": 2
        },
        "bin": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]*$",
          "maxLength": 6
        },
        "chainID": {
          "type": "string",
          "pattern": "^[0-9]*$",
          "maxLength": 38
        },
        "code": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]*$",
          "maxLength": 3
        },
        "customer": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]*$",
          "maxLength": 128
        },
        "description": {
          "type": "string",
          "maxLength": 250,
          "format": "ncpdp-alphanumeric"
        },
        "effectiveDate": {
          "type": "string",
          "format": "rxn-date"
        },
        "expirationDate": {
          "type": "string",
          "format": "rxn-date"
        },
        "externalMessageId": {
          "type": "string",
          "pattern": "^[0-9]*$"
        },
        "groupCode": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]*$",
          "maxLength": 15
        },
        "pcn": {
          "type": "string",
          "maxLength": 10,
          "format": "ncpdp-alphanumeric"
        },
        "rems": {
          "type": "string",
          "maxLength": 1,
          "enum": [
            "y",
            "n",
            "Y",
            "N",
            null
          ]
        },
        "siteCode": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]*$",
          "maxLength": 80
        },
        "sourceSystemId": {
          "type": "string",
          "pattern": "^[0-9]*$"
        },
        "transmissions": {
          "items": {
            "$ref": "#/$defs/JsonTransmission"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "JsonFieldGroup": {
      "properties": {
        "fieldGroupId": {
          "format": "int64",
          "type": "integer"
        },
        "fieldIdentifier": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]*$",
          "maxLength": 3
        },
        "fieldNumber": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]*$",
          "maxLength": 4
        },
        "groupCode": {
          "type": "string"
        },
        "maximumCount": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "JsonSegment": {
      "properties": {
        "segmentFields": {
          "items": {
            "$ref": "#/$defs/JsonSegmentField"
          },
          "type": "array"
        },
        "segmentIdentifier": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]*$",
          "maxLength": 32
        },
        "sequence": {
          "format": "int32",
          "type": "integer"
        },
        "usageCode": {
          "type": "string",
          "maxLength": 10,
          "format": "ncpdp-alphanumeric"
        }
      },
      "type": "object"
    },
    "JsonSegmentField": {
      "properties": {
        "customName": {
          "type": "string",
          "maxLength": 250,
          "format": "ncpdp-alphanumeric"
        },
        "customProcessingCode": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]*$",
          "maxLength": 10
        },
        "description": {
          "type": "string",
          "maxLength": 250,
          "format": "ncpdp-alphanumeric"
        },
        "fieldDataType": {
          "type": "string",
          "maxLength": 250,
          "format": "ncpdp-alphanumeric"
        },
        "fieldDataTypeId": {
          "format": "int64",
          "type": "integer"
        },
        "fieldGroups": {
          "items": {
            "$ref": "#/$defs/JsonFieldGroup"
          },
          "type": "array"
        },
        "fieldIdentifier": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]*$",
          "maxLength": 3
        },
        "fieldNumber": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]*$",
          "maxLength": 4
        },
        "fieldType": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]*$",
          "maxLength": 1
        },
        "includeIfNull": {
          "type": "boolean"
        },
        "mantissaSize": {
          "format": "int32",
          "type": "integer"
        },
        "maximumLength": {
          "format": "int32",
          "type": "integer"
        },
        "segmentFieldQualifiers": {
          "items": {
            "$ref": "#/$defs/JsonSegmentFieldQualifier"
          },
          "type": "array"
        },
        "sequence": {
          "format": "int32",
          "type": "integer"
        },
        "usageCode": {
          "type": "string",
          "maxLength": 10,
          "format": "ncpdp-alphanumeric"
        },
        "useIfNull": {
          "type": "string",
          "maxLength": 250,
          "format": "ncpdp-alphanumeric"
        }
      },
      "type": "object"
    },
    "JsonSegmentFieldQualifier": {
      "properties": {
        "qualifierCode": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]*$",
          "maxLength": 10
        },
        "qualifierDescription": {
          "type": "string",
          "maxLength": 250
        },
        "sequence": {
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "JsonTransmission": {
      "properties": {
        "code": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]*$",
          "maxLength": 10
        },
        "segments": {
          "items": {
            "$ref": "#/$defs/JsonSegment"
          },
          "type": "array"
        },
        "standard": {
          "type": "string",
          "maxLength": 2,
          "enum": [
            "D0",
            ""
          ]
        },
        "type": {
          "type": "string",
          "pattern": "^[a-zA-Z0-9]*$",
          "maxLength": 50
        }
      },
      "type": "object"
    }
  }
}