<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="profile-diagnosticreport" />
  <url value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-diagnosticreport" />
  <version value="1.0.2" />
  <name value="DiagnosticReportProfile" />
  <title value="DiagnosticReport Profile for Laboratory Results Reporting" />
  <status value="draft" />
  <date value="2026-01-09" />
  <publisher value="HL7 Canada - FHIR Implementation Work Group" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="https://infocentral.infoway-inforoute.ca/en/collaboration/wg/fhir-implementations" />
    </telecom>
  </contact>
  <description value="Proposed constraints on the DiagnosticReport resource for the minimal set of data to query and retrieve diagnostic reports associated with laboratory and other results" />
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166" />
      <code value="CA" />
    </coding>
  </jurisdiction>
  <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">
      <path value="DiagnosticReport" />
      <short value="DiagnosticReport Profile" />
      <definition value="Diagnostic Report Profile is based upon the core FHIR DiagnosticReport resource and created to meet the Laboratory test(s) and Laboratory value(s)/result(s) requirements." />
    </element>
    <element id="DiagnosticReport.extension:note">
      <path value="DiagnosticReport.extension" />
      <sliceName value="note" />
      <comment value="This extension is used to pre-adopt the DiagnosticReport.note element that was introduced in FHIR R5. This was done to socialize a standardized method for conveying notes that apply to the entirety of a diagnostic report as is seen in some Canadian implementations (e.g., OLIS). Before using this extension in your implementation, consider if its fit-for-purpose/fit-for-use applicable for your needs. Users are encouraged to review the https://build.fhir.org/versions.html#extensions." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/5.0/StructureDefinition/extension-DiagnosticReport.note" />
      </type>
    </element>
    <element id="DiagnosticReport.category">
      <path value="DiagnosticReport.category" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="DiagnosticReport.category:LabResult">
      <path value="DiagnosticReport.category" />
      <sliceName value="LabResult" />
      <definition value="A code that classifies the Laboratory test(s) and Laboratory result(s). This is used for searching, sorting and display purposes." />
      <comment value="Multiple categories are allowed using various categorization schemes but at least one SHALL come from the FHIR defined value set that includes codes from HL7v2 Table 0074" />
      <type>
        <code value="CodeableConcept" />
      </type>
    </element>
    <element id="DiagnosticReport.category:LabResult.coding.system">
      <path value="DiagnosticReport.category.coding.system" />
      <min value="1" />
      <patternUri value="http://terminology.hl7.org/CodeSystem/v2-0074" />
    </element>
    <element id="DiagnosticReport.code">
      <path value="DiagnosticReport.code" />
      <binding>
        <strength value="preferred" />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/pCLOCD" />
      </binding>
    </element>
    <element id="DiagnosticReport.code.coding">
      <path value="DiagnosticReport.code.coding" />
    </element>
    <element id="DiagnosticReport.code.coding.system">
      <path value="DiagnosticReport.code.coding.system" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.code.coding.code">
      <path value="DiagnosticReport.code.coding.code" />
      <min value="1" />
    </element>
    <element id="DiagnosticReport.subject">
      <path value="DiagnosticReport.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-patient" />
        <targetProfile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-device" />
        <targetProfile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-location" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Group" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" />
      </type>
    </element>
    <element id="DiagnosticReport.encounter">
      <path value="DiagnosticReport.encounter" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-encounter" />
      </type>
    </element>
    <element id="DiagnosticReport.effective[x]">
      <path value="DiagnosticReport.effective[x]" />
      <type>
        <code value="dateTime" />
      </type>
      <type>
        <code value="Period" />
      </type>
    </element>
    <element id="DiagnosticReport.performer">
      <path value="DiagnosticReport.performer" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-practitioner" />
        <targetProfile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-practitionerrole" />
        <targetProfile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-organization" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/CareTeam" />
      </type>
    </element>
    <element id="DiagnosticReport.resultsInterpreter">
      <path value="DiagnosticReport.resultsInterpreter" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-practitioner" />
        <targetProfile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-practitionerrole" />
        <targetProfile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-organization" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/CareTeam" />
      </type>
    </element>
    <element id="DiagnosticReport.result">
      <path value="DiagnosticReport.result" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-observation-results" />
        <targetProfile value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-observation" />
      </type>
    </element>
    <element id="DiagnosticReport.conclusionCode">
      <path value="DiagnosticReport.conclusionCode" />
      <short value="CHI identification of the condition, problem or diagnosis" />
      <definition value="The code that represents relevant clinical problems, conditions, diagnoses, symptoms, findings and complaints taken from [CHI Health Concern Code](https://fhir.infoway-inforoute.ca/ValueSet/healthconcerncode)" />
      <comment value="The binding strength of this element is [Example](https://www.hl7.org/fhir/terminologies.html#strength), meaning that the Canada Health Infoway Health Concern Code value set provides examples of the types of concepts intended to be included" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <strength value="example" />
        <description value="Represents the patient's relevant clinical problems, conditions, diagnoses, symptoms, findings and complaints, as interpreted by the provider." />
        <valueSet value="https://fhir.infoway-inforoute.ca/ValueSet/healthconcerncode" />
      </binding>
    </element>
  </differential>
</StructureDefinition>