-
Notifications
You must be signed in to change notification settings - Fork 4
/
testSchema.xsd
218 lines (218 loc) · 9.25 KB
/
testSchema.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<?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="version" type="xs:string">
<xs:annotation>
<xs:documentation>The version of FHIRPath in which the features being tested were introduced. This should correspond to a published or planned published version of FHIRPath.</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" minOccurs="0" 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="version" type="xs:string">
<xs:annotation>
<xs:documentation>The version of FHIRPath in which the features being tested were introduced. This should correspond to a published or planned published version of FHIRPath.</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:choice>
<xs:element name="expression" type="Expression">
<xs:annotation>
<xs:documentation>The expression to be tested.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="library" type="Library" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>For CQL, this is an inline CQL Library. In the future, references to filesysem libraries may be supported.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
<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="version" type="xs:string">
<xs:annotation>
<xs:documentation>The version of FHIRPath in which the feature being tested was introduced. This should correspond to a published or planned published version of FHIRPath.</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:attribute name="mode" type="ModeType">
<xs:annotation>
<xs:documentation>Strict vs Loose, determines whether type checking is strict as specified in [Type Safety and Strict Evaluation](http://hl7.org/fhirpath/#type-safety-and-strict-evaluation)</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ordered" type="xs:boolean">
<xs:annotation>
<xs:documentation>Whether the results are expected to be ordered, false if not present</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="checkOrderedFunctions" type="xs:boolean">
<xs:annotation>
<xs:documentation>Whether to ensure that attempting to use ordered functions with an unordered input should throw (e.g., using .skip() on an unordered list)</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="name" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>The name of the output. For CQL, this must correspond to the name of the expression definition this output corresponds to.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="type" type="OutputType" use="optional">
<xs:annotation>
<xs:documentation>The type of the expected output. If no type is provided, the value is expected to be an expression in the language under test and will be set equal to the test expression and the expected evaluation result will be true. In the special case that the output is a null, a null predicate test will be used.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="Library">
<xs:simpleContent>
<xs:extension base="xs:string"/>
</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="long"/>
<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: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 evaluate with strict semantics</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="loose">
<xs:annotation>
<xs:documentation>Indicates the test is expected to evaluate with loose semantics</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:schema>