none
EDI 837D To Destination Schema Output Validation Errors RRS feed

  • Question

  • Ok, I've been stumped by this for a couple of days, but as I'm new to the whole world Biztalk AND XML/XSD that is easily done.  I am attempting to pull data from an 837D and populate it into an insurance claims system that sits on SQL 2000.  Our destination table structures are quite primitive and only slightly normalized.  Basically there is a "Header" table and a "Detail" table that will contain all the data from the original EDI file.  I'm having a difficult time creating the target schema for this (at least that is what the error messages have led me to believe).  As it stands now, I've simply created a schema that looks just like the target database tables (included below).  However, when I attempt to "Test Map" I get the following error messages (I can provide the map file, if necessary):

     

    Error 213 Output validation error: The element 'Header' has incomplete content. List of possible elements expected: 'TransactionType'. C:\Documents and Settings\acrouch\Local Settings\Temp\_MapData\837DtoFlat_output.xml

     

    Error 214 Output validation error: The element 'Root' in namespace 'http://PHP_EDI.Schema1' has invalid child element 'Header'. C:\Documents and Settings\acrouch\Local Settings\Temp\_MapData\837DtoFlat_output.xml 

    Here is the target schema I have created:

     

    Code Snippet

    <?xml version="1.0" encoding="utf-16"?>
    <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003http://schemas.microsoft.com/BizTalk/2003">http://schemas.microsoft.com/BizTalk/2003</A< A>>" xmlns="http://PHP_EDI.Schema1http://PHP_EDI.Schema1">http://PHP_EDI.Schema1</A< A>>" targetNamespace="http://PHP_EDI.Schema1http://PHP_EDI.Schema1">http://PHP_EDI.Schema1</A< A>>" xmlns:xs="http://www.w3.org/2001/XMLSchema">
     '>http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema">
     ; <xs:element name="Root">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Header">
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="TransactionType" type="xs:string" />
                  <xs:element name="PreAuthorizationNbr" type="xs:string" />
                  <xs:element name="VendorName" type="xs:string" />
                  <xs:element name="VendorAddress" type="xs:string" />
                  <xs:element name="VendorCity" type="xs:string" />
                  <xs:element name="VendorState" type="xs:string" />
                  <xs:element name="VendorZipCode" type="xs:string" />
                  <xs:element name="OtherCoverage" type="xs:string" />
                  <xs:element name="OtherCoverageSubcriberLName" type="xs:string" />
                  <xs:element name="OtherCoverageSubscriberFName" type="xs:string" />
                  <xs:element name="OtherCoverageSubscriberMName" type="xs:string" />
                  <xs:element name="OtherCoverageSubscriberDOB" type="xs:string" />
                  <xs:element name="OtherCoverageSubscriberGender" type="xs:string" />
                  <xs:element name="OtherCoverageSubscriberID" type="xs:string" />
                  <xs:element name="OtherCoveragePlanOrGroupNbr" type="xs:string" />
                  <xs:element name="OtherCoverageRelationship" type="xs:string" />
                  <xs:element name="OtherCoverageVendorName" type="xs:string" />
                  <xs:element name="OtherCoverageVendorAddress" type="xs:string" />
                  <xs:element name="OtherCoverageVendorCity" type="xs:string" />
                  <xs:element name="OtherCoverageVendorState" type="xs:string" />
                  <xs:element name="OtherCoverZipCode" type="xs:string" />
                  <xs:element name="SubscriberLName" type="xs:string" />
                  <xs:element name="SubscriberFName" type="xs:string" />
                  <xs:element name="SubscriberMName" type="xs:string" />
                  <xs:element name="SubscriberSuffix" type="xs:string" />
                  <xs:element name="SubscriberAddress" type="xs:string" />
                  <xs:element name="SubscriberCity" type="xs:string" />
                  <xs:element name="SubscriberState" type="xs:string" />
                  <xs:element name="SubscriberZipCode" type="xs:string" />
                  <xs:element name="SubscriberDOB" type="xs:string" />
                  <xs:element name="SubscriberGender" type="xs:string" />
                  <xs:element name="SubscriberSSNOrID" type="xs:string" />
                  <xs:element name="SubscriberPlanOrGroupNbr" type="xs:string" />
                  <xs:element name="SubscriberEmployerName" type="xs:string" />
                  <xs:element name="PatientRelationshipToSubscriber" type="xs:string" />
                  <xs:element name="PatientStudentStatus" type="xs:string" />
                  <xs:element name="PatientLName" type="xs:string" />
                  <xs:element name="PatientFName" type="xs:string" />
                  <xs:element name="PatientMName" type="xs:string" />
                  <xs:element name="PatientAddress" type="xs:string" />
                  <xs:element name="PatientCity" type="xs:string" />
                  <xs:element name="PatientState" type="xs:string" />
                  <xs:element name="PatientZipCode" type="xs:string" />
                  <xs:element name="PatientDOB" type="xs:string" />
                  <xs:element name="PatientGender" type="xs:string" />
                  <xs:element name="PatientID" type="xs:string" />
                  <xs:element name="SumOtherFees" type="xs:string" />
                  <xs:element name="TotalFee" type="xs:string" />
                  <xs:element name="Remarks" type="xs:string" />
                  <xs:element name="InsuredSignature" type="xs:string" />
                  <xs:element name="PatientSignature" type="xs:string" />
                  <xs:element name="PlaceOfTreatment" type="xs:string" />
                  <xs:element name="NbrOfRadiographs" type="xs:string" />
                  <xs:element name="NbrOfImages" type="xs:string" />
                  <xs:element name="NbrOfModels" type="xs:string" />
                  <xs:element name="Orthodontics" type="xs:string" />
                  <xs:element name="DateAppliancePlaced" type="xs:string" />
                  <xs:element name="MonthsRemainingOfTreatment" type="xs:string" />
                  <xs:element name="ReplacementOfProsthesis" type="xs:string" />
                  <xs:element name="DatePriorReplacement" type="xs:string" />
                  <xs:element name="TreatmentResultingFrom1" type="xs:string" />
                  <xs:element name="TreatmentResultingFrom2" type="xs:string" />
                  <xs:element name="TreatmentResultingFrom3" type="xs:string" />
                  <xs:element name="DateOfAccident" type="xs:string" />
                  <xs:element name="AutoAccidentState" type="xs:string" />
                  <xs:element name="BillingProviderLName" type="xs:string" />
                  <xs:element name="BillingProviderFName" type="xs:string" />
                  <xs:element name="BillingProviderMName" type="xs:string" />
                  <xs:element name="BillingProviderSuffix" type="xs:string" />
                  <xs:element name="BillingProviderAddress" type="xs:string" />
                  <xs:element name="BillingProviderCity" type="xs:string" />
                  <xs:element name="BillingProviderState" type="xs:string" />
                  <xs:element name="BillingProviderZipCode" type="xs:string" />
                  <xs:element name="BillingProviderNPI" type="xs:string" />
                  <xs:element name="BillingProviderLicenseNbr" type="xs:string" />
                  <xs:element name="BillingProviderSSNOrTIN" type="xs:string" />
                  <xs:element name="BillingProviderPhoneNbr" type="xs:string" />
                  <xs:element name="BillingProviderAdditionalID" type="xs:string" />
                  <xs:element name="TreatingProviderLName" type="xs:string" />
                  <xs:element name="TreatingProviderFName" type="xs:string" />
                  <xs:element name="TreatingProviderMName" type="xs:string" />
                  <xs:element name="TreatingProviderAddress" type="xs:string" />
                  <xs:element name="TreatingProviderCity" type="xs:string" />
                  <xs:element name="TreatingProviderState" type="xs:string" />
                  <xs:element name="TreatingProviderZipCode" type="xs:string" />
                  <xs:element name="TreatingProviderNPI" type="xs:string" />
                  <xs:element name="TreatingProviderLicenseNbr" type="xs:string" />
                  <xs:element name="TreatingProviderSpecialtyCode" type="xs:string" />
                  <xs:element name="TreatingProviderPhoneNbr" type="xs:string" />
                  <xs:element name="TreatingProviderAdditionalID" type="xs:string" />
                  <xs:element name="Detail">
                    <xs:complexType>
                      <xs:sequence>
                        <xs:element name="ProcedureDate" type="xs:string" />
                        <xs:element name="AreaOfOralCavity" type="xs:string" />
                        <xs:element name="ToothNumbersOrLetters" type="xs:string" />
                        <xs:element name="ToothSurface" type="xs:string" />
                        <xs:element name="ProcedureCode" type="xs:string" />
                        <xs:element name="Description" type="xs:string" />
                        <xs:element name="Fee" type="xs:string" />
                      </xs:sequence>
                    </xs:complexType>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>

     

     

    Tuesday, March 18, 2008 3:34 PM

