Package | medcom.fhir.dk.conditionlisttestscripts |
Resource Type | TestScript |
Id | minimum-example |
FHIR Version | R4 |
Source | http://medcomfhir.dk/ig/conditionlisttestscripts/https://build.fhir.org/ig/medcomdk/dk-medcom-ConditionList-test-scripts/TestScript-minimum-example.html |
URL | http://medcomfhir.dk/ig/conditionlisttestscript/minimum-example |
Version | 0.1.0 |
Status | active |
Date | 2025-04-01 |
Name | ConditionListTestScript |
Title | Send: Conditionlist_Testscript_Send-minimum-example |
Realm | dk |
Description | Validate that conditions in ConditionList Bundle contains SKS-D code, -system and code.text. Also validates that category.coding.code = '723506003' and that recordedDate exists. |
Copyright | MedCom 2025 |
No resources found
No resources found
Note: links and images are rebased to the (stated) source
Generated Narrative: TestScript minimum-example
Profile: http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript
url: TestScript Send: Conditionlist_Testscript_Send-minimum-example
version: 0.1.0
name: ConditionListTestScript
title: Send: Conditionlist_Testscript_Send-minimum-example
status: Active
date: 2025-04-01
publisher: MedCom
contact: MedCom: www.medcom.dk
description:
Validate that conditions in ConditionList Bundle contains SKS-D code, -system and code.text. Also validates that category.coding.code = '723506003' and that recordedDate exists.
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
create-CList-01autocreate: false
autodelete: false
resource:
./fixtures/fixtures.json
profile: http://medcomfhir.dk/ig/conditionlist/StructureDefinition/medcom-conditionlist-bundle
test
id
ConditionList-create-CList-01name: Create a ConditionList CList Message 01
description: Post ConditionList to the server.
action
Operations
Type Resource Description Destination EncodeRequestUrl Origin ResponseId SourceId Test script operation code create: Create Bundle Post a ConditionList 1 true 1 create-message-CList create-CList-01 action
Asserts
Description Direction Resource WarningOnly Confirm that the client request payload contains a Bundle resource type. request Bundle false action
Asserts
Description Direction Operator ResponseCode WarningOnly Confirm that the returned HTTP status is okay or created. response in 200,201 false action
Asserts
Description Direction ValidateProfileId WarningOnly Validate the bundle against medcomConditionList profile request MedComConditionListBundle false action
Asserts
Description Direction Expression WarningOnly Confirm that one entry with resourceType Condition is in bundle request Bundle.entry.resource.ofType(Condition).count() = 1 false action
Asserts
Description Direction Expression WarningOnly Validate that a Condition contains an SKS-D code system and code request Bundle.entry.resource.ofType(Condition).code.coding.where(system = 'urn:oid:1.2.208.176.2.4.12').exists() false action
Asserts
Description Direction Expression WarningOnly Validate that a code.text (DA: diagnosetekst) exists request Bundle.entry.resource.ofType(Condition).code.text.exists() false action
Asserts
Description Direction Expression WarningOnly Validate that the diagnosis status is Resolved request Bundle.entry.resource.ofType(Condition).category.coding.where(system = 'http://snomed.info/sct' and code = '723506003').exists() false action
Asserts
Description Direction Expression WarningOnly Confirm that recordedDate exists request Bundle.entry.resource.ofType(Condition).recordedDate.exists() false
{ "resourceType": "TestScript", "id": "minimum-example", "meta": { "profile": [ "http://touchstone.aegis.net/touchstone/fhir/testing/StructureDefinition/testscript" ] }, "text": { "status": "generated", "div": "<!-- snip (see above) -->" }, "url": "http://medcomfhir.dk/ig/conditionlisttestscript/minimum-example", "version": "0.1.0", "name": "ConditionListTestScript", "title": "Send: Conditionlist_Testscript_Send-minimum-example", "status": "active", "date": "2025-04-01", "publisher": "MedCom", "contact": [ { "name": "MedCom", "telecom": [ { "system": "url", "value": "www.medcom.dk" } ] } ], "description": "Validate that conditions in ConditionList Bundle contains SKS-D code, -system and code.text. Also validates that category.coding.code = '723506003' and that recordedDate exists.", "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": "create-CList-01", "autocreate": false, "autodelete": false, "resource": { "reference": "./fixtures/fixtures.json" } } ], "profile": [ { "id": "MedComConditionListBundle", "reference": "http://medcomfhir.dk/ig/conditionlist/StructureDefinition/medcom-conditionlist-bundle" } ], "test": [ { "id": "ConditionList-create-CList-01", "name": "Create a ConditionList CList Message 01", "description": "Post ConditionList to the server.", "action": [ { "operation": { "type": { "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes", "code": "create" }, "resource": "Bundle", "description": "Post a ConditionList", "destination": 1, "encodeRequestUrl": true, "origin": 1, "responseId": "create-message-CList", "sourceId": "create-CList-01" } }, { "assert": { "description": "Confirm that the client request payload contains a Bundle resource type.", "direction": "request", "resource": "Bundle", "warningOnly": false } }, { "assert": { "description": "Confirm that the returned HTTP status is okay or created.", "direction": "response", "operator": "in", "responseCode": "200,201", "warningOnly": false } }, { "assert": { "description": "Validate the bundle against medcomConditionList profile", "direction": "request", "validateProfileId": "MedComConditionListBundle", "warningOnly": false } }, { "assert": { "description": "Confirm that one entry with resourceType Condition is in bundle", "direction": "request", "expression": "Bundle.entry.resource.ofType(Condition).count() = 1", "warningOnly": false } }, { "assert": { "description": "Validate that a Condition contains an SKS-D code system and code", "direction": "request", "expression": "Bundle.entry.resource.ofType(Condition).code.coding.where(system = 'urn:oid:1.2.208.176.2.4.12').exists()", "warningOnly": false } }, { "assert": { "description": "Validate that a code.text (DA: diagnosetekst) exists", "direction": "request", "expression": "Bundle.entry.resource.ofType(Condition).code.text.exists()", "warningOnly": false } }, { "assert": { "description": "Validate that the diagnosis status is Resolved", "direction": "request", "expression": "Bundle.entry.resource.ofType(Condition).category.coding.where(system = 'http://snomed.info/sct' and code = '723506003').exists()", "warningOnly": false } }, { "assert": { "description": "Confirm that recordedDate exists", "direction": "request", "expression": "Bundle.entry.resource.ofType(Condition).recordedDate.exists()", "warningOnly": false } } ] } ] }