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.6 - Message Identifier Searching - JSON Representation

Active as of 2025-08-18

Raw json | Download

{
  "resourceType" : "TestScript",
  "id" : "ANS6TestMessageIdentifierSearching",
  "meta" : {
    "profile" : [
      "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript"
    ]
  },
  "text" : {
    "status" : "generated",
    "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: TestScript ANS6TestMessageIdentifierSearching</b></p><a name=\"ANS6TestMessageIdentifierSearching\"> </a><a name=\"hcANS6TestMessageIdentifierSearching\"> </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-ANS6TestMessageIdentifierSearching.html\">TestScript ANS6TestMessageIdentifierSearching</a></p><p><b>version</b>: 0.1.0</p><p><b>name</b>: ANS6TestMessageIdentifierSearching</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>: ehmiMessageIdentifierOfCreatedResource</p><p><b>expression</b>: entity.where(type.code = 'ehmiMessage').what.identifier.value</p><p><b>sourceId</b>: C1EUAEDSPatientDeliveryStatus</p></blockquote><blockquote><p><b>variable</b></p><p><b>name</b>: ehmiMessageEnvelopeIdentifierOfCreatedResource</p><p><b>expression</b>: entity.where(type.code = 'ehmiMessageEnvelope').what.identifier.value</p><p><b>sourceId</b>: C1EUAEDSPatientDeliveryStatus</p></blockquote><blockquote><p><b>variable</b></p><p><b>name</b>: ehmiTransportEnvelopeIdentifierOfCreatedResource</p><p><b>expression</b>: entity.where(type.code = 'ehmiTransportEnvelope').what.identifier.value</p><p><b>sourceId</b>: C1EUAEDSPatientDeliveryStatus</p></blockquote><blockquote><p><b>variable</b></p><p><b>name</b>: ehmiOrigMessageIdentifierOfCreatedResource</p><p><b>expression</b>: entity.where(type.code = 'ehmiOrigMessage').what.identifier.value</p><p><b>sourceId</b>: C1EUAEDSPatientDeliveryStatus</p></blockquote><blockquote><p><b>variable</b></p><p><b>name</b>: ehmiOrigTransportEnvelopeIdentifierOfCreatedResource</p><p><b>expression</b>: entity.where(type.code = 'ehmiOrigTransportEnvelope').what.identifier.value</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>: ANS6 Create</p><p><b>description</b>: Use case ANS6 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>SearchPatientDeliveryStatusWithEhmiMessageIdentifier</blockquote><p><b>name</b>: ANS6 search with ehmi message identifier</p><p><b>description</b>: Use case ANS6 search for the created PatientDeliveryStatus object on the SUT with the ehmiMessage identifier</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 ehmiMessage identifier</td><td>1</td><td>true</td><td>1</td><td>?entityIdentifier=${ehmiMessageIdentifierOfCreatedResource}</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>SearchPatientDeliveryStatusWithEhmiMessageEnvelopeIdentifier</blockquote><p><b>name</b>: ANS6 search with ehmi message envelope identifier</p><p><b>description</b>: Use case ANS6 search for the created PatientDeliveryStatus object on the SUT with the ehmiMessageEnvelope identifier</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 ehmiMessageEnvelope identifier</td><td>1</td><td>true</td><td>1</td><td>?entityIdentifier=${ehmiMessageEnvelopeIdentifierOfCreatedResource}</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>SearchPatientDeliveryStatusWithEhmiTransportEnvelopeIdentifier</blockquote><p><b>name</b>: ANS6 search with ehmi transport envelope identifier</p><p><b>description</b>: Use case ANS6 search for the created PatientDeliveryStatus object on the SUT with the ehmiTransportEnvelope identifier</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 ehmiTransportEnvelope identifier</td><td>1</td><td>true</td><td>1</td><td>?entityIdentifier=${ehmiTransportEnvelopeIdentifierOfCreatedResource}</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>SearchPatientDeliveryStatusWithEhmiOrigMessageIdentifier</blockquote><p><b>name</b>: ANS6 search with ehmi orig envelope identifier</p><p><b>description</b>: Use case ANS6 search for the created PatientDeliveryStatus object on the SUT with the ehmiOrigMessageIdentifier identifier</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 ehmiOrigMessageIdentifier identifier</td><td>1</td><td>true</td><td>1</td><td>?entityIdentifier=${ehmiOrigMessageIdentifierOfCreatedResource}</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>SearchPatientDeliveryStatusWithEhmiOrigTransportEnvelopeIdentifier</blockquote><p><b>name</b>: ANS6 search with ehmi orig transport envelope identifier</p><p><b>description</b>: Use case ANS6 search for the created PatientDeliveryStatus object on the SUT with the ehmiOrigTransportEnvelope identifier</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 ehmiOrigTransportEnvelope identifier</td><td>1</td><td>true</td><td>1</td><td>?entityIdentifier=${ehmiOrigTransportEnvelopeIdentifierOfCreatedResource}</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>SearchPatientDeliveryStatusWithInvalidEhmiIdentifier</blockquote><p><b>name</b>: ANS6 search</p><p><b>description</b>: Use case ANS6 search for the created PatientDeliveryStatus object on the SUT with an invalid ehmi identifier</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 ehmi identifier</td><td>1</td><td>true</td><td>1</td><td>?entityIdentifier=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</td><td>response</td><td>Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.id = '${IdOfResourceToBeCreated}').count()</td><td>equals</td><td>0</td><td>false</td></tr></table></blockquote></blockquote></div>"
  },
  "url" : "http://medcomehmi.dk/ig/edstestscripts/ANS6TestMessageIdentifierSearching",
  "version" : "0.1.0",
  "name" : "ANS6TestMessageIdentifierSearching",
  "status" : "active",
  "date" : "2025-08-18",
  "publisher" : "MedCom",
  "contact" : [
    {
      "name" : "MedCom",
      "telecom" : [
        {
          "system" : "url",
          "value" : "https://medcom.dk"
        },
        {
          "system" : "email",
          "value" : "ehmi@medcom.dk"
        }
      ]
    }
  ],
  "jurisdiction" : [
    {
      "coding" : [
        {
          "system" : "urn:iso:std:iso:3166",
          "code" : "DK",
          "display" : "Denmark"
        }
      ]
    }
  ],
  "copyright" : "MedCom 2025",
  "origin" : [
    {
      "index" : 1,
      "profile" : {
        "system" : "http://terminology.hl7.org/CodeSystem/testscript-profile-origin-types",
        "code" : "FHIR-Client"
      }
    }
  ],
  "destination" : [
    {
      "index" : 1,
      "profile" : {
        "system" : "http://terminology.hl7.org/CodeSystem/testscript-profile-destination-types",
        "code" : "FHIR-Server"
      }
    }
  ],
  "fixture" : [
    {
      "id" : "C1EUAEDSPatientDeliveryStatus",
      "autocreate" : false,
      "autodelete" : false,
      "resource" : {
        "reference" : "./Fixtures/AuditEvent-C1EUAToEdsFixture.json"
      }
    }
  ],
  "profile" : [
    {
      🔗 "id" : "eds-patient-delivery-status",
      "reference" : "http://medcomehmi.dk/ig/eds/StructureDefinition/EdsPatientDeliveryStatus"
    }
  ],
  "variable" : [
    {
      "name" : "IdOfResourceToBeCreated",
      "expression" : "id",
      "sourceId" : "C1EUAEDSPatientDeliveryStatus"
    },
    {
      "name" : "ehmiMessageIdentifierOfCreatedResource",
      "expression" : "entity.where(type.code = 'ehmiMessage').what.identifier.value",
      "sourceId" : "C1EUAEDSPatientDeliveryStatus"
    },
    {
      "name" : "ehmiMessageEnvelopeIdentifierOfCreatedResource",
      "expression" : "entity.where(type.code = 'ehmiMessageEnvelope').what.identifier.value",
      "sourceId" : "C1EUAEDSPatientDeliveryStatus"
    },
    {
      "name" : "ehmiTransportEnvelopeIdentifierOfCreatedResource",
      "expression" : "entity.where(type.code = 'ehmiTransportEnvelope').what.identifier.value",
      "sourceId" : "C1EUAEDSPatientDeliveryStatus"
    },
    {
      "name" : "ehmiOrigMessageIdentifierOfCreatedResource",
      "expression" : "entity.where(type.code = 'ehmiOrigMessage').what.identifier.value",
      "sourceId" : "C1EUAEDSPatientDeliveryStatus"
    },
    {
      "name" : "ehmiOrigTransportEnvelopeIdentifierOfCreatedResource",
      "expression" : "entity.where(type.code = 'ehmiOrigTransportEnvelope').what.identifier.value",
      "sourceId" : "C1EUAEDSPatientDeliveryStatus"
    }
  ],
  "setup" : {
    "action" : [
      {
        "operation" : {
          "type" : {
            "system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
            "code" : "delete"
          },
          "resource" : "AuditEvent",
          "description" : "Deletes the resource we intend to create later, to ensure it doesn't already exist on the server from previously run tests",
          "destination" : 1,
          "encodeRequestUrl" : true,
          "origin" : 1,
          "params" : "/${IdOfResourceToBeCreated}"
        }
      }
    ]
  },
  "test" : [
    {
      "id" : "CreatePatientDeliveryStatus",
      "name" : "ANS6 Create",
      "description" : "Use case ANS6 create PatientDeliveryStatus object on the SUT in order to search for it later",
      "action" : [
        {
          "operation" : {
            "type" : {
              "system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code" : "update"
            },
            "resource" : "AuditEvent",
            "description" : "Create a PatientDeliveryStatus AuditEvent resource on the SUT",
            "destination" : 1,
            "encodeRequestUrl" : true,
            "origin" : 1,
            "params" : "/${IdOfResourceToBeCreated}",
            "sourceId" : "C1EUAEDSPatientDeliveryStatus"
          }
        },
        {
          "assert" : {
            "description" : "Ensure the PatientDeliveryStatus AuditEvent was created",
            "direction" : "response",
            "response" : "created",
            "warningOnly" : false
          }
        }
      ]
    },
    {
      "id" : "SearchPatientDeliveryStatusWithEhmiMessageIdentifier",
      "name" : "ANS6 search with ehmi message identifier",
      "description" : "Use case ANS6 search for the created PatientDeliveryStatus object on the SUT with the ehmiMessage identifier",
      "action" : [
        {
          "operation" : {
            "type" : {
              "system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code" : "search"
            },
            "resource" : "AuditEvent",
            "description" : "Search for the PatientDeliveryStatus AuditEvent with the ehmiMessage identifier",
            "destination" : 1,
            "encodeRequestUrl" : true,
            "origin" : 1,
            "params" : "?entityIdentifier=${ehmiMessageIdentifierOfCreatedResource}"
          }
        },
        {
          "assert" : {
            "description" : "Ensure the PatientDeliveryStatus AuditEvent is found",
            "direction" : "response",
            "expression" : "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.id = '${IdOfResourceToBeCreated}').count()",
            "operator" : "equals",
            "value" : "1",
            "warningOnly" : false
          }
        }
      ]
    },
    {
      "id" : "SearchPatientDeliveryStatusWithEhmiMessageEnvelopeIdentifier",
      "name" : "ANS6 search with ehmi message envelope identifier",
      "description" : "Use case ANS6 search for the created PatientDeliveryStatus object on the SUT with the ehmiMessageEnvelope identifier",
      "action" : [
        {
          "operation" : {
            "type" : {
              "system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code" : "search"
            },
            "resource" : "AuditEvent",
            "description" : "Search for the PatientDeliveryStatus AuditEvent with the ehmiMessageEnvelope identifier",
            "destination" : 1,
            "encodeRequestUrl" : true,
            "origin" : 1,
            "params" : "?entityIdentifier=${ehmiMessageEnvelopeIdentifierOfCreatedResource}"
          }
        },
        {
          "assert" : {
            "description" : "Ensure the PatientDeliveryStatus AuditEvent is found",
            "direction" : "response",
            "expression" : "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.id = '${IdOfResourceToBeCreated}').count()",
            "operator" : "equals",
            "value" : "1",
            "warningOnly" : false
          }
        }
      ]
    },
    {
      "id" : "SearchPatientDeliveryStatusWithEhmiTransportEnvelopeIdentifier",
      "name" : "ANS6 search with ehmi transport envelope identifier",
      "description" : "Use case ANS6 search for the created PatientDeliveryStatus object on the SUT with the ehmiTransportEnvelope identifier",
      "action" : [
        {
          "operation" : {
            "type" : {
              "system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code" : "search"
            },
            "resource" : "AuditEvent",
            "description" : "Search for the PatientDeliveryStatus AuditEvent with the ehmiTransportEnvelope identifier",
            "destination" : 1,
            "encodeRequestUrl" : true,
            "origin" : 1,
            "params" : "?entityIdentifier=${ehmiTransportEnvelopeIdentifierOfCreatedResource}"
          }
        },
        {
          "assert" : {
            "description" : "Ensure the PatientDeliveryStatus AuditEvent is found",
            "direction" : "response",
            "expression" : "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.id = '${IdOfResourceToBeCreated}').count()",
            "operator" : "equals",
            "value" : "1",
            "warningOnly" : false
          }
        }
      ]
    },
    {
      "id" : "SearchPatientDeliveryStatusWithEhmiOrigMessageIdentifier",
      "name" : "ANS6 search with ehmi orig envelope identifier",
      "description" : "Use case ANS6 search for the created PatientDeliveryStatus object on the SUT with the ehmiOrigMessageIdentifier identifier",
      "action" : [
        {
          "operation" : {
            "type" : {
              "system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code" : "search"
            },
            "resource" : "AuditEvent",
            "description" : "Search for the PatientDeliveryStatus AuditEvent with the ehmiOrigMessageIdentifier identifier",
            "destination" : 1,
            "encodeRequestUrl" : true,
            "origin" : 1,
            "params" : "?entityIdentifier=${ehmiOrigMessageIdentifierOfCreatedResource}"
          }
        },
        {
          "assert" : {
            "description" : "Ensure the PatientDeliveryStatus AuditEvent is found",
            "direction" : "response",
            "expression" : "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.id = '${IdOfResourceToBeCreated}').count()",
            "operator" : "equals",
            "value" : "1",
            "warningOnly" : false
          }
        }
      ]
    },
    {
      "id" : "SearchPatientDeliveryStatusWithEhmiOrigTransportEnvelopeIdentifier",
      "name" : "ANS6 search with ehmi orig transport envelope identifier",
      "description" : "Use case ANS6 search for the created PatientDeliveryStatus object on the SUT with the ehmiOrigTransportEnvelope identifier",
      "action" : [
        {
          "operation" : {
            "type" : {
              "system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code" : "search"
            },
            "resource" : "AuditEvent",
            "description" : "Search for the PatientDeliveryStatus AuditEvent with the ehmiOrigTransportEnvelope identifier",
            "destination" : 1,
            "encodeRequestUrl" : true,
            "origin" : 1,
            "params" : "?entityIdentifier=${ehmiOrigTransportEnvelopeIdentifierOfCreatedResource}"
          }
        },
        {
          "assert" : {
            "description" : "Ensure the PatientDeliveryStatus AuditEvent is found",
            "direction" : "response",
            "expression" : "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.id = '${IdOfResourceToBeCreated}').count()",
            "operator" : "equals",
            "value" : "1",
            "warningOnly" : false
          }
        }
      ]
    },
    {
      "id" : "SearchPatientDeliveryStatusWithInvalidEhmiIdentifier",
      "name" : "ANS6 search",
      "description" : "Use case ANS6 search for the created PatientDeliveryStatus object on the SUT with an invalid ehmi identifier",
      "action" : [
        {
          "operation" : {
            "type" : {
              "system" : "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code" : "search"
            },
            "resource" : "AuditEvent",
            "description" : "Search for the PatientDeliveryStatus AuditEvent with an invalid ehmi identifier",
            "destination" : 1,
            "encodeRequestUrl" : true,
            "origin" : 1,
            "params" : "?entityIdentifier=invalid"
          }
        },
        {
          "assert" : {
            "description" : "Ensure the PatientDeliveryStatus AuditEvent is not found",
            "direction" : "response",
            "expression" : "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.id = '${IdOfResourceToBeCreated}').count()",
            "operator" : "equals",
            "value" : "0",
            "warningOnly" : false
          }
        }
      ]
    }
  ]
}