cvc-complex-type.2.4.a: Invalid content was found starting with element 'thead'.

446 views
Skip to first unread message

sashc...@gmail.com

unread,
Sep 26, 2013, 10:05:58 AM9/26/13
to transport-t...@googlegroups.com
Hi,
While i was trying to validate my referral summary XML with Microbiology. I got this error

cvc-complex-type.2.4.a: Invalid content was found starting with element 'thead'. One of '{"urn:hl7-org:v3":tfoot, "urn:hl7-org:v3":tbody}' is expected.


I check my table in the text node it has two thead and one tbody. I manually inserted a tbody inside a table but the error remains the same. Please help me where i'm wrong.

This is my XML Lab results section text node part.

<cda:templateId root="2.16.840.1.113883.10.20.22.2.3.1" />
<cda:code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="RESULTS" />
<cda:title>Lab Results</cda:title>
<cda:text>
<table border="1" width="100%">
<thead>
<tr>
<th>Description</th>
<th>Value</th>
<th>Unit</th>
<th>Flag</th>
<th>Normal Range</th>
<th>Date/Time</th>
</tr>
</thead>
<tbody>
<tr>
<td>WBC Count</td>
<td>85.0</td>
<td>%-MG/ML</td>
<td></td>
<td></td>
<td>06/19/2013 23:49</td>
</tr>
</tbody>
</table>
<table border="1" width="100%">
<thead>
<tr>
<th colspan="30">MICROBIOLOGY</th>
</tr>
</thead>
<thead>
<tr>
<th>Test Code</th>
<th>Result</th>
</tr>
</thead>
<tbody>
<tr>
<td>EJ-SPUTUM CULT</td>
<td>Neg</td>
</tr>
</tbody>
</table>
</cda:text>

Regards,
Sash

Andrew McCaffrey

unread,
Sep 26, 2013, 10:18:15 AM9/26/13
to transport-t...@googlegroups.com
Hi,

In CDA R2, <thead> as a child of <table> has 0-1 cardinality, so it's
the second <thead> in the second <table> that's causing the problem. If
you re-write the HTML to eliminate the second thead, the error will go away.

FWIW, when debugging schema issues, I find it helpful to use a
schema-aware XML Editor (such as oXygen or XMLSpy) and let it highlight
the errors visually.
--
Andrew McCaffrey
andrew.m...@nist.gov
----
The words above do not necessarily reflect the opinions of my employers
or any organization I may be associated with. In fact, by the time you
read them, they may not even reflect my own opinions anymore.
----
Any mention of commercial products within NIST web pages or email is for
information only; it does not imply recommendation or endorsement by NIST.

Reply all
Reply to author
Forward
0 new messages