<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-EnrollmentResponse" />
  <url value="https://bpcs.exchange/fhir/StructureDefinition/profile-EnrollmentResponse" />
  <name value="EnrollmentResponse" />
  <title value="Enrollment Response" />
  <status value="active" />
  <experimental value="false" />
  <description value="Information about the acceptance or rejection of a request for BPCS family coverage" />
  <fhirVersion value="5.0.0" />
  <mapping>
    <identity value="BPCS" />
    <name value="Internal BPCS API" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="EnrollmentResponse" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/EnrollmentResponse" />
  <derivation value="constraint" />
  <differential>
    <element id="EnrollmentResponse.id">
      <path value="EnrollmentResponse.id" />
      <comment value="This will be the same as the application number" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="EnrollmentResponse.meta">
      <path value="EnrollmentResponse.meta" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="EnrollmentResponse.meta.versionId">
      <path value="EnrollmentResponse.meta.versionId" />
      <comment value="This will be the create timestamp for this application version, with no separators" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="EnrollmentResponse.meta.lastUpdated">
      <path value="EnrollmentResponse.meta.lastUpdated" />
      <comment value="This will be the create timestamp for this application version" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="EnrollmentResponse.status">
      <path value="EnrollmentResponse.status" />
      <comment value="The actual status of the application is conveyed in an extension" />
      <min value="1" />
      <patternCode value="active" />
    </element>
    <element id="EnrollmentResponse.request">
      <path value="EnrollmentResponse.request" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <profile value="https://bpcs.exchange/fhir/StructureDefinition/profile-Reference-rest" />
        <targetProfile value="https://bpcs.exchange/fhir/StructureDefinition/profile-EnrollmentRequest" />
        <aggregation value="bundled" />
        <versioning value="specific" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="EnrollmentResponse.created">
      <path value="EnrollmentResponse.created" />
      <short value="processedDate" />
      <definition value="The date which the application was accepted." />
      <comment value="Date of rejection is not tracked by the system" />
      <mustSupport value="true" />
      <mapping>
        <identity value="BPCS" />
        <map value="ApplicationDTO.processedDate, FamilyHistoryDTO.appProcessedDt" />
      </mapping>
    </element>
    <element id="EnrollmentResponse.organization">
      <path value="EnrollmentResponse.organization" />
      <min value="1" />
      <patternReference>
        <reference value="Organization/bpcs" />
      </patternReference>
    </element>
  </differential>
</StructureDefinition>