au-core-smokingstatus
type: TestScript
node role: treeRoot
resource.id:
  value: au-core-smokingstatus
domain resource.text:
  narrative.status:
    value: generated
  narrative.div: Generated Narrative: TestScript au-core-smokingstatus url: TestScript AU Core Smoking Status — SHALL-level conformance version: 0.1.0 name: AUCoreSmokingStatus title: AU Core Smoking Status — 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 AU Core Smoking Status Observation (au-core-smokingstatus, 2.0.0) requirements identified in fhirfrog/au-core-compiler#24 (AUC-026): read, search by patient+code/patient+category/patient+category+date (mirroring au-fhir-core-inferno's smokingstatus group), must-support element presence across all 8 MS elements (status, category, category:socialHistory, code, subject, effective[x], value[x], dataAbsentReason), and profile conformance validation. Both category (fixed social-history) and code (fixed SNOMED 1747861000168109 'Tobacco smoking status') are pattern-constrained to a single value by the profile itself, so both fixtures share identical category/code - only value[x] vs dataAbsentReason differs between them, mirroring the profile's au-core-obs-01 condition on value[x] (value or dataAbsentReason must be present). Per issue #24's own scoping call, this profile has no obligation-extension or negative-testing complexity beyond that presence pairing - unlike fhirfrog/au-core-compiler#21/#22, no dedicated ObligationNoError/responseCode test is included here, matching the simpler pattern already established for fhirfrog/au-core-compiler#6-#20. fixture id patient-fixture autocreate: true autodelete: true resource: au-core-patient-conformant fixture id smokingstatus-fixture autocreate: true autodelete: true resource: au-core-smokingstatus-conformant fixture id smokingstatus-absent-fixture autocreate: true autodelete: true resource: au-core-smokingstatus-absent variable name: patientId path: Patient.id sourceId: patient-fixture variable name: smokingStatusId path: Observation.id sourceId: smokingstatus-fixture variable name…
test script.url:
  value: http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-smokingstatus
test script.version:
  value: 0.1.0
test script.name:
  value: AUCoreSmokingStatus
test script.title:
  value: AU Core Smoking Status — SHALL-level conformance
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 AU Core Smoking Status Observation (au-core-smokingstatus, 2.0.0) requirements identified in fhirfrog/au-core-compiler#24 (AUC-026): read, search by patient+code/patient+category/patient+category+date (mirroring au-fhir-core-inferno's smokingstatus group), must-support element presence across all 8 MS elements (status, category, category:socialHistory, code, subject, effective[x], value[x], dataAbsentReason), and profile conformance validation. Both category (fixed social-history) and code (fixed SNOMED 1747861000168109 'Tobacco smoking status') are pattern-constrained to a single value by the profile itself, so both fixtures share identical category/code - only value[x] vs dataAbsentReason differs between them, mirroring the profile's au-core-obs-01 condition on value[x] (value or dataAbsentReason must be present). Per issue #24's own scoping call, this profile has no obligation-extension or negative-testing complexity beyond that presence pairing - unlike fhirfrog/au-core-compiler#21/#22, no dedicated ObligationNoError/responseCode test is included here, matching the simpler pattern already established for fhirfrog/au-core-compiler#6-#20.
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: smokingstatus-fixture
  test script.fixture.autocreate:
    value: true
  test script.fixture.autodelete:
    value: true
  test script.fixture.resource:
    reference.reference:
      value: au-core-smokingstatus-conformant
test script.fixture:
  index: 2
  element.id:
    value: smokingstatus-absent-fixture
  test script.fixture.autocreate:
    value: true
  test script.fixture.autodelete:
    value: true
  test script.fixture.resource:
    reference.reference:
      value: au-core-smokingstatus-absent
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: smokingStatusId
  test script.variable.path:
    value: Observation.id
  test script.variable.source id:
    value: smokingstatus-fixture
test script.variable:
  index: 2
  test script.variable.name:
    value: smokingStatusAbsentId
  test script.variable.path:
    value: Observation.id
  test script.variable.source id:
    value: smokingstatus-absent-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: Observation
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: /${smokingStatusId}
  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: SearchByPatientCode
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: Observation
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?patient=Patient/${patientId}&code=http://snomed.info/sct|1747861000168109
  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(Observation).code.coding.code.where($this = '1747861000168109').exists()
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 2
  test script.test.name:
    value: SearchByPatientCategory
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: Observation
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?patient=Patient/${patientId}&category=http://terminology.hl7.org/CodeSystem/observation-category|social-history
  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(Observation).category.coding.code.where($this = 'social-history').exists()
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 3
  test script.test.name:
    value: SearchByPatientCategoryDate
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: Observation
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?patient=Patient/${patientId}&category=http://terminology.hl7.org/CodeSystem/observation-category|social-history&date=2026-01-10
  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(Observation).code.coding.code.where($this = '1747861000168109').exists()
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 4
  test script.test.name:
    value: MustSupport
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: Observation
      test script.setup.action.operation.encode request url:
        value: true

value: read

value: search

value: search

value: search

value: read

value: /${smokingStatusId}

index: 1
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.status.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 2
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.category.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 3
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.category.coding.code.where($this = 'social-history').exists()
  test script.setup.action.assert.warning only:
    value: false

index: 4
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.code.coding.code.where($this = '1747861000168109').exists()
  test script.setup.action.assert.warning only:
    value: false

index: 5
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.subject.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 6
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.effective.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 7
test script.test.action.assert:
  test script.setup.action.assert.expression:
    value: Observation.value.exists()
  test script.setup.action.assert.warning only:
    value: false

index: 5
test script.test.name:
  value: MustSupportAbsent
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: Observation
    test script.setup.action.operation.encode request url:
      value: true
    test script.setup.action.operation.params:
      value: /${smokingStatusAbsentId}
test script.test.action:
  index: 1
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: Observation.dataAbsentReason.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: Observation
    test script.setup.action.operation.encode request url:
      value: true
    test script.setup.action.operation.params:
      value: /${smokingStatusId}
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-smokingstatus
    test script.setup.action.assert.warning only:
      value: false

index: 7
test script.test.name:
  value: ProfileValidationAbsent
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: Observation
    test script.setup.action.operation.encode request url:
      value: true
    test script.setup.action.operation.params:
      value: /${smokingStatusAbsentId}
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-smokingstatus
    test script.setup.action.assert.warning only:
      value: false