0.1.0 - ci-build
ConditionListtestscripts, 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-medcom-ConditionList-test-scripts/ and changes regularly. See the Directory of published versions
Active as of 2025-04-01 |
{
"resourceType" : "TestScript",
"id" : "maximum-example",
"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 maximum-example</b></p><a name=\"maximum-example\"> </a><a name=\"hcmaximum-example\"> </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-maximum-example.html\">TestScript Send: ConditionList_Testscript_Send-max-example</a></p><p><b>version</b>: 0.1.0</p><p><b>name</b>: ConditionListTestScript</p><p><b>title</b>: Send: ConditionList_Testscript_Send-max-example</p><p><b>status</b>: Active</p><p><b>date</b>: 2025-04-01</p><p><b>publisher</b>: MedCom</p><p><b>contact</b>: MedCom: <a href=\"www.medcom.dk\">www.medcom.dk</a></p><p><b>description</b>: </p><div><p>Validate that a ConditionList contains a condition with all content, including optional, present and that these elements specifically contains: category:status = 723506003 (resolved), category:type = encounter-diagnosis, clinicalStatus = resolved. No note (DA: Tillægstekst) must be present.</p>\n</div><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>create-CList-01</blockquote><p><b>autocreate</b>: false</p><p><b>autodelete</b>: false</p><p><b>resource</b>: <code>./fixtures/fixtures.json</code></p></blockquote><p><b>profile</b>: <a href=\"http://medcomfhir.dk/ig/conditionlist/StructureDefinition/medcom-conditionlist-bundle\">http://medcomfhir.dk/ig/conditionlist/StructureDefinition/medcom-conditionlist-bundle</a></p><blockquote><p><b>test</b></p><blockquote><p><b>id</b></p>ConditionList-create-CList-01</blockquote><p><b>name</b>: Create a ConditionList CList Message 01</p><p><b>description</b>: Post ConditionList to the server.</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>ResponseId</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-create\">Test script operation code create</a>: Create</td><td>Bundle</td><td>Post a ConditionList</td><td>1</td><td>true</td><td>1</td><td>create-message-CList</td><td>create-CList-01</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>Resource</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Confirm that the client request payload contains a Bundle resource type.</td><td>request</td><td>Bundle</td><td>false</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>Operator</b></td><td><b>ResponseCode</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Confirm that the returned HTTP status is okay or created.</td><td>response</td><td>in</td><td>200,201</td><td>false</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>ValidateProfileId</b></td><td><b>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Validate the bundle against medcomConditionList profile</td><td>request</td><td>MedComConditionListBundle</td><td>false</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>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>ConfValidate that the SKS-D codes, including code, system, and if available, display value.</td><td>request</td><td>Bundle.entry.resource.ofType(Condition).code.coding.where(select(system = 'urn:oid:1.2.208.176.2.4.12' and code.exists() )).count() = Bundle.entry.resource.ofType(Condition).count()</td><td>false</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>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Validate that there is a display value attached to all SKS codes</td><td>request</td><td>Bundle.entry.resource.ofType(Condition).code.coding.where(system = 'urn:oid:1.2.208.176.2.4.12').display.count() = Bundle.entry.resource.ofType(Condition).code.coding.where(system = 'urn:oid:1.2.208.176.2.4.12').count()</td><td>true</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>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Validate existance of ICPC-2 codes, including code, system, and if available, display value.</td><td>request</td><td>Bundle.entry.resource.ofType(Condition).code.coding.where(system = 'urn:oid:1.2.208.176.2.31').select(code | system | display).count() > 1</td><td>false</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>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Validate that there is a display value attached to all ICPC2 codes</td><td>request</td><td>Bundle.entry.resource.ofType(Condition).code.coding.where(system = 'urn:oid:1.2.208.176.2.31').display.count() = Bundle.entry.resource.ofType(Condition).code.coding.where(system = 'urn:oid:1.2.208.176.2.31').count()</td><td>true</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>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Validate that a code.text (DA: diagnosetekst) exists</td><td>request</td><td>Bundle.entry.resource.ofType(Condition).code.text.exists()</td><td>false</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>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Validate the existance of category:status system = http://snomed.info/sct and code = 723506003</td><td>request</td><td>Bundle.entry.resource.ofType(Condition).category.coding.where(system = 'http://snomed.info/sct' and code = '723506003').exists()</td><td>false</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>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Validate existance of category:type and that system = http://terminology.hl7.org/CodeSystem/condition-category and code = problem-list-item</td><td>request</td><td>Bundle.entry.resource.ofType(Condition).category.coding.where(system = 'http://terminology.hl7.org/CodeSystem/condition-category' and code = 'problem-list-item' ).exists()</td><td>false</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>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Validate existance of onsetDateTime</td><td>request</td><td>Bundle.entry.resource.ofType(Condition).onset.exists()</td><td>false</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>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Validate existance of abatementDateTime</td><td>request</td><td>Bundle.entry.resource.ofType(Condition).abatement.exists()</td><td>false</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>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Validate existance of recordedDate</td><td>request</td><td>Bundle.entry.resource.ofType(Condition).recordedDate.exists()</td><td>false</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>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Validate existance of clinicalStatus coding code exists</td><td>request</td><td>Bundle.entry.resource.ofType(Condition).clinicalStatus.coding.code.exists()</td><td>true</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>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>Validate existance of clinicalStatus coding system exists</td><td>request</td><td>Bundle.entry.resource.ofType(Condition).clinicalStatus.coding.system.exists()</td><td>true</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>WarningOnly</b></td></tr><tr><td style=\"display: none\">*</td><td>It is not allowed to share a Condition.note.text (Danish: Tillægstekst). Validate that a document is made without any conditions containing a Condition.note.text.</td><td>request</td><td>Bundle.entry.resource.ofType(Condition).note.text.exists().not()</td><td>false</td></tr></table></blockquote></blockquote></div>"
},
"url" : "http://medcomfhir.dk/ig/conditionlisttestscript/maximum-example",
"version" : "0.1.0",
"name" : "ConditionListTestScript",
"title" : "Send: ConditionList_Testscript_Send-max-example",
"status" : "active",
"date" : "2025-04-01",
"publisher" : "MedCom",
"contact" : [
{
"name" : "MedCom",
"telecom" : [
{
"system" : "url",
"value" : "www.medcom.dk"
}
]
}
],
"description" : "Validate that a ConditionList contains a condition with all content, including optional, present and that these elements specifically contains: category:status = 723506003 (resolved), category:type = encounter-diagnosis, clinicalStatus = resolved. No note (DA: Tillægstekst) must be present.",
"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" : "ConfValidate that the SKS-D codes, including code, system, and if available, display value.",
"direction" : "request",
"expression" : "Bundle.entry.resource.ofType(Condition).code.coding.where(select(system = 'urn:oid:1.2.208.176.2.4.12' and code.exists() )).count() = Bundle.entry.resource.ofType(Condition).count()",
"warningOnly" : false
}
},
{
"assert" : {
"description" : "Validate that there is a display value attached to all SKS codes",
"direction" : "request",
"expression" : "Bundle.entry.resource.ofType(Condition).code.coding.where(system = 'urn:oid:1.2.208.176.2.4.12').display.count() = Bundle.entry.resource.ofType(Condition).code.coding.where(system = 'urn:oid:1.2.208.176.2.4.12').count()",
"warningOnly" : true
}
},
{
"assert" : {
"description" : "Validate existance of ICPC-2 codes, including code, system, and if available, display value.",
"direction" : "request",
"expression" : "Bundle.entry.resource.ofType(Condition).code.coding.where(system = 'urn:oid:1.2.208.176.2.31').select(code | system | display).count() > 1",
"warningOnly" : false
}
},
{
"assert" : {
"description" : "Validate that there is a display value attached to all ICPC2 codes",
"direction" : "request",
"expression" : "Bundle.entry.resource.ofType(Condition).code.coding.where(system = 'urn:oid:1.2.208.176.2.31').display.count() = Bundle.entry.resource.ofType(Condition).code.coding.where(system = 'urn:oid:1.2.208.176.2.31').count()",
"warningOnly" : true
}
},
{
"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 the existance of category:status system = http://snomed.info/sct and code = 723506003",
"direction" : "request",
"expression" : "Bundle.entry.resource.ofType(Condition).category.coding.where(system = 'http://snomed.info/sct' and code = '723506003').exists()",
"warningOnly" : false
}
},
{
"assert" : {
"description" : "Validate existance of category:type and that system = http://terminology.hl7.org/CodeSystem/condition-category and code = problem-list-item",
"direction" : "request",
"expression" : "Bundle.entry.resource.ofType(Condition).category.coding.where(system = 'http://terminology.hl7.org/CodeSystem/condition-category' and code = 'problem-list-item' ).exists()",
"warningOnly" : false
}
},
{
"assert" : {
"description" : "Validate existance of onsetDateTime",
"direction" : "request",
"expression" : "Bundle.entry.resource.ofType(Condition).onset.exists()",
"warningOnly" : false
}
},
{
"assert" : {
"description" : "Validate existance of abatementDateTime",
"direction" : "request",
"expression" : "Bundle.entry.resource.ofType(Condition).abatement.exists()",
"warningOnly" : false
}
},
{
"assert" : {
"description" : "Validate existance of recordedDate",
"direction" : "request",
"expression" : "Bundle.entry.resource.ofType(Condition).recordedDate.exists()",
"warningOnly" : false
}
},
{
"assert" : {
"description" : "Validate existance of clinicalStatus coding code exists",
"direction" : "request",
"expression" : "Bundle.entry.resource.ofType(Condition).clinicalStatus.coding.code.exists()",
"warningOnly" : true
}
},
{
"assert" : {
"description" : "Validate existance of clinicalStatus coding system exists",
"direction" : "request",
"expression" : "Bundle.entry.resource.ofType(Condition).clinicalStatus.coding.system.exists()",
"warningOnly" : true
}
},
{
"assert" : {
"description" : "It is not allowed to share a Condition.note.text (Danish: Tillægstekst). Validate that a document is made without any conditions containing a Condition.note.text.",
"direction" : "request",
"expression" : "Bundle.entry.resource.ofType(Condition).note.text.exists().not()",
"warningOnly" : false
}
}
]
}
]
}