Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Model Driven Health Tools » Slow Validation MDHT API(Slow CDA Document Validation )
Slow Validation MDHT API [message #1725784] Mon, 07 March 2016 15:50 Go to next message
Raj Mehra is currently offline Raj MehraFriend
Messages: 7
Registered: February 2016
Junior Member
Hello-

We are seeing slowness in-house in validating the CDA documents using the MDHT APIs. On the website - sitenv.org/c-cda-validator the same document is getting validated instantly.

We would like to confirm/answer below for us-

1. Which API should we call to load the document (load Vs. loadAs)?
2. It seems that loadAs seems to be faster but produces a different output.
3. Need to confirm what API's the web site referenced above is using. It seems the website is using "load" API and still is faster than what we are seeing in-house.


Investigation Details-

Existing API usage:-
ConsolPackage.eINSTANCE.eClass();
ValidationResult valResult = new ValidationResult();
ClinicalDocument ccdDocument = (ClinicalDocument) CDAUtil.load(cpResource, valResult);

Alternative API usage-
ClinicalDocument ccdDocument = (ClinicalDocument) CDAUtil.loadAs(cpResource, ConsolPackage.eINSTANCE.eClass(), valResult);


Missing error with Alternative API usage:
DOC ID:2.16.840.1.113883.19.5.99999.1 ERROR: Consol US Realm Header (V3) SHALL contain at least one [1..*] recordTarget, where its type is Record Target (CONF:1198-5266) each SHALL contain exactly one [1..1] patientRole, where (CONF:1198-5267) patient Role SHALL contain exactly one [1..1] patient, where (CONF:1198-5283) each MAY contain zero or more [0..*] guardian, where (CONF:1198-5325) guardian SHOULD contain zero or one [0..1] code, which SHALL be selected from ValueSet Personal And Legal Relationship Role Type 2.16.840.1.113883.11.20.12.1 DYNAMIC (CONF:1198-5326)


Run existing against valid document:
Time in seconds to create consolepackage instance = 0.943
Time in seconds to load the document = 9.066
Number of Schema Validation Diagnostics: 1
Number of EMF Resource Diagnostics: 0
Number of EMF Validation Diagnostics: 729
Number of Total Diagnostics: 730
Document is Valid

Number of C-CDA IG Conformance Warnings=102
Number of C-CDA IG Conformance Info=628

Run alternative against valid document:
Time in seconds to create consolepackage instance = 0.004
Time in seconds to load the document = 4.462
Number of Schema Validation Diagnostics: 1
Number of EMF Resource Diagnostics: 0
Number of EMF Validation Diagnostics: 694
Number of Total Diagnostics: 695
Document is Valid

Number of C-CDA IG Conformance Warnings=90
Number of C-CDA IG Conformance Info=605

Run existing against invalid document:
Time in seconds to create consolepackage instance = 0.944
Time in seconds to load the document = 16.691
Number of Schema Validation Diagnostics: 0
Number of EMF Resource Diagnostics: 0
Number of EMF Validation Diagnostics: 420
Number of Total Diagnostics: 420

Number of C-CDA IG Conformance Errors=6
Document in Invalid
DOC ID:2.16.840.1.113883.19.5.99999.1 ERROR: Consol US Realm Header (V3) SHALL contain at least one [1..*] recordTarget, where its type is Record Target (CONF:1198-5266) each SHALL contain exactly one [1..1] patientRole, where (CONF:1198-5267) patient Role SHALL contain exactly one [1..1] patient, where (CONF:1198-5283) each MAY contain zero or more [0..*] guardian, where (CONF:1198-5325) guardian SHOULD contain zero or one [0..1] code, which SHALL be selected from ValueSet Personal And Legal Relationship Role Type 2.16.840.1.113883.11.20.12.1 DYNAMIC (CONF:1198-5326)
DOC ID:2.16.840.1.113883.19.5.99999.1 ERROR: Consol Family History Organizer SHALL contain exactly one [1..1] subject, where its type is Subject (CONF:8609, R2.1=CONF:1198-8609) each SHALL contain exactly one [1..1] relatedSubject, where (CONF:15244, R2.1=CONF:1198-15244) each SHOULD contain zero or one [0..1] subject, where (CONF:15248, R2.1=CONF:1198-15248) subject SHALL contain exactly one [1..1] administrativeGenderCode (CONF:15974, R2.1=CONF:1198-15974), which SHALL be selected from ValueSet Administrative Gender (HL7 V3) 2.16.840.1.113883.1.11.1 DYNAMIC (CONF:15975, R2.1=CONF:1198-15975)
DOC ID:2.16.840.1.113883.19.5.99999.1 ERROR: Consol Immunization Activity (V3) entryRelationship with target entry Instruction2 SHALL contain exactly one [1..1] @inversionInd="true" True (CONF:1198-8858)
DOC ID:2.16.840.1.113883.19.5.99999.1 ERROR: Consol Procedure Activity Procedure reference/@value SHALL begin with a '#' and SHALL point to its corresponding narrative (using the approach defined in CDA Release 2, section 4.3.5.1) (CONF:15910, R2.0=CONF:1098-19206)
DOC ID:2.16.840.1.113883.19.5.99999.1 ERROR: Consol Procedure Activity Procedure2 SHOULD contain zero or more [0..*] targetSiteCode (CONF:1098-7683), which SHALL be selected from ValueSet Body Site 2.16.840.1.113883.3.88.12.3221.8.9 DYNAMIC (CONF:1098-16082)
DOC ID:2.16.840.1.113883.19.5.99999.1 ERROR: Consol Social History Observation (V3) SHALL contain exactly one [1..1] code with @xsi:type="CD", which SHOULD be selected from ValueSet Social History Type 2.16.840.1.113883.3.88.12.80.60 STATIC 2008-12-18 (CONF:1198-8558) code SHALL contain at least one [1..*] translation, which SHOULD be selected from (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:1198-32853)

Number of C-CDA IG Conformance Warnings=60
Number of C-CDA IG Conformance Info=354

Run alternative against invalid document:
Time in seconds to create consolepackage instance = 0.004
Time in seconds to load the document = 10.742
Number of Schema Validation Diagnostics: 0
Number of EMF Resource Diagnostics: 0
Number of EMF Validation Diagnostics: 384
Number of Total Diagnostics: 384

Number of C-CDA IG Conformance Errors=5
Document in Invalid
DOC ID:2.16.840.1.113883.19.5.99999.1 ERROR: Consol Family History Organizer SHALL contain exactly one [1..1] subject, where its type is Subject (CONF:8609, R2.1=CONF:1198-8609) each SHALL contain exactly one [1..1] relatedSubject, where (CONF:15244, R2.1=CONF:1198-15244) each SHOULD contain zero or one [0..1] subject, where (CONF:15248, R2.1=CONF:1198-15248) subject SHALL contain exactly one [1..1] administrativeGenderCode (CONF:15974, R2.1=CONF:1198-15974), which SHALL be selected from ValueSet Administrative Gender (HL7 V3) 2.16.840.1.113883.1.11.1 DYNAMIC (CONF:15975, R2.1=CONF:1198-15975)
DOC ID:2.16.840.1.113883.19.5.99999.1 ERROR: Consol Immunization Activity (V3) entryRelationship with target entry Instruction2 SHALL contain exactly one [1..1] @inversionInd="true" True (CONF:1198-8858)
DOC ID:2.16.840.1.113883.19.5.99999.1 ERROR: Consol Procedure Activity Procedure reference/@value SHALL begin with a '#' and SHALL point to its corresponding narrative (using the approach defined in CDA Release 2, section 4.3.5.1) (CONF:15910, R2.0=CONF:1098-19206)
DOC ID:2.16.840.1.113883.19.5.99999.1 ERROR: Consol Procedure Activity Procedure2 SHOULD contain zero or more [0..*] targetSiteCode (CONF:1098-7683), which SHALL be selected from ValueSet Body Site 2.16.840.1.113883.3.88.12.3221.8.9 DYNAMIC (CONF:1098-16082)
DOC ID:2.16.840.1.113883.19.5.99999.1 ERROR: Consol Social History Observation (V3) SHALL contain exactly one [1..1] code with @xsi:type="CD", which SHOULD be selected from ValueSet Social History Type 2.16.840.1.113883.3.88.12.80.60 STATIC 2008-12-18 (CONF:1198-8558) code SHALL contain at least one [1..*] translation, which SHOULD be selected from (CodeSystem: 2.16.840.1.113883.6.1 LOINC) (CONF:1198-32853)

Number of C-CDA IG Conformance Warnings=45
Number of C-CDA IG Conformance Info=334
Re: Slow Validation MDHT API [message #1725815 is a reply to message #1725784] Mon, 07 March 2016 21:08 Go to previous message
Dan Brown is currently offline Dan BrownFriend
Messages: 21
Registered: December 2015
Junior Member
Hi Raj,

Appreciate the well written question/interest.

1. Which API should we call to load the document (load Vs. loadAs)?

It depends on your requirements. If you are not interested in forcing a specific document type or validating against MU2 requirements then you should be using load.

2. It seems that loadAs seems to be faster but produces a different output.

loadAs is only faster because it does not check document level template conformance and therefore produces less results.

3. Need to confirm what API's the web site referenced above is using. It seems the website is using "load" API and still is faster than what we are seeing in-house.

SITE uses both load and loadAs depending on requirements.
-For R1.1 MU2 it uses loadAs
-For R1.1 C-CDA document (e.g. non-specific, base level, etc.) it uses load
-For R2.1 it uses load
-NIST TTT uses loadAs last time I checked as their non-specific selection is not implemented

The reason SITE and TTT are faster than your tests may simply be that in these web application environments a great deal of the information has been cached from the first run. All successive runs are therefore significantly faster. Nothing special needs to be done to achieve this result other than leaving an application running. Once a validation is done for any document, any subsequent validation of any document should not take more than 6 seconds. In my experience it averages about 3 seconds or less. And if it's the same document it will be about 1/3rd of one second.

If that is not the issue I can likely provide other ideas.

Thanks,
Dan
Previous Topic:project development
Next Topic:Memory Profiling of MDHT
Goto Forum:
  


Current Time: Mon Oct 07 09:17:10 GMT 2024

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

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

Back to the top