beautypg.com

Schematron configuration in hl7 adapter, Api for schematron validation – Sun Microsystems Sun Adapter IP HL 7 User Manual

Page 26

background image

In the HL7 Adapter, this schematron is useful for validating an HL7 V3 document against
predefined schematron schemas that you write. You can also obtain schemas from
organizations such as NHS and HL7.org. For example, NHS provides schemas for CDA
documents.

Schematron Configuration in HL7 Adapter

You configure the schematron validation from the Connectivity Map Properties Editor. The
Properties Editor includes two properties to support schematron validation:

Schematron Validation

: Selecting true enables schematron validation. You then need to

enter an LDAP reference.

Schematron Files

: The list of schematron validation files. Use commas to separate multiple

files.

API for Schematron Validation

The HL7 Adapter includes an API specific to schematron validation. This API is a wrapper of
the Open source XSLT-based API available at

http://xml.ascc.net/schematron/1.5

. The

API is an XSL file called metastylesheet (skeleton1-5.xsl). Applying the metastylesheet to the
schematron XML document generates another XSL file. This XSL file can be applied to the
input XML document to validate, which produces the output XML document that contains the
results of the validation. This document can be embedded inside the V3 acknowledgement and
can be sent to the original sender.

The metastylesheet can be extended and overridden so that you can customize the output XML
document.

Example,

The following is an example of an output document generated after invoking the API using the
XML input document and the schematron validation document described above.

"1.0" encoding="UTF-8" standalone="yes"?>

"#ALL" schemaVersion="" title="" xmlns:

sch=

"http://www.ascc.net/xml/schematron">

"Check structure"/>

"Person" id="" role=""/>

"" role="" test="@Title" location="/@Person[1]">

The element Person must have a Title attribute

Sun Adapter for TCP/IP HL7 Overview

Sun Adapter for TCP/IP HL7 User's Guide • October 2009

26

This manual is related to the following products: