<StructureDefinition xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hl7.org/fhir ../../input-cache/schemas/R5/fhir-single.xsd">
  <id value="profile-RelatedPerson-consenter" />
  <url value="https://bpcs.exchange/fhir/StructureDefinition/profile-RelatedPerson-consenter" />
  <name value="RelatedPersonConsenter" />
  <title value="Related Person Consenter" />
  <status value="active" />
  <experimental value="false" />
  <description value="Indicates the relationship of the consenting individual to the recipient" />
  <fhirVersion value="5.0.0" />
  <mapping>
    <identity value="BPCS" />
    <name value="Internal BPCS API" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="RelatedPerson" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
  <derivation value="constraint" />
  <differential>
    <element id="RelatedPerson.id">
      <path value="RelatedPerson.id" />
      <min value="1" />
      <patternId value="related" />
      <mustSupport value="true" />
    </element>
    <element id="RelatedPerson.active">
      <path value="RelatedPerson.active" />
      <max value="0" />
    </element>
    <element id="RelatedPerson.patient">
      <path value="RelatedPerson.patient" />
      <comment value="The patient this person is related to. When RelatedPerson.relationship is 'S'elf, this will refer to the recipient." />
      <type>
        <code value="Reference" />
        <profile value="https://bpcs.exchange/fhir/StructureDefinition/profile-Reference-rest" />
        <targetProfile value="https://bpcs.exchange/fhir/StructureDefinition/profile-Patient-create" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="RelatedPerson.relationship">
      <path value="RelatedPerson.relationship" />
      <min value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="https://bpcs.exchange/fhir/ValueSet/vs-Consenter" />
      </binding>
      <mapping>
        <identity value="BPCS" />
        <map value="ConsentDTO.consenter" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>