FHIR Frog AU Core Conformance Tests
0.1.0 - draft

FHIR Frog AU Core Conformance Tests, published by FHIR Frog. This guide is not an authorized publication; it is the continuous build for version 0.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/jgsuess/au-core-tests/ and changes regularly. See the Directory of published versions

AU Core Smoking Status Observation

AU Core Smoking Status — SHALL-level conformance

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.

Name
AUCoreSmokingStatus
URL
http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-smokingstatus
Status
active

Fixtures

  • patient-fixture: au-core-patient-conformant (created before, and removed after, the run)
  • smokingstatus-fixture: au-core-smokingstatus-conformant (created before, and removed after, the run)
  • smokingstatus-absent-fixture: au-core-smokingstatus-absent (created before, and removed after, the run)

Variables

  • ${patientId} = Patient.id of patient-fixture
  • ${smokingStatusId} = Observation.id of smokingstatus-fixture
  • ${smokingStatusAbsentId} = Observation.id of smokingstatus-absent-fixture

Read

  1. Read Observation by id (${smokingStatusId}) READ Observation/${smokingStatusId}
  2. Response status is okay response = okay

SearchByPatientCode

  1. Search Observation where patient = Patient/${patientId} and code = http://snomed.info/sct|1747861000168109 SEARCH Observation?patient=Patient/${patientId}&code=http://snomed.info/sct|1747861000168109
  2. Response status is okay response = okay
  3. Check: Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '1747861000168109').exists() expression = Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '1747861000168109').exists()

SearchByPatientCategory

  1. Search Observation where patient = Patient/${patientId} and category = http://terminology.hl7.org/CodeSystem/observation-category|social-history SEARCH Observation?patient=Patient/${patientId}&category=http://terminology.hl7.org/CodeSystem/observation-category|social-history
  2. Response status is okay response = okay
  3. Check: Bundle.entry.resource.ofType(Observation).category.coding.code.where($this = 'social-history').exists() expression = Bundle.entry.resource.ofType(Observation).category.coding.code.where($this = 'social-history').exists()

SearchByPatientCategoryDate

  1. Search Observation where patient = Patient/${patientId} and category = http://terminology.hl7.org/CodeSystem/observation-category|social-history and date = 2026-01-10 SEARCH Observation?patient=Patient/${patientId}&category=http://terminology.hl7.org/CodeSystem/observation-category|social-history&date=2026-01-10
  2. Response status is okay response = okay
  3. Check: Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '1747861000168109').exists() expression = Bundle.entry.resource.ofType(Observation).code.coding.code.where($this = '1747861000168109').exists()

MustSupport

  1. Read Observation by id (${smokingStatusId}) READ Observation/${smokingStatusId}
  2. Check: Observation.status.exists() expression = Observation.status.exists()
  3. Check: Observation.category.exists() expression = Observation.category.exists()
  4. Check: Observation.category.coding.code.where($this = 'social-history').exists() expression = Observation.category.coding.code.where($this = 'social-history').exists()
  5. Check: Observation.code.coding.code.where($this = '1747861000168109').exists() expression = Observation.code.coding.code.where($this = '1747861000168109').exists()
  6. Check: Observation.subject.exists() expression = Observation.subject.exists()
  7. Check: Observation.effective.exists() expression = Observation.effective.exists()
  8. Check: Observation.value.exists() expression = Observation.value.exists()

MustSupportAbsent

  1. Read Observation by id (${smokingStatusAbsentId}) READ Observation/${smokingStatusAbsentId}
  2. Check: Observation.dataAbsentReason.exists() expression = Observation.dataAbsentReason.exists()

ProfileValidation

  1. Read Observation by id (${smokingStatusId}) READ Observation/${smokingStatusId}
  2. Validate the response against profile http://hl7.org.au/fhir/core/StructureDefinition/au-core-smokingstatus validateProfileId = http://hl7.org.au/fhir/core/StructureDefinition/au-core-smokingstatus

ProfileValidationAbsent

  1. Read Observation by id (${smokingStatusAbsentId}) READ Observation/${smokingStatusAbsentId}
  2. Validate the response against profile http://hl7.org.au/fhir/core/StructureDefinition/au-core-smokingstatus validateProfileId = http://hl7.org.au/fhir/core/StructureDefinition/au-core-smokingstatus