<?xml version="1.0" encoding="UTF-8"?>
<archetype xmlns="http://schemas.openehr.org/v1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <original_language>
    <terminology_id>
      <value>ISO_639-1</value>
    </terminology_id>
    <code_string>en</code_string>
  </original_language>
  <is_controlled>false</is_controlled>
  <description>
    <original_author id="date">2009-05-17</original_author>
    <original_author id="name">Dr Ian McNicoll</original_author>
    <original_author id="organisation">Ocean Informatics</original_author>
    <original_author id="email">ian.mcnicoll@oceaninformatics.com</original_author>
    <lifecycle_state>in_development</lifecycle_state>
    <other_details id="custodian_organisation">Nasjonal IKT</other_details>
    <other_details id="references">Avgrenet fra: Tumour - Surgical resection margins, Draft Archetype [Internet]. openEHR Foundation, openEHR Clinical Knowledge Manager [cited: 2017-02-02]. Available from: http://openehr.org/ckm/#showArchetype_1013.1.355</other_details>
    <other_details id="original_namespace">no.nasjonalikt</other_details>
    <other_details id="original_publisher">Nasjonal IKT</other_details>
    <other_details id="custodian_namespace">no.nasjonalikt</other_details>
    <other_details id="MD5-CAM-1.0.1">61D0613D769DB8B0B3E9867D7476D86D</other_details>
    <other_details id="build_uid">490ab4ef-5cb7-4837-bb96-ebccd47bd6b9</other_details>
    <other_details id="revision">0.0.1-alpha</other_details>
    <details>
      <language>
        <terminology_id>
          <value>ISO_639-1</value>
        </terminology_id>
        <code_string>en</code_string>
      </language>
      <purpose>Details of surgical resection margin involvement of malignant tumours. May be used to report the distance of the tumor from the resection margin or describe scenarios where tumour is present at the resection margin,detailing the length of tumour involvement.</purpose>
      <keywords>malignancy</keywords>
      <keywords>margins</keywords>
      <keywords>tumour</keywords>
      <keywords>cancer</keywords>
      <keywords>resection</keywords>
      <keywords>histopathology</keywords>
      <keywords>biopsy</keywords>
      <use>Normally used within a histopathology archetype.</use>
      <misuse />
      <copyright>© copyright (c) 2009 openEHR Foundation, Nasjonal IKT HF</copyright>
    </details>
  </description>
  <uid>
    <value>defd8167-0698-4391-8d49-24d2c66dd460</value>
  </uid>
  <archetype_id>
    <value>openEHR-EHR-CLUSTER.tumour_resection_margins.v0</value>
  </archetype_id>
  <adl_version>1.4</adl_version>
  <concept>at0000</concept>
  <definition>
    <rm_type_name>CLUSTER</rm_type_name>
    <occurrences>
      <lower_included>true</lower_included>
      <upper_included>true</upper_included>
      <lower_unbounded>false</lower_unbounded>
      <upper_unbounded>false</upper_unbounded>
      <lower>1</lower>
      <upper>1</upper>
    </occurrences>
    <node_id>at0000</node_id>
    <attributes xsi:type="C_MULTIPLE_ATTRIBUTE">
      <rm_attribute_name>items</rm_attribute_name>
      <existence>
        <lower_included>true</lower_included>
        <upper_included>true</upper_included>
        <lower_unbounded>false</lower_unbounded>
        <upper_unbounded>false</upper_unbounded>
        <lower>1</lower>
        <upper>1</upper>
      </existence>
      <children xsi:type="C_COMPLEX_OBJECT">
        <rm_type_name>ELEMENT</rm_type_name>
        <occurrences>
          <lower_included>true</lower_included>
          <upper_included>true</upper_included>
          <lower_unbounded>false</lower_unbounded>
          <upper_unbounded>false</upper_unbounded>
          <lower>0</lower>
          <upper>1</upper>
        </occurrences>
        <node_id>at0018</node_id>
        <attributes xsi:type="C_SINGLE_ATTRIBUTE">
          <rm_attribute_name>value</rm_attribute_name>
          <existence>
            <lower_included>true</lower_included>
            <upper_included>true</upper_included>
            <lower_unbounded>false</lower_unbounded>
            <upper_unbounded>false</upper_unbounded>
            <lower>0</lower>
            <upper>1</upper>
          </existence>
          <children xsi:type="C_COMPLEX_OBJECT">
            <rm_type_name>DV_TEXT</rm_type_name>
            <occurrences>
              <lower_included>true</lower_included>
              <upper_included>true</upper_included>
              <lower_unbounded>false</lower_unbounded>
              <upper_unbounded>false</upper_unbounded>
              <lower>1</lower>
              <upper>1</upper>
            </occurrences>
            <node_id />
          </children>
        </attributes>
      </children>
      <children xsi:type="ARCHETYPE_SLOT">
        <rm_type_name>CLUSTER</rm_type_name>
        <occurrences>
          <lower_included>true</lower_included>
          <lower_unbounded>false</lower_unbounded>
          <upper_unbounded>true</upper_unbounded>
          <lower>0</lower>
        </occurrences>
        <node_id>at0019</node_id>
        <includes>
          <string_expression>archetype_id/value matches {/openEHR-EHR-CLUSTER\.anatomical_location_relative(-[a-zA-Z0-9_]+)*\.v1/}</string_expression>
          <expression xsi:type="EXPR_BINARY_OPERATOR">
            <type>Boolean</type>
            <operator>2007</operator>
            <precedence_overridden>false</precedence_overridden>
            <left_operand xsi:type="EXPR_LEAF">
              <type>String</type>
              <item xsi:type="xsd:string">archetype_id/value</item>
              <reference_type>attribute</reference_type>
            </left_operand>
            <right_operand xsi:type="EXPR_LEAF">
              <type>C_STRING</type>
              <item xsi:type="C_STRING">
                <pattern>openEHR-EHR-CLUSTER\.anatomical_location_relative(-[a-zA-Z0-9_]+)*\.v1</pattern>
              </item>
              <reference_type>constraint</reference_type>
            </right_operand>
          </expression>
        </includes>
      </children>
      <children xsi:type="C_COMPLEX_OBJECT">
        <rm_type_name>ELEMENT</rm_type_name>
        <occurrences>
          <lower_included>true</lower_included>
          <upper_included>true</upper_included>
          <lower_unbounded>false</lower_unbounded>
          <upper_unbounded>false</upper_unbounded>
          <lower>0</lower>
          <upper>1</upper>
        </occurrences>
        <node_id>at0001</node_id>
        <attributes xsi:type="C_SINGLE_ATTRIBUTE">
          <rm_attribute_name>value</rm_attribute_name>
          <existence>
            <lower_included>true</lower_included>
            <upper_included>true</upper_included>
            <lower_unbounded>false</lower_unbounded>
            <upper_unbounded>false</upper_unbounded>
            <lower>0</lower>
            <upper>1</upper>
          </existence>
          <children xsi:type="C_COMPLEX_OBJECT">
            <rm_type_name>DV_CODED_TEXT</rm_type_name>
            <occurrences>
              <lower_included>true</lower_included>
              <upper_included>true</upper_included>
              <lower_unbounded>false</lower_unbounded>
              <upper_unbounded>false</upper_unbounded>
              <lower>1</lower>
              <upper>1</upper>
            </occurrences>
            <node_id />
            <attributes xsi:type="C_SINGLE_ATTRIBUTE">
              <rm_attribute_name>defining_code</rm_attribute_name>
              <existence>
                <lower_included>true</lower_included>
                <upper_included>true</upper_included>
                <lower_unbounded>false</lower_unbounded>
                <upper_unbounded>false</upper_unbounded>
                <lower>1</lower>
                <upper>1</upper>
              </existence>
              <children xsi:type="C_CODE_PHRASE">
                <rm_type_name>CODE_PHRASE</rm_type_name>
                <occurrences>
                  <lower_included>true</lower_included>
                  <upper_included>true</upper_included>
                  <lower_unbounded>false</lower_unbounded>
                  <upper_unbounded>false</upper_unbounded>
                  <lower>1</lower>
                  <upper>1</upper>
                </occurrences>
                <node_id />
                <terminology_id>
                  <value>local</value>
                </terminology_id>
                <code_list>at0014</code_list>
                <code_list>at0015</code_list>
                <code_list>at0017</code_list>
                <code_list>at0016</code_list>
              </children>
            </attributes>
          </children>
        </attributes>
      </children>
      <children xsi:type="C_COMPLEX_OBJECT">
        <rm_type_name>ELEMENT</rm_type_name>
        <occurrences>
          <lower_included>true</lower_included>
          <upper_included>true</upper_included>
          <lower_unbounded>false</lower_unbounded>
          <upper_unbounded>false</upper_unbounded>
          <lower>0</lower>
          <upper>1</upper>
        </occurrences>
        <node_id>at0009</node_id>
        <attributes xsi:type="C_SINGLE_ATTRIBUTE">
          <rm_attribute_name>value</rm_attribute_name>
          <existence>
            <lower_included>true</lower_included>
            <upper_included>true</upper_included>
            <lower_unbounded>false</lower_unbounded>
            <upper_unbounded>false</upper_unbounded>
            <lower>0</lower>
            <upper>1</upper>
          </existence>
          <children xsi:type="C_DV_QUANTITY">
            <rm_type_name>DV_QUANTITY</rm_type_name>
            <occurrences>
              <lower_included>true</lower_included>
              <upper_included>true</upper_included>
              <lower_unbounded>false</lower_unbounded>
              <upper_unbounded>false</upper_unbounded>
              <lower>1</lower>
              <upper>1</upper>
            </occurrences>
            <node_id />
            <property>
              <terminology_id>
                <value>openehr</value>
              </terminology_id>
              <code_string>122</code_string>
            </property>
            <list>
              <magnitude>
                <lower_included>true</lower_included>
                <lower_unbounded>false</lower_unbounded>
                <upper_unbounded>true</upper_unbounded>
                <lower>0.0</lower>
              </magnitude>
              <units>mm</units>
            </list>
          </children>
        </attributes>
      </children>
      <children xsi:type="C_COMPLEX_OBJECT">
        <rm_type_name>CLUSTER</rm_type_name>
        <occurrences>
          <lower_included>true</lower_included>
          <upper_included>true</upper_included>
          <lower_unbounded>false</lower_unbounded>
          <upper_unbounded>false</upper_unbounded>
          <lower>0</lower>
          <upper>1</upper>
        </occurrences>
        <node_id>at0006</node_id>
        <attributes xsi:type="C_MULTIPLE_ATTRIBUTE">
          <rm_attribute_name>items</rm_attribute_name>
          <existence>
            <lower_included>true</lower_included>
            <upper_included>true</upper_included>
            <lower_unbounded>false</lower_unbounded>
            <upper_unbounded>false</upper_unbounded>
            <lower>1</lower>
            <upper>1</upper>
          </existence>
          <children xsi:type="C_COMPLEX_OBJECT">
            <rm_type_name>ELEMENT</rm_type_name>
            <occurrences>
              <lower_included>true</lower_included>
              <upper_included>true</upper_included>
              <lower_unbounded>false</lower_unbounded>
              <upper_unbounded>false</upper_unbounded>
              <lower>0</lower>
              <upper>1</upper>
            </occurrences>
            <node_id>at0007</node_id>
            <attributes xsi:type="C_SINGLE_ATTRIBUTE">
              <rm_attribute_name>value</rm_attribute_name>
              <existence>
                <lower_included>true</lower_included>
                <upper_included>true</upper_included>
                <lower_unbounded>false</lower_unbounded>
                <upper_unbounded>false</upper_unbounded>
                <lower>0</lower>
                <upper>1</upper>
              </existence>
              <children xsi:type="C_DV_QUANTITY">
                <rm_type_name>DV_QUANTITY</rm_type_name>
                <occurrences>
                  <lower_included>true</lower_included>
                  <upper_included>true</upper_included>
                  <lower_unbounded>false</lower_unbounded>
                  <upper_unbounded>false</upper_unbounded>
                  <lower>1</lower>
                  <upper>1</upper>
                </occurrences>
                <node_id />
                <property>
                  <terminology_id>
                    <value>openehr</value>
                  </terminology_id>
                  <code_string>122</code_string>
                </property>
                <list>
                  <magnitude>
                    <lower_included>true</lower_included>
                    <lower_unbounded>false</lower_unbounded>
                    <upper_unbounded>true</upper_unbounded>
                    <lower>0.0</lower>
                  </magnitude>
                  <units>mm</units>
                </list>
              </children>
            </attributes>
          </children>
          <children xsi:type="C_COMPLEX_OBJECT">
            <rm_type_name>ELEMENT</rm_type_name>
            <occurrences>
              <lower_included>true</lower_included>
              <upper_included>true</upper_included>
              <lower_unbounded>false</lower_unbounded>
              <upper_unbounded>false</upper_unbounded>
              <lower>0</lower>
              <upper>1</upper>
            </occurrences>
            <node_id>at0020</node_id>
            <attributes xsi:type="C_SINGLE_ATTRIBUTE">
              <rm_attribute_name>value</rm_attribute_name>
              <existence>
                <lower_included>true</lower_included>
                <upper_included>true</upper_included>
                <lower_unbounded>false</lower_unbounded>
                <upper_unbounded>false</upper_unbounded>
                <lower>0</lower>
                <upper>1</upper>
              </existence>
              <children xsi:type="C_COMPLEX_OBJECT">
                <rm_type_name>DV_TEXT</rm_type_name>
                <occurrences>
                  <lower_included>true</lower_included>
                  <upper_included>true</upper_included>
                  <lower_unbounded>false</lower_unbounded>
                  <upper_unbounded>false</upper_unbounded>
                  <lower>1</lower>
                  <upper>1</upper>
                </occurrences>
                <node_id />
              </children>
            </attributes>
          </children>
          <cardinality>
            <is_ordered>false</is_ordered>
            <is_unique>false</is_unique>
            <interval>
              <lower_included>true</lower_included>
              <lower_unbounded>false</lower_unbounded>
              <upper_unbounded>true</upper_unbounded>
              <lower>1</lower>
            </interval>
          </cardinality>
        </attributes>
      </children>
      <children xsi:type="C_COMPLEX_OBJECT">
        <rm_type_name>ELEMENT</rm_type_name>
        <occurrences>
          <lower_included>true</lower_included>
          <upper_included>true</upper_included>
          <lower_unbounded>false</lower_unbounded>
          <upper_unbounded>false</upper_unbounded>
          <lower>0</lower>
          <upper>1</upper>
        </occurrences>
        <node_id>at0010</node_id>
        <attributes xsi:type="C_SINGLE_ATTRIBUTE">
          <rm_attribute_name>value</rm_attribute_name>
          <existence>
            <lower_included>true</lower_included>
            <upper_included>true</upper_included>
            <lower_unbounded>false</lower_unbounded>
            <upper_unbounded>false</upper_unbounded>
            <lower>0</lower>
            <upper>1</upper>
          </existence>
          <children xsi:type="C_COMPLEX_OBJECT">
            <rm_type_name>DV_TEXT</rm_type_name>
            <occurrences>
              <lower_included>true</lower_included>
              <upper_included>true</upper_included>
              <lower_unbounded>false</lower_unbounded>
              <upper_unbounded>false</upper_unbounded>
              <lower>1</lower>
              <upper>1</upper>
            </occurrences>
            <node_id />
          </children>
        </attributes>
      </children>
      <cardinality>
        <is_ordered>false</is_ordered>
        <is_unique>false</is_unique>
        <interval>
          <lower_included>true</lower_included>
          <lower_unbounded>false</lower_unbounded>
          <upper_unbounded>true</upper_unbounded>
          <lower>1</lower>
        </interval>
      </cardinality>
    </attributes>
  </definition>
  <ontology>
    <term_definitions language="en">
      <items code="at0000">
        <items id="text">Tumour - Surgical resection margins</items>
        <items id="description">Details of tumour involvement at margins of surgical resections/biopsies.</items>
      </items>
      <items code="at0001">
        <items id="text">Marginal involvement</items>
        <items id="description">Evidence of tumour at a surgical resection margin.</items>
      </items>
      <items code="at0006">
        <items id="text">Tumour present</items>
        <items id="description">Details where tumour is present at the surgical resection margin.</items>
      </items>
      <items code="at0007">
        <items id="text">Maximum linear involvement</items>
        <items id="description">When tumour is present at surgical resection margin, the maximal length of involvement.</items>
      </items>
      <items code="at0009">
        <items id="text">Distance from resection margin</items>
        <items id="description">The distance from tumour to the  surgical resection margin.</items>
      </items>
      <items code="at0010">
        <items id="text">Description</items>
        <items id="description">A text description of  tumour involvement at the surgical resection margin.</items>
      </items>
      <items code="at0014">
        <items id="text">Present</items>
        <items id="description">Ttumour is present at the surgical resection margin.</items>
      </items>
      <items code="at0015">
        <items id="text">Absent</items>
        <items id="description">Tumour is absent from the surgical resection margin.</items>
      </items>
      <items code="at0016">
        <items id="text">Indeterminate</items>
        <items id="description">Presence of tumour at surgical resection margins has not been determined.</items>
      </items>
      <items code="at0017">
        <items id="text">Equivocal</items>
        <items id="description">Presence of tumour at the surgical resection margin is equivocal.</items>
      </items>
      <items code="at0018">
        <items id="text">Margin name</items>
        <items id="description">The name of the margin being described e.g. Deep margin, Vascular margin, Bronchial margin, Longitudinal margin.</items>
      </items>
      <items code="at0019">
        <items id="text">Margin location</items>
        <items id="description">The location of the margin being described.</items>
      </items>
      <items code="at0020">
        <items id="text">Nature of involvement</items>
        <items id="description">The nature of involvement of the tumour with the surgical margin.</items>
      </items>
    </term_definitions>
  </ontology>
</archetype>
