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-immunization.json
FHIR VersionR4
Sourcehttps://build.fhir.org/ig/jgsuess/au-core-tests/TestScript-au-core-immunization.html
URLhttp://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-immunization
Version0.1.0
Statusactive
Date2026-08-16T05:55:37+00:00
NameAUCoreImmunization
TitleAU Core Immunization — SHALL-level conformance plus vaccineCode slice coverage
DescriptionCovers the SHALL-level AU Core Immunization (2.0.0) requirements: read, search by patient, the SHALL search-combo patient+status, must-support element presence (including FHIRPath presence checks for the vaccineCode.coding:amtVaccineCode and vaccineCode.coding:airVaccineCode slices), and profile conformance validation. Reuses the shared au-core-patient-conformant fixture for the patient reference. Mirrors the SHALL subset of au-fhir-core-inferno's ImmunizationGroup (immunization_read_test, immunization_patient_search_test, immunization_patient_status_search_test, immunization_must_support_test, immunization_validation_test). Also includes standalone (MAY-level) SearchByDate and SearchByVaccineCode tests since date/status/vaccine-code/patient search were explicitly named in fhirfrog/au-core-compiler#11 — following the precedent set in #7/#8 of demonstrating an explicitly-called-out MAY/SHOULD-level mechanism alongside the SHALL-only core. The remaining SHOULD/MAY-level combinatorial coverage (patient+date, patient+vaccine-code, vaccine-code multiple-or, date multiple-and, the DVA/IHI/Medicare patient identifier chain searches, and the reference-resolution test) is not replicated here; see fhirfrog/au-core-compiler#6 for the original SHALL-only scope rationale. The amtVaccineCode and airVaccineCode slices are discriminated in the AU Core StructureDefinition by a pattern/$this rule bound to the amt-vaccine-1 and australian-immunisation-register-vaccine-1 ValueSets respectively rather than by a fixed coding.system element; in practice AMT codes are carried on the http://snomed.info/sct system and AIR codes on the https://www.humanservices.gov.au/organisations/health-professionals/enablers/air-vaccine-code-formats system (confirmed against the published au-core-immunization example Immunization-covid-1), so slice presence is asserted via a coding.where(system=...) FHIRPath check against those two systems.

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

url: TestScript AU Core Immunization — SHALL-level conformance plus vaccineCode slice coverage

version: 0.1.0

name: AUCoreImmunization

title: AU Core Immunization — SHALL-level conformance plus vaccineCode slice coverage

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 Immunization (2.0.0) requirements: read, search by patient, the SHALL search-combo patient+status, must-support element presence (including FHIRPath presence checks for the vaccineCode.coding:amtVaccineCode and vaccineCode.coding:airVaccineCode slices), and profile conformance validation. Reuses the shared au-core-patient-conformant fixture for the patient reference. Mirrors the SHALL subset of au-fhir-core-inferno's ImmunizationGroup (immunization_read_test, immunization_patient_search_test, immunization_patient_status_search_test, immunization_must_support_test, immunization_validation_test). Also includes standalone (MAY-level) SearchByDate and SearchByVaccineCode tests since date/status/vaccine-code/patient search were explicitly named in fhirfrog/au-core-compiler#11 — following the precedent set in #7/#8 of demonstrating an explicitly-called-out MAY/SHOULD-level mechanism alongside the SHALL-only core. The remaining SHOULD/MAY-level combinatorial coverage (patient+date, patient+vaccine-code, vaccine-code multiple-or, date multiple-and, the DVA/IHI/Medicare patient identifier chain searches, and the reference-resolution test) is not replicated here; see fhirfrog/au-core-compiler#6 for the original SHALL-only scope rationale. The amtVaccineCode and airVaccineCode slices are discriminated in the AU Core StructureDefinition by a pattern/$this rule bound to the amt-vaccine-1 and australian-immunisation-register-vaccine-1 ValueSets respectively rather than by a fixed coding.system element; in practice AMT codes are carried on the http://snomed.info/sct system and AIR codes on the https://www.humanservices.gov.au/organisations/health-professionals/enablers/air-vaccine-code-formats system (confirmed against the published au-core-immunization example Immunization-covid-1), so slice presence is asserted via a coding.where(system=...) FHIRPath check against those two systems.

