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-02.json
FHIR VersionR4
Sourcehttps://build.fhir.org/ig/hl7-eu/flute/TestScript-TS-Flute-02.html
URLhttp://hl7.eu/fhir/ig/flute/TestScript/TS-Flute-02
Version0.1.0
Statusdraft
Date2026-02-05T10:21:25+00:00
NamePcaInclusionCriteriaS02
TitleStudy Inclusion Criteria - Scenario 02
Realmeu
Authorityhl7
DescriptionThis TestScript evaluates the inclusion criteria for patients participating in the study.
PurposeTo verify that the CQL library correctly identifies patients who meet the inclusion criteria for the study.

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-02

url: TestScript Study Inclusion Criteria - Scenario 02

version: 0.1.0

name: PcaInclusionCriteriaS02

title: Study Inclusion Criteria - Scenario 02

status: Draft

experimental: true

date: 2026-02-05 10:21:25+0000

publisher: Flute Project

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

description:

This TestScript evaluates the inclusion criteria for patients participating in the study.

purpose:

To verify that the CQL library correctly identifies patients who meet the inclusion criteria for the study.

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-transaction-request

autocreate: false

autodelete: false

resource: DocumentReference/EXP-S2-ExcludedPatient

fixture

id

fixture-transaction-teardown

autocreate: false

autodelete: false

resource: DocumentReference/EXP-Teardown

fixture

id

fixture-valueset-create

autocreate: false

autodelete: false

resource: DocumentReference/VS-PCa

fixture

id

fixture-library-create

autocreate: false

autodelete: false

resource: DocumentReference/PcaInclusionCriteria

variable

id

patientId

name: patientId

expression: Bundle.entry[0].response.location

sourceId: fixture-transaction-response

variable

id

obsPIRADSId

name: obsPIRADSId

expression: Bundle.entry[6].response.location

sourceId: fixture-transaction-response

variable

id

obsPVId

name: obsPVId

expression: Bundle.entry[5].response.location

sourceId: fixture-transaction-response

variable

id

proDREId

name: proDREId

expression: Bundle.entry[4].response.location

sourceId: fixture-transaction-response

variable

id

obsPSAId

name: obsPSAId

expression: Bundle.entry[3].response.location

sourceId: fixture-transaction-response

variable

id

famPCId

name: famPCId

expression: Bundle.entry[2].response.location

sourceId: fixture-transaction-response

variable

id

proBiopsyId

name: proBiopsyId

expression: Bundle.entry[1].response.location

sourceId: fixture-transaction-response

setup

action

operation

id

SET-01

type: FHIR Restful Interactions: transaction (transaction)

resource: Bundle

description: Sent a transaction request on the test server using the id from fixture-transaction-request.

accept: application/fhir+json

contentType: application/fhir+json

encodeRequestUrl: false

method: POST

responseId: fixture-transaction-response

sourceId: fixture-transaction-request

action

assert

id

SET-01-ASS-01

label: HTTPStatus

description: Confirm that the returned HTTP status is 200.

direction: response

responseCode: 200

warningOnly: false

action

operation

id

SET-02

type: FHIR Restful Interactions: update (update)

resource: ValueSet

description: Create the ValueSet resource on the test server using the id from fixture-valueset-create.

accept: application/fhir+json

contentType: application/fhir+json

encodeRequestUrl: false

method: PUT

sourceId: fixture-valueset-create

action

assert

id

SET-02-ASS-01

label: HTTPStatus

description: Confirm that the returned HTTP status is 201.

direction: response

responseCode: 201

warningOnly: false

action

operation

id

SET-03

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-03-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 Prostate Cancer Inclusion

description: This test evaluates the inclusion criteria 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 check if the patient meets the inclusion criteria.

contentType: application/fhir+json

encodeRequestUrl: false

method: GET

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 'isIncluded' parameter with a value of false.

direction: response

expression: Parameters.parameter.where(name = 'isIncluded' ).value=false

warningOnly: false

teardown

action

operation

id

TED-01

type: FHIR Restful Interactions: transaction (transaction)

resource: Bundle

description: Delete the testing resources on the test server using the id from fixture-transaction-teardown.

encodeRequestUrl: true

method: DELETE

sourceId: fixture-transaction-teardown

action

operation

id

TED-02

type: FHIR Restful Interactions: delete (delete)

resource: ValueSet

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

encodeRequestUrl: true

method: DELETE

targetId: fixture-valueset-create

action

operation

id