Answers

  • One possibility:  You will see this error a lot when you have mandatory fields and one is missing data.  In this case, the error would indicate that the field TransactionType was missing data.  Make sure you have data in all mandatories.
    Tuesday, March 18, 2008 6:33 PM
  • It may still be more of the above.

    The default (ie - if its missing) minOccurs and maxOccurs for any element in XSD is 1/1. So it could be that you have two detail elements and have no max specified...

    I usually try to rescue the failed XML from BizTalk and look at it. My guess is it will 'leap out at you' when you see what BizTalk is trying to validate.

    You might also have some success testing in the mapper.
    Wednesday, March 19, 2008 5:21 PM

All replies

  • One possibility:  You will see this error a lot when you have mandatory fields and one is missing data.  In this case, the error would indicate that the field TransactionType was missing data.  Make sure you have data in all mandatories.
    Tuesday, March 18, 2008 6:33 PM
  • Jim, thank you so much for your reply.  In fact, I had this same thought shortly before I read your post and was in the process of updating this post with my findings.  I changed the minOccurs to be 0 for my elements and it seemed to fix the problem, although it either created or uncovered another.  I am now receiving the following 2 errors:

     

    Error 97 Output validation error: The element 'Header' in namespace 'http://PHP_EDI.ClaimFlatElements' has invalid child element 'Detail' in namespace 'http://PHP_EDI.ClaimFlatElements'. List of possible elements expected: 'TransactionType, PreAuthorizationNbr, VendorName, VendorAddress, VendorCity, VendorState, VendorZipCode, OtherCoverage, OtherCoverageSubcriberLName, OtherCoverageSubscriberFName, OtherCoverageSubscriberMName, OtherCoverageSubscriberDOB, OtherCoverageSubscriberGender, OtherCoverageSubscriberID, OtherCoveragePlanOrGroupNbr, OtherCoverageRelationship, OtherCoverageVendorName, OtherCoverageVendorAddress, OtherCoverageVendorCity, OtherCoverageVendorState, OtherCoverZipCode, SubscriberLName, SubscriberFName, SubscriberMName, SubscriberSuffix, SubscriberAddress, SubscriberCity, SubscriberState, SubscriberZipCode, SubscriberDOB, SubscriberGender, SubscriberSSNOrID, SubscriberPlanOrGroupNbr, SubscriberEmployerName, PatientRelationshipToSubscriber, PatientStudentStatus, PatientLName, PatientFName, PatientMName, PatientAddress, PatientCity, PatientState, PatientZipCode, PatientDOB, PatientGender, PatientID, SumOtherFees, TotalFee, Remarks, InsuredSignature, PatientSignature, PlaceOfTreatment, NbrOfRadiographs, NbrOf.... C:\Documents and Settings\acrouch\Local Settings\Temp\_MapData\837DtoFlat_output.xml 

    and

     

    Error 178 Output validation error: The element 'Header' in namespace 'http://PHP_EDI.ClaimFlatElements' has incomplete content. List of possible elements expected: 'TransactionType, PreAuthorizationNbr, VendorName, VendorAddress, VendorCity, VendorState, VendorZipCode, OtherCoverage, OtherCoverageSubcriberLName, OtherCoverageSubscriberFName, OtherCoverageSubscriberMName, OtherCoverageSubscriberDOB, OtherCoverageSubscriberGender, OtherCoverageSubscriberID, OtherCoveragePlanOrGroupNbr, OtherCoverageRelationship, OtherCoverageVendorName, OtherCoverageVendorAddress, OtherCoverageVendorCity, OtherCoverageVendorState, OtherCoverZipCode, SubscriberLName, SubscriberFName, SubscriberMName, SubscriberSuffix, SubscriberAddress, SubscriberCity, SubscriberState, SubscriberZipCode, SubscriberDOB, SubscriberGender, SubscriberSSNOrID, SubscriberPlanOrGroupNbr, SubscriberEmployerName, PatientRelationshipToSubscriber, PatientStudentStatus, PatientLName, PatientFName, PatientMName, PatientAddress, PatientCity, PatientState, PatientZipCode, PatientDOB, PatientGender, PatientID, SumOtherFees, TotalFee, Remarks, InsuredSignature, PatientSignature, PlaceOfTreatment, NbrOfRadiographs, NbrOf.... C:\Documents and Settings\acrouch\Local Settings\Temp\_MapData\837DtoFlat_output.xml 

     

    I am getting the above 2 errors a great many times, in fact I'm thinking for each occurence of a claim in the incoming EDI file.  Any ideas for this one?

     

    Thanks ahead of time!

    Tuesday, March 18, 2008 6:46 PM
  • It may still be more of the above.

    The default (ie - if its missing) minOccurs and maxOccurs for any element in XSD is 1/1. So it could be that you have two detail elements and have no max specified...

    I usually try to rescue the failed XML from BizTalk and look at it. My guess is it will 'leap out at you' when you see what BizTalk is trying to validate.

    You might also have some success testing in the mapper.
    Wednesday, March 19, 2008 5:21 PM
  •  

    RIGHT ON!!!  You were correct.  After specifying the maxOccurs for the elements in question, my map tested out perfectly.  Thanks again all!
    Wednesday, March 19, 2008 5:33 PM