CDA LAB document generation and validation

44 views
Skip to first unread message

ousta

unread,
Oct 28, 2011, 2:24:11 AM10/28/11
to ipf-user
Hello Im trying to generate a CDA LAB document using a builder.

I encounter two problems:

1. i wanna generate an IHE LAB document (schema being LabCDA.xsd) but
using the builder the generated clinicaldocument will point to
schemaLocation=hl7v3.xsd

=> How can i use the LabCDA.xsd instead.

2. when validating i wanna validate my object using :
validator.validate(testXml, CDAR2Constants.IHE_LAB_SCHEMA)

However i encounter the following behavior (it is same if i validation
against CDA2_SCHEMA):

DEBUG - Validating XML message
INFO - Referenced external file LabPOCD_MT000040.xsd could not be
found. Falling back to default resolution.
INFO - Referenced external file ../../processable/coreschemas/
datatypes.xsd could not be found. Falling back to default resolution.
INFO - Referenced external file datatypes-base.xsd could not be found.
Falling back to default resolution.
INFO - Referenced external file voc.xsd could not be found. Falling
back to default resolution.
INFO - Referenced external file datatypes.xsd could not be found.
Falling back to default resolution.
INFO - Referenced external file ../../processable/coreschemas/voc.xsd
could not be found. Falling back to default resolution.
INFO - Referenced external file ../../processable/coreschemas/
NarrativeBlock.xsd could not be found. Falling back to default
resolution.
INFO - Referenced external file TF_Vol3_Lab.xsd could not be found.
Falling back to default resolution.
INFO - Referenced external file ../../processable/coreschemas/
datatypes.xsd could not be found. Falling back to default resolution.
INFO - Referenced external file datatypes-base.xsd could not be found.
Falling back to default resolution.
INFO - Referenced external file voc.xsd could not be found. Falling
back to default resolution.
INFO - Referenced external file datatypes.xsd could not be found.
Falling back to default resolution.
DEBUG - Message validation successful


after what it will call again the CDAextensions (already called before
building my cdadocument...)
DEBUG - Initializing extension Clinical Document Architecture (CDA)
(Clinical Document Architecture (CDA))
DEBUG - Loading builder from /builders/AnyBuilder.groovy
DEBUG - Loading builder from /builders/DataTypeBuilder.groovy
DEBUG - Loading builder from /builders/InfrastructureBuilder.groovy
DEBUG - Loading builder from /builders/EntityBuilder.groovy
DEBUG - Loading builder from /builders/RoleBuilder.groovy
DEBUG - Loading builder from /builders/ParticipationBuilder.groovy
DEBUG - Loading builder from /builders/ActBuilder.groovy
DEBUG - Loading builder from /builders/NarrativesBuilder.groovy
DEBUG - Loading builder from /builders/ActRelationshipBuilder.groovy
DEBUG - Loading builder from /supportbuilders/CodeBuilder.groovy

Any insights regarding the validation process?

Regard,
Jen.

stefan...@icw.de

unread,
Oct 31, 2011, 6:35:03 AM10/31/11
to ipf-...@googlegroups.com

Hi Jen

Please find my response to your questions below.

Best regards
Stefan

From:ousta <birsen...@gmail.com>
To:ipf-user <ipf-...@googlegroups.com>
Date:28.10.2011 08:34
Subject:CDA LAB document generation and validation
Sent by:ipf-...@googlegroups.com





Hello Im trying to generate a CDA LAB document using a builder.

I encounter two problems:

1. i wanna generate an IHE LAB document (schema being LabCDA.xsd) but
using the builder the generated clinicaldocument will point to
schemaLocation=hl7v3.xsd

=> How can i use the LabCDA.xsd instead.

RE: You can't :-(. The CDA Builder relies on the OHT library and we have only the "pure" CDA model there.

RE: I'm not sure I get the problem you have. If your Lab document uses the Lab Schema extensions it is possible that the CDA R2 parser reaches some unknown content. Is this the case?
Have in mind that the cda core module includes schematron templates for Lab 2.1 and Lab 2.0 so you can use them in conjunction with the schema validation:
         ...
        .validate().xsd().staticProfile(IHE_LAB_SCHEMA)
        .validate().schematron().staticProfile(new SchematronProfile(IHE_LAB_SCHEMATRON_RULES, [phase:'errors']))
        ...

Regard,
Jen.

  
InterComponentWare AG:
Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler
Aufsichtsratsvors.: Prof. Dr. Christof Hettich
Firmensitz: 69190 Walldorf, Altrottstraße 31
AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516

ousta

unread,
Nov 1, 2011, 3:09:10 AM11/1/11
to ipf-user
Thanks for the answer it has been helpful however i do have one more
question if u see in the INFO debug i have non found files. fir
instance when checking against the CDA

.validate().xsd().staticProfile(CDAR2Constants.CDAR2_SCHEMA)

INFO - Referenced external file POCD_MT000040.xsd could not be found.
Falling back to default resolution.
INFO - Referenced external file ../../processable/coreschemas/voc.xsd
could not be found. Falling back to default resolution.
INFO - Referenced external file datatypes.xsd could not be found.
Falling back to default resolution.
INFO - Referenced external file datatypes-base.xsd could not be found.
Falling back to default resolution.
INFO - Referenced external file ../../processable/coreschemas/
NarrativeBlock.xsd could not be found. Falling back to default
resolution.


is there one more step to do to reference the documents? do i have to
manually include those xsd files somewherE or is it already in ipf?
Regards,

On Oct 31, 7:35 pm, stefan.iva...@icw.de wrote:
> Hi Jen
>
> Please find my response to your questions below.
>
> Best regards
> Stefan
>
> From:
> ousta <birsen.gen...@gmail.com>
> To:
> ipf-user <ipf-...@googlegroups.com>
> Date:
> 28.10.2011 08:34
> Subject:
> CDA LAB document generation and validation
> Sent by:
> ipf-...@googlegroups.com
>

stefan...@icw.de

unread,
Nov 2, 2011, 8:22:20 AM11/2/11
to ipf-...@googlegroups.com

Actually no. It isn't required to do anything else. The log entry is just INFOrmational and gives advice where the mentioned resource is loaded from. In your case all resources were found (not on classpath) and the validation was successful.


From:ousta <birsen...@gmail.com>
To:ipf-user <ipf-...@googlegroups.com>
Date:01.11.2011 08:09
Subject:Re: CDA LAB document generation and validation
Sent by:ipf-...@googlegroups.com

Reply all
Reply to author
Forward
0 new messages