<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="pr-contract" />
  <meta>
    <source value="https://www.icanbwell.com/fhir_profile_definitions" />
    <security>
      <system value="https://www.icanbwell.com/owner" />
      <code value="bwell" />
    </security>
    <security>
      <system value="https://www.icanbwell.com/access" />
      <code value="bwell" />
    </security>
  </meta>
  <url value="https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-contract" />
  <version value="1.02" />
  <name value="Contract" />
  <title value="Profile: Contract" />
  <status value="active" />
  <experimental value="false" />
  <date value="2022-06-02" />
  <publisher value="b.Well Connected Health" />
  <description value="Contract resource" />
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166" />
      <code value="US" />
      <display value="United States of America" />
    </coding>
    <text value="United States of America" />
  </jurisdiction>
  <fhirVersion value="4.0.0" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Contract" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Contract" />
  <derivation value="constraint" />
  <differential>
    <element id="Contract">
      <path value="Contract" />
    </element>
    <element id="Contract.id">
      <path value="Contract.id" />
    </element>
    <element id="Contract.meta">
      <path value="Contract.meta" />
      <label value="meta" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Meta" />
      </type>
    </element>
    <element id="Contract.meta.source">
      <path value="Contract.meta.source" />
      <sliceName value="meta-source" />
      <label value="meta" />
      <short value="uri of the data source" />
      <definition value="Typically the data owner's URL followed by a source/file description" />
      <requirements value="mandatory for all resources in bWell's FHIR Server" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="uri" />
      </type>
      <example>
        <label value="example of meta.source" />
        <valueUri value="https://www.icanbwell.com/provider-directory" />
      </example>
    </element>
    <element id="Contract.meta.security">
      <path value="Contract.meta.security" />
      <sliceName value="meta-security" />
      <label value="meta" />
      <short value="security tags representing the data's owner, vendor, and accessibility" />
      <definition value="data owner: &#xA; &#xA; data vendor: &#xA; &#xA; data access:" />
      <requirements value="/owner &amp; /access are mandatory for all resources in bWell's FHIR Server" />
      <min value="1" />
      <max value="*" />
      <type>
        <code value="Coding" />
      </type>
      <example>
        <label value="example of data owner security tag" />
        <valueCoding>
          <system value="https://www.icanbwell.com/owner" />
          <code value="bwell" />
        </valueCoding>
      </example>
      <example>
        <label value="example of data access security tag" />
        <valueCoding>
          <system value="https://www.icanbwell.com/access" />
          <code value="bwell" />
        </valueCoding>
      </example>
      <example>
        <label value="example of data vendor security tag" />
        <valueCoding>
          <system value="https://www.icanbwell.com/vendor" />
          <code value="bwell" />
        </valueCoding>
      </example>
    </element>
    <element id="Contract.subject">
      <path value="Contract.subject" />
      <label value="subject" />
      <short value="The patient who signed the contract" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-patient" />
      </type>
    </element>
    <element id="Contract.authority">
      <path value="Contract.authority" />
      <label value="authority" />
      <short value="Contract is signed through which organization" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-insurance-company" />
        <targetProfile value="https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-partner-organization" />
        <targetProfile value="https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-healthcare-organization" />
      </type>
    </element>
    <element id="Contract.author">
      <path value="Contract.author" />
      <label value="author" />
      <short value="who owns the contract program." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-patient" />
        <targetProfile value="https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-healthcare-organization" />
        <targetProfile value="https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-partner-organization" />
        <targetProfile value="https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-insurance-company" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Contract.legal">
      <path value="Contract.legal" />
      <mustSupport value="true" />
    </element>
    <element id="Contract.legal.id">
      <path value="Contract.legal.id" />
      <short value="tbd" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Contract.legal.content[x]">
      <path value="Contract.legal.content[x]" />
      <short value="stores the generated pdf contract" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>