<?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">2010-03-07</original_author>
    <original_author id="name">Heather Leslie</original_author>
    <original_author id="organisation">Atomica Informatics</original_author>
    <original_author id="email">heather.leslie@atomicainformatics.com</original_author>
    <lifecycle_state>in_development</lifecycle_state>
    <other_details id="licence">This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/.</other_details>
    <other_details id="custodian_organisation">openEHR Foundation</other_details>
    <other_details id="references" />
    <other_details id="original_namespace">org.openehr</other_details>
    <other_details id="original_publisher">openEHR Foundation</other_details>
    <other_details id="custodian_namespace">org.openehr</other_details>
    <other_details id="MD5-CAM-1.0.1">7DAA69B9A4F026B57C71629C1B49D260</other_details>
    <other_details id="build_uid">cac8073d-4bf0-45b2-9dc8-39829125c1e5</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>To provide an example framework for modelling a referral within a template.</purpose>
      <keywords>referral</keywords>
      <keywords>request</keywords>
      <use>Use to provide an example framework for modelling a referral within a template.&#xD;
&#xD;
This archetype is intended to be nested within the COMPOSITION.request or any relevant COMPOSITION archetype.</use>
      <misuse />
      <copyright>© openEHR Foundation</copyright>
    </details>
  </description>
  <uid>
    <value>839ab12c-eb0b-310a-86a4-bd4931c45211</value>
  </uid>
  <archetype_id>
    <value>openEHR-EHR-SECTION.referral_details.v0</value>
  </archetype_id>
  <adl_version>1.4</adl_version>
  <concept>at0000</concept>
  <definition>
    <rm_type_name>SECTION</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>0</lower>
        <upper>1</upper>
      </existence>
      <children xsi:type="ARCHETYPE_SLOT">
        <rm_type_name>INSTRUCTION</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>at0001</node_id>
        <includes>
          <string_expression>archetype_id/value matches {/openEHR-EHR-INSTRUCTION\.service_request\.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-INSTRUCTION\.service_request\.v1</pattern>
              </item>
              <reference_type>constraint</reference_type>
            </right_operand>
          </expression>
        </includes>
      </children>
      <children xsi:type="ARCHETYPE_SLOT">
        <rm_type_name>ENTRY</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>at0002</node_id>
        <includes>
          <string_expression>archetype_id/value matches {/openEHR-EHR-EVALUATION\.clinical_synopsis(-[a-zA-Z0-9_]+)*\.v1|openEHR-EHR-OBSERVATION\.story(-[a-zA-Z0-9_]+)*\.v1|openEHR-EHR-OBSERVATION\.exam(-[a-zA-Z0-9_]+)*\.v1|openEHR-EHR-OBSERVATION\.imaging_exam_result(-[a-zA-Z0-9_]+)*\.v0|openEHR-EHR-OBSERVATION\.laboratory_test_result(-[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-EVALUATION\.clinical_synopsis(-[a-zA-Z0-9_]+)*\.v1|openEHR-EHR-OBSERVATION\.story(-[a-zA-Z0-9_]+)*\.v1|openEHR-EHR-OBSERVATION\.exam(-[a-zA-Z0-9_]+)*\.v1|openEHR-EHR-OBSERVATION\.imaging_exam_result(-[a-zA-Z0-9_]+)*\.v0|openEHR-EHR-OBSERVATION\.laboratory_test_result(-[a-zA-Z0-9_]+)*\.v1</pattern>
              </item>
              <reference_type>constraint</reference_type>
            </right_operand>
          </expression>
        </includes>
      </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>0</lower>
        </interval>
      </cardinality>
    </attributes>
  </definition>
  <ontology>
    <term_definitions language="en">
      <items code="at0000">
        <items id="text">Referral details</items>
        <items id="description">Example framework for modelling a template for a referral.</items>
      </items>
      <items code="at0001">
        <items id="text">Referral request</items>
        <items id="description">Details about the referral request.</items>
      </items>
      <items code="at0002">
        <items id="text">Details</items>
        <items id="description">Additional clinical details supporting the referral.</items>
      </items>
    </term_definitions>
  </ontology>
</archetype>
