Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 41 additions & 59 deletions tests/testSchema.xsd
Original file line number Diff line number Diff line change
@@ -1,47 +1,18 @@
<?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: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="TestCapability">
<xs:annotation>
<xs:documentation>
Declares a capability under test. 'code' is a code from the CQL Language Capability Codes
CodeSystem; 'value' (optional) is a qualifier that follows the code's valueMeaning.
</xs:documentation>
</xs:annotation>
<xs:attribute name="code" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>Capability code (e.g., 'decimal-precision-and-scale'). Must be from the CQL Capability Codes.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="value" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>Optional qualifier value (format/allowed values per the code's valueMeaning).</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<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>
<!-- New: suite-level capabilities -->
<xs:element name="capability" type="TestCapability" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
Capability(ies) that apply to the entire test suite unless overridden by Group or 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 suite.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="group" type="Group" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="group" type="Group" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
Expand Down Expand Up @@ -71,19 +42,12 @@
</xs:complexType>
<xs:complexType name="Group">
<xs:sequence>
<xs:element name="capability" type="TestCapability" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
Capability(ies) that apply to all tests in this group unless overridden by a 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 group.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="test" type="Test" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="test" type="Test" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string">
<xs:annotation>
Expand Down Expand Up @@ -113,14 +77,6 @@
</xs:complexType>
<xs:complexType name="Test">
<xs:sequence>
<xs:element name="capability" type="TestCapability" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>
Capability(ies) specific to this test. These override Group/Tests level when conflicting.
</xs:documentation>
</xs:annotation>
</xs:element>

<xs:element name="expression" type="Expression">
<xs:annotation>
<xs:documentation>The expression to be tested.</xs:documentation>
Expand Down Expand Up @@ -202,9 +158,9 @@
<xs:complexType name="Output">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="type" type="OutputType" use="optional">
<xs:attribute name="type" type="OutputType" use="required">
<xs:annotation>
<xs:documentation>The type of the expected output. If output type is not present, the content of the output is the string representation of a literal (e.g. 10.0)</xs:documentation>
<xs:documentation>The type of the expected output.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
Expand All @@ -217,6 +173,7 @@
<xs:enumeration value="date"/>
<xs:enumeration value="dateTime"/>
<xs:enumeration value="decimal"/>
<xs:enumeration value="id"/>
<xs:enumeration value="integer"/>
<xs:enumeration value="Quantity"/>
<xs:enumeration value="string"/>
Expand All @@ -226,38 +183,63 @@
<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:annotation>
<xs:documentation>Indicates the test is expected to evaluate successfully.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="syntax">
<xs:annotation><xs:documentation>Indicates the test is expected to produce a syntax error.</xs:documentation></xs:annotation>
<xs:annotation>
<xs:documentation>Indicates the test is expected to produce a syntax error.</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:annotation>
<xs:documentation>Indicates the test is expected to produce a semantic error.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="execution">
<xs:annotation><xs:documentation>Indicates the test is expected to produce an execution error.</xs:documentation></xs:annotation>
<xs:annotation>
<xs:documentation>Indicates the test is expected to produce an execution 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:annotation>
<xs:documentation>Indicates the test is expected to produce a runtime error.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="ModeType">
<xs:restriction base="xs:string">
<xs:enumeration value="strict">
<xs:annotation><xs:documentation>Indicates the test is expected to evaluated with strict semantics (i.e. paths for choice-valued elements do not include the type name (e.g. Patient.deceased, not Patient.deceasedBoolean)).</xs:documentation></xs:annotation>
<xs:annotation>
<xs:documentation>Indicates the test is expected to evaluated with strict semantics (i.e. paths for choice-valued elements do not include the type name (e.g. Patient.deceased, not Patient.deceasedBoolean)).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="lenient">
<xs:annotation><xs:documentation>Indicates the test is expected to be evaluated with lenient semantics (i.e. paths for choice-valued elements may be included (e.g. Patient.deceasedBoolean)).</xs:documentation></xs:annotation>
<xs:annotation>
<xs:documentation>Indicates the test is expected to be evaluated with lenient semantics (i.e. paths for choice-valued elements may be included (e.g. Patient.deceasedBoolean)).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="lenient/polymorphics">
<xs:annotation>
<xs:documentation>Indicates the test is expected to be evaluated with lenient, as well as polymorphic, semantics (i.e. paths for choice-valued elements may be included, as well as the ability to treat the choice-valued elements polymorphically).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="element">
<xs:annotation><xs:documentation>Indicates the test is expected to be evaluated with respect to a particular element (i.e. from the context of a particular element such as an invariant evaluation).</xs:documentation></xs:annotation>
<xs:annotation>
<xs:documentation>Indicates the test is expected to be evaluated with respect to a particular element (i.e. from the context of a particular element such as an invariant evaluation).</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="cda">
<xs:annotation><xs:documentation>Indicates the test is evaluating a CDA document, as opposed to a FHIR resource.</xs:documentation></xs:annotation>
<xs:annotation>
<xs:documentation>Indicates the test is evaluating a CDA document, as opposed to a FHIR resource.</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="tx">
<xs:annotation><xs:documentation>Indicates the test is expected to have access to the %terminologies environment variable, allowing access to terminology services as described in the FHIRPath topic in the FHIR specification.</xs:documentation></xs:annotation>
<xs:annotation>
<xs:documentation>Indicates the test is expected to have access to the %terminologies environment variable, allowing access to terminology services as described in the FHIRPath topic in the FHIR specification.</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
Expand Down
Loading