<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-Coverage-individual-private" />
  <url value="https://bpcs.exchange/fhir/StructureDefinition/profile-Coverage-individual-private" />
  <name value="CoverageIndividualPrivate" />
  <title value="Coverage Individual Private Profile" />
  <status value="active" />
  <experimental value="false" />
  <description value="The set of coverage elements returned for individual private coverage when searching (or providing the results of a create/update)" />
  <fhirVersion value="5.0.0" />
  <mapping>
    <identity value="BPCS" />
    <name value="Internal BPCS API" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="Coverage" />
  <baseDefinition value="https://bpcs.exchange/fhir/StructureDefinition/profile-Coverage-individual-private-create" />
  <derivation value="constraint" />
  <differential>
    <element id="Coverage.meta">
      <path value="Coverage.meta" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Coverage.meta.versionId">
      <path value="Coverage.meta.versionId" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="BPCS" />
        <map value="RecipientInsuranceDTO.recCreateCustomTimestamp / FamilyMemberHistoryDTO.recCreateCustomTimestamp (no separators)" />
      </mapping>
    </element>
    <element id="Coverage.meta.lastUpdated">
      <path value="Coverage.meta.lastUpdated" />
      <min value="1" />
      <mustSupport value="true" />
      <mapping>
        <identity value="BPCS" />
        <map value="RecipientInsuranceDTO.recCreateCustomTimestamp / FamilyMemberHistoryDTO.recCreateCustomTimestamp (convert to valid FHIR format timestamp)" />
      </mapping>
    </element>
    <element id="Coverage.meta.extension">
      <path value="Coverage.meta.extension" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Coverage.meta.extension:effectiveDate">
      <path value="Coverage.meta.extension" />
      <sliceName value="effectiveDate" />
      <comment value="This associates the income information to the verson of the Trillium insurance application the private coverage information is associated with." />
      <min value="1" />
      <type>
        <code value="Extension" />
        <profile value="https://bpcs.exchange/fhir/StructureDefinition/ext-Meta-effectiveDate" />
      </type>
      <mustSupport value="true" />
      <mapping>
        <identity value="BPCS" />
        <map value="RecipientInsuranceDTO.recEffDate, FamilyMemberHistory.recEffDate" />
      </mapping>
    </element>
    <element id="Coverage.contained">
      <path value="Coverage.contained" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="Coverage.contained:provenance">
      <path value="Coverage.contained" />
      <sliceName value="provenance" />
      <short value="Creation/Update/etc. Metadata" />
      <definition value="Nested Provenance information referring to this resource that describes the creation, and sometimes the most recent update and/or inactivation of the record, specifically who was responsible and when it occurred" />
      <min value="1" />
      <type>
        <code value="Provenance" />
        <profile value="https://bpcs.exchange/fhir/StructureDefinition/profile-Provenance" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Coverage.extension">
      <path value="Coverage.extension" />
      <min value="1" />
    </element>
    <element id="Coverage.insurer.display">
      <path value="Coverage.insurer.display" />
      <definition value="The registered name of the insurer.  For BPCS, this will be 'Benefit Program Client Servies'" />
      <example>
        <label value="For BPCS" />
        <valueString value="Benefit Program Client Services" />
      </example>
      <mustSupport value="true" />
      <mapping>
        <identity value="BPCS" />
        <map value="RecipientInsuranceDTO.insuranceName1 or insuranceName2.  Can also be looked up in the code system based on FamilyMemberHistoryDTO.companyId1 or companyId2" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>