au-core-immunization
type: TestScript
node role: treeRoot
resource.id:
  value: au-core-immunization
domain resource.text:
  narrative.status:
    value: generated
  narrative.div: 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://snome…
test script.url:
  value: http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-immunization
test script.version:
  value: 0.1.0
test script.name:
  value: AUCoreImmunization
test script.title:
  value: AU Core Immunization — SHALL-level conformance plus vaccineCode slice coverage
test script.status:
  value: active
test script.date:
  value: 2026-08-16T05:55:37+00:00
test script.publisher:
  value: FHIR Frog
test script.contact:
  index: 0
  contact detail.name:
    value: FHIR Frog
  contact detail.telecom:
    index: 0
    contact point.system:
      value: url
    contact point.value:
      value: https://gitlab.com/fhirfrog
test script.description:
  value: 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.
test script.fixture:
  index: 0
  element.id:
    value: patient-fixture
  test script.fixture.autocreate:
    value: true
  test script.fixture.autodelete:
    value: true
  test script.fixture.resource:
    reference.reference:
      value: au-core-patient-conformant
test script.fixture:
  index: 1
  element.id:
    value: immunization-fixture
  test script.fixture.autocreate:
    value: true
  test script.fixture.autodelete:
    value: true
  test script.fixture.resource:
    reference.reference:
      value: au-core-immunization-conformant
test script.variable:
  index: 0
  test script.variable.name:
    value: patientId
  test script.variable.path:
    value: Patient.id
  test script.variable.source id:
    value: patient-fixture
test script.variable:
  index: 1
  test script.variable.name:
    value: immunizationId
  test script.variable.path:
    value: Immunization.id
  test script.variable.source id:
    value: immunization-fixture
test script.test:
  index: 0
  test script.test.name:
    value: Read
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: Immunization
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: /${immunizationId}
  test script.test.action:
    index: 1
    test script.test.action.assert:
      test script.setup.action.assert.response:
        value: okay
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 1
  test script.test.name:
    value: SearchByPatient
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: Immunization
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?patient=${patientId}
  test script.test.action:
    index: 1
    test script.test.action.assert:
      test script.setup.action.assert.response:
        value: okay
      test script.setup.action.assert.warning only:
        value: false
  test script.test.action:
    index: 2
    test script.test.action.assert:
      test script.setup.action.assert.expression:
        value: Bundle.entry.resource.ofType(Immunization).note.text.where($this.contains('Frog')).exists()
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 2
  test script.test.name:
    value: SearchByPatientAndStatus
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: Immunization
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?patient=${patientId}&status=completed
  test script.test.action:
    index: 1
    test script.test.action.assert:
      test script.setup.action.assert.response:
        value: okay
      test script.setup.action.assert.warning only:
        value: false
  test script.test.action:
    index: 2
    test script.test.action.assert:
      test script.setup.action.assert.expression:
        value: Bundle.entry.resource.ofType(Immunization).status.where($this = 'completed').exists()
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 3
  test script.test.name:
    value: SearchByDate
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: Immunization
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?date=ge2020-01-01
  test script.test.action:
    index: 1
    test script.test.action.assert:
      test script.setup.action.assert.response:
        value: okay
      test script.setup.action.assert.warning only:
        value: false
  test script.test.action:
    index: 2
    test script.test.action.assert:
      test script.setup.action.assert.expression:
        value: Bundle.entry.resource.ofType(Immunization).note.text.exists($this.contains('Frog'))
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 4
  test script.test.name:
    value: SearchByVaccineCode
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: Immunization
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?vaccine-code=https://www.humanservices.gov.au/organisations/health-professionals/enablers/air-vaccine-code-formats|COMIRN
  test script.test.action:
    index: 1
    test script.test.action.assert:
      test script.setup.action.assert.response:
        value: okay
      test script.setup.action.assert.warning only:
        value: false
  test script.test.action:
    index: 2
    test script.test.action.assert:
      test script.setup.action.assert.expression:
        value: Bundle.entry.resource.ofType(Immunization).vaccineCode.coding.where(code = 'COMIRN').exists()
      test script.setup.action.assert.warning only:
        value: false

value: read

value: search

value: search

value: search

value: search

index: 5
test script.test.name:
  value: MustSupport
test script.test.action:
  index: 0
  test script.test.action.operation:
    test script.setup.action.operation.type:
      coding.system:
        value: http://terminology.hl7.org/CodeSystem/testscript-operation-codes
      coding.code:
        value: read
    test script.setup.action.operation.resource:
      value: Immunization
    test script.setup.action.operation.encode request url:
      value: true
    test script.setup.action.operation.params:
      value: /${immunizationId}
test script.test.action:
  index: 1
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: Immunization.status.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 2
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: Immunization.vaccineCode.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 3
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: Immunization.vaccineCode.coding.where(system = 'http://snomed.info/sct').exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 4
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: Immunization.vaccineCode.coding.where(system = 'https://www.humanservices.gov.au/organisations/health-professionals/enablers/air-vaccine-code-formats').exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 5
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: Immunization.patient.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 6
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: Immunization.occurrence.ofType(dateTime).exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 7
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: Immunization.primarySource.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 8
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: Immunization.lotNumber.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 9
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: Immunization.note.exists()
    test script.setup.action.assert.warning only:
      value: false

index: 6
test script.test.name:
  value: ProfileValidation
test script.test.action:
  index: 0
  test script.test.action.operation:
    test script.setup.action.operation.type:
      coding.system:
        value: http://terminology.hl7.org/CodeSystem/testscript-operation-codes
      coding.code:
        value: read
    test script.setup.action.operation.resource:
      value: Immunization
    test script.setup.action.operation.encode request url:
      value: true
    test script.setup.action.operation.params:
      value: /${immunizationId}
test script.test.action:
  index: 1
  test script.test.action.assert:
    test script.setup.action.assert.validate profile id:
      value: http://hl7.org.au/fhir/core/StructureDefinition/au-core-immunization
    test script.setup.action.assert.warning only:
      value: false