Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Model Driven Health Tools » Error while validating VDT Ambulatory Summary in edge tool
Error while validating VDT Ambulatory Summary in edge tool [message #1793085] Tue, 31 July 2018 00:57 Go to next message
Kalyan Dasika is currently offline Kalyan DasikaFriend
Messages: 14
Registered: December 2015
Junior Member
I'm getting the following error while validating VDT Ambulatory Summary xml using the R1.1 & R2.1 online validator at https://ttpedge.sitenv.org/ttp/#/validators/ccdar2

cvc-complex-type.2.4.a: Invalid content was found starting with element 'table'. One of '{"urn:hl7-org:v3":tr}' is expected.
Line number: Line number not available


I'm getting similar errors on other types of CDA document using the online validator. Inline validation works fine. My version of mdht libraries 3.0.0.201709200502

The xml is pretty big with many <table> tags, where do I start?

Any help is appreciated.

(Attached file is a fictitious - not real PHI)

Thanks,
Kalyan

Re: Error while validating VDT Ambulatory Summary in edge tool [message #1793136 is a reply to message #1793085] Tue, 31 July 2018 14:08 Go to previous messageGo to next message
Sean Muir is currently offline Sean MuirFriend
Messages: 63
Registered: September 2015
Member
Kalyan - you have a sub table under TBody in the plan of care section - the CDA subset of XHTML does not support such a structure ; the NarrativeBlock.xsd in the CDA zip has the definition of the narrative

hth

sean
Re: Error while validating VDT Ambulatory Summary in edge tool [message #1793137 is a reply to message #1793085] Tue, 31 July 2018 14:10 Go to previous messageGo to next message
Sean Muir is currently offline Sean MuirFriend
Messages: 63
Registered: September 2015
Member
Kalyan - you have a sub table under TBody in the plan of care section - the CDA subset of XHTML does not support such a structure ; the NarrativeBlock.xsd in the CDA zip has the definition of the narrative

btw - the error showing up on line 0 is limitation of the current schema validation being used - it is a known issue but we have not had time to update the version of the schema to get the line

hth

sean
Re: Error while validating VDT Ambulatory Summary in edge tool [message #1793152 is a reply to message #1793137] Tue, 31 July 2018 16:56 Go to previous messageGo to next message
Kalyan Dasika is currently offline Kalyan DasikaFriend
Messages: 14
Registered: December 2015
Junior Member
Hi Sean:

Thank you for the response. If I could include the narrative block validation as part of generating the xml how would I do that?
Should I use an xml parser api to do this? or is there some way for the mdht api to do this validation.?

We've been validating all our xmls at the time of generation (at runtime) using the following:

	public void validate(ClinicalDocument clinicalDocument){
		// must load Consol package to validate those templates
		ConsolPackage.eINSTANCE.eClass();
		ValidationResult result = new ValidationResult();
		EClass docType = Mu2consolPackage.eINSTANCE.getClinicalOfficeVisitSummary();
		try {
			String xml = getCdaSummaryXml();
			ClinicalOfficeVisitSummary covs = (ClinicalOfficeVisitSummary) CDAUtil.loadAs(IOUtils.toInputStream(xml), docType,
									result);
			CDAUtil.validate(covs, new BasicValidationHandler() {
				@Override
				public void handleError(Diagnostic diagnostic) {
//					System.out.println("\nERROR: " + diagnostic.getMessage());
					errorModel.add("Error", diagnostic.getMessage());
				}

				@Override
				public void handleWarning(Diagnostic diagnostic) {
//					 System.out.println("WARNING: " + diagnostic.getMessage());
				}

				@Override
				public void handleInfo(Diagnostic diagnostic) {
//					 System.out.println("INFO: " + diagnostic.getMessage());
				}
			});
		} catch (Exception e) {
			e.printStackTrace();
		}		
	}


Re: Error while validating VDT Ambulatory Summary in edge tool [message #1793164 is a reply to message #1793152] Tue, 31 July 2018 19:35 Go to previous messageGo to next message
Kalyan Dasika is currently offline Kalyan DasikaFriend
Messages: 14
Registered: December 2015
Junior Member
Hi Sean:

I was able to write a util class that did the extra schema validation and I'm able to produce the following error at the time of generating the cda document:


org.xml.sax.SAXParseException; lineNumber: 650; columnNumber: 327; cvc-complex-type.2.4.a: Invalid content was found starting with element &apos;table&apos;. One of &apos;{&quot;urn:hl7-org:v3&quot;:tr}&apos; is expected




Thanks,
Kalyan
Re: Error while validating VDT Ambulatory Summary in edge tool [message #1793166 is a reply to message #1793164] Tue, 31 July 2018 19:44 Go to previous messageGo to next message
Kalyan Dasika is currently offline Kalyan DasikaFriend
Messages: 14
Registered: December 2015
Junior Member
btw, I was able to correct the narrative block, and pass the online validator. thanks for your help. It is highly appreciated.

- Kalyan
Re: Error while validating VDT Ambulatory Summary in edge tool [message #1793168 is a reply to message #1793166] Tue, 31 July 2018 19:54 Go to previous message
Kalyan Dasika is currently offline Kalyan DasikaFriend
Messages: 14
Registered: December 2015
Junior Member
fyi: I was also getting this error org.xml.sax.SAXParseException; lineNumber: 25; columnNumber: 137; cvc-complex-type.2.4.a: Invalid content was found starting with element 'sdtc:raceCode'. One of '{"urn:hl7-org:v3":ethnicGroupCode, "urn:hl7-org:v3":guardian, "urn:hl7-org:v3":birthplace, "urn:hl7-org:v3":languageCommunication}' is expected.
, but I had to build an 'ignore list' in the org.xml.sax.ErrorHandler implementation, for a successful validation.
Previous Topic:Healthcare Survey CDA document
Next Topic:Parsing QRDA Document
Goto Forum:
  


Current Time: Fri Mar 29 05:54:49 GMT 2024

Powered by FUDForum. Page generated in 0.08096 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top