<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="HVOContractTransactionBundle" />
  <url value="http://electronichealth.se/fhir/hvo/StructureDefinition/HVOContractTransactionBundle" />
  <version value="0.1.0" />
  <name value="HVOContractTransactionBundle" />
  <title value="HVOContract transaction Bundle" />
  <status value="draft" />
  <description value="HVO profile for Bundle consisting of a HVOContract with related resources to use for a transaction" />
  <fhirVersion value="5.0.0" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Bundle" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Bundle" />
  <derivation value="constraint" />
  <differential>
    <element id="Bundle.type">
      <path value="Bundle.type" />
      <fixedCode value="transaction" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry">
      <path value="Bundle.entry" />
      <slicing>
        <discriminator>
          <type value="profile" />
          <path value="resource" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
      <min value="2" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOContract">
      <path value="Bundle.entry" />
      <sliceName value="HVOContract" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOContract.fullUrl">
      <path value="Bundle.entry.fullUrl" />
      <short value="Temporary ID when creating a HVOContract for other resources in the Bundle to reference" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOContract.resource">
      <path value="Bundle.entry.resource" />
      <min value="1" />
      <type>
        <code value="Contract" />
        <profile value="http://electronichealth.se/fhir/hvo/StructureDefinition/HVOContract" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOContract.resource.id">
      <path value="Bundle.entry.resource.id" />
      <short value="Logical ID of resource to use when updating it" />
    </element>
    <element id="Bundle.entry:HVOContract.request">
      <path value="Bundle.entry.request" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOContract.request.method">
      <path value="Bundle.entry.request.method" />
      <short value="PUT | POST" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOContract.request.url">
      <path value="Bundle.entry.request.url" />
      <fixedUri value="Contract" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOOrganizationAffiliation">
      <path value="Bundle.entry" />
      <sliceName value="HVOOrganizationAffiliation" />
      <min value="1" />
      <max value="*" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOOrganizationAffiliation.fullUrl">
      <path value="Bundle.entry.fullUrl" />
      <short value="Temporary ID when creating a HVOOrganizationAffiliation for other resources in the Bundle to reference" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOOrganizationAffiliation.resource">
      <path value="Bundle.entry.resource" />
      <min value="1" />
      <type>
        <code value="OrganizationAffiliation" />
        <profile value="http://electronichealth.se/fhir/hvo/StructureDefinition/HVOOrganizationAffiliation" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOOrganizationAffiliation.resource.id">
      <path value="Bundle.entry.resource.id" />
      <short value="Logical ID of resource to use when updating it" />
    </element>
    <element id="Bundle.entry:HVOOrganizationAffiliation.request">
      <path value="Bundle.entry.request" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOOrganizationAffiliation.request.method">
      <path value="Bundle.entry.request.method" />
      <short value="PUT | POST" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOOrganizationAffiliation.request.url">
      <path value="Bundle.entry.request.url" />
      <fixedUri value="OrganizationAffiliation" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOService">
      <path value="Bundle.entry" />
      <sliceName value="HVOService" />
      <min value="0" />
      <max value="*" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOService.fullUrl">
      <path value="Bundle.entry.fullUrl" />
      <short value="Temporary ID when creating a HVOService for other resources in the Bundle to reference" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOService.resource">
      <path value="Bundle.entry.resource" />
      <min value="1" />
      <type>
        <code value="HealthcareService" />
        <profile value="http://electronichealth.se/fhir/hvo/StructureDefinition/HVOService" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOService.resource.id">
      <path value="Bundle.entry.resource.id" />
      <short value="Logical ID of resource to use when updating it" />
    </element>
    <element id="Bundle.entry:HVOService.request">
      <path value="Bundle.entry.request" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOService.request.method">
      <path value="Bundle.entry.request.method" />
      <short value="PUT | POST" />
      <mustSupport value="true" />
    </element>
    <element id="Bundle.entry:HVOService.request.url">
      <path value="Bundle.entry.request.url" />
      <fixedUri value="HealthcareService" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>