fixture

id

patient-fixture

autocreate: true

autodelete: true

resource: au-core-patient-conformant

fixture

id

immunization-fixture

autocreate: true

autodelete: true

resource: au-core-immunization-conformant

variable

name: patientId

path: Patient.id

sourceId: patient-fixture

variable

name: immunizationId

path: Immunization.id

sourceId: immunization-fixture

test

name: Read

action

Operations

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

action

Asserts

-ResponseWarningOnly
*okayfalse

test

name: SearchByPatient

action

Operations

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

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(Immunization).note.text.where($this.contains('Frog')).exists()false

test

name: SearchByPatientAndStatus

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)Immunizationtrue?patient=${patientId}&status=completed

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(Immunization).status.where($this = 'completed').exists()false

test

name: SearchByDate

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)Immunizationtrue?date=ge2020-01-01

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(Immunization).note.text.exists($this.contains('Frog'))false

test

name: SearchByVaccineCode

action

Operations

-TypeResourceEncodeRequestUrlParams
*Test script operation code: search (Search)Immunizationtrue?vaccine-code=https://www.humanservices.gov.au/organisations/health-professionals/enablers/air-vaccine-code-formats|COMIRN

action

Asserts

-ResponseWarningOnly
*okayfalse

action

Asserts

-ExpressionWarningOnly
*Bundle.entry.resource.ofType(Immunization).vaccineCode.coding.where(code = 'COMIRN').exists()false

test

name: MustSupport

action

Operations

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

action

Asserts

-ExpressionWarningOnly
*Immunization.status.exists()false

action

Asserts

-ExpressionWarningOnly
*Immunization.vaccineCode.exists()false

action

Asserts

-ExpressionWarningOnly
*Immunization.vaccineCode.coding.where(system = 'http://snomed.info/sct').exists()false

action

Asserts

-ExpressionWarningOnly
*Immunization.vaccineCode.coding.where(system = 'https://www.humanservices.gov.au/organisations/health-professionals/enablers/air-vaccine-code-formats').exists()false

action

Asserts

-ExpressionWarningOnly
*Immunization.patient.exists()false

action

Asserts

-ExpressionWarningOnly
*Immunization.occurrence.ofType(dateTime).exists()false

action

Asserts

-ExpressionWarningOnly
*Immunization.primarySource.exists()false

action

Asserts

-ExpressionWarningOnly
*Immunization.lotNumber.exists()false

action

Asserts

-ExpressionWarningOnly
*Immunization.note.exists()false

test

name: ProfileValidation

action

Operations

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

action

Asserts

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

Source1

