FHIR © HL7.org  |  FHIRsmith 4.0.1  |  Server Home  |  XIG Home  |  XIG Stats  | 

FHIR IG analytics

Packagedk.ehmi.eds.testscripts
Resource TypeTestScript
IdTestScript-Server-ANS4TestOrgSearch-json.json
FHIR VersionR4
Sourcehttps://build.fhir.org/ig/medcomdk/dk-ehmi-eds-testscripts/TestScript-Server-ANS4TestOrgSearch-json.html
URLhttp://medcomehmi.dk/ig/edstestscripts/Server-ANS4TestOrgSearch-json
Version0.1.0
Statusactive
Date2025-08-18
NameServer-ANS4TestOrgSearch-json
Realmdk
CopyrightMedCom 2025

Resources that use this resource

No resources found


Resources that this resource uses

No resources found


Narrative

Note: links and images are rebased to the (stated) source

Generated Narrative: TestScript Server-ANS4TestOrgSearch-json

Profile: http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript

url: TestScript Server-ANS4TestOrgSearch-json

version: 0.1.0

name: Server-ANS4TestOrgSearch-json

status: Aktiv

date: 2025-08-18

publisher: MedCom

contact: MedCom: https://medcom.dk,ehmi@medcom.dk

jurisdiction: Denmark

copyright:

MedCom 2025

Origins

-IndexProfile
*1Test script profile origin type: FHIR-Client (FHIR Client)

Destinations

-IndexProfile
*1Test script profile destination type: FHIR-Server (FHIR Server)

fixture

id

EdsPatientDeliveryStatusCreateFixture

autocreate: false

autodelete: false

resource: ../Fixtures/EdsPatientDeliveryStatusCreateFixture.json

profile: http://medcomehmi.dk/ig/eds/StructureDefinition/EdsPatientDeliveryStatus

variable

name: RecordedOfResourceToFindInSearch

expression: recorded

sourceId: EdsPatientDeliveryStatusCreateFixture

variable

name: SORIDOfReceiverOrganization

expression: agent.where(type.coding.code = 'ehmiReceiver').who.identifier.value

sourceId: EdsPatientDeliveryStatusCreateFixture

variable

name: GLNOfReceiverOrganization

expression: agent.where(type.coding.code = 'ehmiReceiver').extension.where(url = 'http://medcomehmi.dk/ig/eds/StructureDefinition/eds-otherId').valueIdentifier.value

sourceId: EdsPatientDeliveryStatusCreateFixture

variable

name: NameReceiverOrganization

expression: agent.where(type.coding.code = 'ehmiReceiver').name

sourceId: EdsPatientDeliveryStatusCreateFixture

variable

name: SORIDOfSenderOrganization

expression: agent.where(type.coding.code = 'ehmiSender').who.identifier.value

sourceId: EdsPatientDeliveryStatusCreateFixture

variable

name: GLNOfSenderOrganization

expression: agent.where(type.coding.code = 'ehmiSender').extension.where(url = 'http://medcomehmi.dk/ig/eds/StructureDefinition/eds-otherId').valueIdentifier.value

sourceId: EdsPatientDeliveryStatusCreateFixture

variable

name: NameSenderOrganization

expression: agent.where(type.coding.code = 'ehmiSender').name

sourceId: EdsPatientDeliveryStatusCreateFixture

test

id

SearchPatientDeliveryStatusWithReceiverOrgSOR

name: ANS4 receiver org search SOR

description: user story ANS4 search for the created PatientDeliveryStatus object on the SUT with receiver org SOR

action

Operations

-TypeResourceDescriptionAcceptContentTypeDestinationEncodeRequestUrlOriginParams
*Test script operation code: search (Search)AuditEventSearch for the PatientDeliveryStatus AuditEvent with the receiver organization, SORjsonjson1true1?receiverOrg=${SORIDOfReceiverOrganization}

action

Asserts

-DescriptionDirectionExpressionOperatorValueWarningOnly
*Ensure the PatientDeliveryStatus AuditEvent is foundresponseBundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()equals1false

test

id

SearchPatientDeliveryStatusWithReceiverOrgGLN

name: ANS4 receiver org search GLN

description: user story ANS4 search for the created PatientDeliveryStatus object on the SUT with receiver org GLN

action

Operations

-TypeResourceDescriptionAcceptContentTypeDestinationEncodeRequestUrlOriginParams
*Test script operation code: search (Search)AuditEventSearch for the PatientDeliveryStatus AuditEvent with the receiver organization GLNjsonjson1true1?receiverOrg=${GLNOfReceiverOrganization}

