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

FHIR IG analytics

Packagehl7.eu.fhir.flute
Resource TypeTestScript
IdTestScript-TS-Flute-05.json
FHIR VersionR4
Sourcehttps://build.fhir.org/ig/hl7-eu/flute/TestScript-TS-Flute-05.html
URLhttp://hl7.eu/fhir/ig/flute/TestScript/TS-Flute-05
Version0.1.0
Statusdraft
Date2024-06-12
NameTestScriptResearchVariables2Extract
TitleThis TestScript is designed to validate the cql library ResearchVariables2
Realmeu
Authorityhl7
DescriptionThis TestScript is designed to validate the cql library ResearchVariables2 with an extract of a questionnaire response
PurposeThis TestScript is designed to validate the cql library ResearchVariables2 with an extract of a questionnaire response

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 TS-Flute-05

url: TestScript This TestScript is designed to validate the cql library ResearchVariables2

version: 0.1.0

name: TestScriptResearchVariables2Extract

title: This TestScript is designed to validate the cql library ResearchVariables2

status: Draft

experimental: true

date: 2024-06-12

publisher: Flute Project

contact: Flute Project: https://www.fluteproject.eu/, Flute Project: https://www.fluteproject.eu/

description:

This TestScript is designed to validate the cql library ResearchVariables2 with an extract of a questionnaire response

purpose:

This TestScript is designed to validate the cql library ResearchVariables2 with an extract of a questionnaire response

Origins

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

Destinations

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

fixture

id

fixture-paramsBundle-create

autocreate: false

autodelete: false

resource: DocumentReference/EXP-Params-BundleExtract

fixture

id

fixture-library-create

autocreate: false

autodelete: false

resource: DocumentReference/ResearchVariables2

setup

action

operation

id

SET-01

type: FHIR Restful Interactions: update (update)

resource: Library

description: Create the Library resource on the test server using the id from fixture-library-create.

accept: application/fhir+json

contentType: application/fhir+json

encodeRequestUrl: false

method: PUT

sourceId: fixture-library-create

action

assert

id

SET-01-ASS-01

label: HTTPStatus

description: Confirm that the returned HTTP status is 201.

direction: response

responseCode: 201

warningOnly: false

test

id

1-EvaluateLibrary

name: Evaluation of CQL Library for Research Variables 2

description: This test evaluates the research variables defined in the CQL library for a prostate cancer study.

action

operation

id

TES-01

com/test/StructureDefinition/EXT-ReturnResourceType: Parameters

type: Custom Operations: evaluate (Evaluate CQL)

resource: Library

description: Evaluate the CQL library to retrieve research variables.

contentType: application/fhir+json

encodeRequestUrl: false

method: POST

sourceId: fixture-paramsBundle-create

targetId: fixture-library-create

action

assert

id

TES-01-ASS-01

label: HTTPStatus

description: Confirm that the returned HTTP status is 200.

direction: response

responseCode: 200

warningOnly: false

action

assert

id

TES-01-ASS-02

label: Resource

description: Confirm that the returned resource type is Parameters.

direction: response

resource: Parameters

warningOnly: false

action

assert

id

TES-01-ASS-03

label: FHIRPath

description: Confirm that the returned Parameters resource contains an 'dre' parameter with a value of 1.

direction: response

expression: Parameters.parameter.where(name = 'dre' ).value=1

warningOnly: false

action

assert

id

TES-01-ASS-04

label: FHIRPath

description: Confirm that the returned Parameters resource contains an 'pcaFamilyHistory' parameter with a value of 0.

direction: response

expression: Parameters.parameter.where(name = 'pcaFamilyHistory' ).value=0

warningOnly: false

action

assert

id

TES-01-ASS-05

label: FHIRPath

description: Confirm that the returned Parameters resource contains an 'pirads' parameter with a value of 3.

direction: response

expression: Parameters.parameter.where(name = 'pirads' ).value=3

warningOnly: false

action

assert

id

TES-01-ASS-06

label: FHIRPath

description: Confirm that the returned Parameters resource contains an 'prostateVolume' parameter with a value of 30.

direction: response

expression: Parameters.parameter.where(name = 'prostateVolume' ).value.value=30

warningOnly: false

action

assert

id

TES-01-ASS-07

label: FHIRPath

description: Confirm that the returned Parameters resource contains an 'psa' parameter with a value of 5.

direction: response

expression: Parameters.parameter.where(name = 'psa' ).value.value=5

warningOnly: false

action

assert

id

TES-01-ASS-08

label: FHIRPath

description: Confirm that the returned Parameters resource contains an 'typeOfBiopsy' parameter with a value of 2.

direction: response

expression: Parameters.parameter.where(name = 'typeOfBiopsy' ).value=2

warningOnly: false

teardown

action

operation

id

TED-01

type: FHIR Restful Interactions: delete (delete)

resource: Library

description: Delete the Library resource on the test server using the id from fixture-library-create.

encodeRequestUrl: true

method: DELETE

targetId: fixture-library-create


Source1

