<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="520e8a06-e028-4993-abf8-893850d1c952" />
  <meta>
    <versionId value="30" />
    <lastUpdated value="2021-10-12T08:28:20.304+00:00" />
  </meta>
  <url value="http://kreftregisteret.no/fhir/StructureDefinition/colonoscopyreport-diagnosticreport" />
  <name value="DiagnosticReport" />
  <title value="Colonoscopy Report Diagnostic Report" />
  <status value="draft" />
  <date value="2021-10-12T08:19:42.6326118Z" />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="no-colonoscopy-report" />
    <name value="Norwegian Colonoscopy Report" />
  </mapping>
  <mapping>
    <identity value="krg-tech-name" />
    <name value="Technical Name KRG" />
  </mapping>
  <kind value="resource" />
  <abstract value="true" />
  <type value="DiagnosticReport" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport" />
  <derivation value="constraint" />
  <differential>
    <element id="DiagnosticReport.code">
      <path value="DiagnosticReport.code" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.code.coding">
      <path value="DiagnosticReport.code.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="DiagnosticReport.code.coding:SNOMED-CT">
      <path value="DiagnosticReport.code.coding" />
      <sliceName value="SNOMED-CT" />
      <min value="1" />
      <max value="1" />
      <patternCoding>
        <system value="http://snomed.info/sct" />
        <code value="73761001" />
      </patternCoding>
    </element>
    <element id="DiagnosticReport.subject">
      <path value="DiagnosticReport.subject" />
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.result">
      <path value="DiagnosticReport.result" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="resolve().code.coding" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="DiagnosticReport.result:BostonBowelPreparationScale">
      <path value="DiagnosticReport.result" />
      <sliceName value="BostonBowelPreparationScale" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://kreftregisteret.no/fhir/StructureDefinition/colonoscopyreport-bostonbowelpreparationscale" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.result:NumberOfLesions">
      <path value="DiagnosticReport.result" />
      <sliceName value="NumberOfLesions" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://kreftregisteret.no/fhir/StructureDefinition/colonoscopyreport-numberoflesions" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.conclusionCode">
      <path value="DiagnosticReport.conclusionCode" />
      <mustSupport value="true" />
      <mapping>
        <identity value="no-colonoscopy-report" />
        <map value="58" />
        <comment value="Hoveddiagnose (ICD-10) (if extension IsMainDiagnosis is true)" />
      </mapping>
      <mapping>
        <identity value="no-colonoscopy-report" />
        <map value="59" />
        <comment value="Bidiagnoser (ICD-10)" />
      </mapping>
      <mapping>
        <identity value="krg-tech-name" />
        <map value="hoveddiagnose_M" />
        <comment value="if extension IsMainDiagnosis is true" />
      </mapping>
      <mapping>
        <identity value="krg-tech-name" />
        <map value="bidiagnoser_M" />
      </mapping>
    </element>
    <element id="DiagnosticReport.conclusionCode.extension">
      <path value="DiagnosticReport.conclusionCode.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="0" />
    </element>
    <element id="DiagnosticReport.conclusionCode.extension:IsMainDiagnosis">
      <path value="DiagnosticReport.conclusionCode.extension" />
      <sliceName value="IsMainDiagnosis" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://kreftregisteret.no/fhir/StructureDefinition/diagnosticreport-conclusion-ismaindiagnosis" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="DiagnosticReport.conclusionCode.coding">
      <path value="DiagnosticReport.conclusionCode.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
      <min value="1" />
    </element>
    <element id="DiagnosticReport.conclusionCode.coding:ICD-10">
      <path value="DiagnosticReport.conclusionCode.coding" />
      <sliceName value="ICD-10" />
      <min value="1" />
      <max value="1" />
      <patternCoding>
        <system value="http://hl7.org/fhir/sid/icd-10" />
      </patternCoding>
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>