TED-03

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-02",
  "text": {
    "status": "extensions",
    "div": "<!-- snip (see above) -->"
  },
  "url": "http://hl7.eu/fhir/ig/flute/TestScript/TS-Flute-02",
  "version": "0.1.0",
  "name": "PcaInclusionCriteriaS02",
  "title": "Study Inclusion Criteria - Scenario 02",
  "status": "draft",
  "experimental": true,
  "date": "2026-02-05T10:21:25+00:00",
  "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 evaluates the inclusion criteria for patients participating in the study.",
  "purpose": "To verify that the CQL library correctly identifies patients who meet the inclusion criteria for the study.",
  "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-transaction-request",
      "autocreate": false,
      "autodelete": false,
      "resource": {
        "reference": "DocumentReference/EXP-S2-ExcludedPatient"
      }
    },
    {
      "id": "fixture-transaction-teardown",
      "autocreate": false,
      "autodelete": false,
      "resource": {
        "reference": "DocumentReference/EXP-Teardown"
      }
    },
    {
      "id": "fixture-valueset-create",
      "autocreate": false,
      "autodelete": false,
      "resource": {
        "reference": "DocumentReference/VS-PCa"
      }
    },
    {
      "id": "fixture-library-create",
      "autocreate": false,
      "autodelete": false,
      "resource": {
        "reference": "DocumentReference/PcaInclusionCriteria"
      }
    }
  ],
  "variable": [
    {
      "id": "patientId",
      "name": "patientId",
      "expression": "Bundle.entry[0].response.location",
      "sourceId": "fixture-transaction-response"
    },
    {
      "id": "obsPIRADSId",
      "name": "obsPIRADSId",
      "expression": "Bundle.entry[6].response.location",
      "sourceId": "fixture-transaction-response"
    },
    {
      "id": "obsPVId",
      "name": "obsPVId",
      "expression": "Bundle.entry[5].response.location",
      "sourceId": "fixture-transaction-response"
    },
    {
      "id": "proDREId",
      "name": "proDREId",
      "expression": "Bundle.entry[4].response.location",
      "sourceId": "fixture-transaction-response"
    },
    {
      "id": "obsPSAId",
      "name": "obsPSAId",
      "expression": "Bundle.entry[3].response.location",
      "sourceId": "fixture-transaction-response"
    },
    {
      "id": "famPCId",
      "name": "famPCId",
      "expression": "Bundle.entry[2].response.location",
      "sourceId": "fixture-transaction-response"
    },
    {
      "id": "proBiopsyId",
      "name": "proBiopsyId",
      "expression": "Bundle.entry[1].response.location",
      "sourceId": "fixture-transaction-response"
    }
  ],
  "setup": {
    "action": [
      {
        "operation": {
          "id": "SET-01",
          "type": {
            "system": "http://hl7.org/fhir/restful-interaction",
            "code": "transaction"
          },
          "resource": "Bundle",
          "description": "Sent a transaction request on the test server using the id from fixture-transaction-request.",
          "accept": "application/fhir+json",
          "contentType": "application/fhir+json",
          "encodeRequestUrl": false,
          "method": "post",
          "responseId": "fixture-transaction-response",
          "sourceId": "fixture-transaction-request"
        }
      },
      {
        "assert": {
          "id": "SET-01-ASS-01",
          "label": "HTTPStatus",
          "description": "Confirm that the returned HTTP status is 200.",
          "direction": "response",
          "responseCode": "200",
          "warningOnly": false
        }
      },
      {
        "operation": {
          "id": "SET-02",
          "type": {
            "system": "http://hl7.org/fhir/restful-interaction",
            "code": "update"
          },
          "resource": "ValueSet",
          "description": "Create the ValueSet resource on the test server using the id from fixture-valueset-create.",
          "accept": "application/fhir+json",
          "contentType": "application/fhir+json",
          "encodeRequestUrl": false,
          "method": "put",
          "sourceId": "fixture-valueset-create"
        }
      },
      {
        "assert": {
          "id": "SET-02-ASS-01",
          "label": "HTTPStatus",
          "description": "Confirm that the returned HTTP status is 201.",
          "direction": "response",
          "responseCode": "201",
          "warningOnly": false
        }
      },
      {
        "operation": {
          "id": "SET-03",
          "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-03-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 Prostate Cancer Inclusion",
      "description": "This test evaluates the inclusion criteria 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 check if the patient meets the inclusion criteria.",
            "contentType": "application/fhir+json",
            "encodeRequestUrl": false,
            "method": "get",
            "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 'isIncluded' parameter with a value of false.",
            "direction": "response",
            "expression": "Parameters.parameter.where(name = 'isIncluded' ).value=false",
            "warningOnly": false
          }
        }
      ]
    }
  ],
  "teardown": {
    "action": [
      {
        "operation": {
          "id": "TED-01",
          "type": {
            "system": "http://hl7.org/fhir/restful-interaction",
            "code": "transaction"
          },
          "resource": "Bundle",
          "description": "Delete the testing resources on the test server using the id from fixture-transaction-teardown.",
          "encodeRequestUrl": true,
          "method": "delete",
          "sourceId": "fixture-transaction-teardown"
        }
      },
      {
        "operation": {
          "id": "TED-02",
          "type": {
            "system": "http://hl7.org/fhir/restful-interaction",
            "code": "delete"
          },
          "resource": "ValueSet",
          "description": "Delete the ValueSet resource on the test server using the id from fixture-library-create.",
          "encodeRequestUrl": true,
          "method": "delete",
          "targetId": "fixture-valueset-create"
        }
      },
      {
        "operation": {
          "id": "TED-03",
          "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"
        }
      }
    ]
  }
}