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

FHIR IG analytics

Packagefhirfrog.au-core-tests
Resource TypeTestScript
IdTestScript-au-core-condition.json
FHIR VersionR4
Sourcehttps://build.fhir.org/ig/jgsuess/au-core-tests/TestScript-au-core-condition.html
URLhttp://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-condition
Version0.1.0
Statusactive
Date2026-08-16T05:55:37+00:00
NameAUCoreCondition
TitleAU Core Condition — SHALL-level conformance
DescriptionCovers the SHALL-level AU Core Condition (2.0.0) requirements: read, search by patient, the SHALL search-combos patient+category and patient+clinical-status, must-support element presence, and profile conformance validation, plus one SHOULD search-combo (patient+code) included to demonstrate the multi-param querystring pattern. Mirrors the SHALL subset of au-fhir-core-inferno's ConditionGroup (condition_read_test, condition_patient_search_test, condition_patient_category_search_test, condition_patient_clinical_status_search_test, condition_must_support_test, condition_validation_test). The remaining SHOULD/MAY-level combinatorial search tests (patient+category+clinical-status, patient+onset-date, code with multiple-or, onset-date with multiple-and, the DVA/IHI/Medicare identifier chain searches on patient, and the reference-resolution test) are not replicated here, per the same SHALL-only scope rationale used for Patient; see fhirfrog/au-core-compiler#6 and #8.

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 au-core-condition

url: TestScript AU Core Condition — SHALL-level conformance

version: 0.1.0

name: AUCoreCondition

title: AU Core Condition — SHALL-level conformance

status: Active

date: 2026-08-16 05:55:37+0000

publisher: FHIR Frog

contact: FHIR Frog: https://gitlab.com/fhirfrog

description:

Covers the SHALL-level AU Core Condition (2.0.0) requirements: read, search by patient, the SHALL search-combos patient+category and patient+clinical-status, must-support element presence, and profile conformance validation, plus one SHOULD search-combo (patient+code) included to demonstrate the multi-param querystring pattern. Mirrors the SHALL subset of au-fhir-core-inferno's ConditionGroup (condition_read_test, condition_patient_search_test, condition_patient_category_search_test, condition_patient_clinical_status_search_test, condition_must_support_test, condition_validation_test). The remaining SHOULD/MAY-level combinatorial search tests (patient+category+clinical-status, patient+onset-date, code with multiple-or, onset-date with multiple-and, the DVA/IHI/Medicare identifier chain searches on patient, and the reference-resolution test) are not replicated here, per the same SHALL-only scope rationale used for Patient; see fhirfrog/au-core-compiler#6 and #8.

fixture

id

patient-fixture

autocreate: true

autodelete: true

resource: au-core-patient-conformant

fixture

id

condition-fixture

autocreate: true

autodelete: true

resource: au-core-condition-conformant

variable

name: patientId

path: Patient.id

sourceId: patient-fixture

variable

name: conditionId

path: Condition.id

sourceId: condition-fixture

test

name: Read

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: read (Read)Conditiontrue/${conditionId}

action

Asserts

-ResponseWarningOnly
*okayfalse

test

name: SearchByPatient

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)Conditiontrue?patient=${patientId}

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(Condition).where(code.coding.code = '68566005').exists()false

test

name: SearchByPatientAndCategory

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)Conditiontrue?patient=${patientId}&category=http://terminology.hl7.org/CodeSystem/condition-category|problem-list-item

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(Condition).where(category.coding.code = 'problem-list-item').exists()false

test

name: SearchByPatientAndClinicalStatus

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)Conditiontrue?patient=${patientId}&clinical-status=http://terminology.hl7.org/CodeSystem/condition-clinical|resolved

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(Condition).where(clinicalStatus.coding.code = 'resolved').exists()false

test

name: SearchByPatientAndCode

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)Conditiontrue?patient=${patientId}&code=http://snomed.info/sct|68566005

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(Condition).where(code.coding.code = '68566005').exists()false

test

name: MustSupport

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: read (Read)Conditiontrue/${conditionId}

action

Asserts

-ExpressionWarningOnly
*Condition.clinicalStatus.exists()false

action

Asserts

-ExpressionWarningOnly
*Condition.verificationStatus.exists()false

action

Asserts

-ExpressionWarningOnly
*Condition.category.exists()false

action

Asserts

-ExpressionWarningOnly
*Condition.severity.exists()false

action

Asserts

-ExpressionWarningOnly
*Condition.code.exists()false