action

Asserts

-DescriptionDirectionExpressionOperatorValueWarningOnly
*Ensure the PatientDeliveryStatus AuditEvent is foundresponseBundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()equals1false

test

id

SearchPatientDeliveryStatusWithReceiverOrgName

name: ANS4 receiver org search Name

description: user story ANS4 search for the created PatientDeliveryStatus object on the SUT with receiver org Name

action

Operations

-TypeResourceDescriptionAcceptContentTypeDestinationEncodeRequestUrlOriginParams
*Test script operation code: search (Search)AuditEventSearch for the PatientDeliveryStatus AuditEvent with the receiver organization, Namejsonjson1true1?receiverOrg=${NameReceiverOrganization}

action

Asserts

-DescriptionDirectionExpressionOperatorValueWarningOnly
*Ensure the PatientDeliveryStatus AuditEvent is foundresponseBundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()equals1false

test

id

SearchPatientDeliveryStatusInvalidReceiverOrgDetails

name: ANS4 invalid receiver org search

description: user story ANS4 search for the created PatientDeliveryStatus object on the SUT with an invalid receiver organization. Not expecting to find it

action

Operations

-TypeResourceDescriptionAcceptContentTypeDestinationEncodeRequestUrlOriginParams
*Test script operation code: search (Search)AuditEventSearch for the PatientDeliveryStatus AuditEvent with an invalid receiver organizationjsonjson1true1?receiverOrg=invalid

action

Asserts

-DescriptionDirectionExpressionOperatorValueWarningOnly
*Ensure the PatientDeliveryStatus AuditEvent is not found with an invalid receiver organizationresponseBundle.totalequals0false

test

id

SearchPatientDeliveryStatusWithSenderOrgSOR

name: ANS4 sender org search SOR

description: user story ANS4 search for the created PatientDeliveryStatus object on the SUT with sender org SOR

action

Operations

-TypeResourceDescriptionAcceptContentTypeDestinationEncodeRequestUrlOriginParams
*Test script operation code: search (Search)AuditEventSearch for the PatientDeliveryStatus AuditEvent with the sender organization, SORjsonjson1true1?senderOrg=${SORIDOfSenderOrganization}

action

Asserts

-DescriptionDirectionExpressionOperatorValueWarningOnly
*Ensure the PatientDeliveryStatus AuditEvent is foundresponseBundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()equals1false

test

id

SearchPatientDeliveryStatusWithSenderOrgGLN

name: ANS4 sender org search GLN

description: user story ANS4 search for the created PatientDeliveryStatus object on the SUT with sender org GLN

action

Operations

-TypeResourceDescriptionAcceptContentTypeDestinationEncodeRequestUrlOriginParams
*Test script operation code: search (Search)AuditEventSearch for the PatientDeliveryStatus AuditEvent with the sender organization GLNjsonjson1true1?senderOrg=${GLNOfSenderOrganization}

action

Asserts

-DescriptionDirectionExpressionOperatorValueWarningOnly
*Ensure the PatientDeliveryStatus AuditEvent is foundresponseBundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()equals1false

test

id

SearchPatientDeliveryStatusWithSenderOrgName

name: ANS4 sender org search name

description: user story ANS4 search for the created PatientDeliveryStatus object on the SUT with sender org Name

action

Operations

-TypeResourceDescriptionAcceptContentTypeDestinationEncodeRequestUrlOriginParams
*Test script operation code: search (Search)AuditEventSearch for the PatientDeliveryStatus AuditEvent with the sender organization, Namejsonjson1true1?senderOrg=${NameSenderOrganization}

action

Asserts

-DescriptionDirectionExpressionOperatorValueWarningOnly
*Ensure the PatientDeliveryStatus AuditEvent is foundresponseBundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()equals1false

test

id

SearchPatientDeliveryStatusInvalidSenderOrgDetails

name: ANS4 invalid search

description: user story ANS4 search for the created PatientDeliveryStatus object on the SUT with an invalid sender organization. Not expecting to find it

action

Operations

-TypeResourceDescriptionAcceptContentTypeDestinationEncodeRequestUrlOriginParams
*Test script operation code: search (Search)AuditEventSearch for the PatientDeliveryStatus AuditEvent with an invalid sender organizationjsonjson1true1?senderOrg=invalid

action

Asserts