{
  "resourceType": "TestScript",
  "id": "au-core-immunization",
  "text": {
    "status": "generated",
    "div": "<!-- snip (see above) -->"
  },
  "url": "http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-immunization",
  "version": "0.1.0",
  "name": "AUCoreImmunization",
  "title": "AU Core Immunization — SHALL-level conformance plus vaccineCode slice coverage",
  "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 Immunization (2.0.0) requirements: read, search by patient, the SHALL search-combo patient+status, must-support element presence (including FHIRPath presence checks for the vaccineCode.coding:amtVaccineCode and vaccineCode.coding:airVaccineCode slices), and profile conformance validation. Reuses the shared au-core-patient-conformant fixture for the patient reference. Mirrors the SHALL subset of au-fhir-core-inferno's ImmunizationGroup (immunization_read_test, immunization_patient_search_test, immunization_patient_status_search_test, immunization_must_support_test, immunization_validation_test). Also includes standalone (MAY-level) SearchByDate and SearchByVaccineCode tests since date/status/vaccine-code/patient search were explicitly named in fhirfrog/au-core-compiler#11 — following the precedent set in #7/#8 of demonstrating an explicitly-called-out MAY/SHOULD-level mechanism alongside the SHALL-only core. The remaining SHOULD/MAY-level combinatorial coverage (patient+date, patient+vaccine-code, vaccine-code multiple-or, date multiple-and, the DVA/IHI/Medicare patient identifier chain searches, and the reference-resolution test) is not replicated here; see fhirfrog/au-core-compiler#6 for the original SHALL-only scope rationale. The amtVaccineCode and airVaccineCode slices are discriminated in the AU Core StructureDefinition by a pattern/$this rule bound to the amt-vaccine-1 and australian-immunisation-register-vaccine-1 ValueSets respectively rather than by a fixed coding.system element; in practice AMT codes are carried on the http://snomed.info/sct system and AIR codes on the https://www.humanservices.gov.au/organisations/health-professionals/enablers/air-vaccine-code-formats system (confirmed against the published au-core-immunization example Immunization-covid-1), so slice presence is asserted via a coding.where(system=...) FHIRPath check against those two systems.",
  "fixture": [
    {
      "id": "patient-fixture",
      "autocreate": true,
      "autodelete": true,
      "resource": {
        "reference": "au-core-patient-conformant"
      }
    },
    {
      "id": "immunization-fixture",
      "autocreate": true,
      "autodelete": true,
      "resource": {
        "reference": "au-core-immunization-conformant"
      }
    }
  ],
  "variable": [
    {
      "name": "patientId",
      "path": "Patient.id",
      "sourceId": "patient-fixture"
    },
    {
      "name": "immunizationId",
      "path": "Immunization.id",
      "sourceId": "immunization-fixture"
    }
  ],
  "test": [
    {
      "name": "Read",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "Immunization",
            "encodeRequestUrl": true,
            "params": "/${immunizationId}"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByPatient",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "Immunization",
            "encodeRequestUrl": true,
            "params": "?patient=${patientId}"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(Immunization).note.text.where($this.contains('Frog')).exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByPatientAndStatus",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "Immunization",
            "encodeRequestUrl": true,
            "params": "?patient=${patientId}&status=completed"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(Immunization).status.where($this = 'completed').exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByDate",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "Immunization",
            "encodeRequestUrl": true,
            "params": "?date=ge2020-01-01"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(Immunization).note.text.exists($this.contains('Frog'))",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "SearchByVaccineCode",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "search"
            },
            "resource": "Immunization",
            "encodeRequestUrl": true,
            "params": "?vaccine-code=https://www.humanservices.gov.au/organisations/health-professionals/enablers/air-vaccine-code-formats|COMIRN"
          }
        },
        {
          "assert": {
            "response": "okay",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Bundle.entry.resource.ofType(Immunization).vaccineCode.coding.where(code = 'COMIRN').exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "MustSupport",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "Immunization",
            "encodeRequestUrl": true,
            "params": "/${immunizationId}"
          }
        },
        {
          "assert": {
            "expression": "Immunization.status.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Immunization.vaccineCode.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Immunization.vaccineCode.coding.where(system = 'http://snomed.info/sct').exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Immunization.vaccineCode.coding.where(system = 'https://www.humanservices.gov.au/organisations/health-professionals/enablers/air-vaccine-code-formats').exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Immunization.patient.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Immunization.occurrence.ofType(dateTime).exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Immunization.primarySource.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Immunization.lotNumber.exists()",
            "warningOnly": false
          }
        },
        {
          "assert": {
            "expression": "Immunization.note.exists()",
            "warningOnly": false
          }
        }
      ]
    },
    {
      "name": "ProfileValidation",
      "action": [
        {
          "operation": {
            "type": {
              "system": "http://terminology.hl7.org/CodeSystem/testscript-operation-codes",
              "code": "read"
            },
            "resource": "Immunization",
            "encodeRequestUrl": true,
            "params": "/${immunizationId}"
          }
        },
        {
          "assert": {
            "validateProfileId": "http://hl7.org.au/fhir/core/StructureDefinition/au-core-immunization",
            "warningOnly": false
          }
        }
      ]
    }
  ]
}