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

AU Core Encounter — SHALL-level conformance

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...&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.

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

Fixtures

  • patient-fixture: au-core-patient-conformant (created before, and removed after, the run)
  • frog-participant: au-core-encounter-participant (created before, and removed after, the run)
  • frog-location: au-core-encounter-location (created before, and removed after, the run)
  • frog-service-provider: au-core-encounter-service-provider (created before, and removed after, the run)
  • frog-reason-condition: au-core-encounter-reason-condition (created before, and removed after, the run)
  • encounter-fixture: au-core-encounter-conformant (created before, and removed after, the run)

Variables

  • ${patientId} = Patient.id of patient-fixture
  • ${encounterId} = Encounter.id of encounter-fixture

Read

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

SearchByPatient

  1. Search Encounter where patient = ${patientId} SEARCH Encounter?patient=${patientId}
  2. Response status is okay response = okay
  3. Check: Bundle.entry.resource.ofType(Encounter).class.code.where($this = 'AMB').exists() expression = Bundle.entry.resource.ofType(Encounter).class.code.where($this = 'AMB').exists()

SearchByPatientAndDate

  1. Search Encounter where patient = ${patientId} and date = 2024-03-01 SEARCH Encounter?patient=${patientId}&date=2024-03-01
  2. Response status is okay response = okay
  3. Check: Bundle.entry.resource.ofType(Encounter).status.where($this = 'finished').exists() expression = Bundle.entry.resource.ofType(Encounter).status.where($this = 'finished').exists()

SearchByDateMultipleAnd

  1. Search Encounter where date = ge2020-01-01 and date = le2030-01-01 SEARCH Encounter?date=ge2020-01-01&date=le2030-01-01
  2. Response status is okay response = okay
  3. Check: Bundle.entry.resource.ofType(Encounter).status.where($this = 'finished').exists() expression = Bundle.entry.resource.ofType(Encounter).status.where($this = 'finished').exists()

SearchByStatusMultipleOr

  1. Search Encounter where status = in-progress,finished SEARCH Encounter?status=in-progress,finished
  2. Response status is okay response = okay
  3. Check: Bundle.entry.resource.ofType(Encounter).status.where($this = 'finished').exists() expression = Bundle.entry.resource.ofType(Encounter).status.where($this = 'finished').exists()

MustSupport

  1. Read Encounter by id (${encounterId}) READ Encounter/${encounterId}
  2. Check: Encounter.status.exists() expression = Encounter.status.exists()
  3. Check: Encounter.class.exists() expression = Encounter.class.exists()
  4. Check: Encounter.subject.exists() expression = Encounter.subject.exists()
  5. Check: Encounter.participant.exists() expression = Encounter.participant.exists()
  6. Check: Encounter.participant.individual.exists() expression = Encounter.participant.individual.exists()
  7. Check: Encounter.participant.type.exists() expression = Encounter.participant.type.exists()
  8. Check: Encounter.period.exists() expression = Encounter.period.exists()
  9. Check: Encounter.reasonCode.exists() expression = Encounter.reasonCode.exists()
  10. Check: Encounter.reasonReference.exists() expression = Encounter.reasonReference.exists()
  11. Check: Encounter.location.exists() expression = Encounter.location.exists()
  12. Check: Encounter.location.location.exists() expression = Encounter.location.location.exists()
  13. Check: Encounter.serviceProvider.exists() expression = Encounter.serviceProvider.exists()
  14. Check: Encounter.serviceType.exists() expression = Encounter.serviceType.exists()

ProfileValidation

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