What's New in the Sun TCP/IP HL7 Adapter

API for Schematron Validation

There is a new API added in HL7 adapter for 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.

This metastylesheet can be extended and overridden so that you can customize the output xml document.

The output xml document contains details of all the validation failures. This document can be embedded inside the V3 acknowledgement and can be sent to the original sender.

Example,

A resultant xml document generated after invoking the api using the XML document and the schematron document mentioned in the overview section. The xml document will look as follows -


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<schematron-output phase="#ALL" schemaVersion="" title="" xmlns:
sch="http://www.ascc.net/xml/schematron">
<active-pattern name="Check structure"/>
<fired-rule context="Person" id="" role=""/>
<failed-assert id="" role="" test="@Title" location="/@Person[1]">
<text>The element Person must have a Title attribute</text>
</failed-assert>
<schematron-output>