CCR schema validation error RRS feed

  • Question

  • Hi,

    I tried to verify a sample CCR xml document using "Verify XML against schema" utility on http://developer.healthvault.com/types/verifytypexml.aspx?id=1e1ccbfc-a55d-4d91-8940-fa2fbf73c195 but get error below. The CCR only contains <body> with <medications>.


    Schema Validation Error

    The schema could not be validated: The element 'Medication' in namespace 'urn:astm-org:CCR' has invalid child element 'Status' in namespace 'urn:astm-org:CCR'. List of possible elements expected: 'CCRDataObjectID' in namespace 'urn:astm-org:CCR'.


    Can someone please verify the xml and let me know what needs to be done for successful validation.





    Code Snippet

    <ContinuityOfCareRecord xmlns="urn:astm-org:CCR" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:astm-org:CCR CCR_20051109.xsd">
       <ActorID>John Doe</ActorID>
        <ActorID>John Doe</ActorID>
          <Type><Text>Prescription Date</Text></Type>
              <ActorID>John Doe</ActorID>
           <ActorRole>Prescribing clinician</ActorRole>
                   <Type><Text>Dispense date</Text></Type>





    Thursday, July 17, 2008 2:23 PM


All replies

  • It's in the error that you are getting - it's telling you that the child element Status is invalid *at that position*.


    A quick look at the schema shows that CCRDataObjectID element is required, so you need to have one of those before the status element.

    Thursday, July 17, 2008 4:23 PM
  • I added CCRDataObjectID but now validation error for some other tag. We are on Java platform and will be using the Java API. I am manually trying to create the XML but ran into these errors. Can you please point to some resources that will help generate CCR with medications?




    Thursday, July 17, 2008 9:22 PM
  • On little internet search it seems like http://www.centerforhit.org/PreBuilt/ccr/ccrsample_Healthvision.xml has a valid CCR XML sample with medications.




    Thursday, July 17, 2008 9:59 PM

    Thanks that helped a lot. Is it mandatory to use the type-ids in http://developer.healthvault.com/types/types.aspx? I was able to add CCR with value in the sample. Can the value of CCRDocumentObjectID be replaced?
    Monday, July 21, 2008 1:26 PM
  • HealthVault doesn't do anything with CCRDocumentObjectID. The schema comes from the foks who designed CCR, so the appropriate thing to do with that element is defined by them.

    Monday, July 21, 2008 5:27 PM
  • Got it...I was confused and misunderstood CCRDocumentObjectID with type-id. I am using HealthVaultJavaLib and successfully "put" a sample CCR but got exception when changed the type-id.


    Code Snippet


     <ContinuityOfCareRecord xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:astm-org:CCR">








    Monday, July 21, 2008 6:20 PM
  • <Medication> has a child element <FulfillmentHistory><Fulfillment></Fulfillment></FulfillmentHistory>. But the CCR html viewed on HV does not display it. Only Medication Date Status Form Strength Quantity SIG Indications Instruction Refills Source are displayed. Can someone please let me know why <FulfillmentHistory> is not displayed?




    Monday, July 21, 2008 7:37 PM
  • The transform being used to display the CCR was obtained from the ASTM (developer of the CCR format).  You would have to ask them why they chose not to display this piece of information.


    Jeff Jones


    Tuesday, July 22, 2008 5:03 PM