Exemplo n.º 1
0
        /// <summary>
        /// Build benefit enrollment.
        /// Original from http://www.x12.org/examples/005010X220/enroll-employee-in-multiple-health-care-insurance-products/
        /// </summary>
        static TS834 BuildBenefitEnrollment(string controlNumber)
        {
            var result = new TS834();

            //  Used to indicate the start of a transaction set and to specify a transaction set control number.
            result.ST = new ST();
            result.ST.TransactionSetIdentifierCode_01 = "834";
            result.ST.TransactionSetControlNumber_02  = controlNumber.PadLeft(9, '0');

            //  This is an original transaction uniquely identified by the sender with reference #12456. The transaction was created on 5/20/1998 at 12:00 Noon.
            result.BGN_BeginningSegment = new BGN_BeginningSegment();
            result.BGN_BeginningSegment.TransactionSetPurposeCode_01     = "00";
            result.BGN_BeginningSegment.TransactionSetReferenceNumber_02 = "12456";
            result.BGN_BeginningSegment.TransactionSetCreationDate_03    = "19980520";
            result.BGN_BeginningSegment.TransactionSetCreationTime_04    = "1200";
            result.BGN_BeginningSegment.ActionCode_08 = "2";

            //  Occurrence of N1 Loops in any order
            result.AllN1 = new All_N1_834();

            //  Begin 1000A Loop
            result.AllN1.Loop1000A = new Loop_1000A_834();

            //  Specifies the sponsor/sender's tax ID number.
            result.AllN1.Loop1000A.N1_SponsorName = new N1_SponsorName();
            result.AllN1.Loop1000A.N1_SponsorName.EntityIdentifierCode_01        = "P5";
            result.AllN1.Loop1000A.N1_SponsorName.IdentificationCodeQualifier_03 = "FI";
            result.AllN1.Loop1000A.N1_SponsorName.IntermediaryBankIdentifier_04  = "999888777";

            //  End 1000A Loop

            //  Begin 1000B Loop
            result.AllN1.Loop1000B = new Loop_1000B_834();

            //  Specifies the insurance company/receiver's tax ID number.
            result.AllN1.Loop1000B.N1_Payer = new N1_Payer();
            result.AllN1.Loop1000B.N1_Payer.EntityIdentifierCode_01        = "IN";
            result.AllN1.Loop1000B.N1_Payer.IdentificationCodeQualifier_03 = "FI";
            result.AllN1.Loop1000B.N1_Payer.IntermediaryBankIdentifier_04  = "654456654";

            //  End 1000B Loop

            //  Repeating 2000 Loops
            result.Loop2000 = new List <Loop_2000_834>();

            //  Begin 2000 Loop
            var loop2000 = new Loop_2000_834();

            //  Beginning of Table 2. Indicates that the subscriber (John Doe) is adding coverage as an active employee.
            loop2000.INS_MemberLevelDetail = new INS_MemberLevelDetail();
            loop2000.INS_MemberLevelDetail.InsuredIndicator_01           = "Y";
            loop2000.INS_MemberLevelDetail.IndividualRelationshipCode_02 = "18";
            loop2000.INS_MemberLevelDetail.MaintenanceTypeCode_03        = "021";
            loop2000.INS_MemberLevelDetail.MaintenanceReasonCode_04      = "20";
            loop2000.INS_MemberLevelDetail.BenefitStatusCode_05          = "A";
            loop2000.INS_MemberLevelDetail.EmploymentStatusCode_08       = "FT";

            //  Occurrence of REF segments in any order
            loop2000.AllREF = new All_REF_834_2();

            //  John's subscriber ID number.
            loop2000.AllREF.REF_SubscriberIdentifier = new REF_SubscriberIdentifier();
            loop2000.AllREF.REF_SubscriberIdentifier.ReferenceIdentificationQualifier_01 = "0F";
            loop2000.AllREF.REF_SubscriberIdentifier.MemberGrouporPolicyNumber_02        = "123456789";

            //  This is the group number assigned by the carrier.
            loop2000.AllREF.REF_MemberPolicyNumber = new REF_MemberPolicyNumber();
            loop2000.AllREF.REF_MemberPolicyNumber.ReferenceIdentificationQualifier_01 = "1L";
            loop2000.AllREF.REF_MemberPolicyNumber.MemberGrouporPolicyNumber_02        = "123456001";

            //  Repeating DTP
            loop2000.DTP_MemberLevelDates = new List <DTP_MemberLevelDates>();

            //  The eligibility date for this transaction is 5/23/1996.
            var dtp1 = new DTP_MemberLevelDates();

            dtp1.DateTimeQualifier_01             = "356";
            dtp1.DateTimePeriodFormatQualifier_02 = "D8";
            dtp1.AccidentDate_03 = "19960523";
            loop2000.DTP_MemberLevelDates.Add(dtp1);

            //  Occurrence of N1 Loops in any order
            loop2000.AllNM1 = new All_NM1_834();

            //  Begin 2100A Loop
            loop2000.AllNM1.Loop2100A = new Loop_2100A_834();

            //  Subscriber's name.
            loop2000.AllNM1.Loop2100A.NM1_MemberName = new NM1_MemberName();
            loop2000.AllNM1.Loop2100A.NM1_MemberName.EntityIdentifierCode_01 = "IL";
            loop2000.AllNM1.Loop2100A.NM1_MemberName.EntityTypeQualifier_02  = "1";
            loop2000.AllNM1.Loop2100A.NM1_MemberName.ResponseContactLastorOrganizationName_03 = "DOE";
            loop2000.AllNM1.Loop2100A.NM1_MemberName.ResponseContactFirstName_04    = "JOHN";
            loop2000.AllNM1.Loop2100A.NM1_MemberName.ResponseContactMiddleName_05   = "P";
            loop2000.AllNM1.Loop2100A.NM1_MemberName.IdentificationCodeQualifier_08 = "34";
            loop2000.AllNM1.Loop2100A.NM1_MemberName.ResponseContactIdentifier_09   = "123456789";

            //  John's home phone number is (717)234-3334 and his work number is (717) 234-1240.
            loop2000.AllNM1.Loop2100A.PER_MemberCommunicationsNumbers = new PER_MemberCommunicationsNumbers();
            loop2000.AllNM1.Loop2100A.PER_MemberCommunicationsNumbers.ContactFunctionCode_01                = "IP";
            loop2000.AllNM1.Loop2100A.PER_MemberCommunicationsNumbers.CommunicationNumberQualifier_03       = "HP";
            loop2000.AllNM1.Loop2100A.PER_MemberCommunicationsNumbers.ResponseContactCommunicationNumber_04 = "7172343334";
            loop2000.AllNM1.Loop2100A.PER_MemberCommunicationsNumbers.CommunicationNumberQualifier_05       = "WP";
            loop2000.AllNM1.Loop2100A.PER_MemberCommunicationsNumbers.ResponseContactCommunicationNumber_06 = "7172341240";

            //  This is John's street address.
            loop2000.AllNM1.Loop2100A.N3_MemberResidenceStreetAddress = new N3_AdditionalPatientInformationContactAddress();
            loop2000.AllNM1.Loop2100A.N3_MemberResidenceStreetAddress.ResponseContactAddressLine_01 = "100 MARKET ST";
            loop2000.AllNM1.Loop2100A.N3_MemberResidenceStreetAddress.ResponseContactAddressLine_02 = "APT 3G";

            //  This is John's city, state zip code and county.
            loop2000.AllNM1.Loop2100A.N4_MemberCity_State_ZIPCode = new N4_AdditionalPatientInformationContactCity();
            loop2000.AllNM1.Loop2100A.N4_MemberCity_State_ZIPCode.AdditionalPatientInformationContactCityName_01            = "CAMP HILL";
            loop2000.AllNM1.Loop2100A.N4_MemberCity_State_ZIPCode.AdditionalPatientInformationContactStateCode_02           = "PA";
            loop2000.AllNM1.Loop2100A.N4_MemberCity_State_ZIPCode.AdditionalPatientInformationContactPostalZoneorZIPCode_03 = "17011";
            loop2000.AllNM1.Loop2100A.N4_MemberCity_State_ZIPCode.LocationQualifier_05  = "CY";
            loop2000.AllNM1.Loop2100A.N4_MemberCity_State_ZIPCode.LocationIdentifier_06 = "CUMBERLAND";

            //  This is John's date of birth and gender.
            loop2000.AllNM1.Loop2100A.DMG_MemberDemographics = new DMG_DependentDemographicInformation();
            loop2000.AllNM1.Loop2100A.DMG_MemberDemographics.DateTimePeriodFormatQualifier_01 = "D8";
            loop2000.AllNM1.Loop2100A.DMG_MemberDemographics.DependentBirthDate_02            = "19400816";
            loop2000.AllNM1.Loop2100A.DMG_MemberDemographics.DependentGenderCode_03           = "M";

            //  End 2100A Loop

            //  Repeating 2300 Loops
            loop2000.Loop2300 = new List <Loop_2300_834>();

            //  Begin 2300 Loop 1
            var loop23001 = new Loop_2300_834();

            //  John is enrolling in a health benefit.
            loop23001.HD_HealthCoverage = new HD_HealthCoverage();
            loop23001.HD_HealthCoverage.MaintenanceTypeCode_01 = "021";
            loop23001.HD_HealthCoverage.InsuranceLineCode_03   = "HLT";

            //  Repeating DTP
            loop23001.DTP_HealthCoverageDates = new List <DTP_HealthCoverageDates>();

            //  The benefits under this plan begin 6/01/1996.
            var dtp2 = new DTP_HealthCoverageDates();

            dtp2.DateTimeQualifier_01             = "348";
            dtp2.DateTimePeriodFormatQualifier_02 = "D8";
            dtp2.AccidentDate_03 = "19960601";
            loop23001.DTP_HealthCoverageDates.Add(dtp2);

            //  Repeating 2320 Loops
            loop23001.Loop2320 = new List <Loop_2320_834>();

            //  Begin 2320 Loop
            var loop23201 = new Loop_2320_834();

            //  This lets the carrier know that John has COB with another company.
            loop23201.COB_CoordinationofBenefits = new COB_CoordinationofBenefits();
            loop23201.COB_CoordinationofBenefits.PayerResponsibilitySequenceNumberCode_01 = "P";
            loop23201.COB_CoordinationofBenefits.MemberGrouporPolicyNumber_02             = "890111";
            loop23201.COB_CoordinationofBenefits.CoordinationofBenefitsCode_03            = "5";

            //  End 2320 Loop
            loop23001.Loop2320.Add(loop23201);

            //  End 2300 Loop 1
            loop2000.Loop2300.Add(loop23001);

            //  Begin 2300 Loop 2
            var loop23002 = new Loop_2300_834();

            //  John is enrolling in the Dental benefit.
            loop23002.HD_HealthCoverage = new HD_HealthCoverage();
            loop23002.HD_HealthCoverage.MaintenanceTypeCode_01 = "021";
            loop23002.HD_HealthCoverage.InsuranceLineCode_03   = "DEN";

            //  Repeating DTP
            loop23002.DTP_HealthCoverageDates = new List <DTP_HealthCoverageDates>();

            //  The benefits under this plan begin 6/01/1996.
            var dtp3 = new DTP_HealthCoverageDates();

            dtp3.DateTimeQualifier_01             = "348";
            dtp3.DateTimePeriodFormatQualifier_02 = "D8";
            dtp3.AccidentDate_03 = "19960601";
            loop23002.DTP_HealthCoverageDates.Add(dtp3);

            //  End 2300 Loop 2
            loop2000.Loop2300.Add(loop23002);

            //  Begin 2300 Loop 3
            var loop23003 = new Loop_2300_834();

            //  John is enrolling in the Vision benefit.
            loop23003.HD_HealthCoverage = new HD_HealthCoverage();
            loop23003.HD_HealthCoverage.MaintenanceTypeCode_01 = "021";
            loop23003.HD_HealthCoverage.InsuranceLineCode_03   = "VIS";

            //  Repeating DTP
            loop23003.DTP_HealthCoverageDates = new List <DTP_HealthCoverageDates>();

            //  The benefits under this plan begin 6/01/1996.
            var dtp4 = new DTP_HealthCoverageDates();

            dtp4.DateTimeQualifier_01             = "348";
            dtp4.DateTimePeriodFormatQualifier_02 = "D8";
            dtp4.AccidentDate_03 = "19960601";
            loop23003.DTP_HealthCoverageDates.Add(dtp4);

            //  End 2300 Loop 3
            loop2000.Loop2300.Add(loop23003);

            //  End 2000 Loop
            result.Loop2000.Add(loop2000);

            return(result);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Sample claim
        /// </summary>
        static TS834 CreateBenefit(string controlNumber)
        {
            string CurrentDate = DateTime.Now.ToString("yyyyMMdd");
            var    result      = new TS834();

            //Heading
            result.ST = new ST();
            result.ST.TransactionSetIdentifierCode_01       = "834";
            result.ST.TransactionSetControlNumber_02        = controlNumber.PadLeft(9, '0');
            result.ST.ImplementationConventionPreference_03 = "005010X222A1";
            result.BGN = new BGN();
            result.BGN.TransactionSetPurposeCode_01     = "00";
            result.BGN.TransactionSetReferenceNumber_02 = "WSU-WEY-20050221-1";
            result.BGN.TransactionSetCreationDate_03    = CurrentDate;
            result.BGN.TransactionSetCreationTime_04    = DateTime.Now.ToString("hhmmss");
            result.BGN.TimeZoneCode_05 = "PT"; //Optional but most Carriers use
            //result.BGN.ReferenceIdentification_06 = ""; //Not usually sent
            result.BGN.ActionCode_07 = "4";    //2 = Change, 4 = Verify, RX = replace
            //Optional REF
            result.REF_TransactionSetPolicyNumber = new REF();
            result.REF_TransactionSetPolicyNumber.ReferenceIdentificationQualifier_01 = "38";
            result.REF_TransactionSetPolicyNumber.ReferenceIdentification_02          = "01-23456";//Carrier/Vendor specific

            //Optional DTP
            result.DTP_FileEffectiveDate.DateTimeQualifier_01             = "007";
            result.DTP_FileEffectiveDate.DateTimePeriodFormatQualifier_02 = "D8";
            result.DTP_FileEffectiveDate.DateTimePeriod_03 = CurrentDate;

            //Optional QTY
            result.QTY_TransactionSetControlTotals = new QTY();
            result.QTY_TransactionSetControlTotals.QuantityQualifier_01 = "TO";
            result.QTY_TransactionSetControlTotals.Quantity_02          = "1";//Only one record for this example.

            //Loop 1000
            result.All_NM1 = new All_NM1();

            //Loop 1000A
            result.All_NM1.Loop_1000A = new Loop_1000A();
            result.All_NM1.Loop_1000A.NM1_SponsorName.EntityIdentifierCode_01 = "P5";
            result.All_NM1.Loop_1000A.NM1_SponsorName.Name_02 = "Sponsor Name";
            result.All_NM1.Loop_1000A.NM1_SponsorName.IdentificationCodeQualifier_03 = "FI";
            result.All_NM1.Loop_1000A.NM1_SponsorName.IdentificationCode_04          = "1223456";

            //Loop 1000B
            result.All_NM1.Loop_1000B = new Loop_1000B();
            result.All_NM1.Loop_1000B.NM1_PayerName.EntityIdentifierCode_01 = "IN";
            result.All_NM1.Loop_1000B.NM1_PayerName.Name_02 = "ABC PAYER";
            result.All_NM1.Loop_1000B.NM1_PayerName.IdentificationCodeQualifier_03 = "FI";
            result.All_NM1.Loop_1000B.NM1_PayerName.IdentificationCode_04          = "11-111111";

            //result.All_NM1.Loop_1000C = new Loop_1000C();
            //Usually brokers are optional fields

            //Loop 2000
            //INS
            result.Loop_2000 = new List <Loop_2000>();
            Loop_2000 Loop_2000 = new Loop_2000();

            Loop_2000.INS = new INS();
            Loop_2000.INS.YesNoConditionorResponseCode_01 = "Y";//Subscriber/Member record
            Loop_2000.INS.IndividualRelationshipCode_02   = "18";
            Loop_2000.INS.MaintenanceTypeCode_03          = "021";
            Loop_2000.INS.MaintenanceReasonCode_04        = "20";
            Loop_2000.INS.BenefitStatusCode_05            = "A";
            Loop_2000.INS.MedicarePlanCode_06             = "E";
            //Loop_2000.INS.ConsolidatedOmnibusBudgetReconciliationActCOBRAQualifyingEventCode_07 = "0";
            Loop_2000.INS.EmploymentStatusCode_08 = "AC";
            //Loop_2000.INS.StudentStatusCode_09 = "N";
            Loop_2000.INS.YesNoConditionorResponseCode_10 = "N";
            //Loop_2000.INS.DateTimePeriodFormatQualifier_11 = "";//Dealth Date: Carrier specific
            //Loop_2000.INS.DateTimePeriod_12 = "";
            Loop_2000.INS.ConfidentialityCode_13 = "";//Usually left blank.
            //Loop_2000.INS.CityName_14 = "City"; //14-17 usually not sent in favor of N3/N4 segments

            Loop_2000.Ref_SubscriberIdentifier = new REF();
            Loop_2000.Ref_SubscriberIdentifier.ReferenceIdentificationQualifier_01 = "0F";
            Loop_2000.Ref_SubscriberIdentifier.ReferenceIdentification_02          = "12345678";//typically a UUID or SSN

            Loop_2000.Ref_MemberSupplementalIdentifier = new REF();
            Loop_2000.Ref_MemberSupplementalIdentifier.ReferenceIdentificationQualifier_01 = "1L";
            Loop_2000.Ref_MemberSupplementalIdentifier.ReferenceIdentification_02          = "ABC123";//Group or Policy Number usually Carrier specific

            DTP DTP_MemberHireSegment = new DTP();

            DTP_MemberHireSegment.DateTimeQualifier_01             = "336";
            DTP_MemberHireSegment.DateTimePeriodFormatQualifier_02 = "D8";
            DTP_MemberHireSegment.DateTimePeriod_03 = "20170501";

            DTP DTP_MemberEffectiveSegment = new DTP();

            DTP_MemberEffectiveSegment.DateTimeQualifier_01             = "356";
            DTP_MemberEffectiveSegment.DateTimePeriodFormatQualifier_02 = "D8";
            DTP_MemberEffectiveSegment.DateTimePeriod_03 = "20170601";

            //Example term of coverage
            //DTP DTP_MemberEligibilityEndSegment = new DTP();
            //DTP_MemberEligibilityEndSegment.DateTimeQualifier_01 = "357";
            //DTP_MemberEligibilityEndSegment.DateTimePeriodFormatQualifier_02 = "D8";
            //DTP_MemberEligibilityEndSegment.DateTimePeriod_03 = "20171231";

            Loop_2000.DTP_MemberLevelDates.Add(DTP_MemberHireSegment);
            Loop_2000.DTP_MemberLevelDates.Add(DTP_MemberEffectiveSegment);
            result.Loop_2000.Add(Loop_2000);

            result.Loop_2100A = new List <Loop_2100A>();
            Loop_2100A Loop_2100A = new Loop_2100A();

            Loop_2100A.NM1_MemberName = new NM1();
            Loop_2100A.NM1_MemberName.EntityIdentifierCode_01 = "IL";
            Loop_2100A.NM1_MemberName.Name_02 = "1";
            Loop_2100A.NM1_MemberName.IdentificationCodeQualifier_03 = "MemberLastName";
            Loop_2100A.NM1_MemberName.IdentificationCode_04          = "MemberFirstname";
            //Optional Loop 2100A Segment NM1 05-09

            Loop_2100A.Per_MemberCommunicationNumbers = new PER();
            Loop_2100A.Per_MemberCommunicationNumbers.ContactFunctionCode_01 = "IP";
            //Loop_2100A.Per_MemberCommunicationNumbers.Name_02 = "abc123";
            Loop_2100A.Per_MemberCommunicationNumbers.CommunicationNumberQualifier_03 = "CP";
            Loop_2100A.Per_MemberCommunicationNumbers.CommunicationNumber_04          = "9991111111";
            //Optional Loop 2100A Segment Per

            Loop_2100A.N3_MemberResidenceStreetAddress = new N3_MemberResidenceStreetAddress();
            Loop_2100A.N3_MemberResidenceStreetAddress.Address_Information_01 = "444 Fake street";
            Loop_2100A.N3_MemberResidenceStreetAddress.Address_Information_02 = "Apt 300";

            Loop_2100A.N4_OtherSubscriberCity_State_ZIPCode = new N4_OtherSubscriberCity_State_ZIPCode();
            Loop_2100A.N4_OtherSubscriberCity_State_ZIPCode.OtherSubscriberCityName_01            = "TestCity";
            Loop_2100A.N4_OtherSubscriberCity_State_ZIPCode.OtherSubscriberStateorProvinceCode_02 = "CA";
            Loop_2100A.N4_OtherSubscriberCity_State_ZIPCode.OtherSubscriberPostalZoneorZIPCode_03 = "93710";
            //Loop_2100A.N4_OtherSubscriberCity_State_ZIPCode.CountryCode_04 = "US";//Optional. Only outside the US.
            //Loop_2100A.N4_OtherSubscriberCity_State_ZIPCode.LocationQualifier_05 = "";//Optional. 60 = Area and CY = Country/Parish
            //Loop_2100A.N4_OtherSubscriberCity_State_ZIPCode.LocationIdentifier_06 = "";//Optional. Carrier/Plan specific.
            //Loop_2100A.N4_OtherSubscriberCity_State_ZIPCode.CountrySubdivisionCode_07 = "";//Optional. Use country subdivision codes ISO 3166.

            Loop_2100A.DMG_MemberDemographicInformation = new DMG_MemberDemographicInformation();
            Loop_2100A.DMG_MemberDemographicInformation.DateTimePeriodFormatQualifier_01 = "D8";
            Loop_2100A.DMG_MemberDemographicInformation.SubscriberBirthDate_02           = "19330706";
            Loop_2100A.DMG_MemberDemographicInformation.SubscriberGenderCode_03          = "M";
            //Optional Loop 2100A Segment DMG 04-11

            //Optional sgment unless Carrier/Client specifically ask for it.
            Loop_2100A.EC_EmploymentClass = new EC_EmploymentClass();
            Loop_2100A.EC_EmploymentClass.EmpoymentClassCode_01 = "01";
            Loop_2100A.EC_EmploymentClass.EmpoymentClassCode_02 = "03";
            Loop_2100A.EC_EmploymentClass.EmpoymentClassCode_03 = "11";

            //Optional Member Income segment
            //Used for Carriers/Employeers that need specific member income amounts as part of billable plans.
            Loop_2100A.ICM_MemberIncome.FrequencyCode_01      = "1";//Typically weekly or monthly
            Loop_2100A.ICM_MemberIncome.MonetaryAmount_02     = "2000";
            Loop_2100A.ICM_MemberIncome.Quantity_03           = "40";
            Loop_2100A.ICM_MemberIncome.LocationIdentifier_04 = "93710"; //Most will default to a an internal location code or Zip
            Loop_2100A.ICM_MemberIncome.SalaryGrade_05        = "A";     //Abitrary Code set by the employeer

            //TODO: Optional Segments
            //AMT Member Policy Amounts
            //HLH Member Health Information
            //LUI Member Language
            //NM1 Member mailing Address
            //N3 Member Mail Street Address
            //N4 Member Mail city, State, Zip
            result.Loop_2100A.Add(Loop_2100A);

            //Loop 2200:
            //DSB Disability Info
            //DTP Disability Eligibility Dates

            //Loop 2300 (Required on most Carriers)
            result.Loop_2300 = new List <Loop_2300>();
            Loop_2300 Loop_2300 = new Loop_2300();

            Loop_2300.HD_HealthCoverage = new HD();
            Loop_2300.HD_HealthCoverage.MaintenanceTypeCode_01 = "026";
            //Loop_2300.HD_HealthCoverage.MaintenanceReasonCode_02 = "1";//usually Carrier specific
            Loop_2300.HD_HealthCoverage.InsuranceLineCode_03       = "PPO";
            Loop_2300.HD_HealthCoverage.PlanCoverageDescription_04 = "Test PPO Plan"; //Optional. Some carriers make this a required field with specific reporting values.
            Loop_2300.HD_HealthCoverage.CoverageLevelCode_05       = "EMP";           //Employee only is usually EMP or IND Carrier specific
            //06-07 almost never used
            Loop_2300.HD_HealthCoverage.UnderwritingDecisionCode_08     = "Y";        //Y/N value but can be removed if nessessary
            Loop_2300.HD_HealthCoverage.YesNoConditionorResponseCode_09 = "N";        //Sometimes used as a Late Enrollment Indicator

            DTP DTP_MaintenanceEffective = new DTP();

            DTP_MaintenanceEffective.DateTimeQualifier_01             = "303";
            DTP_MaintenanceEffective.DateTimePeriodFormatQualifier_02 = "D3";
            DTP_MaintenanceEffective.DateTimePeriod_03 = "20151001";
            Loop_2300.DTP_HealthCoverageDates.Add(DTP_MaintenanceEffective);

            DTP DTP_BenefitBegin = new DTP();

            DTP_BenefitBegin.DateTimeQualifier_01             = "348";
            DTP_BenefitBegin.DateTimePeriodFormatQualifier_02 = "348";
            DTP_BenefitBegin.DateTimePeriod_03 = "20150901";
            Loop_2300.DTP_HealthCoverageDates.Add(DTP_BenefitBegin);

            REF REF_ClientReportingCategory = new REF();

            REF_ClientReportingCategory.ReferenceIdentificationQualifier_01 = "17";
            REF_ClientReportingCategory.ReferenceIdentification_02          = "12345";
            Loop_2300.REF_HealthCoveragePolicyNumbers.Add(REF_ClientReportingCategory);

            REF REF_GroupPolicyNumber = new REF();

            REF_GroupPolicyNumber.ReferenceIdentificationQualifier_01 = "1L";
            REF_GroupPolicyNumber.ReferenceIdentification_02          = "54321";
            Loop_2300.REF_HealthCoveragePolicyNumbers.Add(REF_GroupPolicyNumber);

            result.Loop_2300.Add(Loop_2300);

            result.Loop_2310 = new List <Loop_2310>();
            Loop_2310 Loop_2310 = new Loop_2310();

            Loop_2310.LX_ProviderInformation = new LX();
            Loop_2310.LX_ProviderInformation.AssignedNumber_01 = "1";

            Loop_2310.NM1_ReferingProviderName = new NM1_ReferringProviderName();
            Loop_2310.NM1_ReferingProviderName.EntityIdentifierCode_01                 = "OD";
            Loop_2310.NM1_ReferingProviderName.EntityTypeQualifier_02                  = "1";
            Loop_2310.NM1_ReferingProviderName.ReferringProviderLastName_03            = "ABC Hospital";
            Loop_2310.NM1_ReferingProviderName.ReferringProviderFirstName_04           = "Care";
            Loop_2310.NM1_ReferingProviderName.ReferringProviderMiddleNameorInitial_05 = "A";
            Loop_2310.NM1_ReferingProviderName.NamePrefix_06 = "Sr";
            Loop_2310.NM1_ReferingProviderName.ReferringProviderNameSuffix_07 = "";
            Loop_2310.NM1_ReferingProviderName.IdentificationCodeQualifier_08 = "SV";
            Loop_2310.NM1_ReferingProviderName.ReferringProviderIdentifier_09 = "Doc PPO";
            Loop_2310.NM1_ReferingProviderName.EntityRelationshipCode_10      = "25";

            result.Loop_2310.Add(Loop_2310);

            result.Loop_2320 = new List <Loop_2320>();
            Loop_2320 Loop_2320 = new Loop_2320();

            Loop_2320.COB_CoordinationOfBenefits.PayerResponsibilitySequenceNumberCode_01 = "P";
            Loop_2320.COB_CoordinationOfBenefits.ReferenceIdentification_02    = "A";
            Loop_2320.COB_CoordinationOfBenefits.CoordinationofBenefitsCode_03 = "1";
            Loop_2320.COB_CoordinationOfBenefits.ServiceTypeCode_04            = "1";

            Loop_2320.REF_AdditionalCoordinationOfBenefitsIdentifiers = new List <REF>();
            REF REFAccountCode = new REF();

            REFAccountCode.ReferenceIdentificationQualifier_01 = "60";
            REFAccountCode.ReferenceIdentification_02          = "12345";
            Loop_2320.REF_AdditionalCoordinationOfBenefitsIdentifiers.Add(REFAccountCode);

            Loop_2320.DTP_CoordinationOfBenefitsEleigibilityDates = new List <DTP>();
            DTP DTP_CoordinationOfBenefitBegin = new DTP();

            DTP_CoordinationOfBenefitBegin.DateTimeQualifier_01             = "334";
            DTP_CoordinationOfBenefitBegin.DateTimePeriodFormatQualifier_02 = "D8";
            DTP_CoordinationOfBenefitBegin.DateTimePeriod_03 = "20150101";

            result.Loop_2320.Add(Loop_2320);

            Loop_2330 Loop_2330 = new Loop_2330();

            Loop_2330.NM1_CoordinationOfBenefitsRelatedEntity = new NM1_InsuranceProviderName();
            Loop_2330.NM1_CoordinationOfBenefitsRelatedEntity.EntityIdentifierCode_01        = "IN";
            Loop_2330.NM1_CoordinationOfBenefitsRelatedEntity.EntityTypeQualifier_02         = "2";
            Loop_2330.NM1_CoordinationOfBenefitsRelatedEntity.ReferringProviderLastName_03   = "Insurance";
            Loop_2330.NM1_CoordinationOfBenefitsRelatedEntity.ReferringProviderFirstName_04  = "ABC";
            Loop_2330.NM1_CoordinationOfBenefitsRelatedEntity.IdentificationCodeQualifier_08 = "FI";
            Loop_2330.NM1_CoordinationOfBenefitsRelatedEntity.ReferringProviderIdentifier_09 = "12-345678";
            //Misleading as "Loop" only contains NM1 element once.
            result.Loop_2330 = Loop_2330;

            //Optional Report Category
            //Misleading as "Loop" usually contains LX element only once.
            Loop_2700 Loop_2700 = new Loop_2700();

            Loop_2700.LX_MemberReportingCategories = new LX();
            Loop_2700.LX_MemberReportingCategories.AssignedNumber_01 = "2";

            return(result);
        }