Skip to content

Commit 14fdc3f

Browse files
committed
Build MP907
1 parent ca77401 commit 14fdc3f

File tree

998 files changed

+141691
-4041
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

998 files changed

+141691
-4041
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#/bin/bash
2+
3+
ant -f ../src/build-multiple.xml -Dinput.dirs="src/Medication-9-0-7/Test, src/Medication-9-0-7/Cert, src/Medication-9-0-7-test/Test"
Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<TestScript xmlns="http://hl7.org/fhir" xmlns:nts="http://nictiz.nl/xsl/testscript">
3+
<id value="mp9-ma-xis-0-1-json"/>
4+
<url value="http://nictiz.nl/fhir/TestScript/mp9-ma-xis-0-1-json"/>
5+
<version value="stu3-9.0.7-patchlevel 2025.35"/>
6+
<name value="Medication Process 9.0.7 - MedicationAgreement (NL: MedicatieAfspraak) - XIS Server - Scenario 0.1 - JSON Format"/>
7+
<status value="active"/>
8+
<publisher value="Nictiz"/>
9+
<contact>
10+
<name value="Nictiz"/>
11+
<telecom>
12+
<system value="email"/>
13+
<value value="[email protected]"/>
14+
<use value="work"/>
15+
</telecom>
16+
</contact>
17+
<description value="Scenario 0.1 - Alle medicatieafspraken van de patiënt, zonder aanvullende filter criteria&#xA;(Antwoord: bericht met 6 medicatieafspraken)"/>
18+
<origin>
19+
<extension url="http://fhir.interoplab.eu/fhir/StructureDefinition/Interoplab-CL-ext-SUT">
20+
<valueBoolean value="false"/>
21+
</extension>
22+
<index value="1"/>
23+
<profile>
24+
<system value="http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types"/>
25+
<code value="FHIR-Client"/>
26+
</profile>
27+
</origin>
28+
<destination>
29+
<extension url="http://fhir.interoplab.eu/fhir/StructureDefinition/Interoplab-CL-ext-SUT">
30+
<valueBoolean value="true"/>
31+
</extension>
32+
<index value="1"/>
33+
<profile>
34+
<system value="http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types"/>
35+
<code value="FHIR-Server"/>
36+
</profile>
37+
</destination>
38+
<profile id="Bundle-profile"
39+
value="http://hl7.org/fhir/StructureDefinition/Bundle"/>
40+
<variable>
41+
<name value="patient-token-id"/>
42+
<defaultValue value="Bearer 893d8122-6490-4d65-9621-6dda1abd1966"/>
43+
<description value="OAuth Token for current patient"/>
44+
</variable>
45+
<variable>
46+
<name value="X-Correlation-ID"/>
47+
<defaultValue value="${UUID}"/>
48+
<description value="X-Correlation-ID, by default a UUID following the MedMij Afsprakenstelsel. Does not have to be edited, see https://nictiz.atlassian.net/browse/MM-5132 for more information"/>
49+
</variable>
50+
<test id="mg-mgr-mg-MA-Scenarioset0-0-1">
51+
<name value="Scenario 0.1"/>
52+
<description value="Scenario 0.1 - Alle medicatieafspraken van de patiënt, zonder aanvullende filter criteria&#xA;(Antwoord: bericht met 6 medicatieafspraken)"/>
53+
<action>
54+
<operation>
55+
<type>
56+
<system value="http://hl7.org/fhir/restful-interaction"/>
57+
<code value="search"/>
58+
</type>
59+
<resource value="MedicationRequest"/>
60+
<description value="Test XIS server to serve MedicationAgreement (NL: MedicatieAfspraak) - Alle medicatieafspraken van de patiënt, zonder aanvullende filter criteria&#xA;(Antwoord: bericht met 6 medicatieafspraken)"/>
61+
<accept value="json"/>
62+
<destination value="1"/>
63+
<encodeRequestUrl value="true"/>
64+
<origin value="1"/>
65+
<params value="?category=http://snomed.info/sct|16076005&amp;_include=MedicationRequest:medication"/>
66+
<requestHeader>
67+
<field value="Authorization"/>
68+
<value value="${patient-token-id}"/>
69+
</requestHeader>
70+
<requestHeader>
71+
<field value="MedMij-Request-ID"/>
72+
<value value="${UUID}"/>
73+
</requestHeader>
74+
<requestHeader>
75+
<field value="X-Correlation-ID"/>
76+
<value value="${X-Correlation-ID}"/>
77+
</requestHeader>
78+
</operation>
79+
</action>
80+
<action>
81+
<assert>
82+
<description value="Confirm that the operation was successful"/>
83+
<operator value="in"/>
84+
<responseCode value="200,201"/>
85+
<stopTestOnFail value="true"/>
86+
<warningOnly value="false"/>
87+
</assert>
88+
</action>
89+
<action>
90+
<assert>
91+
<description value="Confirm that the returned resource type is Bundle."/>
92+
<direction value="response"/>
93+
<resource value="Bundle"/>
94+
<stopTestOnFail value="false"/>
95+
<warningOnly value="false"/>
96+
</assert>
97+
</action>
98+
<action>
99+
<assert>
100+
<description value="Confirm that the returned Bundle type is searchset."/>
101+
<direction value="response"/>
102+
<expression value="Bundle.type"/>
103+
<operator value="equals"/>
104+
<stopTestOnFail value="false"/>
105+
<value value="searchset"/>
106+
<warningOnly value="false"/>
107+
</assert>
108+
</action>
109+
<action>
110+
<assert>
111+
<description value="Confirm that all returned resources contain an Resource.id except when temporary ids are used in the Bundle. The only time that a resource does not have an id is when it is being submitted to the server using a create operation: https://www.hl7.org/fhir/STU3/resource-definitions.html#Resource.id "/>
112+
<direction value="response"/>
113+
<expression value="Bundle.entry.all( $this.fullUrl.matches('^urn:oid:[0-2](\\.(0|[1-9]\\d*))*$') or $this.fullUrl.matches('^urn:uuid:[A-Fa-f\\d]{8}-[A-Fa-f\\d]{4}-[A-Fa-f\\d]{4}-[A-Fa-f\\d]{4}-[A-Fa-f\\d]{12}$') or $this.resource.id.exists())"/>
114+
<stopTestOnFail value="false"/>
115+
<warningOnly value="false"/>
116+
</assert>
117+
</action>
118+
<action>
119+
<assert>
120+
<description value="Confirm that all returned resources except OperationOutcome and Binary contain a meta.profile tag."/>
121+
<direction value="response"/>
122+
<expression value="Bundle.entry.resource.where(is(OperationOutcome).not()).where(is(Binary).not()).where(meta.profile.empty()).empty()"/>
123+
<stopTestOnFail value="false"/>
124+
<warningOnly value="false"/>
125+
</assert>
126+
</action>
127+
<action>
128+
<assert>
129+
<description value="Confirm that the fullUrl does not disagree with the id in the resource, see http://hl7.org/fhir/stu3/bundle-definitions.html#Bundle.entry.fullUrl"/>
130+
<direction value="response"/>
131+
<expression value="Bundle.entry.where(fullUrl.exists() and resource.id.exists()).all($this.fullUrl.endsWith($this.resource.id))"/>
132+
<stopTestOnFail value="false"/>
133+
<warningOnly value="false"/>
134+
</assert>
135+
</action>
136+
<action>
137+
<assert>
138+
<description value="Confirm that the fullUrl is an absolute URL, an uuid or an oid."/>
139+
<direction value="response"/>
140+
<expression value="Bundle.entry.fullUrl.all( startsWith('http://') or startsWith('https://') or matches('^urn:oid:[0-2](\\.(0|[1-9]\\d*))*$') or matches('^urn:uuid:[A-Fa-f\\d]{8}-[A-Fa-f\\d]{4}-[A-Fa-f\\d]{4}-[A-Fa-f\\d]{4}-[A-Fa-f\\d]{12}$') )"/>
141+
<stopTestOnFail value="false"/>
142+
<warningOnly value="false"/>
143+
</assert>
144+
</action>
145+
<action>
146+
<assert>
147+
<description value="Confirm that the returned Bundle conforms to the base FHIR specification and the resources to the stated profiles in the meta.profile tag."/>
148+
<direction value="response"/>
149+
<stopTestOnFail value="false"/>
150+
<validateProfileId value="Bundle-profile"/>
151+
<warningOnly value="false"/>
152+
</assert>
153+
</action>
154+
<action>
155+
<assert>
156+
<description value="Confirm that all Coding elements contain both a .system and a .code."/>
157+
<direction value="response"/>
158+
<expression value="Bundle.descendants().where($this.is(Coding)).all(system.exists() and code.exists())"/>
159+
<stopTestOnFail value="false"/>
160+
<warningOnly value="false"/>
161+
</assert>
162+
</action>
163+
<action>
164+
<assert>
165+
<description value="Confirm that the OID of the zib valueset is not used for the system of a coding element."/>
166+
<direction value="response"/>
167+
<expression value="Bundle.descendants().where($this.is(coding)).where(system.startsWith('urn:oid:2.16.840.1.113883.2.4.3.11.60.40.2')).exists().not()"/>
168+
<stopTestOnFail value="false"/>
169+
<warningOnly value="false"/>
170+
</assert>
171+
</action>
172+
<action>
173+
<assert>
174+
<description value="Confirm that all CodeableConcept elements contain either a coding.display or a text value if no Coding exists or has an extension (e.g. a nullFlavor or data-absent-reason extension). For more information see https://informatiestandaarden.nictiz.nl/wiki/FHIR:V1.0_FHIR_IG_STU3Use_of_coded_concepts."/>
175+
<direction value="response"/>
176+
<expression value="Bundle.descendants().where($this.is(CodeableConcept)) .all(coding.display.exists() or text.exists() or extension.exists())"/>
177+
<stopTestOnFail value="false"/>
178+
<warningOnly value="false"/>
179+
</assert>
180+
</action>
181+
<action>
182+
<assert>
183+
<description value="Confirm that all References have a display value, see https://informatiestandaarden.nictiz.nl/wiki/FHIR:V1.0_FHIR_IG_STU3#Use_of_the_reference_datatype."/>
184+
<direction value="response"/>
185+
<expression value="Bundle.descendants().where($this.is(Reference)).all(display.exists() or extension.where(url = 'http://hl7.org/fhir/StructureDefinition/data-absent-reason').exists() or extension.where(url = 'http://hl7.org/fhir/StructureDefinition/iso21090-nullFlavor').exists())"/>
186+
<stopTestOnFail value="false"/>
187+
<warningOnly value="false"/>
188+
</assert>
189+
</action>
190+
<action>
191+
<assert>
192+
<description value="Confirm that all Identifiers have both a .system and a .value. In rare cases where a general category of identifiers can be used, .type can replace .system. Edge cases for both .system and .type to be unknown are not applicable to Nictiz. For more information, see https://www.hl7.org/fhir/stu3/datatypes.html#Identifier."/>
193+
<direction value="response"/>
194+
<expression value="Bundle.descendants().where($this.is(Identifier)).all((system.exists() or type.exists()) and value.exists())"/>
195+
<stopTestOnFail value="false"/>
196+
<warningOnly value="false"/>
197+
</assert>
198+
</action>
199+
<action>
200+
<assert>
201+
<description value="Confirm that Bundle does not use Burgerservicenummer (BSN) anywhere."/>
202+
<direction value="response"/>
203+
<expression value="Bundle.descendants().select(identifier.where(system = 'http://fhir.nl/fhir/NamingSystem/bsn').where(value.empty().not() and value.extension.exists().not())).count() = 0"/>
204+
<stopTestOnFail value="false"/>
205+
<warningOnly value="false"/>
206+
</assert>
207+
</action>
208+
<action>
209+
<assert>
210+
<description value="Confirm that the returned Bundle total value matches or is less than the number of entries in the Bundle. The included resources should not be counted as entries in the Bundle.total."/>
211+
<direction value="response"/>
212+
<expression value="Bundle.total.exists() implies (Bundle.total.toInteger() &lt;= Bundle.entry.where(search.empty() or search.mode = 'match').count())"/>
213+
<stopTestOnFail value="false"/>
214+
<warningOnly value="false"/>
215+
</assert>
216+
</action>
217+
<action>
218+
<assert>
219+
<description value="Confirm that the returned Bundle contains a self link."/>
220+
<direction value="response"/>
221+
<expression value="Bundle.link.where(relation = 'self' and url.exists()).exists()"/>
222+
<stopTestOnFail value="false"/>
223+
<warningOnly value="false"/>
224+
</assert>
225+
</action>
226+
<action>
227+
<assert>
228+
<description value="Confirm that Bundle does not use Burgerservicenummer (BSN) in the self link."/>
229+
<direction value="response"/>
230+
<expression value="Bundle.link.url.contains('http://fhir.nl/fhir/NamingSystem/bsn') = false"/>
231+
<stopTestOnFail value="false"/>
232+
<warningOnly value="false"/>
233+
</assert>
234+
</action>
235+
<action>
236+
<assert>
237+
<description value="Confirm that the response Bundle contains 6 MedicationRequest resource(s). "/>
238+
<direction value="response"/>
239+
<expression value="Bundle.entry.where(resource.is(MedicationRequest)).count() = 6"/>
240+
<stopTestOnFail value="false"/>
241+
<warningOnly value="false"/>
242+
</assert>
243+
</action>
244+
</test>
245+
</TestScript>

0 commit comments

Comments
 (0)