{
  "resourceType": "TestScript",
  "id": "TS-Flute-05",
  "text": {
    "status": "extensions",
    "div": "<!-- snip (see above) -->"
  },
  "url": "http://hl7.eu/fhir/ig/flute/TestScript/TS-Flute-05",
  "version": "0.1.0",
  "name": "TestScriptResearchVariables2Extract",
  "title": "This TestScript is designed to validate the cql library ResearchVariables2",
  "status": "draft",
  "experimental": true,
  "date": "2024-06-12",
  "publisher": "Flute Project",
  "contact": [
    {
      "name": "Flute Project",
      "telecom": [
        {
          "system": "url",
          "value": "https://www.fluteproject.eu/"
        }
      ]
    },
    {
      "name": "Flute Project",
      "telecom": [
        {
          "system": "url",
          "value": "https://www.fluteproject.eu/"
        }
      ]
    }
  ],
  "description": "This TestScript is designed to validate the cql library ResearchVariables2 with an extract of a questionnaire response",
  "purpose": "This TestScript is designed to validate the cql library ResearchVariables2 with an extract of a questionnaire response",
  "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": "fixture-paramsBundle-create",
      "autocreate": false,
      "autodelete": false,
      "resource": {
        "reference": "DocumentReference/EXP-Params-BundleExtract"
      }
    },
    {
      "id": "fixture-library-create",
      "autocreate": false,
      "autodelete": false,
      "resource": {
        "reference": "DocumentReference/ResearchVariables2"
      }
    }
  ],
  "setup": {
    "action": [
      {
        "operation": {
          "id": "SET-01",
          "type": {
            "system": "http://hl7.org/fhir/restful-interaction",
            "code": "update"
          },
          "resource": "Library",
          "description": "Create the Library resource on the test server using the id from fixture-library-create.",
          "accept": "application/fhir+json",
          "contentType": "application/fhir+json",
          "encodeRequestUrl": false,
          "method": "put",
          "sourceId": "fixture-library-create"
        }
      },
      {
        "assert": {
          "id": "SET-01-ASS-01",
          "label": "HTTPStatus",
          "description": "Confirm that the returned HTTP status is 201.",
          "direction": "response",
          "responseCode": "201",
          "warningOnly": false
        }
      }
    ]
  },
  "test": [
    {
      "id": "1-EvaluateLibrary",
      "name": "Evaluation of CQL Library for Research Variables 2",
      "description": "This test evaluates the research variables defined in the CQL library for a prostate cancer study.",
      "action": [
        {
          "operation": {
            "id": "TES-01",
            "extension": [
              {
                "url": "http://isis.com/test/StructureDefinition/EXT-ReturnResourceType",
                "valueString": "Parameters"
              }
            ],
            "type": {
              "system": "http://hl7.eu/fhir/ig/flute/CodeSystem/COS-CustomOperations",
              "code": "evaluate"
            },
            "resource": "Library",
            "description": "Evaluate the CQL library to retrieve research variables.",
            "contentType": "application/fhir+json",
            "encodeRequestUrl": false,
            "method": "post",
            "sourceId": "fixture-paramsBundle-create",
            "targetId": "fixture-library-create"
          }
        },
        {
          "assert": {
            "id": "TES-01-ASS-01",
            "label": "HTTPStatus",
            "description": "Confirm that the returned HTTP status is 200.",
            "direction": "response",
            "responseCode": "200",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "id": "TES-01-ASS-02",
            "label": "Resource",
            "description": "Confirm that the returned resource type is Parameters.",
            "direction": "response",
            "resource": "Parameters",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "id": "TES-01-ASS-03",
            "label": "FHIRPath",
            "description": "Confirm that the returned Parameters resource contains an 'dre' parameter with a value of 1.",
            "direction": "response",
            "expression": "Parameters.parameter.where(name = 'dre' ).value=1",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "id": "TES-01-ASS-04",
            "label": "FHIRPath",
            "description": "Confirm that the returned Parameters resource contains an 'pcaFamilyHistory' parameter with a value of 0.",
            "direction": "response",
            "expression": "Parameters.parameter.where(name = 'pcaFamilyHistory' ).value=0",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "id": "TES-01-ASS-05",
            "label": "FHIRPath",
            "description": "Confirm that the returned Parameters resource contains an 'pirads' parameter with a value of 3.",
            "direction": "response",
            "expression": "Parameters.parameter.where(name = 'pirads' ).value=3",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "id": "TES-01-ASS-06",
            "label": "FHIRPath",
            "description": "Confirm that the returned Parameters resource contains an 'prostateVolume' parameter with a value of 30.",
            "direction": "response",
            "expression": "Parameters.parameter.where(name = 'prostateVolume' ).value.value=30",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "id": "TES-01-ASS-07",
            "label": "FHIRPath",
            "description": "Confirm that the returned Parameters resource contains an 'psa' parameter with a value of 5.",
            "direction": "response",
            "expression": "Parameters.parameter.where(name = 'psa' ).value.value=5",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "id": "TES-01-ASS-08",
            "label": "FHIRPath",
            "description": "Confirm that the returned Parameters resource contains an 'typeOfBiopsy' parameter with a value of 2.",
            "direction": "response",
            "expression": "Parameters.parameter.where(name = 'typeOfBiopsy' ).value=2",
            "warningOnly": false
          }
        }
      ]
    }
  ],
  "teardown": {
    "action": [
      {
        "operation": {
          "id": "TED-01",
          "type": {
            "system": "http://hl7.org/fhir/restful-interaction",
            "code": "delete"
          },
          "resource": "Library",
          "description": "Delete the Library resource on the test server using the id from fixture-library-create.",
          "encodeRequestUrl": true,
          "method": "delete",
          "targetId": "fixture-library-create"
        }
      }
    ]
  }
}