This section provides sample schematron validation and input files, and also gives instructions on importing the validation file for use in the JCD.
Below is a sample schematron validation file that checks for the presence of the profileid field in the PRPA_IN403001UV01 OTD.
<?xml version="1.0" encoding="UTF-8"?> <sch:schema xmlns:sch="http://www.ascc.net/xml/schematron"> <sch:ns prefix="hl7v3" uri="urn:hl7-org:v3"/> <sch:pattern name="Check structure"> <sch:rule context="hl7v3:PRPA_IN403001UV01"> <sch:assert test="count(hl7v3:profileId) = 1">The profileId should be present. It is missing.</sch:assert> </sch:rule> </sch:pattern> </sch:schema> |
<PRPA_IN403001UV01 xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 PRPA_IN403001UV01.xsd"> <id root="1.1.2.3.4.6" extension="5929" assigningAuthorityName="Litware Inc."/> <creationTime value="20050303180027"/> <versionCode code="V3PR1"/> <interactionId root="1.1.6.7.8" extension="PRPA_IN403001UV01" assigningAuthorityName="HL7"/> <profileId root="1.1.1.1"/> <processingCode code="D"/> <processingModeCode code="T"/> <acceptAckCode code="AL"/> ... ... ... |
The above text has been wrapped for display purposes. It contains extra line breaks.
This tutorial includes a JAR file, checkprofileid.jar. which includes the sample schematron validation file described above. Follow this procedure if you want to create your own validation file and package it for the JCD.
Create a JAR file containing the schematron validation file in XML format.
Do the following to import the JAR file:
Open the Collaboration in the Collaboration Editor.
On the Collaboration Editor toolbar, click Add JAR.
On the Add/Remove Jar Files dialog box, click Add.
Navigate to and select he JAR file to add, and then click Import.
On the Add/Remove Jar Files dialog box, click Close.