<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="ca-on-mi-profile-diagnosticreport" />
  <url value="http://ontariohealth.ca/fhir/mi/StructureDefinition/ca-on-mi-profile-diagnosticReport" />
  <version value="1.0.0" />
  <name value="MIDiagnosticReport" />
  <title value="MI DiagnosticReport Profile" />
  <status value="active" />
  <date value="2024-05-02T20:59:08.2660252+00:00" />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <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" />
      </binding>
    </element>
    <element id="DiagnosticReport.extension:ext-di-addendum-of">
      <path value="DiagnosticReport.extension" />
      <sliceName value="ext-di-addendum-of" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/diagnosticReport-addendumOf" />
      </type>
      <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: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" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
          <code value="ACSN" />
          <display value="Accession ID" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </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" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v2-0203" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-accession.type.coding.code">
      <path value="DiagnosticReport.identifier.type.coding.code" />
      <min value="1" />
      <fixedCode value="ACSN" />
      <mustSupport value="true" />
    </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" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-placerOrderNumber">
      <path value="DiagnosticReport.identifier" />
      <sliceName value="identifier-placerOrderNumber" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-placerOrderNumber.type">
      <path value="DiagnosticReport.identifier.type" />
      <min value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/v2-0203" />
          <code value="PLAC" />
          <display value="Placer Identifier" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-placerOrderNumber.type.coding">
      <path value="DiagnosticReport.identifier.type.coding" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-placerOrderNumber.type.coding.system">
      <path value="DiagnosticReport.identifier.type.coding.system" />
      <min value="1" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/v2-0203" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.identifier:identifier-placerOrderNumber.type.coding.code">
      <path value="DiagnosticReport.identifier.type.coding.code" />
      <min value="1" />
      <fixedCode value="PLAC" />
      <mustSupport value="true" />
    </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" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.basedOn">
      <path value="DiagnosticReport.basedOn" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/mi/StructureDefinition/ca-on-mi-profile-serviceRequest" />
      </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" />
      <max value="1" />
      <fixedCodeableConcept>
        <coding>
          <system value="http://snomed.info/sct" />
          <code value="394914008" />
          <display value="Radiology" />
        </coding>
      </fixedCodeableConcept>
      <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" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.category.coding.system">
      <path value="DiagnosticReport.category.coding.system" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.category.coding.code">
      <path value="DiagnosticReport.category.coding.code" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.category.coding.display">
      <path value="DiagnosticReport.category.coding.display" />
      <min value="1" />
      <mustSupport value="true" />
    </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" />
      <max value="1" />
    </element>
    <element id="DiagnosticReport.code.coding.system">
      <path value="DiagnosticReport.code.coding.system" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.code.coding.display.extension:translation">
      <path value="DiagnosticReport.code.coding.display.extension" />
      <sliceName value="translation" />
    </element>
    <element id="DiagnosticReport.code.coding.display.extension:translation.extension">
      <path value="DiagnosticReport.code.coding.display.extension.extension" />
      <min value="2" />
    </element>
    <element id="DiagnosticReport.subject">
      <path value="DiagnosticReport.subject" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/mi/StructureDefinition/ca-on-mi-profile-patient" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.subject.reference">
      <path value="DiagnosticReport.subject.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.encounter">
      <path value="DiagnosticReport.encounter" />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-encounter" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.encounter.reference">
      <path value="DiagnosticReport.encounter.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.effective[x]">
      <path value="DiagnosticReport.effective[x]" />
      <min 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" />
      <slicing>
        <discriminator>
          <type value="pattern" />
          <path value="extension.value" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/mi/StructureDefinition/ca-on-mi-profile-practitioner" />
        <targetProfile value="http://ontariohealth.ca/fhir/mi/StructureDefinition/ca-on-mi-profile-practitionerRole" />
        <targetProfile value="http://ontariohealth.ca/fhir/mi/StructureDefinition/ca-on-mi-profile-organization" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer.extension:performerFunction">
      <path value="DiagnosticReport.performer.extension" />
      <sliceName value="performerFunction" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/event-performerFunction" />
      </type>
      <mustSupport value="true" />
      <isModifier value="false" />
    </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" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer:slicePerformer-ReportAuthor">
      <path value="DiagnosticReport.performer" />
      <sliceName value="slicePerformer-ReportAuthor" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="DiagnosticReport.performer:slicePerformer-ReportAuthor.extension">
      <path value="DiagnosticReport.performer.extension" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.performer:slicePerformer-ReportAuthor.extension:performerFunction">
      <path value="DiagnosticReport.performer.extension" />
      <sliceName value="performerFunction" />
      <min value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/event-performerFunction" />
      </type>
      <mustSupport value="true" />
      <isModifier value="false" />
    </element>
    <element id="DiagnosticReport.performer:slicePerformer-ReportAuthor.extension:performerFunction.value[x]">
      <path value="DiagnosticReport.performer.extension.value[x]" />
      <patternCodeableConcept>
        <coding>
          <system value="http://terminology.hl7.org/CodeSystem/v3-ParticipationType" />
          <code value="AUT" />
        </coding>
      </patternCodeableConcept>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer:slicePerformer-ReportAuthor.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:slicePerformer-ReportAuthor.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:slicePerformer-ReportAuthor.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:slicePerformer-ReportAuthor.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:slicePerformer-ReportAuthor.reference">
      <path value="DiagnosticReport.performer.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.resultsInterpreter">
      <path value="DiagnosticReport.resultsInterpreter" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/mi/StructureDefinition/ca-on-mi-profile-practitioner" />
        <targetProfile value="http://ontariohealth.ca/fhir/mi/StructureDefinition/ca-on-mi-profile-practitionerRole" />
        <targetProfile value="http://ontariohealth.ca/fhir/mi/StructureDefinition/ca-on-mi-profile-organization" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.resultsInterpreter.reference">
      <path value="DiagnosticReport.resultsInterpreter.reference" />
      <min value="1" />
      <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/mi/StructureDefinition/ca-on-mi-profile-observation" />
      </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.imagingStudy">
      <path value="DiagnosticReport.imagingStudy" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://ontariohealth.ca/fhir/mi/StructureDefinition/ca-on-mi-profile-imagingStudy" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.imagingStudy.reference">
      <path value="DiagnosticReport.imagingStudy.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.conclusion">
      <path value="DiagnosticReport.conclusion" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.presentedForm">
      <path value="DiagnosticReport.presentedForm" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.presentedForm.contentType">
      <path value="DiagnosticReport.presentedForm.contentType" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <description value="Supported mime types from OH EHR" />
        <valueSet value="http://ontariohealth.ca/fhir/ehr/ValueSet/mime-type" />
      </binding>
    </element>
    <element id="DiagnosticReport.presentedForm.data">
      <path value="DiagnosticReport.presentedForm.data" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>