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 AllergyIntolerance — SHALL-level conformance plus chained identifier search - TTL Representation

Active as of 2026-10-23

Raw ttl | Download


@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://hl7.org/fhir/TestScript/au-core-allergyintolerance> a fhir:TestScript ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "au-core-allergyintolerance"] ;
  fhir:TestScript.url [ fhir:value "http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-allergyintolerance"] ;
  fhir:TestScript.version [ fhir:value "0.1.0"] ;
  fhir:TestScript.name [ fhir:value "AUCoreAllergyIntolerance"] ;
  fhir:TestScript.title [ fhir:value "AU Core AllergyIntolerance — SHALL-level conformance plus chained identifier search"] ;
  fhir:TestScript.status [ fhir:value "active"] ;
  fhir:TestScript.date [ fhir:value "2026-10-23T03:11:59+00:00"^^xsd:dateTime] ;
  fhir:TestScript.publisher [ fhir:value "FHIR Frog"] ;
  fhir:TestScript.contact [
     fhir:index 0 ;
     fhir:ContactDetail.name [ fhir:value "FHIR Frog" ] ;
     fhir:ContactDetail.telecom [
       fhir:index 0 ;
       fhir:ContactPoint.system [ fhir:value "url" ] ;
       fhir:ContactPoint.value [ fhir:value "https://gitlab.com/fhirfrog" ]
     ]
  ] ;
  fhir:TestScript.description [ fhir:value "Covers the SHALL-level AU Core AllergyIntolerance (2.0.0) requirements: read, search by patient, must-support element presence, and profile conformance validation, plus a demonstration of the AU-specific chained patient.identifier (IHI) search that Inferno adds beyond generic us-core coverage. Also exercises the (MAY-level) standalone clinical-status search since it was explicitly called out for coverage in fhirfrog/au-core-compiler#7. Mirrors the relevant subset of au-fhir-core-inferno's AllergyIntoleranceGroup (allergy_intolerance_read_test, allergy_intolerance_patient_search_test, allergy_intolerance_clinical_status_search_test, allergy_intolerance_patient_ihi_chain_search_test, allergy_intolerance_must_support_test, allergy_intolerance_validation_test) — the SHOULD-level combined patient+clinical-status search, the Medicare/DVA chain variants (structurally identical to the IHI chain demonstrated here), the POST-search variant, and the reference-resolution test are not replicated; see fhirfrog/au-core-compiler#7 for scope rationale, following #6's precedent."] ;
  fhir:TestScript.fixture [
     fhir:index 0 ;
     fhir:Element.id [ fhir:value "patient-fixture" ] ;
     fhir:TestScript.fixture.autocreate [ fhir:value "true"^^xsd:boolean ] ;
     fhir:TestScript.fixture.autodelete [ fhir:value "true"^^xsd:boolean ] ;
     fhir:TestScript.fixture.resource [
       fhir:Reference.reference [ fhir:value "au-core-patient-conformant" ]
     ]
  ], [
     fhir:index 1 ;
     fhir:Element.id [ fhir:value "allergyintolerance-fixture" ] ;
     fhir:TestScript.fixture.autocreate [ fhir:value "true"^^xsd:boolean ] ;
     fhir:TestScript.fixture.autodelete [ fhir:value "true"^^xsd:boolean ] ;
     fhir:TestScript.fixture.resource [
       fhir:Reference.reference [ fhir:value "au-core-allergyintolerance-conformant" ]
     ]
  ] ;
  fhir:TestScript.variable [
     fhir:index 0 ;
     fhir:TestScript.variable.name [ fhir:value "patientId" ] ;
     fhir:TestScript.variable.path [ fhir:value "Patient.id" ] ;
     fhir:TestScript.variable.sourceId [ fhir:value "patient-fixture" ]
  ], [
     fhir:index 1 ;
     fhir:TestScript.variable.name [ fhir:value "allergyIntoleranceId" ] ;
     fhir:TestScript.variable.path [ fhir:value "AllergyIntolerance.id" ] ;
     fhir:TestScript.variable.sourceId [ fhir:value "allergyintolerance-fixture" ]
  ] ;
  fhir:TestScript.test [
     fhir:index 0 ;
     fhir:TestScript.test.name [ fhir:value "Read" ] ;
     fhir:TestScript.test.action [
       fhir:index 0 ;
       fhir:TestScript.test.action.operation [
         fhir:TestScript.setup.action.operation.type [
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/testscript-operation-codes" ] ;
           fhir:Coding.code [ fhir:value "read" ]
         ] ;
         fhir:TestScript.setup.action.operation.resource [ fhir:value "AllergyIntolerance" ] ;
         fhir:TestScript.setup.action.operation.encodeRequestUrl [ fhir:value "true"^^xsd:boolean ] ;
         fhir:TestScript.setup.action.operation.params [ fhir:value "/${allergyIntoleranceId}" ]
       ]
     ], [
       fhir:index 1 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.response [ fhir:value "okay" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ]
  ], [
     fhir:index 1 ;
     fhir:TestScript.test.name [ fhir:value "SearchByPatient" ] ;
     fhir:TestScript.test.action [
       fhir:index 0 ;
       fhir:TestScript.test.action.operation [
         fhir:TestScript.setup.action.operation.type [
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/testscript-operation-codes" ] ;
           fhir:Coding.code [ fhir:value "search" ]
         ] ;
         fhir:TestScript.setup.action.operation.resource [ fhir:value "AllergyIntolerance" ] ;
         fhir:TestScript.setup.action.operation.encodeRequestUrl [ fhir:value "true"^^xsd:boolean ] ;
         fhir:TestScript.setup.action.operation.params [ fhir:value "?patient=${patientId}" ]
       ]
     ], [
       fhir:index 1 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.response [ fhir:value "okay" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ], [
       fhir:index 2 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Bundle.entry.resource.ofType(AllergyIntolerance).note.text.where($this.contains('Frog')).exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ]
  ], [
     fhir:index 2 ;
     fhir:TestScript.test.name [ fhir:value "SearchByClinicalStatus" ] ;
     fhir:TestScript.test.action [
       fhir:index 0 ;
       fhir:TestScript.test.action.operation [
         fhir:TestScript.setup.action.operation.type [
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/testscript-operation-codes" ] ;
           fhir:Coding.code [ fhir:value "search" ]
         ] ;
         fhir:TestScript.setup.action.operation.resource [ fhir:value "AllergyIntolerance" ] ;
         fhir:TestScript.setup.action.operation.encodeRequestUrl [ fhir:value "true"^^xsd:boolean ] ;
         fhir:TestScript.setup.action.operation.params [ fhir:value "?clinical-status=http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical|active" ]
       ]
     ], [
       fhir:index 1 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.response [ fhir:value "okay" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ], [
       fhir:index 2 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Bundle.entry.resource.ofType(AllergyIntolerance).note.text.where($this.contains('Frog')).exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ]
  ], [
     fhir:index 3 ;
     fhir:TestScript.test.name [ fhir:value "SearchByPatientIdentifierIHIChain" ] ;
     fhir:TestScript.test.action [
       fhir:index 0 ;
       fhir:TestScript.test.action.operation [
         fhir:TestScript.setup.action.operation.type [
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/testscript-operation-codes" ] ;
           fhir:Coding.code [ fhir:value "search" ]
         ] ;
         fhir:TestScript.setup.action.operation.resource [ fhir:value "AllergyIntolerance" ] ;
         fhir:TestScript.setup.action.operation.encodeRequestUrl [ fhir:value "true"^^xsd:boolean ] ;
         fhir:TestScript.setup.action.operation.params [ fhir:value "?patient.identifier=http://ns.electronichealth.net.au/id/hi/ihi/1.0|8003608833357361" ]
       ]
     ], [
       fhir:index 1 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.response [ fhir:value "okay" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ], [
       fhir:index 2 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "Bundle.entry.resource.ofType(AllergyIntolerance).note.text.where($this.contains('Frog')).exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ]
  ], [
     fhir:index 4 ;
     fhir:TestScript.test.name [ fhir:value "MustSupport" ] ;
     fhir:TestScript.test.action [
       fhir:index 0 ;
       fhir:TestScript.test.action.operation [
         fhir:TestScript.setup.action.operation.type [
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/testscript-operation-codes" ] ;
           fhir:Coding.code [ fhir:value "read" ]
         ] ;
         fhir:TestScript.setup.action.operation.resource [ fhir:value "AllergyIntolerance" ] ;
         fhir:TestScript.setup.action.operation.encodeRequestUrl [ fhir:value "true"^^xsd:boolean ] ;
         fhir:TestScript.setup.action.operation.params [ fhir:value "/${allergyIntoleranceId}" ]
       ]
     ], [
       fhir:index 1 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "AllergyIntolerance.clinicalStatus.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ], [
       fhir:index 2 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "AllergyIntolerance.verificationStatus.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ], [
       fhir:index 3 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "AllergyIntolerance.code.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ], [
       fhir:index 4 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "AllergyIntolerance.patient.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ], [
       fhir:index 5 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "AllergyIntolerance.onset.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ], [
       fhir:index 6 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "AllergyIntolerance.note.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ], [
       fhir:index 7 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "AllergyIntolerance.reaction.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ], [
       fhir:index 8 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "AllergyIntolerance.reaction.manifestation.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ], [
       fhir:index 9 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.expression [ fhir:value "AllergyIntolerance.reaction.severity.exists()" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ]
  ], [
     fhir:index 5 ;
     fhir:TestScript.test.name [ fhir:value "ProfileValidation" ] ;
     fhir:TestScript.test.action [
       fhir:index 0 ;
       fhir:TestScript.test.action.operation [
         fhir:TestScript.setup.action.operation.type [
           fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/testscript-operation-codes" ] ;
           fhir:Coding.code [ fhir:value "read" ]
         ] ;
         fhir:TestScript.setup.action.operation.resource [ fhir:value "AllergyIntolerance" ] ;
         fhir:TestScript.setup.action.operation.encodeRequestUrl [ fhir:value "true"^^xsd:boolean ] ;
         fhir:TestScript.setup.action.operation.params [ fhir:value "/${allergyIntoleranceId}" ]
       ]
     ], [
       fhir:index 1 ;
       fhir:TestScript.test.action.assert [
         fhir:TestScript.setup.action.assert.validateProfileId [ fhir:value "http://hl7.org.au/fhir/core/StructureDefinition/au-core-allergyintolerance" ] ;
         fhir:TestScript.setup.action.assert.warningOnly [ fhir:value "false"^^xsd:boolean ]
       ]
     ]
  ] .

# - ontology header ------------------------------------------------------------

<http://hl7.org/fhir/TestScript/au-core-allergyintolerance.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl ;
  owl:versionIRI <http://build.fhir.org/TestScript/au-core-allergyintolerance.ttl> .