# frozen_string_literal: true
module Stupidedi
  module TransactionSets
    module FiftyTen
      module Implementations
        module X223A2
          b = Builder
          d = Schema
          r = SegmentReqs
          e = ElementReqs
          s = SegmentDefs

          loop2300 =
            d::LoopDef.build("2300 CLAIM INFORMATION", d::RepeatCount.bounded(100),
                b::Segment(1300, s::CLM, "Claim Information", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Patient Control Number", b::MaxLength(20)),
                  b::Element(e::Required,    "Total Claim Charge Amount"),
                  b::Element(e::NotUsed,     "Claim Filing Indicator Code"),
                  b::Element(e::NotUsed,     "Non-Institutional Claim Type Code"),
                  b::Element(e::Required,    "HEALTH CARE SERVICE LOCATION INFORMATION",
                    b::Element(e::Required,    "Facility Type Code"),
                    b::Element(e::Required,    "Facility Code Qualifier", b::Values("A")),
                    b::Element(e::Required,    "Claim Frequency Code")),
                  b::Element(e::NotUsed,     "Yes/No Condition or Response Code"),
                  b::Element(e::Required,    "Assignment or Plan Participation Code", b::Values("A", "B", "C")),
                  b::Element(e::Required,    "Benefits Assignment Certification Indicator", b::Values("N", "W", "Y")),
                  b::Element(e::Required,    "Release of Information Code", b::Values("I", "Y")),
                  b::Element(e::NotUsed,     "Patient Signature Source Code"),
                  b::Element(e::NotUsed,     "RELATED CAUSES INFORMATION"),
                  b::Element(e::NotUsed,     "Special Program Code"),
                  b::Element(e::NotUsed,     "Yes/No Condition or Response Code"),
                  b::Element(e::NotUsed,     "Level of Service Code"),
                  b::Element(e::NotUsed,     "Yes/No Condition or Response Code"),
                  b::Element(e::NotUsed,     "Provider Agreement Code"),
                  b::Element(e::NotUsed,     "Claim Status Code"),
                  b::Element(e::NotUsed,     "Yes/No Condition or Response Code"),
                  b::Element(e::NotUsed,     "Claim Submission Reason Code"),
                  b::Element(e::Situational,   "Delay Reason Code", b::Values("1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "15"))),
                b::Segment(1350, s::DTP, "Discharge Hour", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Date Time Qualifier", b::Values("096")),
                  b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("TM")),
                  b::Element(e::Required,    "Discharge Time")),
                b::Segment(1350, s::DTP, "Statement Dates", r::Required, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Date Time Qualifier", b::Values("434")),
                  b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("RD8")),
                  b::Element(e::Required,    "Statement From and To Date")),
                b::Segment(1350, s::DTP, "Admission Date/Hour", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Date Time Qualifier", b::Values("435")),
                  b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8", "DT")),
                  b::Element(e::Required,    "Admission Date and Hour")),
                b::Segment(1350, s::DTP, "Date - Repricer Received Date", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Date Time Qualifier", b::Values("050")),
                  b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                  b::Element(e::Required,    "Repricer Received Date")),
                b::Segment(1400, s::CL1, "Institutional Claim Code", r::Required, d::RepeatCount.bounded(1),
                  b::Element(e::Required,      "Admission Type Code"),
                  b::Element(e::Situational,   "Admission Source Code"),
                  b::Element(e::Required,    "Patient Status Code"),
                  b::Element(e::NotUsed,     "Nursing Home Residential Status Code")),
                b::Segment(1550, s::PWK, "Claim Supplemental Information", r::Situational, d::RepeatCount.bounded(10),
                  b::Element(e::Required,    "Report Type Code", b::Values("03", "04", "05", "06", "07", "08", "09", "10", "11", "13", "15", "21", "A3", "A4", "AM", "AS", "B2", "B3", "B4", "BR", "BS", "BT", "CB", "CK", "CT", "D2", "DA", "DB", "DG", "DJ", "DS", "EB", "HC", "HR", "I5", "IR", "LA", "M1", "MT", "NN", "OB", "OC", "OD", "OE", "OX", "OZ", "P4", "P5", "PE", "PN", "PO", "PQ", "PY", "PZ", "RB", "RR", "RT", "RX", "SG", "V5", "XP")),
                  b::Element(e::Required,    "Attachment Transmission Code", b::Values("AA", "BM", "EL", "EM", "FT", "FX")),
                  b::Element(e::NotUsed,     "Report Copies Needed"),
                  b::Element(e::NotUsed,     "Entity Identifier Code"),
                  b::Element(e::Situational,   "Identification Code Qualifier", b::Values("AC")),
                  b::Element(e::Situational,   "Attachment Control Number", b::MaxLength(50)),
                  b::Element(e::NotUsed,     "Description"),
                  b::Element(e::NotUsed,     "ACTIONS INDICATED"),
                  b::Element(e::NotUsed,     "Request Category Code")),
                b::Segment(1600, s::CN1, "Contract Information", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Contract Type Code", b::Values("01", "02", "03", "04", "05", "06", "09")),
                  b::Element(e::Situational,   "Contract Amount"),
                  b::Element(e::Situational,   "Contract Percentage"),
                  b::Element(e::Situational,   "Contract Code"),
                  b::Element(e::Situational,   "Terms Discount Percentage"),
                  b::Element(e::Situational,   "Contract Version Identifier")),
                b::Segment(1750, s::AMT, "Patient Estimated Amount Due", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Amount Qualifier Code", b::Values("F3")),
                  b::Element(e::Required,    "Patient Responsibility Amount"),
                  b::Element(e::NotUsed,     "Credit/Debit Flag Code")),
                b::Segment(1800, s::REF, "Service Authorization Exception Code", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Reference Identification Qualifier", b::Values("4N")),
                  b::Element(e::Required,    "Service Authorization Exception Code", b::Values("1", "2", "3", "4", "5", "6", "7")),
                  b::Element(e::NotUsed,     "Description"),
                  b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                b::Segment(1800, s::REF, "Referral Number", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Reference Identification Qualifier", b::Values("9F")),
                  b::Element(e::Required,    "Referral Number"),
                  b::Element(e::NotUsed,     "Description"),
                  b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                b::Segment(1800, s::REF, "Prior Authorization", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Reference Identification Qualifier", b::Values("G1")),
                  b::Element(e::Required,    "Prior Authorization Number"),
                  b::Element(e::NotUsed,     "Description"),
                  b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                b::Segment(1800, s::REF, "Payer Claim Control Number", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Reference Identification Qualifier", b::Values("F8")),
                  b::Element(e::Required,    "Payer Claim Control Number"),
                  b::Element(e::NotUsed,     "Description"),
                  b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                b::Segment(1800, s::REF, "Repriced Claim Number", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Reference Identification Qualifier", b::Values("9A")),
                  b::Element(e::Required,    "Repriced Claim Reference Number"),
                  b::Element(e::NotUsed,     "Description"),
                  b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                b::Segment(1800, s::REF, "Adjusted Repriced Claim Number", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Reference Identification Qualifier", b::Values("9C")),
                  b::Element(e::Required,    "Adjusted Repriced Claim Reference Number"),
                  b::Element(e::NotUsed,     "Description"),
                  b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                b::Segment(1800, s::REF, "Investigational Device Exemption Number", r::Situational, d::RepeatCount.bounded(5),
                  b::Element(e::Required,    "Reference Identification Qualifier", b::Values("LX")),
                  b::Element(e::Required,    "Investigational Device Exemption Identifier"),
                  b::Element(e::NotUsed,     "Description"),
                  b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                b::Segment(1800, s::REF, "Claim Identifier for Transmission Intermediaries", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Reference Identification Qualifier", b::Values("D9")),
                  b::Element(e::Required,    "Value Added Network Trace Number", b::MaxLength(20)),
                  b::Element(e::NotUsed,     "Description"),
                  b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                b::Segment(1800, s::REF, "Auto Accident State", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Reference Identification Qualifier", b::Values("LU")),
                  b::Element(e::Required,    "Auto Accident State or Province Code"),
                  b::Element(e::NotUsed,     "Description"),
                  b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                b::Segment(1800, s::REF, "Medical Record Number", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Reference Identification Qualifier", b::Values("EA")),
                  b::Element(e::Required,    "Medical Record Number"),
                  b::Element(e::NotUsed,     "Description"),
                  b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                b::Segment(1800, s::REF, "Demonstration Project Identifier", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Reference Identification Qualifier", b::Values("P4")),
                  b::Element(e::Required,    "Demonstration Project Identifier"),
                  b::Element(e::NotUsed,     "Description"),
                  b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                b::Segment(1800, s::REF, "Peer Review Organization (PRO) Approval Number", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Reference Identification Qualifier", b::Values("G4")),
                  b::Element(e::Required,    "Peer Review Authorization Number"),
                  b::Element(e::NotUsed,     "Description"),
                  b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                b::Segment(1850, s::K3, "File Information", r::Situational, d::RepeatCount.bounded(10),
                  b::Element(e::Required,    "Fixed Format Information"),
                  b::Element(e::NotUsed,     "Record Format Code"),
                  b::Element(e::NotUsed,     "COMPOSITE UNIT OF MEASURE")),
                b::Segment(1900, s::NTE, "Claim Note", r::Situational, d::RepeatCount.bounded(10),
                  b::Element(e::Required,    "Note Reference Code", b::Values("ALG", "DCP", "DGN", "DME", "MED", "NTR", "ODT", "RHB", "RLH", "RNH", "SET", "SFM", "SPT", "UPI")),
                  b::Element(e::Required,    "Claim Note Text")),
                b::Segment(1900, s::NTE, "Billing Note", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Note Reference Code", b::Values("ADD")),
                  b::Element(e::Required,    "Billing Note Text")),
                b::Segment(2200, s::CRC, "EPSDT Referral", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Code Category", b::Values("ZZ")),
                  b::Element(e::Required,    "Certification Condition Indicator", b::Values("Y", "N")),
                  b::Element(e::Required,    "Condition Code", b::Values("AV", "NU", "S2", "ST")),
                  b::Element(e::Situational, "Condition Code", b::Values("AV", "NU", "S2", "ST")),
                  b::Element(e::Situational, "Condition Code", b::Values("AV", "NU", "S2", "ST")),
                  b::Element(e::NotUsed,     "Condition Indicator"),
                  b::Element(e::NotUsed,     "Condition Indicator")),
                b::Segment(2310, s::HI, "Principal Diagnosis", r::Required, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABK", "BK")),
                    b::Element(e::Required,    "Principal Diagnosis Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Yes/No Condition or Response Code", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION")),
                b::Segment(2310, s::HI, "Admitting Diagnosis", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABJ", "BJ")),
                    b::Element(e::Required,    "Admitting Diagnosis Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION")),
                b::Segment(2310, s::HI, "Patient's Reason For Visit", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("APR", "PR")),
                    b::Element(e::Required,    "Patient Reason For Visit"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("APR", "PR")),
                    b::Element(e::Required,    "Patient Reason For Visit"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("APR", "PR")),
                    b::Element(e::Required,    "Patient Reason For Visit"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION")),
                b::Segment(2310, s::HI, "External Cause of Injury", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABN", "BN")),
                    b::Element(e::Required,    "External Cause of Injury Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABN", "BN")),
                    b::Element(e::Required,    "External Cause of Injury Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABN", "BN")),
                    b::Element(e::Required,    "External Cause of Injury Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABN", "BN")),
                    b::Element(e::Required,    "External Cause of Injury Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABN", "BN")),
                    b::Element(e::Required,    "External Cause of Injury Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABN", "BN")),
                    b::Element(e::Required,    "External Cause of Injury Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABN", "BN")),
                    b::Element(e::Required,    "External Cause of Injury Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABN", "BN")),
                    b::Element(e::Required,    "External Cause of Injury Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABN", "BN")),
                    b::Element(e::Required,    "External Cause of Injury Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABN", "BN")),
                    b::Element(e::Required,    "External Cause of Injury Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABN", "BN")),
                    b::Element(e::Required,    "External Cause of Injury Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABN", "BN")),
                    b::Element(e::Required,    "External Cause of Injury Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y")))),
                b::Segment(2310, s::HI, "Diagnosis Related Group (DRG) Information", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("DR")),
                    b::Element(e::Required,    "Diagnosis Related Group (DRG) Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION")),
                b::Segment(2310, s::HI, "Other Diagnosis Information", r::Situational, d::RepeatCount.bounded(2),
                  b::Element(e::Required,    "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABF", "BF")),
                    b::Element(e::Required,    "Other Diagnosis"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABF", "BF")),
                    b::Element(e::Required,    "Other Diagnosis"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABF", "BF")),
                    b::Element(e::Required,    "Other Diagnosis"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABF", "BF")),
                    b::Element(e::Required,    "Other Diagnosis"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABF", "BF")),
                    b::Element(e::Required,    "Other Diagnosis"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABF", "BF")),
                    b::Element(e::Required,    "Other Diagnosis"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABF", "BF")),
                    b::Element(e::Required,    "Other Diagnosis"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABF", "BF")),
                    b::Element(e::Required,    "Other Diagnosis"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABF", "BF")),
                    b::Element(e::Required,    "Other Diagnosis"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABF", "BF")),
                    b::Element(e::Required,    "Other Diagnosis"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABF", "BF")),
                    b::Element(e::Required,    "Other Diagnosis"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y"))),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("ABF", "BF")),
                    b::Element(e::Required,    "Other Diagnosis"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::Situational, "Present on Admission Indicator", b::Values("N", "U", "W", "Y")))),
                b::Segment(2310, s::HI, "Principal Procedure Information", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BBR", "BR", "CAH")),
                    b::Element(e::Required,    "Principal Procedure Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Principal Procedure Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION"),
                  b::Element(e::NotUsed,     "HEALTH CARE CODE INFORMATION")),
                b::Segment(2310, s::HI, "Other Procedure Information", r::Situational, d::RepeatCount.bounded(2),
                  b::Element(e::Required,    "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BBQ", "BQ")),
                    b::Element(e::Required,    "Procedure Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Procedure Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BBQ", "BQ")),
                    b::Element(e::Required,    "Procedure Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Procedure Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BBQ", "BQ")),
                    b::Element(e::Required,    "Procedure Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Procedure Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BBQ", "BQ")),
                    b::Element(e::Required,    "Procedure Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Procedure Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BBQ", "BQ")),
                    b::Element(e::Required,    "Procedure Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Procedure Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BBQ", "BQ")),
                    b::Element(e::Required,    "Procedure Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Procedure Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BBQ", "BQ")),
                    b::Element(e::Required,    "Procedure Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Procedure Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BBQ", "BQ")),
                    b::Element(e::Required,    "Procedure Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Procedure Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BBQ", "BQ")),
                    b::Element(e::Required,    "Procedure Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Procedure Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BBQ", "BQ")),
                    b::Element(e::Required,    "Procedure Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Procedure Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BBQ", "BQ")),
                    b::Element(e::Required,    "Procedure Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Procedure Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BBQ", "BQ")),
                    b::Element(e::Required,    "Procedure Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Procedure Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code"))),
                b::Segment(2310, s::HI, "Occurrence Span Information", r::Situational, d::RepeatCount.bounded(2),
                  b::Element(e::Required,    "HEALTH CLAIM CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BI")),
                    b::Element(e::Required,    "Occurrence Span Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("RD8")),
                    b::Element(e::Required,    "Occurrence Span Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CLAIM CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BI")),
                    b::Element(e::Required,    "Occurrence Span Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("RD8")),
                    b::Element(e::Required,    "Occurrence Span Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CLAIM CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BI")),
                    b::Element(e::Required,    "Occurrence Span Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("RD8")),
                    b::Element(e::Required,    "Occurrence Span Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CLAIM CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BI")),
                    b::Element(e::Required,    "Occurrence Span Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("RD8")),
                    b::Element(e::Required,    "Occurrence Span Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CLAIM CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BI")),
                    b::Element(e::Required,    "Occurrence Span Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("RD8")),
                    b::Element(e::Required,    "Occurrence Span Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CLAIM CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BI")),
                    b::Element(e::Required,    "Occurrence Span Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("RD8")),
                    b::Element(e::Required,    "Occurrence Span Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CLAIM CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BI")),
                    b::Element(e::Required,    "Occurrence Span Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("RD8")),
                    b::Element(e::Required,    "Occurrence Span Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CLAIM CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BI")),
                    b::Element(e::Required,    "Occurrence Span Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("RD8")),
                    b::Element(e::Required,    "Occurrence Span Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CLAIM CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BI")),
                    b::Element(e::Required,    "Occurrence Span Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("RD8")),
                    b::Element(e::Required,    "Occurrence Span Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CLAIM CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BI")),
                    b::Element(e::Required,    "Occurrence Span Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("RD8")),
                    b::Element(e::Required,    "Occurrence Span Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CLAIM CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BI")),
                    b::Element(e::Required,    "Occurrence Span Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("RD8")),
                    b::Element(e::Required,    "Occurrence Span Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CLAIM CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BI")),
                    b::Element(e::Required,    "Occurrence Span Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("RD8")),
                    b::Element(e::Required,    "Occurrence Span Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code"))),
                b::Segment(2310, s::HI, "Occurrence Information", r::Situational, d::RepeatCount.bounded(2),
                  b::Element(e::Required,    "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BH")),
                    b::Element(e::Required,    "Occurrence Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Occurrence Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industy Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BH")),
                    b::Element(e::Required,    "Occurrence Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Occurrence Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industy Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BH")),
                    b::Element(e::Required,    "Occurrence Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Occurrence Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industy Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BH")),
                    b::Element(e::Required,    "Occurrence Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Occurrence Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industy Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BH")),
                    b::Element(e::Required,    "Occurrence Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Occurrence Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industy Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BH")),
                    b::Element(e::Required,    "Occurrence Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Occurrence Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industy Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BH")),
                    b::Element(e::Required,    "Occurrence Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Occurrence Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industy Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BH")),
                    b::Element(e::Required,    "Occurrence Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Occurrence Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industy Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BH")),
                    b::Element(e::Required,    "Occurrence Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Occurrence Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industy Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BH")),
                    b::Element(e::Required,    "Occurrence Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Occurrence Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industy Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BH")),
                    b::Element(e::Required,    "Occurrence Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Occurrence Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industy Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BH")),
                    b::Element(e::Required,    "Occurrence Code"),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Occurrence Code Date"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industy Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code"))),
                b::Segment(2310, s::HI, "Value Information", r::Situational, d::RepeatCount.bounded(2),
                  b::Element(e::Required,    "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BE")),
                    b::Element(e::Required,    "Value Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::Required,    "Value Code Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BE")),
                    b::Element(e::Required,    "Value Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::Required,    "Value Code Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BE")),
                    b::Element(e::Required,    "Value Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::Required,    "Value Code Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BE")),
                    b::Element(e::Required,    "Value Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::Required,    "Value Code Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BE")),
                    b::Element(e::Required,    "Value Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::Required,    "Value Code Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BE")),
                    b::Element(e::Required,    "Value Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::Required,    "Value Code Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BE")),
                    b::Element(e::Required,    "Value Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::Required,    "Value Code Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BE")),
                    b::Element(e::Required,    "Value Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::Required,    "Value Code Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BE")),
                    b::Element(e::Required,    "Value Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::Required,    "Value Code Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BE")),
                    b::Element(e::Required,    "Value Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::Required,    "Value Code Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BE")),
                    b::Element(e::Required,    "Value Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::Required,    "Value Code Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BE")),
                    b::Element(e::Required,    "Value Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::Required,    "Value Code Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code"))),
                b::Segment(2310, s::HI, "Condition Information", r::Situational, d::RepeatCount.bounded(2),
                  b::Element(e::Required,    "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BG")),
                    b::Element(e::Required,    "Condition Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BG")),
                    b::Element(e::Required,    "Condition Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BG")),
                    b::Element(e::Required,    "Condition Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BG")),
                    b::Element(e::Required,    "Condition Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BG")),
                    b::Element(e::Required,    "Condition Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BG")),
                    b::Element(e::Required,    "Condition Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BG")),
                    b::Element(e::Required,    "Condition Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BG")),
                    b::Element(e::Required,    "Condition Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BG")),
                    b::Element(e::Required,    "Condition Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BG")),
                    b::Element(e::Required,    "Condition Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BG")),
                    b::Element(e::Required,    "Condition Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("BG")),
                    b::Element(e::Required,    "Condition Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code"))),
                b::Segment(2310, s::HI, "Treatment Code Information", r::Situational, d::RepeatCount.bounded(2),
                  b::Element(e::Required,    "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("TC")),
                    b::Element(e::Required,    "Treatment Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("TC")),
                    b::Element(e::Required,    "Treatment Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("TC")),
                    b::Element(e::Required,    "Treatment Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("TC")),
                    b::Element(e::Required,    "Treatment Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("TC")),
                    b::Element(e::Required,    "Treatment Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("TC")),
                    b::Element(e::Required,    "Treatment Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("TC")),
                    b::Element(e::Required,    "Treatment Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("TC")),
                    b::Element(e::Required,    "Treatment Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("TC")),
                    b::Element(e::Required,    "Treatment Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("TC")),
                    b::Element(e::Required,    "Treatment Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("TC")),
                    b::Element(e::Required,    "Treatment Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),
                  b::Element(e::Situational, "HEALTH CARE CODE INFORMATION",
                    b::Element(e::Required,    "Code List Qualifier Code", b::Values("TC")),
                    b::Element(e::Required,    "Treatment Code"),
                    b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                    b::Element(e::NotUsed,     "Date Time Period"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Version Identifier"),
                    b::Element(e::NotUsed,     "Industry Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code"))),
                b::Segment(2410, s::HCP, "Claim Pricing/Repricing Information", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Pricing Methodology", b::Values("00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14")),
                  b::Element(e::Required,    "Repriced Allowed Amount"),
                  b::Element(e::Situational, "Repriced Saving Amount"),
                  b::Element(e::Situational, "Repricing Organization Identifier"),
                  b::Element(e::Situational, "Repricing Per Diem or Flat Rate Amount"),
                  b::Element(e::Situational, "Repriced Approved DRG Code"),
                  b::Element(e::Situational, "Repriced Approved Amount"),
                  b::Element(e::Situational, "Repriced Approved Revenue Code"),
                  b::Element(e::NotUsed,     "Product/Service Qualifier"),
                  b::Element(e::NotUsed,     "Product/Service ID"),
                  b::Element(e::Situational, "Unit or Basis of Measurement Code", b::Values("DA", "UN")),
                  b::Element(e::Situational, "Repriced Approved Service Unit Count"),
                  b::Element(e::Situational, "Reject Reason Code", b::Values("T1", "T2", "T3", "T4", "T5", "T6")),
                  b::Element(e::Situational, "Policy Compliance Code", b::Values("1", "2", "3", "4", "5")),
                  b::Element(e::Situational, "Exception Code", b::Values("1", "2", "3", "4", "5", "6"))),

                d::LoopDef.build("2310A ATTENDING PROVIDER NAME", d::RepeatCount.bounded(1),
                  b::Segment(2500, s::NM1, "Attending Provider Name", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Entity Identifier Code", b::Values("71")),
                    b::Element(e::Required,    "Entity Type Qualifier", b::Values("1")),
                    b::Element(e::Required,    "Attending Provider Last Name"),
                    b::Element(e::Situational, "Attending Provider First Name"),
                    b::Element(e::Situational, "Attending Provider Middle Name or Initial"),
                    b::Element(e::NotUsed,     "Name Prefix"),
                    b::Element(e::Situational, "Attending Provider Name Suffix"),
                    b::Element(e::Situational, "Identification Code Qualifier", b::Values("XX")),
                    b::Element(e::Situational, "Attending Provider Primary Identifier"),
                    b::Element(e::NotUsed,     "Entity Relationship Code"),
                    b::Element(e::NotUsed,     "Entity Identifier Code"),
                    b::Element(e::NotUsed,     "Name Last or Organization Name")),
                  b::Segment(2550, s::PRV, "Attending Provider Specialty Information", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Provider Code", b::Values("AT")),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("PXC")),
                    b::Element(e::Required,    "Provider Taxonomy Code"),
                    b::Element(e::NotUsed,     "State or Province Code"),
                    b::Element(e::NotUsed,     "PROVIDER SPECIALITY INFORMATION"),
                    b::Element(e::NotUsed,     "Provider Organization Code")),
                  b::Segment(2710, s::REF, "Attending Provider Secondary Information", r::Situational, d::RepeatCount.bounded(3),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("0B", "1G", "G2")),
                    b::Element(e::Required,    "Referring Provider Secondary Identifier"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                d::LoopDef.build("2310B OPERATING PHYSICIAN NAME", d::RepeatCount.bounded(1),
                  b::Segment(2500, s::NM1, "Operating Physician Name", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Entity Identifier Code", b::Values("72")),
                    b::Element(e::Required,    "Entity Type Qualifier", b::Values("1")),
                    b::Element(e::Required,    "Attending Provider Last Name"),
                    b::Element(e::Situational, "Attending Provider First Name"),
                    b::Element(e::Situational, "Attending Provider Middle Name or Initial"),
                    b::Element(e::NotUsed,     "Name Prefix"),
                    b::Element(e::Situational, "Attending Provider Name Suffix"),
                    b::Element(e::Situational, "Identification Code Qualifier", b::Values("XX")),
                    b::Element(e::Situational, "Attending Provider Primary Identifier"),
                    b::Element(e::NotUsed,     "Entity Relationship Code"),
                    b::Element(e::NotUsed,     "Entity Identifier Code"),
                    b::Element(e::NotUsed,     "Name Last or Organization Name")),
                  b::Segment(2710, s::REF, "Operating Physician Secondary Identification", r::Situational, d::RepeatCount.bounded(4),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("0B", "1G", "G2", "LU")),
                    b::Element(e::Required,    "Reference Physician Secondary Identifier"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                d::LoopDef.build("2310C OTHER OPERATING PHYSICIAN NAME", d::RepeatCount.bounded(1),
                  b::Segment(2500, s::NM1, "Other Operating Physician Name", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Entity Identifier Code", b::Values("ZZ")),
                    b::Element(e::Required,    "Entity Type Qualifier", b::Values("1")),
                    b::Element(e::Required,    "Other Operating Physician Last Name"),
                    b::Element(e::Situational, "Other Operating Physician First Name"),
                    b::Element(e::Situational, "Other Operating Physician Middle Name or Initial"),
                    b::Element(e::NotUsed,     "Name Prefix"),
                    b::Element(e::Situational, "Other Operating Physician Name Suffix"),
                    b::Element(e::Situational, "Identification Code Qualifier", b::Values("XX")),
                    b::Element(e::Situational, "Other Operating Physician Identifier"),
                    b::Element(e::NotUsed,     "Entity Relationship Code"),
                    b::Element(e::NotUsed,     "Entity Identifier Code"),
                    b::Element(e::NotUsed,     "Name Last or Organization Name")),
                  b::Segment(2710, s::REF, "Other Operating Physician Secondary Identification", r::Situational, d::RepeatCount.bounded(4),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("0B", "1G", "G2", "LU")),
                    b::Element(e::Required,    "Other Provider Secondary Identifier"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                d::LoopDef.build("2310D RENDERING PROVIDER NAME", d::RepeatCount.bounded(1),
                  b::Segment(2500, s::NM1, "Rendering Provider Name", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Entity Identifier Code", b::Values("82")),
                    b::Element(e::Required,    "Entity Type Qualifier", b::Values("1")),
                    b::Element(e::Required,    "Rendering Provider Last Name"),
                    b::Element(e::Situational, "Rendering Provider First Name"),
                    b::Element(e::Situational, "Rendering Provider Middle Name or Initial"),
                    b::Element(e::NotUsed,     "Name Prefix"),
                    b::Element(e::Situational, "Rendering Provider Name Suffix"),
                    b::Element(e::Situational, "Identification Code Qualifier", b::Values("XX")),
                    b::Element(e::Situational, "Rendering Provider Identifier"),
                    b::Element(e::NotUsed,     "Entity Relationship Code"),
                    b::Element(e::NotUsed,     "Entity Identifier Code"),
                    b::Element(e::NotUsed,     "Name Last or Organization Name")),
                  b::Segment(2710, s::REF, "Rendering Provider Secondary Identification", r::Situational, d::RepeatCount.bounded(4),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("0B", "1G", "G2", "LU")),
                    b::Element(e::Required,    "Rendering Provider Secondary Identifier"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                d::LoopDef.build("2310E SERVICE FACILITY LOCATION NAME", d::RepeatCount.bounded(1),
                  b::Segment(2500, s::NM1, "Service Facility Location Name", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Entity Identifier Code", b::Values("77")),
                    b::Element(e::Required,    "Entity Type Qualifier", b::Values("2")),
                    b::Element(e::Required,    "Laboratory or Facility Name"),
                    b::Element(e::NotUsed,     "Name First"),
                    b::Element(e::NotUsed,     "Name Middle"),
                    b::Element(e::NotUsed,     "Name Prefix"),
                    b::Element(e::NotUsed,     "Name Suffix"),
                    b::Element(e::Situational, "Identification Code Qualifier", b::Values("XX")),
                    b::Element(e::Situational, "Laboratory or Facility Primary Identifier"),
                    b::Element(e::NotUsed,     "Entity Relationship Code"),
                    b::Element(e::NotUsed,     "Entity Identifier Code"),
                    b::Element(e::NotUsed,     "Name Last or Organization Name")),
                  b::Segment(2650, s::N3, "Service Facility Location Address", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Laboratory or Facility Address Line"),
                    b::Element(e::Situational, "Laboratory or Facility Address Line")),
                  b::Segment(2700, s::N4, "Service Facility Location City, State, ZIP Code", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Laboratory or Facility City Name"),
                    b::Element(e::Situational, "Laboratory or Facility State or Province Code"),
                    b::Element(e::Situational, "Laboratory or Facility Postal Zone or ZIP Code"),
                    b::Element(e::Situational, "Country Code"),
                    b::Element(e::NotUsed,     "Location Qualifier"),
                    b::Element(e::NotUsed,     "Location Identifier"),
                    b::Element(e::Situational, "Country Subdivision Code")),
                  b::Segment(2710, s::REF, "Service Facility Location Secondary Identification", r::Situational, d::RepeatCount.bounded(3),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("0B", "G2", "LU")),
                    b::Element(e::Required,    "Laboratory or Facility Secondary Identifier"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                d::LoopDef.build("2310F REFERRING PROVIDER NAME", d::RepeatCount.bounded(1),
                  b::Segment(2500, s::NM1, "Referring Provider Name", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Entity Identifier Code", b::Values("DN")),
                    b::Element(e::Required,    "Entity Type Qualifier", b::Values("1")),
                    b::Element(e::Required,    "Referring Provider Last Name"),
                    b::Element(e::Situational, "Referring Provider First Name"),
                    b::Element(e::Situational, "Referring Provider Middle Name or Initial"),
                    b::Element(e::NotUsed,     "Name Prefix"),
                    b::Element(e::Situational, "Referring Provider Name Suffix"),
                    b::Element(e::Situational, "Identification Code Qualifier", b::Values("XX")),
                    b::Element(e::Situational, "Identification Code"),
                    b::Element(e::NotUsed,     "Entity Relationship Code"),
                    b::Element(e::NotUsed,     "Entity Identifier Code"),
                    b::Element(e::NotUsed,     "Name Last or Organization Name")),
                  b::Segment(2710, s::REF, "Referring Provider Secondary Identification", r::Situational, d::RepeatCount.bounded(3),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("0B", "1G", "G2")),
                    b::Element(e::Required,    "Referring Provider Secondary Identifier"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                d::LoopDef.build("2320 OTHER SUBSCRIBER INFORMATION", d::RepeatCount.bounded(10),
                  b::Segment(2900, s::SBR, "Other Subscriber Information", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Payer Responsibility Sequence Number", b::Values("A", "B", "C", "D", "E", "F", "G", "H", "P", "S", "T", "U")),
                    b::Element(e::Required,    "Individual Relationship Code", b::Values("01", "18", "19", "20", "21", "39", "40", "53", "G8")),
                    b::Element(e::Situational, "Insured Group or Policy Number"),
                    b::Element(e::Situational, "Other Insured Group Name"),
                    b::Element(e::NotUsed,     "Insurance Type Code"),
                    b::Element(e::NotUsed,     "Coordination of Benefits Code"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code"),
                    b::Element(e::NotUsed,     "Employment Status Code"),
                    b::Element(e::Situational, "Claim Filing Indicator Code", b::Values("11", "12", "13", "14", "15", "16", "17", "AM", "BL", "CH", "CI", "DS", "FI", "HM", "LM", "MA", "MB", "MC", "OF", "TV", "VA", "WC", "ZZ"))),
                  b::Segment(2950, s::CAS, "Claim Level Adjustments", r::Situational, d::RepeatCount.bounded(5),
                    b::Element(e::Required,    "Claim Adjustment Group Code", b::Values("CO", "CR", "OA", "PI", "PR")),
                    b::Element(e::Required,    "Adjustment Reason Code"),
                    b::Element(e::Required,    "Adjustment Amount"),
                    b::Element(e::Situational, "Adjustment Quantity"),
                    b::Element(e::Situational, "Adjustment Reason Code"),
                    b::Element(e::Situational, "Adjustment Amount"),
                    b::Element(e::Situational, "Adjustment Quantity"),
                    b::Element(e::Situational, "Adjustment Reason Code"),
                    b::Element(e::Situational, "Adjustment Amount"),
                    b::Element(e::Situational, "Adjustment Quantity"),
                    b::Element(e::Situational, "Adjustment Reason Code"),
                    b::Element(e::Situational, "Adjustment Amount"),
                    b::Element(e::Situational, "Adjustment Quantity"),
                    b::Element(e::Situational, "Adjustment Reason Code"),
                    b::Element(e::Situational, "Adjustment Amount"),
                    b::Element(e::Situational, "Adjustment Quantity"),
                    b::Element(e::Situational, "Adjustment Reason Code"),
                    b::Element(e::Situational, "Adjustment Amount"),
                    b::Element(e::Situational, "Adjustment Quantity")),
                  b::Segment(3000, s::AMT, "Coordination of Benefits (COB) Payer Paid Amount", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Amount Qualifier Code", b::Values("D")),
                    b::Element(e::Required,    "Payer Paid Amount"),
                    b::Element(e::NotUsed,     "Credit/Debit Flag")),
                  b::Segment(3000, s::AMT, "Remaining Patient Liability", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Amount Qualifier Code", b::Values("EAF")),
                    b::Element(e::Required,    "Remaining Patient Liability"),
                    b::Element(e::NotUsed,     "Credit/Debit Flag")),
                  b::Segment(3000, s::AMT, "Coordination of Benefits (COB) Total Non-Covered Amount", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Amount Qualifier Code", b::Values("A8")),
                    b::Element(e::Required,    "Non-Covered Charge Amount"),
                    b::Element(e::NotUsed,     "Credit/Debit Flag Code")),
                  b::Segment(3100, s::OI, "Other Insurance Coverage Information", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::NotUsed,     "Claim Filing Indicator Code"),
                    b::Element(e::NotUsed,     "Claim Submission Reason Code"),
                    b::Element(e::Required,    "Benefits Assignment Certification Indicator", b::Values("N", "W", "Y")),
                    b::Element(e::NotUsed,     "Patient Signature Source Code"),
                    b::Element(e::NotUsed,     "Provider Agreement Code"),
                    b::Element(e::Required,    "Release of Information Code", b::Values("I", "Y"))),
                  b::Segment(3150, s::MIA, "Inpatient Adjudication Information", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Covered Days or Visits Count"),
                    b::Element(e::NotUsed,     "Monetary Amount"),
                    b::Element(e::Situational,  "Lifetime Psychiatric Days Count"),
                    b::Element(e::Situational, "Claim DRG Amount"),
                    b::Element(e::Situational, "Claim Payment Remark Code"),
                    b::Element(e::Situational, "Claim Disproportionate Share Amount"),
                    b::Element(e::Situational, "Claim MSP Pass-through Amount"),
                    b::Element(e::Situational, "Claim PPS Capital Amount"),
                    b::Element(e::Situational, "PPS-Capital FSP DRG Amount"),
                    b::Element(e::Situational, "PPS-Capital HSP DRG Amount"),
                    b::Element(e::Situational, "PPS-Capital DSH DRG Amount"),
                    b::Element(e::Situational, "Old Capital Amount"),
                    b::Element(e::Situational, "PPS-Capital IME Amount"),
                    b::Element(e::Situational, "PPS-Operating Hospital Specific DRG Amount"),
                    b::Element(e::Situational, "Cost Report Day Count"),
                    b::Element(e::Situational, "PPS-Operating Federal Specific DRG Amount"),
                    b::Element(e::Situational, "Claim PPS Capital Outlier Amount"),
                    b::Element(e::Situational, "Claim Indirect Teaching Amount"),
                    b::Element(e::Situational, "Non-Payable Professional Component Billed Amount"),
                    b::Element(e::Situational, "Claim Payment Remark Code"),
                    b::Element(e::Situational, "Claim Payment Remark Code"),
                    b::Element(e::Situational, "Claim Payment Remark Code"),
                    b::Element(e::Situational, "Claim Payment Remark Code"),
                    b::Element(e::Situational, "PPS-Capital Exception Amount")),
                  b::Segment(3200, s::MOA, "Outpatient Adjudication Information", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Situational, "Reimbursement Rate"),
                    b::Element(e::Situational, "HCPCS Payable Amount"),
                    b::Element(e::Situational, "Claim Payment Remark Code"),
                    b::Element(e::Situational, "Claim Payment Remark Code"),
                    b::Element(e::Situational, "Claim Payment Remark Code"),
                    b::Element(e::Situational, "Claim Payment Remark Code"),
                    b::Element(e::Situational, "Claim Payment Remark Code"),
                    b::Element(e::Situational, "End Stage Renal Disease Payment Amount"),
                    b::Element(e::Situational, "Non-Payable Professional Component Billed Amount")),

                  d::LoopDef.build("2330A OTHER SUBSCRIBER NAME", d::RepeatCount.bounded(1),
                    b::Segment(3250, s::NM1, "Other Subscriber Name", r::Required, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Entity Identifier Code", b::Values("IL")),
                      b::Element(e::Required,    "Entity Type Qualifier", b::Values("1", "2")),
                      b::Element(e::Required,    "Other Insured Last Name"),
                      b::Element(e::Situational, "Other Insured First Name"),
                      b::Element(e::Situational, "Other Insured Middle Name"),
                      b::Element(e::NotUsed,     "Name Prefix"),
                      b::Element(e::Situational, "Other Insured Name Suffix"),
                      b::Element(e::Required,    "Identification Code Qualifier", b::Values("II", "MI")),
                      b::Element(e::Required,    "Other Insured Identifier"),
                      b::Element(e::NotUsed,     "Entity Relationship Code"),
                      b::Element(e::NotUsed,     "Entity Identifier Code"),
                      b::Element(e::NotUsed,     "Name Last or Organization Name")),
                    b::Segment(3320, s::N3, "Other Subscriber Address", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Other Insured Address Line"),
                      b::Element(e::Situational, "Other Insured Address Line")),
                    b::Segment(3400, s::N4, "Other Subscriber City, State, ZIP Code", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Other Insured City Name"),
                      b::Element(e::Situational, "Other Insured State or Province Code"),
                      b::Element(e::Situational, "Other Insured Postal Zone or ZIP Code"),
                      b::Element(e::Situational, "Country Code"),
                      b::Element(e::NotUsed,     "Location Qualifier"),
                      b::Element(e::NotUsed,     "Location Identifier"),
                      b::Element(e::Situational, "Country Subdivision Code")),
                    b::Segment(3550, s::REF, "Other Subscriber Secondary Identification", r::Situational, d::RepeatCount.bounded(2),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("SY")),
                      b::Element(e::Required,    "Other Insured Additional Identifier"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                  d::LoopDef.build("2330B OTHER PAYER NAME", d::RepeatCount.bounded(1),
                    b::Segment(3250, s::NM1, "Other Payer Name", r::Required, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Entity Identifier Code", b::Values("PR")),
                      b::Element(e::Required,    "Entity Type Qualifier", b::Values("2")),
                      b::Element(e::Required,    "Other Payer Last or Organization Name"),
                      b::Element(e::NotUsed,     "Name First"),
                      b::Element(e::NotUsed,     "Name Middle"),
                      b::Element(e::NotUsed,     "Name Prefix"),
                      b::Element(e::NotUsed,     "Name Suffix"),
                      b::Element(e::Required,    "Identification Code Qualifier", b::Values("PI", "XV")),
                      b::Element(e::Required,    "Other Payer Primary Identifier"),
                      b::Element(e::NotUsed,     "Entity Relationship Code"),
                      b::Element(e::NotUsed,     "Entity Identifier Code"),
                      b::Element(e::NotUsed,     "Name Last or Organization Name")),
                    b::Segment(3320, s::N3, "Other Payer Address", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Other Payer Address Line"),
                      b::Element(e::Situational, "Other Payer Address Line")),
                    b::Segment(3400, s::N4, "Other Payer City, State, ZIP Code", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Other Payer City Name"),
                      b::Element(e::Situational, "Other Payer State Code"),
                      b::Element(e::Situational, "Other Payer Postal Zone or ZIP Code"),
                      b::Element(e::Situational, "Country Code"),
                      b::Element(e::NotUsed,     "Location Qualifier"),
                      b::Element(e::NotUsed,     "Location Identifier"),
                      b::Element(e::Situational, "Country Subdivision Code")),
                    b::Segment(3500, s::DTP, "Claim Check or Remittance Date", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Date Time Qualifier", b::Values("573")),
                      b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                      b::Element(e::Required,    "Adjudication or Payment Date")),
                    b::Segment(3550, s::REF, "Other Payer Secondary Identifier", r::Situational, d::RepeatCount.bounded(2),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("2U", "EI", "FY", "NF")),
                      b::Element(e::Required,    "Other Payer Secondary Identifier"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                    b::Segment(3550, s::REF, "Other Payer Prior Authorization Number", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("G1")),
                      b::Element(e::Required,    "Other Payer Prior Authorization Number"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                    b::Segment(3550, s::REF, "Other Payer Referral Number", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("9F")),
                      b::Element(e::Required,    "Other Payer Prior Authorization or Referral Number"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                    b::Segment(3550, s::REF, "Other Payer Claim Adjustment Indicator", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("T4")),
                      b::Element(e::Required,    "Other Payer Claim Adjustment Indicator", b::Values("Y")),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                    b::Segment(3550, s::REF, "Other Payer Claim Control Number", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("F8")),
                      b::Element(e::Required,    "Other Payer's Claim Control Number"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                  d::LoopDef.build("2330C OTHER PAYER ATTENDING PROVIDER", d::RepeatCount.bounded(1),
                    b::Segment(3250, s::NM1, "Other Payer Attending Provider", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Entity Identifier Code", b::Values("71")),
                      b::Element(e::Required,    "Entity Type Qualifier", b::Values("1")),
                      b::Element(e::NotUsed,     "Name Last"),
                      b::Element(e::NotUsed,     "Name First"),
                      b::Element(e::NotUsed,     "Name Middle"),
                      b::Element(e::NotUsed,     "Name Prefix"),
                      b::Element(e::NotUsed,     "Name Suffix"),
                      b::Element(e::NotUsed,     "Identification Code Qualifier"),
                      b::Element(e::NotUsed,     "Identification Code"),
                      b::Element(e::NotUsed,     "Entity Relationship Code"),
                      b::Element(e::NotUsed,     "Entity Identifier Code"),
                      b::Element(e::NotUsed,     "Name Last or Organization Name")),
                    b::Segment(3550, s::REF, "Other Payer Attending Provider Secondary Identification", r::Required, d::RepeatCount.bounded(4),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("0B", "1G", "G2", "LU")),
                      b::Element(e::Required,    "Other Payer Attending Provider Identifier"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                  d::LoopDef.build("2330D OTHER PAYER OPERATING PHYSICIAN", d::RepeatCount.bounded(1),
                    b::Segment(3250, s::NM1,  "Other Payer Operating Physician", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Entity Identifier Code", b::Values("72")),
                      b::Element(e::Required,    "Entity Type Qualifier", b::Values("1")),
                      b::Element(e::NotUsed,     "Name Last"),
                      b::Element(e::NotUsed,     "Name First"),
                      b::Element(e::NotUsed,     "Name Middle"),
                      b::Element(e::NotUsed,     "Name Prefix"),
                      b::Element(e::NotUsed,     "Name Suffix"),
                      b::Element(e::NotUsed,     "Identification Code Qualifier"),
                      b::Element(e::NotUsed,     "Identification Code"),
                      b::Element(e::NotUsed,     "Entity Relationship Code"),
                      b::Element(e::NotUsed,     "Entity Identifier Code"),
                      b::Element(e::NotUsed,     "Name Last or Organization Name")),
                    b::Segment(3550, s::REF, "Other Payer Operating Physician Secondary Identification", r::Required, d::RepeatCount.bounded(4),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("0B", "1G", "G2", "LU")),
                      b::Element(e::Required,    "Other Payer Operating Provider Secondary Identifier"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                  d::LoopDef.build("2330E OTHER PAYER OTHER OPERATING PHYSICIAN", d::RepeatCount.bounded(1),
                    b::Segment(3250, s::NM1, "Other Payer Other Operating Physician", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Entity Identifier Code", b::Values("ZZ")),
                      b::Element(e::Required,    "Entity Type Qualifier", b::Values("1")),
                      b::Element(e::NotUsed,     "Name Last"),
                      b::Element(e::NotUsed,     "Name First"),
                      b::Element(e::NotUsed,     "Name Middle"),
                      b::Element(e::NotUsed,     "Name Prefix"),
                      b::Element(e::NotUsed,     "Name Suffix"),
                      b::Element(e::NotUsed,     "Identification Code Qualifier"),
                      b::Element(e::NotUsed,     "Identification Code"),
                      b::Element(e::NotUsed,     "Entity Relationship Code"),
                      b::Element(e::NotUsed,     "Entity Identifier Code"),
                      b::Element(e::NotUsed,     "Name Last or Organization Name")),
                    b::Segment(3550, s::REF, "Other Payer Other Operating Physician Secondary Identification", r::Required, d::RepeatCount.bounded(4),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("0B", "1G", "G2", "LU")),
                      b::Element(e::Required,    "Other Payer Other Operating Physician Secondary Identifier"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                  d::LoopDef.build("2330F OTHER PAYER SERVICE FACILITY LOCATION", d::RepeatCount.bounded(1),
                    b::Segment(3250, s::NM1, "Other Payer Service Facility Location", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Entity Identifier Code", b::Values("77")),
                      b::Element(e::Required,    "Entity Type Qualifier", b::Values("2")),
                      b::Element(e::NotUsed,     "Name Last"),
                      b::Element(e::NotUsed,     "Name First"),
                      b::Element(e::NotUsed,     "Name Middle"),
                      b::Element(e::NotUsed,     "Name Prefix"),
                      b::Element(e::NotUsed,     "Name Suffix"),
                      b::Element(e::NotUsed,     "Identification Code Qualifier"),
                      b::Element(e::NotUsed,     "Identification Code"),
                      b::Element(e::NotUsed,     "Entity Relationship Code"),
                      b::Element(e::NotUsed,     "Entity Identifier Code"),
                      b::Element(e::NotUsed,     "Name Last or Organization Name")),
                    b::Segment(3550, s::REF, "Other Payer Supervising Provider Secondary Identification", r::Required, d::RepeatCount.bounded(3),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("0B", "G2", "LU")),
                      b::Element(e::Required,    "Other Payer Service Facility Location Identifier"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                  d::LoopDef.build("2330G OTHER PAYER RENDERING PROVIDER NAME", d::RepeatCount.bounded(1),
                    b::Segment(3250, s::NM1, "Other Payer Rendering Provider Name", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Entity Identifier Code", b::Values("82")),
                      b::Element(e::Required,    "Entity Type Qualifier", b::Values("1")),
                      b::Element(e::NotUsed,     "Name Last or Organization Name"),
                      b::Element(e::NotUsed,     "Name First"),
                      b::Element(e::NotUsed,     "Name Middle"),
                      b::Element(e::NotUsed,     "Name Prefix"),
                      b::Element(e::NotUsed,     "Name Suffix"),
                      b::Element(e::NotUsed,     "Identification Code Qualifier"),
                      b::Element(e::NotUsed,     "Identification Code"),
                      b::Element(e::NotUsed,     "Entity Relationship Code"),
                      b::Element(e::NotUsed,     "Entity Identifier Code"),
                      b::Element(e::NotUsed,     "Name Last or Organization Name")),
                    b::Segment(3550, s::REF, "Other Payer Rendering Provider Secondary Identification", r::Required, d::RepeatCount.bounded(4),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("0B", "1G", "G2", "LU")),
                      b::Element(e::Required,    "Other Payer Rendering Provider Secondary Identifier"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                  d::LoopDef.build("2330H OTHER PAYER REFERRING PROVIDER", d::RepeatCount.bounded(1),
                    b::Segment(3250, s::NM1, "Other Payer Referring Provider", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Entity Identifier Code", b::Values("DN")),
                      b::Element(e::Required,    "Entity Type Qualifier", b::Values("1")),
                      b::Element(e::NotUsed,     "Name Last or Organization Name"),
                      b::Element(e::NotUsed,     "Name First"),
                      b::Element(e::NotUsed,     "Name Middle"),
                      b::Element(e::NotUsed,     "Name Prefix"),
                      b::Element(e::NotUsed,     "Name Suffix"),
                      b::Element(e::NotUsed,     "Identification Code Qualifier"),
                      b::Element(e::NotUsed,     "Identification Code"),
                      b::Element(e::NotUsed,     "Entity Relationship Code"),
                      b::Element(e::NotUsed,     "Entity Identifier Code"),
                      b::Element(e::NotUsed,     "Name Last or Organization Name")),
                    b::Segment(3550, s::REF, "Other Payer Referring Provider Secondary Identification", r::Required, d::RepeatCount.bounded(3),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("0B", "1G", "G2")),
                      b::Element(e::Required,    "Other Payer Referring Provider Identifier"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                  d::LoopDef.build("2330I OTHER PAYER BILLING PROVIDER", d::RepeatCount.bounded(1),
                    b::Segment(3250, s::NM1, "Other Payer Billing Provider", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Entity Identifier Code", b::Values("85")),
                      b::Element(e::Required,    "Entity Type Qualifier", b::Values("2")),
                      b::Element(e::NotUsed,     "Name Last or Organization Name"),
                      b::Element(e::NotUsed,     "Name First"),
                      b::Element(e::NotUsed,     "Name Middle"),
                      b::Element(e::NotUsed,     "Name Prefix"),
                      b::Element(e::NotUsed,     "Name Suffix"),
                      b::Element(e::NotUsed,     "Identification Code Qualifier"),
                      b::Element(e::NotUsed,     "Identification Code"),
                      b::Element(e::NotUsed,     "Entity Relationship Code"),
                      b::Element(e::NotUsed,     "Entity Identifier Code"),
                      b::Element(e::NotUsed,     "Name Last or Organization Name")),
                    b::Segment(3550, s::REF, "Other Payer Billing Provider Secondary Information", r::Required, d::RepeatCount.bounded(2),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("G2", "LU")),
                      b::Element(e::Required,    "Other Payer Billing Provider Identifier"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")))),

                d::LoopDef.build("2400 SERVICE LINE NUMBER", d::RepeatCount.bounded(999),
                  b::Segment(3650, s::LX, "Service Line Number", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Assigned Number")),
                  b::Segment(3750, s::SV2, "Institutional Service Line", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Service Line Revenue Code"),
                    b::Element(e::Situational, "COMPOSITE MEDICAL PROCEDURE IDENTIFIER",
                      b::Element(e::Required,    "Product or Service ID Qualifier", b::Values("ER", "HC", "HP", "IV", "WK")),
                      b::Element(e::Required,    "Procedure Code"),
                      b::Element(e::Situational,  "Procedure Modifier"),
                      b::Element(e::Situational,  "Procedure Modifier"),
                      b::Element(e::Situational,  "Procedure Modifier"),
                      b::Element(e::Situational,  "Procedure Modifier"),
                      b::Element(e::Situational,  "Description"),
                      b::Element(e::NotUsed,     "Product/Service ID")),
                    b::Element(e::Required,    "Line Item Charge Amount"),
                    b::Element(e::Required,    "Unit or Basis for Measurement Code", b::Values("DA", "UN")),
                    b::Element(e::Required,    "Service Unit Count"),
                    b::Element(e::NotUsed,     "Unit Rate"),
                    b::Element(e::Situational, "Line Item Denied Charge or Non-Covered Charge Amount"),
                    b::Element(e::NotUsed,     "Yes/No Condition or Response Code"),
                    b::Element(e::NotUsed,     "Nursing Home Residential Status Code"),
                    b::Element(e::NotUsed,     "Level of Care Code")),
                  b::Segment(4200, s::PWK, "Line Supplemental Information", r::Situational, d::RepeatCount.bounded(10),
                    b::Element(e::Required,    "Attachment Report Type Code", b::Values("03", "04", "05", "06", "07", "08", "09", "10", "11", "13", "15", "21", "A3", "A4", "AM", "AS", "B2", "B3", "B4", "BR", "BS", "BT", "CB", "CK", "CT", "D2", "DA", "DB", "DG", "DJ", "DS", "EB", "HC", "HR", "I5", "IR", "LA", "M1", "MT", "NN", "OB", "OC", "OD", "OE", "OX", "OZ", "P4", "P5", "PE", "PN", "PO", "PQ", "PY", "PZ", "RB", "RR", "RT", "RX", "SG", "V5", "XP")),
                    b::Element(e::Required,    "Attachment Transmission Code", b::Values("AA", "BM", "EL", "EM", "FT", "FX")),
                    b::Element(e::NotUsed,     "Report Copies Needed"),
                    b::Element(e::NotUsed,     "Entity Identifier Code"),
                    b::Element(e::Situational, "Identification Code Qualifier", b::Values("AC")),
                    b::Element(e::Situational, "Attachment Control Number", b::MaxLength(50)),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "ACTIONS INDICATED"),
                    b::Element(e::NotUsed,     "Request Category Code")),
                  b::Segment(4550, s::DTP, "Date - Service Date", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Date Time Qualifier", b::Values("472")),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8", "RD8")),
                    b::Element(e::Required,    "Service Date")),
                  b::Segment(4700, s::REF, "Line Item Control Number", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("6R")),
                    b::Element(e::Required,    "Line Item Control Number", b::MaxLength(30)),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                  b::Segment(4700, s::REF, "Repriced Line Item Reference Number", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("9B")),
                    b::Element(e::Required,    "Repriced Line Item Reference Number"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                  b::Segment(4700, s::REF, "Adjusted Repriced Line Item Reference Number", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("9D")),
                    b::Element(e::Required,    "Adjusted Repriced Line Item Reference Number"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                  b::Segment(4750, s::AMT, "Service Tax Amount", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Amount Qualifier Code", b::Values("GT")),
                    b::Element(e::Required,    "Service Tax Amount"),
                    b::Element(e::NotUsed,     "Credit/Debit Flag Code")),
                  b::Segment(4750, s::AMT, "Facility Tax Amount", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Amount Qualifier Code", b::Values("N8")),
                    b::Element(e::Required,    "Facility Tax Amount"),
                    b::Element(e::NotUsed,     "Credit/Debit Flag Code")),
                  b::Segment(4850, s::NTE, "Third Party Organization Notes", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Note Reference Code", b::Values("TPO")),
                    b::Element(e::Required,    "Line Note Text")),
                  b::Segment(4920, s::HCP, "Line Pricing/Repricing Information", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Pricing Methodology", b::Values("00", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14")),
                    b::Element(e::Required,    "Monetary Amount"),
                    b::Element(e::Situational, "Monetary Amount"),
                    b::Element(e::Situational, "Reference Identification"),
                    b::Element(e::Situational, "Rate"),
                    b::Element(e::Situational, "Reference Identification"),
                    b::Element(e::Situational, "Monetary Amount"),
                    b::Element(e::Situational, "Product/Service ID"),
                    b::Element(e::Situational, "Product or Service ID Qualifier", b::Values("ER", "HC", "HP", "IV", "WK")),
                    b::Element(e::Situational, "Repriced Approved HCPCS Code"),
                    b::Element(e::Situational, "Unit or Basis for Measurement Code", b::Values("DA", "UN")),
                    b::Element(e::Situational, "Quantity", b::MaxLength(8), b::MaxPrecision(3)),
                    b::Element(e::Situational, "Reject Reason Code", b::Values("T1", "T2", "T3", "T4", "T5", "T6")),
                    b::Element(e::Situational, "Policy Compliance Code", b::Values("1", "2", "3", "4", "5")),
                    b::Element(e::Situational, "Exception Code", b::Values("1", "2", "3", "4", "5", "6"))),

                  d::LoopDef.build("2410 DRUG IDENTIFICATION", d::RepeatCount.bounded(1),
                    b::Segment(4930, s::LIN, "Drug Identification", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::NotUsed,     "Assigned Identification"),
                      b::Element(e::Required,    "Product or Service ID Qualifier", b::Values("N4")),
                      b::Element(e::Required,    "National Drug Code"),
                      b::Element(e::NotUsed,     "Product/Service ID Qualifier"),
                      b::Element(e::NotUsed,     "Product/Service ID"),
                      b::Element(e::NotUsed,     "Product/Service ID Qualifier"),
                      b::Element(e::NotUsed,     "Product/Service ID"),
                      b::Element(e::NotUsed,     "Product/Service ID Qualifier"),
                      b::Element(e::NotUsed,     "Product/Service ID"),
                      b::Element(e::NotUsed,     "Product/Service ID Qualifier"),
                      b::Element(e::NotUsed,     "Product/Service ID"),
                      b::Element(e::NotUsed,     "Product/Service ID Qualifier"),
                      b::Element(e::NotUsed,     "Product/Service ID"),
                      b::Element(e::NotUsed,     "Product/Service ID Qualifier"),
                      b::Element(e::NotUsed,     "Product/Service ID"),
                      b::Element(e::NotUsed,     "Product/Service ID Qualifier"),
                      b::Element(e::NotUsed,     "Product/Service ID"),
                      b::Element(e::NotUsed,     "Product/Service ID Qualifier"),
                      b::Element(e::NotUsed,     "Product/Service ID"),
                      b::Element(e::NotUsed,     "Product/Service ID Qualifier"),
                      b::Element(e::NotUsed,     "Product/Service ID"),
                      b::Element(e::NotUsed,     "Product/Service ID Qualifier"),
                      b::Element(e::NotUsed,     "Product/Service ID"),
                      b::Element(e::NotUsed,     "Product/Service ID Qualifier"),
                      b::Element(e::NotUsed,     "Product/Service ID"),
                      b::Element(e::NotUsed,     "Product/Service ID Qualifier"),
                      b::Element(e::NotUsed,     "Product/Service ID"),
                      b::Element(e::NotUsed,     "Product/Service ID Qualifier"),
                      b::Element(e::NotUsed,     "Product/Service ID"),
                      b::Element(e::NotUsed,     "Product/Service ID Qualifier"),
                      b::Element(e::NotUsed,     "Product/Service ID")),
                    b::Segment(4940, s::CTP, "Drug Quantity", r::Required, d::RepeatCount.bounded(1),
                      b::Element(e::NotUsed,     "Class of Trade Code"),
                      b::Element(e::NotUsed,     "Price Identifier Code"),
                      b::Element(e::NotUsed,     "Unit Price"),
                      b::Element(e::Required,    "National Drug Unit Count"),
                      b::Element(e::Required,    "COMPOSITE UNIT OF MEASURE",
                        b::Element(e::Required,    "Code Qualifier", b::Values("F2", "GR", "ME", "ML", "UN")),
                        b::Element(e::NotUsed,     "Exponent"),
                        b::Element(e::NotUsed,     "Multiplier"),
                        b::Element(e::NotUsed,     "Unit or Basis for Measurement Code"),
                        b::Element(e::NotUsed,     "Exponent"),
                        b::Element(e::NotUsed,     "Multiplier"),
                        b::Element(e::NotUsed,     "Unit or Basis for Measurement Code"),
                        b::Element(e::NotUsed,     "Exponent"),
                        b::Element(e::NotUsed,     "Multiplier"),
                        b::Element(e::NotUsed,     "Unit or Basis for Measurement Code"),
                        b::Element(e::NotUsed,     "Exponent"),
                        b::Element(e::NotUsed,     "Multiplier"),
                        b::Element(e::NotUsed,     "Unit or Basis for Measurement Code"),
                        b::Element(e::NotUsed,     "Exponent"),
                        b::Element(e::NotUsed,     "Multiplier")),
                      b::Element(e::NotUsed,     "Price Multiplier Qualifier"),
                      b::Element(e::NotUsed,     "Multiplier"),
                      b::Element(e::NotUsed,     "Monetary Amount"),
                      b::Element(e::NotUsed,     "Basis of Unit Price Code"),
                      b::Element(e::NotUsed,     "Condition Value"),
                      b::Element(e::NotUsed,     "Multiple Price Quantity")),
                    b::Segment(4950, s::REF, "Prescription or Compound Drug Association Number", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("VY", "XZ")),
                      b::Element(e::Required,    "Prescription Number"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                  d::LoopDef.build("2420A OPERATING PHYSICIAN NAME", d::RepeatCount.bounded(1),
                    b::Segment(5000, s::NM1, "Operating Physician Name", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Entity Identifier Code", b::Values("72")),
                      b::Element(e::Required,    "Entity Type Qualifier", b::Values("1")),
                      b::Element(e::Required,    "Operating Physician Last Name"),
                      b::Element(e::Situational, "Operating Physician First Name"),
                      b::Element(e::Situational, "Operating Physician Middle Name or Initial"),
                      b::Element(e::NotUsed,     "Name Prefix"),
                      b::Element(e::Situational, "Operating Physician Suffix"),
                      b::Element(e::Situational, "Identification Code Qualifier", b::Values("XX")),
                      b::Element(e::Situational, "Operating Physician Primary Identifier"),
                      b::Element(e::NotUsed,     "Entity Relationship Code"),
                      b::Element(e::NotUsed,     "Entity Identifier Code"),
                      b::Element(e::NotUsed,     "Name Last or Organization Name")),
                    b::Segment(5250, s::REF, "Operating Physician Secondary Identification", r::Situational, d::RepeatCount.bounded(20),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("0B", "1G", "G2", "LU")),
                      b::Element(e::Required,    "Operating Physician Secondary Identifier"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::Situational, "REFERENCE IDENTIFIER",
                        b::Element(e::Required,    "Reference Identification Qualifier", b::Values("2U")),
                        b::Element(e::Required,    "Other Payer Primary Identifier"),
                        b::Element(e::NotUsed,     "Reference Identification Qualifier"),
                        b::Element(e::NotUsed,     "Reference Identification"),
                        b::Element(e::NotUsed,     "Reference Identification Qualifier"),
                        b::Element(e::NotUsed,     "Reference Identification")))),

                  d::LoopDef.build("2420B OTHER OPERATING PHYSICIAN NAME", d::RepeatCount.bounded(1),
                    b::Segment(5000, s::NM1, "Other Operating Physician Name", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Entity Identifier Code", b::Values("ZZ")),
                      b::Element(e::Required,    "Entity Type Qualifier", b::Values("1")),
                      b::Element(e::Required,    "Other Operating Physician Last Name"),
                      b::Element(e::Situational, "Other Operating Physician First Name"),
                      b::Element(e::Situational, "Other Operating Physician Middle Name or Initial"),
                      b::Element(e::NotUsed,     "Name Prefix"),
                      b::Element(e::Situational, "Other Operating Physician Name Suffix"),
                      b::Element(e::Situational, "Identification Code Qualifier", b::Values("XX")),
                      b::Element(e::Situational, "Other Operating Physician Identifier"),
                      b::Element(e::NotUsed,     "Entity Relationship Code"),
                      b::Element(e::NotUsed,     "Entity Identifier Code"),
                      b::Element(e::NotUsed,     "Name Last or Organization Name")),
                    b::Segment(5250, s::REF, "Other Operating Physician Secondary Identification", r::Situational, d::RepeatCount.bounded(20),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("0B", "1G", "G2", "LU")),
                      b::Element(e::Required,    "Other Provider Secondary Identifier"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::Situational, "REFERENCE IDENTIFIER",
                        b::Element(e::Required,    "Reference Identification Qualifier", b::Values("2U")),
                        b::Element(e::Required,    "Other Payer Primary Identifier"),
                        b::Element(e::NotUsed,     "Reference Identifier Qualifier"),
                        b::Element(e::NotUsed,     "Reference Identifier"),
                        b::Element(e::NotUsed,     "Reference Identifier Qualifier"),
                        b::Element(e::NotUsed,     "Reference Identifier")))),

                  d::LoopDef.build("2420C RENDERING PROVIDER NAME", d::RepeatCount.bounded(1),
                    b::Segment(5000, s::NM1, "Rendering Provider Name", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Entity Identifier Code", b::Values("82")),
                      b::Element(e::Required,    "Entity Type Qualifier", b::Values("1")),
                      b::Element(e::Required,    "Rendering Provider Last Name"),
                      b::Element(e::Situational, "Rendering Provider First Name"),
                      b::Element(e::Situational, "Rendering Provider Middle Name or Initial"),
                      b::Element(e::NotUsed,     "Name Prefix"),
                      b::Element(e::Situational, "Rendering Provider Name Suffix"),
                      b::Element(e::Situational, "Identification Code Qualifier", b::Values("XX")),
                      b::Element(e::Situational, "Rendering Provider Identifier"),
                      b::Element(e::NotUsed,     "Entity Relationship Code"),
                      b::Element(e::NotUsed,     "Entity Identifier Code"),
                      b::Element(e::NotUsed,     "Name Last or Organization Name")),
                    b::Segment(5250, s::REF, "Rendering Provider Secondary Identification", r::Situational, d::RepeatCount.bounded(20),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("0B", "1G", "G2", "LU")),
                      b::Element(e::Required,    "Rendering Provider Secondary Identifier"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::Situational, "REFERENCE IDENTIFIER",
                        b::Element(e::Required,    "Reference Identification Qualifier", b::Values("2U")),
                        b::Element(e::Required,    "Other Payer Primary Identifier"),
                        b::Element(e::NotUsed,     "Reference Identification Qualifier"),
                        b::Element(e::NotUsed,     "Reference Identification"),
                        b::Element(e::NotUsed,     "Reference Identification Qualifier"),
                        b::Element(e::NotUsed,     "Reference Identification")))),

                  d::LoopDef.build("2420D REFERRING PROVIDER NAME", d::RepeatCount.bounded(1),
                    b::Segment(5000, s::NM1, "Referring Provider Name", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Entity Identifier Code", b::Values("DN")),
                      b::Element(e::Required,    "Entity Type Qualifier", b::Values("1")),
                      b::Element(e::Required,    "Referring Provider Last Name"),
                      b::Element(e::Situational, "Referring Provider First Name"),
                      b::Element(e::Situational, "Referring Provider Middle Name or Initial"),
                      b::Element(e::NotUsed,     "Name Prefix"),
                      b::Element(e::Situational, "Referring Provider Name Suffix"),
                      b::Element(e::Situational, "Identification Code Qualifier", b::Values("XX")),
                      b::Element(e::Situational, "Referring Provider Identifier"),
                      b::Element(e::NotUsed,     "Entity Relationship Code"),
                      b::Element(e::NotUsed,     "Entity Identifier Code"),
                      b::Element(e::NotUsed,     "Name Last or Organization Name")),
                    b::Segment(5250, s::REF, "Referring Provider Secondary Identification", r::Situational, d::RepeatCount.bounded(20),
                      b::Element(e::Required,    "Reference Identification Qualifier", b::Values("0B", "1G", "G2")),
                      b::Element(e::Required,    "Referring Provider Secondary Identifier"),
                      b::Element(e::NotUsed,     "Description"),
                      b::Element(e::Situational, "REFERENCE IDENTIFIER",
                        b::Element(e::Required,    "Reference Identification Qualifier", b::Values("2U")),
                        b::Element(e::Required,    "Other Payer Primary Identifier"),
                        b::Element(e::NotUsed,     "Reference Identification Qualifier"),
                        b::Element(e::NotUsed,     "Reference Identification"),
                        b::Element(e::NotUsed,     "Reference Identification Qualifier"),
                        b::Element(e::NotUsed,     "Reference Identification")))),

                  d::LoopDef.build("2430 LINE ADJUDICATION INFORMATION", d::RepeatCount.bounded(15),
                    b::Segment(5400, s::SVD, "Line Adjudication Information", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Other Payer Primary Identifier"),
                      b::Element(e::Required,    "Service Line Paid Amount"),
                      b::Element(e::Situational, "COMPOSITE MEDICAL PROCEDURE IDENTIFIER",
                        b::Element(e::Required,    "Product or Service ID Qualifier", b::Values("ER", "HC", "HP", "IV", "WK")),
                        b::Element(e::Required,    "Procedure Code"),
                        b::Element(e::Situational, "Procedure Modifier"),
                        b::Element(e::Situational, "Procedure Modifier"),
                        b::Element(e::Situational, "Procedure Modifier"),
                        b::Element(e::Situational, "Procedure Modifier"),
                        b::Element(e::Situational, "Procedure Code Description"),
                        b::Element(e::NotUsed,     "Product/Service ID")),
                      b::Element(e::Required,    "Service Line Revenue Code"),
                      b::Element(e::Required,    "Paid Service Unit Count", b::MaxLength(8), b::MaxPrecision(3)),
                      b::Element(e::Situational, "Bundled Line Number")),
                    b::Segment(5450, s::CAS, "Line Adjustment", r::Situational, d::RepeatCount.bounded(5),
                      b::Element(e::Required,    "Claim Adjustment Group Code", b::Values("CO", "CR", "OA", "PI", "PR")),
                      b::Element(e::Required,    "Adjustment Reason Code"),
                      b::Element(e::Required,    "Adjustment Amount"),
                      b::Element(e::Situational, "Adjustment Quantity"),
                      b::Element(e::Situational, "Adjustment Reason Code"),
                      b::Element(e::Situational, "Adjustment Amount"),
                      b::Element(e::Situational, "Adjustment Quantity"),
                      b::Element(e::Situational, "Adjustment Reason Code"),
                      b::Element(e::Situational, "Adjustment Amount"),
                      b::Element(e::Situational, "Adjustment Quantity"),
                      b::Element(e::Situational, "Adjustment Reason Code"),
                      b::Element(e::Situational, "Adjustment Amount"),
                      b::Element(e::Situational, "Adjustment Quantity"),
                      b::Element(e::Situational, "Adjustment Reason Code"),
                      b::Element(e::Situational, "Adjustment Amount"),
                      b::Element(e::Situational, "Adjustment Quantity"),
                      b::Element(e::Situational, "Adjustment Reason Code"),
                      b::Element(e::Situational, "Adjustment Amount"),
                      b::Element(e::Situational, "Adjustment Quantity")),
                    b::Segment(5500, s::DTP, "Line Check or Remittance Date", r::Required, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Date Time Qualifier", b::Values("573")),
                      b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                      b::Element(e::Required,    "Adjudication or Payment Date")),
                    b::Segment(5505, s::AMT, "Remaining Patient Liability", r::Situational, d::RepeatCount.bounded(1),
                      b::Element(e::Required,    "Amount Qualifier Code", b::Values("EAF")),
                      b::Element(e::Required,    "Remaining Patient Liability"),
                      b::Element(e::NotUsed,     "Credit/Debit Flag Code")))))

          HC837 = b.build("HC", "837", "",
            d::TableDef.header("1 - Header",
              b::Segment(50, s::ST, "Transaction Set Header", r::Required, d::RepeatCount.bounded(1),
                b::Element(e::Required,    "Transaction Set Identifier Code", b::Values("837")),
                b::Element(e::Required,    "Transaction Set Control Number"),
                b::Element(e::Required,    "Version, Release or Industry Identifier")),
              b::Segment(100, s::BHT, "Beginning of Hierarchical Transaction", r::Required, d::RepeatCount.bounded(1),
                b::Element(e::Required,    "Hierarchical Structure Code", b::Values("0019")),
                b::Element(e::Required,    "Transaction Set Purpose Code", b::Values("00", "18")),
                b::Element(e::Required,    "Originator Application Transaction Identifier", b::MaxLength(30)),
                b::Element(e::Required,    "Transaction Set Creation Date"),
                b::Element(e::Required,    "Transaction Set Creation Time"),
                b::Element(e::Required,    "Claim Identifier", b::Values("31", "CH", "RP"))),

              d::LoopDef.build("1000A SUBMITTER NAME", d::RepeatCount.bounded(1),
                b::Segment(200, s::NM1, "Submitter Name", r::Required, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Entity Identifier Code", b::Values("41")),
                  b::Element(e::Required,    "Entity Type Qualifier", b::Values("1", "2")),
                  b::Element(e::Required,    "Submitter Last or Organization Name"),
                  b::Element(e::Situational, "Submitter First Name"),
                  b::Element(e::Situational, "Submitter Middle Name or Initial"),
                  b::Element(e::NotUsed,     "Name Prefix"),
                  b::Element(e::NotUsed,     "Name Suffix"),
                  b::Element(e::Required,    "Identification Qualifier Code", b::Values("46")),
                  b::Element(e::Required,    "Submitter Identifier"),
                  b::Element(e::NotUsed,     "Entity Relationship Code"),
                  b::Element(e::NotUsed,     "Entity Identifier Code"),
                  b::Element(e::NotUsed,     "Name Last or Organization Name")),
                b::Segment(450, s::PER, "Submitter EDI Contact Information", r::Required, d::RepeatCount.bounded(2),
                  b::Element(e::Required,    "Contact Function Code", b::Values("IC")),
                  b::Element(e::Situational, "Submitter Contact Name"),
                  b::Element(e::Required,    "Communication Number Qualifier", b::Values("EM", "FX", "TE")),
                  b::Element(e::Required,    "Communication Number"),
                  b::Element(e::Situational, "Communication Number Qualifier", b::Values("EM", "EX", "FX", "TE")),
                  b::Element(e::Situational, "Communication Number"),
                  b::Element(e::Situational, "Communication Number Qualifier", b::Values("EM", "EX", "FX", "TE")),
                  b::Element(e::Situational, "Communication Number"),
                  b::Element(e::NotUsed,     "Contact Inquiry Reference"))),

              d::LoopDef.build("1000B RECEIVER NAME", d::RepeatCount.bounded(1),
                b::Segment(200, s::NM1, "Receiver Name", r::Required, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Entity Identifier Code", b::Values("40")),
                  b::Element(e::Required,    "Entity Type Qualifier", b::Values("2")),
                  b::Element(e::Required,    "Receiver Name"),
                  b::Element(e::NotUsed,     "Name First"),
                  b::Element(e::NotUsed,     "Name Last"),
                  b::Element(e::NotUsed,     "Name Prefix"),
                  b::Element(e::NotUsed,     "Name Suffix"),
                  b::Element(e::Required,    "Identification Code Qualifier", b::Values("46")),
                  b::Element(e::Required,    "Receiver Primary Identifier"),
                  b::Element(e::NotUsed,     "Entity Relationship Code"),
                  b::Element(e::NotUsed,     "Entity Identifier Code"),
                  b::Element(e::NotUsed,     "Name Last or Organization Name")))),

            d::TableDef.detail("2 - Billing Provider Detail",
              d::LoopDef.build("2000A BILLING PROVIDER HIERARCHICAL LEVEL", d::RepeatCount.unbounded,
                b::Segment(10, s::HL, "Billing Provider Hierarchical Level", r::Required, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Hierarchical ID Number"),
                  b::Element(e::NotUsed,     "Hierarchical Parent ID Number"),
                  b::Element(e::Required,    "Hierarchical Level Code", b::Values("20")),
                  b::Element(e::Required,    "Hierachical Child Code", b::Values("1"))),
                b::Segment(30, s::PRV, "Billing Provider Specialty Information", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Provider Code", b::Values("BI")),
                  b::Element(e::Required,    "Reference Identification Qualifier", b::Values("PXC")),
                  b::Element(e::Required,    "Provider Taxonomy Code"),
                  b::Element(e::NotUsed,     "State or Province Code"),
                  b::Element(e::NotUsed,     "PROVIDER SPECIALTY INFORMATION"),
                  b::Element(e::NotUsed,     "Provider Organization Code")),
                b::Segment(100, s::CUR, "Foreign Currency Information", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Entity Identifier Code", b::Values("85")),
                  b::Element(e::Required,    "Currency Code"),
                  b::Element(e::NotUsed,     "Exchange Rate"),
                  b::Element(e::NotUsed,     "Entity Identifier Code"),
                  b::Element(e::NotUsed,     "Currency Code"),
                  b::Element(e::NotUsed,     "Currency Market/Exchange Code"),
                  b::Element(e::NotUsed,     "Date/Time Qualifier"),
                  b::Element(e::NotUsed,     "Date"),
                  b::Element(e::NotUsed,     "Time"),
                  b::Element(e::NotUsed,     "Date/Time Qualifier"),
                  b::Element(e::NotUsed,     "Date"),
                  b::Element(e::NotUsed,     "Time"),
                  b::Element(e::NotUsed,     "Date/Time Qualifier"),
                  b::Element(e::NotUsed,     "Date"),
                  b::Element(e::NotUsed,     "Time"),
                  b::Element(e::NotUsed,     "Date/Time Qualifier"),
                  b::Element(e::NotUsed,     "Date"),
                  b::Element(e::NotUsed,     "Time"),
                  b::Element(e::NotUsed,     "Date/Time Qualifier"),
                  b::Element(e::NotUsed,     "Date"),
                  b::Element(e::NotUsed,     "Time")),

                d::LoopDef.build("2010AA BILLING PROVIDER NAME", d::RepeatCount.bounded(1),
                  b::Segment(150, s::NM1, "Billing Provider Name", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Entity Identifier Code", b::Values("85")),
                    b::Element(e::Required,    "Entity Type Qualifier", b::Values("2")),
                    b::Element(e::Required,    "Billing Provider Organizational Name"),
                    b::Element(e::NotUsed,     "Name First"),
                    b::Element(e::NotUsed,     "Name Middle"),
                    b::Element(e::NotUsed,     "Name Prefix"),
                    b::Element(e::NotUsed,     "Name Suffix"),
                    b::Element(e::Situational, "Identification Code Qualifier", b::Values("XX")),
                    b::Element(e::Situational, "Billing Provider Identifier"),
                    b::Element(e::NotUsed,     "Entity Relationship Code"),
                    b::Element(e::NotUsed,     "Entity Identifier Code"),
                    b::Element(e::NotUsed,     "Name Last or Organization Name")),
                  b::Segment(250, s::N3, "Billing Provider Address", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Billing Provider Address Line"),
                    b::Element(e::Situational, "Billing Provider Address Line")),
                  b::Segment(300, s::N4, "Billing Provider City, State, ZIP Code", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Billing Provider City Name"),
                    b::Element(e::Situational, "Billing Provider State or Province Code"),
                    b::Element(e::Situational, "Billing Provider Postal Zone or ZIP Code"),
                    b::Element(e::Situational, "Country Code"),
                    b::Element(e::NotUsed,     "Location Qualifier"),
                    b::Element(e::NotUsed,     "Location Identifier"),
                    b::Element(e::Situational, "Country Subdivision Code")),
                  b::Segment(350, s::REF, "Billing Provider Tax Identification", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("EI")),
                    b::Element(e::Required,    "Billing Provider Tax Identification Number"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                  b::Segment(400, s::PER, "Billing Provider Contact Information", r::Situational, d::RepeatCount.bounded(2),
                    b::Element(e::Required,    "Contact Function Code", b::Values("IC")),
                    b::Element(e::Situational, "Billing Provider Contact Name"),
                    b::Element(e::Required,    "Communication Number Qualifier", b::Values("EM", "FX", "TE")),
                    b::Element(e::Required,    "Communication Number"),
                    b::Element(e::Situational, "Communication Number Qualifier", b::Values("EM", "EX", "FX", "TE")),
                    b::Element(e::Situational, "Communication Number"),
                    b::Element(e::Situational, "Communication Number Qualifier", b::Values("EM", "EX", "FX", "TE")),
                    b::Element(e::Situational, "Communication Number"),
                    b::Element(e::NotUsed,     "Contact Inquiry Reference"))),

                d::LoopDef.build("2010AB PAY-TO ADDRESS NAME", d::RepeatCount.bounded(1),
                  b::Segment(150, s::NM1, "Pay-to Address Name", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Entity Identifier Code", b::Values("87")),
                    b::Element(e::Required,    "Entity Type Qualifier", b::Values("2")),
                    b::Element(e::NotUsed,     "Name Last or Organizational Name"),
                    b::Element(e::NotUsed,     "Name First"),
                    b::Element(e::NotUsed,     "Name Middle"),
                    b::Element(e::NotUsed,     "Name Prefix"),
                    b::Element(e::NotUsed,     "Name Suffix"),
                    b::Element(e::NotUsed,     "Identification Code Qualifier"),
                    b::Element(e::NotUsed,     "Identifier Code"),
                    b::Element(e::NotUsed,     "Entity Relationship Code"),
                    b::Element(e::NotUsed,     "Entity Identifier Code"),
                    b::Element(e::NotUsed,     "Name Last or Organization Name")),
                  b::Segment(250, s::N3, "Pay-to Address - ADDRESS", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Pay-To Address Line"),
                    b::Element(e::Situational, "Pay-To Address Line")),
                  b::Segment(300, s::N4, "Pay-To Address City, State, ZIP Code", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Pay-to Address City Name"),
                    b::Element(e::Situational, "Pay-to Address State Code"),
                    b::Element(e::Situational, "Pay-to Address Postal Zone or ZIP Code"),
                    b::Element(e::Situational, "Country Code"),
                    b::Element(e::NotUsed,     "Location Qualifier"),
                    b::Element(e::NotUsed,     "Location Identifier"),
                    b::Element(e::Situational, "Country Subdivision Code"))),

                d::LoopDef.build("2010AC PAY-TO PLAN NAME", d::RepeatCount.bounded(1),
                  b::Segment(150, s::NM1, "Pay-To Plan Name", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Entity Identifier Code", b::Values("PE")),
                    b::Element(e::Required,    "Entity Type Qualifier", b::Values("2")),
                    b::Element(e::Required,    "Pay-To Plan Organizational Name"),
                    b::Element(e::NotUsed,     "Name First"),
                    b::Element(e::NotUsed,     "Name Middle"),
                    b::Element(e::NotUsed,     "Name Prefix"),
                    b::Element(e::NotUsed,     "Name Suffix"),
                    b::Element(e::Required,    "Identification Code Qualifier", b::Values("PI", "XV")),
                    b::Element(e::Required,    "Pay-To Plan Primary Identifier"),
                    b::Element(e::NotUsed,     "Entity Relationship Code"),
                    b::Element(e::NotUsed,     "Entity Identifier Code"),
                    b::Element(e::NotUsed,     "Name Last or Organization Name")),
                  b::Segment(250, s::N3, "Pay-to Plan Address", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Pay-To Plan Address Line"),
                    b::Element(e::Situational, "Pay-To Plan Address Line")),
                  b::Segment(300, s::N4, "Pay-To Plan City, State, ZIP Code", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Pay-to Plan City Name"),
                    b::Element(e::Situational, "Pay-to Plan State or Province Code"),
                    b::Element(e::Situational, "Pay-to Plan Postal Zone or ZIP Code"),
                    b::Element(e::Situational, "Country Code"),
                    b::Element(e::NotUsed,     "Location Qualifier"),
                    b::Element(e::NotUsed,     "Location Identifier"),
                    b::Element(e::Situational, "Country Subdivision Code")),
                  b::Segment(350, s::REF, "Pay-to Plan Secondary Identification", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("2U", "FY", "NF")),
                    b::Element(e::Required,    "Pay-to Plan Secondary Identifier"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                  b::Segment(350, s::REF, "Pay-to Plan Tax Identification Number", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("EI")),
                    b::Element(e::Required,    "Pay-to Plan Tax Identification Number"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))))),

            d::TableDef.detail("2 - Subscriber Detail",
              d::LoopDef.build("2000B SUBSCRIBER HIERARCHICAL LEVEL", d::RepeatCount.unbounded,
                b::Segment(10, s::HL, "Subscriber Hierarchical Level", r::Required, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Hierarchical ID Number"),
                  b::Element(e::Required,    "Hierarchical Parent ID Number"),
                  b::Element(e::Required,    "Hierarchical Level Code", b::Values("22")),
                  b::Element(e::Required,    "Hierachical Child Code", b::Values("0", "1"))),
                b::Segment(50, s::SBR, "Subscriber Information", r::Required, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Payer Responsibility Sequence Number Code", b::Values("A", "B", "C", "D", "E", "F", "G", "H", "P", "S", "T", "U")),
                  b::Element(e::Situational, "Individual Relationship Code", b::Values("18")),
                  b::Element(e::Situational, "Subscriber Group or Policy Number"),
                  b::Element(e::Situational, "Subscriber Group Name"),
                  b::Element(e::NotUsed,     "Insurance Type Code"),
                  b::Element(e::NotUsed,     "Coordination of Benefits Code"),
                  b::Element(e::NotUsed,     "Yes/No Condition or Response Code"),
                  b::Element(e::NotUsed,     "Employment Status Code"),
                  b::Element(e::Situational, "Claim Filing Indicator Code", b::Values("11", "12", "13", "14", "15", "16", "17", "AM", "BL", "CH", "CI", "DS", "FI", "HM", "LM", "MA", "MB", "MC", "OF", "TV", "VA", "WC", "ZZ"))),

                d::LoopDef.build("2010BA SUBSCRIBER NAME", d::RepeatCount.bounded(1),
                  b::Segment(150, s::NM1, "Subscriber Name", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Entity Identifier Code", b::Values("IL")),
                    b::Element(e::Required,    "Entity Type Qualifier", b::Values("1", "2")),
                    b::Element(e::Required,    "Subscriber Last Name"),
                    b::Element(e::Situational, "Subscriber First Name"),
                    b::Element(e::Situational, "Subscriber Middle Name or Initial"),
                    b::Element(e::NotUsed,     "Name Prefix"),
                    b::Element(e::Situational, "Subscriber Name Suffix"),
                    b::Element(e::Situational, "Identification Code Qualifier", b::Values("II", "MI")),
                    b::Element(e::Situational, "Subscriber Primary Identifier"),
                    b::Element(e::NotUsed,     "Entity Relationship Code"),
                    b::Element(e::NotUsed,     "Entity Identifier Code"),
                    b::Element(e::NotUsed,     "Name Last or Organization Name")),
                  b::Segment(250, s::N3, "Subscriber Address", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Subscriber Address Line"),
                    b::Element(e::Situational, "Subscriber Address Line")),
                  b::Segment(300, s::N4, "Subscriber City, State, ZIP Code", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Subscriber City Name"),
                    b::Element(e::Situational, "Subscriber State Code"),
                    b::Element(e::Situational, "Subscriber Postal Zone or ZIP Code"),
                    b::Element(e::Situational, "Country Code"),
                    b::Element(e::NotUsed,     "Location Qualifier"),
                    b::Element(e::NotUsed,     "Location Identifier"),
                    b::Element(e::Situational, "Country Subdivision Code")),
                  b::Segment(320, s::DMG, "Subscriber Demographic Information", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Subscriber Birth Date"),
                    b::Element(e::Required,    "Subscriber Gender Code", b::Values("F", "M", "U")),
                    b::Element(e::NotUsed,     "Marital Status Code"),
                    b::Element(e::NotUsed,     "COMPOSITE RACE OR ETHNICITY INFORMATION"),
                    b::Element(e::NotUsed,     "Citizenship Status Code"),
                    b::Element(e::NotUsed,     "Country Code"),
                    b::Element(e::NotUsed,     "Basis of Verification Code"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Code List Qualifier Code"),
                    b::Element(e::NotUsed,     "Industry Code")),
                  b::Segment(350, s::REF, "Subscriber Secondary Identification", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("SY")),
                    b::Element(e::Required,    "Subscriber Supplemental Identifier"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                  b::Segment(350, s::REF, "Property and Casualty Claim Number", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("Y4")),
                    b::Element(e::Required,    "Property Casualty Claim Number"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                d::LoopDef.build("2010BB PAYER NAME", d::RepeatCount.bounded(10),
                  b::Segment(150, s::NM1, "Payer Name", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Entity Identifier Code", b::Values("PR")),
                    b::Element(e::Required,    "Entity Type Qualifier", b::Values("2")),
                    b::Element(e::Required,    "Payer Name"),
                    b::Element(e::NotUsed,     "Name First"),
                    b::Element(e::NotUsed,     "Name Middle"),
                    b::Element(e::NotUsed,     "Name Prefix"),
                    b::Element(e::NotUsed,     "Name Suffix"),
                    b::Element(e::Required,    "Identification Code Qualifier", b::Values("PI", "XV")),
                    b::Element(e::Required,    "Payer Identifier"),
                    b::Element(e::NotUsed,     "Entity Relationship Code"),
                    b::Element(e::NotUsed,     "Entity Identifier Code"),
                    b::Element(e::NotUsed,     "Name Last or Organization Name")),
                  b::Segment(250, s::N3, "Payer Address", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Payer Address Line"),
                    b::Element(e::Situational, "Payer Address Line")),
                  b::Segment(300, s::N4, "Payer City, State, ZIP Code", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Payer City Name"),
                    b::Element(e::Situational, "Payer State Code"),
                    b::Element(e::Situational, "Payer Postal Zone or ZIP Code"),
                    b::Element(e::Situational, "Country Code"),
                    b::Element(e::NotUsed,     "Location Qualifier"),
                    b::Element(e::NotUsed,     "Location Identifier"),
                    b::Element(e::Situational, "Country Subdivision Code")),
                  b::Segment(350, s::REF, "Payer Secondary Identification", r::Situational, d::RepeatCount.bounded(3),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("2U", "EI", "FY", "NF")),
                    b::Element(e::Required,    "Payer Additional Identifier"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                  b::Segment(350, s::REF, "Billing Provider Secondary Identification", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Reference Identification Qualifier", b::Values("G2", "LU")),
                    b::Element(e::Required,    "Billing Provider Secondary Identifier"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                loop2300)),

            d::TableDef.detail("2 - Patient Detail",
              d::LoopDef.build("2000C PATIENT HIERARCHICAL LEVEL", d::RepeatCount.unbounded,
                b::Segment(10, s::HL, "Patient Hierachical Level", r::Situational, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Hierarchical ID Number"),
                  b::Element(e::Required,    "Hierarchical Parent ID Number"),
                  b::Element(e::Required,    "Hierarchical Level Code", b::Values("23")),
                  b::Element(e::Required,    "Hierarchical Child Code", b::Values("0"))),
                b::Segment(70, s::PAT, "Patient Information", r::Required, d::RepeatCount.bounded(1),
                  b::Element(e::Required,    "Individual Relationship Code", b::Values("01", "19", "20", "21", "39", "40", "53", "G8")),
                  b::Element(e::NotUsed,     "Patient Location Code"),
                  b::Element(e::NotUsed,     "Employment Status Code"),
                  b::Element(e::NotUsed,     "Student Status Code"),
                  b::Element(e::NotUsed,     "Date Time Period Format Qualifier"),
                  b::Element(e::NotUsed,     "Date Time Period"),
                  b::Element(e::NotUsed,     "Unit Basis for Measurement Code"),
                  b::Element(e::NotUsed,     "Weight"),
                  b::Element(e::NotUsed,     "Yes/No Condition or Response Code")),

                d::LoopDef.build("2010CA PATIENT NAME", d::RepeatCount.bounded(1),
                  b::Segment(150, s::NM1, "Patient Name", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Entity Qualifier Code", b::Values("QC")),
                    b::Element(e::Required,    "Entity Type Qualifier", b::Values("1")),
                    b::Element(e::Required,    "Patient Last Name"),
                    b::Element(e::Situational, "Patient First Name"),
                    b::Element(e::Situational, "Patient Middle Name or Initial"),
                    b::Element(e::NotUsed,     "Name Prefix"),
                    b::Element(e::Situational, "Patient Name Suffix"),
                    b::Element(e::NotUsed,     "Identification Code Qualifier"),
                    b::Element(e::NotUsed,     "Identification Code"),
                    b::Element(e::NotUsed,     "Entity Relationship Code"),
                    b::Element(e::NotUsed,     "Entity Identifier Code"),
                    b::Element(e::NotUsed,     "Name Last or Organization Name")),
                  b::Segment(250, s::N3, "Patient Address", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Patient Address Line"),
                    b::Element(e::Situational, "Patient Address Line")),
                  b::Segment(300, s::N4, "Patient City, State, ZIP Code", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Patient City Name"),
                    b::Element(e::Situational, "Patient State Code"),
                    b::Element(e::Situational, "Patient Postal Zone or ZIP Code"),
                    b::Element(e::Situational, "Country Code"),
                    b::Element(e::NotUsed,     "Location Qualifier"),
                    b::Element(e::NotUsed,     "Location Identifier"),
                    b::Element(e::Situational, "Country Subdivision Code")),
                  b::Segment(320, s::DMG, "Patient Demographic Information", r::Required, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Date Time Period Format Qualifier", b::Values("D8")),
                    b::Element(e::Required,    "Patient Birth Date"),
                    b::Element(e::Required,    "Patient Gender Code", b::Values("F", "M", "U")),
                    b::Element(e::NotUsed,     "Marital Status Code"),
                    b::Element(e::NotUsed,     "COMPOSITE RACE OR ETHNICITY INFORMATION"),
                    b::Element(e::NotUsed,     "Citizenship Status Code"),
                    b::Element(e::NotUsed,     "Country Code"),
                    b::Element(e::NotUsed,     "Basis of Verification Code"),
                    b::Element(e::NotUsed,     "Quantity"),
                    b::Element(e::NotUsed,     "Code List Qualifier Code"),
                    b::Element(e::NotUsed,     "Industry Code")),
                  b::Segment(350, s::REF, "Property and Casualty Claim Number", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Reference Identifier Qualifier", b::Values("Y4")),
                    b::Element(e::Required,    "Property Casualty Claim Number"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER")),
                  b::Segment(350, s::REF, "Property and Casualty Patient Identifier", r::Situational, d::RepeatCount.bounded(1),
                    b::Element(e::Required,    "Reference Identifier Qualifier", b::Values("1W", "SY")),
                    b::Element(e::Required,    "Property Casualty Claim Number"),
                    b::Element(e::NotUsed,     "Description"),
                    b::Element(e::NotUsed,     "REFERENCE IDENTIFIER"))),

                loop2300)),

            d::TableDef.summary("3 - Summary",
              b::Segment(5550, s::SE, "Transaction Set Trailer", r::Required, d::RepeatCount.bounded(1),
                b::Element(e::Required,    "Transaction Segment Count"),
                b::Element(e::Required,    "Transaction Set Control Number"))))
        end
      end
    end
  end
end
