EDS Test Scripts
0.1.0 - ci-build Denmark flag

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

: Test for ANS.4 - Organization Searching - TTL Representation

Active as of 2025-08-18

Raw ttl | Download

@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

 a fhir:TestScript ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "ANS4TestOrgSearch"] ; # 
  fhir:meta [
    ( fhir:profile [
fhir:v "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript"^^xsd:anyURI ;
fhir:link <http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript>     ] )
  ] ; # 
  fhir:text [
fhir:status [ fhir:v "generated" ] ;
fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: TestScript ANS4TestOrgSearch</b></p><a name=\"ANS4TestOrgSearch\"> </a><a name=\"hcANS4TestOrgSearch\"> </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-ANS4TestOrgSearch.html\">TestScript ANS4TestOrgSearch</a></p><p><b>version</b>: 0.1.0</p><p><b>name</b>: ANS4TestOrgSearch</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>\n</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/6.5.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/6.5.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>C1EUAEDSPatientDeliveryStatus</blockquote><p><b>autocreate</b>: false</p><p><b>autodelete</b>: false</p><p><b>resource</b>: <code>./Fixtures/AuditEvent-C1EUAToEdsFixture.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>: IdOfResourceToBeCreated</p><p><b>expression</b>: id</p><p><b>sourceId</b>: C1EUAEDSPatientDeliveryStatus</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>: C1EUAEDSPatientDeliveryStatus</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>: C1EUAEDSPatientDeliveryStatus</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>: C1EUAEDSPatientDeliveryStatus</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>: C1EUAEDSPatientDeliveryStatus</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>: C1EUAEDSPatientDeliveryStatus</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>: C1EUAEDSPatientDeliveryStatus</p></blockquote><blockquote><p><b>setup</b></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>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/6.5.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-delete\">Test script operation code delete</a>: Delete</td><td>AuditEvent</td><td>Deletes the resource we intend to create later, to ensure it doesn't already exist on the server from previously run tests</td><td>1</td><td>true</td><td>1</td><td>/${IdOfResourceToBeCreated}</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><blockquote><p><b>id</b></p>CreatePatientDeliveryStatus</blockquote><p><b>name</b>: ANS4 Create</p><p><b>description</b>: Use case ANS4 create PatientDeliveryStatus object on the SUT in order to search for it later</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>Destination</b></td><td><b>EncodeRequestUrl</b></td><td><b>Origin</b></td><td><b>Params</b></td><td><b>SourceId</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"http://terminology.hl7.org/6.5.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-update\">Test script operation code update</a>: Update</td><td>AuditEvent</td><td>Create a PatientDeliveryStatus AuditEvent resource on the SUT</td><td>1</td><td>true</td><td>1</td><td>/${IdOfResourceToBeCreated}</td><td>C1EUAEDSPatientDeliveryStatus</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>Response</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Ensure the PatientDeliveryStatus AuditEvent was created</td><td>response</td><td>created</td><td>false</td></tr></table></blockquote></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>: Use case 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>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/6.5.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>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.id = '${IdOfResourceToBeCreated}').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>: Use case 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>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/6.5.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>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.id = '${IdOfResourceToBeCreated}').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>: Use case 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>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/6.5.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>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.id = '${IdOfResourceToBeCreated}').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>: Use case 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>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/6.5.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>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>: Use case 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>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/6.5.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>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.id = '${IdOfResourceToBeCreated}').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>: Use case 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>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/6.5.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>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.id = '${IdOfResourceToBeCreated}').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>: Use case 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>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/6.5.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>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.id = '${IdOfResourceToBeCreated}').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>: Use case 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>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/6.5.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>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>"^^rdf:XMLLiteral
  ] ; # 
  fhir:url [ fhir:v "http://medcomehmi.dk/ig/edstestscripts/ANS4TestOrgSearch"^^xsd:anyURI] ; # 
  fhir:version [ fhir:v "0.1.0"] ; # 
  fhir:name [ fhir:v "ANS4TestOrgSearch"] ; # 
  fhir:status [ fhir:v "active"] ; # 
  fhir:date [ fhir:v "2025-08-18"^^xsd:date] ; # 
  fhir:publisher [ fhir:v "MedCom"] ; # 
  fhir:contact ( [
fhir:name [ fhir:v "MedCom" ] ;
    ( fhir:telecom [
fhir:system [ fhir:v "url" ] ;
fhir:value [ fhir:v "https://medcom.dk" ]     ] [
fhir:system [ fhir:v "email" ] ;
fhir:value [ fhir:v "ehmi@medcom.dk" ]     ] )
  ] ) ; # 
  fhir:jurisdiction ( [
    ( fhir:coding [
fhir:system [ fhir:v "urn:iso:std:iso:3166"^^xsd:anyURI ] ;
fhir:code [ fhir:v "DK" ] ;
fhir:display [ fhir:v "Denmark" ]     ] )
  ] ) ; # 
  fhir:copyright [ fhir:v "MedCom 2025"] ; # 
  fhir:origin ( [
fhir:index [ fhir:v 1 ] ;
fhir:profile [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types"^^xsd:anyURI ] ;
fhir:code [ fhir:v "FHIR-Client" ]     ]
  ] ) ; # 
  fhir:destination ( [
fhir:index [ fhir:v 1 ] ;
fhir:profile [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types"^^xsd:anyURI ] ;
fhir:code [ fhir:v "FHIR-Server" ]     ]
  ] ) ; # 
  fhir:fixture ( [
fhir:id [ fhir:v "C1EUAEDSPatientDeliveryStatus" ] ;
fhir:autocreate [ fhir:v false ] ;
fhir:autodelete [ fhir:v false ] ;
fhir:resource [
fhir:reference [ fhir:v "./Fixtures/AuditEvent-C1EUAToEdsFixture.json" ]     ]
  ] ) ; # 
  fhir:profile ( [
fhir:link <http://medcomehmi.dk/ig/eds/StructureDefinition/EdsPatientDeliveryStatus> ;
fhir:id [ fhir:v "eds-patient-delivery-status" ] ;
fhir:reference [ fhir:v "http://medcomehmi.dk/ig/eds/StructureDefinition/EdsPatientDeliveryStatus" ]
  ] ) ; # 
  fhir:variable ( [
fhir:name [ fhir:v "IdOfResourceToBeCreated" ] ;
fhir:expression [ fhir:v "id" ] ;
fhir:sourceId [ fhir:v "C1EUAEDSPatientDeliveryStatus" ]
  ] [
fhir:name [ fhir:v "SORIDOfReceiverOrganization" ] ;
fhir:expression [ fhir:v "agent.where(type.coding.code = 'ehmiReceiver').who.identifier.value" ] ;
fhir:sourceId [ fhir:v "C1EUAEDSPatientDeliveryStatus" ]
  ] [
fhir:name [ fhir:v "GLNOfReceiverOrganization" ] ;
fhir:expression [ fhir:v "agent.where(type.coding.code = 'ehmiReceiver').extension.where(url = 'http://medcomehmi.dk/ig/eds/StructureDefinition/eds-otherId').valueIdentifier.value" ] ;
fhir:sourceId [ fhir:v "C1EUAEDSPatientDeliveryStatus" ]
  ] [
fhir:name [ fhir:v "NameReceiverOrganization" ] ;
fhir:expression [ fhir:v "agent.where(type.coding.code = 'ehmiReceiver').name" ] ;
fhir:sourceId [ fhir:v "C1EUAEDSPatientDeliveryStatus" ]
  ] [
fhir:name [ fhir:v "SORIDOfSenderOrganization" ] ;
fhir:expression [ fhir:v "agent.where(type.coding.code = 'ehmiSender').who.identifier.value" ] ;
fhir:sourceId [ fhir:v "C1EUAEDSPatientDeliveryStatus" ]
  ] [
fhir:name [ fhir:v "GLNOfSenderOrganization" ] ;
fhir:expression [ fhir:v "agent.where(type.coding.code = 'ehmiSender').extension.where(url = 'http://medcomehmi.dk/ig/eds/StructureDefinition/eds-otherId').valueIdentifier.value" ] ;
fhir:sourceId [ fhir:v "C1EUAEDSPatientDeliveryStatus" ]
  ] [
fhir:name [ fhir:v "NameSenderOrganization" ] ;
fhir:expression [ fhir:v "agent.where(type.coding.code = 'ehmiSender').name" ] ;
fhir:sourceId [ fhir:v "C1EUAEDSPatientDeliveryStatus" ]
  ] ) ; # 
  fhir:setup [
    ( fhir:action [
fhir:operation [
fhir:type [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/testscript-operation-codes"^^xsd:anyURI ] ;
fhir:code [ fhir:v "delete" ]         ] ;
fhir:resource [ fhir:v "AuditEvent" ] ;
fhir:description [ fhir:v "Deletes the resource we intend to create later, to ensure it doesn't already exist on the server from previously run tests" ] ;
fhir:destination [ fhir:v 1 ] ;
fhir:encodeRequestUrl [ fhir:v true ] ;
fhir:origin [ fhir:v 1 ] ;
fhir:params [ fhir:v "/${IdOfResourceToBeCreated}" ]       ]     ] )
  ] ; # 
  fhir:test ( [
fhir:id [ fhir:v "CreatePatientDeliveryStatus" ] ;
fhir:name [ fhir:v "ANS4 Create" ] ;
fhir:description [ fhir:v "Use case ANS4 create PatientDeliveryStatus object on the SUT in order to search for it later" ] ;
    ( fhir:action [
fhir:operation [
fhir:type [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/testscript-operation-codes"^^xsd:anyURI ] ;
fhir:code [ fhir:v "update" ]         ] ;
fhir:resource [ fhir:v "AuditEvent" ] ;
fhir:description [ fhir:v "Create a PatientDeliveryStatus AuditEvent resource on the SUT" ] ;
fhir:destination [ fhir:v 1 ] ;
fhir:encodeRequestUrl [ fhir:v true ] ;
fhir:origin [ fhir:v 1 ] ;
fhir:params [ fhir:v "/${IdOfResourceToBeCreated}" ] ;
fhir:sourceId [ fhir:v "C1EUAEDSPatientDeliveryStatus" ]       ]     ] [
fhir:assert [
fhir:description [ fhir:v "Ensure the PatientDeliveryStatus AuditEvent was created" ] ;
fhir:direction [ fhir:v "response" ] ;
fhir:response [ fhir:v "created" ] ;
fhir:warningOnly [ fhir:v false ]       ]     ] )
  ] [
fhir:id [ fhir:v "SearchPatientDeliveryStatusWithReceiverOrgSOR" ] ;
fhir:name [ fhir:v "ANS4 receiver org search SOR" ] ;
fhir:description [ fhir:v "Use case ANS4 search for the created PatientDeliveryStatus object on the SUT with receiver org SOR" ] ;
    ( fhir:action [
fhir:operation [
fhir:type [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/testscript-operation-codes"^^xsd:anyURI ] ;
fhir:code [ fhir:v "search" ]         ] ;
fhir:resource [ fhir:v "AuditEvent" ] ;
fhir:description [ fhir:v "Search for the PatientDeliveryStatus AuditEvent with the receiver organization, SOR" ] ;
fhir:destination [ fhir:v 1 ] ;
fhir:encodeRequestUrl [ fhir:v true ] ;
fhir:origin [ fhir:v 1 ] ;
fhir:params [ fhir:v "?receiverOrg=${SORIDOfReceiverOrganization}" ]       ]     ] [
fhir:assert [
fhir:description [ fhir:v "Ensure the PatientDeliveryStatus AuditEvent is found" ] ;
fhir:direction [ fhir:v "response" ] ;
fhir:expression [ fhir:v "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.id = '${IdOfResourceToBeCreated}').count()" ] ;
fhir:operator [ fhir:v "equals" ] ;
fhir:value [ fhir:v "1" ] ;
fhir:warningOnly [ fhir:v false ]       ]     ] )
  ] [
fhir:id [ fhir:v "SearchPatientDeliveryStatusWithReceiverOrgGLN" ] ;
fhir:name [ fhir:v "ANS4 receiver org search GLN" ] ;
fhir:description [ fhir:v "Use case ANS4 search for the created PatientDeliveryStatus object on the SUT with receiver org GLN" ] ;
    ( fhir:action [
fhir:operation [
fhir:type [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/testscript-operation-codes"^^xsd:anyURI ] ;
fhir:code [ fhir:v "search" ]         ] ;
fhir:resource [ fhir:v "AuditEvent" ] ;
fhir:description [ fhir:v "Search for the PatientDeliveryStatus AuditEvent with the receiver organization GLN" ] ;
fhir:destination [ fhir:v 1 ] ;
fhir:encodeRequestUrl [ fhir:v true ] ;
fhir:origin [ fhir:v 1 ] ;
fhir:params [ fhir:v "?receiverOrg=${GLNOfReceiverOrganization}" ]       ]     ] [
fhir:assert [
fhir:description [ fhir:v "Ensure the PatientDeliveryStatus AuditEvent is found" ] ;
fhir:direction [ fhir:v "response" ] ;
fhir:expression [ fhir:v "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.id = '${IdOfResourceToBeCreated}').count()" ] ;
fhir:operator [ fhir:v "equals" ] ;
fhir:value [ fhir:v "1" ] ;
fhir:warningOnly [ fhir:v false ]       ]     ] )
  ] [
fhir:id [ fhir:v "SearchPatientDeliveryStatusWithReceiverOrgName" ] ;
fhir:name [ fhir:v "ANS4 receiver org search Name" ] ;
fhir:description [ fhir:v "Use case ANS4 search for the created PatientDeliveryStatus object on the SUT with receiver org Name" ] ;
    ( fhir:action [
fhir:operation [
fhir:type [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/testscript-operation-codes"^^xsd:anyURI ] ;
fhir:code [ fhir:v "search" ]         ] ;
fhir:resource [ fhir:v "AuditEvent" ] ;
fhir:description [ fhir:v "Search for the PatientDeliveryStatus AuditEvent with the receiver organization, Name" ] ;
fhir:destination [ fhir:v 1 ] ;
fhir:encodeRequestUrl [ fhir:v true ] ;
fhir:origin [ fhir:v 1 ] ;
fhir:params [ fhir:v "?receiverOrg=${NameReceiverOrganization}" ]       ]     ] [
fhir:assert [
fhir:description [ fhir:v "Ensure the PatientDeliveryStatus AuditEvent is found" ] ;
fhir:direction [ fhir:v "response" ] ;
fhir:expression [ fhir:v "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.id = '${IdOfResourceToBeCreated}').count()" ] ;
fhir:operator [ fhir:v "equals" ] ;
fhir:value [ fhir:v "1" ] ;
fhir:warningOnly [ fhir:v false ]       ]     ] )
  ] [
fhir:id [ fhir:v "SearchPatientDeliveryStatusInvalidReceiverOrgDetails" ] ;
fhir:name [ fhir:v "ANS4 invalid receiver org search" ] ;
fhir:description [ fhir:v "Use case ANS4 search for the created PatientDeliveryStatus object on the SUT with an invalid receiver organization. Not expecting to find it" ] ;
    ( fhir:action [
fhir:operation [
fhir:type [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/testscript-operation-codes"^^xsd:anyURI ] ;
fhir:code [ fhir:v "search" ]         ] ;
fhir:resource [ fhir:v "AuditEvent" ] ;
fhir:description [ fhir:v "Search for the PatientDeliveryStatus AuditEvent with an invalid receiver organization" ] ;
fhir:destination [ fhir:v 1 ] ;
fhir:encodeRequestUrl [ fhir:v true ] ;
fhir:origin [ fhir:v 1 ] ;
fhir:params [ fhir:v "?receiverOrg=invalid" ]       ]     ] [
fhir:assert [
fhir:description [ fhir:v "Ensure the PatientDeliveryStatus AuditEvent is not found with an invalid receiver organization" ] ;
fhir:direction [ fhir:v "response" ] ;
fhir:expression [ fhir:v "Bundle.total" ] ;
fhir:operator [ fhir:v "equals" ] ;
fhir:value [ fhir:v "0" ] ;
fhir:warningOnly [ fhir:v false ]       ]     ] )
  ] [
fhir:id [ fhir:v "SearchPatientDeliveryStatusWithSenderOrgSOR" ] ;
fhir:name [ fhir:v "ANS4 sender org search SOR" ] ;
fhir:description [ fhir:v "Use case ANS4 search for the created PatientDeliveryStatus object on the SUT with sender org SOR" ] ;
    ( fhir:action [
fhir:operation [
fhir:type [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/testscript-operation-codes"^^xsd:anyURI ] ;
fhir:code [ fhir:v "search" ]         ] ;
fhir:resource [ fhir:v "AuditEvent" ] ;
fhir:description [ fhir:v "Search for the PatientDeliveryStatus AuditEvent with the sender organization, SOR" ] ;
fhir:destination [ fhir:v 1 ] ;
fhir:encodeRequestUrl [ fhir:v true ] ;
fhir:origin [ fhir:v 1 ] ;
fhir:params [ fhir:v "?senderOrg=${SORIDOfSenderOrganization}" ]       ]     ] [
fhir:assert [
fhir:description [ fhir:v "Ensure the PatientDeliveryStatus AuditEvent is found" ] ;
fhir:direction [ fhir:v "response" ] ;
fhir:expression [ fhir:v "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.id = '${IdOfResourceToBeCreated}').count()" ] ;
fhir:operator [ fhir:v "equals" ] ;
fhir:value [ fhir:v "1" ] ;
fhir:warningOnly [ fhir:v false ]       ]     ] )
  ] [
fhir:id [ fhir:v "SearchPatientDeliveryStatusWithSenderOrgGLN" ] ;
fhir:name [ fhir:v "ANS4 sender org search GLN" ] ;
fhir:description [ fhir:v "Use case ANS4 search for the created PatientDeliveryStatus object on the SUT with sender org GLN" ] ;
    ( fhir:action [
fhir:operation [
fhir:type [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/testscript-operation-codes"^^xsd:anyURI ] ;
fhir:code [ fhir:v "search" ]         ] ;
fhir:resource [ fhir:v "AuditEvent" ] ;
fhir:description [ fhir:v "Search for the PatientDeliveryStatus AuditEvent with the sender organization GLN" ] ;
fhir:destination [ fhir:v 1 ] ;
fhir:encodeRequestUrl [ fhir:v true ] ;
fhir:origin [ fhir:v 1 ] ;
fhir:params [ fhir:v "?senderOrg=${GLNOfSenderOrganization}" ]       ]     ] [
fhir:assert [
fhir:description [ fhir:v "Ensure the PatientDeliveryStatus AuditEvent is found" ] ;
fhir:direction [ fhir:v "response" ] ;
fhir:expression [ fhir:v "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.id = '${IdOfResourceToBeCreated}').count()" ] ;
fhir:operator [ fhir:v "equals" ] ;
fhir:value [ fhir:v "1" ] ;
fhir:warningOnly [ fhir:v false ]       ]     ] )
  ] [
fhir:id [ fhir:v "SearchPatientDeliveryStatusWithSenderOrgName" ] ;
fhir:name [ fhir:v "ANS4 sender org search name" ] ;
fhir:description [ fhir:v "Use case ANS4 search for the created PatientDeliveryStatus object on the SUT with sender org Name" ] ;
    ( fhir:action [
fhir:operation [
fhir:type [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/testscript-operation-codes"^^xsd:anyURI ] ;
fhir:code [ fhir:v "search" ]         ] ;
fhir:resource [ fhir:v "AuditEvent" ] ;
fhir:description [ fhir:v "Search for the PatientDeliveryStatus AuditEvent with the sender organization, Name" ] ;
fhir:destination [ fhir:v 1 ] ;
fhir:encodeRequestUrl [ fhir:v true ] ;
fhir:origin [ fhir:v 1 ] ;
fhir:params [ fhir:v "?senderOrg=${NameSenderOrganization}" ]       ]     ] [
fhir:assert [
fhir:description [ fhir:v "Ensure the PatientDeliveryStatus AuditEvent is found" ] ;
fhir:direction [ fhir:v "response" ] ;
fhir:expression [ fhir:v "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.id = '${IdOfResourceToBeCreated}').count()" ] ;
fhir:operator [ fhir:v "equals" ] ;
fhir:value [ fhir:v "1" ] ;
fhir:warningOnly [ fhir:v false ]       ]     ] )
  ] [
fhir:id [ fhir:v "SearchPatientDeliveryStatusInvalidSenderOrgDetails" ] ;
fhir:name [ fhir:v "ANS4 invalid search" ] ;
fhir:description [ fhir:v "Use case ANS4 search for the created PatientDeliveryStatus object on the SUT with an invalid sender organization. Not expecting to find it" ] ;
    ( fhir:action [
fhir:operation [
fhir:type [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/testscript-operation-codes"^^xsd:anyURI ] ;
fhir:code [ fhir:v "search" ]         ] ;
fhir:resource [ fhir:v "AuditEvent" ] ;
fhir:description [ fhir:v "Search for the PatientDeliveryStatus AuditEvent with an invalid sender organization" ] ;
fhir:destination [ fhir:v 1 ] ;
fhir:encodeRequestUrl [ fhir:v true ] ;
fhir:origin [ fhir:v 1 ] ;
fhir:params [ fhir:v "?senderOrg=invalid" ]       ]     ] [
fhir:assert [
fhir:description [ fhir:v "Ensure the PatientDeliveryStatus AuditEvent is not found with an invalid sender organization" ] ;
fhir:direction [ fhir:v "response" ] ;
fhir:expression [ fhir:v "Bundle.total" ] ;
fhir:operator [ fhir:v "equals" ] ;
fhir:value [ fhir:v "0" ] ;
fhir:warningOnly [ fhir:v false ]       ]     ] )
  ] ) . #