<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://telus.com/fhir/patientChart/StructureDefinition/profile-diagnostic-report" />
  <name value="DiagnosticReport" />
  <title value="Diagnostic Report Patient Chart" />
  <status value="draft" />
  <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">
      <path value="DiagnosticReport" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.id">
      <path value="DiagnosticReport.id" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.meta">
      <path value="DiagnosticReport.meta" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.meta.lastUpdated">
      <path value="DiagnosticReport.meta.lastUpdated" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.meta.source">
      <path value="DiagnosticReport.meta.source" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.meta.profile">
      <path value="DiagnosticReport.meta.profile" />
      <comment value="Usage:   Will be determined by each implementation.  May be useful for validating message instnaces against this profile.&#xD;&#xA;&#xD;&#xA;It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time.  The list of profile URLs is a set." />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.text">
      <path value="DiagnosticReport.text" />
      <comment value="Conformance Rule:     This must be formatted, as closely as possible what was presented to the user in the originating system and must include all clinical data.    &#xD;&#xA;&#xD;&#xA;Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a &quot;text blob&quot; or where text is additionally entered raw or narrated and encoded information is added later." />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.extension">
      <path value="DiagnosticReport.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
    </element>
    <element id="DiagnosticReport.extension:DiagnosticReportNote">
      <path value="DiagnosticReport.extension" />
      <sliceName value="DiagnosticReportNote" />
      <definition value="Comments about the Diagnostic Report" />
      <comment value="This is a pre-adoption of an R5 data element&#xD;&#xA;&#xD;&#xA;May include general statements about the diagnostic report, or statements about significant, unexpected or unreliable results values contained within the diagnostic report, or information about its source when relevant to its interpretation." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/5.0/StructureDefinition/extension-DiagnosticReport.note" />
      </type>
      <isModifier value="false" />
    </element>
    <element id="DiagnosticReport.identifier">
      <path value="DiagnosticReport.identifier" />
      <comment value="Usage Note:   This is mandatory for OLIS.  If known this should be populated&#xD;&#xA;&#xD;&#xA;Usually assigned by the Information System of the diagnostic service provider (filler id)." />
    </element>
    <element id="DiagnosticReport.basedOn">
      <path value="DiagnosticReport.basedOn" />
      <comment value="Usage Note:   This is supported for OLIS&#xD;&#xA;&#xD;&#xA;Note: Usually there is one test request for each result, however in some circumstances multiple test requests may be represented using a single test result resource. Note that there are also cases where one request leads to multiple reports." />
    </element>
    <element id="DiagnosticReport.status">
      <path value="DiagnosticReport.status" />
      <comment value="Usage Note:  EMRs will always use a state of &quot;final&quot; for the Patient Chart.&#xD;&#xA;&#xD;&#xA;Note that FHIR strings SHALL NOT exceed 1MB in size" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.category">
      <path value="DiagnosticReport.category" />
      <comment value="Usage Note:   Text may be used when a code is not available.&#xD;&#xA;&#xD;&#xA;Multiple categories are allowed using various categorization schemes.   The level of granularity is defined by the category concepts in the value set. More fine-grained filtering can be performed using the metadata and/or terminology hierarchy in DiagnosticReport.code." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.category.coding">
      <path value="DiagnosticReport.category.coding" />
      <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.text">
      <path value="DiagnosticReport.category.text" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.code">
      <path value="DiagnosticReport.code" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.code.coding">
      <path value="DiagnosticReport.code.coding" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.code.coding.system">
      <path value="DiagnosticReport.code.coding.system" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.code.coding.code">
      <path value="DiagnosticReport.code.coding.code" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.code.coding.display">
      <path value="DiagnosticReport.code.coding.display" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.code.text">
      <path value="DiagnosticReport.code.text" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.subject">
      <path value="DiagnosticReport.subject" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.subject.reference">
      <path value="DiagnosticReport.subject.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.subject.display">
      <path value="DiagnosticReport.subject.display" />
      <comment value="TUsage Note:   This should contain the name of the Patient, which can then be used in narrative&#xD;&#xA;&#xD;&#xA;This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it." />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.encounter">
      <path value="DiagnosticReport.encounter" />
      <comment value="Usage Note:  If data is definitively tied to an encounter in the EMR, this reference should be sent.   If there is no definitive reference, this should not be derived using date or other data points.&#xD;&#xA;&#xD;&#xA;This will typically be the encounter the event occurred within, but some events may be initiated prior to or after the official completion of an encounter  but still be tied to the context of the encounter  (e.g. pre-admission laboratory tests)." />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.effective[x]">
      <path value="DiagnosticReport.effective[x]" />
      <comment value="Usage Note:   This should be populated if known.   Note: this is not supported by OLIS&#xD;&#xA;&#xD;&#xA;If the diagnostic procedure was performed on the patient, this is the time it was performed. If there are specimens, the diagnostically relevant time can be derived from the specimen collection times, but the specimen information is not always available, and the exact relationship between the specimens and the diagnostically relevant time is not always automatic." />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.issued">
      <path value="DiagnosticReport.issued" />
      <comment value="Usage Note:   This is the date that the EMR received the report.&#xD;&#xA;&#xD;&#xA;May be different from the update time of the resource itself, because that is the status of the record (potentially a secondary copy), not the actual release time of the report." />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer">
      <path value="DiagnosticReport.performer" />
      <comment value="Usage Note:   This must be present when known.&#xD;&#xA;Usage Note:   This is supported by OLIS.&#xD;&#xA;&#xD;&#xA;This is not necessarily the source of the atomic data items or the entity that interpreted the results. It is the entity that takes responsibility for the clinical report." />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer.reference">
      <path value="DiagnosticReport.performer.reference" />
      <comment value="Usage:  This is typically used for internal only; for external the use of display is acceptable.&#xD;&#xA;&#xD;&#xA;Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure &quot;/[type]/[id]&quot; then it should be assumed that the reference is to a FHIR RESTful server." />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.performer.display">
      <path value="DiagnosticReport.performer.display" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.specimen">
      <path value="DiagnosticReport.specimen" />
      <comment value="Usage Note:   This is supported by OLIS; not supported in the EMRs today&#xD;&#xA;&#xD;&#xA;If the specimen is sufficiently specified with a code in the test result name, then this additional data may be redundant. If there are multiple specimens, these may be represented per observation or group." />
    </element>
    <element id="DiagnosticReport.result">
      <path value="DiagnosticReport.result" />
      <comment value="Usage note:  In some cases there is only a PDF and/or note&#xD;&#xA;&#xD;&#xA;Observations can contain observations." />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.result.reference">
      <path value="DiagnosticReport.result.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.result.display">
      <path value="DiagnosticReport.result.display" />
      <comment value="Usage Note:   This is a user-friendly textual representation of the result that should be used in the narrative for this resource&#xD;&#xA;&#xD;&#xA;This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it." />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.media">
      <path value="DiagnosticReport.media" />
      <comment value="Usage Note:   This is supported in order to maintain alignment with Core-CA; however there are no Patient Chart use cases where EMR's will send this data as it is not kept locally.   &#xD;&#xA;&#xD;&#xA;Alignment:   Core-CA - supported, 0..*" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.conclusion">
      <path value="DiagnosticReport.conclusion" />
      <comment value="Usage Note:   Future Use.  This is very often not discretely stored in the EMR; it is often part of text.&#xD;&#xA;Usage Note:   This is supported by OLIS&#xD;&#xA; &#xD;&#xA;&#xD;&#xA;Note that FHIR strings SHALL NOT exceed 1MB in size" />
    </element>
    <element id="DiagnosticReport.presentedForm">
      <path value="DiagnosticReport.presentedForm" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.presentedForm.contentType">
      <path value="DiagnosticReport.presentedForm.contentType" />
      <min value="1" />
      <mustSupport value="true" />
    </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" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.presentedForm.url">
      <path value="DiagnosticReport.presentedForm.url" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.presentedForm.size">
      <path value="DiagnosticReport.presentedForm.size" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.presentedForm.hash">
      <path value="DiagnosticReport.presentedForm.hash" />
      <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>