Module: Stupidedi::TransactionSets::FiftyTen::Implementations::X223A2

Defined in:
lib/stupidedi/transaction_sets/005010/implementations.rb,
lib/stupidedi/transaction_sets/005010/implementations/X223A2-HC837.rb

Constant Summary collapse

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"))))