FHIRPath Specification
2.1.0 - draft International flag

FHIRPath Specification, published by Implementable Technology Specifications WG. This guide is not an authorized publication; it is the continuous build for version 2.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/FHIRPath/ and changes regularly. See the Directory of published versions

Binary: TestSchema

    
<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSpy v2013 sp1 (x64) (http://www.altova.com)-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://hl7.org/fhirpath/tests" xmlns="http://hl7.org/fhirpath/tests" elementFormDefault="qualified">
	<xs:element name="tests" type="Tests"/>
	<xs:complexType name="Tests">
		<xs:annotation>
			<xs:documentation>The Tests type provides a container for test suites made up of groups of tests.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="notes" type="xs:string" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>Notes about the test suite.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="group" type="Group" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string">
			<xs:annotation>
				<xs:documentation>The name of the test suite. This should be a computer-friendly name.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="description" type="xs:string">
			<xs:annotation>
				<xs:documentation>A description of the test suite.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="reference" type="xs:anyURI">
			<xs:annotation>
				<xs:documentation>A reference to the specification under test.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="Group">
		<xs:sequence>
			<xs:element name="notes" type="xs:string" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>Notes about the test group.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="test" type="Test" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string">
			<xs:annotation>
				<xs:documentation>The name of the test group. This should be a computer-friendly name and must be unique within the test suite.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="description" type="xs:string">
			<xs:annotation>
				<xs:documentation>A description of the test group.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="reference" type="xs:anyURI">
			<xs:annotation>
				<xs:documentation>A reference to area of the specification under that the tests in this group cover.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="Test">
		<xs:sequence>
			<xs:element name="expression" type="Expression">
				<xs:annotation>
					<xs:documentation>The expression to be tested.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="output" type="Output" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>The expected output of the test.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="notes" type="xs:string" minOccurs="0" maxOccurs="1">
				<xs:annotation>
					<xs:documentation>Notes about the test. These notes should be included with the test output if the test fails.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string">
			<xs:annotation>
				<xs:documentation>The name of the test suite. This should be a computer-friendly name.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="description" type="xs:string">
			<xs:annotation>
				<xs:documentation>A description of the test suite.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="reference" type="xs:anyURI">
			<xs:annotation>
				<xs:documentation>A reference to the specification under test.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="inputfile" type="xs:string">
			<xs:annotation>
				<xs:documentation>If present, the name of an input file containing input data for the test.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="predicate" type="xs:boolean">
			<xs:annotation>
				<xs:documentation>True if this test represents a predicate.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="Expression">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute name="invalid" type="InvalidType">
					<xs:annotation>
						<xs:documentation>Indicates whether the expression is expected to evaluate successfully, produce a runtime error, or produce a semantic error.</xs:documentation>
					</xs:annotation>
				</xs:attribute>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="Output">
		<xs:simpleContent>
			<xs:extension base="xs:string">
				<xs:attribute name="type" type="OutputType" use="required">
					<xs:annotation>
						<xs:documentation>The type of the expected output.</xs:documentation>
					</xs:annotation>
				<xs:attribute>
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:simpleType name="OutputType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="boolean"/>
			<xs:enumeration value="code"/>
			<xs:enumeration value="date"/>
			<xs:enumeration value="dateTime"/>
			<xs:enumeration value="decimal"/>
			<xs:enumeration value="integer"/>
			<xs:enumeration value="quantity"/>
			<xs:enumeration value="string"/>
			<xs:enumeration value="time"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="InvalidType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="false">
				<xs:annotation>
					<xs:documentation>Indicates the test is expected to evaluate successfully.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="semantic">
				<xs:annotation>
					<xs:documentation>Indicates the test is expected to produce a semantic error.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
			<xs:enumeration value="true">
				<xs:annotation>
					<xs:documentation>Indicates the test is expected to produce a runtime error.</xs:documentation>
				</xs:annotation>
			</xs:enumeration>
		</xs:restrction>
	</xs:simpleType>
</xs:schema>