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 Encounter — SHALL-level conformance - XML Representation

Active as of 2026-10-23

Raw xml | Download


<TestScript xmlns="http://hl7.org/fhir">
  <id value="au-core-encounter"/>
  <url
       value="http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-encounter"/>
  <version value="0.1.0"/>
  <name value="AUCoreEncounter"/>
  <title value="AU Core Encounter — SHALL-level conformance"/>
  <status value="active"/>
  <date value="2026-10-23T03:11:59+00:00"/>
  <publisher value="FHIR Frog"/>
  <contact>
    <name value="FHIR Frog"/>
    <telecom>
      <system value="url"/>
      <value value="https://gitlab.com/fhirfrog"/>
    </telecom>
  </contact>
  <description
               value="Covers the SHALL-level AU Core Encounter (2.0.0) requirements: read, search by patient, the SHALL search-combo patient+date, must-support element presence, and profile conformance validation. Mirrors the SHALL subset of au-fhir-core-inferno's EncounterGroup (encounter_read_test, encounter_patient_search_test, encounter_date_patient_search_test, encounter_must_support_test, encounter_validation_test). Per fhirfrog/au-core-compiler#9, two SHOULD/MAY-level combinatorial search tests are additionally included — SearchByDateMultipleAnd (date=ge...&amp;date=le..., encounter_date_multiple_and_search_test) and SearchByStatusMultipleOr (status=a,b, encounter_status_multiple_or_search_test) — because Inferno's generated group configures multi-and/multi-or combos specifically for Encounter's clinical-date and status search parameters and issue #9 calls these out by name; this is a deliberate, narrow exception to the SHALL-only scope rationale used for Patient (#6) and Condition (#8). The remaining SHOULD/MAY-level searches (status, date, class, class+patient, patient+status, patient+location, location) and the reference-resolution test are not replicated here."/>
  <fixture id="patient-fixture">
    <autocreate value="true"/>
    <autodelete value="true"/>
    <resource>
      <reference value="au-core-patient-conformant"/>
    </resource>
  </fixture>
  <fixture id="frog-participant">
    <autocreate value="true"/>
    <autodelete value="true"/>
    <resource>
      <reference value="au-core-encounter-participant"/>
    </resource>
  </fixture>
  <fixture id="frog-location">
    <autocreate value="true"/>
    <autodelete value="true"/>
    <resource>
      <reference value="au-core-encounter-location"/>
    </resource>
  </fixture>
  <fixture id="frog-service-provider">
    <autocreate value="true"/>
    <autodelete value="true"/>
    <resource>
      <reference value="au-core-encounter-service-provider"/>
    </resource>
  </fixture>
  <fixture id="frog-reason-condition">
    <autocreate value="true"/>
    <autodelete value="true"/>
    <resource>
      <reference value="au-core-encounter-reason-condition"/>
    </resource>
  </fixture>
  <fixture id="encounter-fixture">
    <autocreate value="true"/>
    <autodelete value="true"/>
    <resource>
      <reference value="au-core-encounter-conformant"/>
    </resource>
  </fixture>
  <variable>
    <name value="patientId"/>
    <path value="Patient.id"/>
    <sourceId value="patient-fixture"/>
  </variable>
  <variable>
    <name value="encounterId"/>
    <path value="Encounter.id"/>
    <sourceId value="encounter-fixture"/>
  </variable>
  <test>
    <name value="Read"/>
    <action>
      <operation>
        <type>
          <system
                  value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
          <code value="read"/>
        </type>
        <resource value="Encounter"/>
        <encodeRequestUrl value="true"/>
        <params value="/${encounterId}"/>
      </operation>
    </action>
    <action>
      <assert>
        <response value="okay"/>
        <warningOnly value="false"/>
      </assert>
    </action>
  </test>
  <test>
    <name value="SearchByPatient"/>
    <action>
      <operation>
        <type>
          <system
                  value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
          <code value="search"/>
        </type>
        <resource value="Encounter"/>
        <encodeRequestUrl value="true"/>
        <params value="?patient=${patientId}"/>
      </operation>
    </action>
    <action>
      <assert>
        <response value="okay"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <expression
                    value="Bundle.entry.resource.ofType(Encounter).class.code.where($this = 'AMB').exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
  </test>
  <test>
    <name value="SearchByPatientAndDate"/>
    <action>
      <operation>
        <type>
          <system
                  value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
          <code value="search"/>
        </type>
        <resource value="Encounter"/>
        <encodeRequestUrl value="true"/>
        <params value="?patient=${patientId}&amp;date=2024-03-01"/>
      </operation>
    </action>
    <action>
      <assert>
        <response value="okay"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <expression
                    value="Bundle.entry.resource.ofType(Encounter).status.where($this = 'finished').exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
  </test>
  <test>
    <name value="SearchByDateMultipleAnd"/>
    <action>
      <operation>
        <type>
          <system
                  value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
          <code value="search"/>
        </type>
        <resource value="Encounter"/>
        <encodeRequestUrl value="true"/>
        <params value="?date=ge2020-01-01&amp;date=le2030-01-01"/>
      </operation>
    </action>
    <action>
      <assert>
        <response value="okay"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <expression
                    value="Bundle.entry.resource.ofType(Encounter).status.where($this = 'finished').exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
  </test>
  <test>
    <name value="SearchByStatusMultipleOr"/>
    <action>
      <operation>
        <type>
          <system
                  value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
          <code value="search"/>
        </type>
        <resource value="Encounter"/>
        <encodeRequestUrl value="true"/>
        <params value="?status=in-progress,finished"/>
      </operation>
    </action>
    <action>
      <assert>
        <response value="okay"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <expression
                    value="Bundle.entry.resource.ofType(Encounter).status.where($this = 'finished').exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
  </test>
  <test>
    <name value="MustSupport"/>
    <action>
      <operation>
        <type>
          <system
                  value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
          <code value="read"/>
        </type>
        <resource value="Encounter"/>
        <encodeRequestUrl value="true"/>
        <params value="/${encounterId}"/>
      </operation>
    </action>
    <action>
      <assert>
        <expression value="Encounter.status.exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <expression value="Encounter.class.exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <expression value="Encounter.subject.exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <expression value="Encounter.participant.exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <expression value="Encounter.participant.individual.exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <expression value="Encounter.participant.type.exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <expression value="Encounter.period.exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <expression value="Encounter.reasonCode.exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <expression value="Encounter.reasonReference.exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <expression value="Encounter.location.exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <expression value="Encounter.location.location.exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <expression value="Encounter.serviceProvider.exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <expression value="Encounter.serviceType.exists()"/>
        <warningOnly value="false"/>
      </assert>
    </action>
  </test>
  <test>
    <name value="ProfileValidation"/>
    <action>
      <operation>
        <type>
          <system
                  value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
          <code value="read"/>
        </type>
        <resource value="Encounter"/>
        <encodeRequestUrl value="true"/>
        <params value="/${encounterId}"/>
      </operation>
    </action>
    <action>
      <assert>
        <validateProfileId
                           value="http://hl7.org.au/fhir/core/StructureDefinition/au-core-encounter"/>
        <warningOnly value="false"/>
      </assert>
    </action>
  </test>
</TestScript>