au-core-relatedperson
type: TestScript
node role: treeRoot
resource.id:
  value: au-core-relatedperson
domain resource.text:
  narrative.status:
    value: generated
  narrative.div: Generated Narrative: TestScript au-core-relatedperson url: TestScript AU Core RelatedPerson — SHALL-level conformance version: 0.1.0 name: AUCoreRelatedPerson title: AU Core RelatedPerson — 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 RelatedPerson (2.0.0) requirements identified in fhirfrog/au-core-compiler#20: read, search by patient (SHALL), search by _id/name/relationship (SHOULD/MAY, included per the issue's explicit call-out of all four params — see fhirfrog/au-core-compiler#17 for the equivalent Practitioner-level precedent of including SHOULD/MAY searches when an issue names them), must-support element presence (patient, relationship, name+use/text/family/given, telecom, address), and profile conformance validation. Mirrors au-fhir-core-inferno's RelatedPersonGroup (related_person_patient_search_test, related_person__id_search_test, related_person_name_search_test, related_person_relationship_search_test, related_person_read_test, related_person_validation_test, related_person_must_support_test); the patient+name and patient+relationship combinator variants and reference-resolution test are not replicated — see fhirfrog/au-core-compiler#6 for the general scope rationale. No obligation-extension or negative-testing complexity is exercised here (unlike fhirfrog/au-core-compiler#21/#22): plain must-support presence checks are sufficient per issue #20's own scoping. fixture id relatedperson-patient-fixture autocreate: true autodelete: true resource: au-core-relatedperson-patient fixture id relatedperson-fixture autocreate: true autodelete: true resource: au-core-relatedperson-conformant variable name: relatedPersonId path: RelatedPerson.id sourceId: relatedperson-fixture variable name: patientId path: Patient.id sourceId: relatedperson-patient-fixture test name: Read action Operations - Type Resource EncodeRequestUrl Params * Test script …
test script.url:
  value: http://fhirfrog.org/fhir/au-core-tests/TestScript/au-core-relatedperson
test script.version:
  value: 0.1.0
test script.name:
  value: AUCoreRelatedPerson
test script.title:
  value: AU Core RelatedPerson — 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 RelatedPerson (2.0.0) requirements identified in fhirfrog/au-core-compiler#20: read, search by patient (SHALL), search by _id/name/relationship (SHOULD/MAY, included per the issue's explicit call-out of all four params — see fhirfrog/au-core-compiler#17 for the equivalent Practitioner-level precedent of including SHOULD/MAY searches when an issue names them), must-support element presence (patient, relationship, name+use/text/family/given, telecom, address), and profile conformance validation. Mirrors au-fhir-core-inferno's RelatedPersonGroup (related_person_patient_search_test, related_person__id_search_test, related_person_name_search_test, related_person_relationship_search_test, related_person_read_test, related_person_validation_test, related_person_must_support_test); the patient+name and patient+relationship combinator variants and reference-resolution test are not replicated — see fhirfrog/au-core-compiler#6 for the general scope rationale. No obligation-extension or negative-testing complexity is exercised here (unlike fhirfrog/au-core-compiler#21/#22): plain must-support presence checks are sufficient per issue #20's own scoping.
test script.fixture:
  index: 0
  element.id:
    value: relatedperson-patient-fixture
  test script.fixture.autocreate:
    value: true
  test script.fixture.autodelete:
    value: true
  test script.fixture.resource:
    reference.reference:
      value: au-core-relatedperson-patient
test script.fixture:
  index: 1
  element.id:
    value: relatedperson-fixture
  test script.fixture.autocreate:
    value: true
  test script.fixture.autodelete:
    value: true
  test script.fixture.resource:
    reference.reference:
      value: au-core-relatedperson-conformant
test script.variable:
  index: 0
  test script.variable.name:
    value: relatedPersonId
  test script.variable.path:
    value: RelatedPerson.id
  test script.variable.source id:
    value: relatedperson-fixture
test script.variable:
  index: 1
  test script.variable.name:
    value: patientId
  test script.variable.path:
    value: Patient.id
  test script.variable.source id:
    value: relatedperson-patient-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: RelatedPerson
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: /${relatedPersonId}
  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: SearchByPatient
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: RelatedPerson
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?patient=Patient/${patientId}
  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(RelatedPerson).name.family.where($this = 'Banks').exists()
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 2
  test script.test.name:
    value: SearchById
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: RelatedPerson
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?_id=${relatedPersonId}
  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(RelatedPerson).name.family.where($this = 'Banks').exists()
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 3
  test script.test.name:
    value: SearchByName
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: RelatedPerson
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?name=Banks
  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(RelatedPerson).name.family.where($this = 'Banks').exists()
      test script.setup.action.assert.warning only:
        value: false
test script.test:
  index: 4
  test script.test.name:
    value: SearchByRelationship
  test script.test.action:
    index: 0
    test script.test.action.operation:
      test script.setup.action.operation.resource:
        value: RelatedPerson
      test script.setup.action.operation.encode request url:
        value: true
      test script.setup.action.operation.params:
        value: ?relationship=http://terminology.hl7.org/CodeSystem/v3-RoleCode|FTH
  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(RelatedPerson).relationship.coding.code.where($this = 'FTH').exists()
      test script.setup.action.assert.warning only:
        value: false

value: read

value: search

value: search

value: search

value: search

index: 5
test script.test.name:
  value: MustSupport
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: RelatedPerson
    test script.setup.action.operation.encode request url:
      value: true
    test script.setup.action.operation.params:
      value: /${relatedPersonId}
test script.test.action:
  index: 1
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: RelatedPerson.patient.exists()
    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: RelatedPerson.relationship.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 3
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: RelatedPerson.name.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 4
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: RelatedPerson.name.use.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 5
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: RelatedPerson.name.text.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 6
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: RelatedPerson.name.family.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 7
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: RelatedPerson.name.given.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 8
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: RelatedPerson.telecom.exists()
    test script.setup.action.assert.warning only:
      value: false
test script.test.action:
  index: 9
  test script.test.action.assert:
    test script.setup.action.assert.expression:
      value: RelatedPerson.address.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: RelatedPerson
    test script.setup.action.operation.encode request url:
      value: true
    test script.setup.action.operation.params:
      value: /${relatedPersonId}
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-relatedperson
    test script.setup.action.assert.warning only:
      value: false