{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/optum/json-schema/optum-ncpdpresponse-converter-v1-response-schema.json",
  "title": "NCPDPResponseConverterV1Response",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/optum-telecom-format-api-openapi.yml#/components/schemas/NCPDPResponseConverterV1Response",
  "properties": {
    "header": {
      "$ref": "#/$defs/HeaderV1"
    },
    "insurance": {
      "$ref": "#/$defs/InsuranceV1"
    },
    "insuranceAdditionalInformation": {
      "$ref": "#/$defs/InsuranceAdditionalInformationV1"
    },
    "patient": {
      "$ref": "#/$defs/PatientV1"
    },
    "responseMessage": {
      "$ref": "#/$defs/MessageV1"
    },
    "transactions": {
      "items": {
        "$ref": "#/$defs/TransactionV1"
      },
      "type": "array"
    }
  },
  "type": "object",
  "$defs": {
    "AdditionalMessageInformationGroupingV1": {
      "properties": {
        "code": {
          "type": "string"
        },
        "continuity": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "ClaimV1": {
      "properties": {
        "preferredProduct": {
          "items": {
            "$ref": "#/$defs/PreferredProductGroupingV1"
          },
          "type": "array"
        },
        "prescriptionServiceReferenceNumberId": {
          "$ref": "#/$defs/IdentifierV1"
        }
      },
      "type": "object"
    },
    "CobOtherPaymentsV1": {
      "properties": {
        "otherPayerId": {
          "items": {
            "$ref": "#/$defs/OtherPayerIdsV1"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "CodeValuePairV1": {
      "properties": {
        "code": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "DurOrPpsV1": {
      "properties": {
        "durPpsResponseCode": {
          "items": {
            "$ref": "#/$defs/DurPpsResponseCodeV1"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "DurPpsResponseCodeV1": {
      "properties": {
        "clinicalSignificanceCode": {
          "type": "string"
        },
        "databaseIndicator": {
          "type": "string"
        },
        "durAdditionalText": {
          "type": "string"
        },
        "durFreeTextMessage": {
          "type": "string"
        },
        "otherPharmacyIndicator": {
          "type": "string"
        },
        "otherPrescriberIndicator": {
          "type": "string"
        },
        "previousDateOfFill": {
          "format": "date",
          "type": "string"
        },
        "quantityOfPreviousFill": {
          "type": "number"
        },
        "reasonForServiceCode": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "HeaderV1": {
      "properties": {
        "chainID": {
          "errorMessage": {
            "format": "invalid value, only printable characters are allowed.",
            "maxLength": "exceeds the maximum limit of 30.",
            "type": "invalid type, expected string."
          },
          "format": "ncpdp-alphanumeric",
          "maxLength": 30,
          "type": "string"
        },
        "dateOfService": {
          "errorMessage": {
            "format": "invalid date.",
            "type": "invalid type."
          },
          "format": "rxn-date",
          "type": "string"
        },
        "externalMessageId": {
          "errorMessage": {
            "maxLength": "exceeds the maximum limit of 30.",
            "pattern": "invalid value, only numeric characters are allowed.",
            "type": "invalid type, expected string."
          },
          "maxLength": 30,
          "pattern": "^[0-9]*$",
          "type": "string"
        },
        "sourceSystemId": {
          "errorMessage": {
            "maxLength": "exceeds the maximum limit of 30.",
            "pattern": "invalid value, only numeric characters are allowed.",
            "type": "invalid type, expected string."
          },
          "maxLength": 30,
          "pattern": "^[0-9]*$",
          "type": "string"
        },
        "standard": {
          "errorMessage": {
            "required": {
              "standardName": "standardName is required.",
              "transactionType": "transactionType is required.",
              "type": "type is required.",
              "versionOrReleaseNumber": "versionOrReleaseNumber is required."
            }
          },
          "properties": {
            "standardName": {
              "enum": [
                "TELECOM",
                ""
              ],
              "errorMessage": {
                "enum": "invalid value, only expected TELECOM.",
                "type": "invalid type, expected string."
              },
              "type": "string"
            },
            "transactionType": {
              "enum": [
                "B1",
                "B2",
                "B3",
                "C1",
                "C2",
                "C3",
                "D1",
                "E1",
                "N1",
                "N2",
                "N3",
                "P1",
                "P2",
                "P3",
                "P4",
                "S1",
                "S2",
                "S3",
                ""
              ],
              "errorMessage": {
                "enum": "invalid value, expected values are B1,B2,B3,C1,C2,C3,D1,E1,N1,N2,N3,P1,P2,P3,P4,S1,S2,S3.",
                "maxLength": "exceeds the maximum limit of 2.",
                "type": "invalid type, expected string."
              },
              "maxLength": 2,
              "type": "string"
            },
            "type": {
              "enum": [
                "request",
                "response",
                ""
              ],
              "errorMessage": {
                "enum": "invalid value, expected values are request or response.",
                "type": "invalid type, expected string."
              },
              "type": "string"
            },
            "versionOrReleaseNumber": {
              "enum": [
                "D0",
                ""
              ],
              "errorMessage": {
                "enum": "invalid value, only expected D0.",
                "maxLength": "exceeds the maximum limit of 2.",
                "type": "invalid type, expected string."
              },
              "maxLength": 2,
              "type": "string"
            }
          },
          "required": [
            "standardName",
            "versionOrReleaseNumber",
            "transactionType",
            "type"
          ],
          "type": "object"
        },
        "transactionCode": {
          "enum": [
            "B1",
            "B2",
            "B3",
            "C1",
            "C2",
            "C3",
            "D1",
            "E1",
            "N1",
            "N2",
            "N3",
            "P1",
            "P2",
            "P3",
            "P4",
            "S1",
            "S2",
            "S3",
            ""
          ],
          "errorMessage": {
            "enum": "invalid value, expected values are B1,B2,B3,C1,C2,C3,D1,E1,N1,N2,N3,P1,P2,P3,P4,S1,S2,S3.",
            "maxLength": "exceeds the maximum limit of 2.",
            "type": "invalid type, expected string."
          },
          "maxLength": 2,
          "type": "string"
        }
      },
      "type": "object"
    },
    "IdentifierV1": {
      "properties": {
        "code": {
          "format": "int32",
          "type": "integer"
        },
        "value": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "InsuranceAdditionalInformationV1": {
      "properties": {
        "benefitId": {
          "type": "string"
        },
        "cmsLowIncomeCostSharingLevel": {
          "type": "string"
        },
        "contractNumber": {
          "type": "string"
        },
        "formularyId": {
          "type": "string"
        },
        "medicarePartDCoverageCode": {
          "type": "string"
        },
        "nextMedicarePartDEffectiveDate": {
          "format": "date",
          "type": "string"
        },
        "nextMedicarePartDExpirationDate": {
          "format": "date",
          "type": "string"
        }
      },
      "type": "object"
    },
    "InsuranceV1": {
      "properties": {
        "cardholderId": {
          "type": "string"
        },
        "groupId": {
          "type": "string"
        },
        "medicaidAgencyNumber": {
          "type": "string"
        },
        "medicaidIdNumber": {
          "type": "string"
        },
        "networkReimbursementId": {
          "type": "string"
        },
        "payerId": {
          "$ref": "#/$defs/IdentifierV1"
        },
        "planId": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "MessageV1": {
      "properties": {
        "message": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "NameV1": {
      "properties": {
        "first": {
          "type": "string"
        },
        "last": {
          "type": "string"
        },
        "middle": {
          "type": "string"
        },
        "prefix": {
          "type": "string"
        },
        "suffix": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "OtherPayerIdsV1": {
      "properties": {
        "otherPayerBenefitEffectiveDate": {
          "format": "date",
          "type": "string"
        },
        "otherPayerBenefitTerminationDate": {
          "format": "date",
          "type": "string"
        },
        "otherPayerCardholderId": {
          "type": "string"
        },
        "otherPayerCoverage": {
          "type": "string"
        },
        "otherPayerGroupId": {
          "type": "string"
        },
        "otherPayerHelpDeskPhoneNumber": {
          "$ref": "#/$defs/PhoneNumber"
        },
        "otherPayerId": {
          "$ref": "#/$defs/IdentifierV1"
        },
        "otherPayerPatientRelationshipCode": {
          "type": "string"
        },
        "otherPayerPersonCode": {
          "type": "string"
        },
        "otherPayerProcessorControlNumber": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "PatientV1": {
      "properties": {
        "dateOfBirth": {
          "format": "date",
          "type": "string"
        },
        "name": {
          "$ref": "#/$defs/NameV1"
        }
      },
      "type": "object"
    },
    "PhoneNumber": {
      "properties": {
        "countryCode": {
          "format": "int32",
          "type": "integer"
        },
        "countryCodeSource": {
          "enum": [
            "FROM_NUMBER_WITH_PLUS_SIGN",
            "FROM_NUMBER_WITH_IDD",
            "FROM_NUMBER_WITHOUT_PLUS_SIGN",
            "FROM_DEFAULT_COUNTRY",
            "UNSPECIFIED"
          ],
          "type": "string"
        },
        "extension": {
          "type": "string"
        },
        "italianLeadingZero": {
          "type": "boolean"
        },
        "nationalNumber": {
          "format": "int64",
          "type": "integer"
        },
        "numberOfLeadingZeros": {
          "format": "int32",
          "type": "integer"
        },
        "preferredDomesticCarrierCode": {
          "type": "string"
        },
        "rawInput": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "PreferredProductGroupingV1": {
      "properties": {
        "costShareIncentive": {
          "type": "number"
        },
        "description": {
          "type": "string"
        },
        "incentive": {
          "type": "number"
        },
        "productId": {
          "$ref": "#/$defs/IdentifierV1"
        }
      },
      "type": "object"
    },
    "PricingV1": {
      "properties": {
        "accumulatedDeductibleAmount": {
          "type": "number"
        },
        "amountAppliedToPeriodicDeductible": {
          "type": "number"
        },
        "amountAttributedToCoverageGap": {
          "type": "number"
        },
        "amountAttributedToProcessorFee": {
          "type": "number"
        },
        "amountAttributedToProductSelectionOrBrandDrug": {
          "type": "number"
        },
        "amountAttributedToProductSelectionOrBrandNonPrefferedFormularySelection": {
          "type": "number"
        },
        "amountAttributedToProductSelectionOrNonPrefferedFormularySelection": {
          "type": "number"
        },
        "amountAttributedToProviderNetwork": {
          "type": "number"
        },
        "amountAttributedToSalesTax": {
          "type": "number"
        },
        "amountExceedingPeriodicBenefitMaximum": {
          "type": "number"
        },
        "amountOfCoinsurance": {
          "type": "number"
        },
        "amountOfCopay": {
          "type": "number"
        },
        "basisOfCalculationCoinsurance": {
          "type": "string"
        },
        "basisOfCalculationCopay": {
          "type": "string"
        },
        "basisOfCalculationDispensingFee": {
          "type": "string"
        },
        "basisOfCalculationFlatSalesTax": {
          "type": "string"
        },
        "basisOfCalculationPercentageSalesTax": {
          "type": "string"
        },
        "basisOfReimbursementDetermination": {
          "type": "string"
        },
        "benefitStage": {
          "items": {
            "$ref": "#/$defs/CodeValuePairV1"
          },
          "type": "array"
        },
        "dispensingFeeContractedOrReimbursableAmount": {
          "type": "number"
        },
        "dispensingFeePaid": {
          "type": "number"
        },
        "estimatedGenericSavings": {
          "type": "number"
        },
        "flatSalesTaxAmountPaid": {
          "type": "number"
        },
        "healthPlanFundedAssistanceAmount": {
          "type": "number"
        },
        "incentiveAmountPaid": {
          "type": "number"
        },
        "ingredientCostContractedOrReimbursableAmount": {
          "type": "number"
        },
        "ingredientCostPaid": {
          "type": "number"
        },
        "otherAmountPaid": {
          "items": {
            "$ref": "#/$defs/CodeValuePairV1"
          },
          "type": "array"
        },
        "otherPayerAmountRecognized": {
          "type": "number"
        },
        "patientPayAmount": {
          "type": "number"
        },
        "patientRegulatoryFeeAmount": {
          "type": "number"
        },
        "patientSalesTaxAmount": {
          "type": "number"
        },
        "percentageSalesTaxAmountPaid": {
          "type": "number"
        },
        "percentageSalesTaxBasisPaid": {
          "type": "string"
        },
        "percentageSalesTaxRatePaid": {
          "type": "number"
        },
        "percentageTaxExemptIndicator": {
          "type": "string"
        },
        "planSalesTaxAmount": {
          "type": "number"
        },
        "professionalServiceFeePaid": {
          "type": "number"
        },
        "remainingBenefitAmount": {
          "type": "number"
        },
        "remainingDeductibleAmount": {
          "type": "number"
        },
        "spendingAccountAmountRemaining": {
          "type": "number"
        },
        "totalAmountPaid": {
          "type": "number"
        }
      },
      "type": "object"
    },
    "RejectDetailsV1": {
      "properties": {
        "code": {
          "type": "string"
        },
        "fieldOccurrenceIndicator": {
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "StatusV1": {
      "properties": {
        "additionalMessageInformation": {
          "items": {
            "$ref": "#/$defs/AdditionalMessageInformationGroupingV1"
          },
          "type": "array"
        },
        "additionalMessageInformationCount": {
          "type": "string"
        },
        "approvedMessageCode": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "approvedMessageCodeCount": {
          "type": "string"
        },
        "authorizationNumber": {
          "type": "string"
        },
        "helpDeskTelephone": {
          "$ref": "#/$defs/IdentifierV1"
        },
        "internalControlNumber": {
          "type": "string"
        },
        "rejectDetails": {
          "items": {
            "$ref": "#/$defs/RejectDetailsV1"
          },
          "type": "array"
        },
        "transactionReferenceNumber": {
          "type": "string"
        },
        "transactionResponseStatus": {
          "type": "string"
        },
        "url": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "TransactionV1": {
      "properties": {
        "dur": {
          "$ref": "#/$defs/DurOrPpsV1"
        },
        "payment": {
          "$ref": "#/$defs/CobOtherPaymentsV1"
        },
        "prescription": {
          "$ref": "#/$defs/ClaimV1"
        },
        "pricing": {
          "$ref": "#/$defs/PricingV1"
        },
        "status": {
          "$ref": "#/$defs/StatusV1"
        }
      },
      "type": "object"
    }
  }
}