action

Asserts

-ExpressionWarningOnly
*Condition.subject.exists()false

action

Asserts

-ExpressionWarningOnly
*Condition.onset.exists()false

action

Asserts

-ExpressionWarningOnly
*Condition.abatement.exists()false

action

Asserts

-ExpressionWarningOnly
*Condition.note.exists()false

test

name: ProfileValidation

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: read (Read)Conditiontrue/${conditionId}

action

Asserts

-ValidateProfileIdWarningOnly
*http://hl7.org.au/fhir/core/StructureDefinition/au-core-conditionfalse

Source1

{
  "resourceType": "TestScript",
  "id": "au-core-condition",
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "url": "http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-condition",
  "version": "0.1.0",
  "name": "AUCoreCondition",
  "title": "AU Core Condition — SHALL-level conformance",
  "status": "active",
  "date": "2026-08-16T05:55:37+00:00",
  "publisher": "FHIR Frog",
  "contact": [
    {
      "name": "FHIR Frog",
      "telecom": [
        {
          "system": "url",
          "value": "https://gitlab.com/fhirfrog"
        }
      ]
    }
  ],
  "description": "Covers the SHALL-level AU Core Condition (2.0.0) requirements: read, search by patient, the SHALL search-combos patient+category and patient+clinical-status, must-support element presence, and profile conformance validation, plus one SHOULD search-combo (patient+code) included to demonstrate the multi-param querystring pattern. Mirrors the SHALL subset of au-fhir-core-inferno's ConditionGroup (condition_read_test, condition_patient_search_test, condition_patient_category_search_test, condition_patient_clinical_status_search_test, condition_must_support_test, condition_validation_test). The remaining SHOULD/MAY-level combinatorial search tests (patient+category+clinical-status, patient+onset-date, code with multiple-or, onset-date with multiple-and, the DVA/IHI/Medicare identifier chain searches on patient, and the reference-resolution test) are not replicated here, per the same SHALL-only scope rationale used for Patient; see fhirfrog/au-core-compiler#6 and #8.",
  "fixture": [
    {
      "id": "patient-fixture",
      "autocreate": true,
      "autodelete": true,
      "resource": {
        "reference": "au-core-patient-conformant"
      }
    },
    {
      "id": "condition-fixture",
      "autocreate": true,
      "autodelete": true,
      "resource": {
        "reference": "au-core-condition-conformant"
      }
    }
  ],
  "variable": [
    {
      "name": "patientId",
      "path": "Patient.id",
      "sourceId": "patient-fixture"
    },
    {
      "name": "conditionId",
      "path": "Condition.id",
      "sourceId": "condition-fixture"
    }
  ],
  "test": [
    {
      "name": "Read",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "Condition",
            "encodeRequestUrl": true,
            "params": "/${conditionId}"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByPatient",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "Condition",
            "encodeRequestUrl": true,
            "params": "?patient=${patientId}"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(Condition).where(code.coding.code = '68566005').exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByPatientAndCategory",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "Condition",
            "encodeRequestUrl": true,
            "params": "?patient=${patientId}&category=http://terminology.hl7.org/CodeSystem/condition-category|problem-list-item"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(Condition).where(category.coding.code = 'problem-list-item').exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByPatientAndClinicalStatus",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "Condition",
            "encodeRequestUrl": true,
            "params": "?patient=${patientId}&clinical-status=http://terminology.hl7.org/CodeSystem/condition-clinical|resolved"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(Condition).where(clinicalStatus.coding.code = 'resolved').exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByPatientAndCode",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "Condition",
            "encodeRequestUrl": true,
            "params": "?patient=${patientId}&code=http://snomed.info/sct|68566005"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(Condition).where(code.coding.code = '68566005').exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "MustSupport",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "Condition",
            "encodeRequestUrl": true,
            "params": "/${conditionId}"
          }
        },
        {
          "assert": {
            "expression": "Condition.clinicalStatus.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Condition.verificationStatus.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Condition.category.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Condition.severity.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Condition.code.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Condition.subject.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Condition.onset.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Condition.abatement.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Condition.note.exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "ProfileValidation",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "Condition",
            "encodeRequestUrl": true,
            "params": "/${conditionId}"
          }
        },
        {
          "assert": {
            "validateProfileId": "http://hl7.org.au/fhir/core/StructureDefinition/au-core-condition",
            "warningOnly": false
          }
        }
      ]
    }
  ]
}