FHIR IG analytics| Package | dk.ehmi.eds.testscripts |
| Resource Type | TestScript |
| Id | TestScript-Server-ANS3TestCprSearch-json.json |
| FHIR Version | R4 |
| Source | https://build.fhir.org/ig/medcomdk/dk-ehmi-eds-testscripts/TestScript-Server-ANS3TestCprSearch-json.html |
| URL | http://medcomehmi.dk/ig/edstestscripts/Server-ANS3TestCprSearch-json |
| Version | 0.1.0 |
| Status | active |
| Date | 2025-08-18 |
| Name | Server-ANS3TestCprSearch-json |
| Realm | dk |
| Copyright | MedCom 2025 |
No resources found
No resources found
Note: links and images are rebased to the (stated) source
Generated Narrative: TestScript Server-ANS3TestCprSearch-json
Profile: http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript
url: TestScript Server-ANS3TestCprSearch-json
version: 0.1.0
name: Server-ANS3TestCprSearch-json
status: Aktiv
date: 2025-08-18
publisher: MedCom
contact: MedCom: https://medcom.dk,ehmi@medcom.dk
jurisdiction: Denmark
copyright:
MedCom 2025
| Index | Profile |
| 1 | Test script profile origin type: FHIR-Client (FHIR Client) |
| Index | Profile |
| 1 | Test script profile destination type: FHIR-Server (FHIR Server) |
fixture
id
EdsPatientDeliveryStatusCreateFixtureautocreate: false
autodelete: false
resource:
../Fixtures/EdsPatientDeliveryStatusCreateFixture.json
profile: http://medcomehmi.dk/ig/eds/StructureDefinition/EdsPatientDeliveryStatus
variable
name: RecordedOfResourceToFindInSearch
expression: recorded
sourceId: EdsPatientDeliveryStatusCreateFixture
variable
name: CPROfPatientInFixture
expression: entity.where(type.code = 'ehmiPatient').what.identifier.value
sourceId: EdsPatientDeliveryStatusCreateFixture
test
id
SearchPatientDeliveryStatusWithCPRname: ANS3 search
description: user story ANS3 search for the created PatientDeliveryStatus object on the SUT with cpr
action
Operations
Type Resource Description Accept ContentType Destination EncodeRequestUrl Origin Params Test script operation code: search (Search) AuditEvent Search for the PatientDeliveryStatus AuditEvent with the CPR being ${CPROfPatientInFixture} json json 1 true 1 ?cpr=${CPROfPatientInFixture} action
Asserts
Description Direction Expression Operator Value WarningOnly Ensure the PatientDeliveryStatus AuditEvent is found response Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count() equals 1 false
test
id
SearchPatientDeliveryStatusInvalidCPRname: ANS3 invalid search
description: user story ANS3 search for the created PatientDeliveryStatus object on the SUT with an invalid CPR. Not expecting to find it
action
Operations
Type Resource Description Accept ContentType Destination EncodeRequestUrl Origin Params Test script operation code: search (Search) AuditEvent Search for the PatientDeliveryStatus AuditEvent with an invalid CPR json json 1 true 1 ?cpr=invalid action
Asserts
Description Direction Expression Operator Value WarningOnly Ensure the PatientDeliveryStatus AuditEvent is not found with an invalid CPR response Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count() equals 0 false
{
"resourceType": "TestScript",
"id": "Server-ANS3TestCprSearch-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-ANS3TestCprSearch-json",
"version": "0.1.0",
"name": "Server-ANS3TestCprSearch-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": "CPROfPatientInFixture",
"expression": "entity.where(type.code = 'ehmiPatient').what.identifier.value",
"sourceId": "EdsPatientDeliveryStatusCreateFixture"
}
],
"test": [
{
"id": "SearchPatientDeliveryStatusWithCPR",
"name": "ANS3 search",
"description": "user story ANS3 search for the created PatientDeliveryStatus object on the SUT with cpr",
"action": [
{
"operation": {
"type": {
"system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
"code": "search"
},
"resource": "AuditEvent",
"description": "Search for the PatientDeliveryStatus AuditEvent with the CPR being ${CPROfPatientInFixture}",
"accept": "json",
"contentType": "json",
"destination": 1,
"encodeRequestUrl": true,
"origin": 1,
"params": "?cpr=${CPROfPatientInFixture}"
}
},
{
"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": "SearchPatientDeliveryStatusInvalidCPR",
"name": "ANS3 invalid search",
"description": "user story ANS3 search for the created PatientDeliveryStatus object on the SUT with an invalid CPR. 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 CPR",
"accept": "json",
"contentType": "json",
"destination": 1,
"encodeRequestUrl": true,
"origin": 1,
"params": "?cpr=invalid"
}
},
{
"assert": {
"description": "Ensure the PatientDeliveryStatus AuditEvent is not found with an invalid CPR",
"direction": "response",
"expression": "Bundle.entry.where(resource.resourceType = 'AuditEvent' and resource.recorded = '${RecordedOfResourceToFindInSearch}').count()",
"operator": "equals",
"value": "0",
"warningOnly": false
}
}
]
}
]
}