EDS Test Scripts
0.1.0 - ci-build
EDS Test Scripts, published by MedCom. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/medcomdk/dk-ehmi-eds-testscripts/ and changes regularly. See the Directory of published versions
| Active as of 2025-08-18 |
<TestScript xmlns="http://hl7.org/fhir">
<id value="Server-ANS4TestOrgSearch-json"/>
<meta>
<profile
value="http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript"/>
</meta>
<text>
<status value="generated"/>
<div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: TestScript Server-ANS4TestOrgSearch-json</b></p><a name="Server-ANS4TestOrgSearch-json"> </a><a name="hcServer-ANS4TestOrgSearch-json"> </a><div style="display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%"><p style="margin-bottom: 0px"/><p style="margin-bottom: 0px">Profile: <code>http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript</code></p></div><p><b>url</b>: <a href="TestScript-Server-ANS4TestOrgSearch-json.html">TestScript Server-ANS4TestOrgSearch-json</a></p><p><b>version</b>: 0.1.0</p><p><b>name</b>: Server-ANS4TestOrgSearch-json</p><p><b>status</b>: Aktiv</p><p><b>date</b>: 2025-08-18</p><p><b>publisher</b>: MedCom</p><p><b>contact</b>: MedCom: <a href="https://medcom.dk">https://medcom.dk</a>,<a href="mailto:ehmi@medcom.dk">ehmi@medcom.dk</a></p><p><b>jurisdiction</b>: <span title="Codes:{urn:iso:std:iso:3166 DK}">Denmark</span></p><p><b>copyright</b>: </p><div><p>MedCom 2025</p>
</div><h3>Origins</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Index</b></td><td><b>Profile</b></td></tr><tr><td style="display: none">*</td><td>1</td><td><a href="http://terminology.hl7.org/7.0.0/CodeSystem-testscript-profile-origin-types.html#testscript-profile-origin-types-FHIR-Client">Test script profile origin type: FHIR-Client</a> (FHIR Client)</td></tr></table><h3>Destinations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Index</b></td><td><b>Profile</b></td></tr><tr><td style="display: none">*</td><td>1</td><td><a href="http://terminology.hl7.org/7.0.0/CodeSystem-testscript-profile-destination-types.html#testscript-profile-destination-types-FHIR-Server">Test script profile destination type: FHIR-Server</a> (FHIR Server)</td></tr></table><blockquote><p><b>fixture</b></p><blockquote><p><b>id</b></p>EdsPatientDeliveryStatusCreateFixture</blockquote><p><b>autocreate</b>: false</p><p><b>autodelete</b>: false</p><p><b>resource</b>: <code>../Fixtures/EdsPatientDeliveryStatusCreateFixture.json</code></p></blockquote><p><b>profile</b>: <a href="https://build.fhir.org/ig/medcomdk/dk-ehmi-eds/StructureDefinition-EdsPatientDeliveryStatus.html">http://medcomehmi.dk/ig/eds/StructureDefinition/EdsPatientDeliveryStatus</a></p><blockquote><p><b>variable</b></p><p><b>name</b>: RecordedOfResourceToFindInSearch</p><p><b>expression</b>: recorded</p><p><b>sourceId</b>: EdsPatientDeliveryStatusCreateFixture</p></blockquote><blockquote><p><b>variable</b></p><p><b>name</b>: SORIDOfReceiverOrganization</p><p><b>expression</b>: agent.where(type.coding.code = 'ehmiReceiver').who.identifier.value</p><p><b>sourceId</b>: EdsPatientDeliveryStatusCreateFixture</p></blockquote><blockquote><p><b>variable</b></p><p><b>name</b>: GLNOfReceiverOrganization</p><p><b>expression</b>: agent.where(type.coding.code = 'ehmiReceiver').extension.where(url = 'http://medcomehmi.dk/ig/eds/StructureDefinition/eds-otherId').valueIdentifier.value</p><p><b>sourceId</b>: EdsPatientDeliveryStatusCreateFixture</p></blockquote><blockquote><p><b>variable</b></p><p><b>name</b>: NameReceiverOrganization</p><p><b>expression</b>: agent.where(type.coding.code = 'ehmiReceiver').name</p><p><b>sourceId</b>: EdsPatientDeliveryStatusCreateFixture</p></blockquote><blockquote><p><b>variable</b></p><p><b>name</b>: SORIDOfSenderOrganization</p><p><b>expression</b>: agent.where(type.coding.code = 'ehmiSender').who.identifier.value</p><p><b>sourceId</b>: EdsPatientDeliveryStatusCreateFixture</p></blockquote><blockquote><p><b>variable</b></p><p><b>name</b>: GLNOfSenderOrganization</p><p><b>expression</b>: agent.where(type.coding.code = 'ehmiSender').extension.where(url = 'http://medcomehmi.dk/ig/eds/StructureDefinition/eds-otherId').valueIdentifier.value</p><p><b>sourceId</b>: EdsPatientDeliveryStatusCreateFixture</p></blockquote><blockquote><p><b>variable</b></p><p><b>name</b>: NameSenderOrganization</p><p><b>expression</b>: agent.where(type.coding.code = 'ehmiSender').name</p><p><b>sourceId</b>: EdsPatientDeliveryStatusCreateFixture</p></blockquote><blockquote><p><b>test</b></p><blockquote><p><b>id</b></p>SearchPatientDeliveryStatusWithReceiverOrgSOR</blockquote><p><b>name</b>: ANS4 receiver org search SOR</p><p><b>description</b>: user story ANS4 search for the created PatientDeliveryStatus object on the SUT with receiver org SOR</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td></tr><tr><td style="display: none">*</td><td><a href="http://terminology.hl7.org/7.0.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-search">Test script operation code: search</a> (Search)</td><td>AuditEvent</td><td>Search for the PatientDeliveryStatus AuditEvent with the receiver organization, SOR</td><td>json</td><td>json</td><td>1</td><td>true</td><td>1</td><td>?receiverOrg=${SORIDOfReceiverOrganization}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Ensure the PatientDeliveryStatus AuditEvent is found</td><td>response</td><td>Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()</td><td>equals</td><td>1</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><blockquote><p><b>id</b></p>SearchPatientDeliveryStatusWithReceiverOrgGLN</blockquote><p><b>name</b>: ANS4 receiver org search GLN</p><p><b>description</b>: user story ANS4 search for the created PatientDeliveryStatus object on the SUT with receiver org GLN</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td></tr><tr><td style="display: none">*</td><td><a href="http://terminology.hl7.org/7.0.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-search">Test script operation code: search</a> (Search)</td><td>AuditEvent</td><td>Search for the PatientDeliveryStatus AuditEvent with the receiver organization GLN</td><td>json</td><td>json</td><td>1</td><td>true</td><td>1</td><td>?receiverOrg=${GLNOfReceiverOrganization}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Ensure the PatientDeliveryStatus AuditEvent is found</td><td>response</td><td>Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()</td><td>equals</td><td>1</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><blockquote><p><b>id</b></p>SearchPatientDeliveryStatusWithReceiverOrgName</blockquote><p><b>name</b>: ANS4 receiver org search Name</p><p><b>description</b>: user story ANS4 search for the created PatientDeliveryStatus object on the SUT with receiver org Name</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td></tr><tr><td style="display: none">*</td><td><a href="http://terminology.hl7.org/7.0.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-search">Test script operation code: search</a> (Search)</td><td>AuditEvent</td><td>Search for the PatientDeliveryStatus AuditEvent with the receiver organization, Name</td><td>json</td><td>json</td><td>1</td><td>true</td><td>1</td><td>?receiverOrg=${NameReceiverOrganization}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Ensure the PatientDeliveryStatus AuditEvent is found</td><td>response</td><td>Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()</td><td>equals</td><td>1</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><blockquote><p><b>id</b></p>SearchPatientDeliveryStatusInvalidReceiverOrgDetails</blockquote><p><b>name</b>: ANS4 invalid receiver org search</p><p><b>description</b>: user story ANS4 search for the created PatientDeliveryStatus object on the SUT with an invalid receiver organization. Not expecting to find it</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td></tr><tr><td style="display: none">*</td><td><a href="http://terminology.hl7.org/7.0.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-search">Test script operation code: search</a> (Search)</td><td>AuditEvent</td><td>Search for the PatientDeliveryStatus AuditEvent with an invalid receiver organization</td><td>json</td><td>json</td><td>1</td><td>true</td><td>1</td><td>?receiverOrg=invalid</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Ensure the PatientDeliveryStatus AuditEvent is not found with an invalid receiver organization</td><td>response</td><td>Bundle.total</td><td>equals</td><td>0</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><blockquote><p><b>id</b></p>SearchPatientDeliveryStatusWithSenderOrgSOR</blockquote><p><b>name</b>: ANS4 sender org search SOR</p><p><b>description</b>: user story ANS4 search for the created PatientDeliveryStatus object on the SUT with sender org SOR</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td></tr><tr><td style="display: none">*</td><td><a href="http://terminology.hl7.org/7.0.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-search">Test script operation code: search</a> (Search)</td><td>AuditEvent</td><td>Search for the PatientDeliveryStatus AuditEvent with the sender organization, SOR</td><td>json</td><td>json</td><td>1</td><td>true</td><td>1</td><td>?senderOrg=${SORIDOfSenderOrganization}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Ensure the PatientDeliveryStatus AuditEvent is found</td><td>response</td><td>Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()</td><td>equals</td><td>1</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><blockquote><p><b>id</b></p>SearchPatientDeliveryStatusWithSenderOrgGLN</blockquote><p><b>name</b>: ANS4 sender org search GLN</p><p><b>description</b>: user story ANS4 search for the created PatientDeliveryStatus object on the SUT with sender org GLN</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td></tr><tr><td style="display: none">*</td><td><a href="http://terminology.hl7.org/7.0.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-search">Test script operation code: search</a> (Search)</td><td>AuditEvent</td><td>Search for the PatientDeliveryStatus AuditEvent with the sender organization GLN</td><td>json</td><td>json</td><td>1</td><td>true</td><td>1</td><td>?senderOrg=${GLNOfSenderOrganization}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Ensure the PatientDeliveryStatus AuditEvent is found</td><td>response</td><td>Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()</td><td>equals</td><td>1</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><blockquote><p><b>id</b></p>SearchPatientDeliveryStatusWithSenderOrgName</blockquote><p><b>name</b>: ANS4 sender org search name</p><p><b>description</b>: user story ANS4 search for the created PatientDeliveryStatus object on the SUT with sender org Name</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td></tr><tr><td style="display: none">*</td><td><a href="http://terminology.hl7.org/7.0.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-search">Test script operation code: search</a> (Search)</td><td>AuditEvent</td><td>Search for the PatientDeliveryStatus AuditEvent with the sender organization, Name</td><td>json</td><td>json</td><td>1</td><td>true</td><td>1</td><td>?senderOrg=${NameSenderOrganization}</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Ensure the PatientDeliveryStatus AuditEvent is found</td><td>response</td><td>Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()</td><td>equals</td><td>1</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><blockquote><p><b>id</b></p>SearchPatientDeliveryStatusInvalidSenderOrgDetails</blockquote><p><b>name</b>: ANS4 invalid search</p><p><b>description</b>: user story ANS4 search for the created PatientDeliveryStatus object on the SUT with an invalid sender organization. Not expecting to find it</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>ContentType</b></td><td><b>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td></tr><tr><td style="display: none">*</td><td><a href="http://terminology.hl7.org/7.0.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-search">Test script operation code: search</a> (Search)</td><td>AuditEvent</td><td>Search for the PatientDeliveryStatus AuditEvent with an invalid sender organization</td><td>json</td><td>json</td><td>1</td><td>true</td><td>1</td><td>?senderOrg=invalid</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Description</b></td><td><b>Direction</b></td><td><b>Expression</b></td><td><b>Operator</b></td><td><b>Value</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Ensure the PatientDeliveryStatus AuditEvent is not found with an invalid sender organization</td><td>response</td><td>Bundle.total</td><td>equals</td><td>0</td><td>false</td></tr></table></blockquote></blockquote></div>
</text>
<url
value="http://medcomehmi.dk/ig/edstestscripts/Server-ANS4TestOrgSearch-json"/>
<version value="0.1.0"/>
<name value="Server-ANS4TestOrgSearch-json"/>
<status value="active"/>
<date value="2025-08-18"/>
<publisher value="MedCom"/>
<contact>
<name value="MedCom"/>
<telecom>
<system value="url"/>
<value value="https://medcom.dk"/>
</telecom>
<telecom>
<system value="email"/>
<value value="ehmi@medcom.dk"/>
</telecom>
</contact>
<jurisdiction>
<coding>
<system value="urn:iso:std:iso:3166"/>
<code value="DK"/>
<display value="Denmark"/>
</coding>
</jurisdiction>
<copyright value="MedCom 2025"/>
<origin>
<index value="1"/>
<profile>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types"/>
<code value="FHIR-Client"/>
</profile>
</origin>
<destination>
<index value="1"/>
<profile>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types"/>
<code value="FHIR-Server"/>
</profile>
</destination>
<fixture id="EdsPatientDeliveryStatusCreateFixture">
<autocreate value="false"/>
<autodelete value="false"/>
<resource>
<reference
value="../Fixtures/EdsPatientDeliveryStatusCreateFixture.json"/>
</resource>
</fixture>
<profile id="eds-patient-delivery-status">🔗
<reference
value="http://medcomehmi.dk/ig/eds/StructureDefinition/EdsPatientDeliveryStatus"/>
</profile>
<variable>
<name value="RecordedOfResourceToFindInSearch"/>
<expression value="recorded"/>
<sourceId value="EdsPatientDeliveryStatusCreateFixture"/>
</variable>
<variable>
<name value="SORIDOfReceiverOrganization"/>
<expression
value="agent.where(type.coding.code = 'ehmiReceiver').who.identifier.value"/>
<sourceId value="EdsPatientDeliveryStatusCreateFixture"/>
</variable>
<variable>
<name value="GLNOfReceiverOrganization"/>
<expression
value="agent.where(type.coding.code = 'ehmiReceiver').extension.where(url = 'http://medcomehmi.dk/ig/eds/StructureDefinition/eds-otherId').valueIdentifier.value"/>
<sourceId value="EdsPatientDeliveryStatusCreateFixture"/>
</variable>
<variable>
<name value="NameReceiverOrganization"/>
<expression value="agent.where(type.coding.code = 'ehmiReceiver').name"/>
<sourceId value="EdsPatientDeliveryStatusCreateFixture"/>
</variable>
<variable>
<name value="SORIDOfSenderOrganization"/>
<expression
value="agent.where(type.coding.code = 'ehmiSender').who.identifier.value"/>
<sourceId value="EdsPatientDeliveryStatusCreateFixture"/>
</variable>
<variable>
<name value="GLNOfSenderOrganization"/>
<expression
value="agent.where(type.coding.code = 'ehmiSender').extension.where(url = 'http://medcomehmi.dk/ig/eds/StructureDefinition/eds-otherId').valueIdentifier.value"/>
<sourceId value="EdsPatientDeliveryStatusCreateFixture"/>
</variable>
<variable>
<name value="NameSenderOrganization"/>
<expression value="agent.where(type.coding.code = 'ehmiSender').name"/>
<sourceId value="EdsPatientDeliveryStatusCreateFixture"/>
</variable>
<test id="SearchPatientDeliveryStatusWithReceiverOrgSOR">
<name value="ANS4 receiver org search SOR"/>
<description
value="user story ANS4 search for the created PatientDeliveryStatus object on the SUT with receiver org SOR"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="AuditEvent"/>
<description
value="Search for the PatientDeliveryStatus AuditEvent with the receiver organization, SOR"/>
<accept value="json"/>
<contentType value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?receiverOrg=${SORIDOfReceiverOrganization}"/>
</operation>
</action>
<action>
<assert>
<description
value="Ensure the PatientDeliveryStatus AuditEvent is found"/>
<direction value="response"/>
<expression
value="Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()"/>
<operator value="equals"/>
<value value="1"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="SearchPatientDeliveryStatusWithReceiverOrgGLN">
<name value="ANS4 receiver org search GLN"/>
<description
value="user story ANS4 search for the created PatientDeliveryStatus object on the SUT with receiver org GLN"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="AuditEvent"/>
<description
value="Search for the PatientDeliveryStatus AuditEvent with the receiver organization GLN"/>
<accept value="json"/>
<contentType value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?receiverOrg=${GLNOfReceiverOrganization}"/>
</operation>
</action>
<action>
<assert>
<description
value="Ensure the PatientDeliveryStatus AuditEvent is found"/>
<direction value="response"/>
<expression
value="Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()"/>
<operator value="equals"/>
<value value="1"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="SearchPatientDeliveryStatusWithReceiverOrgName">
<name value="ANS4 receiver org search Name"/>
<description
value="user story ANS4 search for the created PatientDeliveryStatus object on the SUT with receiver org Name"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="AuditEvent"/>
<description
value="Search for the PatientDeliveryStatus AuditEvent with the receiver organization, Name"/>
<accept value="json"/>
<contentType value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?receiverOrg=${NameReceiverOrganization}"/>
</operation>
</action>
<action>
<assert>
<description
value="Ensure the PatientDeliveryStatus AuditEvent is found"/>
<direction value="response"/>
<expression
value="Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()"/>
<operator value="equals"/>
<value value="1"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="SearchPatientDeliveryStatusInvalidReceiverOrgDetails">
<name value="ANS4 invalid receiver org search"/>
<description
value="user story ANS4 search for the created PatientDeliveryStatus object on the SUT with an invalid receiver organization. Not expecting to find it"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="AuditEvent"/>
<description
value="Search for the PatientDeliveryStatus AuditEvent with an invalid receiver organization"/>
<accept value="json"/>
<contentType value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?receiverOrg=invalid"/>
</operation>
</action>
<action>
<assert>
<description
value="Ensure the PatientDeliveryStatus AuditEvent is not found with an invalid receiver organization"/>
<direction value="response"/>
<expression value="Bundle.total"/>
<operator value="equals"/>
<value value="0"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="SearchPatientDeliveryStatusWithSenderOrgSOR">
<name value="ANS4 sender org search SOR"/>
<description
value="user story ANS4 search for the created PatientDeliveryStatus object on the SUT with sender org SOR"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="AuditEvent"/>
<description
value="Search for the PatientDeliveryStatus AuditEvent with the sender organization, SOR"/>
<accept value="json"/>
<contentType value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?senderOrg=${SORIDOfSenderOrganization}"/>
</operation>
</action>
<action>
<assert>
<description
value="Ensure the PatientDeliveryStatus AuditEvent is found"/>
<direction value="response"/>
<expression
value="Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()"/>
<operator value="equals"/>
<value value="1"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="SearchPatientDeliveryStatusWithSenderOrgGLN">
<name value="ANS4 sender org search GLN"/>
<description
value="user story ANS4 search for the created PatientDeliveryStatus object on the SUT with sender org GLN"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="AuditEvent"/>
<description
value="Search for the PatientDeliveryStatus AuditEvent with the sender organization GLN"/>
<accept value="json"/>
<contentType value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?senderOrg=${GLNOfSenderOrganization}"/>
</operation>
</action>
<action>
<assert>
<description
value="Ensure the PatientDeliveryStatus AuditEvent is found"/>
<direction value="response"/>
<expression
value="Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()"/>
<operator value="equals"/>
<value value="1"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="SearchPatientDeliveryStatusWithSenderOrgName">
<name value="ANS4 sender org search name"/>
<description
value="user story ANS4 search for the created PatientDeliveryStatus object on the SUT with sender org Name"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="AuditEvent"/>
<description
value="Search for the PatientDeliveryStatus AuditEvent with the sender organization, Name"/>
<accept value="json"/>
<contentType value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?senderOrg=${NameSenderOrganization}"/>
</operation>
</action>
<action>
<assert>
<description
value="Ensure the PatientDeliveryStatus AuditEvent is found"/>
<direction value="response"/>
<expression
value="Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()"/>
<operator value="equals"/>
<value value="1"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
<test id="SearchPatientDeliveryStatusInvalidSenderOrgDetails">
<name value="ANS4 invalid search"/>
<description
value="user story ANS4 search for the created PatientDeliveryStatus object on the SUT with an invalid sender organization. Not expecting to find it"/>
<action>
<operation>
<type>
<system
value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
<code value="search"/>
</type>
<resource value="AuditEvent"/>
<description
value="Search for the PatientDeliveryStatus AuditEvent with an invalid sender organization"/>
<accept value="json"/>
<contentType value="json"/>
<destination value="1"/>
<encodeRequestUrl value="true"/>
<origin value="1"/>
<params value="?senderOrg=invalid"/>
</operation>
</action>
<action>
<assert>
<description
value="Ensure the PatientDeliveryStatus AuditEvent is not found with an invalid sender organization"/>
<direction value="response"/>
<expression value="Bundle.total"/>
<operator value="equals"/>
<value value="0"/>
<warningOnly value="false"/>
</assert>
</action>
</test>
</TestScript>