-DescriptionDirectionExpressionOperatorValueWarningOnly
*Ensure the PatientDeliveryStatus AuditEvent is not found with an invalid sender organizationresponseBundle.totalequals0false

Source1

{
  "resourceType": "TestScript",
  "id": "Server-ANS4TestOrgSearch-json",
  "meta": {
    "profile": [
      "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript"
    ]
  },
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "url": "http://medcomehmi.dk/ig/edstestscripts/Server-ANS4TestOrgSearch-json",
  "version": "0.1.0",
  "name": "Server-ANS4TestOrgSearch-json",
  "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": "EdsPatientDeliveryStatusCreateFixture",
      "autocreate": false,
      "autodelete": false,
      "resource": {
        "reference": "../Fixtures/EdsPatientDeliveryStatusCreateFixture.json"
      }
    }
  ],
  "profile": [
    {
      "id": "eds-patient-delivery-status",
      "reference": "http://medcomehmi.dk/ig/eds/StructureDefinition/EdsPatientDeliveryStatus"
    }
  ],
  "variable": [
    {
      "name": "RecordedOfResourceToFindInSearch",
      "expression": "recorded",
      "sourceId": "EdsPatientDeliveryStatusCreateFixture"
    },
    {
      "name": "SORIDOfReceiverOrganization",
      "expression": "agent.where(type.coding.code = 'ehmiReceiver').who.identifier.value",
      "sourceId": "EdsPatientDeliveryStatusCreateFixture"
    },
    {
      "name": "GLNOfReceiverOrganization",
      "expression": "agent.where(type.coding.code = 'ehmiReceiver').extension.where(url = 'http://medcomehmi.dk/ig/eds/StructureDefinition/eds-otherId').valueIdentifier.value",
      "sourceId": "EdsPatientDeliveryStatusCreateFixture"
    },
    {
      "name": "NameReceiverOrganization",
      "expression": "agent.where(type.coding.code = 'ehmiReceiver').name",
      "sourceId": "EdsPatientDeliveryStatusCreateFixture"
    },
    {
      "name": "SORIDOfSenderOrganization",
      "expression": "agent.where(type.coding.code = 'ehmiSender').who.identifier.value",
      "sourceId": "EdsPatientDeliveryStatusCreateFixture"
    },
    {
      "name": "GLNOfSenderOrganization",
      "expression": "agent.where(type.coding.code = 'ehmiSender').extension.where(url = 'http://medcomehmi.dk/ig/eds/StructureDefinition/eds-otherId').valueIdentifier.value",
      "sourceId": "EdsPatientDeliveryStatusCreateFixture"
    },
    {
      "name": "NameSenderOrganization",
      "expression": "agent.where(type.coding.code = 'ehmiSender').name",
      "sourceId": "EdsPatientDeliveryStatusCreateFixture"
    }
  ],
  "test": [
    {
      "id": "SearchPatientDeliveryStatusWithReceiverOrgSOR",
      "name": "ANS4 receiver org search SOR",
      "description": "user story ANS4 search for the created PatientDeliveryStatus object on the SUT with receiver org SOR",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "AuditEvent",
            "description": "Search for the PatientDeliveryStatus AuditEvent with the receiver organization, SOR",
            "accept": "json",
            "contentType": "json",
            "destination": 1,
            "encodeRequestUrl": true,
            "origin": 1,
            "params": "?receiverOrg=${SORIDOfReceiverOrganization}"
          }
        },
        {
          "assert": {
            "description": "Ensure the PatientDeliveryStatus AuditEvent is found",
            "direction": "response",
            "expression": "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()",
            "operator": "equals",
            "value": "1",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "id": "SearchPatientDeliveryStatusWithReceiverOrgGLN",
      "name": "ANS4 receiver org search GLN",
      "description": "user story ANS4 search for the created PatientDeliveryStatus object on the SUT with receiver org GLN",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "AuditEvent",
            "description": "Search for the PatientDeliveryStatus AuditEvent with the receiver organization GLN",
            "accept": "json",
            "contentType": "json",
            "destination": 1,
            "encodeRequestUrl": true,
            "origin": 1,
            "params": "?receiverOrg=${GLNOfReceiverOrganization}"
          }
        },
        {
          "assert": {
            "description": "Ensure the PatientDeliveryStatus AuditEvent is found",
            "direction": "response",
            "expression": "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()",
            "operator": "equals",
            "value": "1",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "id": "SearchPatientDeliveryStatusWithReceiverOrgName",
      "name": "ANS4 receiver org search Name",
      "description": "user story ANS4 search for the created PatientDeliveryStatus object on the SUT with receiver org Name",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "AuditEvent",
            "description": "Search for the PatientDeliveryStatus AuditEvent with the receiver organization, Name",
            "accept": "json",
            "contentType": "json",
            "destination": 1,
            "encodeRequestUrl": true,
            "origin": 1,
            "params": "?receiverOrg=${NameReceiverOrganization}"
          }
        },
        {
          "assert": {
            "description": "Ensure the PatientDeliveryStatus AuditEvent is found",
            "direction": "response",
            "expression": "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()",
            "operator": "equals",
            "value": "1",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "id": "SearchPatientDeliveryStatusInvalidReceiverOrgDetails",
      "name": "ANS4 invalid receiver org search",
      "description": "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": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "AuditEvent",
            "description": "Search for the PatientDeliveryStatus AuditEvent with an invalid receiver organization",
            "accept": "json",
            "contentType": "json",
            "destination": 1,
            "encodeRequestUrl": true,
            "origin": 1,
            "params": "?receiverOrg=invalid"
          }
        },
        {
          "assert": {
            "description": "Ensure the PatientDeliveryStatus AuditEvent is not found with an invalid receiver organization",
            "direction": "response",
            "expression": "Bundle.total",
            "operator": "equals",
            "value": "0",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "id": "SearchPatientDeliveryStatusWithSenderOrgSOR",
      "name": "ANS4 sender org search SOR",
      "description": "user story ANS4 search for the created PatientDeliveryStatus object on the SUT with sender org SOR",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "AuditEvent",
            "description": "Search for the PatientDeliveryStatus AuditEvent with the sender organization, SOR",
            "accept": "json",
            "contentType": "json",
            "destination": 1,
            "encodeRequestUrl": true,
            "origin": 1,
            "params": "?senderOrg=${SORIDOfSenderOrganization}"
          }
        },
        {
          "assert": {
            "description": "Ensure the PatientDeliveryStatus AuditEvent is found",
            "direction": "response",
            "expression": "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()",
            "operator": "equals",
            "value": "1",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "id": "SearchPatientDeliveryStatusWithSenderOrgGLN",
      "name": "ANS4 sender org search GLN",
      "description": "user story ANS4 search for the created PatientDeliveryStatus object on the SUT with sender org GLN",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "AuditEvent",
            "description": "Search for the PatientDeliveryStatus AuditEvent with the sender organization GLN",
            "accept": "json",
            "contentType": "json",
            "destination": 1,
            "encodeRequestUrl": true,
            "origin": 1,
            "params": "?senderOrg=${GLNOfSenderOrganization}"
          }
        },
        {
          "assert": {
            "description": "Ensure the PatientDeliveryStatus AuditEvent is found",
            "direction": "response",
            "expression": "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()",
            "operator": "equals",
            "value": "1",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "id": "SearchPatientDeliveryStatusWithSenderOrgName",
      "name": "ANS4 sender org search name",
      "description": "user story ANS4 search for the created PatientDeliveryStatus object on the SUT with sender org Name",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "AuditEvent",
            "description": "Search for the PatientDeliveryStatus AuditEvent with the sender organization, Name",
            "accept": "json",
            "contentType": "json",
            "destination": 1,
            "encodeRequestUrl": true,
            "origin": 1,
            "params": "?senderOrg=${NameSenderOrganization}"
          }
        },
        {
          "assert": {
            "description": "Ensure the PatientDeliveryStatus AuditEvent is found",
            "direction": "response",
            "expression": "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()",
            "operator": "equals",
            "value": "1",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "id": "SearchPatientDeliveryStatusInvalidSenderOrgDetails",
      "name": "ANS4 invalid search",
      "description": "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": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "AuditEvent",
            "description": "Search for the PatientDeliveryStatus AuditEvent with an invalid sender organization",
            "accept": "json",
            "contentType": "json",
            "destination": 1,
            "encodeRequestUrl": true,
            "origin": 1,
            "params": "?senderOrg=invalid"
          }
        },
        {
          "assert": {
            "description": "Ensure the PatientDeliveryStatus AuditEvent is not found with an invalid sender organization",
            "direction": "response",
            "expression": "Bundle.total",
            "operator": "equals",
            "value": "0",
            "warningOnly": false
          }
        }
      ]
    }
  ]
}