-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtestSchema.xsd
More file actions
268 lines (267 loc) · 12.3 KB
/
testSchema.xsd
File metadata and controls
268 lines (267 loc) · 12.3 KB
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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<?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="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: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="versionTo" type="xs:string">
<xs:annotation>
<xs:documentation>The last version of the specification in which the features being tested appears</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="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: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="versionTo" type="xs:string">
<xs:annotation>
<xs:documentation>The last version of the specification in which the features being tested appears</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="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>
</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="skipStaticCheck" type="xs:boolean">
<xs:annotation>
<xs:documentation>Indicates whether to skip static type-checking as part of the test</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ordered" type="xs:boolean">
<xs:annotation>
<xs:documentation>Indicates whether to check order of results (i.e. list equality vs collection equality).</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="mode" type="ModeType">
<xs:annotation>
<xs:documentation>Indicates whether the test should be evaluated with strict (e.g. Patient.deceased) as opposed to lenient (e.g. Patient.deceasedBoolean) semantics.</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="versionTo" type="xs:string">
<xs:annotation>
<xs:documentation>The last version of the specification in which the features being tested appears</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="optional">
<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: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="id"/>
<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="syntax">
<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:enumeration>
<xs:enumeration value="execution">
<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: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: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: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: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: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:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:schema>