<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-diagnosticReport-submission" />
  <url value="http://ontariohealth.ca/fhir/ocre/StructureDefinition/profile-diagnosticReport-submission" />
  <version value="1.0.0-Ballot" />
  <name value="DiagnosticReportOCRESubmission" />
  <title value="OCRE DiagnosticReport Profile (Submission)" />
  <status value="active" />
  <description value="OCRE DiagnosticReport Profile (Submission)" />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="DiagnosticReport" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport" />
  <derivation value="constraint" />
  <differential>
    <element id="DiagnosticReport.language">
      <path value="DiagnosticReport.language" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSet value="http://hl7.org/fhir/ValueSet/languages" />
      </binding>
    </element>
    <element id="DiagnosticReport.extension">
      <path value="DiagnosticReport.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
    </element>
    <element id="DiagnosticReport.extension:ext-di-addendum-of">
      <path value="DiagnosticReport.extension" />
      <sliceName value="ext-di-addendum-of" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-addendumOf" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.extension:copiedParticipants">
      <path value="DiagnosticReport.extension" />
      <sliceName value="copiedParticipants" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Extension" />
        <profile value="http://ontariohealth.ca/StructureDefinition/oh-ehr-copied-participants-EXT" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.extension:Recipients">
      <path value="DiagnosticReport.extension" />
      <sliceName value="Recipients" />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Extension" />
        <profile value="http://ontariohealth.ca/fhir/ehr/StructureDefinition/ext-recipient" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.extension:Recipients.value[x].identifier">
      <path value="DiagnosticReport.extension.value[x].identifier" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier">
      <path value="DiagnosticReport.identifier" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="type" />
        </discriminator>
        <description value="must contain one repetition of an accession number." />
        <rules value="open" />
      </slicing>
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier.type">
      <path value="DiagnosticReport.identifier.type" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier.type.coding">
      <path value="DiagnosticReport.identifier.type.coding" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier.type.coding.system">
      <path value="DiagnosticReport.identifier.type.coding.system" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier.type.coding.code">
      <path value="DiagnosticReport.identifier.type.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier.value">
      <path value="DiagnosticReport.identifier.value" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-accession">
      <path value="DiagnosticReport.identifier" />
      <sliceName value="identifier-accession" />
      <short value="Filler/Accession ID" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-accession.type">
      <path value="DiagnosticReport.identifier.type" />
      <min value="1" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
          <code value="ACSN" />
          <display value="Accession ID" />
        </coding>
      </fixedCodeableConcept>
    </element>
    <element id="DiagnosticReport.identifier:identifier-accession.type.coding">
      <path value="DiagnosticReport.identifier.type.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-accession.type.coding.system">
      <path value="DiagnosticReport.identifier.type.coding.system" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-accession.type.coding.code">
      <path value="DiagnosticReport.identifier.type.coding.code" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-accession.type.coding.display">
      <path value="DiagnosticReport.identifier.type.coding.display" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-accession.system">
      <path value="DiagnosticReport.identifier.system" />
      <comment value="MI uses source organization specific URIs for this field." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-accession.value">
      <path value="DiagnosticReport.identifier.value" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-placerOrderNumber">
      <path value="DiagnosticReport.identifier" />
      <sliceName value="identifier-placerOrderNumber" />
      <min value="0" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-placerOrderNumber.type">
      <path value="DiagnosticReport.identifier.type" />
      <min value="1" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
          <code value="PLAC" />
          <display value="Placer Identifier" />
        </coding>
      </fixedCodeableConcept>
    </element>
    <element id="DiagnosticReport.identifier:identifier-placerOrderNumber.type.coding">
      <path value="DiagnosticReport.identifier.type.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-placerOrderNumber.type.coding.system">
      <path value="DiagnosticReport.identifier.type.coding.system" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-placerOrderNumber.type.coding.code">
      <path value="DiagnosticReport.identifier.type.coding.code" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-placerOrderNumber.type.coding.display">
      <path value="DiagnosticReport.identifier.type.coding.display" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-placerOrderNumber.system">
      <path value="DiagnosticReport.identifier.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-placerOrderNumber.value">
      <path value="DiagnosticReport.identifier.value" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.basedOn">
      <path value="DiagnosticReport.basedOn" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/ocre/StructureDefinition/profile-serviceRequest-submission" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.basedOn.reference">
      <path value="DiagnosticReport.basedOn.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.status">
      <path value="DiagnosticReport.status" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.category">
      <path value="DiagnosticReport.category" />
      <min value="1" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://ontariohealth.ca/fhir/ehr/StructureDefinition/CodeableConcept-oh-ehr" />
      </type>
      <mustSupport value="true" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://ontariohealth.ca/fhir/ehr/ValueSet/procedure-service-type" />
      </binding>
    </element>
    <element id="DiagnosticReport.category.coding">
      <path value="DiagnosticReport.category.coding" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.category.coding.system">
      <path value="DiagnosticReport.category.coding.system" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.code">
      <path value="DiagnosticReport.code" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://ontariohealth.ca/fhir/ehr/StructureDefinition/CodeableConcept-oh-ehr" />
      </type>
      <mustSupport value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding">
          <extension url="purpose">
            <valueCode value="extensible" />
          </extension>
          <extension url="valueSet">
            <valueCanonical value="http://ontariohealth.ca/fhir/ehr/ValueSet/local-imaging-procedure-code" />
          </extension>
          <extension url="documentation">
            <valueMarkdown value="This value set contains example local procedure codes contributed by sites to DIRs in HL7v2 OBR-4 to identify the procedure of the MI order or MI report." />
          </extension>
          <extension url="key">
            <valueId value="imagingProcedureCode" />
          </extension>
        </extension>
        <strength value="extensible" />
        <valueSet value="http://ontariohealth.ca/fhir/ehr/ValueSet/diagnostic-report-code" />
      </binding>
    </element>
    <element id="DiagnosticReport.code.coding">
      <path value="DiagnosticReport.code.coding" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.code.coding.system">
      <path value="DiagnosticReport.code.coding.system" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.subject">
      <path value="DiagnosticReport.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/ocre/StructureDefinition/profile-patient-submission" />
      </type>
    </element>
    <element id="DiagnosticReport.encounter">
      <path value="DiagnosticReport.encounter" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/ocre/StructureDefinition/profile-encounter-submission" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.encounter.reference">
      <path value="DiagnosticReport.encounter.reference" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.effective[x]">
      <path value="DiagnosticReport.effective[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
      <min value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.effective[x]:effectiveDateTime">
      <path value="DiagnosticReport.effective[x]" />
      <sliceName value="effectiveDateTime" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.issued">
      <path value="DiagnosticReport.issued" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer">
      <path value="DiagnosticReport.performer" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/ocre/StructureDefinition/profile-practitionerRole-submission" />
        <targetProfile value="http://ontariohealth.ca/fhir/ocre/StructureDefinition/profile-practitioner-submission" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer.extension:performerFunction">
      <path value="DiagnosticReport.performer.extension" />
      <sliceName value="performerFunction" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/event-performerFunction" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer.extension:performerFunction.value[x]">
      <path value="DiagnosticReport.performer.extension.value[x]" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer.extension:performerFunction.value[x].coding">
      <path value="DiagnosticReport.performer.extension.value[x].coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer.extension:performerFunction.value[x].coding.system">
      <path value="DiagnosticReport.performer.extension.value[x].coding.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer.extension:performerFunction.value[x].coding.code">
      <path value="DiagnosticReport.performer.extension.value[x].coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer.extension:performerFunction.value[x].coding.display">
      <path value="DiagnosticReport.performer.extension.value[x].coding.display" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer.reference">
      <path value="DiagnosticReport.performer.reference" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.resultsInterpreter">
      <path value="DiagnosticReport.resultsInterpreter" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/ocre/StructureDefinition/profile-practitionerRole-submission" />
        <targetProfile value="http://ontariohealth.ca/fhir/ocre/StructureDefinition/profile-practitioner-submission" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.resultsInterpreter.reference">
      <path value="DiagnosticReport.resultsInterpreter.reference" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.result">
      <path value="DiagnosticReport.result" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-observation-imaging" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.result.reference">
      <path value="DiagnosticReport.result.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.conclusion">
      <path value="DiagnosticReport.conclusion" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.conclusionCode">
      <path value="DiagnosticReport.conclusionCode" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://ontariohealth.ca/fhir/ehr/StructureDefinition/CodeableConcept-oh-ehr" />
      </type>
      <mustSupport value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding">
          <extension url="purpose">
            <valueCode value="candidate" />
          </extension>
          <extension url="valueSet">
            <valueCanonical value="http://fhir.infoway-inforoute.ca/io/cacore/ValueSet/ICD9CM" />
          </extension>
          <extension url="documentation">
            <valueMarkdown value="Any code from ICD-9 CM." />
          </extension>
          <extension url="key">
            <valueId value="icd9cmBinding" />
          </extension>
        </extension>
        <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding">
          <extension url="purpose">
            <valueCode value="candidate" />
          </extension>
          <extension url="valueSet">
            <valueCanonical value="http://fhir.infoway-inforoute.ca/io/cacore/ValueSet/ICD10CA" />
          </extension>
          <extension url="documentation">
            <valueMarkdown value="Any Code from ICD-10 CA." />
          </extension>
          <extension url="key">
            <valueId value="icd10caBinding" />
          </extension>
        </extension>
        <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding">
          <extension url="purpose">
            <valueCode value="candidate" />
          </extension>
          <extension url="valueSet">
            <valueCanonical value="http://hl7.org/fhir/uv/ips/ValueSet/absent-or-unknown-problems-uv-ips" />
          </extension>
          <extension url="documentation">
            <valueMarkdown value="Absent or Unknown Problems" />
          </extension>
          <extension url="key">
            <valueId value="absentUnknownProblemsIPS" />
          </extension>
        </extension>
        <strength value="preferred" />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/clinicalfindingcode" />
      </binding>
    </element>
    <element id="DiagnosticReport.presentedForm">
      <path value="DiagnosticReport.presentedForm" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.presentedForm.contentType">
      <path value="DiagnosticReport.presentedForm.contentType" />
      <min value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <description value="Supported mime types from OH EHR" />
        <valueSet value="http://ontariohealth.ca/fhir/ocre/ValueSet/mime-type" />
      </binding>
    </element>
    <element id="DiagnosticReport.presentedForm.language">
      <path value="DiagnosticReport.presentedForm.language" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.presentedForm.data">
      <path value="DiagnosticReport.presentedForm.data" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.presentedForm.data.extension">
      <path value="DiagnosticReport.presentedForm.data.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="DiagnosticReport.presentedForm.data.extension:ext-attachment-metadata">
      <path value="DiagnosticReport.presentedForm.data.extension" />
      <sliceName value="ext-attachment-metadata" />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://ontariohealth.ca/fhir/ehr/StructureDefinition/ext-attachment-metadata" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.presentedForm.title">
      <path value="DiagnosticReport.presentedForm.title" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.presentedForm.creation">
      <path value="DiagnosticReport.presentedForm.creation" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>