示例#1
0
        /// <summary>
        /// Sample claim
        /// </summary>
        static TS837 CreateClaim(string controlNumber)
        {
            var result = new TS837();

            result.ST = new ST();
            result.ST.TransactionSetIdentifierCode_01       = "837";
            result.ST.TransactionSetControlNumber_02        = controlNumber.PadLeft(9, '0');
            result.ST.ImplementationConventionPreference_03 = "005010X222A1";

            result.BHT_BeginningofHierarchicalTransaction = new BHT_BeginningofHierarchicalTransaction();
            result.BHT_BeginningofHierarchicalTransaction.HierarchicalStructureCode_01 = "0019";
            result.BHT_BeginningofHierarchicalTransaction.TransactionSetPurposeCode_02 = "00";
            result.BHT_BeginningofHierarchicalTransaction.OriginatorApplicationTransactionIdentifier_03 = "010";
            result.BHT_BeginningofHierarchicalTransaction.TransactionSetCreationDate_04 = "20170617";
            result.BHT_BeginningofHierarchicalTransaction.TransactionSetCreationTime_05 = "1741";
            result.BHT_BeginningofHierarchicalTransaction.ClaimorEncounterIdentifier_06 = "CH";

            result.All_NM1            = new All_NM1();
            result.All_NM1.Loop_1000A = new Loop_1000A();

            result.All_NM1.Loop_1000A.NM1_SubmitterName = new NM1_SubmitterName();
            result.All_NM1.Loop_1000A.NM1_SubmitterName.EntityIdentifierCode_01            = "41";
            result.All_NM1.Loop_1000A.NM1_SubmitterName.EntityTypeQualifier_02             = "2";
            result.All_NM1.Loop_1000A.NM1_SubmitterName.SubmitterLastorOrganizationName_03 = "SUBMITTER";
            result.All_NM1.Loop_1000A.NM1_SubmitterName.IdentificationCodeQualifier_08     = "46";
            result.All_NM1.Loop_1000A.NM1_SubmitterName.SubmitterIdentifier_09             = "ABC123";


            result.All_NM1.Loop_1000A.PER_SubmitterEDIContactInformation = new List <PER_SubmitterEDIContactInformation>();
            var per1 = new PER_SubmitterEDIContactInformation();

            per1.ContactFunctionCode_01          = "IC";
            per1.SubmitterContactName_02         = "BOB SMITH";
            per1.CommunicationNumberQualifier_03 = "TE";
            per1.CommunicationNumber_04          = "4805551212";
            result.All_NM1.Loop_1000A.PER_SubmitterEDIContactInformation.Add(per1);

            result.All_NM1.Loop_1000B = new Loop_1000B();

            result.All_NM1.Loop_1000B.NM1_ReceiverName = new NM1_ReceiverName();
            result.All_NM1.Loop_1000B.NM1_ReceiverName.EntityIdentifierCode_01        = "40";
            result.All_NM1.Loop_1000B.NM1_ReceiverName.EntityTypeQualifier_02         = "2";
            result.All_NM1.Loop_1000B.NM1_ReceiverName.ReceiverName_03                = "RECEIVER";
            result.All_NM1.Loop_1000B.NM1_ReceiverName.IdentificationCodeQualifier_08 = "46";
            result.All_NM1.Loop_1000B.NM1_ReceiverName.ReceiverPrimaryIdentifier_09   = "44556";

            result.Loop_2000A = new List <Loop_2000A>();
            var loop2000A1 = new Loop_2000A();

            loop2000A1.HL_BillingProviderHierarchicalLevel = new HL_BillingProviderHierarchicalLevel();
            loop2000A1.HL_BillingProviderHierarchicalLevel.HierarchicalIDNumber_01  = "1";
            loop2000A1.HL_BillingProviderHierarchicalLevel.HierarchicalLevelCode_03 = "20";
            loop2000A1.HL_BillingProviderHierarchicalLevel.HierarchicalChildCode_04 = "1";

            loop2000A1.All_NM1_2             = new All_NM1_2();
            loop2000A1.All_NM1_2.Loop_2010AA = new Loop_2010AA();
            loop2000A1.All_NM1_2.Loop_2010AA.NM1_BillingProviderName = new NM1_BillingProviderName();
            loop2000A1.All_NM1_2.Loop_2010AA.NM1_BillingProviderName.EntityIdentifierCode_01 = "85";
            loop2000A1.All_NM1_2.Loop_2010AA.NM1_BillingProviderName.EntityTypeQualifier_02  = "2";
            loop2000A1.All_NM1_2.Loop_2010AA.NM1_BillingProviderName.BillingProviderLastorOrganizationalName_03 = "BILLING PROVIDER";
            loop2000A1.All_NM1_2.Loop_2010AA.NM1_BillingProviderName.IdentificationCodeQualifier_08             = "XX";
            loop2000A1.All_NM1_2.Loop_2010AA.NM1_BillingProviderName.BillingProviderIdentifier_09 = "1122334455";

            loop2000A1.All_NM1_2.Loop_2010AA.N3_BillingProviderAddress = new N3_BillingProviderAddress();
            loop2000A1.All_NM1_2.Loop_2010AA.N3_BillingProviderAddress.BillingProviderAddressLine_01 = "1234 SOME ROAD";

            loop2000A1.All_NM1_2.Loop_2010AA.N4_BillingProviderCity_State_ZIPCode = new N4_BillingProviderCity_State_ZIPCode();
            loop2000A1.All_NM1_2.Loop_2010AA.N4_BillingProviderCity_State_ZIPCode.BillingProviderCityName_01            = "CHICAGO";
            loop2000A1.All_NM1_2.Loop_2010AA.N4_BillingProviderCity_State_ZIPCode.BillingProviderStateorProvinceCode_02 = "IL";
            loop2000A1.All_NM1_2.Loop_2010AA.N4_BillingProviderCity_State_ZIPCode.BillingProviderPostalZoneorZIPCode_03 = "606739999";

            loop2000A1.All_NM1_2.Loop_2010AA.All_REF = new All_REF();
            loop2000A1.All_NM1_2.Loop_2010AA.All_REF.REF_BillingProviderTaxIdentification = new REF_BillingProviderTaxIdentification();
            loop2000A1.All_NM1_2.Loop_2010AA.All_REF.REF_BillingProviderTaxIdentification
            .ReferenceIdentificationQualifier_01 = "EI";
            loop2000A1.All_NM1_2.Loop_2010AA.All_REF.REF_BillingProviderTaxIdentification
            .BillingProviderTaxIdentificationNumber_02 = "999999999";

            loop2000A1.Loop_2000B = new List <Loop_2000B>();

            var loop2000B1 = new Loop_2000B();

            loop2000B1.HL_SubscriberHierarchicalLevel = new HL_SubscriberHierarchicalLevel();
            loop2000B1.HL_SubscriberHierarchicalLevel.HierarchicalIDNumber_01       = "2";
            loop2000B1.HL_SubscriberHierarchicalLevel.HierarchicalParentIDNumber_02 = "1";
            loop2000B1.HL_SubscriberHierarchicalLevel.HierarchicalLevelCode_03      = "22";
            loop2000B1.HL_SubscriberHierarchicalLevel.HierarchicalChildCode_04      = "0";

            loop2000B1.SBR_SubscriberInformation = new SBR_SubscriberInformation();
            loop2000B1.SBR_SubscriberInformation.PayerResponsibilitySequenceNumberCode_01 = "P";
            loop2000B1.SBR_SubscriberInformation.IndividualRelationshipCode_02            = "18";
            loop2000B1.SBR_SubscriberInformation.ClaimFilingIndicatorCode_09 = "12";

            loop2000B1.All_NM1_3             = new All_NM1_3();
            loop2000B1.All_NM1_3.Loop_2010BA = new Loop_2010BA();
            loop2000B1.All_NM1_3.Loop_2010BA.NM1_SubscriberName = new NM1_SubscriberName();
            loop2000B1.All_NM1_3.Loop_2010BA.NM1_SubscriberName.EntityIdentifierCode_01        = "IL";
            loop2000B1.All_NM1_3.Loop_2010BA.NM1_SubscriberName.EntityTypeQualifier_02         = "1";
            loop2000B1.All_NM1_3.Loop_2010BA.NM1_SubscriberName.SubscriberLastName_03          = "BLOGGS";
            loop2000B1.All_NM1_3.Loop_2010BA.NM1_SubscriberName.SubscriberFirstName_04         = "JOE";
            loop2000B1.All_NM1_3.Loop_2010BA.NM1_SubscriberName.IdentificationCodeQualifier_08 = "MI";
            loop2000B1.All_NM1_3.Loop_2010BA.NM1_SubscriberName.SubscriberPrimaryIdentifier_09 = "1234567890";

            loop2000B1.All_NM1_3.Loop_2010BA.N3_SubscriberAddress = new N3_SubscriberAddress();
            loop2000B1.All_NM1_3.Loop_2010BA.N3_SubscriberAddress.SubscriberAddressLine_01 = "1 SOME BLVD";

            loop2000B1.All_NM1_3.Loop_2010BA.N4_SubscriberCity_State_ZIPCode = new N4_SubscriberCity_State_ZIPCode();
            loop2000B1.All_NM1_3.Loop_2010BA.N4_SubscriberCity_State_ZIPCode.SubscriberCityName_01            = "CHICAGO";
            loop2000B1.All_NM1_3.Loop_2010BA.N4_SubscriberCity_State_ZIPCode.SubscriberStateCode_02           = "IL";
            loop2000B1.All_NM1_3.Loop_2010BA.N4_SubscriberCity_State_ZIPCode.SubscriberPostalZoneorZIPCode_03 = "606129998";

            loop2000B1.All_NM1_3.Loop_2010BA.DMG_SubscriberDemographicInformation = new DMG_SubscriberDemographicInformation();
            loop2000B1.All_NM1_3.Loop_2010BA.DMG_SubscriberDemographicInformation.DateTimePeriodFormatQualifier_01 = "D8";
            loop2000B1.All_NM1_3.Loop_2010BA.DMG_SubscriberDemographicInformation.SubscriberBirthDate_02           = "19570111";
            loop2000B1.All_NM1_3.Loop_2010BA.DMG_SubscriberDemographicInformation.SubscriberGenderCode_03          = "M";

            loop2000B1.All_NM1_3.Loop_2010BB = new Loop_2010BB();
            loop2000B1.All_NM1_3.Loop_2010BB.NM1_PayerName = new NM1_PayerName();
            loop2000B1.All_NM1_3.Loop_2010BB.NM1_PayerName.EntityIdentifierCode_01        = "PR";
            loop2000B1.All_NM1_3.Loop_2010BB.NM1_PayerName.EntityTypeQualifier_02         = "2";
            loop2000B1.All_NM1_3.Loop_2010BB.NM1_PayerName.PayerName_03                   = "PAYER";
            loop2000B1.All_NM1_3.Loop_2010BB.NM1_PayerName.IdentificationCodeQualifier_08 = "PI";
            loop2000B1.All_NM1_3.Loop_2010BB.NM1_PayerName.PayerIdentifier_09             = "12345";

            loop2000B1.All_NM1_3.Loop_2010BB.N3_PayerAddress = new N3_PayerAddress();
            loop2000B1.All_NM1_3.Loop_2010BB.N3_PayerAddress.PayerAddressLine_01 = "1 PAYER WAY";

            loop2000B1.All_NM1_3.Loop_2010BB.N4_PayerCity_State_ZIPCode = new N4_PayerCity_State_ZIPCode();
            loop2000B1.All_NM1_3.Loop_2010BB.N4_PayerCity_State_ZIPCode.PayerCityName_01            = "ST LOUIS";
            loop2000B1.All_NM1_3.Loop_2010BB.N4_PayerCity_State_ZIPCode.PayerStateorProvinceCode_02 = "MO";
            loop2000B1.All_NM1_3.Loop_2010BB.N4_PayerCity_State_ZIPCode.PayerPostalZoneorZIPCode_03 = "212441850";

            loop2000B1.All_NM1_3.Loop_2010BB.All_REF_4 = new All_REF_4();
            loop2000B1.All_NM1_3.Loop_2010BB.All_REF_4.REF_PayerSecondaryIdentification = new List <REF_PayerSecondaryIdentification>();
            var refPayer1 = new REF_PayerSecondaryIdentification();

            refPayer1.ReferenceIdentificationQualifier_01 = "2U";
            refPayer1.PayerSecondaryIdentifier_02         = "W1014";

            loop2000B1.All_NM1_3.Loop_2010BB.All_REF_4.REF_PayerSecondaryIdentification.Add(refPayer1);

            loop2000B1.Loop_2300 = new List <Loop_2300>();
            var loop23001 = new Loop_2300();

            loop23001.CLM_ClaimInformation = new CLM_ClaimInformation();
            loop23001.CLM_ClaimInformation.PatientControlNumber_01   = "1000A";
            loop23001.CLM_ClaimInformation.TotalClaimChargeAmount_02 = "140";
            loop23001.CLM_ClaimInformation.HealthCareServiceLocationInformation_05 = new C023_HealthCareServiceLocationInformation();
            loop23001.CLM_ClaimInformation.HealthCareServiceLocationInformation_05.PlaceofServiceCode_01    = "19";
            loop23001.CLM_ClaimInformation.HealthCareServiceLocationInformation_05.FacilityCodeQualifier_02 = "B";
            loop23001.CLM_ClaimInformation.HealthCareServiceLocationInformation_05.ClaimFrequencyCode_03    = "1";
            loop23001.CLM_ClaimInformation.ProviderorSupplierSignatureIndicator_06     = "Y";
            loop23001.CLM_ClaimInformation.AssignmentorPlanParticipationCode_07        = "A";
            loop23001.CLM_ClaimInformation.BenefitsAssignmentCertificationIndicator_08 = "Y";
            loop23001.CLM_ClaimInformation.ReleaseofInformationCode_09 = "Y";

            loop23001.All_HI = new All_HI();
            loop23001.All_HI.HI_HealthCareDiagnosisCode = new HI_HealthCareDiagnosisCode();
            loop23001.All_HI.HI_HealthCareDiagnosisCode.HealthCareCodeInformation_01 = new C022_HealthCareCodeInformation();
            loop23001.All_HI.HI_HealthCareDiagnosisCode.HealthCareCodeInformation_01.DiagnosisTypeCode_01 = "ABK";
            loop23001.All_HI.HI_HealthCareDiagnosisCode.HealthCareCodeInformation_01.DiagnosisCode_02     = "I10";

            loop23001.Loop_2400 = new List <Loop_2400>();
            var loop24001 = new Loop_2400();

            loop24001.LX_ServiceLineNumber = new LX_ServiceLineNumber();
            loop24001.LX_ServiceLineNumber.AssignedNumber_01 = "1";

            loop24001.SV1_ProfessionalService = new SV1_ProfessionalService();
            loop24001.SV1_ProfessionalService.CompositeMedicalProcedureIdentifier_01 = new C003_CompositeMedicalProcedureIdentifier();
            loop24001.SV1_ProfessionalService.CompositeMedicalProcedureIdentifier_01.ProductorServiceIDQualifier_01 = "HC";
            loop24001.SV1_ProfessionalService.CompositeMedicalProcedureIdentifier_01.ProcedureCode_02 = "99213";
            loop24001.SV1_ProfessionalService.LineItemChargeAmount_02          = "140";
            loop24001.SV1_ProfessionalService.UnitorBasisforMeasurementCode_03 = "UN";
            loop24001.SV1_ProfessionalService.ServiceUnitCount_04 = "1";
            loop24001.SV1_ProfessionalService.CompositeDiagnosisCodePointer_07 = new C004_CompositeDiagnosisCodePointer();
            loop24001.SV1_ProfessionalService.CompositeDiagnosisCodePointer_07.DiagnosisCodePointer_01 = "1";

            loop24001.All_DTP_2 = new All_DTP_2();
            loop24001.All_DTP_2.DTP_Date_ServiceDate = new DTP_Date_ServiceDate();
            loop24001.All_DTP_2.DTP_Date_ServiceDate.DateTimeQualifier_01             = "472";
            loop24001.All_DTP_2.DTP_Date_ServiceDate.DateTimePeriodFormatQualifier_02 = "D8";
            loop24001.All_DTP_2.DTP_Date_ServiceDate.ServiceDate_03 = "20151124";

            loop23001.Loop_2400.Add(loop24001);
            loop2000B1.Loop_2300.Add(loop23001);
            loop2000A1.Loop_2000B.Add(loop2000B1);

            // from here

            var loop2000B2 = new Loop_2000B();

            loop2000B2.HL_SubscriberHierarchicalLevel = new HL_SubscriberHierarchicalLevel();
            loop2000B2.HL_SubscriberHierarchicalLevel.HierarchicalIDNumber_01       = "3";
            loop2000B2.HL_SubscriberHierarchicalLevel.HierarchicalParentIDNumber_02 = "1";
            loop2000B2.HL_SubscriberHierarchicalLevel.HierarchicalLevelCode_03      = "22";
            loop2000B2.HL_SubscriberHierarchicalLevel.HierarchicalChildCode_04      = "0";

            loop2000B2.SBR_SubscriberInformation = new SBR_SubscriberInformation();
            loop2000B2.SBR_SubscriberInformation.PayerResponsibilitySequenceNumberCode_01 = "P";
            loop2000B2.SBR_SubscriberInformation.IndividualRelationshipCode_02            = "18";
            loop2000B2.SBR_SubscriberInformation.ClaimFilingIndicatorCode_09 = "12";

            loop2000B2.All_NM1_3             = new All_NM1_3();
            loop2000B2.All_NM1_3.Loop_2010BA = new Loop_2010BA();
            loop2000B2.All_NM1_3.Loop_2010BA.NM1_SubscriberName = new NM1_SubscriberName();
            loop2000B2.All_NM1_3.Loop_2010BA.NM1_SubscriberName.EntityIdentifierCode_01        = "IL";
            loop2000B2.All_NM1_3.Loop_2010BA.NM1_SubscriberName.EntityTypeQualifier_02         = "1";
            loop2000B2.All_NM1_3.Loop_2010BA.NM1_SubscriberName.SubscriberLastName_03          = "BLOGGS";
            loop2000B2.All_NM1_3.Loop_2010BA.NM1_SubscriberName.SubscriberFirstName_04         = "FRED";
            loop2000B2.All_NM1_3.Loop_2010BA.NM1_SubscriberName.IdentificationCodeQualifier_08 = "MI";
            loop2000B2.All_NM1_3.Loop_2010BA.NM1_SubscriberName.SubscriberPrimaryIdentifier_09 = "9876543201";

            loop2000B2.All_NM1_3.Loop_2010BA.N3_SubscriberAddress = new N3_SubscriberAddress();
            loop2000B2.All_NM1_3.Loop_2010BA.N3_SubscriberAddress.SubscriberAddressLine_01 = "1 ANOTHER STR";

            loop2000B2.All_NM1_3.Loop_2010BA.N4_SubscriberCity_State_ZIPCode = new N4_SubscriberCity_State_ZIPCode();
            loop2000B2.All_NM1_3.Loop_2010BA.N4_SubscriberCity_State_ZIPCode.SubscriberCityName_01            = "CHICAGO";
            loop2000B2.All_NM1_3.Loop_2010BA.N4_SubscriberCity_State_ZIPCode.SubscriberStateCode_02           = "IL";
            loop2000B2.All_NM1_3.Loop_2010BA.N4_SubscriberCity_State_ZIPCode.SubscriberPostalZoneorZIPCode_03 = "606129998";

            loop2000B2.All_NM1_3.Loop_2010BA.DMG_SubscriberDemographicInformation = new DMG_SubscriberDemographicInformation();
            loop2000B2.All_NM1_3.Loop_2010BA.DMG_SubscriberDemographicInformation.DateTimePeriodFormatQualifier_01 = "D8";
            loop2000B2.All_NM1_3.Loop_2010BA.DMG_SubscriberDemographicInformation.SubscriberBirthDate_02           = "19700601";
            loop2000B2.All_NM1_3.Loop_2010BA.DMG_SubscriberDemographicInformation.SubscriberGenderCode_03          = "M";

            loop2000B2.All_NM1_3.Loop_2010BB = new Loop_2010BB();
            loop2000B2.All_NM1_3.Loop_2010BB.NM1_PayerName = new NM1_PayerName();
            loop2000B2.All_NM1_3.Loop_2010BB.NM1_PayerName.EntityIdentifierCode_01        = "PR";
            loop2000B2.All_NM1_3.Loop_2010BB.NM1_PayerName.EntityTypeQualifier_02         = "2";
            loop2000B2.All_NM1_3.Loop_2010BB.NM1_PayerName.PayerName_03                   = "PAYER";
            loop2000B2.All_NM1_3.Loop_2010BB.NM1_PayerName.IdentificationCodeQualifier_08 = "PI";
            loop2000B2.All_NM1_3.Loop_2010BB.NM1_PayerName.PayerIdentifier_09             = "12345";

            loop2000B2.All_NM1_3.Loop_2010BB.N3_PayerAddress = new N3_PayerAddress();
            loop2000B2.All_NM1_3.Loop_2010BB.N3_PayerAddress.PayerAddressLine_01 = "1 PAYER WAY";

            loop2000B2.All_NM1_3.Loop_2010BB.N4_PayerCity_State_ZIPCode = new N4_PayerCity_State_ZIPCode();
            loop2000B2.All_NM1_3.Loop_2010BB.N4_PayerCity_State_ZIPCode.PayerCityName_01            = "ST LOUIS";
            loop2000B2.All_NM1_3.Loop_2010BB.N4_PayerCity_State_ZIPCode.PayerStateorProvinceCode_02 = "MO";
            loop2000B2.All_NM1_3.Loop_2010BB.N4_PayerCity_State_ZIPCode.PayerPostalZoneorZIPCode_03 = "212441850";

            loop2000B2.All_NM1_3.Loop_2010BB.All_REF_4 = new All_REF_4();
            loop2000B2.All_NM1_3.Loop_2010BB.All_REF_4.REF_PayerSecondaryIdentification = new List <REF_PayerSecondaryIdentification>();
            var refPayer2 = new REF_PayerSecondaryIdentification();

            refPayer2.ReferenceIdentificationQualifier_01 = "2U";
            refPayer2.PayerSecondaryIdentifier_02         = "W1014";

            loop2000B2.All_NM1_3.Loop_2010BB.All_REF_4.REF_PayerSecondaryIdentification.Add(refPayer2);

            loop2000B2.Loop_2300 = new List <Loop_2300>();
            var loop23002 = new Loop_2300();

            loop23002.CLM_ClaimInformation = new CLM_ClaimInformation();
            loop23002.CLM_ClaimInformation.PatientControlNumber_01   = "1001A";
            loop23002.CLM_ClaimInformation.TotalClaimChargeAmount_02 = "140";
            loop23002.CLM_ClaimInformation.HealthCareServiceLocationInformation_05 = new C023_HealthCareServiceLocationInformation();
            loop23002.CLM_ClaimInformation.HealthCareServiceLocationInformation_05.PlaceofServiceCode_01    = "19";
            loop23002.CLM_ClaimInformation.HealthCareServiceLocationInformation_05.FacilityCodeQualifier_02 = "B";
            loop23002.CLM_ClaimInformation.HealthCareServiceLocationInformation_05.ClaimFrequencyCode_03    = "1";
            loop23002.CLM_ClaimInformation.ProviderorSupplierSignatureIndicator_06     = "Y";
            loop23002.CLM_ClaimInformation.AssignmentorPlanParticipationCode_07        = "A";
            loop23002.CLM_ClaimInformation.BenefitsAssignmentCertificationIndicator_08 = "Y";
            loop23002.CLM_ClaimInformation.ReleaseofInformationCode_09 = "Y";

            loop23002.All_HI = new All_HI();
            loop23002.All_HI.HI_HealthCareDiagnosisCode = new HI_HealthCareDiagnosisCode();
            loop23002.All_HI.HI_HealthCareDiagnosisCode.HealthCareCodeInformation_01 = new C022_HealthCareCodeInformation();
            loop23002.All_HI.HI_HealthCareDiagnosisCode.HealthCareCodeInformation_01.DiagnosisTypeCode_01 = "ABK";
            loop23002.All_HI.HI_HealthCareDiagnosisCode.HealthCareCodeInformation_01.DiagnosisCode_02     = "I10";

            loop23002.Loop_2400 = new List <Loop_2400>();
            var loop24002 = new Loop_2400();

            loop24002.LX_ServiceLineNumber = new LX_ServiceLineNumber();
            loop24002.LX_ServiceLineNumber.AssignedNumber_01 = "1";

            loop24002.SV1_ProfessionalService = new SV1_ProfessionalService();
            loop24002.SV1_ProfessionalService.CompositeMedicalProcedureIdentifier_01 = new C003_CompositeMedicalProcedureIdentifier();
            loop24002.SV1_ProfessionalService.CompositeMedicalProcedureIdentifier_01.ProductorServiceIDQualifier_01 = "HC";
            loop24002.SV1_ProfessionalService.CompositeMedicalProcedureIdentifier_01.ProcedureCode_02 = "99213";
            loop24002.SV1_ProfessionalService.LineItemChargeAmount_02          = "140";
            loop24002.SV1_ProfessionalService.UnitorBasisforMeasurementCode_03 = "UN";
            loop24002.SV1_ProfessionalService.ServiceUnitCount_04 = "1";
            loop24002.SV1_ProfessionalService.CompositeDiagnosisCodePointer_07 = new C004_CompositeDiagnosisCodePointer();
            loop24002.SV1_ProfessionalService.CompositeDiagnosisCodePointer_07.DiagnosisCodePointer_01 = "1";

            loop24002.All_DTP_2 = new All_DTP_2();
            loop24002.All_DTP_2.DTP_Date_ServiceDate = new DTP_Date_ServiceDate();
            loop24002.All_DTP_2.DTP_Date_ServiceDate.DateTimeQualifier_01             = "472";
            loop24002.All_DTP_2.DTP_Date_ServiceDate.DateTimePeriodFormatQualifier_02 = "D8";
            loop24002.All_DTP_2.DTP_Date_ServiceDate.ServiceDate_03 = "20151124";

            loop23002.Loop_2400.Add(loop24002);
            loop2000B2.Loop_2300.Add(loop23002);
            loop2000A1.Loop_2000B.Add(loop2000B2);

            result.Loop_2000A.Add(loop2000A1);

            return(result);
        }
示例#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);
        }