<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="corhealth-procedure" />
  <url value="https://corhealth-ontario.ca/fhir/StructureDefinition/corhealth-procedure" />
  <name value="CorHealthProcedure" />
  <title value="CorHealth Procedure" />
  <status value="active" />
  <description value="CorHealth Procedure" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="Procedure" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Procedure" />
  <derivation value="constraint" />
  <differential>
    <element id="Procedure.identifier">
      <path value="Procedure.identifier" />
      <min value="1" />
    </element>
    <element id="Procedure.identifier.system">
      <path value="Procedure.identifier.system" />
      <min value="1" />
      <patternUri value="https://corhealth-ontario.ca/fhir/NamingSystem/procedure-order-id" />
    </element>
    <element id="Procedure.identifier.value">
      <path value="Procedure.identifier.value" />
      <min value="1" />
    </element>
    <element id="Procedure.basedOn">
      <path value="Procedure.basedOn" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://corhealth-ontario.ca/fhir/StructureDefinition/corhealth-servicerequest" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Procedure.status">
      <path value="Procedure.status" />
      <short value="Field ID: 115. Procedure Status: not-done | completed" />
      <mustSupport value="true" />
    </element>
    <element id="Procedure.code">
      <path value="Procedure.code" />
      <short value="Field ID: 114. Procedure" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="https://corhealth-ontario.ca/fhir/ValueSet/CorHealth114ProcedureVS" />
      </binding>
    </element>
    <element id="Procedure.subject">
      <path value="Procedure.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://corhealth-ontario.ca/fhir/StructureDefinition/corhealth-patient" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Procedure.performer">
      <path value="Procedure.performer" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="function" />
        </discriminator>
        <description value="Slice based on function pattern" />
        <rules value="open" />
      </slicing>
      <mustSupport value="true" />
    </element>
    <element id="Procedure.performer.function">
      <path value="Procedure.performer.function" />
      <min value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="https://corhealth-ontario.ca/fhir/ValueSet/CorHealthPerformerRoleVS" />
      </binding>
    </element>
    <element id="Procedure.performer.actor">
      <path value="Procedure.performer.actor" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://corhealth-ontario.ca/fhir/StructureDefinition/corhealth-practitioner" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="Procedure.performer:treating">
      <path value="Procedure.performer" />
      <sliceName value="treating" />
      <short value="Field ID: 157. Treating Health Care Professional" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Procedure.performer:treating.function">
      <path value="Procedure.performer.function" />
      <patternCodeableConcept>
        <coding>
          <system value="https://corhealth-ontario.ca/fhir/CodeSystem/CorHealthPerformerRoleCS" />
          <code value="T1" />
          <display value="Treating Health Care Professional" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Procedure.performer:secondTreating">
      <path value="Procedure.performer" />
      <sliceName value="secondTreating" />
      <short value="Field ID: 158. Second Treating Health Care Professional" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="Procedure.performer:secondTreating.function">
      <path value="Procedure.performer.function" />
      <patternCodeableConcept>
        <coding>
          <system value="https://corhealth-ontario.ca/fhir/CodeSystem/CorHealthPerformerRoleCS" />
          <code value="T2" />
          <display value="Second Treating Health Care Professional" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="Procedure.bodySite">
      <path value="Procedure.bodySite" />
      <short value="Field ID: 116. Access Site" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="https://corhealth-ontario.ca/fhir/ValueSet/CorHealth116AccessSiteVS" />
      </binding>
    </element>
    <element id="Procedure.report">
      <path value="Procedure.report" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://corhealth-ontario.ca/fhir/StructureDefinition/corhealth-diagnosticreport-procedure" />
      </type>
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>