FHIR © HL7.org  |  Server Home  |  XIG Home  |  XIG Stats  |  Server Source  |  FHIR  

FHIR IG Statistics: TestScript/maximum-example

Packagemedcom.fhir.dk.conditionlisttestscripts
Resource TypeTestScript
Idmaximum-example
FHIR VersionR4
Sourcehttp://medcomfhir.dk/ig/conditionlisttestscripts/https://build.fhir.org/ig/medcomdk/dk-medcom-ConditionList-test-scripts/TestScript-maximum-example.html
URLhttp://medcomfhir.dk/ig/conditionlisttestscript/maximum-example
Version0.1.0
Statusactive
Date2025-04-01
NameConditionListTestScript
TitleSend: ConditionList_Testscript_Send-max-example
Realmdk
DescriptionValidate that a ConditionList contains a condition with all content, including optional, present and that these elements specifically contains: category:status = 15240007 (current), category:type = encounter-diagnosis, clinicalStatus = resolved. No note (DA: Tillægstekst) must be present.
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 maximum-example

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

url: TestScript Send: ConditionList_Testscript_Send-max-example

version: 0.1.0

name: ConditionListTestScript

title: Send: ConditionList_Testscript_Send-max-example

status: Active

date: 2025-04-01

publisher: MedCom

contact: MedCom: 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 = 15240007 (current), category:type = encounter-diagnosis, clinicalStatus = resolved. No note (DA: Tillægstekst) must be present.

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

create-CList-01

autocreate: false

autodelete: false

resource: ./fixtures/fixtures.json

profile: 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

Operations

-TypeResourceDescriptionDestinationEncodeRequestUrlOriginResponseIdSourceId
*Test script operation code create: CreateBundlePost a ConditionList1true1create-message-CListcreate-CList-01

action

Asserts

-DescriptionDirectionResourceWarningOnly
*Confirm that the client request payload contains a Bundle resource type.requestBundlefalse

action

Asserts

-DescriptionDirectionOperatorResponseCodeWarningOnly
*Confirm that the returned HTTP status is okay or created.responsein200,201false

action

Asserts

-DescriptionDirectionValidateProfileIdWarningOnly
*Validate the bundle against medcomConditionList profilerequestMedComConditionListBundlefalse

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*ConfValidate that the SKS-D codes, including code, system, and if available, display value.requestBundle.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()false

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*Validate that there is a display value attached to all SKS codesrequestBundle.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()true

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*Validate existance of ICPC-2 codes, including code, system, and if available, display value.requestBundle.entry.resource.ofType(Condition).code.coding.where(system = 'urn:oid:1.2.208.176.2.31').select(code | system | display).count() > 1false

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*Validate that there is a display value attached to all ICPC2 codesrequestBundle.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()true

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*Validate that a code.text (DA: diagnosetekst) existsrequestBundle.entry.resource.ofType(Condition).code.text.exists()false

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*Validate the existance of category:status system = http://snomed.info/sct, code = 15240007 and display = currentrequestBundle.entry.resource.ofType(Condition).category.coding.where(system = 'http://snomed.info/sct' and code = '15240007').exists()false

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*Validate existance of category:type and that system = http://terminology.hl7.org/CodeSystem/condition-category and code = encounter-diagnosisrequestBundle.entry.resource.ofType(Condition).category.coding.where(system = 'http://terminology.hl7.org/CodeSystem/condition-category' and code = 'encounter-diagnosis' ).exists()false

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*Validate existance of onsetDateTimerequestBundle.entry.resource.ofType(Condition).onset.exists()false

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*Validate existance of abatementDateTimerequestBundle.entry.resource.ofType(Condition).abatement.exists()false

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*Validate existance of recordedDaterequestBundle.entry.resource.ofType(Condition).recordedDate.exists()false

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*Validate that the clinicalStatus code = resolvedrequestBundle.entry.resource.ofType(Condition).clinicalStatus.coding.code = 'resolved'false

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*Validate existance of clinicalStatus coding system existsrequestBundle.entry.resource.ofType(Condition).clinicalStatus.coding.system.exists()true

action

Asserts

-DescriptionDirectionExpressionWarningOnly
*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.requestBundle.entry.resource.ofType(Condition).note.text.exists().not()false

Source

{
  "resourceType": "TestScript",
  "id": "maximum-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/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 = 15240007 (current), 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, code = 15240007 and display = current",
            "direction": "request",
            "expression": "Bundle.entry.resource.ofType(Condition).category.coding.where(system = 'http://snomed.info/sct' and code = '15240007').exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "description": "Validate existance of category:type and that system = http://terminology.hl7.org/CodeSystem/condition-category and code = encounter-diagnosis",
            "direction": "request",
            "expression": "Bundle.entry.resource.ofType(Condition).category.coding.where(system = 'http://terminology.hl7.org/CodeSystem/condition-category' and code = 'encounter-diagnosis' ).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 that the clinicalStatus code = resolved",
            "direction": "request",
            "expression": "Bundle.entry.resource.ofType(Condition).clinicalStatus.coding.code = 'resolved'",
            "warningOnly": false
          }
        },
        {
          "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
          }
        }
      ]
    }
  ]
}